Skip to main content

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 gaxi;
23extern crate google_cloud_gax;
24extern crate google_cloud_iam_v1;
25extern crate google_cloud_location;
26extern crate google_cloud_longrunning;
27extern crate google_cloud_lro;
28extern crate lazy_static;
29extern crate serde;
30extern crate serde_json;
31extern crate serde_with;
32extern crate std;
33extern crate tracing;
34extern crate wkt;
35
36mod debug;
37mod deserialize;
38mod serialize;
39
40/// Environment represents a user-visible compute infrastructure for analytics
41/// within a lake.
42#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct Environment {
45    /// Output only. The relative resource name of the environment, of the form:
46    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}
47    pub name: std::string::String,
48
49    /// Optional. User friendly display name.
50    pub display_name: std::string::String,
51
52    /// Output only. System generated globally unique ID for the environment. This
53    /// ID will be different if the environment is deleted and re-created with the
54    /// same name.
55    pub uid: std::string::String,
56
57    /// Output only. Environment creation time.
58    pub create_time: std::option::Option<wkt::Timestamp>,
59
60    /// Output only. The time when the environment was last updated.
61    pub update_time: std::option::Option<wkt::Timestamp>,
62
63    /// Optional. User defined labels for the environment.
64    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
65
66    /// Optional. Description of the environment.
67    pub description: std::string::String,
68
69    /// Output only. Current state of the environment.
70    pub state: crate::model::State,
71
72    /// Required. Infrastructure specification for the Environment.
73    pub infrastructure_spec: std::option::Option<crate::model::environment::InfrastructureSpec>,
74
75    /// Optional. Configuration for sessions created for this environment.
76    pub session_spec: std::option::Option<crate::model::environment::SessionSpec>,
77
78    /// Output only. Status of sessions created for this environment.
79    pub session_status: std::option::Option<crate::model::environment::SessionStatus>,
80
81    /// Output only. URI Endpoints to access sessions associated with the
82    /// Environment.
83    pub endpoints: std::option::Option<crate::model::environment::Endpoints>,
84
85    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
86}
87
88impl Environment {
89    pub fn new() -> Self {
90        std::default::Default::default()
91    }
92
93    /// Sets the value of [name][crate::model::Environment::name].
94    ///
95    /// # Example
96    /// ```ignore,no_run
97    /// # use google_cloud_dataplex_v1::model::Environment;
98    /// let x = Environment::new().set_name("example");
99    /// ```
100    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
101        self.name = v.into();
102        self
103    }
104
105    /// Sets the value of [display_name][crate::model::Environment::display_name].
106    ///
107    /// # Example
108    /// ```ignore,no_run
109    /// # use google_cloud_dataplex_v1::model::Environment;
110    /// let x = Environment::new().set_display_name("example");
111    /// ```
112    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
113        self.display_name = v.into();
114        self
115    }
116
117    /// Sets the value of [uid][crate::model::Environment::uid].
118    ///
119    /// # Example
120    /// ```ignore,no_run
121    /// # use google_cloud_dataplex_v1::model::Environment;
122    /// let x = Environment::new().set_uid("example");
123    /// ```
124    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
125        self.uid = v.into();
126        self
127    }
128
129    /// Sets the value of [create_time][crate::model::Environment::create_time].
130    ///
131    /// # Example
132    /// ```ignore,no_run
133    /// # use google_cloud_dataplex_v1::model::Environment;
134    /// use wkt::Timestamp;
135    /// let x = Environment::new().set_create_time(Timestamp::default()/* use setters */);
136    /// ```
137    pub fn set_create_time<T>(mut self, v: T) -> Self
138    where
139        T: std::convert::Into<wkt::Timestamp>,
140    {
141        self.create_time = std::option::Option::Some(v.into());
142        self
143    }
144
145    /// Sets or clears the value of [create_time][crate::model::Environment::create_time].
146    ///
147    /// # Example
148    /// ```ignore,no_run
149    /// # use google_cloud_dataplex_v1::model::Environment;
150    /// use wkt::Timestamp;
151    /// let x = Environment::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
152    /// let x = Environment::new().set_or_clear_create_time(None::<Timestamp>);
153    /// ```
154    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
155    where
156        T: std::convert::Into<wkt::Timestamp>,
157    {
158        self.create_time = v.map(|x| x.into());
159        self
160    }
161
162    /// Sets the value of [update_time][crate::model::Environment::update_time].
163    ///
164    /// # Example
165    /// ```ignore,no_run
166    /// # use google_cloud_dataplex_v1::model::Environment;
167    /// use wkt::Timestamp;
168    /// let x = Environment::new().set_update_time(Timestamp::default()/* use setters */);
169    /// ```
170    pub fn set_update_time<T>(mut self, v: T) -> Self
171    where
172        T: std::convert::Into<wkt::Timestamp>,
173    {
174        self.update_time = std::option::Option::Some(v.into());
175        self
176    }
177
178    /// Sets or clears the value of [update_time][crate::model::Environment::update_time].
179    ///
180    /// # Example
181    /// ```ignore,no_run
182    /// # use google_cloud_dataplex_v1::model::Environment;
183    /// use wkt::Timestamp;
184    /// let x = Environment::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
185    /// let x = Environment::new().set_or_clear_update_time(None::<Timestamp>);
186    /// ```
187    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
188    where
189        T: std::convert::Into<wkt::Timestamp>,
190    {
191        self.update_time = v.map(|x| x.into());
192        self
193    }
194
195    /// Sets the value of [labels][crate::model::Environment::labels].
196    ///
197    /// # Example
198    /// ```ignore,no_run
199    /// # use google_cloud_dataplex_v1::model::Environment;
200    /// let x = Environment::new().set_labels([
201    ///     ("key0", "abc"),
202    ///     ("key1", "xyz"),
203    /// ]);
204    /// ```
205    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
206    where
207        T: std::iter::IntoIterator<Item = (K, V)>,
208        K: std::convert::Into<std::string::String>,
209        V: std::convert::Into<std::string::String>,
210    {
211        use std::iter::Iterator;
212        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
213        self
214    }
215
216    /// Sets the value of [description][crate::model::Environment::description].
217    ///
218    /// # Example
219    /// ```ignore,no_run
220    /// # use google_cloud_dataplex_v1::model::Environment;
221    /// let x = Environment::new().set_description("example");
222    /// ```
223    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
224        self.description = v.into();
225        self
226    }
227
228    /// Sets the value of [state][crate::model::Environment::state].
229    ///
230    /// # Example
231    /// ```ignore,no_run
232    /// # use google_cloud_dataplex_v1::model::Environment;
233    /// use google_cloud_dataplex_v1::model::State;
234    /// let x0 = Environment::new().set_state(State::Active);
235    /// let x1 = Environment::new().set_state(State::Creating);
236    /// let x2 = Environment::new().set_state(State::Deleting);
237    /// ```
238    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
239        self.state = v.into();
240        self
241    }
242
243    /// Sets the value of [infrastructure_spec][crate::model::Environment::infrastructure_spec].
244    ///
245    /// # Example
246    /// ```ignore,no_run
247    /// # use google_cloud_dataplex_v1::model::Environment;
248    /// use google_cloud_dataplex_v1::model::environment::InfrastructureSpec;
249    /// let x = Environment::new().set_infrastructure_spec(InfrastructureSpec::default()/* use setters */);
250    /// ```
251    pub fn set_infrastructure_spec<T>(mut self, v: T) -> Self
252    where
253        T: std::convert::Into<crate::model::environment::InfrastructureSpec>,
254    {
255        self.infrastructure_spec = std::option::Option::Some(v.into());
256        self
257    }
258
259    /// Sets or clears the value of [infrastructure_spec][crate::model::Environment::infrastructure_spec].
260    ///
261    /// # Example
262    /// ```ignore,no_run
263    /// # use google_cloud_dataplex_v1::model::Environment;
264    /// use google_cloud_dataplex_v1::model::environment::InfrastructureSpec;
265    /// let x = Environment::new().set_or_clear_infrastructure_spec(Some(InfrastructureSpec::default()/* use setters */));
266    /// let x = Environment::new().set_or_clear_infrastructure_spec(None::<InfrastructureSpec>);
267    /// ```
268    pub fn set_or_clear_infrastructure_spec<T>(mut self, v: std::option::Option<T>) -> Self
269    where
270        T: std::convert::Into<crate::model::environment::InfrastructureSpec>,
271    {
272        self.infrastructure_spec = v.map(|x| x.into());
273        self
274    }
275
276    /// Sets the value of [session_spec][crate::model::Environment::session_spec].
277    ///
278    /// # Example
279    /// ```ignore,no_run
280    /// # use google_cloud_dataplex_v1::model::Environment;
281    /// use google_cloud_dataplex_v1::model::environment::SessionSpec;
282    /// let x = Environment::new().set_session_spec(SessionSpec::default()/* use setters */);
283    /// ```
284    pub fn set_session_spec<T>(mut self, v: T) -> Self
285    where
286        T: std::convert::Into<crate::model::environment::SessionSpec>,
287    {
288        self.session_spec = std::option::Option::Some(v.into());
289        self
290    }
291
292    /// Sets or clears the value of [session_spec][crate::model::Environment::session_spec].
293    ///
294    /// # Example
295    /// ```ignore,no_run
296    /// # use google_cloud_dataplex_v1::model::Environment;
297    /// use google_cloud_dataplex_v1::model::environment::SessionSpec;
298    /// let x = Environment::new().set_or_clear_session_spec(Some(SessionSpec::default()/* use setters */));
299    /// let x = Environment::new().set_or_clear_session_spec(None::<SessionSpec>);
300    /// ```
301    pub fn set_or_clear_session_spec<T>(mut self, v: std::option::Option<T>) -> Self
302    where
303        T: std::convert::Into<crate::model::environment::SessionSpec>,
304    {
305        self.session_spec = v.map(|x| x.into());
306        self
307    }
308
309    /// Sets the value of [session_status][crate::model::Environment::session_status].
310    ///
311    /// # Example
312    /// ```ignore,no_run
313    /// # use google_cloud_dataplex_v1::model::Environment;
314    /// use google_cloud_dataplex_v1::model::environment::SessionStatus;
315    /// let x = Environment::new().set_session_status(SessionStatus::default()/* use setters */);
316    /// ```
317    pub fn set_session_status<T>(mut self, v: T) -> Self
318    where
319        T: std::convert::Into<crate::model::environment::SessionStatus>,
320    {
321        self.session_status = std::option::Option::Some(v.into());
322        self
323    }
324
325    /// Sets or clears the value of [session_status][crate::model::Environment::session_status].
326    ///
327    /// # Example
328    /// ```ignore,no_run
329    /// # use google_cloud_dataplex_v1::model::Environment;
330    /// use google_cloud_dataplex_v1::model::environment::SessionStatus;
331    /// let x = Environment::new().set_or_clear_session_status(Some(SessionStatus::default()/* use setters */));
332    /// let x = Environment::new().set_or_clear_session_status(None::<SessionStatus>);
333    /// ```
334    pub fn set_or_clear_session_status<T>(mut self, v: std::option::Option<T>) -> Self
335    where
336        T: std::convert::Into<crate::model::environment::SessionStatus>,
337    {
338        self.session_status = v.map(|x| x.into());
339        self
340    }
341
342    /// Sets the value of [endpoints][crate::model::Environment::endpoints].
343    ///
344    /// # Example
345    /// ```ignore,no_run
346    /// # use google_cloud_dataplex_v1::model::Environment;
347    /// use google_cloud_dataplex_v1::model::environment::Endpoints;
348    /// let x = Environment::new().set_endpoints(Endpoints::default()/* use setters */);
349    /// ```
350    pub fn set_endpoints<T>(mut self, v: T) -> Self
351    where
352        T: std::convert::Into<crate::model::environment::Endpoints>,
353    {
354        self.endpoints = std::option::Option::Some(v.into());
355        self
356    }
357
358    /// Sets or clears the value of [endpoints][crate::model::Environment::endpoints].
359    ///
360    /// # Example
361    /// ```ignore,no_run
362    /// # use google_cloud_dataplex_v1::model::Environment;
363    /// use google_cloud_dataplex_v1::model::environment::Endpoints;
364    /// let x = Environment::new().set_or_clear_endpoints(Some(Endpoints::default()/* use setters */));
365    /// let x = Environment::new().set_or_clear_endpoints(None::<Endpoints>);
366    /// ```
367    pub fn set_or_clear_endpoints<T>(mut self, v: std::option::Option<T>) -> Self
368    where
369        T: std::convert::Into<crate::model::environment::Endpoints>,
370    {
371        self.endpoints = v.map(|x| x.into());
372        self
373    }
374}
375
376impl wkt::message::Message for Environment {
377    fn typename() -> &'static str {
378        "type.googleapis.com/google.cloud.dataplex.v1.Environment"
379    }
380}
381
382/// Defines additional types related to [Environment].
383pub mod environment {
384    #[allow(unused_imports)]
385    use super::*;
386
387    /// Configuration for the underlying infrastructure used to run workloads.
388    #[derive(Clone, Default, PartialEq)]
389    #[non_exhaustive]
390    pub struct InfrastructureSpec {
391        /// Hardware config
392        pub resources:
393            std::option::Option<crate::model::environment::infrastructure_spec::Resources>,
394
395        /// Software config
396        pub runtime: std::option::Option<crate::model::environment::infrastructure_spec::Runtime>,
397
398        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
399    }
400
401    impl InfrastructureSpec {
402        pub fn new() -> Self {
403            std::default::Default::default()
404        }
405
406        /// Sets the value of [resources][crate::model::environment::InfrastructureSpec::resources].
407        ///
408        /// Note that all the setters affecting `resources` are mutually
409        /// exclusive.
410        ///
411        /// # Example
412        /// ```ignore,no_run
413        /// # use google_cloud_dataplex_v1::model::environment::InfrastructureSpec;
414        /// use google_cloud_dataplex_v1::model::environment::infrastructure_spec::ComputeResources;
415        /// let x = InfrastructureSpec::new().set_resources(Some(
416        ///     google_cloud_dataplex_v1::model::environment::infrastructure_spec::Resources::Compute(ComputeResources::default().into())));
417        /// ```
418        pub fn set_resources<
419            T: std::convert::Into<
420                    std::option::Option<crate::model::environment::infrastructure_spec::Resources>,
421                >,
422        >(
423            mut self,
424            v: T,
425        ) -> Self {
426            self.resources = v.into();
427            self
428        }
429
430        /// The value of [resources][crate::model::environment::InfrastructureSpec::resources]
431        /// if it holds a `Compute`, `None` if the field is not set or
432        /// holds a different branch.
433        pub fn compute(
434            &self,
435        ) -> std::option::Option<
436            &std::boxed::Box<crate::model::environment::infrastructure_spec::ComputeResources>,
437        > {
438            #[allow(unreachable_patterns)]
439            self.resources.as_ref().and_then(|v| match v {
440                crate::model::environment::infrastructure_spec::Resources::Compute(v) => {
441                    std::option::Option::Some(v)
442                }
443                _ => std::option::Option::None,
444            })
445        }
446
447        /// Sets the value of [resources][crate::model::environment::InfrastructureSpec::resources]
448        /// to hold a `Compute`.
449        ///
450        /// Note that all the setters affecting `resources` are
451        /// mutually exclusive.
452        ///
453        /// # Example
454        /// ```ignore,no_run
455        /// # use google_cloud_dataplex_v1::model::environment::InfrastructureSpec;
456        /// use google_cloud_dataplex_v1::model::environment::infrastructure_spec::ComputeResources;
457        /// let x = InfrastructureSpec::new().set_compute(ComputeResources::default()/* use setters */);
458        /// assert!(x.compute().is_some());
459        /// ```
460        pub fn set_compute<
461            T: std::convert::Into<
462                    std::boxed::Box<
463                        crate::model::environment::infrastructure_spec::ComputeResources,
464                    >,
465                >,
466        >(
467            mut self,
468            v: T,
469        ) -> Self {
470            self.resources = std::option::Option::Some(
471                crate::model::environment::infrastructure_spec::Resources::Compute(v.into()),
472            );
473            self
474        }
475
476        /// Sets the value of [runtime][crate::model::environment::InfrastructureSpec::runtime].
477        ///
478        /// Note that all the setters affecting `runtime` are mutually
479        /// exclusive.
480        ///
481        /// # Example
482        /// ```ignore,no_run
483        /// # use google_cloud_dataplex_v1::model::environment::InfrastructureSpec;
484        /// use google_cloud_dataplex_v1::model::environment::infrastructure_spec::OsImageRuntime;
485        /// let x = InfrastructureSpec::new().set_runtime(Some(
486        ///     google_cloud_dataplex_v1::model::environment::infrastructure_spec::Runtime::OsImage(OsImageRuntime::default().into())));
487        /// ```
488        pub fn set_runtime<
489            T: std::convert::Into<
490                    std::option::Option<crate::model::environment::infrastructure_spec::Runtime>,
491                >,
492        >(
493            mut self,
494            v: T,
495        ) -> Self {
496            self.runtime = v.into();
497            self
498        }
499
500        /// The value of [runtime][crate::model::environment::InfrastructureSpec::runtime]
501        /// if it holds a `OsImage`, `None` if the field is not set or
502        /// holds a different branch.
503        pub fn os_image(
504            &self,
505        ) -> std::option::Option<
506            &std::boxed::Box<crate::model::environment::infrastructure_spec::OsImageRuntime>,
507        > {
508            #[allow(unreachable_patterns)]
509            self.runtime.as_ref().and_then(|v| match v {
510                crate::model::environment::infrastructure_spec::Runtime::OsImage(v) => {
511                    std::option::Option::Some(v)
512                }
513                _ => std::option::Option::None,
514            })
515        }
516
517        /// Sets the value of [runtime][crate::model::environment::InfrastructureSpec::runtime]
518        /// to hold a `OsImage`.
519        ///
520        /// Note that all the setters affecting `runtime` are
521        /// mutually exclusive.
522        ///
523        /// # Example
524        /// ```ignore,no_run
525        /// # use google_cloud_dataplex_v1::model::environment::InfrastructureSpec;
526        /// use google_cloud_dataplex_v1::model::environment::infrastructure_spec::OsImageRuntime;
527        /// let x = InfrastructureSpec::new().set_os_image(OsImageRuntime::default()/* use setters */);
528        /// assert!(x.os_image().is_some());
529        /// ```
530        pub fn set_os_image<
531            T: std::convert::Into<
532                    std::boxed::Box<crate::model::environment::infrastructure_spec::OsImageRuntime>,
533                >,
534        >(
535            mut self,
536            v: T,
537        ) -> Self {
538            self.runtime = std::option::Option::Some(
539                crate::model::environment::infrastructure_spec::Runtime::OsImage(v.into()),
540            );
541            self
542        }
543    }
544
545    impl wkt::message::Message for InfrastructureSpec {
546        fn typename() -> &'static str {
547            "type.googleapis.com/google.cloud.dataplex.v1.Environment.InfrastructureSpec"
548        }
549    }
550
551    /// Defines additional types related to [InfrastructureSpec].
552    pub mod infrastructure_spec {
553        #[allow(unused_imports)]
554        use super::*;
555
556        /// Compute resources associated with the analyze interactive workloads.
557        #[derive(Clone, Default, PartialEq)]
558        #[non_exhaustive]
559        pub struct ComputeResources {
560            /// Optional. Size in GB of the disk. Default is 100 GB.
561            pub disk_size_gb: i32,
562
563            /// Optional. Total number of nodes in the sessions created for this
564            /// environment.
565            pub node_count: i32,
566
567            /// Optional. Max configurable nodes.
568            /// If max_node_count > node_count, then auto-scaling is enabled.
569            pub max_node_count: i32,
570
571            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
572        }
573
574        impl ComputeResources {
575            pub fn new() -> Self {
576                std::default::Default::default()
577            }
578
579            /// Sets the value of [disk_size_gb][crate::model::environment::infrastructure_spec::ComputeResources::disk_size_gb].
580            ///
581            /// # Example
582            /// ```ignore,no_run
583            /// # use google_cloud_dataplex_v1::model::environment::infrastructure_spec::ComputeResources;
584            /// let x = ComputeResources::new().set_disk_size_gb(42);
585            /// ```
586            pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
587                self.disk_size_gb = v.into();
588                self
589            }
590
591            /// Sets the value of [node_count][crate::model::environment::infrastructure_spec::ComputeResources::node_count].
592            ///
593            /// # Example
594            /// ```ignore,no_run
595            /// # use google_cloud_dataplex_v1::model::environment::infrastructure_spec::ComputeResources;
596            /// let x = ComputeResources::new().set_node_count(42);
597            /// ```
598            pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
599                self.node_count = v.into();
600                self
601            }
602
603            /// Sets the value of [max_node_count][crate::model::environment::infrastructure_spec::ComputeResources::max_node_count].
604            ///
605            /// # Example
606            /// ```ignore,no_run
607            /// # use google_cloud_dataplex_v1::model::environment::infrastructure_spec::ComputeResources;
608            /// let x = ComputeResources::new().set_max_node_count(42);
609            /// ```
610            pub fn set_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
611                self.max_node_count = v.into();
612                self
613            }
614        }
615
616        impl wkt::message::Message for ComputeResources {
617            fn typename() -> &'static str {
618                "type.googleapis.com/google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources"
619            }
620        }
621
622        /// Software Runtime Configuration to run Analyze.
623        #[derive(Clone, Default, PartialEq)]
624        #[non_exhaustive]
625        pub struct OsImageRuntime {
626            /// Required. Dataplex Universal Catalog Image version.
627            pub image_version: std::string::String,
628
629            /// Optional. List of Java jars to be included in the runtime environment.
630            /// Valid input includes Cloud Storage URIs to Jar binaries.
631            /// For example, gs://bucket-name/my/path/to/file.jar
632            pub java_libraries: std::vec::Vec<std::string::String>,
633
634            /// Optional. A list of python packages to be installed.
635            /// Valid formats include Cloud Storage URI to a PIP installable library.
636            /// For example, gs://bucket-name/my/path/to/lib.tar.gz
637            pub python_packages: std::vec::Vec<std::string::String>,
638
639            /// Optional. Spark properties to provide configuration for use in sessions
640            /// created for this environment. The properties to set on daemon config
641            /// files. Property keys are specified in `prefix:property` format. The
642            /// prefix must be "spark".
643            pub properties: std::collections::HashMap<std::string::String, std::string::String>,
644
645            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
646        }
647
648        impl OsImageRuntime {
649            pub fn new() -> Self {
650                std::default::Default::default()
651            }
652
653            /// Sets the value of [image_version][crate::model::environment::infrastructure_spec::OsImageRuntime::image_version].
654            ///
655            /// # Example
656            /// ```ignore,no_run
657            /// # use google_cloud_dataplex_v1::model::environment::infrastructure_spec::OsImageRuntime;
658            /// let x = OsImageRuntime::new().set_image_version("example");
659            /// ```
660            pub fn set_image_version<T: std::convert::Into<std::string::String>>(
661                mut self,
662                v: T,
663            ) -> Self {
664                self.image_version = v.into();
665                self
666            }
667
668            /// Sets the value of [java_libraries][crate::model::environment::infrastructure_spec::OsImageRuntime::java_libraries].
669            ///
670            /// # Example
671            /// ```ignore,no_run
672            /// # use google_cloud_dataplex_v1::model::environment::infrastructure_spec::OsImageRuntime;
673            /// let x = OsImageRuntime::new().set_java_libraries(["a", "b", "c"]);
674            /// ```
675            pub fn set_java_libraries<T, V>(mut self, v: T) -> Self
676            where
677                T: std::iter::IntoIterator<Item = V>,
678                V: std::convert::Into<std::string::String>,
679            {
680                use std::iter::Iterator;
681                self.java_libraries = v.into_iter().map(|i| i.into()).collect();
682                self
683            }
684
685            /// Sets the value of [python_packages][crate::model::environment::infrastructure_spec::OsImageRuntime::python_packages].
686            ///
687            /// # Example
688            /// ```ignore,no_run
689            /// # use google_cloud_dataplex_v1::model::environment::infrastructure_spec::OsImageRuntime;
690            /// let x = OsImageRuntime::new().set_python_packages(["a", "b", "c"]);
691            /// ```
692            pub fn set_python_packages<T, V>(mut self, v: T) -> Self
693            where
694                T: std::iter::IntoIterator<Item = V>,
695                V: std::convert::Into<std::string::String>,
696            {
697                use std::iter::Iterator;
698                self.python_packages = v.into_iter().map(|i| i.into()).collect();
699                self
700            }
701
702            /// Sets the value of [properties][crate::model::environment::infrastructure_spec::OsImageRuntime::properties].
703            ///
704            /// # Example
705            /// ```ignore,no_run
706            /// # use google_cloud_dataplex_v1::model::environment::infrastructure_spec::OsImageRuntime;
707            /// let x = OsImageRuntime::new().set_properties([
708            ///     ("key0", "abc"),
709            ///     ("key1", "xyz"),
710            /// ]);
711            /// ```
712            pub fn set_properties<T, K, V>(mut self, v: T) -> Self
713            where
714                T: std::iter::IntoIterator<Item = (K, V)>,
715                K: std::convert::Into<std::string::String>,
716                V: std::convert::Into<std::string::String>,
717            {
718                use std::iter::Iterator;
719                self.properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
720                self
721            }
722        }
723
724        impl wkt::message::Message for OsImageRuntime {
725            fn typename() -> &'static str {
726                "type.googleapis.com/google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime"
727            }
728        }
729
730        /// Hardware config
731        #[derive(Clone, Debug, PartialEq)]
732        #[non_exhaustive]
733        pub enum Resources {
734            /// Optional. Compute resources needed for analyze interactive workloads.
735            Compute(
736                std::boxed::Box<crate::model::environment::infrastructure_spec::ComputeResources>,
737            ),
738        }
739
740        /// Software config
741        #[derive(Clone, Debug, PartialEq)]
742        #[non_exhaustive]
743        pub enum Runtime {
744            /// Required. Software Runtime Configuration for analyze interactive
745            /// workloads.
746            OsImage(
747                std::boxed::Box<crate::model::environment::infrastructure_spec::OsImageRuntime>,
748            ),
749        }
750    }
751
752    /// Configuration for sessions created for this environment.
753    #[derive(Clone, Default, PartialEq)]
754    #[non_exhaustive]
755    pub struct SessionSpec {
756        /// Optional. The idle time configuration of the session. The session will be
757        /// auto-terminated at the end of this period.
758        pub max_idle_duration: std::option::Option<wkt::Duration>,
759
760        /// Optional. If True, this causes sessions to be pre-created and available
761        /// for faster startup to enable interactive exploration use-cases. This
762        /// defaults to False to avoid additional billed charges. These can only be
763        /// set to True for the environment with name set to "default", and with
764        /// default configuration.
765        pub enable_fast_startup: bool,
766
767        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
768    }
769
770    impl SessionSpec {
771        pub fn new() -> Self {
772            std::default::Default::default()
773        }
774
775        /// Sets the value of [max_idle_duration][crate::model::environment::SessionSpec::max_idle_duration].
776        ///
777        /// # Example
778        /// ```ignore,no_run
779        /// # use google_cloud_dataplex_v1::model::environment::SessionSpec;
780        /// use wkt::Duration;
781        /// let x = SessionSpec::new().set_max_idle_duration(Duration::default()/* use setters */);
782        /// ```
783        pub fn set_max_idle_duration<T>(mut self, v: T) -> Self
784        where
785            T: std::convert::Into<wkt::Duration>,
786        {
787            self.max_idle_duration = std::option::Option::Some(v.into());
788            self
789        }
790
791        /// Sets or clears the value of [max_idle_duration][crate::model::environment::SessionSpec::max_idle_duration].
792        ///
793        /// # Example
794        /// ```ignore,no_run
795        /// # use google_cloud_dataplex_v1::model::environment::SessionSpec;
796        /// use wkt::Duration;
797        /// let x = SessionSpec::new().set_or_clear_max_idle_duration(Some(Duration::default()/* use setters */));
798        /// let x = SessionSpec::new().set_or_clear_max_idle_duration(None::<Duration>);
799        /// ```
800        pub fn set_or_clear_max_idle_duration<T>(mut self, v: std::option::Option<T>) -> Self
801        where
802            T: std::convert::Into<wkt::Duration>,
803        {
804            self.max_idle_duration = v.map(|x| x.into());
805            self
806        }
807
808        /// Sets the value of [enable_fast_startup][crate::model::environment::SessionSpec::enable_fast_startup].
809        ///
810        /// # Example
811        /// ```ignore,no_run
812        /// # use google_cloud_dataplex_v1::model::environment::SessionSpec;
813        /// let x = SessionSpec::new().set_enable_fast_startup(true);
814        /// ```
815        pub fn set_enable_fast_startup<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
816            self.enable_fast_startup = v.into();
817            self
818        }
819    }
820
821    impl wkt::message::Message for SessionSpec {
822        fn typename() -> &'static str {
823            "type.googleapis.com/google.cloud.dataplex.v1.Environment.SessionSpec"
824        }
825    }
826
827    /// Status of sessions created for this environment.
828    #[derive(Clone, Default, PartialEq)]
829    #[non_exhaustive]
830    pub struct SessionStatus {
831        /// Output only. Queries over sessions to mark whether the environment is
832        /// currently active or not
833        pub active: bool,
834
835        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
836    }
837
838    impl SessionStatus {
839        pub fn new() -> Self {
840            std::default::Default::default()
841        }
842
843        /// Sets the value of [active][crate::model::environment::SessionStatus::active].
844        ///
845        /// # Example
846        /// ```ignore,no_run
847        /// # use google_cloud_dataplex_v1::model::environment::SessionStatus;
848        /// let x = SessionStatus::new().set_active(true);
849        /// ```
850        pub fn set_active<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
851            self.active = v.into();
852            self
853        }
854    }
855
856    impl wkt::message::Message for SessionStatus {
857        fn typename() -> &'static str {
858            "type.googleapis.com/google.cloud.dataplex.v1.Environment.SessionStatus"
859        }
860    }
861
862    /// URI Endpoints to access sessions associated with the Environment.
863    #[derive(Clone, Default, PartialEq)]
864    #[non_exhaustive]
865    pub struct Endpoints {
866        /// Output only. URI to serve notebook APIs
867        pub notebooks: std::string::String,
868
869        /// Output only. URI to serve SQL APIs
870        pub sql: std::string::String,
871
872        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
873    }
874
875    impl Endpoints {
876        pub fn new() -> Self {
877            std::default::Default::default()
878        }
879
880        /// Sets the value of [notebooks][crate::model::environment::Endpoints::notebooks].
881        ///
882        /// # Example
883        /// ```ignore,no_run
884        /// # use google_cloud_dataplex_v1::model::environment::Endpoints;
885        /// let x = Endpoints::new().set_notebooks("example");
886        /// ```
887        pub fn set_notebooks<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
888            self.notebooks = v.into();
889            self
890        }
891
892        /// Sets the value of [sql][crate::model::environment::Endpoints::sql].
893        ///
894        /// # Example
895        /// ```ignore,no_run
896        /// # use google_cloud_dataplex_v1::model::environment::Endpoints;
897        /// let x = Endpoints::new().set_sql("example");
898        /// ```
899        pub fn set_sql<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
900            self.sql = v.into();
901            self
902        }
903    }
904
905    impl wkt::message::Message for Endpoints {
906        fn typename() -> &'static str {
907            "type.googleapis.com/google.cloud.dataplex.v1.Environment.Endpoints"
908        }
909    }
910}
911
912/// Content represents a user-visible notebook or a sql script
913#[derive(Clone, Default, PartialEq)]
914#[non_exhaustive]
915pub struct Content {
916    /// Output only. The relative resource name of the content, of the form:
917    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}
918    pub name: std::string::String,
919
920    /// Output only. System generated globally unique ID for the content. This ID
921    /// will be different if the content is deleted and re-created with the same
922    /// name.
923    pub uid: std::string::String,
924
925    /// Required. The path for the Content file, represented as directory
926    /// structure. Unique within a lake. Limited to alphanumerics, hyphens,
927    /// underscores, dots and slashes.
928    pub path: std::string::String,
929
930    /// Output only. Content creation time.
931    pub create_time: std::option::Option<wkt::Timestamp>,
932
933    /// Output only. The time when the content was last updated.
934    pub update_time: std::option::Option<wkt::Timestamp>,
935
936    /// Optional. User defined labels for the content.
937    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
938
939    /// Optional. Description of the content.
940    pub description: std::string::String,
941
942    /// Only returned in `GetContent` requests and not in `ListContent` request.
943    pub data: std::option::Option<crate::model::content::Data>,
944
945    /// Types of content
946    pub content: std::option::Option<crate::model::content::Content>,
947
948    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
949}
950
951impl Content {
952    pub fn new() -> Self {
953        std::default::Default::default()
954    }
955
956    /// Sets the value of [name][crate::model::Content::name].
957    ///
958    /// # Example
959    /// ```ignore,no_run
960    /// # use google_cloud_dataplex_v1::model::Content;
961    /// let x = Content::new().set_name("example");
962    /// ```
963    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
964        self.name = v.into();
965        self
966    }
967
968    /// Sets the value of [uid][crate::model::Content::uid].
969    ///
970    /// # Example
971    /// ```ignore,no_run
972    /// # use google_cloud_dataplex_v1::model::Content;
973    /// let x = Content::new().set_uid("example");
974    /// ```
975    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
976        self.uid = v.into();
977        self
978    }
979
980    /// Sets the value of [path][crate::model::Content::path].
981    ///
982    /// # Example
983    /// ```ignore,no_run
984    /// # use google_cloud_dataplex_v1::model::Content;
985    /// let x = Content::new().set_path("example");
986    /// ```
987    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
988        self.path = v.into();
989        self
990    }
991
992    /// Sets the value of [create_time][crate::model::Content::create_time].
993    ///
994    /// # Example
995    /// ```ignore,no_run
996    /// # use google_cloud_dataplex_v1::model::Content;
997    /// use wkt::Timestamp;
998    /// let x = Content::new().set_create_time(Timestamp::default()/* use setters */);
999    /// ```
1000    pub fn set_create_time<T>(mut self, v: T) -> Self
1001    where
1002        T: std::convert::Into<wkt::Timestamp>,
1003    {
1004        self.create_time = std::option::Option::Some(v.into());
1005        self
1006    }
1007
1008    /// Sets or clears the value of [create_time][crate::model::Content::create_time].
1009    ///
1010    /// # Example
1011    /// ```ignore,no_run
1012    /// # use google_cloud_dataplex_v1::model::Content;
1013    /// use wkt::Timestamp;
1014    /// let x = Content::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
1015    /// let x = Content::new().set_or_clear_create_time(None::<Timestamp>);
1016    /// ```
1017    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1018    where
1019        T: std::convert::Into<wkt::Timestamp>,
1020    {
1021        self.create_time = v.map(|x| x.into());
1022        self
1023    }
1024
1025    /// Sets the value of [update_time][crate::model::Content::update_time].
1026    ///
1027    /// # Example
1028    /// ```ignore,no_run
1029    /// # use google_cloud_dataplex_v1::model::Content;
1030    /// use wkt::Timestamp;
1031    /// let x = Content::new().set_update_time(Timestamp::default()/* use setters */);
1032    /// ```
1033    pub fn set_update_time<T>(mut self, v: T) -> Self
1034    where
1035        T: std::convert::Into<wkt::Timestamp>,
1036    {
1037        self.update_time = std::option::Option::Some(v.into());
1038        self
1039    }
1040
1041    /// Sets or clears the value of [update_time][crate::model::Content::update_time].
1042    ///
1043    /// # Example
1044    /// ```ignore,no_run
1045    /// # use google_cloud_dataplex_v1::model::Content;
1046    /// use wkt::Timestamp;
1047    /// let x = Content::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
1048    /// let x = Content::new().set_or_clear_update_time(None::<Timestamp>);
1049    /// ```
1050    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1051    where
1052        T: std::convert::Into<wkt::Timestamp>,
1053    {
1054        self.update_time = v.map(|x| x.into());
1055        self
1056    }
1057
1058    /// Sets the value of [labels][crate::model::Content::labels].
1059    ///
1060    /// # Example
1061    /// ```ignore,no_run
1062    /// # use google_cloud_dataplex_v1::model::Content;
1063    /// let x = Content::new().set_labels([
1064    ///     ("key0", "abc"),
1065    ///     ("key1", "xyz"),
1066    /// ]);
1067    /// ```
1068    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1069    where
1070        T: std::iter::IntoIterator<Item = (K, V)>,
1071        K: std::convert::Into<std::string::String>,
1072        V: std::convert::Into<std::string::String>,
1073    {
1074        use std::iter::Iterator;
1075        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1076        self
1077    }
1078
1079    /// Sets the value of [description][crate::model::Content::description].
1080    ///
1081    /// # Example
1082    /// ```ignore,no_run
1083    /// # use google_cloud_dataplex_v1::model::Content;
1084    /// let x = Content::new().set_description("example");
1085    /// ```
1086    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1087        self.description = v.into();
1088        self
1089    }
1090
1091    /// Sets the value of [data][crate::model::Content::data].
1092    ///
1093    /// Note that all the setters affecting `data` are mutually
1094    /// exclusive.
1095    ///
1096    /// # Example
1097    /// ```ignore,no_run
1098    /// # use google_cloud_dataplex_v1::model::Content;
1099    /// use google_cloud_dataplex_v1::model::content::Data;
1100    /// let x = Content::new().set_data(Some(Data::DataText("example".to_string())));
1101    /// ```
1102    pub fn set_data<T: std::convert::Into<std::option::Option<crate::model::content::Data>>>(
1103        mut self,
1104        v: T,
1105    ) -> Self {
1106        self.data = v.into();
1107        self
1108    }
1109
1110    /// The value of [data][crate::model::Content::data]
1111    /// if it holds a `DataText`, `None` if the field is not set or
1112    /// holds a different branch.
1113    pub fn data_text(&self) -> std::option::Option<&std::string::String> {
1114        #[allow(unreachable_patterns)]
1115        self.data.as_ref().and_then(|v| match v {
1116            crate::model::content::Data::DataText(v) => std::option::Option::Some(v),
1117            _ => std::option::Option::None,
1118        })
1119    }
1120
1121    /// Sets the value of [data][crate::model::Content::data]
1122    /// to hold a `DataText`.
1123    ///
1124    /// Note that all the setters affecting `data` are
1125    /// mutually exclusive.
1126    ///
1127    /// # Example
1128    /// ```ignore,no_run
1129    /// # use google_cloud_dataplex_v1::model::Content;
1130    /// let x = Content::new().set_data_text("example");
1131    /// assert!(x.data_text().is_some());
1132    /// ```
1133    pub fn set_data_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1134        self.data = std::option::Option::Some(crate::model::content::Data::DataText(v.into()));
1135        self
1136    }
1137
1138    /// Sets the value of [content][crate::model::Content::content].
1139    ///
1140    /// Note that all the setters affecting `content` are mutually
1141    /// exclusive.
1142    ///
1143    /// # Example
1144    /// ```ignore,no_run
1145    /// # use google_cloud_dataplex_v1::model::Content;
1146    /// use google_cloud_dataplex_v1::model::content::SqlScript;
1147    /// let x = Content::new().set_content(Some(
1148    ///     google_cloud_dataplex_v1::model::content::Content::SqlScript(SqlScript::default().into())));
1149    /// ```
1150    pub fn set_content<
1151        T: std::convert::Into<std::option::Option<crate::model::content::Content>>,
1152    >(
1153        mut self,
1154        v: T,
1155    ) -> Self {
1156        self.content = v.into();
1157        self
1158    }
1159
1160    /// The value of [content][crate::model::Content::content]
1161    /// if it holds a `SqlScript`, `None` if the field is not set or
1162    /// holds a different branch.
1163    pub fn sql_script(
1164        &self,
1165    ) -> std::option::Option<&std::boxed::Box<crate::model::content::SqlScript>> {
1166        #[allow(unreachable_patterns)]
1167        self.content.as_ref().and_then(|v| match v {
1168            crate::model::content::Content::SqlScript(v) => std::option::Option::Some(v),
1169            _ => std::option::Option::None,
1170        })
1171    }
1172
1173    /// Sets the value of [content][crate::model::Content::content]
1174    /// to hold a `SqlScript`.
1175    ///
1176    /// Note that all the setters affecting `content` are
1177    /// mutually exclusive.
1178    ///
1179    /// # Example
1180    /// ```ignore,no_run
1181    /// # use google_cloud_dataplex_v1::model::Content;
1182    /// use google_cloud_dataplex_v1::model::content::SqlScript;
1183    /// let x = Content::new().set_sql_script(SqlScript::default()/* use setters */);
1184    /// assert!(x.sql_script().is_some());
1185    /// assert!(x.notebook().is_none());
1186    /// ```
1187    pub fn set_sql_script<
1188        T: std::convert::Into<std::boxed::Box<crate::model::content::SqlScript>>,
1189    >(
1190        mut self,
1191        v: T,
1192    ) -> Self {
1193        self.content =
1194            std::option::Option::Some(crate::model::content::Content::SqlScript(v.into()));
1195        self
1196    }
1197
1198    /// The value of [content][crate::model::Content::content]
1199    /// if it holds a `Notebook`, `None` if the field is not set or
1200    /// holds a different branch.
1201    pub fn notebook(
1202        &self,
1203    ) -> std::option::Option<&std::boxed::Box<crate::model::content::Notebook>> {
1204        #[allow(unreachable_patterns)]
1205        self.content.as_ref().and_then(|v| match v {
1206            crate::model::content::Content::Notebook(v) => std::option::Option::Some(v),
1207            _ => std::option::Option::None,
1208        })
1209    }
1210
1211    /// Sets the value of [content][crate::model::Content::content]
1212    /// to hold a `Notebook`.
1213    ///
1214    /// Note that all the setters affecting `content` are
1215    /// mutually exclusive.
1216    ///
1217    /// # Example
1218    /// ```ignore,no_run
1219    /// # use google_cloud_dataplex_v1::model::Content;
1220    /// use google_cloud_dataplex_v1::model::content::Notebook;
1221    /// let x = Content::new().set_notebook(Notebook::default()/* use setters */);
1222    /// assert!(x.notebook().is_some());
1223    /// assert!(x.sql_script().is_none());
1224    /// ```
1225    pub fn set_notebook<T: std::convert::Into<std::boxed::Box<crate::model::content::Notebook>>>(
1226        mut self,
1227        v: T,
1228    ) -> Self {
1229        self.content =
1230            std::option::Option::Some(crate::model::content::Content::Notebook(v.into()));
1231        self
1232    }
1233}
1234
1235impl wkt::message::Message for Content {
1236    fn typename() -> &'static str {
1237        "type.googleapis.com/google.cloud.dataplex.v1.Content"
1238    }
1239}
1240
1241/// Defines additional types related to [Content].
1242pub mod content {
1243    #[allow(unused_imports)]
1244    use super::*;
1245
1246    /// Configuration for the Sql Script content.
1247    #[derive(Clone, Default, PartialEq)]
1248    #[non_exhaustive]
1249    pub struct SqlScript {
1250        /// Required. Query Engine to be used for the Sql Query.
1251        pub engine: crate::model::content::sql_script::QueryEngine,
1252
1253        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1254    }
1255
1256    impl SqlScript {
1257        pub fn new() -> Self {
1258            std::default::Default::default()
1259        }
1260
1261        /// Sets the value of [engine][crate::model::content::SqlScript::engine].
1262        ///
1263        /// # Example
1264        /// ```ignore,no_run
1265        /// # use google_cloud_dataplex_v1::model::content::SqlScript;
1266        /// use google_cloud_dataplex_v1::model::content::sql_script::QueryEngine;
1267        /// let x0 = SqlScript::new().set_engine(QueryEngine::Spark);
1268        /// ```
1269        pub fn set_engine<T: std::convert::Into<crate::model::content::sql_script::QueryEngine>>(
1270            mut self,
1271            v: T,
1272        ) -> Self {
1273            self.engine = v.into();
1274            self
1275        }
1276    }
1277
1278    impl wkt::message::Message for SqlScript {
1279        fn typename() -> &'static str {
1280            "type.googleapis.com/google.cloud.dataplex.v1.Content.SqlScript"
1281        }
1282    }
1283
1284    /// Defines additional types related to [SqlScript].
1285    pub mod sql_script {
1286        #[allow(unused_imports)]
1287        use super::*;
1288
1289        /// Query Engine Type of the SQL Script.
1290        ///
1291        /// # Working with unknown values
1292        ///
1293        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1294        /// additional enum variants at any time. Adding new variants is not considered
1295        /// a breaking change. Applications should write their code in anticipation of:
1296        ///
1297        /// - New values appearing in future releases of the client library, **and**
1298        /// - New values received dynamically, without application changes.
1299        ///
1300        /// Please consult the [Working with enums] section in the user guide for some
1301        /// guidelines.
1302        ///
1303        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1304        #[derive(Clone, Debug, PartialEq)]
1305        #[non_exhaustive]
1306        pub enum QueryEngine {
1307            /// Value was unspecified.
1308            Unspecified,
1309            /// Spark SQL Query.
1310            Spark,
1311            /// If set, the enum was initialized with an unknown value.
1312            ///
1313            /// Applications can examine the value using [QueryEngine::value] or
1314            /// [QueryEngine::name].
1315            UnknownValue(query_engine::UnknownValue),
1316        }
1317
1318        #[doc(hidden)]
1319        pub mod query_engine {
1320            #[allow(unused_imports)]
1321            use super::*;
1322            #[derive(Clone, Debug, PartialEq)]
1323            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1324        }
1325
1326        impl QueryEngine {
1327            /// Gets the enum value.
1328            ///
1329            /// Returns `None` if the enum contains an unknown value deserialized from
1330            /// the string representation of enums.
1331            pub fn value(&self) -> std::option::Option<i32> {
1332                match self {
1333                    Self::Unspecified => std::option::Option::Some(0),
1334                    Self::Spark => std::option::Option::Some(2),
1335                    Self::UnknownValue(u) => u.0.value(),
1336                }
1337            }
1338
1339            /// Gets the enum value as a string.
1340            ///
1341            /// Returns `None` if the enum contains an unknown value deserialized from
1342            /// the integer representation of enums.
1343            pub fn name(&self) -> std::option::Option<&str> {
1344                match self {
1345                    Self::Unspecified => std::option::Option::Some("QUERY_ENGINE_UNSPECIFIED"),
1346                    Self::Spark => std::option::Option::Some("SPARK"),
1347                    Self::UnknownValue(u) => u.0.name(),
1348                }
1349            }
1350        }
1351
1352        impl std::default::Default for QueryEngine {
1353            fn default() -> Self {
1354                use std::convert::From;
1355                Self::from(0)
1356            }
1357        }
1358
1359        impl std::fmt::Display for QueryEngine {
1360            fn fmt(
1361                &self,
1362                f: &mut std::fmt::Formatter<'_>,
1363            ) -> std::result::Result<(), std::fmt::Error> {
1364                wkt::internal::display_enum(f, self.name(), self.value())
1365            }
1366        }
1367
1368        impl std::convert::From<i32> for QueryEngine {
1369            fn from(value: i32) -> Self {
1370                match value {
1371                    0 => Self::Unspecified,
1372                    2 => Self::Spark,
1373                    _ => Self::UnknownValue(query_engine::UnknownValue(
1374                        wkt::internal::UnknownEnumValue::Integer(value),
1375                    )),
1376                }
1377            }
1378        }
1379
1380        impl std::convert::From<&str> for QueryEngine {
1381            fn from(value: &str) -> Self {
1382                use std::string::ToString;
1383                match value {
1384                    "QUERY_ENGINE_UNSPECIFIED" => Self::Unspecified,
1385                    "SPARK" => Self::Spark,
1386                    _ => Self::UnknownValue(query_engine::UnknownValue(
1387                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1388                    )),
1389                }
1390            }
1391        }
1392
1393        impl serde::ser::Serialize for QueryEngine {
1394            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1395            where
1396                S: serde::Serializer,
1397            {
1398                match self {
1399                    Self::Unspecified => serializer.serialize_i32(0),
1400                    Self::Spark => serializer.serialize_i32(2),
1401                    Self::UnknownValue(u) => u.0.serialize(serializer),
1402                }
1403            }
1404        }
1405
1406        impl<'de> serde::de::Deserialize<'de> for QueryEngine {
1407            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1408            where
1409                D: serde::Deserializer<'de>,
1410            {
1411                deserializer.deserialize_any(wkt::internal::EnumVisitor::<QueryEngine>::new(
1412                    ".google.cloud.dataplex.v1.Content.SqlScript.QueryEngine",
1413                ))
1414            }
1415        }
1416    }
1417
1418    /// Configuration for Notebook content.
1419    #[derive(Clone, Default, PartialEq)]
1420    #[non_exhaustive]
1421    pub struct Notebook {
1422        /// Required. Kernel Type of the notebook.
1423        pub kernel_type: crate::model::content::notebook::KernelType,
1424
1425        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1426    }
1427
1428    impl Notebook {
1429        pub fn new() -> Self {
1430            std::default::Default::default()
1431        }
1432
1433        /// Sets the value of [kernel_type][crate::model::content::Notebook::kernel_type].
1434        ///
1435        /// # Example
1436        /// ```ignore,no_run
1437        /// # use google_cloud_dataplex_v1::model::content::Notebook;
1438        /// use google_cloud_dataplex_v1::model::content::notebook::KernelType;
1439        /// let x0 = Notebook::new().set_kernel_type(KernelType::Python3);
1440        /// ```
1441        pub fn set_kernel_type<
1442            T: std::convert::Into<crate::model::content::notebook::KernelType>,
1443        >(
1444            mut self,
1445            v: T,
1446        ) -> Self {
1447            self.kernel_type = v.into();
1448            self
1449        }
1450    }
1451
1452    impl wkt::message::Message for Notebook {
1453        fn typename() -> &'static str {
1454            "type.googleapis.com/google.cloud.dataplex.v1.Content.Notebook"
1455        }
1456    }
1457
1458    /// Defines additional types related to [Notebook].
1459    pub mod notebook {
1460        #[allow(unused_imports)]
1461        use super::*;
1462
1463        /// Kernel Type of the Jupyter notebook.
1464        ///
1465        /// # Working with unknown values
1466        ///
1467        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1468        /// additional enum variants at any time. Adding new variants is not considered
1469        /// a breaking change. Applications should write their code in anticipation of:
1470        ///
1471        /// - New values appearing in future releases of the client library, **and**
1472        /// - New values received dynamically, without application changes.
1473        ///
1474        /// Please consult the [Working with enums] section in the user guide for some
1475        /// guidelines.
1476        ///
1477        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1478        #[derive(Clone, Debug, PartialEq)]
1479        #[non_exhaustive]
1480        pub enum KernelType {
1481            /// Kernel Type unspecified.
1482            Unspecified,
1483            /// Python 3 Kernel.
1484            Python3,
1485            /// If set, the enum was initialized with an unknown value.
1486            ///
1487            /// Applications can examine the value using [KernelType::value] or
1488            /// [KernelType::name].
1489            UnknownValue(kernel_type::UnknownValue),
1490        }
1491
1492        #[doc(hidden)]
1493        pub mod kernel_type {
1494            #[allow(unused_imports)]
1495            use super::*;
1496            #[derive(Clone, Debug, PartialEq)]
1497            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1498        }
1499
1500        impl KernelType {
1501            /// Gets the enum value.
1502            ///
1503            /// Returns `None` if the enum contains an unknown value deserialized from
1504            /// the string representation of enums.
1505            pub fn value(&self) -> std::option::Option<i32> {
1506                match self {
1507                    Self::Unspecified => std::option::Option::Some(0),
1508                    Self::Python3 => std::option::Option::Some(1),
1509                    Self::UnknownValue(u) => u.0.value(),
1510                }
1511            }
1512
1513            /// Gets the enum value as a string.
1514            ///
1515            /// Returns `None` if the enum contains an unknown value deserialized from
1516            /// the integer representation of enums.
1517            pub fn name(&self) -> std::option::Option<&str> {
1518                match self {
1519                    Self::Unspecified => std::option::Option::Some("KERNEL_TYPE_UNSPECIFIED"),
1520                    Self::Python3 => std::option::Option::Some("PYTHON3"),
1521                    Self::UnknownValue(u) => u.0.name(),
1522                }
1523            }
1524        }
1525
1526        impl std::default::Default for KernelType {
1527            fn default() -> Self {
1528                use std::convert::From;
1529                Self::from(0)
1530            }
1531        }
1532
1533        impl std::fmt::Display for KernelType {
1534            fn fmt(
1535                &self,
1536                f: &mut std::fmt::Formatter<'_>,
1537            ) -> std::result::Result<(), std::fmt::Error> {
1538                wkt::internal::display_enum(f, self.name(), self.value())
1539            }
1540        }
1541
1542        impl std::convert::From<i32> for KernelType {
1543            fn from(value: i32) -> Self {
1544                match value {
1545                    0 => Self::Unspecified,
1546                    1 => Self::Python3,
1547                    _ => Self::UnknownValue(kernel_type::UnknownValue(
1548                        wkt::internal::UnknownEnumValue::Integer(value),
1549                    )),
1550                }
1551            }
1552        }
1553
1554        impl std::convert::From<&str> for KernelType {
1555            fn from(value: &str) -> Self {
1556                use std::string::ToString;
1557                match value {
1558                    "KERNEL_TYPE_UNSPECIFIED" => Self::Unspecified,
1559                    "PYTHON3" => Self::Python3,
1560                    _ => Self::UnknownValue(kernel_type::UnknownValue(
1561                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1562                    )),
1563                }
1564            }
1565        }
1566
1567        impl serde::ser::Serialize for KernelType {
1568            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1569            where
1570                S: serde::Serializer,
1571            {
1572                match self {
1573                    Self::Unspecified => serializer.serialize_i32(0),
1574                    Self::Python3 => serializer.serialize_i32(1),
1575                    Self::UnknownValue(u) => u.0.serialize(serializer),
1576                }
1577            }
1578        }
1579
1580        impl<'de> serde::de::Deserialize<'de> for KernelType {
1581            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1582            where
1583                D: serde::Deserializer<'de>,
1584            {
1585                deserializer.deserialize_any(wkt::internal::EnumVisitor::<KernelType>::new(
1586                    ".google.cloud.dataplex.v1.Content.Notebook.KernelType",
1587                ))
1588            }
1589        }
1590    }
1591
1592    /// Only returned in `GetContent` requests and not in `ListContent` request.
1593    #[derive(Clone, Debug, PartialEq)]
1594    #[non_exhaustive]
1595    pub enum Data {
1596        /// Required. Content data in string format.
1597        DataText(std::string::String),
1598    }
1599
1600    /// Types of content
1601    #[derive(Clone, Debug, PartialEq)]
1602    #[non_exhaustive]
1603    pub enum Content {
1604        /// Sql Script related configurations.
1605        SqlScript(std::boxed::Box<crate::model::content::SqlScript>),
1606        /// Notebook related configurations.
1607        Notebook(std::boxed::Box<crate::model::content::Notebook>),
1608    }
1609}
1610
1611/// Represents an active analyze session running for a user.
1612#[derive(Clone, Default, PartialEq)]
1613#[non_exhaustive]
1614pub struct Session {
1615    /// Output only. The relative resource name of the content, of the form:
1616    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id}
1617    pub name: std::string::String,
1618
1619    /// Output only. Email of user running the session.
1620    pub user_id: std::string::String,
1621
1622    /// Output only. Session start time.
1623    pub create_time: std::option::Option<wkt::Timestamp>,
1624
1625    /// Output only. State of Session
1626    pub state: crate::model::State,
1627
1628    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1629}
1630
1631impl Session {
1632    pub fn new() -> Self {
1633        std::default::Default::default()
1634    }
1635
1636    /// Sets the value of [name][crate::model::Session::name].
1637    ///
1638    /// # Example
1639    /// ```ignore,no_run
1640    /// # use google_cloud_dataplex_v1::model::Session;
1641    /// let x = Session::new().set_name("example");
1642    /// ```
1643    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1644        self.name = v.into();
1645        self
1646    }
1647
1648    /// Sets the value of [user_id][crate::model::Session::user_id].
1649    ///
1650    /// # Example
1651    /// ```ignore,no_run
1652    /// # use google_cloud_dataplex_v1::model::Session;
1653    /// let x = Session::new().set_user_id("example");
1654    /// ```
1655    pub fn set_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1656        self.user_id = v.into();
1657        self
1658    }
1659
1660    /// Sets the value of [create_time][crate::model::Session::create_time].
1661    ///
1662    /// # Example
1663    /// ```ignore,no_run
1664    /// # use google_cloud_dataplex_v1::model::Session;
1665    /// use wkt::Timestamp;
1666    /// let x = Session::new().set_create_time(Timestamp::default()/* use setters */);
1667    /// ```
1668    pub fn set_create_time<T>(mut self, v: T) -> Self
1669    where
1670        T: std::convert::Into<wkt::Timestamp>,
1671    {
1672        self.create_time = std::option::Option::Some(v.into());
1673        self
1674    }
1675
1676    /// Sets or clears the value of [create_time][crate::model::Session::create_time].
1677    ///
1678    /// # Example
1679    /// ```ignore,no_run
1680    /// # use google_cloud_dataplex_v1::model::Session;
1681    /// use wkt::Timestamp;
1682    /// let x = Session::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
1683    /// let x = Session::new().set_or_clear_create_time(None::<Timestamp>);
1684    /// ```
1685    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1686    where
1687        T: std::convert::Into<wkt::Timestamp>,
1688    {
1689        self.create_time = v.map(|x| x.into());
1690        self
1691    }
1692
1693    /// Sets the value of [state][crate::model::Session::state].
1694    ///
1695    /// # Example
1696    /// ```ignore,no_run
1697    /// # use google_cloud_dataplex_v1::model::Session;
1698    /// use google_cloud_dataplex_v1::model::State;
1699    /// let x0 = Session::new().set_state(State::Active);
1700    /// let x1 = Session::new().set_state(State::Creating);
1701    /// let x2 = Session::new().set_state(State::Deleting);
1702    /// ```
1703    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
1704        self.state = v.into();
1705        self
1706    }
1707}
1708
1709impl wkt::message::Message for Session {
1710    fn typename() -> &'static str {
1711        "type.googleapis.com/google.cloud.dataplex.v1.Session"
1712    }
1713}
1714
1715/// A Glossary represents a collection of GlossaryCategories and GlossaryTerms
1716/// defined by the user. Glossary is a top level resource and is the Google Cloud
1717/// parent resource of all the GlossaryCategories and GlossaryTerms within it.
1718#[derive(Clone, Default, PartialEq)]
1719#[non_exhaustive]
1720pub struct Glossary {
1721    /// Output only. Identifier. The resource name of the Glossary.
1722    /// Format:
1723    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
1724    pub name: std::string::String,
1725
1726    /// Output only. System generated unique id for the Glossary. This ID will be
1727    /// different if the Glossary is deleted and re-created with the
1728    /// same name.
1729    pub uid: std::string::String,
1730
1731    /// Optional. User friendly display name of the Glossary. This is user-mutable.
1732    /// This will be same as the GlossaryId, if not specified.
1733    pub display_name: std::string::String,
1734
1735    /// Optional. The user-mutable description of the Glossary.
1736    pub description: std::string::String,
1737
1738    /// Output only. The time at which the Glossary was created.
1739    pub create_time: std::option::Option<wkt::Timestamp>,
1740
1741    /// Output only. The time at which the Glossary was last updated.
1742    pub update_time: std::option::Option<wkt::Timestamp>,
1743
1744    /// Optional. User-defined labels for the Glossary.
1745    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1746
1747    /// Output only. The number of GlossaryTerms in the Glossary.
1748    pub term_count: i32,
1749
1750    /// Output only. The number of GlossaryCategories in the Glossary.
1751    pub category_count: i32,
1752
1753    /// Optional. Needed for resource freshness validation.
1754    /// This checksum is computed by the server based on the value of other
1755    /// fields, and may be sent on update and delete requests to ensure the
1756    /// client has an up-to-date value before proceeding.
1757    pub etag: std::string::String,
1758
1759    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1760}
1761
1762impl Glossary {
1763    pub fn new() -> Self {
1764        std::default::Default::default()
1765    }
1766
1767    /// Sets the value of [name][crate::model::Glossary::name].
1768    ///
1769    /// # Example
1770    /// ```ignore,no_run
1771    /// # use google_cloud_dataplex_v1::model::Glossary;
1772    /// let x = Glossary::new().set_name("example");
1773    /// ```
1774    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1775        self.name = v.into();
1776        self
1777    }
1778
1779    /// Sets the value of [uid][crate::model::Glossary::uid].
1780    ///
1781    /// # Example
1782    /// ```ignore,no_run
1783    /// # use google_cloud_dataplex_v1::model::Glossary;
1784    /// let x = Glossary::new().set_uid("example");
1785    /// ```
1786    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1787        self.uid = v.into();
1788        self
1789    }
1790
1791    /// Sets the value of [display_name][crate::model::Glossary::display_name].
1792    ///
1793    /// # Example
1794    /// ```ignore,no_run
1795    /// # use google_cloud_dataplex_v1::model::Glossary;
1796    /// let x = Glossary::new().set_display_name("example");
1797    /// ```
1798    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1799        self.display_name = v.into();
1800        self
1801    }
1802
1803    /// Sets the value of [description][crate::model::Glossary::description].
1804    ///
1805    /// # Example
1806    /// ```ignore,no_run
1807    /// # use google_cloud_dataplex_v1::model::Glossary;
1808    /// let x = Glossary::new().set_description("example");
1809    /// ```
1810    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1811        self.description = v.into();
1812        self
1813    }
1814
1815    /// Sets the value of [create_time][crate::model::Glossary::create_time].
1816    ///
1817    /// # Example
1818    /// ```ignore,no_run
1819    /// # use google_cloud_dataplex_v1::model::Glossary;
1820    /// use wkt::Timestamp;
1821    /// let x = Glossary::new().set_create_time(Timestamp::default()/* use setters */);
1822    /// ```
1823    pub fn set_create_time<T>(mut self, v: T) -> Self
1824    where
1825        T: std::convert::Into<wkt::Timestamp>,
1826    {
1827        self.create_time = std::option::Option::Some(v.into());
1828        self
1829    }
1830
1831    /// Sets or clears the value of [create_time][crate::model::Glossary::create_time].
1832    ///
1833    /// # Example
1834    /// ```ignore,no_run
1835    /// # use google_cloud_dataplex_v1::model::Glossary;
1836    /// use wkt::Timestamp;
1837    /// let x = Glossary::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
1838    /// let x = Glossary::new().set_or_clear_create_time(None::<Timestamp>);
1839    /// ```
1840    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1841    where
1842        T: std::convert::Into<wkt::Timestamp>,
1843    {
1844        self.create_time = v.map(|x| x.into());
1845        self
1846    }
1847
1848    /// Sets the value of [update_time][crate::model::Glossary::update_time].
1849    ///
1850    /// # Example
1851    /// ```ignore,no_run
1852    /// # use google_cloud_dataplex_v1::model::Glossary;
1853    /// use wkt::Timestamp;
1854    /// let x = Glossary::new().set_update_time(Timestamp::default()/* use setters */);
1855    /// ```
1856    pub fn set_update_time<T>(mut self, v: T) -> Self
1857    where
1858        T: std::convert::Into<wkt::Timestamp>,
1859    {
1860        self.update_time = std::option::Option::Some(v.into());
1861        self
1862    }
1863
1864    /// Sets or clears the value of [update_time][crate::model::Glossary::update_time].
1865    ///
1866    /// # Example
1867    /// ```ignore,no_run
1868    /// # use google_cloud_dataplex_v1::model::Glossary;
1869    /// use wkt::Timestamp;
1870    /// let x = Glossary::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
1871    /// let x = Glossary::new().set_or_clear_update_time(None::<Timestamp>);
1872    /// ```
1873    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1874    where
1875        T: std::convert::Into<wkt::Timestamp>,
1876    {
1877        self.update_time = v.map(|x| x.into());
1878        self
1879    }
1880
1881    /// Sets the value of [labels][crate::model::Glossary::labels].
1882    ///
1883    /// # Example
1884    /// ```ignore,no_run
1885    /// # use google_cloud_dataplex_v1::model::Glossary;
1886    /// let x = Glossary::new().set_labels([
1887    ///     ("key0", "abc"),
1888    ///     ("key1", "xyz"),
1889    /// ]);
1890    /// ```
1891    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1892    where
1893        T: std::iter::IntoIterator<Item = (K, V)>,
1894        K: std::convert::Into<std::string::String>,
1895        V: std::convert::Into<std::string::String>,
1896    {
1897        use std::iter::Iterator;
1898        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1899        self
1900    }
1901
1902    /// Sets the value of [term_count][crate::model::Glossary::term_count].
1903    ///
1904    /// # Example
1905    /// ```ignore,no_run
1906    /// # use google_cloud_dataplex_v1::model::Glossary;
1907    /// let x = Glossary::new().set_term_count(42);
1908    /// ```
1909    pub fn set_term_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1910        self.term_count = v.into();
1911        self
1912    }
1913
1914    /// Sets the value of [category_count][crate::model::Glossary::category_count].
1915    ///
1916    /// # Example
1917    /// ```ignore,no_run
1918    /// # use google_cloud_dataplex_v1::model::Glossary;
1919    /// let x = Glossary::new().set_category_count(42);
1920    /// ```
1921    pub fn set_category_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1922        self.category_count = v.into();
1923        self
1924    }
1925
1926    /// Sets the value of [etag][crate::model::Glossary::etag].
1927    ///
1928    /// # Example
1929    /// ```ignore,no_run
1930    /// # use google_cloud_dataplex_v1::model::Glossary;
1931    /// let x = Glossary::new().set_etag("example");
1932    /// ```
1933    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1934        self.etag = v.into();
1935        self
1936    }
1937}
1938
1939impl wkt::message::Message for Glossary {
1940    fn typename() -> &'static str {
1941        "type.googleapis.com/google.cloud.dataplex.v1.Glossary"
1942    }
1943}
1944
1945/// A GlossaryCategory represents a collection of GlossaryCategories and
1946/// GlossaryTerms within a Glossary that are related to each other.
1947#[derive(Clone, Default, PartialEq)]
1948#[non_exhaustive]
1949pub struct GlossaryCategory {
1950    /// Output only. Identifier. The resource name of the GlossaryCategory.
1951    /// Format:
1952    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
1953    pub name: std::string::String,
1954
1955    /// Output only. System generated unique id for the GlossaryCategory. This ID
1956    /// will be different if the GlossaryCategory is deleted and re-created with
1957    /// the same name.
1958    pub uid: std::string::String,
1959
1960    /// Optional. User friendly display name of the GlossaryCategory. This is
1961    /// user-mutable. This will be same as the GlossaryCategoryId, if not
1962    /// specified.
1963    pub display_name: std::string::String,
1964
1965    /// Optional. The user-mutable description of the GlossaryCategory.
1966    pub description: std::string::String,
1967
1968    /// Output only. The time at which the GlossaryCategory was created.
1969    pub create_time: std::option::Option<wkt::Timestamp>,
1970
1971    /// Output only. The time at which the GlossaryCategory was last updated.
1972    pub update_time: std::option::Option<wkt::Timestamp>,
1973
1974    /// Optional. User-defined labels for the GlossaryCategory.
1975    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1976
1977    /// Required. The immediate parent of the GlossaryCategory in the
1978    /// resource-hierarchy. It can either be a Glossary or a GlossaryCategory.
1979    /// Format:
1980    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
1981    /// OR
1982    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
1983    pub parent: std::string::String,
1984
1985    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1986}
1987
1988impl GlossaryCategory {
1989    pub fn new() -> Self {
1990        std::default::Default::default()
1991    }
1992
1993    /// Sets the value of [name][crate::model::GlossaryCategory::name].
1994    ///
1995    /// # Example
1996    /// ```ignore,no_run
1997    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
1998    /// let x = GlossaryCategory::new().set_name("example");
1999    /// ```
2000    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2001        self.name = v.into();
2002        self
2003    }
2004
2005    /// Sets the value of [uid][crate::model::GlossaryCategory::uid].
2006    ///
2007    /// # Example
2008    /// ```ignore,no_run
2009    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2010    /// let x = GlossaryCategory::new().set_uid("example");
2011    /// ```
2012    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2013        self.uid = v.into();
2014        self
2015    }
2016
2017    /// Sets the value of [display_name][crate::model::GlossaryCategory::display_name].
2018    ///
2019    /// # Example
2020    /// ```ignore,no_run
2021    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2022    /// let x = GlossaryCategory::new().set_display_name("example");
2023    /// ```
2024    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2025        self.display_name = v.into();
2026        self
2027    }
2028
2029    /// Sets the value of [description][crate::model::GlossaryCategory::description].
2030    ///
2031    /// # Example
2032    /// ```ignore,no_run
2033    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2034    /// let x = GlossaryCategory::new().set_description("example");
2035    /// ```
2036    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2037        self.description = v.into();
2038        self
2039    }
2040
2041    /// Sets the value of [create_time][crate::model::GlossaryCategory::create_time].
2042    ///
2043    /// # Example
2044    /// ```ignore,no_run
2045    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2046    /// use wkt::Timestamp;
2047    /// let x = GlossaryCategory::new().set_create_time(Timestamp::default()/* use setters */);
2048    /// ```
2049    pub fn set_create_time<T>(mut self, v: T) -> Self
2050    where
2051        T: std::convert::Into<wkt::Timestamp>,
2052    {
2053        self.create_time = std::option::Option::Some(v.into());
2054        self
2055    }
2056
2057    /// Sets or clears the value of [create_time][crate::model::GlossaryCategory::create_time].
2058    ///
2059    /// # Example
2060    /// ```ignore,no_run
2061    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2062    /// use wkt::Timestamp;
2063    /// let x = GlossaryCategory::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2064    /// let x = GlossaryCategory::new().set_or_clear_create_time(None::<Timestamp>);
2065    /// ```
2066    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2067    where
2068        T: std::convert::Into<wkt::Timestamp>,
2069    {
2070        self.create_time = v.map(|x| x.into());
2071        self
2072    }
2073
2074    /// Sets the value of [update_time][crate::model::GlossaryCategory::update_time].
2075    ///
2076    /// # Example
2077    /// ```ignore,no_run
2078    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2079    /// use wkt::Timestamp;
2080    /// let x = GlossaryCategory::new().set_update_time(Timestamp::default()/* use setters */);
2081    /// ```
2082    pub fn set_update_time<T>(mut self, v: T) -> Self
2083    where
2084        T: std::convert::Into<wkt::Timestamp>,
2085    {
2086        self.update_time = std::option::Option::Some(v.into());
2087        self
2088    }
2089
2090    /// Sets or clears the value of [update_time][crate::model::GlossaryCategory::update_time].
2091    ///
2092    /// # Example
2093    /// ```ignore,no_run
2094    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2095    /// use wkt::Timestamp;
2096    /// let x = GlossaryCategory::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
2097    /// let x = GlossaryCategory::new().set_or_clear_update_time(None::<Timestamp>);
2098    /// ```
2099    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2100    where
2101        T: std::convert::Into<wkt::Timestamp>,
2102    {
2103        self.update_time = v.map(|x| x.into());
2104        self
2105    }
2106
2107    /// Sets the value of [labels][crate::model::GlossaryCategory::labels].
2108    ///
2109    /// # Example
2110    /// ```ignore,no_run
2111    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2112    /// let x = GlossaryCategory::new().set_labels([
2113    ///     ("key0", "abc"),
2114    ///     ("key1", "xyz"),
2115    /// ]);
2116    /// ```
2117    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2118    where
2119        T: std::iter::IntoIterator<Item = (K, V)>,
2120        K: std::convert::Into<std::string::String>,
2121        V: std::convert::Into<std::string::String>,
2122    {
2123        use std::iter::Iterator;
2124        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2125        self
2126    }
2127
2128    /// Sets the value of [parent][crate::model::GlossaryCategory::parent].
2129    ///
2130    /// # Example
2131    /// ```ignore,no_run
2132    /// # use google_cloud_dataplex_v1::model::GlossaryCategory;
2133    /// let x = GlossaryCategory::new().set_parent("example");
2134    /// ```
2135    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2136        self.parent = v.into();
2137        self
2138    }
2139}
2140
2141impl wkt::message::Message for GlossaryCategory {
2142    fn typename() -> &'static str {
2143        "type.googleapis.com/google.cloud.dataplex.v1.GlossaryCategory"
2144    }
2145}
2146
2147/// GlossaryTerms are the core of Glossary.
2148/// A GlossaryTerm holds a rich text description that can be attached to Entries
2149/// or specific columns to enrich them.
2150#[derive(Clone, Default, PartialEq)]
2151#[non_exhaustive]
2152pub struct GlossaryTerm {
2153    /// Output only. Identifier. The resource name of the GlossaryTerm.
2154    /// Format:
2155    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
2156    pub name: std::string::String,
2157
2158    /// Output only. System generated unique id for the GlossaryTerm. This ID will
2159    /// be different if the GlossaryTerm is deleted and re-created with the same
2160    /// name.
2161    pub uid: std::string::String,
2162
2163    /// Optional. User friendly display name of the GlossaryTerm. This is
2164    /// user-mutable. This will be same as the GlossaryTermId, if not specified.
2165    pub display_name: std::string::String,
2166
2167    /// Optional. The user-mutable description of the GlossaryTerm.
2168    pub description: std::string::String,
2169
2170    /// Output only. The time at which the GlossaryTerm was created.
2171    pub create_time: std::option::Option<wkt::Timestamp>,
2172
2173    /// Output only. The time at which the GlossaryTerm was last updated.
2174    pub update_time: std::option::Option<wkt::Timestamp>,
2175
2176    /// Optional. User-defined labels for the GlossaryTerm.
2177    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2178
2179    /// Required. The immediate parent of the GlossaryTerm in the
2180    /// resource-hierarchy. It can either be a Glossary or a GlossaryCategory.
2181    /// Format:
2182    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
2183    /// OR
2184    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
2185    pub parent: std::string::String,
2186
2187    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2188}
2189
2190impl GlossaryTerm {
2191    pub fn new() -> Self {
2192        std::default::Default::default()
2193    }
2194
2195    /// Sets the value of [name][crate::model::GlossaryTerm::name].
2196    ///
2197    /// # Example
2198    /// ```ignore,no_run
2199    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2200    /// let x = GlossaryTerm::new().set_name("example");
2201    /// ```
2202    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2203        self.name = v.into();
2204        self
2205    }
2206
2207    /// Sets the value of [uid][crate::model::GlossaryTerm::uid].
2208    ///
2209    /// # Example
2210    /// ```ignore,no_run
2211    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2212    /// let x = GlossaryTerm::new().set_uid("example");
2213    /// ```
2214    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2215        self.uid = v.into();
2216        self
2217    }
2218
2219    /// Sets the value of [display_name][crate::model::GlossaryTerm::display_name].
2220    ///
2221    /// # Example
2222    /// ```ignore,no_run
2223    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2224    /// let x = GlossaryTerm::new().set_display_name("example");
2225    /// ```
2226    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2227        self.display_name = v.into();
2228        self
2229    }
2230
2231    /// Sets the value of [description][crate::model::GlossaryTerm::description].
2232    ///
2233    /// # Example
2234    /// ```ignore,no_run
2235    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2236    /// let x = GlossaryTerm::new().set_description("example");
2237    /// ```
2238    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2239        self.description = v.into();
2240        self
2241    }
2242
2243    /// Sets the value of [create_time][crate::model::GlossaryTerm::create_time].
2244    ///
2245    /// # Example
2246    /// ```ignore,no_run
2247    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2248    /// use wkt::Timestamp;
2249    /// let x = GlossaryTerm::new().set_create_time(Timestamp::default()/* use setters */);
2250    /// ```
2251    pub fn set_create_time<T>(mut self, v: T) -> Self
2252    where
2253        T: std::convert::Into<wkt::Timestamp>,
2254    {
2255        self.create_time = std::option::Option::Some(v.into());
2256        self
2257    }
2258
2259    /// Sets or clears the value of [create_time][crate::model::GlossaryTerm::create_time].
2260    ///
2261    /// # Example
2262    /// ```ignore,no_run
2263    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2264    /// use wkt::Timestamp;
2265    /// let x = GlossaryTerm::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2266    /// let x = GlossaryTerm::new().set_or_clear_create_time(None::<Timestamp>);
2267    /// ```
2268    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2269    where
2270        T: std::convert::Into<wkt::Timestamp>,
2271    {
2272        self.create_time = v.map(|x| x.into());
2273        self
2274    }
2275
2276    /// Sets the value of [update_time][crate::model::GlossaryTerm::update_time].
2277    ///
2278    /// # Example
2279    /// ```ignore,no_run
2280    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2281    /// use wkt::Timestamp;
2282    /// let x = GlossaryTerm::new().set_update_time(Timestamp::default()/* use setters */);
2283    /// ```
2284    pub fn set_update_time<T>(mut self, v: T) -> Self
2285    where
2286        T: std::convert::Into<wkt::Timestamp>,
2287    {
2288        self.update_time = std::option::Option::Some(v.into());
2289        self
2290    }
2291
2292    /// Sets or clears the value of [update_time][crate::model::GlossaryTerm::update_time].
2293    ///
2294    /// # Example
2295    /// ```ignore,no_run
2296    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2297    /// use wkt::Timestamp;
2298    /// let x = GlossaryTerm::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
2299    /// let x = GlossaryTerm::new().set_or_clear_update_time(None::<Timestamp>);
2300    /// ```
2301    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2302    where
2303        T: std::convert::Into<wkt::Timestamp>,
2304    {
2305        self.update_time = v.map(|x| x.into());
2306        self
2307    }
2308
2309    /// Sets the value of [labels][crate::model::GlossaryTerm::labels].
2310    ///
2311    /// # Example
2312    /// ```ignore,no_run
2313    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2314    /// let x = GlossaryTerm::new().set_labels([
2315    ///     ("key0", "abc"),
2316    ///     ("key1", "xyz"),
2317    /// ]);
2318    /// ```
2319    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2320    where
2321        T: std::iter::IntoIterator<Item = (K, V)>,
2322        K: std::convert::Into<std::string::String>,
2323        V: std::convert::Into<std::string::String>,
2324    {
2325        use std::iter::Iterator;
2326        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2327        self
2328    }
2329
2330    /// Sets the value of [parent][crate::model::GlossaryTerm::parent].
2331    ///
2332    /// # Example
2333    /// ```ignore,no_run
2334    /// # use google_cloud_dataplex_v1::model::GlossaryTerm;
2335    /// let x = GlossaryTerm::new().set_parent("example");
2336    /// ```
2337    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2338        self.parent = v.into();
2339        self
2340    }
2341}
2342
2343impl wkt::message::Message for GlossaryTerm {
2344    fn typename() -> &'static str {
2345        "type.googleapis.com/google.cloud.dataplex.v1.GlossaryTerm"
2346    }
2347}
2348
2349/// Create Glossary Request
2350#[derive(Clone, Default, PartialEq)]
2351#[non_exhaustive]
2352pub struct CreateGlossaryRequest {
2353    /// Required. The parent resource where this Glossary will be created.
2354    /// Format: projects/{project_id_or_number}/locations/{location_id}
2355    /// where `location_id` refers to a Google Cloud region.
2356    pub parent: std::string::String,
2357
2358    /// Required. Glossary ID: Glossary identifier.
2359    pub glossary_id: std::string::String,
2360
2361    /// Required. The Glossary to create.
2362    pub glossary: std::option::Option<crate::model::Glossary>,
2363
2364    /// Optional. Validates the request without actually creating the Glossary.
2365    /// Default: false.
2366    pub validate_only: bool,
2367
2368    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2369}
2370
2371impl CreateGlossaryRequest {
2372    pub fn new() -> Self {
2373        std::default::Default::default()
2374    }
2375
2376    /// Sets the value of [parent][crate::model::CreateGlossaryRequest::parent].
2377    ///
2378    /// # Example
2379    /// ```ignore,no_run
2380    /// # use google_cloud_dataplex_v1::model::CreateGlossaryRequest;
2381    /// let x = CreateGlossaryRequest::new().set_parent("example");
2382    /// ```
2383    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2384        self.parent = v.into();
2385        self
2386    }
2387
2388    /// Sets the value of [glossary_id][crate::model::CreateGlossaryRequest::glossary_id].
2389    ///
2390    /// # Example
2391    /// ```ignore,no_run
2392    /// # use google_cloud_dataplex_v1::model::CreateGlossaryRequest;
2393    /// let x = CreateGlossaryRequest::new().set_glossary_id("example");
2394    /// ```
2395    pub fn set_glossary_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2396        self.glossary_id = v.into();
2397        self
2398    }
2399
2400    /// Sets the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
2401    ///
2402    /// # Example
2403    /// ```ignore,no_run
2404    /// # use google_cloud_dataplex_v1::model::CreateGlossaryRequest;
2405    /// use google_cloud_dataplex_v1::model::Glossary;
2406    /// let x = CreateGlossaryRequest::new().set_glossary(Glossary::default()/* use setters */);
2407    /// ```
2408    pub fn set_glossary<T>(mut self, v: T) -> Self
2409    where
2410        T: std::convert::Into<crate::model::Glossary>,
2411    {
2412        self.glossary = std::option::Option::Some(v.into());
2413        self
2414    }
2415
2416    /// Sets or clears the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
2417    ///
2418    /// # Example
2419    /// ```ignore,no_run
2420    /// # use google_cloud_dataplex_v1::model::CreateGlossaryRequest;
2421    /// use google_cloud_dataplex_v1::model::Glossary;
2422    /// let x = CreateGlossaryRequest::new().set_or_clear_glossary(Some(Glossary::default()/* use setters */));
2423    /// let x = CreateGlossaryRequest::new().set_or_clear_glossary(None::<Glossary>);
2424    /// ```
2425    pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
2426    where
2427        T: std::convert::Into<crate::model::Glossary>,
2428    {
2429        self.glossary = v.map(|x| x.into());
2430        self
2431    }
2432
2433    /// Sets the value of [validate_only][crate::model::CreateGlossaryRequest::validate_only].
2434    ///
2435    /// # Example
2436    /// ```ignore,no_run
2437    /// # use google_cloud_dataplex_v1::model::CreateGlossaryRequest;
2438    /// let x = CreateGlossaryRequest::new().set_validate_only(true);
2439    /// ```
2440    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2441        self.validate_only = v.into();
2442        self
2443    }
2444}
2445
2446impl wkt::message::Message for CreateGlossaryRequest {
2447    fn typename() -> &'static str {
2448        "type.googleapis.com/google.cloud.dataplex.v1.CreateGlossaryRequest"
2449    }
2450}
2451
2452/// Update Glossary Request
2453#[derive(Clone, Default, PartialEq)]
2454#[non_exhaustive]
2455pub struct UpdateGlossaryRequest {
2456    /// Required. The Glossary to update.
2457    /// The Glossary's `name` field is used to identify the Glossary to update.
2458    /// Format:
2459    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
2460    pub glossary: std::option::Option<crate::model::Glossary>,
2461
2462    /// Required. The list of fields to update.
2463    pub update_mask: std::option::Option<wkt::FieldMask>,
2464
2465    /// Optional. Validates the request without actually updating the Glossary.
2466    /// Default: false.
2467    pub validate_only: bool,
2468
2469    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2470}
2471
2472impl UpdateGlossaryRequest {
2473    pub fn new() -> Self {
2474        std::default::Default::default()
2475    }
2476
2477    /// Sets the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
2478    ///
2479    /// # Example
2480    /// ```ignore,no_run
2481    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryRequest;
2482    /// use google_cloud_dataplex_v1::model::Glossary;
2483    /// let x = UpdateGlossaryRequest::new().set_glossary(Glossary::default()/* use setters */);
2484    /// ```
2485    pub fn set_glossary<T>(mut self, v: T) -> Self
2486    where
2487        T: std::convert::Into<crate::model::Glossary>,
2488    {
2489        self.glossary = std::option::Option::Some(v.into());
2490        self
2491    }
2492
2493    /// Sets or clears the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
2494    ///
2495    /// # Example
2496    /// ```ignore,no_run
2497    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryRequest;
2498    /// use google_cloud_dataplex_v1::model::Glossary;
2499    /// let x = UpdateGlossaryRequest::new().set_or_clear_glossary(Some(Glossary::default()/* use setters */));
2500    /// let x = UpdateGlossaryRequest::new().set_or_clear_glossary(None::<Glossary>);
2501    /// ```
2502    pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
2503    where
2504        T: std::convert::Into<crate::model::Glossary>,
2505    {
2506        self.glossary = v.map(|x| x.into());
2507        self
2508    }
2509
2510    /// Sets the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
2511    ///
2512    /// # Example
2513    /// ```ignore,no_run
2514    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryRequest;
2515    /// use wkt::FieldMask;
2516    /// let x = UpdateGlossaryRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2517    /// ```
2518    pub fn set_update_mask<T>(mut self, v: T) -> Self
2519    where
2520        T: std::convert::Into<wkt::FieldMask>,
2521    {
2522        self.update_mask = std::option::Option::Some(v.into());
2523        self
2524    }
2525
2526    /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
2527    ///
2528    /// # Example
2529    /// ```ignore,no_run
2530    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryRequest;
2531    /// use wkt::FieldMask;
2532    /// let x = UpdateGlossaryRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2533    /// let x = UpdateGlossaryRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2534    /// ```
2535    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2536    where
2537        T: std::convert::Into<wkt::FieldMask>,
2538    {
2539        self.update_mask = v.map(|x| x.into());
2540        self
2541    }
2542
2543    /// Sets the value of [validate_only][crate::model::UpdateGlossaryRequest::validate_only].
2544    ///
2545    /// # Example
2546    /// ```ignore,no_run
2547    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryRequest;
2548    /// let x = UpdateGlossaryRequest::new().set_validate_only(true);
2549    /// ```
2550    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2551        self.validate_only = v.into();
2552        self
2553    }
2554}
2555
2556impl wkt::message::Message for UpdateGlossaryRequest {
2557    fn typename() -> &'static str {
2558        "type.googleapis.com/google.cloud.dataplex.v1.UpdateGlossaryRequest"
2559    }
2560}
2561
2562/// Delete Glossary Request
2563#[derive(Clone, Default, PartialEq)]
2564#[non_exhaustive]
2565pub struct DeleteGlossaryRequest {
2566    /// Required. The name of the Glossary to delete.
2567    /// Format:
2568    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
2569    pub name: std::string::String,
2570
2571    /// Optional. The etag of the Glossary.
2572    /// If this is provided, it must match the server's etag.
2573    /// If the etag is provided and does not match the server-computed etag,
2574    /// the request must fail with a ABORTED error code.
2575    pub etag: std::string::String,
2576
2577    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2578}
2579
2580impl DeleteGlossaryRequest {
2581    pub fn new() -> Self {
2582        std::default::Default::default()
2583    }
2584
2585    /// Sets the value of [name][crate::model::DeleteGlossaryRequest::name].
2586    ///
2587    /// # Example
2588    /// ```ignore,no_run
2589    /// # use google_cloud_dataplex_v1::model::DeleteGlossaryRequest;
2590    /// let x = DeleteGlossaryRequest::new().set_name("example");
2591    /// ```
2592    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2593        self.name = v.into();
2594        self
2595    }
2596
2597    /// Sets the value of [etag][crate::model::DeleteGlossaryRequest::etag].
2598    ///
2599    /// # Example
2600    /// ```ignore,no_run
2601    /// # use google_cloud_dataplex_v1::model::DeleteGlossaryRequest;
2602    /// let x = DeleteGlossaryRequest::new().set_etag("example");
2603    /// ```
2604    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2605        self.etag = v.into();
2606        self
2607    }
2608}
2609
2610impl wkt::message::Message for DeleteGlossaryRequest {
2611    fn typename() -> &'static str {
2612        "type.googleapis.com/google.cloud.dataplex.v1.DeleteGlossaryRequest"
2613    }
2614}
2615
2616/// Get Glossary Request
2617#[derive(Clone, Default, PartialEq)]
2618#[non_exhaustive]
2619pub struct GetGlossaryRequest {
2620    /// Required. The name of the Glossary to retrieve.
2621    /// Format:
2622    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
2623    pub name: std::string::String,
2624
2625    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2626}
2627
2628impl GetGlossaryRequest {
2629    pub fn new() -> Self {
2630        std::default::Default::default()
2631    }
2632
2633    /// Sets the value of [name][crate::model::GetGlossaryRequest::name].
2634    ///
2635    /// # Example
2636    /// ```ignore,no_run
2637    /// # use google_cloud_dataplex_v1::model::GetGlossaryRequest;
2638    /// let x = GetGlossaryRequest::new().set_name("example");
2639    /// ```
2640    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2641        self.name = v.into();
2642        self
2643    }
2644}
2645
2646impl wkt::message::Message for GetGlossaryRequest {
2647    fn typename() -> &'static str {
2648        "type.googleapis.com/google.cloud.dataplex.v1.GetGlossaryRequest"
2649    }
2650}
2651
2652/// List Glossaries Request
2653#[derive(Clone, Default, PartialEq)]
2654#[non_exhaustive]
2655pub struct ListGlossariesRequest {
2656    /// Required. The parent, which has this collection of Glossaries.
2657    /// Format: projects/{project_id_or_number}/locations/{location_id}
2658    /// where `location_id` refers to a Google Cloud region.
2659    pub parent: std::string::String,
2660
2661    /// Optional. The maximum number of Glossaries to return. The service may
2662    /// return fewer than this value. If unspecified, at most 50 Glossaries will be
2663    /// returned. The maximum value is 1000; values above 1000 will be coerced to
2664    /// 1000.
2665    pub page_size: i32,
2666
2667    /// Optional. A page token, received from a previous `ListGlossaries` call.
2668    /// Provide this to retrieve the subsequent page.
2669    /// When paginating, all other parameters provided to `ListGlossaries` must
2670    /// match the call that provided the page token.
2671    pub page_token: std::string::String,
2672
2673    /// Optional. Filter expression that filters Glossaries listed in the response.
2674    /// Filters on proto fields of Glossary are supported.
2675    /// Examples of using a filter are:
2676    ///
2677    /// - `display_name="my-glossary"`
2678    /// - `categoryCount=1`
2679    /// - `termCount=0`
2680    pub filter: std::string::String,
2681
2682    /// Optional. Order by expression that orders Glossaries listed in the
2683    /// response. Order by fields are: `name` or `create_time` for the result. If
2684    /// not specified, the ordering is undefined.
2685    pub order_by: std::string::String,
2686
2687    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2688}
2689
2690impl ListGlossariesRequest {
2691    pub fn new() -> Self {
2692        std::default::Default::default()
2693    }
2694
2695    /// Sets the value of [parent][crate::model::ListGlossariesRequest::parent].
2696    ///
2697    /// # Example
2698    /// ```ignore,no_run
2699    /// # use google_cloud_dataplex_v1::model::ListGlossariesRequest;
2700    /// let x = ListGlossariesRequest::new().set_parent("example");
2701    /// ```
2702    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2703        self.parent = v.into();
2704        self
2705    }
2706
2707    /// Sets the value of [page_size][crate::model::ListGlossariesRequest::page_size].
2708    ///
2709    /// # Example
2710    /// ```ignore,no_run
2711    /// # use google_cloud_dataplex_v1::model::ListGlossariesRequest;
2712    /// let x = ListGlossariesRequest::new().set_page_size(42);
2713    /// ```
2714    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2715        self.page_size = v.into();
2716        self
2717    }
2718
2719    /// Sets the value of [page_token][crate::model::ListGlossariesRequest::page_token].
2720    ///
2721    /// # Example
2722    /// ```ignore,no_run
2723    /// # use google_cloud_dataplex_v1::model::ListGlossariesRequest;
2724    /// let x = ListGlossariesRequest::new().set_page_token("example");
2725    /// ```
2726    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2727        self.page_token = v.into();
2728        self
2729    }
2730
2731    /// Sets the value of [filter][crate::model::ListGlossariesRequest::filter].
2732    ///
2733    /// # Example
2734    /// ```ignore,no_run
2735    /// # use google_cloud_dataplex_v1::model::ListGlossariesRequest;
2736    /// let x = ListGlossariesRequest::new().set_filter("example");
2737    /// ```
2738    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2739        self.filter = v.into();
2740        self
2741    }
2742
2743    /// Sets the value of [order_by][crate::model::ListGlossariesRequest::order_by].
2744    ///
2745    /// # Example
2746    /// ```ignore,no_run
2747    /// # use google_cloud_dataplex_v1::model::ListGlossariesRequest;
2748    /// let x = ListGlossariesRequest::new().set_order_by("example");
2749    /// ```
2750    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2751        self.order_by = v.into();
2752        self
2753    }
2754}
2755
2756impl wkt::message::Message for ListGlossariesRequest {
2757    fn typename() -> &'static str {
2758        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossariesRequest"
2759    }
2760}
2761
2762/// List Glossaries Response
2763#[derive(Clone, Default, PartialEq)]
2764#[non_exhaustive]
2765pub struct ListGlossariesResponse {
2766    /// Lists the Glossaries in the specified parent.
2767    pub glossaries: std::vec::Vec<crate::model::Glossary>,
2768
2769    /// A token, which can be sent as `page_token` to retrieve the next page.
2770    /// If this field is omitted, there are no subsequent pages.
2771    pub next_page_token: std::string::String,
2772
2773    /// Locations that the service couldn't reach.
2774    pub unreachable_locations: std::vec::Vec<std::string::String>,
2775
2776    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2777}
2778
2779impl ListGlossariesResponse {
2780    pub fn new() -> Self {
2781        std::default::Default::default()
2782    }
2783
2784    /// Sets the value of [glossaries][crate::model::ListGlossariesResponse::glossaries].
2785    ///
2786    /// # Example
2787    /// ```ignore,no_run
2788    /// # use google_cloud_dataplex_v1::model::ListGlossariesResponse;
2789    /// use google_cloud_dataplex_v1::model::Glossary;
2790    /// let x = ListGlossariesResponse::new()
2791    ///     .set_glossaries([
2792    ///         Glossary::default()/* use setters */,
2793    ///         Glossary::default()/* use (different) setters */,
2794    ///     ]);
2795    /// ```
2796    pub fn set_glossaries<T, V>(mut self, v: T) -> Self
2797    where
2798        T: std::iter::IntoIterator<Item = V>,
2799        V: std::convert::Into<crate::model::Glossary>,
2800    {
2801        use std::iter::Iterator;
2802        self.glossaries = v.into_iter().map(|i| i.into()).collect();
2803        self
2804    }
2805
2806    /// Sets the value of [next_page_token][crate::model::ListGlossariesResponse::next_page_token].
2807    ///
2808    /// # Example
2809    /// ```ignore,no_run
2810    /// # use google_cloud_dataplex_v1::model::ListGlossariesResponse;
2811    /// let x = ListGlossariesResponse::new().set_next_page_token("example");
2812    /// ```
2813    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2814        self.next_page_token = v.into();
2815        self
2816    }
2817
2818    /// Sets the value of [unreachable_locations][crate::model::ListGlossariesResponse::unreachable_locations].
2819    ///
2820    /// # Example
2821    /// ```ignore,no_run
2822    /// # use google_cloud_dataplex_v1::model::ListGlossariesResponse;
2823    /// let x = ListGlossariesResponse::new().set_unreachable_locations(["a", "b", "c"]);
2824    /// ```
2825    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
2826    where
2827        T: std::iter::IntoIterator<Item = V>,
2828        V: std::convert::Into<std::string::String>,
2829    {
2830        use std::iter::Iterator;
2831        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
2832        self
2833    }
2834}
2835
2836impl wkt::message::Message for ListGlossariesResponse {
2837    fn typename() -> &'static str {
2838        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossariesResponse"
2839    }
2840}
2841
2842#[doc(hidden)]
2843impl google_cloud_gax::paginator::internal::PageableResponse for ListGlossariesResponse {
2844    type PageItem = crate::model::Glossary;
2845
2846    fn items(self) -> std::vec::Vec<Self::PageItem> {
2847        self.glossaries
2848    }
2849
2850    fn next_page_token(&self) -> std::string::String {
2851        use std::clone::Clone;
2852        self.next_page_token.clone()
2853    }
2854}
2855
2856/// Creates a new GlossaryCategory under the specified Glossary.
2857#[derive(Clone, Default, PartialEq)]
2858#[non_exhaustive]
2859pub struct CreateGlossaryCategoryRequest {
2860    /// Required. The parent resource where this GlossaryCategory will be created.
2861    /// Format:
2862    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
2863    /// where `locationId` refers to a Google Cloud region.
2864    pub parent: std::string::String,
2865
2866    /// Required. GlossaryCategory identifier.
2867    pub category_id: std::string::String,
2868
2869    /// Required. The GlossaryCategory to create.
2870    pub category: std::option::Option<crate::model::GlossaryCategory>,
2871
2872    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2873}
2874
2875impl CreateGlossaryCategoryRequest {
2876    pub fn new() -> Self {
2877        std::default::Default::default()
2878    }
2879
2880    /// Sets the value of [parent][crate::model::CreateGlossaryCategoryRequest::parent].
2881    ///
2882    /// # Example
2883    /// ```ignore,no_run
2884    /// # use google_cloud_dataplex_v1::model::CreateGlossaryCategoryRequest;
2885    /// let x = CreateGlossaryCategoryRequest::new().set_parent("example");
2886    /// ```
2887    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2888        self.parent = v.into();
2889        self
2890    }
2891
2892    /// Sets the value of [category_id][crate::model::CreateGlossaryCategoryRequest::category_id].
2893    ///
2894    /// # Example
2895    /// ```ignore,no_run
2896    /// # use google_cloud_dataplex_v1::model::CreateGlossaryCategoryRequest;
2897    /// let x = CreateGlossaryCategoryRequest::new().set_category_id("example");
2898    /// ```
2899    pub fn set_category_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2900        self.category_id = v.into();
2901        self
2902    }
2903
2904    /// Sets the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
2905    ///
2906    /// # Example
2907    /// ```ignore,no_run
2908    /// # use google_cloud_dataplex_v1::model::CreateGlossaryCategoryRequest;
2909    /// use google_cloud_dataplex_v1::model::GlossaryCategory;
2910    /// let x = CreateGlossaryCategoryRequest::new().set_category(GlossaryCategory::default()/* use setters */);
2911    /// ```
2912    pub fn set_category<T>(mut self, v: T) -> Self
2913    where
2914        T: std::convert::Into<crate::model::GlossaryCategory>,
2915    {
2916        self.category = std::option::Option::Some(v.into());
2917        self
2918    }
2919
2920    /// Sets or clears the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
2921    ///
2922    /// # Example
2923    /// ```ignore,no_run
2924    /// # use google_cloud_dataplex_v1::model::CreateGlossaryCategoryRequest;
2925    /// use google_cloud_dataplex_v1::model::GlossaryCategory;
2926    /// let x = CreateGlossaryCategoryRequest::new().set_or_clear_category(Some(GlossaryCategory::default()/* use setters */));
2927    /// let x = CreateGlossaryCategoryRequest::new().set_or_clear_category(None::<GlossaryCategory>);
2928    /// ```
2929    pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
2930    where
2931        T: std::convert::Into<crate::model::GlossaryCategory>,
2932    {
2933        self.category = v.map(|x| x.into());
2934        self
2935    }
2936}
2937
2938impl wkt::message::Message for CreateGlossaryCategoryRequest {
2939    fn typename() -> &'static str {
2940        "type.googleapis.com/google.cloud.dataplex.v1.CreateGlossaryCategoryRequest"
2941    }
2942}
2943
2944/// Update GlossaryCategory Request
2945#[derive(Clone, Default, PartialEq)]
2946#[non_exhaustive]
2947pub struct UpdateGlossaryCategoryRequest {
2948    /// Required. The GlossaryCategory to update.
2949    /// The GlossaryCategory's `name` field is used to identify the
2950    /// GlossaryCategory to update. Format:
2951    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
2952    pub category: std::option::Option<crate::model::GlossaryCategory>,
2953
2954    /// Required. The list of fields to update.
2955    pub update_mask: std::option::Option<wkt::FieldMask>,
2956
2957    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2958}
2959
2960impl UpdateGlossaryCategoryRequest {
2961    pub fn new() -> Self {
2962        std::default::Default::default()
2963    }
2964
2965    /// Sets the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
2966    ///
2967    /// # Example
2968    /// ```ignore,no_run
2969    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryCategoryRequest;
2970    /// use google_cloud_dataplex_v1::model::GlossaryCategory;
2971    /// let x = UpdateGlossaryCategoryRequest::new().set_category(GlossaryCategory::default()/* use setters */);
2972    /// ```
2973    pub fn set_category<T>(mut self, v: T) -> Self
2974    where
2975        T: std::convert::Into<crate::model::GlossaryCategory>,
2976    {
2977        self.category = std::option::Option::Some(v.into());
2978        self
2979    }
2980
2981    /// Sets or clears the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
2982    ///
2983    /// # Example
2984    /// ```ignore,no_run
2985    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryCategoryRequest;
2986    /// use google_cloud_dataplex_v1::model::GlossaryCategory;
2987    /// let x = UpdateGlossaryCategoryRequest::new().set_or_clear_category(Some(GlossaryCategory::default()/* use setters */));
2988    /// let x = UpdateGlossaryCategoryRequest::new().set_or_clear_category(None::<GlossaryCategory>);
2989    /// ```
2990    pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
2991    where
2992        T: std::convert::Into<crate::model::GlossaryCategory>,
2993    {
2994        self.category = v.map(|x| x.into());
2995        self
2996    }
2997
2998    /// Sets the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
2999    ///
3000    /// # Example
3001    /// ```ignore,no_run
3002    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryCategoryRequest;
3003    /// use wkt::FieldMask;
3004    /// let x = UpdateGlossaryCategoryRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3005    /// ```
3006    pub fn set_update_mask<T>(mut self, v: T) -> Self
3007    where
3008        T: std::convert::Into<wkt::FieldMask>,
3009    {
3010        self.update_mask = std::option::Option::Some(v.into());
3011        self
3012    }
3013
3014    /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
3015    ///
3016    /// # Example
3017    /// ```ignore,no_run
3018    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryCategoryRequest;
3019    /// use wkt::FieldMask;
3020    /// let x = UpdateGlossaryCategoryRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3021    /// let x = UpdateGlossaryCategoryRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3022    /// ```
3023    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3024    where
3025        T: std::convert::Into<wkt::FieldMask>,
3026    {
3027        self.update_mask = v.map(|x| x.into());
3028        self
3029    }
3030}
3031
3032impl wkt::message::Message for UpdateGlossaryCategoryRequest {
3033    fn typename() -> &'static str {
3034        "type.googleapis.com/google.cloud.dataplex.v1.UpdateGlossaryCategoryRequest"
3035    }
3036}
3037
3038/// Delete GlossaryCategory Request
3039#[derive(Clone, Default, PartialEq)]
3040#[non_exhaustive]
3041pub struct DeleteGlossaryCategoryRequest {
3042    /// Required. The name of the GlossaryCategory to delete.
3043    /// Format:
3044    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
3045    pub name: std::string::String,
3046
3047    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3048}
3049
3050impl DeleteGlossaryCategoryRequest {
3051    pub fn new() -> Self {
3052        std::default::Default::default()
3053    }
3054
3055    /// Sets the value of [name][crate::model::DeleteGlossaryCategoryRequest::name].
3056    ///
3057    /// # Example
3058    /// ```ignore,no_run
3059    /// # use google_cloud_dataplex_v1::model::DeleteGlossaryCategoryRequest;
3060    /// let x = DeleteGlossaryCategoryRequest::new().set_name("example");
3061    /// ```
3062    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3063        self.name = v.into();
3064        self
3065    }
3066}
3067
3068impl wkt::message::Message for DeleteGlossaryCategoryRequest {
3069    fn typename() -> &'static str {
3070        "type.googleapis.com/google.cloud.dataplex.v1.DeleteGlossaryCategoryRequest"
3071    }
3072}
3073
3074/// Get GlossaryCategory Request
3075#[derive(Clone, Default, PartialEq)]
3076#[non_exhaustive]
3077pub struct GetGlossaryCategoryRequest {
3078    /// Required. The name of the GlossaryCategory to retrieve.
3079    /// Format:
3080    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
3081    pub name: std::string::String,
3082
3083    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3084}
3085
3086impl GetGlossaryCategoryRequest {
3087    pub fn new() -> Self {
3088        std::default::Default::default()
3089    }
3090
3091    /// Sets the value of [name][crate::model::GetGlossaryCategoryRequest::name].
3092    ///
3093    /// # Example
3094    /// ```ignore,no_run
3095    /// # use google_cloud_dataplex_v1::model::GetGlossaryCategoryRequest;
3096    /// let x = GetGlossaryCategoryRequest::new().set_name("example");
3097    /// ```
3098    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3099        self.name = v.into();
3100        self
3101    }
3102}
3103
3104impl wkt::message::Message for GetGlossaryCategoryRequest {
3105    fn typename() -> &'static str {
3106        "type.googleapis.com/google.cloud.dataplex.v1.GetGlossaryCategoryRequest"
3107    }
3108}
3109
3110/// List GlossaryCategories Request
3111#[derive(Clone, Default, PartialEq)]
3112#[non_exhaustive]
3113pub struct ListGlossaryCategoriesRequest {
3114    /// Required. The parent, which has this collection of GlossaryCategories.
3115    /// Format:
3116    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
3117    /// Location is the Google Cloud region.
3118    pub parent: std::string::String,
3119
3120    /// Optional. The maximum number of GlossaryCategories to return. The service
3121    /// may return fewer than this value. If unspecified, at most 50
3122    /// GlossaryCategories will be returned. The maximum value is 1000; values
3123    /// above 1000 will be coerced to 1000.
3124    pub page_size: i32,
3125
3126    /// Optional. A page token, received from a previous `ListGlossaryCategories`
3127    /// call. Provide this to retrieve the subsequent page. When paginating, all
3128    /// other parameters provided to `ListGlossaryCategories` must match the call
3129    /// that provided the page token.
3130    pub page_token: std::string::String,
3131
3132    /// Optional. Filter expression that filters GlossaryCategories listed in the
3133    /// response. Filters are supported on the following fields:
3134    ///
3135    /// - immediate_parent
3136    ///
3137    /// Examples of using a filter are:
3138    ///
3139    /// - `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"`
3140    /// - `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"`
3141    ///
3142    /// This will only return the GlossaryCategories that are directly nested
3143    /// under the specified parent.
3144    pub filter: std::string::String,
3145
3146    /// Optional. Order by expression that orders GlossaryCategories listed in the
3147    /// response. Order by fields are: `name` or `create_time` for the result. If
3148    /// not specified, the ordering is undefined.
3149    pub order_by: std::string::String,
3150
3151    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3152}
3153
3154impl ListGlossaryCategoriesRequest {
3155    pub fn new() -> Self {
3156        std::default::Default::default()
3157    }
3158
3159    /// Sets the value of [parent][crate::model::ListGlossaryCategoriesRequest::parent].
3160    ///
3161    /// # Example
3162    /// ```ignore,no_run
3163    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesRequest;
3164    /// let x = ListGlossaryCategoriesRequest::new().set_parent("example");
3165    /// ```
3166    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3167        self.parent = v.into();
3168        self
3169    }
3170
3171    /// Sets the value of [page_size][crate::model::ListGlossaryCategoriesRequest::page_size].
3172    ///
3173    /// # Example
3174    /// ```ignore,no_run
3175    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesRequest;
3176    /// let x = ListGlossaryCategoriesRequest::new().set_page_size(42);
3177    /// ```
3178    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3179        self.page_size = v.into();
3180        self
3181    }
3182
3183    /// Sets the value of [page_token][crate::model::ListGlossaryCategoriesRequest::page_token].
3184    ///
3185    /// # Example
3186    /// ```ignore,no_run
3187    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesRequest;
3188    /// let x = ListGlossaryCategoriesRequest::new().set_page_token("example");
3189    /// ```
3190    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3191        self.page_token = v.into();
3192        self
3193    }
3194
3195    /// Sets the value of [filter][crate::model::ListGlossaryCategoriesRequest::filter].
3196    ///
3197    /// # Example
3198    /// ```ignore,no_run
3199    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesRequest;
3200    /// let x = ListGlossaryCategoriesRequest::new().set_filter("example");
3201    /// ```
3202    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3203        self.filter = v.into();
3204        self
3205    }
3206
3207    /// Sets the value of [order_by][crate::model::ListGlossaryCategoriesRequest::order_by].
3208    ///
3209    /// # Example
3210    /// ```ignore,no_run
3211    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesRequest;
3212    /// let x = ListGlossaryCategoriesRequest::new().set_order_by("example");
3213    /// ```
3214    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3215        self.order_by = v.into();
3216        self
3217    }
3218}
3219
3220impl wkt::message::Message for ListGlossaryCategoriesRequest {
3221    fn typename() -> &'static str {
3222        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryCategoriesRequest"
3223    }
3224}
3225
3226/// List GlossaryCategories Response
3227#[derive(Clone, Default, PartialEq)]
3228#[non_exhaustive]
3229pub struct ListGlossaryCategoriesResponse {
3230    /// Lists the GlossaryCategories in the specified parent.
3231    pub categories: std::vec::Vec<crate::model::GlossaryCategory>,
3232
3233    /// A token, which can be sent as `page_token` to retrieve the next page.
3234    /// If this field is omitted, there are no subsequent pages.
3235    pub next_page_token: std::string::String,
3236
3237    /// Locations that the service couldn't reach.
3238    pub unreachable_locations: std::vec::Vec<std::string::String>,
3239
3240    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3241}
3242
3243impl ListGlossaryCategoriesResponse {
3244    pub fn new() -> Self {
3245        std::default::Default::default()
3246    }
3247
3248    /// Sets the value of [categories][crate::model::ListGlossaryCategoriesResponse::categories].
3249    ///
3250    /// # Example
3251    /// ```ignore,no_run
3252    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesResponse;
3253    /// use google_cloud_dataplex_v1::model::GlossaryCategory;
3254    /// let x = ListGlossaryCategoriesResponse::new()
3255    ///     .set_categories([
3256    ///         GlossaryCategory::default()/* use setters */,
3257    ///         GlossaryCategory::default()/* use (different) setters */,
3258    ///     ]);
3259    /// ```
3260    pub fn set_categories<T, V>(mut self, v: T) -> Self
3261    where
3262        T: std::iter::IntoIterator<Item = V>,
3263        V: std::convert::Into<crate::model::GlossaryCategory>,
3264    {
3265        use std::iter::Iterator;
3266        self.categories = v.into_iter().map(|i| i.into()).collect();
3267        self
3268    }
3269
3270    /// Sets the value of [next_page_token][crate::model::ListGlossaryCategoriesResponse::next_page_token].
3271    ///
3272    /// # Example
3273    /// ```ignore,no_run
3274    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesResponse;
3275    /// let x = ListGlossaryCategoriesResponse::new().set_next_page_token("example");
3276    /// ```
3277    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3278        self.next_page_token = v.into();
3279        self
3280    }
3281
3282    /// Sets the value of [unreachable_locations][crate::model::ListGlossaryCategoriesResponse::unreachable_locations].
3283    ///
3284    /// # Example
3285    /// ```ignore,no_run
3286    /// # use google_cloud_dataplex_v1::model::ListGlossaryCategoriesResponse;
3287    /// let x = ListGlossaryCategoriesResponse::new().set_unreachable_locations(["a", "b", "c"]);
3288    /// ```
3289    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
3290    where
3291        T: std::iter::IntoIterator<Item = V>,
3292        V: std::convert::Into<std::string::String>,
3293    {
3294        use std::iter::Iterator;
3295        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
3296        self
3297    }
3298}
3299
3300impl wkt::message::Message for ListGlossaryCategoriesResponse {
3301    fn typename() -> &'static str {
3302        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryCategoriesResponse"
3303    }
3304}
3305
3306#[doc(hidden)]
3307impl google_cloud_gax::paginator::internal::PageableResponse for ListGlossaryCategoriesResponse {
3308    type PageItem = crate::model::GlossaryCategory;
3309
3310    fn items(self) -> std::vec::Vec<Self::PageItem> {
3311        self.categories
3312    }
3313
3314    fn next_page_token(&self) -> std::string::String {
3315        use std::clone::Clone;
3316        self.next_page_token.clone()
3317    }
3318}
3319
3320/// Creates a new GlossaryTerm under the specified Glossary.
3321#[derive(Clone, Default, PartialEq)]
3322#[non_exhaustive]
3323pub struct CreateGlossaryTermRequest {
3324    /// Required. The parent resource where the GlossaryTerm will be created.
3325    /// Format:
3326    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
3327    /// where `location_id` refers to a Google Cloud region.
3328    pub parent: std::string::String,
3329
3330    /// Required. GlossaryTerm identifier.
3331    pub term_id: std::string::String,
3332
3333    /// Required. The GlossaryTerm to create.
3334    pub term: std::option::Option<crate::model::GlossaryTerm>,
3335
3336    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3337}
3338
3339impl CreateGlossaryTermRequest {
3340    pub fn new() -> Self {
3341        std::default::Default::default()
3342    }
3343
3344    /// Sets the value of [parent][crate::model::CreateGlossaryTermRequest::parent].
3345    ///
3346    /// # Example
3347    /// ```ignore,no_run
3348    /// # use google_cloud_dataplex_v1::model::CreateGlossaryTermRequest;
3349    /// let x = CreateGlossaryTermRequest::new().set_parent("example");
3350    /// ```
3351    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3352        self.parent = v.into();
3353        self
3354    }
3355
3356    /// Sets the value of [term_id][crate::model::CreateGlossaryTermRequest::term_id].
3357    ///
3358    /// # Example
3359    /// ```ignore,no_run
3360    /// # use google_cloud_dataplex_v1::model::CreateGlossaryTermRequest;
3361    /// let x = CreateGlossaryTermRequest::new().set_term_id("example");
3362    /// ```
3363    pub fn set_term_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3364        self.term_id = v.into();
3365        self
3366    }
3367
3368    /// Sets the value of [term][crate::model::CreateGlossaryTermRequest::term].
3369    ///
3370    /// # Example
3371    /// ```ignore,no_run
3372    /// # use google_cloud_dataplex_v1::model::CreateGlossaryTermRequest;
3373    /// use google_cloud_dataplex_v1::model::GlossaryTerm;
3374    /// let x = CreateGlossaryTermRequest::new().set_term(GlossaryTerm::default()/* use setters */);
3375    /// ```
3376    pub fn set_term<T>(mut self, v: T) -> Self
3377    where
3378        T: std::convert::Into<crate::model::GlossaryTerm>,
3379    {
3380        self.term = std::option::Option::Some(v.into());
3381        self
3382    }
3383
3384    /// Sets or clears the value of [term][crate::model::CreateGlossaryTermRequest::term].
3385    ///
3386    /// # Example
3387    /// ```ignore,no_run
3388    /// # use google_cloud_dataplex_v1::model::CreateGlossaryTermRequest;
3389    /// use google_cloud_dataplex_v1::model::GlossaryTerm;
3390    /// let x = CreateGlossaryTermRequest::new().set_or_clear_term(Some(GlossaryTerm::default()/* use setters */));
3391    /// let x = CreateGlossaryTermRequest::new().set_or_clear_term(None::<GlossaryTerm>);
3392    /// ```
3393    pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
3394    where
3395        T: std::convert::Into<crate::model::GlossaryTerm>,
3396    {
3397        self.term = v.map(|x| x.into());
3398        self
3399    }
3400}
3401
3402impl wkt::message::Message for CreateGlossaryTermRequest {
3403    fn typename() -> &'static str {
3404        "type.googleapis.com/google.cloud.dataplex.v1.CreateGlossaryTermRequest"
3405    }
3406}
3407
3408/// Update GlossaryTerm Request
3409#[derive(Clone, Default, PartialEq)]
3410#[non_exhaustive]
3411pub struct UpdateGlossaryTermRequest {
3412    /// Required. The GlossaryTerm to update.
3413    /// The GlossaryTerm's `name` field is used to identify the GlossaryTerm to
3414    /// update. Format:
3415    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
3416    pub term: std::option::Option<crate::model::GlossaryTerm>,
3417
3418    /// Required. The list of fields to update.
3419    pub update_mask: std::option::Option<wkt::FieldMask>,
3420
3421    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3422}
3423
3424impl UpdateGlossaryTermRequest {
3425    pub fn new() -> Self {
3426        std::default::Default::default()
3427    }
3428
3429    /// Sets the value of [term][crate::model::UpdateGlossaryTermRequest::term].
3430    ///
3431    /// # Example
3432    /// ```ignore,no_run
3433    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryTermRequest;
3434    /// use google_cloud_dataplex_v1::model::GlossaryTerm;
3435    /// let x = UpdateGlossaryTermRequest::new().set_term(GlossaryTerm::default()/* use setters */);
3436    /// ```
3437    pub fn set_term<T>(mut self, v: T) -> Self
3438    where
3439        T: std::convert::Into<crate::model::GlossaryTerm>,
3440    {
3441        self.term = std::option::Option::Some(v.into());
3442        self
3443    }
3444
3445    /// Sets or clears the value of [term][crate::model::UpdateGlossaryTermRequest::term].
3446    ///
3447    /// # Example
3448    /// ```ignore,no_run
3449    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryTermRequest;
3450    /// use google_cloud_dataplex_v1::model::GlossaryTerm;
3451    /// let x = UpdateGlossaryTermRequest::new().set_or_clear_term(Some(GlossaryTerm::default()/* use setters */));
3452    /// let x = UpdateGlossaryTermRequest::new().set_or_clear_term(None::<GlossaryTerm>);
3453    /// ```
3454    pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
3455    where
3456        T: std::convert::Into<crate::model::GlossaryTerm>,
3457    {
3458        self.term = v.map(|x| x.into());
3459        self
3460    }
3461
3462    /// Sets the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
3463    ///
3464    /// # Example
3465    /// ```ignore,no_run
3466    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryTermRequest;
3467    /// use wkt::FieldMask;
3468    /// let x = UpdateGlossaryTermRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3469    /// ```
3470    pub fn set_update_mask<T>(mut self, v: T) -> Self
3471    where
3472        T: std::convert::Into<wkt::FieldMask>,
3473    {
3474        self.update_mask = std::option::Option::Some(v.into());
3475        self
3476    }
3477
3478    /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
3479    ///
3480    /// # Example
3481    /// ```ignore,no_run
3482    /// # use google_cloud_dataplex_v1::model::UpdateGlossaryTermRequest;
3483    /// use wkt::FieldMask;
3484    /// let x = UpdateGlossaryTermRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3485    /// let x = UpdateGlossaryTermRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3486    /// ```
3487    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3488    where
3489        T: std::convert::Into<wkt::FieldMask>,
3490    {
3491        self.update_mask = v.map(|x| x.into());
3492        self
3493    }
3494}
3495
3496impl wkt::message::Message for UpdateGlossaryTermRequest {
3497    fn typename() -> &'static str {
3498        "type.googleapis.com/google.cloud.dataplex.v1.UpdateGlossaryTermRequest"
3499    }
3500}
3501
3502/// Delete GlossaryTerm Request
3503#[derive(Clone, Default, PartialEq)]
3504#[non_exhaustive]
3505pub struct DeleteGlossaryTermRequest {
3506    /// Required. The name of the GlossaryTerm to delete.
3507    /// Format:
3508    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
3509    pub name: std::string::String,
3510
3511    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3512}
3513
3514impl DeleteGlossaryTermRequest {
3515    pub fn new() -> Self {
3516        std::default::Default::default()
3517    }
3518
3519    /// Sets the value of [name][crate::model::DeleteGlossaryTermRequest::name].
3520    ///
3521    /// # Example
3522    /// ```ignore,no_run
3523    /// # use google_cloud_dataplex_v1::model::DeleteGlossaryTermRequest;
3524    /// let x = DeleteGlossaryTermRequest::new().set_name("example");
3525    /// ```
3526    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3527        self.name = v.into();
3528        self
3529    }
3530}
3531
3532impl wkt::message::Message for DeleteGlossaryTermRequest {
3533    fn typename() -> &'static str {
3534        "type.googleapis.com/google.cloud.dataplex.v1.DeleteGlossaryTermRequest"
3535    }
3536}
3537
3538/// Get GlossaryTerm Request
3539#[derive(Clone, Default, PartialEq)]
3540#[non_exhaustive]
3541pub struct GetGlossaryTermRequest {
3542    /// Required. The name of the GlossaryTerm to retrieve.
3543    /// Format:
3544    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
3545    pub name: std::string::String,
3546
3547    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3548}
3549
3550impl GetGlossaryTermRequest {
3551    pub fn new() -> Self {
3552        std::default::Default::default()
3553    }
3554
3555    /// Sets the value of [name][crate::model::GetGlossaryTermRequest::name].
3556    ///
3557    /// # Example
3558    /// ```ignore,no_run
3559    /// # use google_cloud_dataplex_v1::model::GetGlossaryTermRequest;
3560    /// let x = GetGlossaryTermRequest::new().set_name("example");
3561    /// ```
3562    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3563        self.name = v.into();
3564        self
3565    }
3566}
3567
3568impl wkt::message::Message for GetGlossaryTermRequest {
3569    fn typename() -> &'static str {
3570        "type.googleapis.com/google.cloud.dataplex.v1.GetGlossaryTermRequest"
3571    }
3572}
3573
3574/// List GlossaryTerms Request
3575#[derive(Clone, Default, PartialEq)]
3576#[non_exhaustive]
3577pub struct ListGlossaryTermsRequest {
3578    /// Required. The parent, which has this collection of GlossaryTerms.
3579    /// Format:
3580    /// projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
3581    /// where `location_id` refers to a Google Cloud region.
3582    pub parent: std::string::String,
3583
3584    /// Optional. The maximum number of GlossaryTerms to return. The service may
3585    /// return fewer than this value. If unspecified, at most 50 GlossaryTerms will
3586    /// be returned. The maximum value is 1000; values above 1000 will be coerced
3587    /// to 1000.
3588    pub page_size: i32,
3589
3590    /// Optional. A page token, received from a previous `ListGlossaryTerms` call.
3591    /// Provide this to retrieve the subsequent page.
3592    /// When paginating, all other parameters provided to `ListGlossaryTerms` must
3593    /// match the call that provided the page token.
3594    pub page_token: std::string::String,
3595
3596    /// Optional. Filter expression that filters GlossaryTerms listed in the
3597    /// response. Filters are supported on the following fields:
3598    ///
3599    /// - immediate_parent
3600    ///
3601    /// Examples of using a filter are:
3602    ///
3603    /// - `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"`
3604    /// - `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"`
3605    ///
3606    /// This will only return the GlossaryTerms that are directly nested under the
3607    /// specified parent.
3608    pub filter: std::string::String,
3609
3610    /// Optional. Order by expression that orders GlossaryTerms listed in the
3611    /// response. Order by fields are: `name` or `create_time` for the result. If
3612    /// not specified, the ordering is undefined.
3613    pub order_by: std::string::String,
3614
3615    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3616}
3617
3618impl ListGlossaryTermsRequest {
3619    pub fn new() -> Self {
3620        std::default::Default::default()
3621    }
3622
3623    /// Sets the value of [parent][crate::model::ListGlossaryTermsRequest::parent].
3624    ///
3625    /// # Example
3626    /// ```ignore,no_run
3627    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsRequest;
3628    /// let x = ListGlossaryTermsRequest::new().set_parent("example");
3629    /// ```
3630    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3631        self.parent = v.into();
3632        self
3633    }
3634
3635    /// Sets the value of [page_size][crate::model::ListGlossaryTermsRequest::page_size].
3636    ///
3637    /// # Example
3638    /// ```ignore,no_run
3639    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsRequest;
3640    /// let x = ListGlossaryTermsRequest::new().set_page_size(42);
3641    /// ```
3642    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3643        self.page_size = v.into();
3644        self
3645    }
3646
3647    /// Sets the value of [page_token][crate::model::ListGlossaryTermsRequest::page_token].
3648    ///
3649    /// # Example
3650    /// ```ignore,no_run
3651    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsRequest;
3652    /// let x = ListGlossaryTermsRequest::new().set_page_token("example");
3653    /// ```
3654    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3655        self.page_token = v.into();
3656        self
3657    }
3658
3659    /// Sets the value of [filter][crate::model::ListGlossaryTermsRequest::filter].
3660    ///
3661    /// # Example
3662    /// ```ignore,no_run
3663    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsRequest;
3664    /// let x = ListGlossaryTermsRequest::new().set_filter("example");
3665    /// ```
3666    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3667        self.filter = v.into();
3668        self
3669    }
3670
3671    /// Sets the value of [order_by][crate::model::ListGlossaryTermsRequest::order_by].
3672    ///
3673    /// # Example
3674    /// ```ignore,no_run
3675    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsRequest;
3676    /// let x = ListGlossaryTermsRequest::new().set_order_by("example");
3677    /// ```
3678    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3679        self.order_by = v.into();
3680        self
3681    }
3682}
3683
3684impl wkt::message::Message for ListGlossaryTermsRequest {
3685    fn typename() -> &'static str {
3686        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryTermsRequest"
3687    }
3688}
3689
3690/// List GlossaryTerms Response
3691#[derive(Clone, Default, PartialEq)]
3692#[non_exhaustive]
3693pub struct ListGlossaryTermsResponse {
3694    /// Lists the GlossaryTerms in the specified parent.
3695    pub terms: std::vec::Vec<crate::model::GlossaryTerm>,
3696
3697    /// A token, which can be sent as `page_token` to retrieve the next page.
3698    /// If this field is omitted, there are no subsequent pages.
3699    pub next_page_token: std::string::String,
3700
3701    /// Locations that the service couldn't reach.
3702    pub unreachable_locations: std::vec::Vec<std::string::String>,
3703
3704    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3705}
3706
3707impl ListGlossaryTermsResponse {
3708    pub fn new() -> Self {
3709        std::default::Default::default()
3710    }
3711
3712    /// Sets the value of [terms][crate::model::ListGlossaryTermsResponse::terms].
3713    ///
3714    /// # Example
3715    /// ```ignore,no_run
3716    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsResponse;
3717    /// use google_cloud_dataplex_v1::model::GlossaryTerm;
3718    /// let x = ListGlossaryTermsResponse::new()
3719    ///     .set_terms([
3720    ///         GlossaryTerm::default()/* use setters */,
3721    ///         GlossaryTerm::default()/* use (different) setters */,
3722    ///     ]);
3723    /// ```
3724    pub fn set_terms<T, V>(mut self, v: T) -> Self
3725    where
3726        T: std::iter::IntoIterator<Item = V>,
3727        V: std::convert::Into<crate::model::GlossaryTerm>,
3728    {
3729        use std::iter::Iterator;
3730        self.terms = v.into_iter().map(|i| i.into()).collect();
3731        self
3732    }
3733
3734    /// Sets the value of [next_page_token][crate::model::ListGlossaryTermsResponse::next_page_token].
3735    ///
3736    /// # Example
3737    /// ```ignore,no_run
3738    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsResponse;
3739    /// let x = ListGlossaryTermsResponse::new().set_next_page_token("example");
3740    /// ```
3741    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3742        self.next_page_token = v.into();
3743        self
3744    }
3745
3746    /// Sets the value of [unreachable_locations][crate::model::ListGlossaryTermsResponse::unreachable_locations].
3747    ///
3748    /// # Example
3749    /// ```ignore,no_run
3750    /// # use google_cloud_dataplex_v1::model::ListGlossaryTermsResponse;
3751    /// let x = ListGlossaryTermsResponse::new().set_unreachable_locations(["a", "b", "c"]);
3752    /// ```
3753    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
3754    where
3755        T: std::iter::IntoIterator<Item = V>,
3756        V: std::convert::Into<std::string::String>,
3757    {
3758        use std::iter::Iterator;
3759        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
3760        self
3761    }
3762}
3763
3764impl wkt::message::Message for ListGlossaryTermsResponse {
3765    fn typename() -> &'static str {
3766        "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryTermsResponse"
3767    }
3768}
3769
3770#[doc(hidden)]
3771impl google_cloud_gax::paginator::internal::PageableResponse for ListGlossaryTermsResponse {
3772    type PageItem = crate::model::GlossaryTerm;
3773
3774    fn items(self) -> std::vec::Vec<Self::PageItem> {
3775        self.terms
3776    }
3777
3778    fn next_page_token(&self) -> std::string::String {
3779        use std::clone::Clone;
3780        self.next_page_token.clone()
3781    }
3782}
3783
3784/// AspectType is a template for creating Aspects, and represents the
3785/// JSON-schema for a given Entry, for example, BigQuery Table Schema.
3786#[derive(Clone, Default, PartialEq)]
3787#[non_exhaustive]
3788pub struct AspectType {
3789    /// Output only. The relative resource name of the AspectType, of the form:
3790    /// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}.
3791    pub name: std::string::String,
3792
3793    /// Output only. System generated globally unique ID for the AspectType.
3794    /// If you delete and recreate the AspectType with the same name, then this ID
3795    /// will be different.
3796    pub uid: std::string::String,
3797
3798    /// Output only. The time when the AspectType was created.
3799    pub create_time: std::option::Option<wkt::Timestamp>,
3800
3801    /// Output only. The time when the AspectType was last updated.
3802    pub update_time: std::option::Option<wkt::Timestamp>,
3803
3804    /// Optional. Description of the AspectType.
3805    pub description: std::string::String,
3806
3807    /// Optional. User friendly display name.
3808    pub display_name: std::string::String,
3809
3810    /// Optional. User-defined labels for the AspectType.
3811    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
3812
3813    /// The service computes this checksum. The client may send it on update and
3814    /// delete requests to ensure it has an up-to-date value before proceeding.
3815    pub etag: std::string::String,
3816
3817    /// Optional. Immutable. Stores data classification of the aspect.
3818    pub data_classification: crate::model::aspect_type::DataClassification,
3819
3820    /// Immutable. Defines the Authorization for this type.
3821    pub authorization: std::option::Option<crate::model::aspect_type::Authorization>,
3822
3823    /// Required. MetadataTemplate of the aspect.
3824    pub metadata_template: std::option::Option<crate::model::aspect_type::MetadataTemplate>,
3825
3826    /// Output only. Denotes the transfer status of the Aspect Type. It is
3827    /// unspecified for Aspect Types created from Dataplex API.
3828    pub transfer_status: crate::model::TransferStatus,
3829
3830    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3831}
3832
3833impl AspectType {
3834    pub fn new() -> Self {
3835        std::default::Default::default()
3836    }
3837
3838    /// Sets the value of [name][crate::model::AspectType::name].
3839    ///
3840    /// # Example
3841    /// ```ignore,no_run
3842    /// # use google_cloud_dataplex_v1::model::AspectType;
3843    /// let x = AspectType::new().set_name("example");
3844    /// ```
3845    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3846        self.name = v.into();
3847        self
3848    }
3849
3850    /// Sets the value of [uid][crate::model::AspectType::uid].
3851    ///
3852    /// # Example
3853    /// ```ignore,no_run
3854    /// # use google_cloud_dataplex_v1::model::AspectType;
3855    /// let x = AspectType::new().set_uid("example");
3856    /// ```
3857    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3858        self.uid = v.into();
3859        self
3860    }
3861
3862    /// Sets the value of [create_time][crate::model::AspectType::create_time].
3863    ///
3864    /// # Example
3865    /// ```ignore,no_run
3866    /// # use google_cloud_dataplex_v1::model::AspectType;
3867    /// use wkt::Timestamp;
3868    /// let x = AspectType::new().set_create_time(Timestamp::default()/* use setters */);
3869    /// ```
3870    pub fn set_create_time<T>(mut self, v: T) -> Self
3871    where
3872        T: std::convert::Into<wkt::Timestamp>,
3873    {
3874        self.create_time = std::option::Option::Some(v.into());
3875        self
3876    }
3877
3878    /// Sets or clears the value of [create_time][crate::model::AspectType::create_time].
3879    ///
3880    /// # Example
3881    /// ```ignore,no_run
3882    /// # use google_cloud_dataplex_v1::model::AspectType;
3883    /// use wkt::Timestamp;
3884    /// let x = AspectType::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
3885    /// let x = AspectType::new().set_or_clear_create_time(None::<Timestamp>);
3886    /// ```
3887    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3888    where
3889        T: std::convert::Into<wkt::Timestamp>,
3890    {
3891        self.create_time = v.map(|x| x.into());
3892        self
3893    }
3894
3895    /// Sets the value of [update_time][crate::model::AspectType::update_time].
3896    ///
3897    /// # Example
3898    /// ```ignore,no_run
3899    /// # use google_cloud_dataplex_v1::model::AspectType;
3900    /// use wkt::Timestamp;
3901    /// let x = AspectType::new().set_update_time(Timestamp::default()/* use setters */);
3902    /// ```
3903    pub fn set_update_time<T>(mut self, v: T) -> Self
3904    where
3905        T: std::convert::Into<wkt::Timestamp>,
3906    {
3907        self.update_time = std::option::Option::Some(v.into());
3908        self
3909    }
3910
3911    /// Sets or clears the value of [update_time][crate::model::AspectType::update_time].
3912    ///
3913    /// # Example
3914    /// ```ignore,no_run
3915    /// # use google_cloud_dataplex_v1::model::AspectType;
3916    /// use wkt::Timestamp;
3917    /// let x = AspectType::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
3918    /// let x = AspectType::new().set_or_clear_update_time(None::<Timestamp>);
3919    /// ```
3920    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
3921    where
3922        T: std::convert::Into<wkt::Timestamp>,
3923    {
3924        self.update_time = v.map(|x| x.into());
3925        self
3926    }
3927
3928    /// Sets the value of [description][crate::model::AspectType::description].
3929    ///
3930    /// # Example
3931    /// ```ignore,no_run
3932    /// # use google_cloud_dataplex_v1::model::AspectType;
3933    /// let x = AspectType::new().set_description("example");
3934    /// ```
3935    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3936        self.description = v.into();
3937        self
3938    }
3939
3940    /// Sets the value of [display_name][crate::model::AspectType::display_name].
3941    ///
3942    /// # Example
3943    /// ```ignore,no_run
3944    /// # use google_cloud_dataplex_v1::model::AspectType;
3945    /// let x = AspectType::new().set_display_name("example");
3946    /// ```
3947    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3948        self.display_name = v.into();
3949        self
3950    }
3951
3952    /// Sets the value of [labels][crate::model::AspectType::labels].
3953    ///
3954    /// # Example
3955    /// ```ignore,no_run
3956    /// # use google_cloud_dataplex_v1::model::AspectType;
3957    /// let x = AspectType::new().set_labels([
3958    ///     ("key0", "abc"),
3959    ///     ("key1", "xyz"),
3960    /// ]);
3961    /// ```
3962    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
3963    where
3964        T: std::iter::IntoIterator<Item = (K, V)>,
3965        K: std::convert::Into<std::string::String>,
3966        V: std::convert::Into<std::string::String>,
3967    {
3968        use std::iter::Iterator;
3969        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3970        self
3971    }
3972
3973    /// Sets the value of [etag][crate::model::AspectType::etag].
3974    ///
3975    /// # Example
3976    /// ```ignore,no_run
3977    /// # use google_cloud_dataplex_v1::model::AspectType;
3978    /// let x = AspectType::new().set_etag("example");
3979    /// ```
3980    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3981        self.etag = v.into();
3982        self
3983    }
3984
3985    /// Sets the value of [data_classification][crate::model::AspectType::data_classification].
3986    ///
3987    /// # Example
3988    /// ```ignore,no_run
3989    /// # use google_cloud_dataplex_v1::model::AspectType;
3990    /// use google_cloud_dataplex_v1::model::aspect_type::DataClassification;
3991    /// let x0 = AspectType::new().set_data_classification(DataClassification::MetadataAndData);
3992    /// ```
3993    pub fn set_data_classification<
3994        T: std::convert::Into<crate::model::aspect_type::DataClassification>,
3995    >(
3996        mut self,
3997        v: T,
3998    ) -> Self {
3999        self.data_classification = v.into();
4000        self
4001    }
4002
4003    /// Sets the value of [authorization][crate::model::AspectType::authorization].
4004    ///
4005    /// # Example
4006    /// ```ignore,no_run
4007    /// # use google_cloud_dataplex_v1::model::AspectType;
4008    /// use google_cloud_dataplex_v1::model::aspect_type::Authorization;
4009    /// let x = AspectType::new().set_authorization(Authorization::default()/* use setters */);
4010    /// ```
4011    pub fn set_authorization<T>(mut self, v: T) -> Self
4012    where
4013        T: std::convert::Into<crate::model::aspect_type::Authorization>,
4014    {
4015        self.authorization = std::option::Option::Some(v.into());
4016        self
4017    }
4018
4019    /// Sets or clears the value of [authorization][crate::model::AspectType::authorization].
4020    ///
4021    /// # Example
4022    /// ```ignore,no_run
4023    /// # use google_cloud_dataplex_v1::model::AspectType;
4024    /// use google_cloud_dataplex_v1::model::aspect_type::Authorization;
4025    /// let x = AspectType::new().set_or_clear_authorization(Some(Authorization::default()/* use setters */));
4026    /// let x = AspectType::new().set_or_clear_authorization(None::<Authorization>);
4027    /// ```
4028    pub fn set_or_clear_authorization<T>(mut self, v: std::option::Option<T>) -> Self
4029    where
4030        T: std::convert::Into<crate::model::aspect_type::Authorization>,
4031    {
4032        self.authorization = v.map(|x| x.into());
4033        self
4034    }
4035
4036    /// Sets the value of [metadata_template][crate::model::AspectType::metadata_template].
4037    ///
4038    /// # Example
4039    /// ```ignore,no_run
4040    /// # use google_cloud_dataplex_v1::model::AspectType;
4041    /// use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4042    /// let x = AspectType::new().set_metadata_template(MetadataTemplate::default()/* use setters */);
4043    /// ```
4044    pub fn set_metadata_template<T>(mut self, v: T) -> Self
4045    where
4046        T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
4047    {
4048        self.metadata_template = std::option::Option::Some(v.into());
4049        self
4050    }
4051
4052    /// Sets or clears the value of [metadata_template][crate::model::AspectType::metadata_template].
4053    ///
4054    /// # Example
4055    /// ```ignore,no_run
4056    /// # use google_cloud_dataplex_v1::model::AspectType;
4057    /// use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4058    /// let x = AspectType::new().set_or_clear_metadata_template(Some(MetadataTemplate::default()/* use setters */));
4059    /// let x = AspectType::new().set_or_clear_metadata_template(None::<MetadataTemplate>);
4060    /// ```
4061    pub fn set_or_clear_metadata_template<T>(mut self, v: std::option::Option<T>) -> Self
4062    where
4063        T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
4064    {
4065        self.metadata_template = v.map(|x| x.into());
4066        self
4067    }
4068
4069    /// Sets the value of [transfer_status][crate::model::AspectType::transfer_status].
4070    ///
4071    /// # Example
4072    /// ```ignore,no_run
4073    /// # use google_cloud_dataplex_v1::model::AspectType;
4074    /// use google_cloud_dataplex_v1::model::TransferStatus;
4075    /// let x0 = AspectType::new().set_transfer_status(TransferStatus::Migrated);
4076    /// let x1 = AspectType::new().set_transfer_status(TransferStatus::Transferred);
4077    /// ```
4078    pub fn set_transfer_status<T: std::convert::Into<crate::model::TransferStatus>>(
4079        mut self,
4080        v: T,
4081    ) -> Self {
4082        self.transfer_status = v.into();
4083        self
4084    }
4085}
4086
4087impl wkt::message::Message for AspectType {
4088    fn typename() -> &'static str {
4089        "type.googleapis.com/google.cloud.dataplex.v1.AspectType"
4090    }
4091}
4092
4093/// Defines additional types related to [AspectType].
4094pub mod aspect_type {
4095    #[allow(unused_imports)]
4096    use super::*;
4097
4098    /// Authorization for an AspectType.
4099    #[derive(Clone, Default, PartialEq)]
4100    #[non_exhaustive]
4101    pub struct Authorization {
4102        /// Immutable. The IAM permission grantable on the EntryGroup to allow access
4103        /// to instantiate Aspects of Dataplex Universal Catalog owned AspectTypes,
4104        /// only settable for Dataplex Universal Catalog owned Types.
4105        pub alternate_use_permission: std::string::String,
4106
4107        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4108    }
4109
4110    impl Authorization {
4111        pub fn new() -> Self {
4112            std::default::Default::default()
4113        }
4114
4115        /// Sets the value of [alternate_use_permission][crate::model::aspect_type::Authorization::alternate_use_permission].
4116        ///
4117        /// # Example
4118        /// ```ignore,no_run
4119        /// # use google_cloud_dataplex_v1::model::aspect_type::Authorization;
4120        /// let x = Authorization::new().set_alternate_use_permission("example");
4121        /// ```
4122        pub fn set_alternate_use_permission<T: std::convert::Into<std::string::String>>(
4123            mut self,
4124            v: T,
4125        ) -> Self {
4126            self.alternate_use_permission = v.into();
4127            self
4128        }
4129    }
4130
4131    impl wkt::message::Message for Authorization {
4132        fn typename() -> &'static str {
4133            "type.googleapis.com/google.cloud.dataplex.v1.AspectType.Authorization"
4134        }
4135    }
4136
4137    /// MetadataTemplate definition for an AspectType.
4138    #[derive(Clone, Default, PartialEq)]
4139    #[non_exhaustive]
4140    pub struct MetadataTemplate {
4141        /// Optional. Index is used to encode Template messages. The value of index
4142        /// can range between 1 and 2,147,483,647. Index must be unique within all
4143        /// fields in a Template. (Nested Templates can reuse indexes). Once a
4144        /// Template is defined, the index cannot be changed, because it identifies
4145        /// the field in the actual storage format. Index is a mandatory field, but
4146        /// it is optional for top level fields, and map/array "values" definitions.
4147        pub index: i32,
4148
4149        /// Required. The name of the field.
4150        pub name: std::string::String,
4151
4152        /// Required. The datatype of this field. The following values are supported:
4153        ///
4154        /// Primitive types:
4155        ///
4156        /// * string
4157        /// * int
4158        /// * bool
4159        /// * double
4160        /// * datetime. Must be of the format RFC3339 UTC "Zulu" (Examples:
4161        ///   "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z").
4162        ///
4163        /// Complex types:
4164        ///
4165        /// * enum
4166        /// * array
4167        /// * map
4168        /// * record
4169        pub r#type: std::string::String,
4170
4171        /// Optional. Field definition. You must specify it if the type is record. It
4172        /// defines the nested fields.
4173        pub record_fields: std::vec::Vec<crate::model::aspect_type::MetadataTemplate>,
4174
4175        /// Optional. The list of values for an enum type. You must define it if the
4176        /// type is enum.
4177        pub enum_values: std::vec::Vec<crate::model::aspect_type::metadata_template::EnumValue>,
4178
4179        /// Optional. If the type is map, set map_items. map_items can refer to a
4180        /// primitive field or a complex (record only) field. To specify a primitive
4181        /// field, you only need to set name and type in the nested
4182        /// MetadataTemplate. The recommended value for the name field is item, as
4183        /// this isn't used in the actual payload.
4184        pub map_items:
4185            std::option::Option<std::boxed::Box<crate::model::aspect_type::MetadataTemplate>>,
4186
4187        /// Optional. If the type is array, set array_items. array_items can refer
4188        /// to a primitive field or a complex (record only) field. To specify a
4189        /// primitive field, you only need to set name and type in the nested
4190        /// MetadataTemplate. The recommended value for the name field is item, as
4191        /// this isn't used in the actual payload.
4192        pub array_items:
4193            std::option::Option<std::boxed::Box<crate::model::aspect_type::MetadataTemplate>>,
4194
4195        /// Optional. You can use type id if this definition of the field needs to be
4196        /// reused later. The type id must be unique across the entire template. You
4197        /// can only specify it if the field type is record.
4198        pub type_id: std::string::String,
4199
4200        /// Optional. A reference to another field definition (not an inline
4201        /// definition). The value must be equal to the value of an id field defined
4202        /// elsewhere in the MetadataTemplate. Only fields with record type can
4203        /// refer to other fields.
4204        pub type_ref: std::string::String,
4205
4206        /// Optional. Specifies the constraints on this field.
4207        pub constraints:
4208            std::option::Option<crate::model::aspect_type::metadata_template::Constraints>,
4209
4210        /// Optional. Specifies annotations on this field.
4211        pub annotations:
4212            std::option::Option<crate::model::aspect_type::metadata_template::Annotations>,
4213
4214        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4215    }
4216
4217    impl MetadataTemplate {
4218        pub fn new() -> Self {
4219            std::default::Default::default()
4220        }
4221
4222        /// Sets the value of [index][crate::model::aspect_type::MetadataTemplate::index].
4223        ///
4224        /// # Example
4225        /// ```ignore,no_run
4226        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4227        /// let x = MetadataTemplate::new().set_index(42);
4228        /// ```
4229        pub fn set_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4230            self.index = v.into();
4231            self
4232        }
4233
4234        /// Sets the value of [name][crate::model::aspect_type::MetadataTemplate::name].
4235        ///
4236        /// # Example
4237        /// ```ignore,no_run
4238        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4239        /// let x = MetadataTemplate::new().set_name("example");
4240        /// ```
4241        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4242            self.name = v.into();
4243            self
4244        }
4245
4246        /// Sets the value of [r#type][crate::model::aspect_type::MetadataTemplate::type].
4247        ///
4248        /// # Example
4249        /// ```ignore,no_run
4250        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4251        /// let x = MetadataTemplate::new().set_type("example");
4252        /// ```
4253        pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4254            self.r#type = v.into();
4255            self
4256        }
4257
4258        /// Sets the value of [record_fields][crate::model::aspect_type::MetadataTemplate::record_fields].
4259        ///
4260        /// # Example
4261        /// ```ignore,no_run
4262        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4263        /// let x = MetadataTemplate::new()
4264        ///     .set_record_fields([
4265        ///         MetadataTemplate::default()/* use setters */,
4266        ///         MetadataTemplate::default()/* use (different) setters */,
4267        ///     ]);
4268        /// ```
4269        pub fn set_record_fields<T, V>(mut self, v: T) -> Self
4270        where
4271            T: std::iter::IntoIterator<Item = V>,
4272            V: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
4273        {
4274            use std::iter::Iterator;
4275            self.record_fields = v.into_iter().map(|i| i.into()).collect();
4276            self
4277        }
4278
4279        /// Sets the value of [enum_values][crate::model::aspect_type::MetadataTemplate::enum_values].
4280        ///
4281        /// # Example
4282        /// ```ignore,no_run
4283        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4284        /// use google_cloud_dataplex_v1::model::aspect_type::metadata_template::EnumValue;
4285        /// let x = MetadataTemplate::new()
4286        ///     .set_enum_values([
4287        ///         EnumValue::default()/* use setters */,
4288        ///         EnumValue::default()/* use (different) setters */,
4289        ///     ]);
4290        /// ```
4291        pub fn set_enum_values<T, V>(mut self, v: T) -> Self
4292        where
4293            T: std::iter::IntoIterator<Item = V>,
4294            V: std::convert::Into<crate::model::aspect_type::metadata_template::EnumValue>,
4295        {
4296            use std::iter::Iterator;
4297            self.enum_values = v.into_iter().map(|i| i.into()).collect();
4298            self
4299        }
4300
4301        /// Sets the value of [map_items][crate::model::aspect_type::MetadataTemplate::map_items].
4302        ///
4303        /// # Example
4304        /// ```ignore,no_run
4305        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4306        /// let x = MetadataTemplate::new().set_map_items(MetadataTemplate::default()/* use setters */);
4307        /// ```
4308        pub fn set_map_items<T>(mut self, v: T) -> Self
4309        where
4310            T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
4311        {
4312            self.map_items = std::option::Option::Some(std::boxed::Box::new(v.into()));
4313            self
4314        }
4315
4316        /// Sets or clears the value of [map_items][crate::model::aspect_type::MetadataTemplate::map_items].
4317        ///
4318        /// # Example
4319        /// ```ignore,no_run
4320        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4321        /// let x = MetadataTemplate::new().set_or_clear_map_items(Some(MetadataTemplate::default()/* use setters */));
4322        /// let x = MetadataTemplate::new().set_or_clear_map_items(None::<MetadataTemplate>);
4323        /// ```
4324        pub fn set_or_clear_map_items<T>(mut self, v: std::option::Option<T>) -> Self
4325        where
4326            T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
4327        {
4328            self.map_items = v.map(|x| std::boxed::Box::new(x.into()));
4329            self
4330        }
4331
4332        /// Sets the value of [array_items][crate::model::aspect_type::MetadataTemplate::array_items].
4333        ///
4334        /// # Example
4335        /// ```ignore,no_run
4336        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4337        /// let x = MetadataTemplate::new().set_array_items(MetadataTemplate::default()/* use setters */);
4338        /// ```
4339        pub fn set_array_items<T>(mut self, v: T) -> Self
4340        where
4341            T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
4342        {
4343            self.array_items = std::option::Option::Some(std::boxed::Box::new(v.into()));
4344            self
4345        }
4346
4347        /// Sets or clears the value of [array_items][crate::model::aspect_type::MetadataTemplate::array_items].
4348        ///
4349        /// # Example
4350        /// ```ignore,no_run
4351        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4352        /// let x = MetadataTemplate::new().set_or_clear_array_items(Some(MetadataTemplate::default()/* use setters */));
4353        /// let x = MetadataTemplate::new().set_or_clear_array_items(None::<MetadataTemplate>);
4354        /// ```
4355        pub fn set_or_clear_array_items<T>(mut self, v: std::option::Option<T>) -> Self
4356        where
4357            T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
4358        {
4359            self.array_items = v.map(|x| std::boxed::Box::new(x.into()));
4360            self
4361        }
4362
4363        /// Sets the value of [type_id][crate::model::aspect_type::MetadataTemplate::type_id].
4364        ///
4365        /// # Example
4366        /// ```ignore,no_run
4367        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4368        /// let x = MetadataTemplate::new().set_type_id("example");
4369        /// ```
4370        pub fn set_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4371            self.type_id = v.into();
4372            self
4373        }
4374
4375        /// Sets the value of [type_ref][crate::model::aspect_type::MetadataTemplate::type_ref].
4376        ///
4377        /// # Example
4378        /// ```ignore,no_run
4379        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4380        /// let x = MetadataTemplate::new().set_type_ref("example");
4381        /// ```
4382        pub fn set_type_ref<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4383            self.type_ref = v.into();
4384            self
4385        }
4386
4387        /// Sets the value of [constraints][crate::model::aspect_type::MetadataTemplate::constraints].
4388        ///
4389        /// # Example
4390        /// ```ignore,no_run
4391        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4392        /// use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Constraints;
4393        /// let x = MetadataTemplate::new().set_constraints(Constraints::default()/* use setters */);
4394        /// ```
4395        pub fn set_constraints<T>(mut self, v: T) -> Self
4396        where
4397            T: std::convert::Into<crate::model::aspect_type::metadata_template::Constraints>,
4398        {
4399            self.constraints = std::option::Option::Some(v.into());
4400            self
4401        }
4402
4403        /// Sets or clears the value of [constraints][crate::model::aspect_type::MetadataTemplate::constraints].
4404        ///
4405        /// # Example
4406        /// ```ignore,no_run
4407        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4408        /// use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Constraints;
4409        /// let x = MetadataTemplate::new().set_or_clear_constraints(Some(Constraints::default()/* use setters */));
4410        /// let x = MetadataTemplate::new().set_or_clear_constraints(None::<Constraints>);
4411        /// ```
4412        pub fn set_or_clear_constraints<T>(mut self, v: std::option::Option<T>) -> Self
4413        where
4414            T: std::convert::Into<crate::model::aspect_type::metadata_template::Constraints>,
4415        {
4416            self.constraints = v.map(|x| x.into());
4417            self
4418        }
4419
4420        /// Sets the value of [annotations][crate::model::aspect_type::MetadataTemplate::annotations].
4421        ///
4422        /// # Example
4423        /// ```ignore,no_run
4424        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4425        /// use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4426        /// let x = MetadataTemplate::new().set_annotations(Annotations::default()/* use setters */);
4427        /// ```
4428        pub fn set_annotations<T>(mut self, v: T) -> Self
4429        where
4430            T: std::convert::Into<crate::model::aspect_type::metadata_template::Annotations>,
4431        {
4432            self.annotations = std::option::Option::Some(v.into());
4433            self
4434        }
4435
4436        /// Sets or clears the value of [annotations][crate::model::aspect_type::MetadataTemplate::annotations].
4437        ///
4438        /// # Example
4439        /// ```ignore,no_run
4440        /// # use google_cloud_dataplex_v1::model::aspect_type::MetadataTemplate;
4441        /// use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4442        /// let x = MetadataTemplate::new().set_or_clear_annotations(Some(Annotations::default()/* use setters */));
4443        /// let x = MetadataTemplate::new().set_or_clear_annotations(None::<Annotations>);
4444        /// ```
4445        pub fn set_or_clear_annotations<T>(mut self, v: std::option::Option<T>) -> Self
4446        where
4447            T: std::convert::Into<crate::model::aspect_type::metadata_template::Annotations>,
4448        {
4449            self.annotations = v.map(|x| x.into());
4450            self
4451        }
4452    }
4453
4454    impl wkt::message::Message for MetadataTemplate {
4455        fn typename() -> &'static str {
4456            "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate"
4457        }
4458    }
4459
4460    /// Defines additional types related to [MetadataTemplate].
4461    pub mod metadata_template {
4462        #[allow(unused_imports)]
4463        use super::*;
4464
4465        /// Definition of Enumvalue, to be used for enum fields.
4466        #[derive(Clone, Default, PartialEq)]
4467        #[non_exhaustive]
4468        pub struct EnumValue {
4469            /// Required. Index for the enum value. It can't be modified.
4470            pub index: i32,
4471
4472            /// Required. Name of the enumvalue. This is the actual value that the
4473            /// aspect can contain.
4474            pub name: std::string::String,
4475
4476            /// Optional. You can set this message if you need to deprecate an enum
4477            /// value.
4478            pub deprecated: std::string::String,
4479
4480            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4481        }
4482
4483        impl EnumValue {
4484            pub fn new() -> Self {
4485                std::default::Default::default()
4486            }
4487
4488            /// Sets the value of [index][crate::model::aspect_type::metadata_template::EnumValue::index].
4489            ///
4490            /// # Example
4491            /// ```ignore,no_run
4492            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::EnumValue;
4493            /// let x = EnumValue::new().set_index(42);
4494            /// ```
4495            pub fn set_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4496                self.index = v.into();
4497                self
4498            }
4499
4500            /// Sets the value of [name][crate::model::aspect_type::metadata_template::EnumValue::name].
4501            ///
4502            /// # Example
4503            /// ```ignore,no_run
4504            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::EnumValue;
4505            /// let x = EnumValue::new().set_name("example");
4506            /// ```
4507            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4508                self.name = v.into();
4509                self
4510            }
4511
4512            /// Sets the value of [deprecated][crate::model::aspect_type::metadata_template::EnumValue::deprecated].
4513            ///
4514            /// # Example
4515            /// ```ignore,no_run
4516            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::EnumValue;
4517            /// let x = EnumValue::new().set_deprecated("example");
4518            /// ```
4519            pub fn set_deprecated<T: std::convert::Into<std::string::String>>(
4520                mut self,
4521                v: T,
4522            ) -> Self {
4523                self.deprecated = v.into();
4524                self
4525            }
4526        }
4527
4528        impl wkt::message::Message for EnumValue {
4529            fn typename() -> &'static str {
4530                "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue"
4531            }
4532        }
4533
4534        /// Definition of the constraints of a field.
4535        #[derive(Clone, Default, PartialEq)]
4536        #[non_exhaustive]
4537        pub struct Constraints {
4538            /// Optional. Marks this field as optional or required.
4539            pub required: bool,
4540
4541            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4542        }
4543
4544        impl Constraints {
4545            pub fn new() -> Self {
4546                std::default::Default::default()
4547            }
4548
4549            /// Sets the value of [required][crate::model::aspect_type::metadata_template::Constraints::required].
4550            ///
4551            /// # Example
4552            /// ```ignore,no_run
4553            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Constraints;
4554            /// let x = Constraints::new().set_required(true);
4555            /// ```
4556            pub fn set_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4557                self.required = v.into();
4558                self
4559            }
4560        }
4561
4562        impl wkt::message::Message for Constraints {
4563            fn typename() -> &'static str {
4564                "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints"
4565            }
4566        }
4567
4568        /// Definition of the annotations of a field.
4569        #[derive(Clone, Default, PartialEq)]
4570        #[non_exhaustive]
4571        pub struct Annotations {
4572            /// Optional. Marks a field as deprecated. You can include a deprecation
4573            /// message.
4574            pub deprecated: std::string::String,
4575
4576            /// Optional. Display name for a field.
4577            pub display_name: std::string::String,
4578
4579            /// Optional. Description for a field.
4580            pub description: std::string::String,
4581
4582            /// Optional. Display order for a field. You can use this to reorder where
4583            /// a field is rendered.
4584            pub display_order: i32,
4585
4586            /// Optional. You can use String Type annotations to specify special
4587            /// meaning to string fields. The following values are supported:
4588            ///
4589            /// * richText: The field must be interpreted as a rich text field.
4590            /// * url: A fully qualified URL link.
4591            /// * resource: A service qualified resource reference.
4592            pub string_type: std::string::String,
4593
4594            /// Optional. Suggested hints for string fields. You can use them to
4595            /// suggest values to users through console.
4596            pub string_values: std::vec::Vec<std::string::String>,
4597
4598            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4599        }
4600
4601        impl Annotations {
4602            pub fn new() -> Self {
4603                std::default::Default::default()
4604            }
4605
4606            /// Sets the value of [deprecated][crate::model::aspect_type::metadata_template::Annotations::deprecated].
4607            ///
4608            /// # Example
4609            /// ```ignore,no_run
4610            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4611            /// let x = Annotations::new().set_deprecated("example");
4612            /// ```
4613            pub fn set_deprecated<T: std::convert::Into<std::string::String>>(
4614                mut self,
4615                v: T,
4616            ) -> Self {
4617                self.deprecated = v.into();
4618                self
4619            }
4620
4621            /// Sets the value of [display_name][crate::model::aspect_type::metadata_template::Annotations::display_name].
4622            ///
4623            /// # Example
4624            /// ```ignore,no_run
4625            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4626            /// let x = Annotations::new().set_display_name("example");
4627            /// ```
4628            pub fn set_display_name<T: std::convert::Into<std::string::String>>(
4629                mut self,
4630                v: T,
4631            ) -> Self {
4632                self.display_name = v.into();
4633                self
4634            }
4635
4636            /// Sets the value of [description][crate::model::aspect_type::metadata_template::Annotations::description].
4637            ///
4638            /// # Example
4639            /// ```ignore,no_run
4640            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4641            /// let x = Annotations::new().set_description("example");
4642            /// ```
4643            pub fn set_description<T: std::convert::Into<std::string::String>>(
4644                mut self,
4645                v: T,
4646            ) -> Self {
4647                self.description = v.into();
4648                self
4649            }
4650
4651            /// Sets the value of [display_order][crate::model::aspect_type::metadata_template::Annotations::display_order].
4652            ///
4653            /// # Example
4654            /// ```ignore,no_run
4655            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4656            /// let x = Annotations::new().set_display_order(42);
4657            /// ```
4658            pub fn set_display_order<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4659                self.display_order = v.into();
4660                self
4661            }
4662
4663            /// Sets the value of [string_type][crate::model::aspect_type::metadata_template::Annotations::string_type].
4664            ///
4665            /// # Example
4666            /// ```ignore,no_run
4667            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4668            /// let x = Annotations::new().set_string_type("example");
4669            /// ```
4670            pub fn set_string_type<T: std::convert::Into<std::string::String>>(
4671                mut self,
4672                v: T,
4673            ) -> Self {
4674                self.string_type = v.into();
4675                self
4676            }
4677
4678            /// Sets the value of [string_values][crate::model::aspect_type::metadata_template::Annotations::string_values].
4679            ///
4680            /// # Example
4681            /// ```ignore,no_run
4682            /// # use google_cloud_dataplex_v1::model::aspect_type::metadata_template::Annotations;
4683            /// let x = Annotations::new().set_string_values(["a", "b", "c"]);
4684            /// ```
4685            pub fn set_string_values<T, V>(mut self, v: T) -> Self
4686            where
4687                T: std::iter::IntoIterator<Item = V>,
4688                V: std::convert::Into<std::string::String>,
4689            {
4690                use std::iter::Iterator;
4691                self.string_values = v.into_iter().map(|i| i.into()).collect();
4692                self
4693            }
4694        }
4695
4696        impl wkt::message::Message for Annotations {
4697            fn typename() -> &'static str {
4698                "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations"
4699            }
4700        }
4701    }
4702
4703    /// Classifies the data stored by the aspect.
4704    ///
4705    /// # Working with unknown values
4706    ///
4707    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4708    /// additional enum variants at any time. Adding new variants is not considered
4709    /// a breaking change. Applications should write their code in anticipation of:
4710    ///
4711    /// - New values appearing in future releases of the client library, **and**
4712    /// - New values received dynamically, without application changes.
4713    ///
4714    /// Please consult the [Working with enums] section in the user guide for some
4715    /// guidelines.
4716    ///
4717    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4718    #[derive(Clone, Debug, PartialEq)]
4719    #[non_exhaustive]
4720    pub enum DataClassification {
4721        /// Denotes that the aspect contains only metadata.
4722        Unspecified,
4723        /// Metadata and data classification.
4724        MetadataAndData,
4725        /// If set, the enum was initialized with an unknown value.
4726        ///
4727        /// Applications can examine the value using [DataClassification::value] or
4728        /// [DataClassification::name].
4729        UnknownValue(data_classification::UnknownValue),
4730    }
4731
4732    #[doc(hidden)]
4733    pub mod data_classification {
4734        #[allow(unused_imports)]
4735        use super::*;
4736        #[derive(Clone, Debug, PartialEq)]
4737        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4738    }
4739
4740    impl DataClassification {
4741        /// Gets the enum value.
4742        ///
4743        /// Returns `None` if the enum contains an unknown value deserialized from
4744        /// the string representation of enums.
4745        pub fn value(&self) -> std::option::Option<i32> {
4746            match self {
4747                Self::Unspecified => std::option::Option::Some(0),
4748                Self::MetadataAndData => std::option::Option::Some(1),
4749                Self::UnknownValue(u) => u.0.value(),
4750            }
4751        }
4752
4753        /// Gets the enum value as a string.
4754        ///
4755        /// Returns `None` if the enum contains an unknown value deserialized from
4756        /// the integer representation of enums.
4757        pub fn name(&self) -> std::option::Option<&str> {
4758            match self {
4759                Self::Unspecified => std::option::Option::Some("DATA_CLASSIFICATION_UNSPECIFIED"),
4760                Self::MetadataAndData => std::option::Option::Some("METADATA_AND_DATA"),
4761                Self::UnknownValue(u) => u.0.name(),
4762            }
4763        }
4764    }
4765
4766    impl std::default::Default for DataClassification {
4767        fn default() -> Self {
4768            use std::convert::From;
4769            Self::from(0)
4770        }
4771    }
4772
4773    impl std::fmt::Display for DataClassification {
4774        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4775            wkt::internal::display_enum(f, self.name(), self.value())
4776        }
4777    }
4778
4779    impl std::convert::From<i32> for DataClassification {
4780        fn from(value: i32) -> Self {
4781            match value {
4782                0 => Self::Unspecified,
4783                1 => Self::MetadataAndData,
4784                _ => Self::UnknownValue(data_classification::UnknownValue(
4785                    wkt::internal::UnknownEnumValue::Integer(value),
4786                )),
4787            }
4788        }
4789    }
4790
4791    impl std::convert::From<&str> for DataClassification {
4792        fn from(value: &str) -> Self {
4793            use std::string::ToString;
4794            match value {
4795                "DATA_CLASSIFICATION_UNSPECIFIED" => Self::Unspecified,
4796                "METADATA_AND_DATA" => Self::MetadataAndData,
4797                _ => Self::UnknownValue(data_classification::UnknownValue(
4798                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4799                )),
4800            }
4801        }
4802    }
4803
4804    impl serde::ser::Serialize for DataClassification {
4805        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4806        where
4807            S: serde::Serializer,
4808        {
4809            match self {
4810                Self::Unspecified => serializer.serialize_i32(0),
4811                Self::MetadataAndData => serializer.serialize_i32(1),
4812                Self::UnknownValue(u) => u.0.serialize(serializer),
4813            }
4814        }
4815    }
4816
4817    impl<'de> serde::de::Deserialize<'de> for DataClassification {
4818        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4819        where
4820            D: serde::Deserializer<'de>,
4821        {
4822            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataClassification>::new(
4823                ".google.cloud.dataplex.v1.AspectType.DataClassification",
4824            ))
4825        }
4826    }
4827}
4828
4829/// An Entry Group represents a logical grouping of one or more Entries.
4830#[derive(Clone, Default, PartialEq)]
4831#[non_exhaustive]
4832pub struct EntryGroup {
4833    /// Output only. The relative resource name of the EntryGroup, in the format
4834    /// projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}.
4835    pub name: std::string::String,
4836
4837    /// Output only. System generated globally unique ID for the EntryGroup. If you
4838    /// delete and recreate the EntryGroup with the same name, this ID will be
4839    /// different.
4840    pub uid: std::string::String,
4841
4842    /// Output only. The time when the EntryGroup was created.
4843    pub create_time: std::option::Option<wkt::Timestamp>,
4844
4845    /// Output only. The time when the EntryGroup was last updated.
4846    pub update_time: std::option::Option<wkt::Timestamp>,
4847
4848    /// Optional. Description of the EntryGroup.
4849    pub description: std::string::String,
4850
4851    /// Optional. User friendly display name.
4852    pub display_name: std::string::String,
4853
4854    /// Optional. User-defined labels for the EntryGroup.
4855    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4856
4857    /// This checksum is computed by the service, and might be sent on update and
4858    /// delete requests to ensure the client has an up-to-date value before
4859    /// proceeding.
4860    pub etag: std::string::String,
4861
4862    /// Output only. Denotes the transfer status of the Entry Group. It is
4863    /// unspecified for Entry Group created from Dataplex API.
4864    pub transfer_status: crate::model::TransferStatus,
4865
4866    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4867}
4868
4869impl EntryGroup {
4870    pub fn new() -> Self {
4871        std::default::Default::default()
4872    }
4873
4874    /// Sets the value of [name][crate::model::EntryGroup::name].
4875    ///
4876    /// # Example
4877    /// ```ignore,no_run
4878    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4879    /// let x = EntryGroup::new().set_name("example");
4880    /// ```
4881    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4882        self.name = v.into();
4883        self
4884    }
4885
4886    /// Sets the value of [uid][crate::model::EntryGroup::uid].
4887    ///
4888    /// # Example
4889    /// ```ignore,no_run
4890    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4891    /// let x = EntryGroup::new().set_uid("example");
4892    /// ```
4893    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4894        self.uid = v.into();
4895        self
4896    }
4897
4898    /// Sets the value of [create_time][crate::model::EntryGroup::create_time].
4899    ///
4900    /// # Example
4901    /// ```ignore,no_run
4902    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4903    /// use wkt::Timestamp;
4904    /// let x = EntryGroup::new().set_create_time(Timestamp::default()/* use setters */);
4905    /// ```
4906    pub fn set_create_time<T>(mut self, v: T) -> Self
4907    where
4908        T: std::convert::Into<wkt::Timestamp>,
4909    {
4910        self.create_time = std::option::Option::Some(v.into());
4911        self
4912    }
4913
4914    /// Sets or clears the value of [create_time][crate::model::EntryGroup::create_time].
4915    ///
4916    /// # Example
4917    /// ```ignore,no_run
4918    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4919    /// use wkt::Timestamp;
4920    /// let x = EntryGroup::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
4921    /// let x = EntryGroup::new().set_or_clear_create_time(None::<Timestamp>);
4922    /// ```
4923    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4924    where
4925        T: std::convert::Into<wkt::Timestamp>,
4926    {
4927        self.create_time = v.map(|x| x.into());
4928        self
4929    }
4930
4931    /// Sets the value of [update_time][crate::model::EntryGroup::update_time].
4932    ///
4933    /// # Example
4934    /// ```ignore,no_run
4935    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4936    /// use wkt::Timestamp;
4937    /// let x = EntryGroup::new().set_update_time(Timestamp::default()/* use setters */);
4938    /// ```
4939    pub fn set_update_time<T>(mut self, v: T) -> Self
4940    where
4941        T: std::convert::Into<wkt::Timestamp>,
4942    {
4943        self.update_time = std::option::Option::Some(v.into());
4944        self
4945    }
4946
4947    /// Sets or clears the value of [update_time][crate::model::EntryGroup::update_time].
4948    ///
4949    /// # Example
4950    /// ```ignore,no_run
4951    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4952    /// use wkt::Timestamp;
4953    /// let x = EntryGroup::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
4954    /// let x = EntryGroup::new().set_or_clear_update_time(None::<Timestamp>);
4955    /// ```
4956    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4957    where
4958        T: std::convert::Into<wkt::Timestamp>,
4959    {
4960        self.update_time = v.map(|x| x.into());
4961        self
4962    }
4963
4964    /// Sets the value of [description][crate::model::EntryGroup::description].
4965    ///
4966    /// # Example
4967    /// ```ignore,no_run
4968    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4969    /// let x = EntryGroup::new().set_description("example");
4970    /// ```
4971    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4972        self.description = v.into();
4973        self
4974    }
4975
4976    /// Sets the value of [display_name][crate::model::EntryGroup::display_name].
4977    ///
4978    /// # Example
4979    /// ```ignore,no_run
4980    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4981    /// let x = EntryGroup::new().set_display_name("example");
4982    /// ```
4983    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4984        self.display_name = v.into();
4985        self
4986    }
4987
4988    /// Sets the value of [labels][crate::model::EntryGroup::labels].
4989    ///
4990    /// # Example
4991    /// ```ignore,no_run
4992    /// # use google_cloud_dataplex_v1::model::EntryGroup;
4993    /// let x = EntryGroup::new().set_labels([
4994    ///     ("key0", "abc"),
4995    ///     ("key1", "xyz"),
4996    /// ]);
4997    /// ```
4998    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4999    where
5000        T: std::iter::IntoIterator<Item = (K, V)>,
5001        K: std::convert::Into<std::string::String>,
5002        V: std::convert::Into<std::string::String>,
5003    {
5004        use std::iter::Iterator;
5005        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5006        self
5007    }
5008
5009    /// Sets the value of [etag][crate::model::EntryGroup::etag].
5010    ///
5011    /// # Example
5012    /// ```ignore,no_run
5013    /// # use google_cloud_dataplex_v1::model::EntryGroup;
5014    /// let x = EntryGroup::new().set_etag("example");
5015    /// ```
5016    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5017        self.etag = v.into();
5018        self
5019    }
5020
5021    /// Sets the value of [transfer_status][crate::model::EntryGroup::transfer_status].
5022    ///
5023    /// # Example
5024    /// ```ignore,no_run
5025    /// # use google_cloud_dataplex_v1::model::EntryGroup;
5026    /// use google_cloud_dataplex_v1::model::TransferStatus;
5027    /// let x0 = EntryGroup::new().set_transfer_status(TransferStatus::Migrated);
5028    /// let x1 = EntryGroup::new().set_transfer_status(TransferStatus::Transferred);
5029    /// ```
5030    pub fn set_transfer_status<T: std::convert::Into<crate::model::TransferStatus>>(
5031        mut self,
5032        v: T,
5033    ) -> Self {
5034        self.transfer_status = v.into();
5035        self
5036    }
5037}
5038
5039impl wkt::message::Message for EntryGroup {
5040    fn typename() -> &'static str {
5041        "type.googleapis.com/google.cloud.dataplex.v1.EntryGroup"
5042    }
5043}
5044
5045/// Entry Type is a template for creating Entries.
5046#[derive(Clone, Default, PartialEq)]
5047#[non_exhaustive]
5048pub struct EntryType {
5049    /// Output only. The relative resource name of the EntryType, of the form:
5050    /// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}.
5051    pub name: std::string::String,
5052
5053    /// Output only. System generated globally unique ID for the EntryType. This ID
5054    /// will be different if the EntryType is deleted and re-created with the same
5055    /// name.
5056    pub uid: std::string::String,
5057
5058    /// Output only. The time when the EntryType was created.
5059    pub create_time: std::option::Option<wkt::Timestamp>,
5060
5061    /// Output only. The time when the EntryType was last updated.
5062    pub update_time: std::option::Option<wkt::Timestamp>,
5063
5064    /// Optional. Description of the EntryType.
5065    pub description: std::string::String,
5066
5067    /// Optional. User friendly display name.
5068    pub display_name: std::string::String,
5069
5070    /// Optional. User-defined labels for the EntryType.
5071    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5072
5073    /// Optional. This checksum is computed by the service, and might be sent on
5074    /// update and delete requests to ensure the client has an up-to-date value
5075    /// before proceeding.
5076    pub etag: std::string::String,
5077
5078    /// Optional. Indicates the classes this Entry Type belongs to, for example,
5079    /// TABLE, DATABASE, MODEL.
5080    pub type_aliases: std::vec::Vec<std::string::String>,
5081
5082    /// Optional. The platform that Entries of this type belongs to.
5083    pub platform: std::string::String,
5084
5085    /// Optional. The system that Entries of this type belongs to. Examples include
5086    /// CloudSQL, MariaDB etc
5087    pub system: std::string::String,
5088
5089    /// AspectInfo for the entry type.
5090    pub required_aspects: std::vec::Vec<crate::model::entry_type::AspectInfo>,
5091
5092    /// Immutable. Authorization defined for this type.
5093    pub authorization: std::option::Option<crate::model::entry_type::Authorization>,
5094
5095    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5096}
5097
5098impl EntryType {
5099    pub fn new() -> Self {
5100        std::default::Default::default()
5101    }
5102
5103    /// Sets the value of [name][crate::model::EntryType::name].
5104    ///
5105    /// # Example
5106    /// ```ignore,no_run
5107    /// # use google_cloud_dataplex_v1::model::EntryType;
5108    /// let x = EntryType::new().set_name("example");
5109    /// ```
5110    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5111        self.name = v.into();
5112        self
5113    }
5114
5115    /// Sets the value of [uid][crate::model::EntryType::uid].
5116    ///
5117    /// # Example
5118    /// ```ignore,no_run
5119    /// # use google_cloud_dataplex_v1::model::EntryType;
5120    /// let x = EntryType::new().set_uid("example");
5121    /// ```
5122    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5123        self.uid = v.into();
5124        self
5125    }
5126
5127    /// Sets the value of [create_time][crate::model::EntryType::create_time].
5128    ///
5129    /// # Example
5130    /// ```ignore,no_run
5131    /// # use google_cloud_dataplex_v1::model::EntryType;
5132    /// use wkt::Timestamp;
5133    /// let x = EntryType::new().set_create_time(Timestamp::default()/* use setters */);
5134    /// ```
5135    pub fn set_create_time<T>(mut self, v: T) -> Self
5136    where
5137        T: std::convert::Into<wkt::Timestamp>,
5138    {
5139        self.create_time = std::option::Option::Some(v.into());
5140        self
5141    }
5142
5143    /// Sets or clears the value of [create_time][crate::model::EntryType::create_time].
5144    ///
5145    /// # Example
5146    /// ```ignore,no_run
5147    /// # use google_cloud_dataplex_v1::model::EntryType;
5148    /// use wkt::Timestamp;
5149    /// let x = EntryType::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
5150    /// let x = EntryType::new().set_or_clear_create_time(None::<Timestamp>);
5151    /// ```
5152    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5153    where
5154        T: std::convert::Into<wkt::Timestamp>,
5155    {
5156        self.create_time = v.map(|x| x.into());
5157        self
5158    }
5159
5160    /// Sets the value of [update_time][crate::model::EntryType::update_time].
5161    ///
5162    /// # Example
5163    /// ```ignore,no_run
5164    /// # use google_cloud_dataplex_v1::model::EntryType;
5165    /// use wkt::Timestamp;
5166    /// let x = EntryType::new().set_update_time(Timestamp::default()/* use setters */);
5167    /// ```
5168    pub fn set_update_time<T>(mut self, v: T) -> Self
5169    where
5170        T: std::convert::Into<wkt::Timestamp>,
5171    {
5172        self.update_time = std::option::Option::Some(v.into());
5173        self
5174    }
5175
5176    /// Sets or clears the value of [update_time][crate::model::EntryType::update_time].
5177    ///
5178    /// # Example
5179    /// ```ignore,no_run
5180    /// # use google_cloud_dataplex_v1::model::EntryType;
5181    /// use wkt::Timestamp;
5182    /// let x = EntryType::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
5183    /// let x = EntryType::new().set_or_clear_update_time(None::<Timestamp>);
5184    /// ```
5185    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5186    where
5187        T: std::convert::Into<wkt::Timestamp>,
5188    {
5189        self.update_time = v.map(|x| x.into());
5190        self
5191    }
5192
5193    /// Sets the value of [description][crate::model::EntryType::description].
5194    ///
5195    /// # Example
5196    /// ```ignore,no_run
5197    /// # use google_cloud_dataplex_v1::model::EntryType;
5198    /// let x = EntryType::new().set_description("example");
5199    /// ```
5200    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5201        self.description = v.into();
5202        self
5203    }
5204
5205    /// Sets the value of [display_name][crate::model::EntryType::display_name].
5206    ///
5207    /// # Example
5208    /// ```ignore,no_run
5209    /// # use google_cloud_dataplex_v1::model::EntryType;
5210    /// let x = EntryType::new().set_display_name("example");
5211    /// ```
5212    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5213        self.display_name = v.into();
5214        self
5215    }
5216
5217    /// Sets the value of [labels][crate::model::EntryType::labels].
5218    ///
5219    /// # Example
5220    /// ```ignore,no_run
5221    /// # use google_cloud_dataplex_v1::model::EntryType;
5222    /// let x = EntryType::new().set_labels([
5223    ///     ("key0", "abc"),
5224    ///     ("key1", "xyz"),
5225    /// ]);
5226    /// ```
5227    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5228    where
5229        T: std::iter::IntoIterator<Item = (K, V)>,
5230        K: std::convert::Into<std::string::String>,
5231        V: std::convert::Into<std::string::String>,
5232    {
5233        use std::iter::Iterator;
5234        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5235        self
5236    }
5237
5238    /// Sets the value of [etag][crate::model::EntryType::etag].
5239    ///
5240    /// # Example
5241    /// ```ignore,no_run
5242    /// # use google_cloud_dataplex_v1::model::EntryType;
5243    /// let x = EntryType::new().set_etag("example");
5244    /// ```
5245    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5246        self.etag = v.into();
5247        self
5248    }
5249
5250    /// Sets the value of [type_aliases][crate::model::EntryType::type_aliases].
5251    ///
5252    /// # Example
5253    /// ```ignore,no_run
5254    /// # use google_cloud_dataplex_v1::model::EntryType;
5255    /// let x = EntryType::new().set_type_aliases(["a", "b", "c"]);
5256    /// ```
5257    pub fn set_type_aliases<T, V>(mut self, v: T) -> Self
5258    where
5259        T: std::iter::IntoIterator<Item = V>,
5260        V: std::convert::Into<std::string::String>,
5261    {
5262        use std::iter::Iterator;
5263        self.type_aliases = v.into_iter().map(|i| i.into()).collect();
5264        self
5265    }
5266
5267    /// Sets the value of [platform][crate::model::EntryType::platform].
5268    ///
5269    /// # Example
5270    /// ```ignore,no_run
5271    /// # use google_cloud_dataplex_v1::model::EntryType;
5272    /// let x = EntryType::new().set_platform("example");
5273    /// ```
5274    pub fn set_platform<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5275        self.platform = v.into();
5276        self
5277    }
5278
5279    /// Sets the value of [system][crate::model::EntryType::system].
5280    ///
5281    /// # Example
5282    /// ```ignore,no_run
5283    /// # use google_cloud_dataplex_v1::model::EntryType;
5284    /// let x = EntryType::new().set_system("example");
5285    /// ```
5286    pub fn set_system<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5287        self.system = v.into();
5288        self
5289    }
5290
5291    /// Sets the value of [required_aspects][crate::model::EntryType::required_aspects].
5292    ///
5293    /// # Example
5294    /// ```ignore,no_run
5295    /// # use google_cloud_dataplex_v1::model::EntryType;
5296    /// use google_cloud_dataplex_v1::model::entry_type::AspectInfo;
5297    /// let x = EntryType::new()
5298    ///     .set_required_aspects([
5299    ///         AspectInfo::default()/* use setters */,
5300    ///         AspectInfo::default()/* use (different) setters */,
5301    ///     ]);
5302    /// ```
5303    pub fn set_required_aspects<T, V>(mut self, v: T) -> Self
5304    where
5305        T: std::iter::IntoIterator<Item = V>,
5306        V: std::convert::Into<crate::model::entry_type::AspectInfo>,
5307    {
5308        use std::iter::Iterator;
5309        self.required_aspects = v.into_iter().map(|i| i.into()).collect();
5310        self
5311    }
5312
5313    /// Sets the value of [authorization][crate::model::EntryType::authorization].
5314    ///
5315    /// # Example
5316    /// ```ignore,no_run
5317    /// # use google_cloud_dataplex_v1::model::EntryType;
5318    /// use google_cloud_dataplex_v1::model::entry_type::Authorization;
5319    /// let x = EntryType::new().set_authorization(Authorization::default()/* use setters */);
5320    /// ```
5321    pub fn set_authorization<T>(mut self, v: T) -> Self
5322    where
5323        T: std::convert::Into<crate::model::entry_type::Authorization>,
5324    {
5325        self.authorization = std::option::Option::Some(v.into());
5326        self
5327    }
5328
5329    /// Sets or clears the value of [authorization][crate::model::EntryType::authorization].
5330    ///
5331    /// # Example
5332    /// ```ignore,no_run
5333    /// # use google_cloud_dataplex_v1::model::EntryType;
5334    /// use google_cloud_dataplex_v1::model::entry_type::Authorization;
5335    /// let x = EntryType::new().set_or_clear_authorization(Some(Authorization::default()/* use setters */));
5336    /// let x = EntryType::new().set_or_clear_authorization(None::<Authorization>);
5337    /// ```
5338    pub fn set_or_clear_authorization<T>(mut self, v: std::option::Option<T>) -> Self
5339    where
5340        T: std::convert::Into<crate::model::entry_type::Authorization>,
5341    {
5342        self.authorization = v.map(|x| x.into());
5343        self
5344    }
5345}
5346
5347impl wkt::message::Message for EntryType {
5348    fn typename() -> &'static str {
5349        "type.googleapis.com/google.cloud.dataplex.v1.EntryType"
5350    }
5351}
5352
5353/// Defines additional types related to [EntryType].
5354pub mod entry_type {
5355    #[allow(unused_imports)]
5356    use super::*;
5357
5358    #[derive(Clone, Default, PartialEq)]
5359    #[non_exhaustive]
5360    pub struct AspectInfo {
5361        /// Required aspect type for the entry type.
5362        pub r#type: std::string::String,
5363
5364        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5365    }
5366
5367    impl AspectInfo {
5368        pub fn new() -> Self {
5369            std::default::Default::default()
5370        }
5371
5372        /// Sets the value of [r#type][crate::model::entry_type::AspectInfo::type].
5373        ///
5374        /// # Example
5375        /// ```ignore,no_run
5376        /// # use google_cloud_dataplex_v1::model::entry_type::AspectInfo;
5377        /// let x = AspectInfo::new().set_type("example");
5378        /// ```
5379        pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5380            self.r#type = v.into();
5381            self
5382        }
5383    }
5384
5385    impl wkt::message::Message for AspectInfo {
5386        fn typename() -> &'static str {
5387            "type.googleapis.com/google.cloud.dataplex.v1.EntryType.AspectInfo"
5388        }
5389    }
5390
5391    /// Authorization for an Entry Type.
5392    #[derive(Clone, Default, PartialEq)]
5393    #[non_exhaustive]
5394    pub struct Authorization {
5395        /// Immutable. The IAM permission grantable on the Entry Group to allow
5396        /// access to instantiate Entries of Dataplex Universal Catalog owned Entry
5397        /// Types, only settable for Dataplex Universal Catalog owned Types.
5398        pub alternate_use_permission: std::string::String,
5399
5400        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5401    }
5402
5403    impl Authorization {
5404        pub fn new() -> Self {
5405            std::default::Default::default()
5406        }
5407
5408        /// Sets the value of [alternate_use_permission][crate::model::entry_type::Authorization::alternate_use_permission].
5409        ///
5410        /// # Example
5411        /// ```ignore,no_run
5412        /// # use google_cloud_dataplex_v1::model::entry_type::Authorization;
5413        /// let x = Authorization::new().set_alternate_use_permission("example");
5414        /// ```
5415        pub fn set_alternate_use_permission<T: std::convert::Into<std::string::String>>(
5416            mut self,
5417            v: T,
5418        ) -> Self {
5419            self.alternate_use_permission = v.into();
5420            self
5421        }
5422    }
5423
5424    impl wkt::message::Message for Authorization {
5425        fn typename() -> &'static str {
5426            "type.googleapis.com/google.cloud.dataplex.v1.EntryType.Authorization"
5427        }
5428    }
5429}
5430
5431/// An aspect is a single piece of metadata describing an entry.
5432#[derive(Clone, Default, PartialEq)]
5433#[non_exhaustive]
5434pub struct Aspect {
5435    /// Output only. The resource name of the type used to create this Aspect.
5436    pub aspect_type: std::string::String,
5437
5438    /// Output only. The path in the entry under which the aspect is attached.
5439    pub path: std::string::String,
5440
5441    /// Output only. The time when the Aspect was created.
5442    pub create_time: std::option::Option<wkt::Timestamp>,
5443
5444    /// Output only. The time when the Aspect was last updated.
5445    pub update_time: std::option::Option<wkt::Timestamp>,
5446
5447    /// Required. The content of the aspect, according to its aspect type schema.
5448    /// The maximum size of the field is 120KB (encoded as UTF-8).
5449    pub data: std::option::Option<wkt::Struct>,
5450
5451    /// Optional. Information related to the source system of the aspect.
5452    pub aspect_source: std::option::Option<crate::model::AspectSource>,
5453
5454    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5455}
5456
5457impl Aspect {
5458    pub fn new() -> Self {
5459        std::default::Default::default()
5460    }
5461
5462    /// Sets the value of [aspect_type][crate::model::Aspect::aspect_type].
5463    ///
5464    /// # Example
5465    /// ```ignore,no_run
5466    /// # use google_cloud_dataplex_v1::model::Aspect;
5467    /// let x = Aspect::new().set_aspect_type("example");
5468    /// ```
5469    pub fn set_aspect_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5470        self.aspect_type = v.into();
5471        self
5472    }
5473
5474    /// Sets the value of [path][crate::model::Aspect::path].
5475    ///
5476    /// # Example
5477    /// ```ignore,no_run
5478    /// # use google_cloud_dataplex_v1::model::Aspect;
5479    /// let x = Aspect::new().set_path("example");
5480    /// ```
5481    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5482        self.path = v.into();
5483        self
5484    }
5485
5486    /// Sets the value of [create_time][crate::model::Aspect::create_time].
5487    ///
5488    /// # Example
5489    /// ```ignore,no_run
5490    /// # use google_cloud_dataplex_v1::model::Aspect;
5491    /// use wkt::Timestamp;
5492    /// let x = Aspect::new().set_create_time(Timestamp::default()/* use setters */);
5493    /// ```
5494    pub fn set_create_time<T>(mut self, v: T) -> Self
5495    where
5496        T: std::convert::Into<wkt::Timestamp>,
5497    {
5498        self.create_time = std::option::Option::Some(v.into());
5499        self
5500    }
5501
5502    /// Sets or clears the value of [create_time][crate::model::Aspect::create_time].
5503    ///
5504    /// # Example
5505    /// ```ignore,no_run
5506    /// # use google_cloud_dataplex_v1::model::Aspect;
5507    /// use wkt::Timestamp;
5508    /// let x = Aspect::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
5509    /// let x = Aspect::new().set_or_clear_create_time(None::<Timestamp>);
5510    /// ```
5511    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5512    where
5513        T: std::convert::Into<wkt::Timestamp>,
5514    {
5515        self.create_time = v.map(|x| x.into());
5516        self
5517    }
5518
5519    /// Sets the value of [update_time][crate::model::Aspect::update_time].
5520    ///
5521    /// # Example
5522    /// ```ignore,no_run
5523    /// # use google_cloud_dataplex_v1::model::Aspect;
5524    /// use wkt::Timestamp;
5525    /// let x = Aspect::new().set_update_time(Timestamp::default()/* use setters */);
5526    /// ```
5527    pub fn set_update_time<T>(mut self, v: T) -> Self
5528    where
5529        T: std::convert::Into<wkt::Timestamp>,
5530    {
5531        self.update_time = std::option::Option::Some(v.into());
5532        self
5533    }
5534
5535    /// Sets or clears the value of [update_time][crate::model::Aspect::update_time].
5536    ///
5537    /// # Example
5538    /// ```ignore,no_run
5539    /// # use google_cloud_dataplex_v1::model::Aspect;
5540    /// use wkt::Timestamp;
5541    /// let x = Aspect::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
5542    /// let x = Aspect::new().set_or_clear_update_time(None::<Timestamp>);
5543    /// ```
5544    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5545    where
5546        T: std::convert::Into<wkt::Timestamp>,
5547    {
5548        self.update_time = v.map(|x| x.into());
5549        self
5550    }
5551
5552    /// Sets the value of [data][crate::model::Aspect::data].
5553    ///
5554    /// # Example
5555    /// ```ignore,no_run
5556    /// # use google_cloud_dataplex_v1::model::Aspect;
5557    /// use wkt::Struct;
5558    /// let x = Aspect::new().set_data(Struct::default()/* use setters */);
5559    /// ```
5560    pub fn set_data<T>(mut self, v: T) -> Self
5561    where
5562        T: std::convert::Into<wkt::Struct>,
5563    {
5564        self.data = std::option::Option::Some(v.into());
5565        self
5566    }
5567
5568    /// Sets or clears the value of [data][crate::model::Aspect::data].
5569    ///
5570    /// # Example
5571    /// ```ignore,no_run
5572    /// # use google_cloud_dataplex_v1::model::Aspect;
5573    /// use wkt::Struct;
5574    /// let x = Aspect::new().set_or_clear_data(Some(Struct::default()/* use setters */));
5575    /// let x = Aspect::new().set_or_clear_data(None::<Struct>);
5576    /// ```
5577    pub fn set_or_clear_data<T>(mut self, v: std::option::Option<T>) -> Self
5578    where
5579        T: std::convert::Into<wkt::Struct>,
5580    {
5581        self.data = v.map(|x| x.into());
5582        self
5583    }
5584
5585    /// Sets the value of [aspect_source][crate::model::Aspect::aspect_source].
5586    ///
5587    /// # Example
5588    /// ```ignore,no_run
5589    /// # use google_cloud_dataplex_v1::model::Aspect;
5590    /// use google_cloud_dataplex_v1::model::AspectSource;
5591    /// let x = Aspect::new().set_aspect_source(AspectSource::default()/* use setters */);
5592    /// ```
5593    pub fn set_aspect_source<T>(mut self, v: T) -> Self
5594    where
5595        T: std::convert::Into<crate::model::AspectSource>,
5596    {
5597        self.aspect_source = std::option::Option::Some(v.into());
5598        self
5599    }
5600
5601    /// Sets or clears the value of [aspect_source][crate::model::Aspect::aspect_source].
5602    ///
5603    /// # Example
5604    /// ```ignore,no_run
5605    /// # use google_cloud_dataplex_v1::model::Aspect;
5606    /// use google_cloud_dataplex_v1::model::AspectSource;
5607    /// let x = Aspect::new().set_or_clear_aspect_source(Some(AspectSource::default()/* use setters */));
5608    /// let x = Aspect::new().set_or_clear_aspect_source(None::<AspectSource>);
5609    /// ```
5610    pub fn set_or_clear_aspect_source<T>(mut self, v: std::option::Option<T>) -> Self
5611    where
5612        T: std::convert::Into<crate::model::AspectSource>,
5613    {
5614        self.aspect_source = v.map(|x| x.into());
5615        self
5616    }
5617}
5618
5619impl wkt::message::Message for Aspect {
5620    fn typename() -> &'static str {
5621        "type.googleapis.com/google.cloud.dataplex.v1.Aspect"
5622    }
5623}
5624
5625/// Information related to the source system of the aspect.
5626#[derive(Clone, Default, PartialEq)]
5627#[non_exhaustive]
5628pub struct AspectSource {
5629    /// The time the aspect was created in the source system.
5630    pub create_time: std::option::Option<wkt::Timestamp>,
5631
5632    /// The time the aspect was last updated in the source system.
5633    pub update_time: std::option::Option<wkt::Timestamp>,
5634
5635    /// The version of the data format used to produce this data. This field is
5636    /// used to indicated when the underlying data format changes (e.g., schema
5637    /// modifications, changes to the source URL format definition, etc).
5638    pub data_version: std::string::String,
5639
5640    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5641}
5642
5643impl AspectSource {
5644    pub fn new() -> Self {
5645        std::default::Default::default()
5646    }
5647
5648    /// Sets the value of [create_time][crate::model::AspectSource::create_time].
5649    ///
5650    /// # Example
5651    /// ```ignore,no_run
5652    /// # use google_cloud_dataplex_v1::model::AspectSource;
5653    /// use wkt::Timestamp;
5654    /// let x = AspectSource::new().set_create_time(Timestamp::default()/* use setters */);
5655    /// ```
5656    pub fn set_create_time<T>(mut self, v: T) -> Self
5657    where
5658        T: std::convert::Into<wkt::Timestamp>,
5659    {
5660        self.create_time = std::option::Option::Some(v.into());
5661        self
5662    }
5663
5664    /// Sets or clears the value of [create_time][crate::model::AspectSource::create_time].
5665    ///
5666    /// # Example
5667    /// ```ignore,no_run
5668    /// # use google_cloud_dataplex_v1::model::AspectSource;
5669    /// use wkt::Timestamp;
5670    /// let x = AspectSource::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
5671    /// let x = AspectSource::new().set_or_clear_create_time(None::<Timestamp>);
5672    /// ```
5673    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5674    where
5675        T: std::convert::Into<wkt::Timestamp>,
5676    {
5677        self.create_time = v.map(|x| x.into());
5678        self
5679    }
5680
5681    /// Sets the value of [update_time][crate::model::AspectSource::update_time].
5682    ///
5683    /// # Example
5684    /// ```ignore,no_run
5685    /// # use google_cloud_dataplex_v1::model::AspectSource;
5686    /// use wkt::Timestamp;
5687    /// let x = AspectSource::new().set_update_time(Timestamp::default()/* use setters */);
5688    /// ```
5689    pub fn set_update_time<T>(mut self, v: T) -> Self
5690    where
5691        T: std::convert::Into<wkt::Timestamp>,
5692    {
5693        self.update_time = std::option::Option::Some(v.into());
5694        self
5695    }
5696
5697    /// Sets or clears the value of [update_time][crate::model::AspectSource::update_time].
5698    ///
5699    /// # Example
5700    /// ```ignore,no_run
5701    /// # use google_cloud_dataplex_v1::model::AspectSource;
5702    /// use wkt::Timestamp;
5703    /// let x = AspectSource::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
5704    /// let x = AspectSource::new().set_or_clear_update_time(None::<Timestamp>);
5705    /// ```
5706    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5707    where
5708        T: std::convert::Into<wkt::Timestamp>,
5709    {
5710        self.update_time = v.map(|x| x.into());
5711        self
5712    }
5713
5714    /// Sets the value of [data_version][crate::model::AspectSource::data_version].
5715    ///
5716    /// # Example
5717    /// ```ignore,no_run
5718    /// # use google_cloud_dataplex_v1::model::AspectSource;
5719    /// let x = AspectSource::new().set_data_version("example");
5720    /// ```
5721    pub fn set_data_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5722        self.data_version = v.into();
5723        self
5724    }
5725}
5726
5727impl wkt::message::Message for AspectSource {
5728    fn typename() -> &'static str {
5729        "type.googleapis.com/google.cloud.dataplex.v1.AspectSource"
5730    }
5731}
5732
5733/// An entry is a representation of a data resource that can be described by
5734/// various metadata.
5735#[derive(Clone, Default, PartialEq)]
5736#[non_exhaustive]
5737pub struct Entry {
5738    /// Identifier. The relative resource name of the entry, in the format
5739    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`.
5740    pub name: std::string::String,
5741
5742    /// Required. Immutable. The relative resource name of the entry type that was
5743    /// used to create this entry, in the format
5744    /// `projects/{project_id_or_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
5745    pub entry_type: std::string::String,
5746
5747    /// Output only. The time when the entry was created in Dataplex Universal
5748    /// Catalog.
5749    pub create_time: std::option::Option<wkt::Timestamp>,
5750
5751    /// Output only. The time when the entry was last updated in Dataplex Universal
5752    /// Catalog.
5753    pub update_time: std::option::Option<wkt::Timestamp>,
5754
5755    /// Optional. The aspects that are attached to the entry. Depending on how the
5756    /// aspect is attached to the entry, the format of the aspect key can be one of
5757    /// the following:
5758    ///
5759    /// * If the aspect is attached directly to the entry:
5760    ///   `{project_id_or_number}.{location_id}.{aspect_type_id}`
5761    /// * If the aspect is attached to an entry's path:
5762    ///   `{project_id_or_number}.{location_id}.{aspect_type_id}@{path}`
5763    pub aspects: std::collections::HashMap<std::string::String, crate::model::Aspect>,
5764
5765    /// Optional. Immutable. The resource name of the parent entry, in the format
5766    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`.
5767    pub parent_entry: std::string::String,
5768
5769    /// Optional. A name for the entry that can be referenced by an external
5770    /// system. For more information, see [Fully qualified
5771    /// names](https://cloud.google.com/data-catalog/docs/fully-qualified-names).
5772    /// The maximum size of the field is 4000 characters.
5773    pub fully_qualified_name: std::string::String,
5774
5775    /// Optional. Information related to the source system of the data resource
5776    /// that is represented by the entry.
5777    pub entry_source: std::option::Option<crate::model::EntrySource>,
5778
5779    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5780}
5781
5782impl Entry {
5783    pub fn new() -> Self {
5784        std::default::Default::default()
5785    }
5786
5787    /// Sets the value of [name][crate::model::Entry::name].
5788    ///
5789    /// # Example
5790    /// ```ignore,no_run
5791    /// # use google_cloud_dataplex_v1::model::Entry;
5792    /// let x = Entry::new().set_name("example");
5793    /// ```
5794    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5795        self.name = v.into();
5796        self
5797    }
5798
5799    /// Sets the value of [entry_type][crate::model::Entry::entry_type].
5800    ///
5801    /// # Example
5802    /// ```ignore,no_run
5803    /// # use google_cloud_dataplex_v1::model::Entry;
5804    /// let x = Entry::new().set_entry_type("example");
5805    /// ```
5806    pub fn set_entry_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5807        self.entry_type = v.into();
5808        self
5809    }
5810
5811    /// Sets the value of [create_time][crate::model::Entry::create_time].
5812    ///
5813    /// # Example
5814    /// ```ignore,no_run
5815    /// # use google_cloud_dataplex_v1::model::Entry;
5816    /// use wkt::Timestamp;
5817    /// let x = Entry::new().set_create_time(Timestamp::default()/* use setters */);
5818    /// ```
5819    pub fn set_create_time<T>(mut self, v: T) -> Self
5820    where
5821        T: std::convert::Into<wkt::Timestamp>,
5822    {
5823        self.create_time = std::option::Option::Some(v.into());
5824        self
5825    }
5826
5827    /// Sets or clears the value of [create_time][crate::model::Entry::create_time].
5828    ///
5829    /// # Example
5830    /// ```ignore,no_run
5831    /// # use google_cloud_dataplex_v1::model::Entry;
5832    /// use wkt::Timestamp;
5833    /// let x = Entry::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
5834    /// let x = Entry::new().set_or_clear_create_time(None::<Timestamp>);
5835    /// ```
5836    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5837    where
5838        T: std::convert::Into<wkt::Timestamp>,
5839    {
5840        self.create_time = v.map(|x| x.into());
5841        self
5842    }
5843
5844    /// Sets the value of [update_time][crate::model::Entry::update_time].
5845    ///
5846    /// # Example
5847    /// ```ignore,no_run
5848    /// # use google_cloud_dataplex_v1::model::Entry;
5849    /// use wkt::Timestamp;
5850    /// let x = Entry::new().set_update_time(Timestamp::default()/* use setters */);
5851    /// ```
5852    pub fn set_update_time<T>(mut self, v: T) -> Self
5853    where
5854        T: std::convert::Into<wkt::Timestamp>,
5855    {
5856        self.update_time = std::option::Option::Some(v.into());
5857        self
5858    }
5859
5860    /// Sets or clears the value of [update_time][crate::model::Entry::update_time].
5861    ///
5862    /// # Example
5863    /// ```ignore,no_run
5864    /// # use google_cloud_dataplex_v1::model::Entry;
5865    /// use wkt::Timestamp;
5866    /// let x = Entry::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
5867    /// let x = Entry::new().set_or_clear_update_time(None::<Timestamp>);
5868    /// ```
5869    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5870    where
5871        T: std::convert::Into<wkt::Timestamp>,
5872    {
5873        self.update_time = v.map(|x| x.into());
5874        self
5875    }
5876
5877    /// Sets the value of [aspects][crate::model::Entry::aspects].
5878    ///
5879    /// # Example
5880    /// ```ignore,no_run
5881    /// # use google_cloud_dataplex_v1::model::Entry;
5882    /// use google_cloud_dataplex_v1::model::Aspect;
5883    /// let x = Entry::new().set_aspects([
5884    ///     ("key0", Aspect::default()/* use setters */),
5885    ///     ("key1", Aspect::default()/* use (different) setters */),
5886    /// ]);
5887    /// ```
5888    pub fn set_aspects<T, K, V>(mut self, v: T) -> Self
5889    where
5890        T: std::iter::IntoIterator<Item = (K, V)>,
5891        K: std::convert::Into<std::string::String>,
5892        V: std::convert::Into<crate::model::Aspect>,
5893    {
5894        use std::iter::Iterator;
5895        self.aspects = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5896        self
5897    }
5898
5899    /// Sets the value of [parent_entry][crate::model::Entry::parent_entry].
5900    ///
5901    /// # Example
5902    /// ```ignore,no_run
5903    /// # use google_cloud_dataplex_v1::model::Entry;
5904    /// let x = Entry::new().set_parent_entry("example");
5905    /// ```
5906    pub fn set_parent_entry<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5907        self.parent_entry = v.into();
5908        self
5909    }
5910
5911    /// Sets the value of [fully_qualified_name][crate::model::Entry::fully_qualified_name].
5912    ///
5913    /// # Example
5914    /// ```ignore,no_run
5915    /// # use google_cloud_dataplex_v1::model::Entry;
5916    /// let x = Entry::new().set_fully_qualified_name("example");
5917    /// ```
5918    pub fn set_fully_qualified_name<T: std::convert::Into<std::string::String>>(
5919        mut self,
5920        v: T,
5921    ) -> Self {
5922        self.fully_qualified_name = v.into();
5923        self
5924    }
5925
5926    /// Sets the value of [entry_source][crate::model::Entry::entry_source].
5927    ///
5928    /// # Example
5929    /// ```ignore,no_run
5930    /// # use google_cloud_dataplex_v1::model::Entry;
5931    /// use google_cloud_dataplex_v1::model::EntrySource;
5932    /// let x = Entry::new().set_entry_source(EntrySource::default()/* use setters */);
5933    /// ```
5934    pub fn set_entry_source<T>(mut self, v: T) -> Self
5935    where
5936        T: std::convert::Into<crate::model::EntrySource>,
5937    {
5938        self.entry_source = std::option::Option::Some(v.into());
5939        self
5940    }
5941
5942    /// Sets or clears the value of [entry_source][crate::model::Entry::entry_source].
5943    ///
5944    /// # Example
5945    /// ```ignore,no_run
5946    /// # use google_cloud_dataplex_v1::model::Entry;
5947    /// use google_cloud_dataplex_v1::model::EntrySource;
5948    /// let x = Entry::new().set_or_clear_entry_source(Some(EntrySource::default()/* use setters */));
5949    /// let x = Entry::new().set_or_clear_entry_source(None::<EntrySource>);
5950    /// ```
5951    pub fn set_or_clear_entry_source<T>(mut self, v: std::option::Option<T>) -> Self
5952    where
5953        T: std::convert::Into<crate::model::EntrySource>,
5954    {
5955        self.entry_source = v.map(|x| x.into());
5956        self
5957    }
5958}
5959
5960impl wkt::message::Message for Entry {
5961    fn typename() -> &'static str {
5962        "type.googleapis.com/google.cloud.dataplex.v1.Entry"
5963    }
5964}
5965
5966/// Information related to the source system of the data resource that is
5967/// represented by the entry.
5968#[derive(Clone, Default, PartialEq)]
5969#[non_exhaustive]
5970pub struct EntrySource {
5971    /// The name of the resource in the source system.
5972    /// Maximum length is 4,000 characters.
5973    pub resource: std::string::String,
5974
5975    /// The name of the source system.
5976    /// Maximum length is 64 characters.
5977    pub system: std::string::String,
5978
5979    /// The platform containing the source system.
5980    /// Maximum length is 64 characters.
5981    pub platform: std::string::String,
5982
5983    /// A user-friendly display name.
5984    /// Maximum length is 500 characters.
5985    pub display_name: std::string::String,
5986
5987    /// A description of the data resource.
5988    /// Maximum length is 2,000 characters.
5989    pub description: std::string::String,
5990
5991    /// User-defined labels.
5992    /// The maximum size of keys and values is 128 characters each.
5993    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5994
5995    /// Immutable. The entries representing the ancestors of the data resource in
5996    /// the source system.
5997    pub ancestors: std::vec::Vec<crate::model::entry_source::Ancestor>,
5998
5999    /// The time when the resource was created in the source system.
6000    pub create_time: std::option::Option<wkt::Timestamp>,
6001
6002    /// The time when the resource was last updated in the source system. If the
6003    /// entry exists in the system and its `EntrySource` has `update_time`
6004    /// populated, further updates to the `EntrySource` of the entry must provide
6005    /// incremental updates to its `update_time`.
6006    pub update_time: std::option::Option<wkt::Timestamp>,
6007
6008    /// Output only. Location of the resource in the source system. You can search
6009    /// the entry by this location. By default, this should match the location of
6010    /// the entry group containing this entry. A different value allows capturing
6011    /// the source location for data external to Google Cloud.
6012    pub location: std::string::String,
6013
6014    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6015}
6016
6017impl EntrySource {
6018    pub fn new() -> Self {
6019        std::default::Default::default()
6020    }
6021
6022    /// Sets the value of [resource][crate::model::EntrySource::resource].
6023    ///
6024    /// # Example
6025    /// ```ignore,no_run
6026    /// # use google_cloud_dataplex_v1::model::EntrySource;
6027    /// let x = EntrySource::new().set_resource("example");
6028    /// ```
6029    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6030        self.resource = v.into();
6031        self
6032    }
6033
6034    /// Sets the value of [system][crate::model::EntrySource::system].
6035    ///
6036    /// # Example
6037    /// ```ignore,no_run
6038    /// # use google_cloud_dataplex_v1::model::EntrySource;
6039    /// let x = EntrySource::new().set_system("example");
6040    /// ```
6041    pub fn set_system<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6042        self.system = v.into();
6043        self
6044    }
6045
6046    /// Sets the value of [platform][crate::model::EntrySource::platform].
6047    ///
6048    /// # Example
6049    /// ```ignore,no_run
6050    /// # use google_cloud_dataplex_v1::model::EntrySource;
6051    /// let x = EntrySource::new().set_platform("example");
6052    /// ```
6053    pub fn set_platform<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6054        self.platform = v.into();
6055        self
6056    }
6057
6058    /// Sets the value of [display_name][crate::model::EntrySource::display_name].
6059    ///
6060    /// # Example
6061    /// ```ignore,no_run
6062    /// # use google_cloud_dataplex_v1::model::EntrySource;
6063    /// let x = EntrySource::new().set_display_name("example");
6064    /// ```
6065    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6066        self.display_name = v.into();
6067        self
6068    }
6069
6070    /// Sets the value of [description][crate::model::EntrySource::description].
6071    ///
6072    /// # Example
6073    /// ```ignore,no_run
6074    /// # use google_cloud_dataplex_v1::model::EntrySource;
6075    /// let x = EntrySource::new().set_description("example");
6076    /// ```
6077    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6078        self.description = v.into();
6079        self
6080    }
6081
6082    /// Sets the value of [labels][crate::model::EntrySource::labels].
6083    ///
6084    /// # Example
6085    /// ```ignore,no_run
6086    /// # use google_cloud_dataplex_v1::model::EntrySource;
6087    /// let x = EntrySource::new().set_labels([
6088    ///     ("key0", "abc"),
6089    ///     ("key1", "xyz"),
6090    /// ]);
6091    /// ```
6092    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
6093    where
6094        T: std::iter::IntoIterator<Item = (K, V)>,
6095        K: std::convert::Into<std::string::String>,
6096        V: std::convert::Into<std::string::String>,
6097    {
6098        use std::iter::Iterator;
6099        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6100        self
6101    }
6102
6103    /// Sets the value of [ancestors][crate::model::EntrySource::ancestors].
6104    ///
6105    /// # Example
6106    /// ```ignore,no_run
6107    /// # use google_cloud_dataplex_v1::model::EntrySource;
6108    /// use google_cloud_dataplex_v1::model::entry_source::Ancestor;
6109    /// let x = EntrySource::new()
6110    ///     .set_ancestors([
6111    ///         Ancestor::default()/* use setters */,
6112    ///         Ancestor::default()/* use (different) setters */,
6113    ///     ]);
6114    /// ```
6115    pub fn set_ancestors<T, V>(mut self, v: T) -> Self
6116    where
6117        T: std::iter::IntoIterator<Item = V>,
6118        V: std::convert::Into<crate::model::entry_source::Ancestor>,
6119    {
6120        use std::iter::Iterator;
6121        self.ancestors = v.into_iter().map(|i| i.into()).collect();
6122        self
6123    }
6124
6125    /// Sets the value of [create_time][crate::model::EntrySource::create_time].
6126    ///
6127    /// # Example
6128    /// ```ignore,no_run
6129    /// # use google_cloud_dataplex_v1::model::EntrySource;
6130    /// use wkt::Timestamp;
6131    /// let x = EntrySource::new().set_create_time(Timestamp::default()/* use setters */);
6132    /// ```
6133    pub fn set_create_time<T>(mut self, v: T) -> Self
6134    where
6135        T: std::convert::Into<wkt::Timestamp>,
6136    {
6137        self.create_time = std::option::Option::Some(v.into());
6138        self
6139    }
6140
6141    /// Sets or clears the value of [create_time][crate::model::EntrySource::create_time].
6142    ///
6143    /// # Example
6144    /// ```ignore,no_run
6145    /// # use google_cloud_dataplex_v1::model::EntrySource;
6146    /// use wkt::Timestamp;
6147    /// let x = EntrySource::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
6148    /// let x = EntrySource::new().set_or_clear_create_time(None::<Timestamp>);
6149    /// ```
6150    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6151    where
6152        T: std::convert::Into<wkt::Timestamp>,
6153    {
6154        self.create_time = v.map(|x| x.into());
6155        self
6156    }
6157
6158    /// Sets the value of [update_time][crate::model::EntrySource::update_time].
6159    ///
6160    /// # Example
6161    /// ```ignore,no_run
6162    /// # use google_cloud_dataplex_v1::model::EntrySource;
6163    /// use wkt::Timestamp;
6164    /// let x = EntrySource::new().set_update_time(Timestamp::default()/* use setters */);
6165    /// ```
6166    pub fn set_update_time<T>(mut self, v: T) -> Self
6167    where
6168        T: std::convert::Into<wkt::Timestamp>,
6169    {
6170        self.update_time = std::option::Option::Some(v.into());
6171        self
6172    }
6173
6174    /// Sets or clears the value of [update_time][crate::model::EntrySource::update_time].
6175    ///
6176    /// # Example
6177    /// ```ignore,no_run
6178    /// # use google_cloud_dataplex_v1::model::EntrySource;
6179    /// use wkt::Timestamp;
6180    /// let x = EntrySource::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
6181    /// let x = EntrySource::new().set_or_clear_update_time(None::<Timestamp>);
6182    /// ```
6183    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6184    where
6185        T: std::convert::Into<wkt::Timestamp>,
6186    {
6187        self.update_time = v.map(|x| x.into());
6188        self
6189    }
6190
6191    /// Sets the value of [location][crate::model::EntrySource::location].
6192    ///
6193    /// # Example
6194    /// ```ignore,no_run
6195    /// # use google_cloud_dataplex_v1::model::EntrySource;
6196    /// let x = EntrySource::new().set_location("example");
6197    /// ```
6198    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6199        self.location = v.into();
6200        self
6201    }
6202}
6203
6204impl wkt::message::Message for EntrySource {
6205    fn typename() -> &'static str {
6206        "type.googleapis.com/google.cloud.dataplex.v1.EntrySource"
6207    }
6208}
6209
6210/// Defines additional types related to [EntrySource].
6211pub mod entry_source {
6212    #[allow(unused_imports)]
6213    use super::*;
6214
6215    /// Information about individual items in the hierarchy that is associated with
6216    /// the data resource.
6217    #[derive(Clone, Default, PartialEq)]
6218    #[non_exhaustive]
6219    pub struct Ancestor {
6220        /// Optional. The name of the ancestor resource.
6221        pub name: std::string::String,
6222
6223        /// Optional. The type of the ancestor resource.
6224        pub r#type: std::string::String,
6225
6226        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6227    }
6228
6229    impl Ancestor {
6230        pub fn new() -> Self {
6231            std::default::Default::default()
6232        }
6233
6234        /// Sets the value of [name][crate::model::entry_source::Ancestor::name].
6235        ///
6236        /// # Example
6237        /// ```ignore,no_run
6238        /// # use google_cloud_dataplex_v1::model::entry_source::Ancestor;
6239        /// let x = Ancestor::new().set_name("example");
6240        /// ```
6241        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6242            self.name = v.into();
6243            self
6244        }
6245
6246        /// Sets the value of [r#type][crate::model::entry_source::Ancestor::type].
6247        ///
6248        /// # Example
6249        /// ```ignore,no_run
6250        /// # use google_cloud_dataplex_v1::model::entry_source::Ancestor;
6251        /// let x = Ancestor::new().set_type("example");
6252        /// ```
6253        pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6254            self.r#type = v.into();
6255            self
6256        }
6257    }
6258
6259    impl wkt::message::Message for Ancestor {
6260        fn typename() -> &'static str {
6261            "type.googleapis.com/google.cloud.dataplex.v1.EntrySource.Ancestor"
6262        }
6263    }
6264}
6265
6266/// Create EntryGroup Request.
6267#[derive(Clone, Default, PartialEq)]
6268#[non_exhaustive]
6269pub struct CreateEntryGroupRequest {
6270    /// Required. The resource name of the entryGroup, of the form:
6271    /// projects/{project_number}/locations/{location_id}
6272    /// where `location_id` refers to a Google Cloud region.
6273    pub parent: std::string::String,
6274
6275    /// Required. EntryGroup identifier.
6276    pub entry_group_id: std::string::String,
6277
6278    /// Required. EntryGroup Resource.
6279    pub entry_group: std::option::Option<crate::model::EntryGroup>,
6280
6281    /// Optional. The service validates the request without performing any
6282    /// mutations. The default is false.
6283    pub validate_only: bool,
6284
6285    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6286}
6287
6288impl CreateEntryGroupRequest {
6289    pub fn new() -> Self {
6290        std::default::Default::default()
6291    }
6292
6293    /// Sets the value of [parent][crate::model::CreateEntryGroupRequest::parent].
6294    ///
6295    /// # Example
6296    /// ```ignore,no_run
6297    /// # use google_cloud_dataplex_v1::model::CreateEntryGroupRequest;
6298    /// let x = CreateEntryGroupRequest::new().set_parent("example");
6299    /// ```
6300    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6301        self.parent = v.into();
6302        self
6303    }
6304
6305    /// Sets the value of [entry_group_id][crate::model::CreateEntryGroupRequest::entry_group_id].
6306    ///
6307    /// # Example
6308    /// ```ignore,no_run
6309    /// # use google_cloud_dataplex_v1::model::CreateEntryGroupRequest;
6310    /// let x = CreateEntryGroupRequest::new().set_entry_group_id("example");
6311    /// ```
6312    pub fn set_entry_group_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6313        self.entry_group_id = v.into();
6314        self
6315    }
6316
6317    /// Sets the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
6318    ///
6319    /// # Example
6320    /// ```ignore,no_run
6321    /// # use google_cloud_dataplex_v1::model::CreateEntryGroupRequest;
6322    /// use google_cloud_dataplex_v1::model::EntryGroup;
6323    /// let x = CreateEntryGroupRequest::new().set_entry_group(EntryGroup::default()/* use setters */);
6324    /// ```
6325    pub fn set_entry_group<T>(mut self, v: T) -> Self
6326    where
6327        T: std::convert::Into<crate::model::EntryGroup>,
6328    {
6329        self.entry_group = std::option::Option::Some(v.into());
6330        self
6331    }
6332
6333    /// Sets or clears the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
6334    ///
6335    /// # Example
6336    /// ```ignore,no_run
6337    /// # use google_cloud_dataplex_v1::model::CreateEntryGroupRequest;
6338    /// use google_cloud_dataplex_v1::model::EntryGroup;
6339    /// let x = CreateEntryGroupRequest::new().set_or_clear_entry_group(Some(EntryGroup::default()/* use setters */));
6340    /// let x = CreateEntryGroupRequest::new().set_or_clear_entry_group(None::<EntryGroup>);
6341    /// ```
6342    pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
6343    where
6344        T: std::convert::Into<crate::model::EntryGroup>,
6345    {
6346        self.entry_group = v.map(|x| x.into());
6347        self
6348    }
6349
6350    /// Sets the value of [validate_only][crate::model::CreateEntryGroupRequest::validate_only].
6351    ///
6352    /// # Example
6353    /// ```ignore,no_run
6354    /// # use google_cloud_dataplex_v1::model::CreateEntryGroupRequest;
6355    /// let x = CreateEntryGroupRequest::new().set_validate_only(true);
6356    /// ```
6357    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6358        self.validate_only = v.into();
6359        self
6360    }
6361}
6362
6363impl wkt::message::Message for CreateEntryGroupRequest {
6364    fn typename() -> &'static str {
6365        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryGroupRequest"
6366    }
6367}
6368
6369/// Update EntryGroup Request.
6370#[derive(Clone, Default, PartialEq)]
6371#[non_exhaustive]
6372pub struct UpdateEntryGroupRequest {
6373    /// Required. EntryGroup Resource.
6374    pub entry_group: std::option::Option<crate::model::EntryGroup>,
6375
6376    /// Required. Mask of fields to update.
6377    pub update_mask: std::option::Option<wkt::FieldMask>,
6378
6379    /// Optional. The service validates the request, without performing any
6380    /// mutations. The default is false.
6381    pub validate_only: bool,
6382
6383    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6384}
6385
6386impl UpdateEntryGroupRequest {
6387    pub fn new() -> Self {
6388        std::default::Default::default()
6389    }
6390
6391    /// Sets the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
6392    ///
6393    /// # Example
6394    /// ```ignore,no_run
6395    /// # use google_cloud_dataplex_v1::model::UpdateEntryGroupRequest;
6396    /// use google_cloud_dataplex_v1::model::EntryGroup;
6397    /// let x = UpdateEntryGroupRequest::new().set_entry_group(EntryGroup::default()/* use setters */);
6398    /// ```
6399    pub fn set_entry_group<T>(mut self, v: T) -> Self
6400    where
6401        T: std::convert::Into<crate::model::EntryGroup>,
6402    {
6403        self.entry_group = std::option::Option::Some(v.into());
6404        self
6405    }
6406
6407    /// Sets or clears the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
6408    ///
6409    /// # Example
6410    /// ```ignore,no_run
6411    /// # use google_cloud_dataplex_v1::model::UpdateEntryGroupRequest;
6412    /// use google_cloud_dataplex_v1::model::EntryGroup;
6413    /// let x = UpdateEntryGroupRequest::new().set_or_clear_entry_group(Some(EntryGroup::default()/* use setters */));
6414    /// let x = UpdateEntryGroupRequest::new().set_or_clear_entry_group(None::<EntryGroup>);
6415    /// ```
6416    pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
6417    where
6418        T: std::convert::Into<crate::model::EntryGroup>,
6419    {
6420        self.entry_group = v.map(|x| x.into());
6421        self
6422    }
6423
6424    /// Sets the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
6425    ///
6426    /// # Example
6427    /// ```ignore,no_run
6428    /// # use google_cloud_dataplex_v1::model::UpdateEntryGroupRequest;
6429    /// use wkt::FieldMask;
6430    /// let x = UpdateEntryGroupRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6431    /// ```
6432    pub fn set_update_mask<T>(mut self, v: T) -> Self
6433    where
6434        T: std::convert::Into<wkt::FieldMask>,
6435    {
6436        self.update_mask = std::option::Option::Some(v.into());
6437        self
6438    }
6439
6440    /// Sets or clears the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
6441    ///
6442    /// # Example
6443    /// ```ignore,no_run
6444    /// # use google_cloud_dataplex_v1::model::UpdateEntryGroupRequest;
6445    /// use wkt::FieldMask;
6446    /// let x = UpdateEntryGroupRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6447    /// let x = UpdateEntryGroupRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6448    /// ```
6449    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6450    where
6451        T: std::convert::Into<wkt::FieldMask>,
6452    {
6453        self.update_mask = v.map(|x| x.into());
6454        self
6455    }
6456
6457    /// Sets the value of [validate_only][crate::model::UpdateEntryGroupRequest::validate_only].
6458    ///
6459    /// # Example
6460    /// ```ignore,no_run
6461    /// # use google_cloud_dataplex_v1::model::UpdateEntryGroupRequest;
6462    /// let x = UpdateEntryGroupRequest::new().set_validate_only(true);
6463    /// ```
6464    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6465        self.validate_only = v.into();
6466        self
6467    }
6468}
6469
6470impl wkt::message::Message for UpdateEntryGroupRequest {
6471    fn typename() -> &'static str {
6472        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntryGroupRequest"
6473    }
6474}
6475
6476/// Delete EntryGroup Request.
6477#[derive(Clone, Default, PartialEq)]
6478#[non_exhaustive]
6479pub struct DeleteEntryGroupRequest {
6480    /// Required. The resource name of the EntryGroup:
6481    /// `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
6482    pub name: std::string::String,
6483
6484    /// Optional. If the client provided etag value does not match the current etag
6485    /// value, the DeleteEntryGroupRequest method returns an ABORTED error
6486    /// response.
6487    pub etag: std::string::String,
6488
6489    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6490}
6491
6492impl DeleteEntryGroupRequest {
6493    pub fn new() -> Self {
6494        std::default::Default::default()
6495    }
6496
6497    /// Sets the value of [name][crate::model::DeleteEntryGroupRequest::name].
6498    ///
6499    /// # Example
6500    /// ```ignore,no_run
6501    /// # use google_cloud_dataplex_v1::model::DeleteEntryGroupRequest;
6502    /// let x = DeleteEntryGroupRequest::new().set_name("example");
6503    /// ```
6504    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6505        self.name = v.into();
6506        self
6507    }
6508
6509    /// Sets the value of [etag][crate::model::DeleteEntryGroupRequest::etag].
6510    ///
6511    /// # Example
6512    /// ```ignore,no_run
6513    /// # use google_cloud_dataplex_v1::model::DeleteEntryGroupRequest;
6514    /// let x = DeleteEntryGroupRequest::new().set_etag("example");
6515    /// ```
6516    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6517        self.etag = v.into();
6518        self
6519    }
6520}
6521
6522impl wkt::message::Message for DeleteEntryGroupRequest {
6523    fn typename() -> &'static str {
6524        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryGroupRequest"
6525    }
6526}
6527
6528/// List entryGroups request.
6529#[derive(Clone, Default, PartialEq)]
6530#[non_exhaustive]
6531pub struct ListEntryGroupsRequest {
6532    /// Required. The resource name of the entryGroup location, of the form:
6533    /// `projects/{project_number}/locations/{location_id}`
6534    /// where `location_id` refers to a Google Cloud region.
6535    pub parent: std::string::String,
6536
6537    /// Optional. Maximum number of EntryGroups to return. The service may return
6538    /// fewer than this value. If unspecified, the service returns at most 10
6539    /// EntryGroups. The maximum value is 1000; values above 1000 will be coerced
6540    /// to 1000.
6541    pub page_size: i32,
6542
6543    /// Optional. Page token received from a previous `ListEntryGroups` call.
6544    /// Provide this to retrieve the subsequent page. When paginating, all other
6545    /// parameters you provide to `ListEntryGroups` must match the call that
6546    /// provided the page token.
6547    pub page_token: std::string::String,
6548
6549    /// Optional. Filter request.
6550    pub filter: std::string::String,
6551
6552    /// Optional. Order by fields for the result.
6553    pub order_by: std::string::String,
6554
6555    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6556}
6557
6558impl ListEntryGroupsRequest {
6559    pub fn new() -> Self {
6560        std::default::Default::default()
6561    }
6562
6563    /// Sets the value of [parent][crate::model::ListEntryGroupsRequest::parent].
6564    ///
6565    /// # Example
6566    /// ```ignore,no_run
6567    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsRequest;
6568    /// let x = ListEntryGroupsRequest::new().set_parent("example");
6569    /// ```
6570    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6571        self.parent = v.into();
6572        self
6573    }
6574
6575    /// Sets the value of [page_size][crate::model::ListEntryGroupsRequest::page_size].
6576    ///
6577    /// # Example
6578    /// ```ignore,no_run
6579    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsRequest;
6580    /// let x = ListEntryGroupsRequest::new().set_page_size(42);
6581    /// ```
6582    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6583        self.page_size = v.into();
6584        self
6585    }
6586
6587    /// Sets the value of [page_token][crate::model::ListEntryGroupsRequest::page_token].
6588    ///
6589    /// # Example
6590    /// ```ignore,no_run
6591    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsRequest;
6592    /// let x = ListEntryGroupsRequest::new().set_page_token("example");
6593    /// ```
6594    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6595        self.page_token = v.into();
6596        self
6597    }
6598
6599    /// Sets the value of [filter][crate::model::ListEntryGroupsRequest::filter].
6600    ///
6601    /// # Example
6602    /// ```ignore,no_run
6603    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsRequest;
6604    /// let x = ListEntryGroupsRequest::new().set_filter("example");
6605    /// ```
6606    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6607        self.filter = v.into();
6608        self
6609    }
6610
6611    /// Sets the value of [order_by][crate::model::ListEntryGroupsRequest::order_by].
6612    ///
6613    /// # Example
6614    /// ```ignore,no_run
6615    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsRequest;
6616    /// let x = ListEntryGroupsRequest::new().set_order_by("example");
6617    /// ```
6618    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6619        self.order_by = v.into();
6620        self
6621    }
6622}
6623
6624impl wkt::message::Message for ListEntryGroupsRequest {
6625    fn typename() -> &'static str {
6626        "type.googleapis.com/google.cloud.dataplex.v1.ListEntryGroupsRequest"
6627    }
6628}
6629
6630/// List entry groups response.
6631#[derive(Clone, Default, PartialEq)]
6632#[non_exhaustive]
6633pub struct ListEntryGroupsResponse {
6634    /// Entry groups under the given parent location.
6635    pub entry_groups: std::vec::Vec<crate::model::EntryGroup>,
6636
6637    /// Token to retrieve the next page of results, or empty if there are no more
6638    /// results in the list.
6639    pub next_page_token: std::string::String,
6640
6641    /// Locations that the service couldn't reach.
6642    pub unreachable_locations: std::vec::Vec<std::string::String>,
6643
6644    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6645}
6646
6647impl ListEntryGroupsResponse {
6648    pub fn new() -> Self {
6649        std::default::Default::default()
6650    }
6651
6652    /// Sets the value of [entry_groups][crate::model::ListEntryGroupsResponse::entry_groups].
6653    ///
6654    /// # Example
6655    /// ```ignore,no_run
6656    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsResponse;
6657    /// use google_cloud_dataplex_v1::model::EntryGroup;
6658    /// let x = ListEntryGroupsResponse::new()
6659    ///     .set_entry_groups([
6660    ///         EntryGroup::default()/* use setters */,
6661    ///         EntryGroup::default()/* use (different) setters */,
6662    ///     ]);
6663    /// ```
6664    pub fn set_entry_groups<T, V>(mut self, v: T) -> Self
6665    where
6666        T: std::iter::IntoIterator<Item = V>,
6667        V: std::convert::Into<crate::model::EntryGroup>,
6668    {
6669        use std::iter::Iterator;
6670        self.entry_groups = v.into_iter().map(|i| i.into()).collect();
6671        self
6672    }
6673
6674    /// Sets the value of [next_page_token][crate::model::ListEntryGroupsResponse::next_page_token].
6675    ///
6676    /// # Example
6677    /// ```ignore,no_run
6678    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsResponse;
6679    /// let x = ListEntryGroupsResponse::new().set_next_page_token("example");
6680    /// ```
6681    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6682        self.next_page_token = v.into();
6683        self
6684    }
6685
6686    /// Sets the value of [unreachable_locations][crate::model::ListEntryGroupsResponse::unreachable_locations].
6687    ///
6688    /// # Example
6689    /// ```ignore,no_run
6690    /// # use google_cloud_dataplex_v1::model::ListEntryGroupsResponse;
6691    /// let x = ListEntryGroupsResponse::new().set_unreachable_locations(["a", "b", "c"]);
6692    /// ```
6693    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
6694    where
6695        T: std::iter::IntoIterator<Item = V>,
6696        V: std::convert::Into<std::string::String>,
6697    {
6698        use std::iter::Iterator;
6699        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
6700        self
6701    }
6702}
6703
6704impl wkt::message::Message for ListEntryGroupsResponse {
6705    fn typename() -> &'static str {
6706        "type.googleapis.com/google.cloud.dataplex.v1.ListEntryGroupsResponse"
6707    }
6708}
6709
6710#[doc(hidden)]
6711impl google_cloud_gax::paginator::internal::PageableResponse for ListEntryGroupsResponse {
6712    type PageItem = crate::model::EntryGroup;
6713
6714    fn items(self) -> std::vec::Vec<Self::PageItem> {
6715        self.entry_groups
6716    }
6717
6718    fn next_page_token(&self) -> std::string::String {
6719        use std::clone::Clone;
6720        self.next_page_token.clone()
6721    }
6722}
6723
6724/// Get EntryGroup request.
6725#[derive(Clone, Default, PartialEq)]
6726#[non_exhaustive]
6727pub struct GetEntryGroupRequest {
6728    /// Required. The resource name of the EntryGroup:
6729    /// `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
6730    pub name: std::string::String,
6731
6732    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6733}
6734
6735impl GetEntryGroupRequest {
6736    pub fn new() -> Self {
6737        std::default::Default::default()
6738    }
6739
6740    /// Sets the value of [name][crate::model::GetEntryGroupRequest::name].
6741    ///
6742    /// # Example
6743    /// ```ignore,no_run
6744    /// # use google_cloud_dataplex_v1::model::GetEntryGroupRequest;
6745    /// let x = GetEntryGroupRequest::new().set_name("example");
6746    /// ```
6747    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6748        self.name = v.into();
6749        self
6750    }
6751}
6752
6753impl wkt::message::Message for GetEntryGroupRequest {
6754    fn typename() -> &'static str {
6755        "type.googleapis.com/google.cloud.dataplex.v1.GetEntryGroupRequest"
6756    }
6757}
6758
6759/// Create EntryType Request.
6760#[derive(Clone, Default, PartialEq)]
6761#[non_exhaustive]
6762pub struct CreateEntryTypeRequest {
6763    /// Required. The resource name of the EntryType, of the form:
6764    /// projects/{project_number}/locations/{location_id}
6765    /// where `location_id` refers to a Google Cloud region.
6766    pub parent: std::string::String,
6767
6768    /// Required. EntryType identifier.
6769    pub entry_type_id: std::string::String,
6770
6771    /// Required. EntryType Resource.
6772    pub entry_type: std::option::Option<crate::model::EntryType>,
6773
6774    /// Optional. The service validates the request without performing any
6775    /// mutations. The default is false.
6776    pub validate_only: bool,
6777
6778    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6779}
6780
6781impl CreateEntryTypeRequest {
6782    pub fn new() -> Self {
6783        std::default::Default::default()
6784    }
6785
6786    /// Sets the value of [parent][crate::model::CreateEntryTypeRequest::parent].
6787    ///
6788    /// # Example
6789    /// ```ignore,no_run
6790    /// # use google_cloud_dataplex_v1::model::CreateEntryTypeRequest;
6791    /// let x = CreateEntryTypeRequest::new().set_parent("example");
6792    /// ```
6793    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6794        self.parent = v.into();
6795        self
6796    }
6797
6798    /// Sets the value of [entry_type_id][crate::model::CreateEntryTypeRequest::entry_type_id].
6799    ///
6800    /// # Example
6801    /// ```ignore,no_run
6802    /// # use google_cloud_dataplex_v1::model::CreateEntryTypeRequest;
6803    /// let x = CreateEntryTypeRequest::new().set_entry_type_id("example");
6804    /// ```
6805    pub fn set_entry_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6806        self.entry_type_id = v.into();
6807        self
6808    }
6809
6810    /// Sets the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
6811    ///
6812    /// # Example
6813    /// ```ignore,no_run
6814    /// # use google_cloud_dataplex_v1::model::CreateEntryTypeRequest;
6815    /// use google_cloud_dataplex_v1::model::EntryType;
6816    /// let x = CreateEntryTypeRequest::new().set_entry_type(EntryType::default()/* use setters */);
6817    /// ```
6818    pub fn set_entry_type<T>(mut self, v: T) -> Self
6819    where
6820        T: std::convert::Into<crate::model::EntryType>,
6821    {
6822        self.entry_type = std::option::Option::Some(v.into());
6823        self
6824    }
6825
6826    /// Sets or clears the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
6827    ///
6828    /// # Example
6829    /// ```ignore,no_run
6830    /// # use google_cloud_dataplex_v1::model::CreateEntryTypeRequest;
6831    /// use google_cloud_dataplex_v1::model::EntryType;
6832    /// let x = CreateEntryTypeRequest::new().set_or_clear_entry_type(Some(EntryType::default()/* use setters */));
6833    /// let x = CreateEntryTypeRequest::new().set_or_clear_entry_type(None::<EntryType>);
6834    /// ```
6835    pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
6836    where
6837        T: std::convert::Into<crate::model::EntryType>,
6838    {
6839        self.entry_type = v.map(|x| x.into());
6840        self
6841    }
6842
6843    /// Sets the value of [validate_only][crate::model::CreateEntryTypeRequest::validate_only].
6844    ///
6845    /// # Example
6846    /// ```ignore,no_run
6847    /// # use google_cloud_dataplex_v1::model::CreateEntryTypeRequest;
6848    /// let x = CreateEntryTypeRequest::new().set_validate_only(true);
6849    /// ```
6850    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6851        self.validate_only = v.into();
6852        self
6853    }
6854}
6855
6856impl wkt::message::Message for CreateEntryTypeRequest {
6857    fn typename() -> &'static str {
6858        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryTypeRequest"
6859    }
6860}
6861
6862/// Update EntryType Request.
6863#[derive(Clone, Default, PartialEq)]
6864#[non_exhaustive]
6865pub struct UpdateEntryTypeRequest {
6866    /// Required. EntryType Resource.
6867    pub entry_type: std::option::Option<crate::model::EntryType>,
6868
6869    /// Required. Mask of fields to update.
6870    pub update_mask: std::option::Option<wkt::FieldMask>,
6871
6872    /// Optional. The service validates the request without performing any
6873    /// mutations. The default is false.
6874    pub validate_only: bool,
6875
6876    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6877}
6878
6879impl UpdateEntryTypeRequest {
6880    pub fn new() -> Self {
6881        std::default::Default::default()
6882    }
6883
6884    /// Sets the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
6885    ///
6886    /// # Example
6887    /// ```ignore,no_run
6888    /// # use google_cloud_dataplex_v1::model::UpdateEntryTypeRequest;
6889    /// use google_cloud_dataplex_v1::model::EntryType;
6890    /// let x = UpdateEntryTypeRequest::new().set_entry_type(EntryType::default()/* use setters */);
6891    /// ```
6892    pub fn set_entry_type<T>(mut self, v: T) -> Self
6893    where
6894        T: std::convert::Into<crate::model::EntryType>,
6895    {
6896        self.entry_type = std::option::Option::Some(v.into());
6897        self
6898    }
6899
6900    /// Sets or clears the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
6901    ///
6902    /// # Example
6903    /// ```ignore,no_run
6904    /// # use google_cloud_dataplex_v1::model::UpdateEntryTypeRequest;
6905    /// use google_cloud_dataplex_v1::model::EntryType;
6906    /// let x = UpdateEntryTypeRequest::new().set_or_clear_entry_type(Some(EntryType::default()/* use setters */));
6907    /// let x = UpdateEntryTypeRequest::new().set_or_clear_entry_type(None::<EntryType>);
6908    /// ```
6909    pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
6910    where
6911        T: std::convert::Into<crate::model::EntryType>,
6912    {
6913        self.entry_type = v.map(|x| x.into());
6914        self
6915    }
6916
6917    /// Sets the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
6918    ///
6919    /// # Example
6920    /// ```ignore,no_run
6921    /// # use google_cloud_dataplex_v1::model::UpdateEntryTypeRequest;
6922    /// use wkt::FieldMask;
6923    /// let x = UpdateEntryTypeRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6924    /// ```
6925    pub fn set_update_mask<T>(mut self, v: T) -> Self
6926    where
6927        T: std::convert::Into<wkt::FieldMask>,
6928    {
6929        self.update_mask = std::option::Option::Some(v.into());
6930        self
6931    }
6932
6933    /// Sets or clears the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
6934    ///
6935    /// # Example
6936    /// ```ignore,no_run
6937    /// # use google_cloud_dataplex_v1::model::UpdateEntryTypeRequest;
6938    /// use wkt::FieldMask;
6939    /// let x = UpdateEntryTypeRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6940    /// let x = UpdateEntryTypeRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6941    /// ```
6942    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6943    where
6944        T: std::convert::Into<wkt::FieldMask>,
6945    {
6946        self.update_mask = v.map(|x| x.into());
6947        self
6948    }
6949
6950    /// Sets the value of [validate_only][crate::model::UpdateEntryTypeRequest::validate_only].
6951    ///
6952    /// # Example
6953    /// ```ignore,no_run
6954    /// # use google_cloud_dataplex_v1::model::UpdateEntryTypeRequest;
6955    /// let x = UpdateEntryTypeRequest::new().set_validate_only(true);
6956    /// ```
6957    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6958        self.validate_only = v.into();
6959        self
6960    }
6961}
6962
6963impl wkt::message::Message for UpdateEntryTypeRequest {
6964    fn typename() -> &'static str {
6965        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntryTypeRequest"
6966    }
6967}
6968
6969/// Delete EntryType Request.
6970#[derive(Clone, Default, PartialEq)]
6971#[non_exhaustive]
6972pub struct DeleteEntryTypeRequest {
6973    /// Required. The resource name of the EntryType:
6974    /// `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
6975    pub name: std::string::String,
6976
6977    /// Optional. If the client provided etag value does not match the current etag
6978    /// value, the DeleteEntryTypeRequest method returns an ABORTED error response.
6979    pub etag: std::string::String,
6980
6981    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6982}
6983
6984impl DeleteEntryTypeRequest {
6985    pub fn new() -> Self {
6986        std::default::Default::default()
6987    }
6988
6989    /// Sets the value of [name][crate::model::DeleteEntryTypeRequest::name].
6990    ///
6991    /// # Example
6992    /// ```ignore,no_run
6993    /// # use google_cloud_dataplex_v1::model::DeleteEntryTypeRequest;
6994    /// let x = DeleteEntryTypeRequest::new().set_name("example");
6995    /// ```
6996    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6997        self.name = v.into();
6998        self
6999    }
7000
7001    /// Sets the value of [etag][crate::model::DeleteEntryTypeRequest::etag].
7002    ///
7003    /// # Example
7004    /// ```ignore,no_run
7005    /// # use google_cloud_dataplex_v1::model::DeleteEntryTypeRequest;
7006    /// let x = DeleteEntryTypeRequest::new().set_etag("example");
7007    /// ```
7008    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7009        self.etag = v.into();
7010        self
7011    }
7012}
7013
7014impl wkt::message::Message for DeleteEntryTypeRequest {
7015    fn typename() -> &'static str {
7016        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryTypeRequest"
7017    }
7018}
7019
7020/// List EntryTypes request
7021#[derive(Clone, Default, PartialEq)]
7022#[non_exhaustive]
7023pub struct ListEntryTypesRequest {
7024    /// Required. The resource name of the EntryType location, of the form:
7025    /// `projects/{project_number}/locations/{location_id}`
7026    /// where `location_id` refers to a Google Cloud region.
7027    pub parent: std::string::String,
7028
7029    /// Optional. Maximum number of EntryTypes to return. The service may return
7030    /// fewer than this value. If unspecified, the service returns at most 10
7031    /// EntryTypes. The maximum value is 1000; values above 1000 will be coerced to
7032    /// 1000.
7033    pub page_size: i32,
7034
7035    /// Optional. Page token received from a previous `ListEntryTypes` call.
7036    /// Provide this to retrieve the subsequent page. When paginating, all other
7037    /// parameters you provided to `ListEntryTypes` must match the call that
7038    /// provided the page token.
7039    pub page_token: std::string::String,
7040
7041    /// Optional. Filter request. Filters are case-sensitive.
7042    /// The service supports the following formats:
7043    ///
7044    /// * labels.key1 = "value1"
7045    /// * labels:key1
7046    /// * name = "value"
7047    ///
7048    /// These restrictions can be conjoined with AND, OR, and NOT conjunctions.
7049    pub filter: std::string::String,
7050
7051    /// Optional. Orders the result by `name` or `create_time` fields.
7052    /// If not specified, the ordering is undefined.
7053    pub order_by: std::string::String,
7054
7055    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7056}
7057
7058impl ListEntryTypesRequest {
7059    pub fn new() -> Self {
7060        std::default::Default::default()
7061    }
7062
7063    /// Sets the value of [parent][crate::model::ListEntryTypesRequest::parent].
7064    ///
7065    /// # Example
7066    /// ```ignore,no_run
7067    /// # use google_cloud_dataplex_v1::model::ListEntryTypesRequest;
7068    /// let x = ListEntryTypesRequest::new().set_parent("example");
7069    /// ```
7070    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7071        self.parent = v.into();
7072        self
7073    }
7074
7075    /// Sets the value of [page_size][crate::model::ListEntryTypesRequest::page_size].
7076    ///
7077    /// # Example
7078    /// ```ignore,no_run
7079    /// # use google_cloud_dataplex_v1::model::ListEntryTypesRequest;
7080    /// let x = ListEntryTypesRequest::new().set_page_size(42);
7081    /// ```
7082    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7083        self.page_size = v.into();
7084        self
7085    }
7086
7087    /// Sets the value of [page_token][crate::model::ListEntryTypesRequest::page_token].
7088    ///
7089    /// # Example
7090    /// ```ignore,no_run
7091    /// # use google_cloud_dataplex_v1::model::ListEntryTypesRequest;
7092    /// let x = ListEntryTypesRequest::new().set_page_token("example");
7093    /// ```
7094    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7095        self.page_token = v.into();
7096        self
7097    }
7098
7099    /// Sets the value of [filter][crate::model::ListEntryTypesRequest::filter].
7100    ///
7101    /// # Example
7102    /// ```ignore,no_run
7103    /// # use google_cloud_dataplex_v1::model::ListEntryTypesRequest;
7104    /// let x = ListEntryTypesRequest::new().set_filter("example");
7105    /// ```
7106    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7107        self.filter = v.into();
7108        self
7109    }
7110
7111    /// Sets the value of [order_by][crate::model::ListEntryTypesRequest::order_by].
7112    ///
7113    /// # Example
7114    /// ```ignore,no_run
7115    /// # use google_cloud_dataplex_v1::model::ListEntryTypesRequest;
7116    /// let x = ListEntryTypesRequest::new().set_order_by("example");
7117    /// ```
7118    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7119        self.order_by = v.into();
7120        self
7121    }
7122}
7123
7124impl wkt::message::Message for ListEntryTypesRequest {
7125    fn typename() -> &'static str {
7126        "type.googleapis.com/google.cloud.dataplex.v1.ListEntryTypesRequest"
7127    }
7128}
7129
7130/// List EntryTypes response.
7131#[derive(Clone, Default, PartialEq)]
7132#[non_exhaustive]
7133pub struct ListEntryTypesResponse {
7134    /// EntryTypes under the given parent location.
7135    pub entry_types: std::vec::Vec<crate::model::EntryType>,
7136
7137    /// Token to retrieve the next page of results, or empty if there are no more
7138    /// results in the list.
7139    pub next_page_token: std::string::String,
7140
7141    /// Locations that the service couldn't reach.
7142    pub unreachable_locations: std::vec::Vec<std::string::String>,
7143
7144    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7145}
7146
7147impl ListEntryTypesResponse {
7148    pub fn new() -> Self {
7149        std::default::Default::default()
7150    }
7151
7152    /// Sets the value of [entry_types][crate::model::ListEntryTypesResponse::entry_types].
7153    ///
7154    /// # Example
7155    /// ```ignore,no_run
7156    /// # use google_cloud_dataplex_v1::model::ListEntryTypesResponse;
7157    /// use google_cloud_dataplex_v1::model::EntryType;
7158    /// let x = ListEntryTypesResponse::new()
7159    ///     .set_entry_types([
7160    ///         EntryType::default()/* use setters */,
7161    ///         EntryType::default()/* use (different) setters */,
7162    ///     ]);
7163    /// ```
7164    pub fn set_entry_types<T, V>(mut self, v: T) -> Self
7165    where
7166        T: std::iter::IntoIterator<Item = V>,
7167        V: std::convert::Into<crate::model::EntryType>,
7168    {
7169        use std::iter::Iterator;
7170        self.entry_types = v.into_iter().map(|i| i.into()).collect();
7171        self
7172    }
7173
7174    /// Sets the value of [next_page_token][crate::model::ListEntryTypesResponse::next_page_token].
7175    ///
7176    /// # Example
7177    /// ```ignore,no_run
7178    /// # use google_cloud_dataplex_v1::model::ListEntryTypesResponse;
7179    /// let x = ListEntryTypesResponse::new().set_next_page_token("example");
7180    /// ```
7181    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7182        self.next_page_token = v.into();
7183        self
7184    }
7185
7186    /// Sets the value of [unreachable_locations][crate::model::ListEntryTypesResponse::unreachable_locations].
7187    ///
7188    /// # Example
7189    /// ```ignore,no_run
7190    /// # use google_cloud_dataplex_v1::model::ListEntryTypesResponse;
7191    /// let x = ListEntryTypesResponse::new().set_unreachable_locations(["a", "b", "c"]);
7192    /// ```
7193    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
7194    where
7195        T: std::iter::IntoIterator<Item = V>,
7196        V: std::convert::Into<std::string::String>,
7197    {
7198        use std::iter::Iterator;
7199        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
7200        self
7201    }
7202}
7203
7204impl wkt::message::Message for ListEntryTypesResponse {
7205    fn typename() -> &'static str {
7206        "type.googleapis.com/google.cloud.dataplex.v1.ListEntryTypesResponse"
7207    }
7208}
7209
7210#[doc(hidden)]
7211impl google_cloud_gax::paginator::internal::PageableResponse for ListEntryTypesResponse {
7212    type PageItem = crate::model::EntryType;
7213
7214    fn items(self) -> std::vec::Vec<Self::PageItem> {
7215        self.entry_types
7216    }
7217
7218    fn next_page_token(&self) -> std::string::String {
7219        use std::clone::Clone;
7220        self.next_page_token.clone()
7221    }
7222}
7223
7224/// Get EntryType request.
7225#[derive(Clone, Default, PartialEq)]
7226#[non_exhaustive]
7227pub struct GetEntryTypeRequest {
7228    /// Required. The resource name of the EntryType:
7229    /// `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
7230    pub name: std::string::String,
7231
7232    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7233}
7234
7235impl GetEntryTypeRequest {
7236    pub fn new() -> Self {
7237        std::default::Default::default()
7238    }
7239
7240    /// Sets the value of [name][crate::model::GetEntryTypeRequest::name].
7241    ///
7242    /// # Example
7243    /// ```ignore,no_run
7244    /// # use google_cloud_dataplex_v1::model::GetEntryTypeRequest;
7245    /// let x = GetEntryTypeRequest::new().set_name("example");
7246    /// ```
7247    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7248        self.name = v.into();
7249        self
7250    }
7251}
7252
7253impl wkt::message::Message for GetEntryTypeRequest {
7254    fn typename() -> &'static str {
7255        "type.googleapis.com/google.cloud.dataplex.v1.GetEntryTypeRequest"
7256    }
7257}
7258
7259/// Create AspectType Request.
7260#[derive(Clone, Default, PartialEq)]
7261#[non_exhaustive]
7262pub struct CreateAspectTypeRequest {
7263    /// Required. The resource name of the AspectType, of the form:
7264    /// projects/{project_number}/locations/{location_id}
7265    /// where `location_id` refers to a Google Cloud region.
7266    pub parent: std::string::String,
7267
7268    /// Required. AspectType identifier.
7269    pub aspect_type_id: std::string::String,
7270
7271    /// Required. AspectType Resource.
7272    pub aspect_type: std::option::Option<crate::model::AspectType>,
7273
7274    /// Optional. The service validates the request without performing any
7275    /// mutations. The default is false.
7276    pub validate_only: bool,
7277
7278    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7279}
7280
7281impl CreateAspectTypeRequest {
7282    pub fn new() -> Self {
7283        std::default::Default::default()
7284    }
7285
7286    /// Sets the value of [parent][crate::model::CreateAspectTypeRequest::parent].
7287    ///
7288    /// # Example
7289    /// ```ignore,no_run
7290    /// # use google_cloud_dataplex_v1::model::CreateAspectTypeRequest;
7291    /// let x = CreateAspectTypeRequest::new().set_parent("example");
7292    /// ```
7293    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7294        self.parent = v.into();
7295        self
7296    }
7297
7298    /// Sets the value of [aspect_type_id][crate::model::CreateAspectTypeRequest::aspect_type_id].
7299    ///
7300    /// # Example
7301    /// ```ignore,no_run
7302    /// # use google_cloud_dataplex_v1::model::CreateAspectTypeRequest;
7303    /// let x = CreateAspectTypeRequest::new().set_aspect_type_id("example");
7304    /// ```
7305    pub fn set_aspect_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7306        self.aspect_type_id = v.into();
7307        self
7308    }
7309
7310    /// Sets the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
7311    ///
7312    /// # Example
7313    /// ```ignore,no_run
7314    /// # use google_cloud_dataplex_v1::model::CreateAspectTypeRequest;
7315    /// use google_cloud_dataplex_v1::model::AspectType;
7316    /// let x = CreateAspectTypeRequest::new().set_aspect_type(AspectType::default()/* use setters */);
7317    /// ```
7318    pub fn set_aspect_type<T>(mut self, v: T) -> Self
7319    where
7320        T: std::convert::Into<crate::model::AspectType>,
7321    {
7322        self.aspect_type = std::option::Option::Some(v.into());
7323        self
7324    }
7325
7326    /// Sets or clears the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
7327    ///
7328    /// # Example
7329    /// ```ignore,no_run
7330    /// # use google_cloud_dataplex_v1::model::CreateAspectTypeRequest;
7331    /// use google_cloud_dataplex_v1::model::AspectType;
7332    /// let x = CreateAspectTypeRequest::new().set_or_clear_aspect_type(Some(AspectType::default()/* use setters */));
7333    /// let x = CreateAspectTypeRequest::new().set_or_clear_aspect_type(None::<AspectType>);
7334    /// ```
7335    pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
7336    where
7337        T: std::convert::Into<crate::model::AspectType>,
7338    {
7339        self.aspect_type = v.map(|x| x.into());
7340        self
7341    }
7342
7343    /// Sets the value of [validate_only][crate::model::CreateAspectTypeRequest::validate_only].
7344    ///
7345    /// # Example
7346    /// ```ignore,no_run
7347    /// # use google_cloud_dataplex_v1::model::CreateAspectTypeRequest;
7348    /// let x = CreateAspectTypeRequest::new().set_validate_only(true);
7349    /// ```
7350    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7351        self.validate_only = v.into();
7352        self
7353    }
7354}
7355
7356impl wkt::message::Message for CreateAspectTypeRequest {
7357    fn typename() -> &'static str {
7358        "type.googleapis.com/google.cloud.dataplex.v1.CreateAspectTypeRequest"
7359    }
7360}
7361
7362/// Update AspectType Request
7363#[derive(Clone, Default, PartialEq)]
7364#[non_exhaustive]
7365pub struct UpdateAspectTypeRequest {
7366    /// Required. AspectType Resource
7367    pub aspect_type: std::option::Option<crate::model::AspectType>,
7368
7369    /// Required. Mask of fields to update.
7370    pub update_mask: std::option::Option<wkt::FieldMask>,
7371
7372    /// Optional. Only validate the request, but do not perform mutations.
7373    /// The default is false.
7374    pub validate_only: bool,
7375
7376    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7377}
7378
7379impl UpdateAspectTypeRequest {
7380    pub fn new() -> Self {
7381        std::default::Default::default()
7382    }
7383
7384    /// Sets the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
7385    ///
7386    /// # Example
7387    /// ```ignore,no_run
7388    /// # use google_cloud_dataplex_v1::model::UpdateAspectTypeRequest;
7389    /// use google_cloud_dataplex_v1::model::AspectType;
7390    /// let x = UpdateAspectTypeRequest::new().set_aspect_type(AspectType::default()/* use setters */);
7391    /// ```
7392    pub fn set_aspect_type<T>(mut self, v: T) -> Self
7393    where
7394        T: std::convert::Into<crate::model::AspectType>,
7395    {
7396        self.aspect_type = std::option::Option::Some(v.into());
7397        self
7398    }
7399
7400    /// Sets or clears the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
7401    ///
7402    /// # Example
7403    /// ```ignore,no_run
7404    /// # use google_cloud_dataplex_v1::model::UpdateAspectTypeRequest;
7405    /// use google_cloud_dataplex_v1::model::AspectType;
7406    /// let x = UpdateAspectTypeRequest::new().set_or_clear_aspect_type(Some(AspectType::default()/* use setters */));
7407    /// let x = UpdateAspectTypeRequest::new().set_or_clear_aspect_type(None::<AspectType>);
7408    /// ```
7409    pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
7410    where
7411        T: std::convert::Into<crate::model::AspectType>,
7412    {
7413        self.aspect_type = v.map(|x| x.into());
7414        self
7415    }
7416
7417    /// Sets the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
7418    ///
7419    /// # Example
7420    /// ```ignore,no_run
7421    /// # use google_cloud_dataplex_v1::model::UpdateAspectTypeRequest;
7422    /// use wkt::FieldMask;
7423    /// let x = UpdateAspectTypeRequest::new().set_update_mask(FieldMask::default()/* use setters */);
7424    /// ```
7425    pub fn set_update_mask<T>(mut self, v: T) -> Self
7426    where
7427        T: std::convert::Into<wkt::FieldMask>,
7428    {
7429        self.update_mask = std::option::Option::Some(v.into());
7430        self
7431    }
7432
7433    /// Sets or clears the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
7434    ///
7435    /// # Example
7436    /// ```ignore,no_run
7437    /// # use google_cloud_dataplex_v1::model::UpdateAspectTypeRequest;
7438    /// use wkt::FieldMask;
7439    /// let x = UpdateAspectTypeRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
7440    /// let x = UpdateAspectTypeRequest::new().set_or_clear_update_mask(None::<FieldMask>);
7441    /// ```
7442    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7443    where
7444        T: std::convert::Into<wkt::FieldMask>,
7445    {
7446        self.update_mask = v.map(|x| x.into());
7447        self
7448    }
7449
7450    /// Sets the value of [validate_only][crate::model::UpdateAspectTypeRequest::validate_only].
7451    ///
7452    /// # Example
7453    /// ```ignore,no_run
7454    /// # use google_cloud_dataplex_v1::model::UpdateAspectTypeRequest;
7455    /// let x = UpdateAspectTypeRequest::new().set_validate_only(true);
7456    /// ```
7457    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7458        self.validate_only = v.into();
7459        self
7460    }
7461}
7462
7463impl wkt::message::Message for UpdateAspectTypeRequest {
7464    fn typename() -> &'static str {
7465        "type.googleapis.com/google.cloud.dataplex.v1.UpdateAspectTypeRequest"
7466    }
7467}
7468
7469/// Delete AspectType Request.
7470#[derive(Clone, Default, PartialEq)]
7471#[non_exhaustive]
7472pub struct DeleteAspectTypeRequest {
7473    /// Required. The resource name of the AspectType:
7474    /// `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
7475    pub name: std::string::String,
7476
7477    /// Optional. If the client provided etag value does not match the current etag
7478    /// value, the DeleteAspectTypeRequest method returns an ABORTED error
7479    /// response.
7480    pub etag: std::string::String,
7481
7482    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7483}
7484
7485impl DeleteAspectTypeRequest {
7486    pub fn new() -> Self {
7487        std::default::Default::default()
7488    }
7489
7490    /// Sets the value of [name][crate::model::DeleteAspectTypeRequest::name].
7491    ///
7492    /// # Example
7493    /// ```ignore,no_run
7494    /// # use google_cloud_dataplex_v1::model::DeleteAspectTypeRequest;
7495    /// let x = DeleteAspectTypeRequest::new().set_name("example");
7496    /// ```
7497    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7498        self.name = v.into();
7499        self
7500    }
7501
7502    /// Sets the value of [etag][crate::model::DeleteAspectTypeRequest::etag].
7503    ///
7504    /// # Example
7505    /// ```ignore,no_run
7506    /// # use google_cloud_dataplex_v1::model::DeleteAspectTypeRequest;
7507    /// let x = DeleteAspectTypeRequest::new().set_etag("example");
7508    /// ```
7509    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7510        self.etag = v.into();
7511        self
7512    }
7513}
7514
7515impl wkt::message::Message for DeleteAspectTypeRequest {
7516    fn typename() -> &'static str {
7517        "type.googleapis.com/google.cloud.dataplex.v1.DeleteAspectTypeRequest"
7518    }
7519}
7520
7521/// List AspectTypes request.
7522#[derive(Clone, Default, PartialEq)]
7523#[non_exhaustive]
7524pub struct ListAspectTypesRequest {
7525    /// Required. The resource name of the AspectType location, of the form:
7526    /// `projects/{project_number}/locations/{location_id}`
7527    /// where `location_id` refers to a Google Cloud region.
7528    pub parent: std::string::String,
7529
7530    /// Optional. Maximum number of AspectTypes to return. The service may return
7531    /// fewer than this value. If unspecified, the service returns at most 10
7532    /// AspectTypes. The maximum value is 1000; values above 1000 will be coerced
7533    /// to 1000.
7534    pub page_size: i32,
7535
7536    /// Optional. Page token received from a previous `ListAspectTypes` call.
7537    /// Provide this to retrieve the subsequent page. When paginating, all other
7538    /// parameters you provide to `ListAspectTypes` must match the call that
7539    /// provided the page token.
7540    pub page_token: std::string::String,
7541
7542    /// Optional. Filter request. Filters are case-sensitive.
7543    /// The service supports the following formats:
7544    ///
7545    /// * labels.key1 = "value1"
7546    /// * labels:key1
7547    /// * name = "value"
7548    ///
7549    /// These restrictions can be conjoined with AND, OR, and NOT conjunctions.
7550    pub filter: std::string::String,
7551
7552    /// Optional. Orders the result by `name` or `create_time` fields.
7553    /// If not specified, the ordering is undefined.
7554    pub order_by: std::string::String,
7555
7556    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7557}
7558
7559impl ListAspectTypesRequest {
7560    pub fn new() -> Self {
7561        std::default::Default::default()
7562    }
7563
7564    /// Sets the value of [parent][crate::model::ListAspectTypesRequest::parent].
7565    ///
7566    /// # Example
7567    /// ```ignore,no_run
7568    /// # use google_cloud_dataplex_v1::model::ListAspectTypesRequest;
7569    /// let x = ListAspectTypesRequest::new().set_parent("example");
7570    /// ```
7571    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7572        self.parent = v.into();
7573        self
7574    }
7575
7576    /// Sets the value of [page_size][crate::model::ListAspectTypesRequest::page_size].
7577    ///
7578    /// # Example
7579    /// ```ignore,no_run
7580    /// # use google_cloud_dataplex_v1::model::ListAspectTypesRequest;
7581    /// let x = ListAspectTypesRequest::new().set_page_size(42);
7582    /// ```
7583    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7584        self.page_size = v.into();
7585        self
7586    }
7587
7588    /// Sets the value of [page_token][crate::model::ListAspectTypesRequest::page_token].
7589    ///
7590    /// # Example
7591    /// ```ignore,no_run
7592    /// # use google_cloud_dataplex_v1::model::ListAspectTypesRequest;
7593    /// let x = ListAspectTypesRequest::new().set_page_token("example");
7594    /// ```
7595    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7596        self.page_token = v.into();
7597        self
7598    }
7599
7600    /// Sets the value of [filter][crate::model::ListAspectTypesRequest::filter].
7601    ///
7602    /// # Example
7603    /// ```ignore,no_run
7604    /// # use google_cloud_dataplex_v1::model::ListAspectTypesRequest;
7605    /// let x = ListAspectTypesRequest::new().set_filter("example");
7606    /// ```
7607    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7608        self.filter = v.into();
7609        self
7610    }
7611
7612    /// Sets the value of [order_by][crate::model::ListAspectTypesRequest::order_by].
7613    ///
7614    /// # Example
7615    /// ```ignore,no_run
7616    /// # use google_cloud_dataplex_v1::model::ListAspectTypesRequest;
7617    /// let x = ListAspectTypesRequest::new().set_order_by("example");
7618    /// ```
7619    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7620        self.order_by = v.into();
7621        self
7622    }
7623}
7624
7625impl wkt::message::Message for ListAspectTypesRequest {
7626    fn typename() -> &'static str {
7627        "type.googleapis.com/google.cloud.dataplex.v1.ListAspectTypesRequest"
7628    }
7629}
7630
7631/// List AspectTypes response.
7632#[derive(Clone, Default, PartialEq)]
7633#[non_exhaustive]
7634pub struct ListAspectTypesResponse {
7635    /// AspectTypes under the given parent location.
7636    pub aspect_types: std::vec::Vec<crate::model::AspectType>,
7637
7638    /// Token to retrieve the next page of results, or empty if there are no more
7639    /// results in the list.
7640    pub next_page_token: std::string::String,
7641
7642    /// Locations that the service couldn't reach.
7643    pub unreachable_locations: std::vec::Vec<std::string::String>,
7644
7645    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7646}
7647
7648impl ListAspectTypesResponse {
7649    pub fn new() -> Self {
7650        std::default::Default::default()
7651    }
7652
7653    /// Sets the value of [aspect_types][crate::model::ListAspectTypesResponse::aspect_types].
7654    ///
7655    /// # Example
7656    /// ```ignore,no_run
7657    /// # use google_cloud_dataplex_v1::model::ListAspectTypesResponse;
7658    /// use google_cloud_dataplex_v1::model::AspectType;
7659    /// let x = ListAspectTypesResponse::new()
7660    ///     .set_aspect_types([
7661    ///         AspectType::default()/* use setters */,
7662    ///         AspectType::default()/* use (different) setters */,
7663    ///     ]);
7664    /// ```
7665    pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
7666    where
7667        T: std::iter::IntoIterator<Item = V>,
7668        V: std::convert::Into<crate::model::AspectType>,
7669    {
7670        use std::iter::Iterator;
7671        self.aspect_types = v.into_iter().map(|i| i.into()).collect();
7672        self
7673    }
7674
7675    /// Sets the value of [next_page_token][crate::model::ListAspectTypesResponse::next_page_token].
7676    ///
7677    /// # Example
7678    /// ```ignore,no_run
7679    /// # use google_cloud_dataplex_v1::model::ListAspectTypesResponse;
7680    /// let x = ListAspectTypesResponse::new().set_next_page_token("example");
7681    /// ```
7682    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7683        self.next_page_token = v.into();
7684        self
7685    }
7686
7687    /// Sets the value of [unreachable_locations][crate::model::ListAspectTypesResponse::unreachable_locations].
7688    ///
7689    /// # Example
7690    /// ```ignore,no_run
7691    /// # use google_cloud_dataplex_v1::model::ListAspectTypesResponse;
7692    /// let x = ListAspectTypesResponse::new().set_unreachable_locations(["a", "b", "c"]);
7693    /// ```
7694    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
7695    where
7696        T: std::iter::IntoIterator<Item = V>,
7697        V: std::convert::Into<std::string::String>,
7698    {
7699        use std::iter::Iterator;
7700        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
7701        self
7702    }
7703}
7704
7705impl wkt::message::Message for ListAspectTypesResponse {
7706    fn typename() -> &'static str {
7707        "type.googleapis.com/google.cloud.dataplex.v1.ListAspectTypesResponse"
7708    }
7709}
7710
7711#[doc(hidden)]
7712impl google_cloud_gax::paginator::internal::PageableResponse for ListAspectTypesResponse {
7713    type PageItem = crate::model::AspectType;
7714
7715    fn items(self) -> std::vec::Vec<Self::PageItem> {
7716        self.aspect_types
7717    }
7718
7719    fn next_page_token(&self) -> std::string::String {
7720        use std::clone::Clone;
7721        self.next_page_token.clone()
7722    }
7723}
7724
7725/// Get AspectType request.
7726#[derive(Clone, Default, PartialEq)]
7727#[non_exhaustive]
7728pub struct GetAspectTypeRequest {
7729    /// Required. The resource name of the AspectType:
7730    /// `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
7731    pub name: std::string::String,
7732
7733    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7734}
7735
7736impl GetAspectTypeRequest {
7737    pub fn new() -> Self {
7738        std::default::Default::default()
7739    }
7740
7741    /// Sets the value of [name][crate::model::GetAspectTypeRequest::name].
7742    ///
7743    /// # Example
7744    /// ```ignore,no_run
7745    /// # use google_cloud_dataplex_v1::model::GetAspectTypeRequest;
7746    /// let x = GetAspectTypeRequest::new().set_name("example");
7747    /// ```
7748    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7749        self.name = v.into();
7750        self
7751    }
7752}
7753
7754impl wkt::message::Message for GetAspectTypeRequest {
7755    fn typename() -> &'static str {
7756        "type.googleapis.com/google.cloud.dataplex.v1.GetAspectTypeRequest"
7757    }
7758}
7759
7760/// Create Entry request.
7761#[derive(Clone, Default, PartialEq)]
7762#[non_exhaustive]
7763pub struct CreateEntryRequest {
7764    /// Required. The resource name of the parent Entry Group:
7765    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
7766    pub parent: std::string::String,
7767
7768    /// Required. Entry identifier. It has to be unique within an Entry Group.
7769    ///
7770    /// Entries corresponding to Google Cloud resources use an Entry ID format
7771    /// based on [full resource
7772    /// names](https://cloud.google.com/apis/design/resource_names#full_resource_name).
7773    /// The format is a full resource name of the resource without the
7774    /// prefix double slashes in the API service name part of the full resource
7775    /// name. This allows retrieval of entries using their associated resource
7776    /// name.
7777    ///
7778    /// For example, if the full resource name of a resource is
7779    /// `//library.googleapis.com/shelves/shelf1/books/book2`,
7780    /// then the suggested entry_id is
7781    /// `library.googleapis.com/shelves/shelf1/books/book2`.
7782    ///
7783    /// It is also suggested to follow the same convention for entries
7784    /// corresponding to resources from providers or systems other than Google
7785    /// Cloud.
7786    ///
7787    /// The maximum size of the field is 4000 characters.
7788    pub entry_id: std::string::String,
7789
7790    /// Required. Entry resource.
7791    pub entry: std::option::Option<crate::model::Entry>,
7792
7793    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7794}
7795
7796impl CreateEntryRequest {
7797    pub fn new() -> Self {
7798        std::default::Default::default()
7799    }
7800
7801    /// Sets the value of [parent][crate::model::CreateEntryRequest::parent].
7802    ///
7803    /// # Example
7804    /// ```ignore,no_run
7805    /// # use google_cloud_dataplex_v1::model::CreateEntryRequest;
7806    /// let x = CreateEntryRequest::new().set_parent("example");
7807    /// ```
7808    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7809        self.parent = v.into();
7810        self
7811    }
7812
7813    /// Sets the value of [entry_id][crate::model::CreateEntryRequest::entry_id].
7814    ///
7815    /// # Example
7816    /// ```ignore,no_run
7817    /// # use google_cloud_dataplex_v1::model::CreateEntryRequest;
7818    /// let x = CreateEntryRequest::new().set_entry_id("example");
7819    /// ```
7820    pub fn set_entry_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7821        self.entry_id = v.into();
7822        self
7823    }
7824
7825    /// Sets the value of [entry][crate::model::CreateEntryRequest::entry].
7826    ///
7827    /// # Example
7828    /// ```ignore,no_run
7829    /// # use google_cloud_dataplex_v1::model::CreateEntryRequest;
7830    /// use google_cloud_dataplex_v1::model::Entry;
7831    /// let x = CreateEntryRequest::new().set_entry(Entry::default()/* use setters */);
7832    /// ```
7833    pub fn set_entry<T>(mut self, v: T) -> Self
7834    where
7835        T: std::convert::Into<crate::model::Entry>,
7836    {
7837        self.entry = std::option::Option::Some(v.into());
7838        self
7839    }
7840
7841    /// Sets or clears the value of [entry][crate::model::CreateEntryRequest::entry].
7842    ///
7843    /// # Example
7844    /// ```ignore,no_run
7845    /// # use google_cloud_dataplex_v1::model::CreateEntryRequest;
7846    /// use google_cloud_dataplex_v1::model::Entry;
7847    /// let x = CreateEntryRequest::new().set_or_clear_entry(Some(Entry::default()/* use setters */));
7848    /// let x = CreateEntryRequest::new().set_or_clear_entry(None::<Entry>);
7849    /// ```
7850    pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
7851    where
7852        T: std::convert::Into<crate::model::Entry>,
7853    {
7854        self.entry = v.map(|x| x.into());
7855        self
7856    }
7857}
7858
7859impl wkt::message::Message for CreateEntryRequest {
7860    fn typename() -> &'static str {
7861        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryRequest"
7862    }
7863}
7864
7865/// Update Entry request.
7866#[derive(Clone, Default, PartialEq)]
7867#[non_exhaustive]
7868pub struct UpdateEntryRequest {
7869    /// Required. Entry resource.
7870    pub entry: std::option::Option<crate::model::Entry>,
7871
7872    /// Optional. Mask of fields to update. To update Aspects, the update_mask must
7873    /// contain the value "aspects".
7874    ///
7875    /// If the update_mask is empty, the service will update all modifiable fields
7876    /// present in the request.
7877    pub update_mask: std::option::Option<wkt::FieldMask>,
7878
7879    /// Optional. If set to true and the entry doesn't exist, the service will
7880    /// create it.
7881    pub allow_missing: bool,
7882
7883    /// Optional. If set to true and the aspect_keys specify aspect ranges, the
7884    /// service deletes any existing aspects from that range that weren't provided
7885    /// in the request.
7886    pub delete_missing_aspects: bool,
7887
7888    /// Optional. The map keys of the Aspects which the service should modify. It
7889    /// supports the following syntaxes:
7890    ///
7891    /// * `<aspect_type_reference>` - matches an aspect of the given type and empty
7892    ///   path.
7893    /// * `<aspect_type_reference>@path` - matches an aspect of the given type and
7894    ///   specified path. For example, to attach an aspect to a field that is
7895    ///   specified by the `schema` aspect, the path should have the format
7896    ///   `Schema.<field_name>`.
7897    /// * `<aspect_type_reference>@*` - matches aspects of the given type for all
7898    ///   paths.
7899    /// * `*@path` - matches aspects of all types on the given path.
7900    ///
7901    /// The service will not remove existing aspects matching the syntax unless
7902    /// `delete_missing_aspects` is set to true.
7903    ///
7904    /// If this field is left empty, the service treats it as specifying
7905    /// exactly those Aspects present in the request.
7906    pub aspect_keys: std::vec::Vec<std::string::String>,
7907
7908    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7909}
7910
7911impl UpdateEntryRequest {
7912    pub fn new() -> Self {
7913        std::default::Default::default()
7914    }
7915
7916    /// Sets the value of [entry][crate::model::UpdateEntryRequest::entry].
7917    ///
7918    /// # Example
7919    /// ```ignore,no_run
7920    /// # use google_cloud_dataplex_v1::model::UpdateEntryRequest;
7921    /// use google_cloud_dataplex_v1::model::Entry;
7922    /// let x = UpdateEntryRequest::new().set_entry(Entry::default()/* use setters */);
7923    /// ```
7924    pub fn set_entry<T>(mut self, v: T) -> Self
7925    where
7926        T: std::convert::Into<crate::model::Entry>,
7927    {
7928        self.entry = std::option::Option::Some(v.into());
7929        self
7930    }
7931
7932    /// Sets or clears the value of [entry][crate::model::UpdateEntryRequest::entry].
7933    ///
7934    /// # Example
7935    /// ```ignore,no_run
7936    /// # use google_cloud_dataplex_v1::model::UpdateEntryRequest;
7937    /// use google_cloud_dataplex_v1::model::Entry;
7938    /// let x = UpdateEntryRequest::new().set_or_clear_entry(Some(Entry::default()/* use setters */));
7939    /// let x = UpdateEntryRequest::new().set_or_clear_entry(None::<Entry>);
7940    /// ```
7941    pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
7942    where
7943        T: std::convert::Into<crate::model::Entry>,
7944    {
7945        self.entry = v.map(|x| x.into());
7946        self
7947    }
7948
7949    /// Sets the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
7950    ///
7951    /// # Example
7952    /// ```ignore,no_run
7953    /// # use google_cloud_dataplex_v1::model::UpdateEntryRequest;
7954    /// use wkt::FieldMask;
7955    /// let x = UpdateEntryRequest::new().set_update_mask(FieldMask::default()/* use setters */);
7956    /// ```
7957    pub fn set_update_mask<T>(mut self, v: T) -> Self
7958    where
7959        T: std::convert::Into<wkt::FieldMask>,
7960    {
7961        self.update_mask = std::option::Option::Some(v.into());
7962        self
7963    }
7964
7965    /// Sets or clears the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
7966    ///
7967    /// # Example
7968    /// ```ignore,no_run
7969    /// # use google_cloud_dataplex_v1::model::UpdateEntryRequest;
7970    /// use wkt::FieldMask;
7971    /// let x = UpdateEntryRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
7972    /// let x = UpdateEntryRequest::new().set_or_clear_update_mask(None::<FieldMask>);
7973    /// ```
7974    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7975    where
7976        T: std::convert::Into<wkt::FieldMask>,
7977    {
7978        self.update_mask = v.map(|x| x.into());
7979        self
7980    }
7981
7982    /// Sets the value of [allow_missing][crate::model::UpdateEntryRequest::allow_missing].
7983    ///
7984    /// # Example
7985    /// ```ignore,no_run
7986    /// # use google_cloud_dataplex_v1::model::UpdateEntryRequest;
7987    /// let x = UpdateEntryRequest::new().set_allow_missing(true);
7988    /// ```
7989    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7990        self.allow_missing = v.into();
7991        self
7992    }
7993
7994    /// Sets the value of [delete_missing_aspects][crate::model::UpdateEntryRequest::delete_missing_aspects].
7995    ///
7996    /// # Example
7997    /// ```ignore,no_run
7998    /// # use google_cloud_dataplex_v1::model::UpdateEntryRequest;
7999    /// let x = UpdateEntryRequest::new().set_delete_missing_aspects(true);
8000    /// ```
8001    pub fn set_delete_missing_aspects<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8002        self.delete_missing_aspects = v.into();
8003        self
8004    }
8005
8006    /// Sets the value of [aspect_keys][crate::model::UpdateEntryRequest::aspect_keys].
8007    ///
8008    /// # Example
8009    /// ```ignore,no_run
8010    /// # use google_cloud_dataplex_v1::model::UpdateEntryRequest;
8011    /// let x = UpdateEntryRequest::new().set_aspect_keys(["a", "b", "c"]);
8012    /// ```
8013    pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
8014    where
8015        T: std::iter::IntoIterator<Item = V>,
8016        V: std::convert::Into<std::string::String>,
8017    {
8018        use std::iter::Iterator;
8019        self.aspect_keys = v.into_iter().map(|i| i.into()).collect();
8020        self
8021    }
8022}
8023
8024impl wkt::message::Message for UpdateEntryRequest {
8025    fn typename() -> &'static str {
8026        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntryRequest"
8027    }
8028}
8029
8030/// Delete Entry request.
8031#[derive(Clone, Default, PartialEq)]
8032#[non_exhaustive]
8033pub struct DeleteEntryRequest {
8034    /// Required. The resource name of the Entry:
8035    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
8036    pub name: std::string::String,
8037
8038    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8039}
8040
8041impl DeleteEntryRequest {
8042    pub fn new() -> Self {
8043        std::default::Default::default()
8044    }
8045
8046    /// Sets the value of [name][crate::model::DeleteEntryRequest::name].
8047    ///
8048    /// # Example
8049    /// ```ignore,no_run
8050    /// # use google_cloud_dataplex_v1::model::DeleteEntryRequest;
8051    /// let x = DeleteEntryRequest::new().set_name("example");
8052    /// ```
8053    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8054        self.name = v.into();
8055        self
8056    }
8057}
8058
8059impl wkt::message::Message for DeleteEntryRequest {
8060    fn typename() -> &'static str {
8061        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryRequest"
8062    }
8063}
8064
8065/// List Entries request.
8066#[derive(Clone, Default, PartialEq)]
8067#[non_exhaustive]
8068pub struct ListEntriesRequest {
8069    /// Required. The resource name of the parent Entry Group:
8070    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
8071    pub parent: std::string::String,
8072
8073    /// Optional. Number of items to return per page. If there are remaining
8074    /// results, the service returns a next_page_token. If unspecified, the service
8075    /// returns at most 10 Entries. The maximum value is 100; values above 100 will
8076    /// be coerced to 100.
8077    pub page_size: i32,
8078
8079    /// Optional. Page token received from a previous `ListEntries` call. Provide
8080    /// this to retrieve the subsequent page.
8081    pub page_token: std::string::String,
8082
8083    /// Optional. A filter on the entries to return. Filters are case-sensitive.
8084    /// You can filter the request by the following fields:
8085    ///
8086    /// * entry_type
8087    /// * entry_source.display_name
8088    /// * parent_entry
8089    ///
8090    /// The comparison operators are =, !=, <, >, <=, >=. The service compares
8091    /// strings according to lexical order.
8092    ///
8093    /// You can use the logical operators AND, OR, NOT in the filter.
8094    ///
8095    /// You can use Wildcard "*", but for entry_type and parent_entry you need to
8096    /// provide the full project id or number.
8097    ///
8098    /// You cannot use parent_entry in conjunction with other fields.
8099    ///
8100    /// Example filter expressions:
8101    ///
8102    /// * "entry_source.display_name=AnExampleDisplayName"
8103    /// * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type"
8104    /// * "entry_type=projects/example-project/locations/us/entryTypes/a* OR
8105    ///   entry_type=projects/another-project/locations/*"
8106    /// * "NOT entry_source.display_name=AnotherExampleDisplayName"
8107    /// * "parent_entry=projects/example-project/locations/us/entryGroups/example-entry-group/entries/example-entry"
8108    pub filter: std::string::String,
8109
8110    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8111}
8112
8113impl ListEntriesRequest {
8114    pub fn new() -> Self {
8115        std::default::Default::default()
8116    }
8117
8118    /// Sets the value of [parent][crate::model::ListEntriesRequest::parent].
8119    ///
8120    /// # Example
8121    /// ```ignore,no_run
8122    /// # use google_cloud_dataplex_v1::model::ListEntriesRequest;
8123    /// let x = ListEntriesRequest::new().set_parent("example");
8124    /// ```
8125    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8126        self.parent = v.into();
8127        self
8128    }
8129
8130    /// Sets the value of [page_size][crate::model::ListEntriesRequest::page_size].
8131    ///
8132    /// # Example
8133    /// ```ignore,no_run
8134    /// # use google_cloud_dataplex_v1::model::ListEntriesRequest;
8135    /// let x = ListEntriesRequest::new().set_page_size(42);
8136    /// ```
8137    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8138        self.page_size = v.into();
8139        self
8140    }
8141
8142    /// Sets the value of [page_token][crate::model::ListEntriesRequest::page_token].
8143    ///
8144    /// # Example
8145    /// ```ignore,no_run
8146    /// # use google_cloud_dataplex_v1::model::ListEntriesRequest;
8147    /// let x = ListEntriesRequest::new().set_page_token("example");
8148    /// ```
8149    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8150        self.page_token = v.into();
8151        self
8152    }
8153
8154    /// Sets the value of [filter][crate::model::ListEntriesRequest::filter].
8155    ///
8156    /// # Example
8157    /// ```ignore,no_run
8158    /// # use google_cloud_dataplex_v1::model::ListEntriesRequest;
8159    /// let x = ListEntriesRequest::new().set_filter("example");
8160    /// ```
8161    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8162        self.filter = v.into();
8163        self
8164    }
8165}
8166
8167impl wkt::message::Message for ListEntriesRequest {
8168    fn typename() -> &'static str {
8169        "type.googleapis.com/google.cloud.dataplex.v1.ListEntriesRequest"
8170    }
8171}
8172
8173/// List Entries response.
8174#[derive(Clone, Default, PartialEq)]
8175#[non_exhaustive]
8176pub struct ListEntriesResponse {
8177    /// The list of entries under the given parent location.
8178    pub entries: std::vec::Vec<crate::model::Entry>,
8179
8180    /// Token to retrieve the next page of results, or empty if there are no more
8181    /// results in the list.
8182    pub next_page_token: std::string::String,
8183
8184    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8185}
8186
8187impl ListEntriesResponse {
8188    pub fn new() -> Self {
8189        std::default::Default::default()
8190    }
8191
8192    /// Sets the value of [entries][crate::model::ListEntriesResponse::entries].
8193    ///
8194    /// # Example
8195    /// ```ignore,no_run
8196    /// # use google_cloud_dataplex_v1::model::ListEntriesResponse;
8197    /// use google_cloud_dataplex_v1::model::Entry;
8198    /// let x = ListEntriesResponse::new()
8199    ///     .set_entries([
8200    ///         Entry::default()/* use setters */,
8201    ///         Entry::default()/* use (different) setters */,
8202    ///     ]);
8203    /// ```
8204    pub fn set_entries<T, V>(mut self, v: T) -> Self
8205    where
8206        T: std::iter::IntoIterator<Item = V>,
8207        V: std::convert::Into<crate::model::Entry>,
8208    {
8209        use std::iter::Iterator;
8210        self.entries = v.into_iter().map(|i| i.into()).collect();
8211        self
8212    }
8213
8214    /// Sets the value of [next_page_token][crate::model::ListEntriesResponse::next_page_token].
8215    ///
8216    /// # Example
8217    /// ```ignore,no_run
8218    /// # use google_cloud_dataplex_v1::model::ListEntriesResponse;
8219    /// let x = ListEntriesResponse::new().set_next_page_token("example");
8220    /// ```
8221    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8222        self.next_page_token = v.into();
8223        self
8224    }
8225}
8226
8227impl wkt::message::Message for ListEntriesResponse {
8228    fn typename() -> &'static str {
8229        "type.googleapis.com/google.cloud.dataplex.v1.ListEntriesResponse"
8230    }
8231}
8232
8233#[doc(hidden)]
8234impl google_cloud_gax::paginator::internal::PageableResponse for ListEntriesResponse {
8235    type PageItem = crate::model::Entry;
8236
8237    fn items(self) -> std::vec::Vec<Self::PageItem> {
8238        self.entries
8239    }
8240
8241    fn next_page_token(&self) -> std::string::String {
8242        use std::clone::Clone;
8243        self.next_page_token.clone()
8244    }
8245}
8246
8247/// Get Entry request.
8248#[derive(Clone, Default, PartialEq)]
8249#[non_exhaustive]
8250pub struct GetEntryRequest {
8251    /// Required. The resource name of the Entry:
8252    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
8253    pub name: std::string::String,
8254
8255    /// Optional. View to control which parts of an entry the service should
8256    /// return.
8257    pub view: crate::model::EntryView,
8258
8259    /// Optional. Limits the aspects returned to the provided aspect types.
8260    /// It only works for CUSTOM view.
8261    pub aspect_types: std::vec::Vec<std::string::String>,
8262
8263    /// Optional. Limits the aspects returned to those associated with the provided
8264    /// paths within the Entry. It only works for CUSTOM view.
8265    pub paths: std::vec::Vec<std::string::String>,
8266
8267    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8268}
8269
8270impl GetEntryRequest {
8271    pub fn new() -> Self {
8272        std::default::Default::default()
8273    }
8274
8275    /// Sets the value of [name][crate::model::GetEntryRequest::name].
8276    ///
8277    /// # Example
8278    /// ```ignore,no_run
8279    /// # use google_cloud_dataplex_v1::model::GetEntryRequest;
8280    /// let x = GetEntryRequest::new().set_name("example");
8281    /// ```
8282    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8283        self.name = v.into();
8284        self
8285    }
8286
8287    /// Sets the value of [view][crate::model::GetEntryRequest::view].
8288    ///
8289    /// # Example
8290    /// ```ignore,no_run
8291    /// # use google_cloud_dataplex_v1::model::GetEntryRequest;
8292    /// use google_cloud_dataplex_v1::model::EntryView;
8293    /// let x0 = GetEntryRequest::new().set_view(EntryView::Basic);
8294    /// let x1 = GetEntryRequest::new().set_view(EntryView::Full);
8295    /// let x2 = GetEntryRequest::new().set_view(EntryView::Custom);
8296    /// ```
8297    pub fn set_view<T: std::convert::Into<crate::model::EntryView>>(mut self, v: T) -> Self {
8298        self.view = v.into();
8299        self
8300    }
8301
8302    /// Sets the value of [aspect_types][crate::model::GetEntryRequest::aspect_types].
8303    ///
8304    /// # Example
8305    /// ```ignore,no_run
8306    /// # use google_cloud_dataplex_v1::model::GetEntryRequest;
8307    /// let x = GetEntryRequest::new().set_aspect_types(["a", "b", "c"]);
8308    /// ```
8309    pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
8310    where
8311        T: std::iter::IntoIterator<Item = V>,
8312        V: std::convert::Into<std::string::String>,
8313    {
8314        use std::iter::Iterator;
8315        self.aspect_types = v.into_iter().map(|i| i.into()).collect();
8316        self
8317    }
8318
8319    /// Sets the value of [paths][crate::model::GetEntryRequest::paths].
8320    ///
8321    /// # Example
8322    /// ```ignore,no_run
8323    /// # use google_cloud_dataplex_v1::model::GetEntryRequest;
8324    /// let x = GetEntryRequest::new().set_paths(["a", "b", "c"]);
8325    /// ```
8326    pub fn set_paths<T, V>(mut self, v: T) -> Self
8327    where
8328        T: std::iter::IntoIterator<Item = V>,
8329        V: std::convert::Into<std::string::String>,
8330    {
8331        use std::iter::Iterator;
8332        self.paths = v.into_iter().map(|i| i.into()).collect();
8333        self
8334    }
8335}
8336
8337impl wkt::message::Message for GetEntryRequest {
8338    fn typename() -> &'static str {
8339        "type.googleapis.com/google.cloud.dataplex.v1.GetEntryRequest"
8340    }
8341}
8342
8343/// Lookup Entry request using permissions in the source system.
8344#[derive(Clone, Default, PartialEq)]
8345#[non_exhaustive]
8346pub struct LookupEntryRequest {
8347    /// Required. The project to which the request should be attributed in the
8348    /// following form: `projects/{project}/locations/{location}`.
8349    pub name: std::string::String,
8350
8351    /// Optional. View to control which parts of an entry the service should
8352    /// return.
8353    pub view: crate::model::EntryView,
8354
8355    /// Optional. Limits the aspects returned to the provided aspect types.
8356    /// It only works for CUSTOM view.
8357    pub aspect_types: std::vec::Vec<std::string::String>,
8358
8359    /// Optional. Limits the aspects returned to those associated with the provided
8360    /// paths within the Entry. It only works for CUSTOM view.
8361    pub paths: std::vec::Vec<std::string::String>,
8362
8363    /// Required. The resource name of the Entry:
8364    /// `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
8365    pub entry: std::string::String,
8366
8367    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8368}
8369
8370impl LookupEntryRequest {
8371    pub fn new() -> Self {
8372        std::default::Default::default()
8373    }
8374
8375    /// Sets the value of [name][crate::model::LookupEntryRequest::name].
8376    ///
8377    /// # Example
8378    /// ```ignore,no_run
8379    /// # use google_cloud_dataplex_v1::model::LookupEntryRequest;
8380    /// let x = LookupEntryRequest::new().set_name("example");
8381    /// ```
8382    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8383        self.name = v.into();
8384        self
8385    }
8386
8387    /// Sets the value of [view][crate::model::LookupEntryRequest::view].
8388    ///
8389    /// # Example
8390    /// ```ignore,no_run
8391    /// # use google_cloud_dataplex_v1::model::LookupEntryRequest;
8392    /// use google_cloud_dataplex_v1::model::EntryView;
8393    /// let x0 = LookupEntryRequest::new().set_view(EntryView::Basic);
8394    /// let x1 = LookupEntryRequest::new().set_view(EntryView::Full);
8395    /// let x2 = LookupEntryRequest::new().set_view(EntryView::Custom);
8396    /// ```
8397    pub fn set_view<T: std::convert::Into<crate::model::EntryView>>(mut self, v: T) -> Self {
8398        self.view = v.into();
8399        self
8400    }
8401
8402    /// Sets the value of [aspect_types][crate::model::LookupEntryRequest::aspect_types].
8403    ///
8404    /// # Example
8405    /// ```ignore,no_run
8406    /// # use google_cloud_dataplex_v1::model::LookupEntryRequest;
8407    /// let x = LookupEntryRequest::new().set_aspect_types(["a", "b", "c"]);
8408    /// ```
8409    pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
8410    where
8411        T: std::iter::IntoIterator<Item = V>,
8412        V: std::convert::Into<std::string::String>,
8413    {
8414        use std::iter::Iterator;
8415        self.aspect_types = v.into_iter().map(|i| i.into()).collect();
8416        self
8417    }
8418
8419    /// Sets the value of [paths][crate::model::LookupEntryRequest::paths].
8420    ///
8421    /// # Example
8422    /// ```ignore,no_run
8423    /// # use google_cloud_dataplex_v1::model::LookupEntryRequest;
8424    /// let x = LookupEntryRequest::new().set_paths(["a", "b", "c"]);
8425    /// ```
8426    pub fn set_paths<T, V>(mut self, v: T) -> Self
8427    where
8428        T: std::iter::IntoIterator<Item = V>,
8429        V: std::convert::Into<std::string::String>,
8430    {
8431        use std::iter::Iterator;
8432        self.paths = v.into_iter().map(|i| i.into()).collect();
8433        self
8434    }
8435
8436    /// Sets the value of [entry][crate::model::LookupEntryRequest::entry].
8437    ///
8438    /// # Example
8439    /// ```ignore,no_run
8440    /// # use google_cloud_dataplex_v1::model::LookupEntryRequest;
8441    /// let x = LookupEntryRequest::new().set_entry("example");
8442    /// ```
8443    pub fn set_entry<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8444        self.entry = v.into();
8445        self
8446    }
8447}
8448
8449impl wkt::message::Message for LookupEntryRequest {
8450    fn typename() -> &'static str {
8451        "type.googleapis.com/google.cloud.dataplex.v1.LookupEntryRequest"
8452    }
8453}
8454
8455#[derive(Clone, Default, PartialEq)]
8456#[non_exhaustive]
8457pub struct SearchEntriesRequest {
8458    /// Required. The project to which the request should be attributed in the
8459    /// following form: `projects/{project}/locations/global`.
8460    pub name: std::string::String,
8461
8462    /// Required. The query against which entries in scope should be matched.
8463    /// The query syntax is defined in [Search syntax for Dataplex Universal
8464    /// Catalog](https://cloud.google.com/dataplex/docs/search-syntax).
8465    pub query: std::string::String,
8466
8467    /// Optional. Number of results in the search page. If <=0, then defaults
8468    /// to 10. Max limit for page_size is 1000. Throws an invalid argument for
8469    /// page_size > 1000.
8470    pub page_size: i32,
8471
8472    /// Optional. Page token received from a previous `SearchEntries` call. Provide
8473    /// this to retrieve the subsequent page.
8474    pub page_token: std::string::String,
8475
8476    /// Optional. Specifies the ordering of results.
8477    /// Supported values are:
8478    ///
8479    /// * `relevance`
8480    /// * `last_modified_timestamp`
8481    /// * `last_modified_timestamp asc`
8482    pub order_by: std::string::String,
8483
8484    /// Optional. The scope under which the search should be operating. It must
8485    /// either be `organizations/<org_id>` or `projects/<project_ref>`. If it is
8486    /// unspecified, it defaults to the organization where the project provided in
8487    /// `name` is located.
8488    pub scope: std::string::String,
8489
8490    /// Optional. Specifies whether the search should understand the meaning and
8491    /// intent behind the query, rather than just matching keywords.
8492    pub semantic_search: bool,
8493
8494    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8495}
8496
8497impl SearchEntriesRequest {
8498    pub fn new() -> Self {
8499        std::default::Default::default()
8500    }
8501
8502    /// Sets the value of [name][crate::model::SearchEntriesRequest::name].
8503    ///
8504    /// # Example
8505    /// ```ignore,no_run
8506    /// # use google_cloud_dataplex_v1::model::SearchEntriesRequest;
8507    /// let x = SearchEntriesRequest::new().set_name("example");
8508    /// ```
8509    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8510        self.name = v.into();
8511        self
8512    }
8513
8514    /// Sets the value of [query][crate::model::SearchEntriesRequest::query].
8515    ///
8516    /// # Example
8517    /// ```ignore,no_run
8518    /// # use google_cloud_dataplex_v1::model::SearchEntriesRequest;
8519    /// let x = SearchEntriesRequest::new().set_query("example");
8520    /// ```
8521    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8522        self.query = v.into();
8523        self
8524    }
8525
8526    /// Sets the value of [page_size][crate::model::SearchEntriesRequest::page_size].
8527    ///
8528    /// # Example
8529    /// ```ignore,no_run
8530    /// # use google_cloud_dataplex_v1::model::SearchEntriesRequest;
8531    /// let x = SearchEntriesRequest::new().set_page_size(42);
8532    /// ```
8533    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8534        self.page_size = v.into();
8535        self
8536    }
8537
8538    /// Sets the value of [page_token][crate::model::SearchEntriesRequest::page_token].
8539    ///
8540    /// # Example
8541    /// ```ignore,no_run
8542    /// # use google_cloud_dataplex_v1::model::SearchEntriesRequest;
8543    /// let x = SearchEntriesRequest::new().set_page_token("example");
8544    /// ```
8545    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8546        self.page_token = v.into();
8547        self
8548    }
8549
8550    /// Sets the value of [order_by][crate::model::SearchEntriesRequest::order_by].
8551    ///
8552    /// # Example
8553    /// ```ignore,no_run
8554    /// # use google_cloud_dataplex_v1::model::SearchEntriesRequest;
8555    /// let x = SearchEntriesRequest::new().set_order_by("example");
8556    /// ```
8557    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8558        self.order_by = v.into();
8559        self
8560    }
8561
8562    /// Sets the value of [scope][crate::model::SearchEntriesRequest::scope].
8563    ///
8564    /// # Example
8565    /// ```ignore,no_run
8566    /// # use google_cloud_dataplex_v1::model::SearchEntriesRequest;
8567    /// let x = SearchEntriesRequest::new().set_scope("example");
8568    /// ```
8569    pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8570        self.scope = v.into();
8571        self
8572    }
8573
8574    /// Sets the value of [semantic_search][crate::model::SearchEntriesRequest::semantic_search].
8575    ///
8576    /// # Example
8577    /// ```ignore,no_run
8578    /// # use google_cloud_dataplex_v1::model::SearchEntriesRequest;
8579    /// let x = SearchEntriesRequest::new().set_semantic_search(true);
8580    /// ```
8581    pub fn set_semantic_search<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8582        self.semantic_search = v.into();
8583        self
8584    }
8585}
8586
8587impl wkt::message::Message for SearchEntriesRequest {
8588    fn typename() -> &'static str {
8589        "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesRequest"
8590    }
8591}
8592
8593/// A single result of a SearchEntries request.
8594#[derive(Clone, Default, PartialEq)]
8595#[non_exhaustive]
8596pub struct SearchEntriesResult {
8597    /// Linked resource name.
8598    #[deprecated]
8599    pub linked_resource: std::string::String,
8600
8601    pub dataplex_entry: std::option::Option<crate::model::Entry>,
8602
8603    /// Snippets.
8604    #[deprecated]
8605    pub snippets: std::option::Option<crate::model::search_entries_result::Snippets>,
8606
8607    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8608}
8609
8610impl SearchEntriesResult {
8611    pub fn new() -> Self {
8612        std::default::Default::default()
8613    }
8614
8615    /// Sets the value of [linked_resource][crate::model::SearchEntriesResult::linked_resource].
8616    ///
8617    /// # Example
8618    /// ```ignore,no_run
8619    /// # use google_cloud_dataplex_v1::model::SearchEntriesResult;
8620    /// let x = SearchEntriesResult::new().set_linked_resource("example");
8621    /// ```
8622    #[deprecated]
8623    pub fn set_linked_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8624        self.linked_resource = v.into();
8625        self
8626    }
8627
8628    /// Sets the value of [dataplex_entry][crate::model::SearchEntriesResult::dataplex_entry].
8629    ///
8630    /// # Example
8631    /// ```ignore,no_run
8632    /// # use google_cloud_dataplex_v1::model::SearchEntriesResult;
8633    /// use google_cloud_dataplex_v1::model::Entry;
8634    /// let x = SearchEntriesResult::new().set_dataplex_entry(Entry::default()/* use setters */);
8635    /// ```
8636    pub fn set_dataplex_entry<T>(mut self, v: T) -> Self
8637    where
8638        T: std::convert::Into<crate::model::Entry>,
8639    {
8640        self.dataplex_entry = std::option::Option::Some(v.into());
8641        self
8642    }
8643
8644    /// Sets or clears the value of [dataplex_entry][crate::model::SearchEntriesResult::dataplex_entry].
8645    ///
8646    /// # Example
8647    /// ```ignore,no_run
8648    /// # use google_cloud_dataplex_v1::model::SearchEntriesResult;
8649    /// use google_cloud_dataplex_v1::model::Entry;
8650    /// let x = SearchEntriesResult::new().set_or_clear_dataplex_entry(Some(Entry::default()/* use setters */));
8651    /// let x = SearchEntriesResult::new().set_or_clear_dataplex_entry(None::<Entry>);
8652    /// ```
8653    pub fn set_or_clear_dataplex_entry<T>(mut self, v: std::option::Option<T>) -> Self
8654    where
8655        T: std::convert::Into<crate::model::Entry>,
8656    {
8657        self.dataplex_entry = v.map(|x| x.into());
8658        self
8659    }
8660
8661    /// Sets the value of [snippets][crate::model::SearchEntriesResult::snippets].
8662    ///
8663    /// # Example
8664    /// ```ignore,no_run
8665    /// # use google_cloud_dataplex_v1::model::SearchEntriesResult;
8666    /// use google_cloud_dataplex_v1::model::search_entries_result::Snippets;
8667    /// let x = SearchEntriesResult::new().set_snippets(Snippets::default()/* use setters */);
8668    /// ```
8669    #[deprecated]
8670    pub fn set_snippets<T>(mut self, v: T) -> Self
8671    where
8672        T: std::convert::Into<crate::model::search_entries_result::Snippets>,
8673    {
8674        self.snippets = std::option::Option::Some(v.into());
8675        self
8676    }
8677
8678    /// Sets or clears the value of [snippets][crate::model::SearchEntriesResult::snippets].
8679    ///
8680    /// # Example
8681    /// ```ignore,no_run
8682    /// # use google_cloud_dataplex_v1::model::SearchEntriesResult;
8683    /// use google_cloud_dataplex_v1::model::search_entries_result::Snippets;
8684    /// let x = SearchEntriesResult::new().set_or_clear_snippets(Some(Snippets::default()/* use setters */));
8685    /// let x = SearchEntriesResult::new().set_or_clear_snippets(None::<Snippets>);
8686    /// ```
8687    #[deprecated]
8688    pub fn set_or_clear_snippets<T>(mut self, v: std::option::Option<T>) -> Self
8689    where
8690        T: std::convert::Into<crate::model::search_entries_result::Snippets>,
8691    {
8692        self.snippets = v.map(|x| x.into());
8693        self
8694    }
8695}
8696
8697impl wkt::message::Message for SearchEntriesResult {
8698    fn typename() -> &'static str {
8699        "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesResult"
8700    }
8701}
8702
8703/// Defines additional types related to [SearchEntriesResult].
8704pub mod search_entries_result {
8705    #[allow(unused_imports)]
8706    use super::*;
8707
8708    /// Snippets for the entry, contains HTML-style highlighting for
8709    /// matched tokens, will be used in UI.
8710    #[derive(Clone, Default, PartialEq)]
8711    #[non_exhaustive]
8712    #[deprecated]
8713    pub struct Snippets {
8714        /// Entry
8715        #[deprecated]
8716        pub dataplex_entry: std::option::Option<crate::model::Entry>,
8717
8718        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8719    }
8720
8721    impl Snippets {
8722        pub fn new() -> Self {
8723            std::default::Default::default()
8724        }
8725
8726        /// Sets the value of [dataplex_entry][crate::model::search_entries_result::Snippets::dataplex_entry].
8727        ///
8728        /// # Example
8729        /// ```ignore,no_run
8730        /// # use google_cloud_dataplex_v1::model::search_entries_result::Snippets;
8731        /// use google_cloud_dataplex_v1::model::Entry;
8732        /// let x = Snippets::new().set_dataplex_entry(Entry::default()/* use setters */);
8733        /// ```
8734        #[deprecated]
8735        pub fn set_dataplex_entry<T>(mut self, v: T) -> Self
8736        where
8737            T: std::convert::Into<crate::model::Entry>,
8738        {
8739            self.dataplex_entry = std::option::Option::Some(v.into());
8740            self
8741        }
8742
8743        /// Sets or clears the value of [dataplex_entry][crate::model::search_entries_result::Snippets::dataplex_entry].
8744        ///
8745        /// # Example
8746        /// ```ignore,no_run
8747        /// # use google_cloud_dataplex_v1::model::search_entries_result::Snippets;
8748        /// use google_cloud_dataplex_v1::model::Entry;
8749        /// let x = Snippets::new().set_or_clear_dataplex_entry(Some(Entry::default()/* use setters */));
8750        /// let x = Snippets::new().set_or_clear_dataplex_entry(None::<Entry>);
8751        /// ```
8752        #[deprecated]
8753        pub fn set_or_clear_dataplex_entry<T>(mut self, v: std::option::Option<T>) -> Self
8754        where
8755            T: std::convert::Into<crate::model::Entry>,
8756        {
8757            self.dataplex_entry = v.map(|x| x.into());
8758            self
8759        }
8760    }
8761
8762    impl wkt::message::Message for Snippets {
8763        fn typename() -> &'static str {
8764            "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesResult.Snippets"
8765        }
8766    }
8767}
8768
8769#[derive(Clone, Default, PartialEq)]
8770#[non_exhaustive]
8771pub struct SearchEntriesResponse {
8772    /// The results matching the search query.
8773    pub results: std::vec::Vec<crate::model::SearchEntriesResult>,
8774
8775    /// The estimated total number of matching entries. This number isn't
8776    /// guaranteed to be accurate.
8777    pub total_size: i32,
8778
8779    /// Token to retrieve the next page of results, or empty if there are no more
8780    /// results in the list.
8781    pub next_page_token: std::string::String,
8782
8783    /// Locations that the service couldn't reach. Search results don't include
8784    /// data from these locations.
8785    pub unreachable: std::vec::Vec<std::string::String>,
8786
8787    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8788}
8789
8790impl SearchEntriesResponse {
8791    pub fn new() -> Self {
8792        std::default::Default::default()
8793    }
8794
8795    /// Sets the value of [results][crate::model::SearchEntriesResponse::results].
8796    ///
8797    /// # Example
8798    /// ```ignore,no_run
8799    /// # use google_cloud_dataplex_v1::model::SearchEntriesResponse;
8800    /// use google_cloud_dataplex_v1::model::SearchEntriesResult;
8801    /// let x = SearchEntriesResponse::new()
8802    ///     .set_results([
8803    ///         SearchEntriesResult::default()/* use setters */,
8804    ///         SearchEntriesResult::default()/* use (different) setters */,
8805    ///     ]);
8806    /// ```
8807    pub fn set_results<T, V>(mut self, v: T) -> Self
8808    where
8809        T: std::iter::IntoIterator<Item = V>,
8810        V: std::convert::Into<crate::model::SearchEntriesResult>,
8811    {
8812        use std::iter::Iterator;
8813        self.results = v.into_iter().map(|i| i.into()).collect();
8814        self
8815    }
8816
8817    /// Sets the value of [total_size][crate::model::SearchEntriesResponse::total_size].
8818    ///
8819    /// # Example
8820    /// ```ignore,no_run
8821    /// # use google_cloud_dataplex_v1::model::SearchEntriesResponse;
8822    /// let x = SearchEntriesResponse::new().set_total_size(42);
8823    /// ```
8824    pub fn set_total_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8825        self.total_size = v.into();
8826        self
8827    }
8828
8829    /// Sets the value of [next_page_token][crate::model::SearchEntriesResponse::next_page_token].
8830    ///
8831    /// # Example
8832    /// ```ignore,no_run
8833    /// # use google_cloud_dataplex_v1::model::SearchEntriesResponse;
8834    /// let x = SearchEntriesResponse::new().set_next_page_token("example");
8835    /// ```
8836    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8837        self.next_page_token = v.into();
8838        self
8839    }
8840
8841    /// Sets the value of [unreachable][crate::model::SearchEntriesResponse::unreachable].
8842    ///
8843    /// # Example
8844    /// ```ignore,no_run
8845    /// # use google_cloud_dataplex_v1::model::SearchEntriesResponse;
8846    /// let x = SearchEntriesResponse::new().set_unreachable(["a", "b", "c"]);
8847    /// ```
8848    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
8849    where
8850        T: std::iter::IntoIterator<Item = V>,
8851        V: std::convert::Into<std::string::String>,
8852    {
8853        use std::iter::Iterator;
8854        self.unreachable = v.into_iter().map(|i| i.into()).collect();
8855        self
8856    }
8857}
8858
8859impl wkt::message::Message for SearchEntriesResponse {
8860    fn typename() -> &'static str {
8861        "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesResponse"
8862    }
8863}
8864
8865#[doc(hidden)]
8866impl google_cloud_gax::paginator::internal::PageableResponse for SearchEntriesResponse {
8867    type PageItem = crate::model::SearchEntriesResult;
8868
8869    fn items(self) -> std::vec::Vec<Self::PageItem> {
8870        self.results
8871    }
8872
8873    fn next_page_token(&self) -> std::string::String {
8874        use std::clone::Clone;
8875        self.next_page_token.clone()
8876    }
8877}
8878
8879/// An object that describes the values that you want to set for an entry and its
8880/// attached aspects when you import metadata. Used when you run a metadata
8881/// import job. See
8882/// [CreateMetadataJob][google.cloud.dataplex.v1.CatalogService.CreateMetadataJob].
8883///
8884/// You provide a collection of import items in a metadata import file. For more
8885/// information about how to create a metadata import file, see [Metadata import
8886/// file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file).
8887///
8888/// [google.cloud.dataplex.v1.CatalogService.CreateMetadataJob]: crate::client::CatalogService::create_metadata_job
8889#[derive(Clone, Default, PartialEq)]
8890#[non_exhaustive]
8891pub struct ImportItem {
8892    /// Information about an entry and its attached aspects.
8893    pub entry: std::option::Option<crate::model::Entry>,
8894
8895    /// Information about the entry link. User should provide either one of the
8896    /// entry or entry_link. While providing entry_link, user should not
8897    /// provide update_mask and aspect_keys.
8898    pub entry_link: std::option::Option<crate::model::EntryLink>,
8899
8900    /// The fields to update, in paths that are relative to the `Entry` resource.
8901    /// Separate each field with a comma.
8902    ///
8903    /// In `FULL` entry sync mode, Dataplex Universal Catalog includes the paths of
8904    /// all of the fields for an entry that can be modified, including aspects.
8905    /// This means that Dataplex Universal Catalog replaces the existing entry with
8906    /// the entry in the metadata import file. All modifiable fields are updated,
8907    /// regardless of the fields that are listed in the update mask, and regardless
8908    /// of whether a field is present in the `entry` object.
8909    ///
8910    /// The `update_mask` field is ignored when an entry is created or re-created.
8911    ///
8912    /// In an aspect-only metadata job (when entry sync mode is `NONE`), set this
8913    /// value to `aspects`.
8914    ///
8915    /// Dataplex Universal Catalog also determines which entries and aspects to
8916    /// modify by comparing the values and timestamps that you provide in the
8917    /// metadata import file with the values and timestamps that exist in your
8918    /// project. For more information, see [Comparison
8919    /// logic](https://cloud.google.com/dataplex/docs/import-metadata#data-modification-logic).
8920    pub update_mask: std::option::Option<wkt::FieldMask>,
8921
8922    /// The aspects to modify. Supports the following syntaxes:
8923    ///
8924    /// * `{aspect_type_reference}`: matches aspects that belong to the specified
8925    ///   aspect type and are attached directly to the entry.
8926    /// * `{aspect_type_reference}@{path}`: matches aspects that belong to the
8927    ///   specified aspect type and path.
8928    /// * `{aspect_type_reference}@*` : matches aspects of the given type for all
8929    ///   paths.
8930    /// * `*@path` : matches aspects of all types on the given path.
8931    ///
8932    /// Replace `{aspect_type_reference}` with a reference to the aspect type, in
8933    /// the format
8934    /// `{project_id_or_number}.{location_id}.{aspect_type_id}`.
8935    ///
8936    /// In `FULL` entry sync mode, if you leave this field empty, it is treated as
8937    /// specifying exactly those aspects that are present within the specified
8938    /// entry. Dataplex Universal Catalog implicitly adds the keys for all of the
8939    /// required aspects of an entry.
8940    pub aspect_keys: std::vec::Vec<std::string::String>,
8941
8942    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8943}
8944
8945impl ImportItem {
8946    pub fn new() -> Self {
8947        std::default::Default::default()
8948    }
8949
8950    /// Sets the value of [entry][crate::model::ImportItem::entry].
8951    ///
8952    /// # Example
8953    /// ```ignore,no_run
8954    /// # use google_cloud_dataplex_v1::model::ImportItem;
8955    /// use google_cloud_dataplex_v1::model::Entry;
8956    /// let x = ImportItem::new().set_entry(Entry::default()/* use setters */);
8957    /// ```
8958    pub fn set_entry<T>(mut self, v: T) -> Self
8959    where
8960        T: std::convert::Into<crate::model::Entry>,
8961    {
8962        self.entry = std::option::Option::Some(v.into());
8963        self
8964    }
8965
8966    /// Sets or clears the value of [entry][crate::model::ImportItem::entry].
8967    ///
8968    /// # Example
8969    /// ```ignore,no_run
8970    /// # use google_cloud_dataplex_v1::model::ImportItem;
8971    /// use google_cloud_dataplex_v1::model::Entry;
8972    /// let x = ImportItem::new().set_or_clear_entry(Some(Entry::default()/* use setters */));
8973    /// let x = ImportItem::new().set_or_clear_entry(None::<Entry>);
8974    /// ```
8975    pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
8976    where
8977        T: std::convert::Into<crate::model::Entry>,
8978    {
8979        self.entry = v.map(|x| x.into());
8980        self
8981    }
8982
8983    /// Sets the value of [entry_link][crate::model::ImportItem::entry_link].
8984    ///
8985    /// # Example
8986    /// ```ignore,no_run
8987    /// # use google_cloud_dataplex_v1::model::ImportItem;
8988    /// use google_cloud_dataplex_v1::model::EntryLink;
8989    /// let x = ImportItem::new().set_entry_link(EntryLink::default()/* use setters */);
8990    /// ```
8991    pub fn set_entry_link<T>(mut self, v: T) -> Self
8992    where
8993        T: std::convert::Into<crate::model::EntryLink>,
8994    {
8995        self.entry_link = std::option::Option::Some(v.into());
8996        self
8997    }
8998
8999    /// Sets or clears the value of [entry_link][crate::model::ImportItem::entry_link].
9000    ///
9001    /// # Example
9002    /// ```ignore,no_run
9003    /// # use google_cloud_dataplex_v1::model::ImportItem;
9004    /// use google_cloud_dataplex_v1::model::EntryLink;
9005    /// let x = ImportItem::new().set_or_clear_entry_link(Some(EntryLink::default()/* use setters */));
9006    /// let x = ImportItem::new().set_or_clear_entry_link(None::<EntryLink>);
9007    /// ```
9008    pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
9009    where
9010        T: std::convert::Into<crate::model::EntryLink>,
9011    {
9012        self.entry_link = v.map(|x| x.into());
9013        self
9014    }
9015
9016    /// Sets the value of [update_mask][crate::model::ImportItem::update_mask].
9017    ///
9018    /// # Example
9019    /// ```ignore,no_run
9020    /// # use google_cloud_dataplex_v1::model::ImportItem;
9021    /// use wkt::FieldMask;
9022    /// let x = ImportItem::new().set_update_mask(FieldMask::default()/* use setters */);
9023    /// ```
9024    pub fn set_update_mask<T>(mut self, v: T) -> Self
9025    where
9026        T: std::convert::Into<wkt::FieldMask>,
9027    {
9028        self.update_mask = std::option::Option::Some(v.into());
9029        self
9030    }
9031
9032    /// Sets or clears the value of [update_mask][crate::model::ImportItem::update_mask].
9033    ///
9034    /// # Example
9035    /// ```ignore,no_run
9036    /// # use google_cloud_dataplex_v1::model::ImportItem;
9037    /// use wkt::FieldMask;
9038    /// let x = ImportItem::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
9039    /// let x = ImportItem::new().set_or_clear_update_mask(None::<FieldMask>);
9040    /// ```
9041    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9042    where
9043        T: std::convert::Into<wkt::FieldMask>,
9044    {
9045        self.update_mask = v.map(|x| x.into());
9046        self
9047    }
9048
9049    /// Sets the value of [aspect_keys][crate::model::ImportItem::aspect_keys].
9050    ///
9051    /// # Example
9052    /// ```ignore,no_run
9053    /// # use google_cloud_dataplex_v1::model::ImportItem;
9054    /// let x = ImportItem::new().set_aspect_keys(["a", "b", "c"]);
9055    /// ```
9056    pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
9057    where
9058        T: std::iter::IntoIterator<Item = V>,
9059        V: std::convert::Into<std::string::String>,
9060    {
9061        use std::iter::Iterator;
9062        self.aspect_keys = v.into_iter().map(|i| i.into()).collect();
9063        self
9064    }
9065}
9066
9067impl wkt::message::Message for ImportItem {
9068    fn typename() -> &'static str {
9069        "type.googleapis.com/google.cloud.dataplex.v1.ImportItem"
9070    }
9071}
9072
9073/// Create metadata job request.
9074#[derive(Clone, Default, PartialEq)]
9075#[non_exhaustive]
9076pub struct CreateMetadataJobRequest {
9077    /// Required. The resource name of the parent location, in the format
9078    /// `projects/{project_id_or_number}/locations/{location_id}`
9079    pub parent: std::string::String,
9080
9081    /// Required. The metadata job resource.
9082    pub metadata_job: std::option::Option<crate::model::MetadataJob>,
9083
9084    /// Optional. The metadata job ID. If not provided, a unique ID is generated
9085    /// with the prefix `metadata-job-`.
9086    pub metadata_job_id: std::string::String,
9087
9088    /// Optional. The service validates the request without performing any
9089    /// mutations. The default is false.
9090    pub validate_only: bool,
9091
9092    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9093}
9094
9095impl CreateMetadataJobRequest {
9096    pub fn new() -> Self {
9097        std::default::Default::default()
9098    }
9099
9100    /// Sets the value of [parent][crate::model::CreateMetadataJobRequest::parent].
9101    ///
9102    /// # Example
9103    /// ```ignore,no_run
9104    /// # use google_cloud_dataplex_v1::model::CreateMetadataJobRequest;
9105    /// let x = CreateMetadataJobRequest::new().set_parent("example");
9106    /// ```
9107    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9108        self.parent = v.into();
9109        self
9110    }
9111
9112    /// Sets the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
9113    ///
9114    /// # Example
9115    /// ```ignore,no_run
9116    /// # use google_cloud_dataplex_v1::model::CreateMetadataJobRequest;
9117    /// use google_cloud_dataplex_v1::model::MetadataJob;
9118    /// let x = CreateMetadataJobRequest::new().set_metadata_job(MetadataJob::default()/* use setters */);
9119    /// ```
9120    pub fn set_metadata_job<T>(mut self, v: T) -> Self
9121    where
9122        T: std::convert::Into<crate::model::MetadataJob>,
9123    {
9124        self.metadata_job = std::option::Option::Some(v.into());
9125        self
9126    }
9127
9128    /// Sets or clears the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
9129    ///
9130    /// # Example
9131    /// ```ignore,no_run
9132    /// # use google_cloud_dataplex_v1::model::CreateMetadataJobRequest;
9133    /// use google_cloud_dataplex_v1::model::MetadataJob;
9134    /// let x = CreateMetadataJobRequest::new().set_or_clear_metadata_job(Some(MetadataJob::default()/* use setters */));
9135    /// let x = CreateMetadataJobRequest::new().set_or_clear_metadata_job(None::<MetadataJob>);
9136    /// ```
9137    pub fn set_or_clear_metadata_job<T>(mut self, v: std::option::Option<T>) -> Self
9138    where
9139        T: std::convert::Into<crate::model::MetadataJob>,
9140    {
9141        self.metadata_job = v.map(|x| x.into());
9142        self
9143    }
9144
9145    /// Sets the value of [metadata_job_id][crate::model::CreateMetadataJobRequest::metadata_job_id].
9146    ///
9147    /// # Example
9148    /// ```ignore,no_run
9149    /// # use google_cloud_dataplex_v1::model::CreateMetadataJobRequest;
9150    /// let x = CreateMetadataJobRequest::new().set_metadata_job_id("example");
9151    /// ```
9152    pub fn set_metadata_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9153        self.metadata_job_id = v.into();
9154        self
9155    }
9156
9157    /// Sets the value of [validate_only][crate::model::CreateMetadataJobRequest::validate_only].
9158    ///
9159    /// # Example
9160    /// ```ignore,no_run
9161    /// # use google_cloud_dataplex_v1::model::CreateMetadataJobRequest;
9162    /// let x = CreateMetadataJobRequest::new().set_validate_only(true);
9163    /// ```
9164    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9165        self.validate_only = v.into();
9166        self
9167    }
9168}
9169
9170impl wkt::message::Message for CreateMetadataJobRequest {
9171    fn typename() -> &'static str {
9172        "type.googleapis.com/google.cloud.dataplex.v1.CreateMetadataJobRequest"
9173    }
9174}
9175
9176/// Get metadata job request.
9177#[derive(Clone, Default, PartialEq)]
9178#[non_exhaustive]
9179pub struct GetMetadataJobRequest {
9180    /// Required. The resource name of the metadata job, in the format
9181    /// `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`.
9182    pub name: std::string::String,
9183
9184    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9185}
9186
9187impl GetMetadataJobRequest {
9188    pub fn new() -> Self {
9189        std::default::Default::default()
9190    }
9191
9192    /// Sets the value of [name][crate::model::GetMetadataJobRequest::name].
9193    ///
9194    /// # Example
9195    /// ```ignore,no_run
9196    /// # use google_cloud_dataplex_v1::model::GetMetadataJobRequest;
9197    /// let x = GetMetadataJobRequest::new().set_name("example");
9198    /// ```
9199    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9200        self.name = v.into();
9201        self
9202    }
9203}
9204
9205impl wkt::message::Message for GetMetadataJobRequest {
9206    fn typename() -> &'static str {
9207        "type.googleapis.com/google.cloud.dataplex.v1.GetMetadataJobRequest"
9208    }
9209}
9210
9211/// List metadata jobs request.
9212#[derive(Clone, Default, PartialEq)]
9213#[non_exhaustive]
9214pub struct ListMetadataJobsRequest {
9215    /// Required. The resource name of the parent location, in the format
9216    /// `projects/{project_id_or_number}/locations/{location_id}`
9217    pub parent: std::string::String,
9218
9219    /// Optional. The maximum number of metadata jobs to return. The service might
9220    /// return fewer jobs than this value. If unspecified, at most 10 jobs are
9221    /// returned. The maximum value is 1,000.
9222    pub page_size: i32,
9223
9224    /// Optional. The page token received from a previous `ListMetadataJobs` call.
9225    /// Provide this token to retrieve the subsequent page of results. When
9226    /// paginating, all other parameters that are provided to the
9227    /// `ListMetadataJobs` request must match the call that provided the page
9228    /// token.
9229    pub page_token: std::string::String,
9230
9231    /// Optional. Filter request. Filters are case-sensitive.
9232    /// The service supports the following formats:
9233    ///
9234    /// * `labels.key1 = "value1"`
9235    /// * `labels:key1`
9236    /// * `name = "value"`
9237    ///
9238    /// You can combine filters with `AND`, `OR`, and `NOT` operators.
9239    pub filter: std::string::String,
9240
9241    /// Optional. The field to sort the results by, either `name` or `create_time`.
9242    /// If not specified, the ordering is undefined.
9243    pub order_by: std::string::String,
9244
9245    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9246}
9247
9248impl ListMetadataJobsRequest {
9249    pub fn new() -> Self {
9250        std::default::Default::default()
9251    }
9252
9253    /// Sets the value of [parent][crate::model::ListMetadataJobsRequest::parent].
9254    ///
9255    /// # Example
9256    /// ```ignore,no_run
9257    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsRequest;
9258    /// let x = ListMetadataJobsRequest::new().set_parent("example");
9259    /// ```
9260    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9261        self.parent = v.into();
9262        self
9263    }
9264
9265    /// Sets the value of [page_size][crate::model::ListMetadataJobsRequest::page_size].
9266    ///
9267    /// # Example
9268    /// ```ignore,no_run
9269    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsRequest;
9270    /// let x = ListMetadataJobsRequest::new().set_page_size(42);
9271    /// ```
9272    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9273        self.page_size = v.into();
9274        self
9275    }
9276
9277    /// Sets the value of [page_token][crate::model::ListMetadataJobsRequest::page_token].
9278    ///
9279    /// # Example
9280    /// ```ignore,no_run
9281    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsRequest;
9282    /// let x = ListMetadataJobsRequest::new().set_page_token("example");
9283    /// ```
9284    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9285        self.page_token = v.into();
9286        self
9287    }
9288
9289    /// Sets the value of [filter][crate::model::ListMetadataJobsRequest::filter].
9290    ///
9291    /// # Example
9292    /// ```ignore,no_run
9293    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsRequest;
9294    /// let x = ListMetadataJobsRequest::new().set_filter("example");
9295    /// ```
9296    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9297        self.filter = v.into();
9298        self
9299    }
9300
9301    /// Sets the value of [order_by][crate::model::ListMetadataJobsRequest::order_by].
9302    ///
9303    /// # Example
9304    /// ```ignore,no_run
9305    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsRequest;
9306    /// let x = ListMetadataJobsRequest::new().set_order_by("example");
9307    /// ```
9308    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9309        self.order_by = v.into();
9310        self
9311    }
9312}
9313
9314impl wkt::message::Message for ListMetadataJobsRequest {
9315    fn typename() -> &'static str {
9316        "type.googleapis.com/google.cloud.dataplex.v1.ListMetadataJobsRequest"
9317    }
9318}
9319
9320/// List metadata jobs response.
9321#[derive(Clone, Default, PartialEq)]
9322#[non_exhaustive]
9323pub struct ListMetadataJobsResponse {
9324    /// Metadata jobs under the specified parent location.
9325    pub metadata_jobs: std::vec::Vec<crate::model::MetadataJob>,
9326
9327    /// A token to retrieve the next page of results. If there are no more results
9328    /// in the list, the value is empty.
9329    pub next_page_token: std::string::String,
9330
9331    /// Locations that the service couldn't reach.
9332    pub unreachable_locations: std::vec::Vec<std::string::String>,
9333
9334    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9335}
9336
9337impl ListMetadataJobsResponse {
9338    pub fn new() -> Self {
9339        std::default::Default::default()
9340    }
9341
9342    /// Sets the value of [metadata_jobs][crate::model::ListMetadataJobsResponse::metadata_jobs].
9343    ///
9344    /// # Example
9345    /// ```ignore,no_run
9346    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsResponse;
9347    /// use google_cloud_dataplex_v1::model::MetadataJob;
9348    /// let x = ListMetadataJobsResponse::new()
9349    ///     .set_metadata_jobs([
9350    ///         MetadataJob::default()/* use setters */,
9351    ///         MetadataJob::default()/* use (different) setters */,
9352    ///     ]);
9353    /// ```
9354    pub fn set_metadata_jobs<T, V>(mut self, v: T) -> Self
9355    where
9356        T: std::iter::IntoIterator<Item = V>,
9357        V: std::convert::Into<crate::model::MetadataJob>,
9358    {
9359        use std::iter::Iterator;
9360        self.metadata_jobs = v.into_iter().map(|i| i.into()).collect();
9361        self
9362    }
9363
9364    /// Sets the value of [next_page_token][crate::model::ListMetadataJobsResponse::next_page_token].
9365    ///
9366    /// # Example
9367    /// ```ignore,no_run
9368    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsResponse;
9369    /// let x = ListMetadataJobsResponse::new().set_next_page_token("example");
9370    /// ```
9371    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9372        self.next_page_token = v.into();
9373        self
9374    }
9375
9376    /// Sets the value of [unreachable_locations][crate::model::ListMetadataJobsResponse::unreachable_locations].
9377    ///
9378    /// # Example
9379    /// ```ignore,no_run
9380    /// # use google_cloud_dataplex_v1::model::ListMetadataJobsResponse;
9381    /// let x = ListMetadataJobsResponse::new().set_unreachable_locations(["a", "b", "c"]);
9382    /// ```
9383    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
9384    where
9385        T: std::iter::IntoIterator<Item = V>,
9386        V: std::convert::Into<std::string::String>,
9387    {
9388        use std::iter::Iterator;
9389        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
9390        self
9391    }
9392}
9393
9394impl wkt::message::Message for ListMetadataJobsResponse {
9395    fn typename() -> &'static str {
9396        "type.googleapis.com/google.cloud.dataplex.v1.ListMetadataJobsResponse"
9397    }
9398}
9399
9400#[doc(hidden)]
9401impl google_cloud_gax::paginator::internal::PageableResponse for ListMetadataJobsResponse {
9402    type PageItem = crate::model::MetadataJob;
9403
9404    fn items(self) -> std::vec::Vec<Self::PageItem> {
9405        self.metadata_jobs
9406    }
9407
9408    fn next_page_token(&self) -> std::string::String {
9409        use std::clone::Clone;
9410        self.next_page_token.clone()
9411    }
9412}
9413
9414/// Cancel metadata job request.
9415#[derive(Clone, Default, PartialEq)]
9416#[non_exhaustive]
9417pub struct CancelMetadataJobRequest {
9418    /// Required. The resource name of the job, in the format
9419    /// `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`
9420    pub name: std::string::String,
9421
9422    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9423}
9424
9425impl CancelMetadataJobRequest {
9426    pub fn new() -> Self {
9427        std::default::Default::default()
9428    }
9429
9430    /// Sets the value of [name][crate::model::CancelMetadataJobRequest::name].
9431    ///
9432    /// # Example
9433    /// ```ignore,no_run
9434    /// # use google_cloud_dataplex_v1::model::CancelMetadataJobRequest;
9435    /// let x = CancelMetadataJobRequest::new().set_name("example");
9436    /// ```
9437    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9438        self.name = v.into();
9439        self
9440    }
9441}
9442
9443impl wkt::message::Message for CancelMetadataJobRequest {
9444    fn typename() -> &'static str {
9445        "type.googleapis.com/google.cloud.dataplex.v1.CancelMetadataJobRequest"
9446    }
9447}
9448
9449/// A metadata job resource.
9450#[derive(Clone, Default, PartialEq)]
9451#[non_exhaustive]
9452pub struct MetadataJob {
9453    /// Output only. Identifier. The name of the resource that the configuration is
9454    /// applied to, in the format
9455    /// `projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`.
9456    pub name: std::string::String,
9457
9458    /// Output only. A system-generated, globally unique ID for the metadata job.
9459    /// If the metadata job is deleted and then re-created with the same name, this
9460    /// ID is different.
9461    pub uid: std::string::String,
9462
9463    /// Output only. The time when the metadata job was created.
9464    pub create_time: std::option::Option<wkt::Timestamp>,
9465
9466    /// Output only. The time when the metadata job was updated.
9467    pub update_time: std::option::Option<wkt::Timestamp>,
9468
9469    /// Optional. User-defined labels.
9470    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
9471
9472    /// Required. Metadata job type.
9473    pub r#type: crate::model::metadata_job::Type,
9474
9475    /// Output only. Metadata job status.
9476    pub status: std::option::Option<crate::model::metadata_job::Status>,
9477
9478    pub spec: std::option::Option<crate::model::metadata_job::Spec>,
9479
9480    pub result: std::option::Option<crate::model::metadata_job::Result>,
9481
9482    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9483}
9484
9485impl MetadataJob {
9486    pub fn new() -> Self {
9487        std::default::Default::default()
9488    }
9489
9490    /// Sets the value of [name][crate::model::MetadataJob::name].
9491    ///
9492    /// # Example
9493    /// ```ignore,no_run
9494    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9495    /// let x = MetadataJob::new().set_name("example");
9496    /// ```
9497    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9498        self.name = v.into();
9499        self
9500    }
9501
9502    /// Sets the value of [uid][crate::model::MetadataJob::uid].
9503    ///
9504    /// # Example
9505    /// ```ignore,no_run
9506    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9507    /// let x = MetadataJob::new().set_uid("example");
9508    /// ```
9509    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9510        self.uid = v.into();
9511        self
9512    }
9513
9514    /// Sets the value of [create_time][crate::model::MetadataJob::create_time].
9515    ///
9516    /// # Example
9517    /// ```ignore,no_run
9518    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9519    /// use wkt::Timestamp;
9520    /// let x = MetadataJob::new().set_create_time(Timestamp::default()/* use setters */);
9521    /// ```
9522    pub fn set_create_time<T>(mut self, v: T) -> Self
9523    where
9524        T: std::convert::Into<wkt::Timestamp>,
9525    {
9526        self.create_time = std::option::Option::Some(v.into());
9527        self
9528    }
9529
9530    /// Sets or clears the value of [create_time][crate::model::MetadataJob::create_time].
9531    ///
9532    /// # Example
9533    /// ```ignore,no_run
9534    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9535    /// use wkt::Timestamp;
9536    /// let x = MetadataJob::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9537    /// let x = MetadataJob::new().set_or_clear_create_time(None::<Timestamp>);
9538    /// ```
9539    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9540    where
9541        T: std::convert::Into<wkt::Timestamp>,
9542    {
9543        self.create_time = v.map(|x| x.into());
9544        self
9545    }
9546
9547    /// Sets the value of [update_time][crate::model::MetadataJob::update_time].
9548    ///
9549    /// # Example
9550    /// ```ignore,no_run
9551    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9552    /// use wkt::Timestamp;
9553    /// let x = MetadataJob::new().set_update_time(Timestamp::default()/* use setters */);
9554    /// ```
9555    pub fn set_update_time<T>(mut self, v: T) -> Self
9556    where
9557        T: std::convert::Into<wkt::Timestamp>,
9558    {
9559        self.update_time = std::option::Option::Some(v.into());
9560        self
9561    }
9562
9563    /// Sets or clears the value of [update_time][crate::model::MetadataJob::update_time].
9564    ///
9565    /// # Example
9566    /// ```ignore,no_run
9567    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9568    /// use wkt::Timestamp;
9569    /// let x = MetadataJob::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
9570    /// let x = MetadataJob::new().set_or_clear_update_time(None::<Timestamp>);
9571    /// ```
9572    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9573    where
9574        T: std::convert::Into<wkt::Timestamp>,
9575    {
9576        self.update_time = v.map(|x| x.into());
9577        self
9578    }
9579
9580    /// Sets the value of [labels][crate::model::MetadataJob::labels].
9581    ///
9582    /// # Example
9583    /// ```ignore,no_run
9584    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9585    /// let x = MetadataJob::new().set_labels([
9586    ///     ("key0", "abc"),
9587    ///     ("key1", "xyz"),
9588    /// ]);
9589    /// ```
9590    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
9591    where
9592        T: std::iter::IntoIterator<Item = (K, V)>,
9593        K: std::convert::Into<std::string::String>,
9594        V: std::convert::Into<std::string::String>,
9595    {
9596        use std::iter::Iterator;
9597        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9598        self
9599    }
9600
9601    /// Sets the value of [r#type][crate::model::MetadataJob::type].
9602    ///
9603    /// # Example
9604    /// ```ignore,no_run
9605    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9606    /// use google_cloud_dataplex_v1::model::metadata_job::Type;
9607    /// let x0 = MetadataJob::new().set_type(Type::Import);
9608    /// let x1 = MetadataJob::new().set_type(Type::Export);
9609    /// ```
9610    pub fn set_type<T: std::convert::Into<crate::model::metadata_job::Type>>(
9611        mut self,
9612        v: T,
9613    ) -> Self {
9614        self.r#type = v.into();
9615        self
9616    }
9617
9618    /// Sets the value of [status][crate::model::MetadataJob::status].
9619    ///
9620    /// # Example
9621    /// ```ignore,no_run
9622    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9623    /// use google_cloud_dataplex_v1::model::metadata_job::Status;
9624    /// let x = MetadataJob::new().set_status(Status::default()/* use setters */);
9625    /// ```
9626    pub fn set_status<T>(mut self, v: T) -> Self
9627    where
9628        T: std::convert::Into<crate::model::metadata_job::Status>,
9629    {
9630        self.status = std::option::Option::Some(v.into());
9631        self
9632    }
9633
9634    /// Sets or clears the value of [status][crate::model::MetadataJob::status].
9635    ///
9636    /// # Example
9637    /// ```ignore,no_run
9638    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9639    /// use google_cloud_dataplex_v1::model::metadata_job::Status;
9640    /// let x = MetadataJob::new().set_or_clear_status(Some(Status::default()/* use setters */));
9641    /// let x = MetadataJob::new().set_or_clear_status(None::<Status>);
9642    /// ```
9643    pub fn set_or_clear_status<T>(mut self, v: std::option::Option<T>) -> Self
9644    where
9645        T: std::convert::Into<crate::model::metadata_job::Status>,
9646    {
9647        self.status = v.map(|x| x.into());
9648        self
9649    }
9650
9651    /// Sets the value of [spec][crate::model::MetadataJob::spec].
9652    ///
9653    /// Note that all the setters affecting `spec` are mutually
9654    /// exclusive.
9655    ///
9656    /// # Example
9657    /// ```ignore,no_run
9658    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9659    /// use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
9660    /// let x = MetadataJob::new().set_spec(Some(
9661    ///     google_cloud_dataplex_v1::model::metadata_job::Spec::ImportSpec(ImportJobSpec::default().into())));
9662    /// ```
9663    pub fn set_spec<
9664        T: std::convert::Into<std::option::Option<crate::model::metadata_job::Spec>>,
9665    >(
9666        mut self,
9667        v: T,
9668    ) -> Self {
9669        self.spec = v.into();
9670        self
9671    }
9672
9673    /// The value of [spec][crate::model::MetadataJob::spec]
9674    /// if it holds a `ImportSpec`, `None` if the field is not set or
9675    /// holds a different branch.
9676    pub fn import_spec(
9677        &self,
9678    ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ImportJobSpec>> {
9679        #[allow(unreachable_patterns)]
9680        self.spec.as_ref().and_then(|v| match v {
9681            crate::model::metadata_job::Spec::ImportSpec(v) => std::option::Option::Some(v),
9682            _ => std::option::Option::None,
9683        })
9684    }
9685
9686    /// Sets the value of [spec][crate::model::MetadataJob::spec]
9687    /// to hold a `ImportSpec`.
9688    ///
9689    /// Note that all the setters affecting `spec` are
9690    /// mutually exclusive.
9691    ///
9692    /// # Example
9693    /// ```ignore,no_run
9694    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9695    /// use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
9696    /// let x = MetadataJob::new().set_import_spec(ImportJobSpec::default()/* use setters */);
9697    /// assert!(x.import_spec().is_some());
9698    /// assert!(x.export_spec().is_none());
9699    /// ```
9700    pub fn set_import_spec<
9701        T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ImportJobSpec>>,
9702    >(
9703        mut self,
9704        v: T,
9705    ) -> Self {
9706        self.spec =
9707            std::option::Option::Some(crate::model::metadata_job::Spec::ImportSpec(v.into()));
9708        self
9709    }
9710
9711    /// The value of [spec][crate::model::MetadataJob::spec]
9712    /// if it holds a `ExportSpec`, `None` if the field is not set or
9713    /// holds a different branch.
9714    pub fn export_spec(
9715        &self,
9716    ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ExportJobSpec>> {
9717        #[allow(unreachable_patterns)]
9718        self.spec.as_ref().and_then(|v| match v {
9719            crate::model::metadata_job::Spec::ExportSpec(v) => std::option::Option::Some(v),
9720            _ => std::option::Option::None,
9721        })
9722    }
9723
9724    /// Sets the value of [spec][crate::model::MetadataJob::spec]
9725    /// to hold a `ExportSpec`.
9726    ///
9727    /// Note that all the setters affecting `spec` are
9728    /// mutually exclusive.
9729    ///
9730    /// # Example
9731    /// ```ignore,no_run
9732    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9733    /// use google_cloud_dataplex_v1::model::metadata_job::ExportJobSpec;
9734    /// let x = MetadataJob::new().set_export_spec(ExportJobSpec::default()/* use setters */);
9735    /// assert!(x.export_spec().is_some());
9736    /// assert!(x.import_spec().is_none());
9737    /// ```
9738    pub fn set_export_spec<
9739        T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ExportJobSpec>>,
9740    >(
9741        mut self,
9742        v: T,
9743    ) -> Self {
9744        self.spec =
9745            std::option::Option::Some(crate::model::metadata_job::Spec::ExportSpec(v.into()));
9746        self
9747    }
9748
9749    /// Sets the value of [result][crate::model::MetadataJob::result].
9750    ///
9751    /// Note that all the setters affecting `result` are mutually
9752    /// exclusive.
9753    ///
9754    /// # Example
9755    /// ```ignore,no_run
9756    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9757    /// use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9758    /// let x = MetadataJob::new().set_result(Some(
9759    ///     google_cloud_dataplex_v1::model::metadata_job::Result::ImportResult(ImportJobResult::default().into())));
9760    /// ```
9761    pub fn set_result<
9762        T: std::convert::Into<std::option::Option<crate::model::metadata_job::Result>>,
9763    >(
9764        mut self,
9765        v: T,
9766    ) -> Self {
9767        self.result = v.into();
9768        self
9769    }
9770
9771    /// The value of [result][crate::model::MetadataJob::result]
9772    /// if it holds a `ImportResult`, `None` if the field is not set or
9773    /// holds a different branch.
9774    pub fn import_result(
9775        &self,
9776    ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ImportJobResult>> {
9777        #[allow(unreachable_patterns)]
9778        self.result.as_ref().and_then(|v| match v {
9779            crate::model::metadata_job::Result::ImportResult(v) => std::option::Option::Some(v),
9780            _ => std::option::Option::None,
9781        })
9782    }
9783
9784    /// Sets the value of [result][crate::model::MetadataJob::result]
9785    /// to hold a `ImportResult`.
9786    ///
9787    /// Note that all the setters affecting `result` are
9788    /// mutually exclusive.
9789    ///
9790    /// # Example
9791    /// ```ignore,no_run
9792    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9793    /// use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9794    /// let x = MetadataJob::new().set_import_result(ImportJobResult::default()/* use setters */);
9795    /// assert!(x.import_result().is_some());
9796    /// assert!(x.export_result().is_none());
9797    /// ```
9798    pub fn set_import_result<
9799        T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ImportJobResult>>,
9800    >(
9801        mut self,
9802        v: T,
9803    ) -> Self {
9804        self.result =
9805            std::option::Option::Some(crate::model::metadata_job::Result::ImportResult(v.into()));
9806        self
9807    }
9808
9809    /// The value of [result][crate::model::MetadataJob::result]
9810    /// if it holds a `ExportResult`, `None` if the field is not set or
9811    /// holds a different branch.
9812    pub fn export_result(
9813        &self,
9814    ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ExportJobResult>> {
9815        #[allow(unreachable_patterns)]
9816        self.result.as_ref().and_then(|v| match v {
9817            crate::model::metadata_job::Result::ExportResult(v) => std::option::Option::Some(v),
9818            _ => std::option::Option::None,
9819        })
9820    }
9821
9822    /// Sets the value of [result][crate::model::MetadataJob::result]
9823    /// to hold a `ExportResult`.
9824    ///
9825    /// Note that all the setters affecting `result` are
9826    /// mutually exclusive.
9827    ///
9828    /// # Example
9829    /// ```ignore,no_run
9830    /// # use google_cloud_dataplex_v1::model::MetadataJob;
9831    /// use google_cloud_dataplex_v1::model::metadata_job::ExportJobResult;
9832    /// let x = MetadataJob::new().set_export_result(ExportJobResult::default()/* use setters */);
9833    /// assert!(x.export_result().is_some());
9834    /// assert!(x.import_result().is_none());
9835    /// ```
9836    pub fn set_export_result<
9837        T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ExportJobResult>>,
9838    >(
9839        mut self,
9840        v: T,
9841    ) -> Self {
9842        self.result =
9843            std::option::Option::Some(crate::model::metadata_job::Result::ExportResult(v.into()));
9844        self
9845    }
9846}
9847
9848impl wkt::message::Message for MetadataJob {
9849    fn typename() -> &'static str {
9850        "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob"
9851    }
9852}
9853
9854/// Defines additional types related to [MetadataJob].
9855pub mod metadata_job {
9856    #[allow(unused_imports)]
9857    use super::*;
9858
9859    /// Results from a metadata import job.
9860    #[derive(Clone, Default, PartialEq)]
9861    #[non_exhaustive]
9862    pub struct ImportJobResult {
9863        /// Output only. The total number of entries that were deleted.
9864        pub deleted_entries: i64,
9865
9866        /// Output only. The total number of entries that were updated.
9867        pub updated_entries: i64,
9868
9869        /// Output only. The total number of entries that were created.
9870        pub created_entries: i64,
9871
9872        /// Output only. The total number of entries that were unchanged.
9873        pub unchanged_entries: i64,
9874
9875        /// Output only. The total number of entries that were recreated.
9876        pub recreated_entries: i64,
9877
9878        /// Output only. The time when the status was updated.
9879        pub update_time: std::option::Option<wkt::Timestamp>,
9880
9881        /// Output only. The total number of entry links that were successfully
9882        /// deleted.
9883        pub deleted_entry_links: i64,
9884
9885        /// Output only. The total number of entry links that were successfully
9886        /// created.
9887        pub created_entry_links: i64,
9888
9889        /// Output only. The total number of entry links that were left unchanged.
9890        pub unchanged_entry_links: i64,
9891
9892        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9893    }
9894
9895    impl ImportJobResult {
9896        pub fn new() -> Self {
9897            std::default::Default::default()
9898        }
9899
9900        /// Sets the value of [deleted_entries][crate::model::metadata_job::ImportJobResult::deleted_entries].
9901        ///
9902        /// # Example
9903        /// ```ignore,no_run
9904        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9905        /// let x = ImportJobResult::new().set_deleted_entries(42);
9906        /// ```
9907        pub fn set_deleted_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9908            self.deleted_entries = v.into();
9909            self
9910        }
9911
9912        /// Sets the value of [updated_entries][crate::model::metadata_job::ImportJobResult::updated_entries].
9913        ///
9914        /// # Example
9915        /// ```ignore,no_run
9916        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9917        /// let x = ImportJobResult::new().set_updated_entries(42);
9918        /// ```
9919        pub fn set_updated_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9920            self.updated_entries = v.into();
9921            self
9922        }
9923
9924        /// Sets the value of [created_entries][crate::model::metadata_job::ImportJobResult::created_entries].
9925        ///
9926        /// # Example
9927        /// ```ignore,no_run
9928        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9929        /// let x = ImportJobResult::new().set_created_entries(42);
9930        /// ```
9931        pub fn set_created_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9932            self.created_entries = v.into();
9933            self
9934        }
9935
9936        /// Sets the value of [unchanged_entries][crate::model::metadata_job::ImportJobResult::unchanged_entries].
9937        ///
9938        /// # Example
9939        /// ```ignore,no_run
9940        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9941        /// let x = ImportJobResult::new().set_unchanged_entries(42);
9942        /// ```
9943        pub fn set_unchanged_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9944            self.unchanged_entries = v.into();
9945            self
9946        }
9947
9948        /// Sets the value of [recreated_entries][crate::model::metadata_job::ImportJobResult::recreated_entries].
9949        ///
9950        /// # Example
9951        /// ```ignore,no_run
9952        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9953        /// let x = ImportJobResult::new().set_recreated_entries(42);
9954        /// ```
9955        pub fn set_recreated_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9956            self.recreated_entries = v.into();
9957            self
9958        }
9959
9960        /// Sets the value of [update_time][crate::model::metadata_job::ImportJobResult::update_time].
9961        ///
9962        /// # Example
9963        /// ```ignore,no_run
9964        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9965        /// use wkt::Timestamp;
9966        /// let x = ImportJobResult::new().set_update_time(Timestamp::default()/* use setters */);
9967        /// ```
9968        pub fn set_update_time<T>(mut self, v: T) -> Self
9969        where
9970            T: std::convert::Into<wkt::Timestamp>,
9971        {
9972            self.update_time = std::option::Option::Some(v.into());
9973            self
9974        }
9975
9976        /// Sets or clears the value of [update_time][crate::model::metadata_job::ImportJobResult::update_time].
9977        ///
9978        /// # Example
9979        /// ```ignore,no_run
9980        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9981        /// use wkt::Timestamp;
9982        /// let x = ImportJobResult::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
9983        /// let x = ImportJobResult::new().set_or_clear_update_time(None::<Timestamp>);
9984        /// ```
9985        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9986        where
9987            T: std::convert::Into<wkt::Timestamp>,
9988        {
9989            self.update_time = v.map(|x| x.into());
9990            self
9991        }
9992
9993        /// Sets the value of [deleted_entry_links][crate::model::metadata_job::ImportJobResult::deleted_entry_links].
9994        ///
9995        /// # Example
9996        /// ```ignore,no_run
9997        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
9998        /// let x = ImportJobResult::new().set_deleted_entry_links(42);
9999        /// ```
10000        pub fn set_deleted_entry_links<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10001            self.deleted_entry_links = v.into();
10002            self
10003        }
10004
10005        /// Sets the value of [created_entry_links][crate::model::metadata_job::ImportJobResult::created_entry_links].
10006        ///
10007        /// # Example
10008        /// ```ignore,no_run
10009        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
10010        /// let x = ImportJobResult::new().set_created_entry_links(42);
10011        /// ```
10012        pub fn set_created_entry_links<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10013            self.created_entry_links = v.into();
10014            self
10015        }
10016
10017        /// Sets the value of [unchanged_entry_links][crate::model::metadata_job::ImportJobResult::unchanged_entry_links].
10018        ///
10019        /// # Example
10020        /// ```ignore,no_run
10021        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobResult;
10022        /// let x = ImportJobResult::new().set_unchanged_entry_links(42);
10023        /// ```
10024        pub fn set_unchanged_entry_links<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10025            self.unchanged_entry_links = v.into();
10026            self
10027        }
10028    }
10029
10030    impl wkt::message::Message for ImportJobResult {
10031        fn typename() -> &'static str {
10032            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ImportJobResult"
10033        }
10034    }
10035
10036    /// Summary results from a metadata export job. The results are a snapshot of
10037    /// the metadata at the time when the job was created. The exported entries are
10038    /// saved to a Cloud Storage bucket.
10039    #[derive(Clone, Default, PartialEq)]
10040    #[non_exhaustive]
10041    pub struct ExportJobResult {
10042        /// Output only. The number of entries that were exported.
10043        pub exported_entries: i64,
10044
10045        /// Output only. The error message if the metadata export job failed.
10046        pub error_message: std::string::String,
10047
10048        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10049    }
10050
10051    impl ExportJobResult {
10052        pub fn new() -> Self {
10053            std::default::Default::default()
10054        }
10055
10056        /// Sets the value of [exported_entries][crate::model::metadata_job::ExportJobResult::exported_entries].
10057        ///
10058        /// # Example
10059        /// ```ignore,no_run
10060        /// # use google_cloud_dataplex_v1::model::metadata_job::ExportJobResult;
10061        /// let x = ExportJobResult::new().set_exported_entries(42);
10062        /// ```
10063        pub fn set_exported_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10064            self.exported_entries = v.into();
10065            self
10066        }
10067
10068        /// Sets the value of [error_message][crate::model::metadata_job::ExportJobResult::error_message].
10069        ///
10070        /// # Example
10071        /// ```ignore,no_run
10072        /// # use google_cloud_dataplex_v1::model::metadata_job::ExportJobResult;
10073        /// let x = ExportJobResult::new().set_error_message("example");
10074        /// ```
10075        pub fn set_error_message<T: std::convert::Into<std::string::String>>(
10076            mut self,
10077            v: T,
10078        ) -> Self {
10079            self.error_message = v.into();
10080            self
10081        }
10082    }
10083
10084    impl wkt::message::Message for ExportJobResult {
10085        fn typename() -> &'static str {
10086            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ExportJobResult"
10087        }
10088    }
10089
10090    /// Job specification for a metadata import job.
10091    ///
10092    /// You can run the following kinds of metadata import jobs:
10093    ///
10094    /// * Full sync of entries with incremental import of their aspects.
10095    ///   Supported for custom entries.
10096    /// * Incremental import of aspects only. Supported for aspects that belong
10097    ///   to custom entries and system entries. For custom entries, you can modify
10098    ///   both optional aspects and required aspects. For system entries, you can
10099    ///   modify optional aspects.
10100    #[derive(Clone, Default, PartialEq)]
10101    #[non_exhaustive]
10102    pub struct ImportJobSpec {
10103        /// Optional. The URI of a Cloud Storage bucket or folder (beginning with
10104        /// `gs://` and ending with `/`) that contains the metadata import files for
10105        /// this job.
10106        ///
10107        /// A metadata import file defines the values to set for each of the entries
10108        /// and aspects in a metadata import job. For more information about how to
10109        /// create a metadata import file and the file requirements, see [Metadata
10110        /// import
10111        /// file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file).
10112        ///
10113        /// You can provide multiple metadata import files in the same metadata job.
10114        /// The bucket or folder must contain at least one metadata import file, in
10115        /// JSON Lines format (either `.json` or `.jsonl` file extension).
10116        ///
10117        /// In `FULL` entry sync mode, don't save the metadata import file in a
10118        /// folder named `SOURCE_STORAGE_URI/deletions/`.
10119        ///
10120        /// **Caution**: If the metadata import file contains no data, all entries
10121        /// and aspects that belong to the job's scope are deleted.
10122        pub source_storage_uri: std::string::String,
10123
10124        /// Optional. The time when the process that created the metadata import
10125        /// files began.
10126        pub source_create_time: std::option::Option<wkt::Timestamp>,
10127
10128        /// Required. A boundary on the scope of impact that the metadata import job
10129        /// can have.
10130        pub scope: std::option::Option<crate::model::metadata_job::import_job_spec::ImportJobScope>,
10131
10132        /// Required. The sync mode for entries.
10133        pub entry_sync_mode: crate::model::metadata_job::import_job_spec::SyncMode,
10134
10135        /// Required. The sync mode for aspects.
10136        pub aspect_sync_mode: crate::model::metadata_job::import_job_spec::SyncMode,
10137
10138        /// Optional. The level of logs to write to Cloud Logging for this job.
10139        ///
10140        /// Debug-level logs provide highly-detailed information for
10141        /// troubleshooting, but their increased verbosity could incur [additional
10142        /// costs](https://cloud.google.com/stackdriver/pricing) that might not be
10143        /// merited for all jobs.
10144        ///
10145        /// If unspecified, defaults to `INFO`.
10146        pub log_level: crate::model::metadata_job::import_job_spec::LogLevel,
10147
10148        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10149    }
10150
10151    impl ImportJobSpec {
10152        pub fn new() -> Self {
10153            std::default::Default::default()
10154        }
10155
10156        /// Sets the value of [source_storage_uri][crate::model::metadata_job::ImportJobSpec::source_storage_uri].
10157        ///
10158        /// # Example
10159        /// ```ignore,no_run
10160        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10161        /// let x = ImportJobSpec::new().set_source_storage_uri("example");
10162        /// ```
10163        pub fn set_source_storage_uri<T: std::convert::Into<std::string::String>>(
10164            mut self,
10165            v: T,
10166        ) -> Self {
10167            self.source_storage_uri = v.into();
10168            self
10169        }
10170
10171        /// Sets the value of [source_create_time][crate::model::metadata_job::ImportJobSpec::source_create_time].
10172        ///
10173        /// # Example
10174        /// ```ignore,no_run
10175        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10176        /// use wkt::Timestamp;
10177        /// let x = ImportJobSpec::new().set_source_create_time(Timestamp::default()/* use setters */);
10178        /// ```
10179        pub fn set_source_create_time<T>(mut self, v: T) -> Self
10180        where
10181            T: std::convert::Into<wkt::Timestamp>,
10182        {
10183            self.source_create_time = std::option::Option::Some(v.into());
10184            self
10185        }
10186
10187        /// Sets or clears the value of [source_create_time][crate::model::metadata_job::ImportJobSpec::source_create_time].
10188        ///
10189        /// # Example
10190        /// ```ignore,no_run
10191        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10192        /// use wkt::Timestamp;
10193        /// let x = ImportJobSpec::new().set_or_clear_source_create_time(Some(Timestamp::default()/* use setters */));
10194        /// let x = ImportJobSpec::new().set_or_clear_source_create_time(None::<Timestamp>);
10195        /// ```
10196        pub fn set_or_clear_source_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10197        where
10198            T: std::convert::Into<wkt::Timestamp>,
10199        {
10200            self.source_create_time = v.map(|x| x.into());
10201            self
10202        }
10203
10204        /// Sets the value of [scope][crate::model::metadata_job::ImportJobSpec::scope].
10205        ///
10206        /// # Example
10207        /// ```ignore,no_run
10208        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10209        /// use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10210        /// let x = ImportJobSpec::new().set_scope(ImportJobScope::default()/* use setters */);
10211        /// ```
10212        pub fn set_scope<T>(mut self, v: T) -> Self
10213        where
10214            T: std::convert::Into<crate::model::metadata_job::import_job_spec::ImportJobScope>,
10215        {
10216            self.scope = std::option::Option::Some(v.into());
10217            self
10218        }
10219
10220        /// Sets or clears the value of [scope][crate::model::metadata_job::ImportJobSpec::scope].
10221        ///
10222        /// # Example
10223        /// ```ignore,no_run
10224        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10225        /// use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10226        /// let x = ImportJobSpec::new().set_or_clear_scope(Some(ImportJobScope::default()/* use setters */));
10227        /// let x = ImportJobSpec::new().set_or_clear_scope(None::<ImportJobScope>);
10228        /// ```
10229        pub fn set_or_clear_scope<T>(mut self, v: std::option::Option<T>) -> Self
10230        where
10231            T: std::convert::Into<crate::model::metadata_job::import_job_spec::ImportJobScope>,
10232        {
10233            self.scope = v.map(|x| x.into());
10234            self
10235        }
10236
10237        /// Sets the value of [entry_sync_mode][crate::model::metadata_job::ImportJobSpec::entry_sync_mode].
10238        ///
10239        /// # Example
10240        /// ```ignore,no_run
10241        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10242        /// use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::SyncMode;
10243        /// let x0 = ImportJobSpec::new().set_entry_sync_mode(SyncMode::Full);
10244        /// let x1 = ImportJobSpec::new().set_entry_sync_mode(SyncMode::Incremental);
10245        /// let x2 = ImportJobSpec::new().set_entry_sync_mode(SyncMode::None);
10246        /// ```
10247        pub fn set_entry_sync_mode<
10248            T: std::convert::Into<crate::model::metadata_job::import_job_spec::SyncMode>,
10249        >(
10250            mut self,
10251            v: T,
10252        ) -> Self {
10253            self.entry_sync_mode = v.into();
10254            self
10255        }
10256
10257        /// Sets the value of [aspect_sync_mode][crate::model::metadata_job::ImportJobSpec::aspect_sync_mode].
10258        ///
10259        /// # Example
10260        /// ```ignore,no_run
10261        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10262        /// use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::SyncMode;
10263        /// let x0 = ImportJobSpec::new().set_aspect_sync_mode(SyncMode::Full);
10264        /// let x1 = ImportJobSpec::new().set_aspect_sync_mode(SyncMode::Incremental);
10265        /// let x2 = ImportJobSpec::new().set_aspect_sync_mode(SyncMode::None);
10266        /// ```
10267        pub fn set_aspect_sync_mode<
10268            T: std::convert::Into<crate::model::metadata_job::import_job_spec::SyncMode>,
10269        >(
10270            mut self,
10271            v: T,
10272        ) -> Self {
10273            self.aspect_sync_mode = v.into();
10274            self
10275        }
10276
10277        /// Sets the value of [log_level][crate::model::metadata_job::ImportJobSpec::log_level].
10278        ///
10279        /// # Example
10280        /// ```ignore,no_run
10281        /// # use google_cloud_dataplex_v1::model::metadata_job::ImportJobSpec;
10282        /// use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::LogLevel;
10283        /// let x0 = ImportJobSpec::new().set_log_level(LogLevel::Debug);
10284        /// let x1 = ImportJobSpec::new().set_log_level(LogLevel::Info);
10285        /// ```
10286        pub fn set_log_level<
10287            T: std::convert::Into<crate::model::metadata_job::import_job_spec::LogLevel>,
10288        >(
10289            mut self,
10290            v: T,
10291        ) -> Self {
10292            self.log_level = v.into();
10293            self
10294        }
10295    }
10296
10297    impl wkt::message::Message for ImportJobSpec {
10298        fn typename() -> &'static str {
10299            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ImportJobSpec"
10300        }
10301    }
10302
10303    /// Defines additional types related to [ImportJobSpec].
10304    pub mod import_job_spec {
10305        #[allow(unused_imports)]
10306        use super::*;
10307
10308        /// A boundary on the scope of impact that the metadata import job can have.
10309        #[derive(Clone, Default, PartialEq)]
10310        #[non_exhaustive]
10311        pub struct ImportJobScope {
10312            /// Required. The entry groups that are in scope for the import job,
10313            /// specified as relative resource names in the format
10314            /// `projects/{project_number_or_id}/locations/{location_id}/entryGroups/{entry_group_id}`.
10315            /// Only entries and aspects that belong to the specified entry groups are
10316            /// affected by the job.
10317            ///
10318            /// The entry groups and the job must be in the same location.
10319            pub entry_groups: std::vec::Vec<std::string::String>,
10320
10321            /// Required. The entry types that are in scope for the import job,
10322            /// specified as relative resource names in the format
10323            /// `projects/{project_number_or_id}/locations/{location_id}/entryTypes/{entry_type_id}`.
10324            /// The job modifies only the entries and aspects that belong to these
10325            /// entry types.
10326            ///
10327            /// If the metadata import file attempts to modify an entry whose type
10328            /// isn't included in this list, the import job is halted before modifying
10329            /// any entries or aspects.
10330            ///
10331            /// The location of an entry type must either match the location of the
10332            /// job, or the entry type must be global.
10333            pub entry_types: std::vec::Vec<std::string::String>,
10334
10335            /// Optional. The aspect types that are in scope for the import job,
10336            /// specified as relative resource names in the format
10337            /// `projects/{project_number_or_id}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
10338            /// The job modifies only the aspects that belong to these aspect types.
10339            ///
10340            /// This field is required when creating an aspect-only import job.
10341            ///
10342            /// If the metadata import file attempts to modify an aspect whose type
10343            /// isn't included in this list, the import job is halted before modifying
10344            /// any entries or aspects.
10345            ///
10346            /// The location of an aspect type must either match the location of the
10347            /// job, or the aspect type must be global.
10348            pub aspect_types: std::vec::Vec<std::string::String>,
10349
10350            /// Optional. The glossaries that are in scope for the import job,
10351            /// specified as relative resource names in the format
10352            /// `projects/{project_number_or_id}/locations/{location_id}/glossaries/{glossary_id}`.
10353            ///
10354            /// While importing Business Glossary entries, the user must
10355            /// provide glossaries. While importing entries, the user does not have to
10356            /// provide glossaries. If the metadata import file attempts to modify
10357            /// Business Glossary entries whose glossary isn't included in this list,
10358            /// the import job will skip those entries.
10359            ///
10360            /// The location of a glossary must either match the location of the
10361            /// job, or the glossary must be global.
10362            pub glossaries: std::vec::Vec<std::string::String>,
10363
10364            /// Optional. The entry link types that are in scope for the import job,
10365            /// specified as relative resource names in the format
10366            /// `projects/{project_number_or_id}/locations/{location_id}/entryLinkTypes/{entry_link_type_id}`.
10367            /// The job modifies only the entryLinks that belong to these entry link
10368            /// types.
10369            ///
10370            /// If the metadata import file attempts to create or delete an entry link
10371            /// whose entry link type isn't included in this list, the import job will
10372            /// skip those entry links.
10373            pub entry_link_types: std::vec::Vec<std::string::String>,
10374
10375            /// Optional. Defines the scope of entries that can be referenced in the
10376            /// entry links.
10377            ///
10378            /// Currently, projects are supported as valid scopes.
10379            /// Format: `projects/{project_number_or_id}`
10380            ///
10381            /// If the metadata import file attempts to create an entry link
10382            /// which references an entry that is not in the scope, the import job will
10383            /// skip that entry link.
10384            pub referenced_entry_scopes: std::vec::Vec<std::string::String>,
10385
10386            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10387        }
10388
10389        impl ImportJobScope {
10390            pub fn new() -> Self {
10391                std::default::Default::default()
10392            }
10393
10394            /// Sets the value of [entry_groups][crate::model::metadata_job::import_job_spec::ImportJobScope::entry_groups].
10395            ///
10396            /// # Example
10397            /// ```ignore,no_run
10398            /// # use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10399            /// let x = ImportJobScope::new().set_entry_groups(["a", "b", "c"]);
10400            /// ```
10401            pub fn set_entry_groups<T, V>(mut self, v: T) -> Self
10402            where
10403                T: std::iter::IntoIterator<Item = V>,
10404                V: std::convert::Into<std::string::String>,
10405            {
10406                use std::iter::Iterator;
10407                self.entry_groups = v.into_iter().map(|i| i.into()).collect();
10408                self
10409            }
10410
10411            /// Sets the value of [entry_types][crate::model::metadata_job::import_job_spec::ImportJobScope::entry_types].
10412            ///
10413            /// # Example
10414            /// ```ignore,no_run
10415            /// # use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10416            /// let x = ImportJobScope::new().set_entry_types(["a", "b", "c"]);
10417            /// ```
10418            pub fn set_entry_types<T, V>(mut self, v: T) -> Self
10419            where
10420                T: std::iter::IntoIterator<Item = V>,
10421                V: std::convert::Into<std::string::String>,
10422            {
10423                use std::iter::Iterator;
10424                self.entry_types = v.into_iter().map(|i| i.into()).collect();
10425                self
10426            }
10427
10428            /// Sets the value of [aspect_types][crate::model::metadata_job::import_job_spec::ImportJobScope::aspect_types].
10429            ///
10430            /// # Example
10431            /// ```ignore,no_run
10432            /// # use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10433            /// let x = ImportJobScope::new().set_aspect_types(["a", "b", "c"]);
10434            /// ```
10435            pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
10436            where
10437                T: std::iter::IntoIterator<Item = V>,
10438                V: std::convert::Into<std::string::String>,
10439            {
10440                use std::iter::Iterator;
10441                self.aspect_types = v.into_iter().map(|i| i.into()).collect();
10442                self
10443            }
10444
10445            /// Sets the value of [glossaries][crate::model::metadata_job::import_job_spec::ImportJobScope::glossaries].
10446            ///
10447            /// # Example
10448            /// ```ignore,no_run
10449            /// # use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10450            /// let x = ImportJobScope::new().set_glossaries(["a", "b", "c"]);
10451            /// ```
10452            pub fn set_glossaries<T, V>(mut self, v: T) -> Self
10453            where
10454                T: std::iter::IntoIterator<Item = V>,
10455                V: std::convert::Into<std::string::String>,
10456            {
10457                use std::iter::Iterator;
10458                self.glossaries = v.into_iter().map(|i| i.into()).collect();
10459                self
10460            }
10461
10462            /// Sets the value of [entry_link_types][crate::model::metadata_job::import_job_spec::ImportJobScope::entry_link_types].
10463            ///
10464            /// # Example
10465            /// ```ignore,no_run
10466            /// # use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10467            /// let x = ImportJobScope::new().set_entry_link_types(["a", "b", "c"]);
10468            /// ```
10469            pub fn set_entry_link_types<T, V>(mut self, v: T) -> Self
10470            where
10471                T: std::iter::IntoIterator<Item = V>,
10472                V: std::convert::Into<std::string::String>,
10473            {
10474                use std::iter::Iterator;
10475                self.entry_link_types = v.into_iter().map(|i| i.into()).collect();
10476                self
10477            }
10478
10479            /// Sets the value of [referenced_entry_scopes][crate::model::metadata_job::import_job_spec::ImportJobScope::referenced_entry_scopes].
10480            ///
10481            /// # Example
10482            /// ```ignore,no_run
10483            /// # use google_cloud_dataplex_v1::model::metadata_job::import_job_spec::ImportJobScope;
10484            /// let x = ImportJobScope::new().set_referenced_entry_scopes(["a", "b", "c"]);
10485            /// ```
10486            pub fn set_referenced_entry_scopes<T, V>(mut self, v: T) -> Self
10487            where
10488                T: std::iter::IntoIterator<Item = V>,
10489                V: std::convert::Into<std::string::String>,
10490            {
10491                use std::iter::Iterator;
10492                self.referenced_entry_scopes = v.into_iter().map(|i| i.into()).collect();
10493                self
10494            }
10495        }
10496
10497        impl wkt::message::Message for ImportJobScope {
10498            fn typename() -> &'static str {
10499                "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope"
10500            }
10501        }
10502
10503        /// Specifies how the entries and aspects in a metadata import job are
10504        /// updated. For more information, see [Sync
10505        /// mode](https://cloud.google.com/dataplex/docs/import-metadata#sync-mode).
10506        ///
10507        /// # Working with unknown values
10508        ///
10509        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10510        /// additional enum variants at any time. Adding new variants is not considered
10511        /// a breaking change. Applications should write their code in anticipation of:
10512        ///
10513        /// - New values appearing in future releases of the client library, **and**
10514        /// - New values received dynamically, without application changes.
10515        ///
10516        /// Please consult the [Working with enums] section in the user guide for some
10517        /// guidelines.
10518        ///
10519        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10520        #[derive(Clone, Debug, PartialEq)]
10521        #[non_exhaustive]
10522        pub enum SyncMode {
10523            /// Sync mode unspecified.
10524            Unspecified,
10525            /// All resources in the job's scope are modified. If a resource exists in
10526            /// Dataplex Universal Catalog but isn't included in the metadata import
10527            /// file, the resource is deleted when you run the metadata job. Use this
10528            /// mode to perform a full sync of the set of entries in the job scope.
10529            ///
10530            /// This sync mode is supported for entries.
10531            Full,
10532            /// Only the resources that are explicitly included in the
10533            /// metadata import file are modified. Use this mode to modify a subset of
10534            /// resources while leaving unreferenced resources unchanged.
10535            ///
10536            /// This sync mode is supported for aspects.
10537            Incremental,
10538            /// If entry sync mode is `NONE`, then aspects are modified according
10539            /// to the aspect sync mode. Other metadata that belongs to entries in the
10540            /// job's scope isn't modified.
10541            ///
10542            /// This sync mode is supported for entries.
10543            None,
10544            /// If set, the enum was initialized with an unknown value.
10545            ///
10546            /// Applications can examine the value using [SyncMode::value] or
10547            /// [SyncMode::name].
10548            UnknownValue(sync_mode::UnknownValue),
10549        }
10550
10551        #[doc(hidden)]
10552        pub mod sync_mode {
10553            #[allow(unused_imports)]
10554            use super::*;
10555            #[derive(Clone, Debug, PartialEq)]
10556            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10557        }
10558
10559        impl SyncMode {
10560            /// Gets the enum value.
10561            ///
10562            /// Returns `None` if the enum contains an unknown value deserialized from
10563            /// the string representation of enums.
10564            pub fn value(&self) -> std::option::Option<i32> {
10565                match self {
10566                    Self::Unspecified => std::option::Option::Some(0),
10567                    Self::Full => std::option::Option::Some(1),
10568                    Self::Incremental => std::option::Option::Some(2),
10569                    Self::None => std::option::Option::Some(3),
10570                    Self::UnknownValue(u) => u.0.value(),
10571                }
10572            }
10573
10574            /// Gets the enum value as a string.
10575            ///
10576            /// Returns `None` if the enum contains an unknown value deserialized from
10577            /// the integer representation of enums.
10578            pub fn name(&self) -> std::option::Option<&str> {
10579                match self {
10580                    Self::Unspecified => std::option::Option::Some("SYNC_MODE_UNSPECIFIED"),
10581                    Self::Full => std::option::Option::Some("FULL"),
10582                    Self::Incremental => std::option::Option::Some("INCREMENTAL"),
10583                    Self::None => std::option::Option::Some("NONE"),
10584                    Self::UnknownValue(u) => u.0.name(),
10585                }
10586            }
10587        }
10588
10589        impl std::default::Default for SyncMode {
10590            fn default() -> Self {
10591                use std::convert::From;
10592                Self::from(0)
10593            }
10594        }
10595
10596        impl std::fmt::Display for SyncMode {
10597            fn fmt(
10598                &self,
10599                f: &mut std::fmt::Formatter<'_>,
10600            ) -> std::result::Result<(), std::fmt::Error> {
10601                wkt::internal::display_enum(f, self.name(), self.value())
10602            }
10603        }
10604
10605        impl std::convert::From<i32> for SyncMode {
10606            fn from(value: i32) -> Self {
10607                match value {
10608                    0 => Self::Unspecified,
10609                    1 => Self::Full,
10610                    2 => Self::Incremental,
10611                    3 => Self::None,
10612                    _ => Self::UnknownValue(sync_mode::UnknownValue(
10613                        wkt::internal::UnknownEnumValue::Integer(value),
10614                    )),
10615                }
10616            }
10617        }
10618
10619        impl std::convert::From<&str> for SyncMode {
10620            fn from(value: &str) -> Self {
10621                use std::string::ToString;
10622                match value {
10623                    "SYNC_MODE_UNSPECIFIED" => Self::Unspecified,
10624                    "FULL" => Self::Full,
10625                    "INCREMENTAL" => Self::Incremental,
10626                    "NONE" => Self::None,
10627                    _ => Self::UnknownValue(sync_mode::UnknownValue(
10628                        wkt::internal::UnknownEnumValue::String(value.to_string()),
10629                    )),
10630                }
10631            }
10632        }
10633
10634        impl serde::ser::Serialize for SyncMode {
10635            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10636            where
10637                S: serde::Serializer,
10638            {
10639                match self {
10640                    Self::Unspecified => serializer.serialize_i32(0),
10641                    Self::Full => serializer.serialize_i32(1),
10642                    Self::Incremental => serializer.serialize_i32(2),
10643                    Self::None => serializer.serialize_i32(3),
10644                    Self::UnknownValue(u) => u.0.serialize(serializer),
10645                }
10646            }
10647        }
10648
10649        impl<'de> serde::de::Deserialize<'de> for SyncMode {
10650            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10651            where
10652                D: serde::Deserializer<'de>,
10653            {
10654                deserializer.deserialize_any(wkt::internal::EnumVisitor::<SyncMode>::new(
10655                    ".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode",
10656                ))
10657            }
10658        }
10659
10660        /// The level of logs to write to Cloud Logging for this job.
10661        ///
10662        /// # Working with unknown values
10663        ///
10664        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10665        /// additional enum variants at any time. Adding new variants is not considered
10666        /// a breaking change. Applications should write their code in anticipation of:
10667        ///
10668        /// - New values appearing in future releases of the client library, **and**
10669        /// - New values received dynamically, without application changes.
10670        ///
10671        /// Please consult the [Working with enums] section in the user guide for some
10672        /// guidelines.
10673        ///
10674        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10675        #[derive(Clone, Debug, PartialEq)]
10676        #[non_exhaustive]
10677        pub enum LogLevel {
10678            /// Log level unspecified.
10679            Unspecified,
10680            /// Debug-level logging. Captures detailed logs for each import item. Use
10681            /// debug-level logging to troubleshoot issues with specific import items.
10682            /// For example, use debug-level logging to identify resources that are
10683            /// missing from the job scope, entries or aspects that don't conform to
10684            /// the associated entry type or aspect type, or other misconfigurations
10685            /// with the metadata import file.
10686            ///
10687            /// Depending on the size of your metadata job and the number of logs that
10688            /// are generated, debug-level logging might incur
10689            /// [additional costs](https://cloud.google.com/stackdriver/pricing).
10690            Debug,
10691            /// Info-level logging. Captures logs at the overall job level. Includes
10692            /// aggregate logs about import items, but doesn't specify which import
10693            /// item has an error.
10694            Info,
10695            /// If set, the enum was initialized with an unknown value.
10696            ///
10697            /// Applications can examine the value using [LogLevel::value] or
10698            /// [LogLevel::name].
10699            UnknownValue(log_level::UnknownValue),
10700        }
10701
10702        #[doc(hidden)]
10703        pub mod log_level {
10704            #[allow(unused_imports)]
10705            use super::*;
10706            #[derive(Clone, Debug, PartialEq)]
10707            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10708        }
10709
10710        impl LogLevel {
10711            /// Gets the enum value.
10712            ///
10713            /// Returns `None` if the enum contains an unknown value deserialized from
10714            /// the string representation of enums.
10715            pub fn value(&self) -> std::option::Option<i32> {
10716                match self {
10717                    Self::Unspecified => std::option::Option::Some(0),
10718                    Self::Debug => std::option::Option::Some(1),
10719                    Self::Info => std::option::Option::Some(2),
10720                    Self::UnknownValue(u) => u.0.value(),
10721                }
10722            }
10723
10724            /// Gets the enum value as a string.
10725            ///
10726            /// Returns `None` if the enum contains an unknown value deserialized from
10727            /// the integer representation of enums.
10728            pub fn name(&self) -> std::option::Option<&str> {
10729                match self {
10730                    Self::Unspecified => std::option::Option::Some("LOG_LEVEL_UNSPECIFIED"),
10731                    Self::Debug => std::option::Option::Some("DEBUG"),
10732                    Self::Info => std::option::Option::Some("INFO"),
10733                    Self::UnknownValue(u) => u.0.name(),
10734                }
10735            }
10736        }
10737
10738        impl std::default::Default for LogLevel {
10739            fn default() -> Self {
10740                use std::convert::From;
10741                Self::from(0)
10742            }
10743        }
10744
10745        impl std::fmt::Display for LogLevel {
10746            fn fmt(
10747                &self,
10748                f: &mut std::fmt::Formatter<'_>,
10749            ) -> std::result::Result<(), std::fmt::Error> {
10750                wkt::internal::display_enum(f, self.name(), self.value())
10751            }
10752        }
10753
10754        impl std::convert::From<i32> for LogLevel {
10755            fn from(value: i32) -> Self {
10756                match value {
10757                    0 => Self::Unspecified,
10758                    1 => Self::Debug,
10759                    2 => Self::Info,
10760                    _ => Self::UnknownValue(log_level::UnknownValue(
10761                        wkt::internal::UnknownEnumValue::Integer(value),
10762                    )),
10763                }
10764            }
10765        }
10766
10767        impl std::convert::From<&str> for LogLevel {
10768            fn from(value: &str) -> Self {
10769                use std::string::ToString;
10770                match value {
10771                    "LOG_LEVEL_UNSPECIFIED" => Self::Unspecified,
10772                    "DEBUG" => Self::Debug,
10773                    "INFO" => Self::Info,
10774                    _ => Self::UnknownValue(log_level::UnknownValue(
10775                        wkt::internal::UnknownEnumValue::String(value.to_string()),
10776                    )),
10777                }
10778            }
10779        }
10780
10781        impl serde::ser::Serialize for LogLevel {
10782            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10783            where
10784                S: serde::Serializer,
10785            {
10786                match self {
10787                    Self::Unspecified => serializer.serialize_i32(0),
10788                    Self::Debug => serializer.serialize_i32(1),
10789                    Self::Info => serializer.serialize_i32(2),
10790                    Self::UnknownValue(u) => u.0.serialize(serializer),
10791                }
10792            }
10793        }
10794
10795        impl<'de> serde::de::Deserialize<'de> for LogLevel {
10796            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10797            where
10798                D: serde::Deserializer<'de>,
10799            {
10800                deserializer.deserialize_any(wkt::internal::EnumVisitor::<LogLevel>::new(
10801                    ".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel",
10802                ))
10803            }
10804        }
10805    }
10806
10807    /// Job specification for a metadata export job.
10808    #[derive(Clone, Default, PartialEq)]
10809    #[non_exhaustive]
10810    pub struct ExportJobSpec {
10811        /// Required. The scope of the export job.
10812        pub scope: std::option::Option<crate::model::metadata_job::export_job_spec::ExportJobScope>,
10813
10814        /// Required. The root path of the Cloud Storage bucket to export the
10815        /// metadata to, in the format `gs://{bucket}/`. You can optionally specify a
10816        /// custom prefix after the bucket name, in the format
10817        /// `gs://{bucket}/{prefix}/`. The maximum length of the custom prefix is 128
10818        /// characters. Dataplex Universal Catalog constructs the object path for the
10819        /// exported files by using the bucket name and prefix that you provide,
10820        /// followed by a system-generated path.
10821        ///
10822        /// The bucket must be in the same VPC Service Controls perimeter as the job.
10823        pub output_path: std::string::String,
10824
10825        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10826    }
10827
10828    impl ExportJobSpec {
10829        pub fn new() -> Self {
10830            std::default::Default::default()
10831        }
10832
10833        /// Sets the value of [scope][crate::model::metadata_job::ExportJobSpec::scope].
10834        ///
10835        /// # Example
10836        /// ```ignore,no_run
10837        /// # use google_cloud_dataplex_v1::model::metadata_job::ExportJobSpec;
10838        /// use google_cloud_dataplex_v1::model::metadata_job::export_job_spec::ExportJobScope;
10839        /// let x = ExportJobSpec::new().set_scope(ExportJobScope::default()/* use setters */);
10840        /// ```
10841        pub fn set_scope<T>(mut self, v: T) -> Self
10842        where
10843            T: std::convert::Into<crate::model::metadata_job::export_job_spec::ExportJobScope>,
10844        {
10845            self.scope = std::option::Option::Some(v.into());
10846            self
10847        }
10848
10849        /// Sets or clears the value of [scope][crate::model::metadata_job::ExportJobSpec::scope].
10850        ///
10851        /// # Example
10852        /// ```ignore,no_run
10853        /// # use google_cloud_dataplex_v1::model::metadata_job::ExportJobSpec;
10854        /// use google_cloud_dataplex_v1::model::metadata_job::export_job_spec::ExportJobScope;
10855        /// let x = ExportJobSpec::new().set_or_clear_scope(Some(ExportJobScope::default()/* use setters */));
10856        /// let x = ExportJobSpec::new().set_or_clear_scope(None::<ExportJobScope>);
10857        /// ```
10858        pub fn set_or_clear_scope<T>(mut self, v: std::option::Option<T>) -> Self
10859        where
10860            T: std::convert::Into<crate::model::metadata_job::export_job_spec::ExportJobScope>,
10861        {
10862            self.scope = v.map(|x| x.into());
10863            self
10864        }
10865
10866        /// Sets the value of [output_path][crate::model::metadata_job::ExportJobSpec::output_path].
10867        ///
10868        /// # Example
10869        /// ```ignore,no_run
10870        /// # use google_cloud_dataplex_v1::model::metadata_job::ExportJobSpec;
10871        /// let x = ExportJobSpec::new().set_output_path("example");
10872        /// ```
10873        pub fn set_output_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10874            self.output_path = v.into();
10875            self
10876        }
10877    }
10878
10879    impl wkt::message::Message for ExportJobSpec {
10880        fn typename() -> &'static str {
10881            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ExportJobSpec"
10882        }
10883    }
10884
10885    /// Defines additional types related to [ExportJobSpec].
10886    pub mod export_job_spec {
10887        #[allow(unused_imports)]
10888        use super::*;
10889
10890        /// The scope of the export job.
10891        #[derive(Clone, Default, PartialEq)]
10892        #[non_exhaustive]
10893        pub struct ExportJobScope {
10894            /// Whether the metadata export job is an organization-level export job.
10895            ///
10896            /// - If `true`, the job exports the entries from the same organization and
10897            ///   VPC Service Controls perimeter as the job. The project that the job
10898            ///   belongs to determines the VPC Service Controls perimeter. If you set
10899            ///   the job scope to be at the organization level, then don't provide a
10900            ///   list of projects or entry groups.
10901            /// - If `false`, you must specify a list of projects or a list of entry
10902            ///   groups whose entries you want to export.
10903            ///
10904            /// The default is `false`.
10905            pub organization_level: bool,
10906
10907            /// The projects whose metadata you want to export, in the format
10908            /// `projects/{project_id_or_number}`. Only the entries from
10909            /// the specified projects are exported.
10910            ///
10911            /// The projects must be in the same organization and VPC Service Controls
10912            /// perimeter as the job.
10913            ///
10914            /// If you set the job scope to be a list of projects, then set the
10915            /// organization-level export flag to false and don't provide a list of
10916            /// entry groups.
10917            pub projects: std::vec::Vec<std::string::String>,
10918
10919            /// The entry groups whose metadata you want to export, in the format
10920            /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
10921            /// Only the entries in the specified entry groups are exported.
10922            ///
10923            /// The entry groups must be in the same location and the same VPC Service
10924            /// Controls perimeter as the job.
10925            ///
10926            /// If you set the job scope to be a list of entry groups, then set the
10927            /// organization-level export flag to false and don't provide a list of
10928            /// projects.
10929            pub entry_groups: std::vec::Vec<std::string::String>,
10930
10931            /// The entry types that are in scope for the export job, specified as
10932            /// relative resource names in the format
10933            /// `projects/{project_id_or_number}/locations/{location}/entryTypes/{entry_type_id}`.
10934            /// Only entries that belong to the specified entry types are affected by
10935            /// the job.
10936            pub entry_types: std::vec::Vec<std::string::String>,
10937
10938            /// The aspect types that are in scope for the export job, specified as
10939            /// relative resource names in the format
10940            /// `projects/{project_id_or_number}/locations/{location}/aspectTypes/{aspect_type_id}`.
10941            /// Only aspects that belong to the specified aspect types are affected by
10942            /// the job.
10943            pub aspect_types: std::vec::Vec<std::string::String>,
10944
10945            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10946        }
10947
10948        impl ExportJobScope {
10949            pub fn new() -> Self {
10950                std::default::Default::default()
10951            }
10952
10953            /// Sets the value of [organization_level][crate::model::metadata_job::export_job_spec::ExportJobScope::organization_level].
10954            ///
10955            /// # Example
10956            /// ```ignore,no_run
10957            /// # use google_cloud_dataplex_v1::model::metadata_job::export_job_spec::ExportJobScope;
10958            /// let x = ExportJobScope::new().set_organization_level(true);
10959            /// ```
10960            pub fn set_organization_level<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10961                self.organization_level = v.into();
10962                self
10963            }
10964
10965            /// Sets the value of [projects][crate::model::metadata_job::export_job_spec::ExportJobScope::projects].
10966            ///
10967            /// # Example
10968            /// ```ignore,no_run
10969            /// # use google_cloud_dataplex_v1::model::metadata_job::export_job_spec::ExportJobScope;
10970            /// let x = ExportJobScope::new().set_projects(["a", "b", "c"]);
10971            /// ```
10972            pub fn set_projects<T, V>(mut self, v: T) -> Self
10973            where
10974                T: std::iter::IntoIterator<Item = V>,
10975                V: std::convert::Into<std::string::String>,
10976            {
10977                use std::iter::Iterator;
10978                self.projects = v.into_iter().map(|i| i.into()).collect();
10979                self
10980            }
10981
10982            /// Sets the value of [entry_groups][crate::model::metadata_job::export_job_spec::ExportJobScope::entry_groups].
10983            ///
10984            /// # Example
10985            /// ```ignore,no_run
10986            /// # use google_cloud_dataplex_v1::model::metadata_job::export_job_spec::ExportJobScope;
10987            /// let x = ExportJobScope::new().set_entry_groups(["a", "b", "c"]);
10988            /// ```
10989            pub fn set_entry_groups<T, V>(mut self, v: T) -> Self
10990            where
10991                T: std::iter::IntoIterator<Item = V>,
10992                V: std::convert::Into<std::string::String>,
10993            {
10994                use std::iter::Iterator;
10995                self.entry_groups = v.into_iter().map(|i| i.into()).collect();
10996                self
10997            }
10998
10999            /// Sets the value of [entry_types][crate::model::metadata_job::export_job_spec::ExportJobScope::entry_types].
11000            ///
11001            /// # Example
11002            /// ```ignore,no_run
11003            /// # use google_cloud_dataplex_v1::model::metadata_job::export_job_spec::ExportJobScope;
11004            /// let x = ExportJobScope::new().set_entry_types(["a", "b", "c"]);
11005            /// ```
11006            pub fn set_entry_types<T, V>(mut self, v: T) -> Self
11007            where
11008                T: std::iter::IntoIterator<Item = V>,
11009                V: std::convert::Into<std::string::String>,
11010            {
11011                use std::iter::Iterator;
11012                self.entry_types = v.into_iter().map(|i| i.into()).collect();
11013                self
11014            }
11015
11016            /// Sets the value of [aspect_types][crate::model::metadata_job::export_job_spec::ExportJobScope::aspect_types].
11017            ///
11018            /// # Example
11019            /// ```ignore,no_run
11020            /// # use google_cloud_dataplex_v1::model::metadata_job::export_job_spec::ExportJobScope;
11021            /// let x = ExportJobScope::new().set_aspect_types(["a", "b", "c"]);
11022            /// ```
11023            pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
11024            where
11025                T: std::iter::IntoIterator<Item = V>,
11026                V: std::convert::Into<std::string::String>,
11027            {
11028                use std::iter::Iterator;
11029                self.aspect_types = v.into_iter().map(|i| i.into()).collect();
11030                self
11031            }
11032        }
11033
11034        impl wkt::message::Message for ExportJobScope {
11035            fn typename() -> &'static str {
11036                "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ExportJobSpec.ExportJobScope"
11037            }
11038        }
11039    }
11040
11041    /// Metadata job status.
11042    #[derive(Clone, Default, PartialEq)]
11043    #[non_exhaustive]
11044    pub struct Status {
11045        /// Output only. State of the metadata job.
11046        pub state: crate::model::metadata_job::status::State,
11047
11048        /// Output only. Message relating to the progression of a metadata job.
11049        pub message: std::string::String,
11050
11051        /// Output only. Progress tracking.
11052        pub completion_percent: i32,
11053
11054        /// Output only. The time when the status was updated.
11055        pub update_time: std::option::Option<wkt::Timestamp>,
11056
11057        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11058    }
11059
11060    impl Status {
11061        pub fn new() -> Self {
11062            std::default::Default::default()
11063        }
11064
11065        /// Sets the value of [state][crate::model::metadata_job::Status::state].
11066        ///
11067        /// # Example
11068        /// ```ignore,no_run
11069        /// # use google_cloud_dataplex_v1::model::metadata_job::Status;
11070        /// use google_cloud_dataplex_v1::model::metadata_job::status::State;
11071        /// let x0 = Status::new().set_state(State::Queued);
11072        /// let x1 = Status::new().set_state(State::Running);
11073        /// let x2 = Status::new().set_state(State::Canceling);
11074        /// ```
11075        pub fn set_state<T: std::convert::Into<crate::model::metadata_job::status::State>>(
11076            mut self,
11077            v: T,
11078        ) -> Self {
11079            self.state = v.into();
11080            self
11081        }
11082
11083        /// Sets the value of [message][crate::model::metadata_job::Status::message].
11084        ///
11085        /// # Example
11086        /// ```ignore,no_run
11087        /// # use google_cloud_dataplex_v1::model::metadata_job::Status;
11088        /// let x = Status::new().set_message("example");
11089        /// ```
11090        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11091            self.message = v.into();
11092            self
11093        }
11094
11095        /// Sets the value of [completion_percent][crate::model::metadata_job::Status::completion_percent].
11096        ///
11097        /// # Example
11098        /// ```ignore,no_run
11099        /// # use google_cloud_dataplex_v1::model::metadata_job::Status;
11100        /// let x = Status::new().set_completion_percent(42);
11101        /// ```
11102        pub fn set_completion_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11103            self.completion_percent = v.into();
11104            self
11105        }
11106
11107        /// Sets the value of [update_time][crate::model::metadata_job::Status::update_time].
11108        ///
11109        /// # Example
11110        /// ```ignore,no_run
11111        /// # use google_cloud_dataplex_v1::model::metadata_job::Status;
11112        /// use wkt::Timestamp;
11113        /// let x = Status::new().set_update_time(Timestamp::default()/* use setters */);
11114        /// ```
11115        pub fn set_update_time<T>(mut self, v: T) -> Self
11116        where
11117            T: std::convert::Into<wkt::Timestamp>,
11118        {
11119            self.update_time = std::option::Option::Some(v.into());
11120            self
11121        }
11122
11123        /// Sets or clears the value of [update_time][crate::model::metadata_job::Status::update_time].
11124        ///
11125        /// # Example
11126        /// ```ignore,no_run
11127        /// # use google_cloud_dataplex_v1::model::metadata_job::Status;
11128        /// use wkt::Timestamp;
11129        /// let x = Status::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
11130        /// let x = Status::new().set_or_clear_update_time(None::<Timestamp>);
11131        /// ```
11132        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11133        where
11134            T: std::convert::Into<wkt::Timestamp>,
11135        {
11136            self.update_time = v.map(|x| x.into());
11137            self
11138        }
11139    }
11140
11141    impl wkt::message::Message for Status {
11142        fn typename() -> &'static str {
11143            "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.Status"
11144        }
11145    }
11146
11147    /// Defines additional types related to [Status].
11148    pub mod status {
11149        #[allow(unused_imports)]
11150        use super::*;
11151
11152        /// State of a metadata job.
11153        ///
11154        /// # Working with unknown values
11155        ///
11156        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11157        /// additional enum variants at any time. Adding new variants is not considered
11158        /// a breaking change. Applications should write their code in anticipation of:
11159        ///
11160        /// - New values appearing in future releases of the client library, **and**
11161        /// - New values received dynamically, without application changes.
11162        ///
11163        /// Please consult the [Working with enums] section in the user guide for some
11164        /// guidelines.
11165        ///
11166        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11167        #[derive(Clone, Debug, PartialEq)]
11168        #[non_exhaustive]
11169        pub enum State {
11170            /// State unspecified.
11171            Unspecified,
11172            /// The job is queued.
11173            Queued,
11174            /// The job is running.
11175            Running,
11176            /// The job is being canceled.
11177            Canceling,
11178            /// The job is canceled.
11179            Canceled,
11180            /// The job succeeded.
11181            Succeeded,
11182            /// The job failed.
11183            Failed,
11184            /// The job completed with some errors.
11185            SucceededWithErrors,
11186            /// If set, the enum was initialized with an unknown value.
11187            ///
11188            /// Applications can examine the value using [State::value] or
11189            /// [State::name].
11190            UnknownValue(state::UnknownValue),
11191        }
11192
11193        #[doc(hidden)]
11194        pub mod state {
11195            #[allow(unused_imports)]
11196            use super::*;
11197            #[derive(Clone, Debug, PartialEq)]
11198            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11199        }
11200
11201        impl State {
11202            /// Gets the enum value.
11203            ///
11204            /// Returns `None` if the enum contains an unknown value deserialized from
11205            /// the string representation of enums.
11206            pub fn value(&self) -> std::option::Option<i32> {
11207                match self {
11208                    Self::Unspecified => std::option::Option::Some(0),
11209                    Self::Queued => std::option::Option::Some(1),
11210                    Self::Running => std::option::Option::Some(2),
11211                    Self::Canceling => std::option::Option::Some(3),
11212                    Self::Canceled => std::option::Option::Some(4),
11213                    Self::Succeeded => std::option::Option::Some(5),
11214                    Self::Failed => std::option::Option::Some(6),
11215                    Self::SucceededWithErrors => std::option::Option::Some(7),
11216                    Self::UnknownValue(u) => u.0.value(),
11217                }
11218            }
11219
11220            /// Gets the enum value as a string.
11221            ///
11222            /// Returns `None` if the enum contains an unknown value deserialized from
11223            /// the integer representation of enums.
11224            pub fn name(&self) -> std::option::Option<&str> {
11225                match self {
11226                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
11227                    Self::Queued => std::option::Option::Some("QUEUED"),
11228                    Self::Running => std::option::Option::Some("RUNNING"),
11229                    Self::Canceling => std::option::Option::Some("CANCELING"),
11230                    Self::Canceled => std::option::Option::Some("CANCELED"),
11231                    Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
11232                    Self::Failed => std::option::Option::Some("FAILED"),
11233                    Self::SucceededWithErrors => std::option::Option::Some("SUCCEEDED_WITH_ERRORS"),
11234                    Self::UnknownValue(u) => u.0.name(),
11235                }
11236            }
11237        }
11238
11239        impl std::default::Default for State {
11240            fn default() -> Self {
11241                use std::convert::From;
11242                Self::from(0)
11243            }
11244        }
11245
11246        impl std::fmt::Display for State {
11247            fn fmt(
11248                &self,
11249                f: &mut std::fmt::Formatter<'_>,
11250            ) -> std::result::Result<(), std::fmt::Error> {
11251                wkt::internal::display_enum(f, self.name(), self.value())
11252            }
11253        }
11254
11255        impl std::convert::From<i32> for State {
11256            fn from(value: i32) -> Self {
11257                match value {
11258                    0 => Self::Unspecified,
11259                    1 => Self::Queued,
11260                    2 => Self::Running,
11261                    3 => Self::Canceling,
11262                    4 => Self::Canceled,
11263                    5 => Self::Succeeded,
11264                    6 => Self::Failed,
11265                    7 => Self::SucceededWithErrors,
11266                    _ => Self::UnknownValue(state::UnknownValue(
11267                        wkt::internal::UnknownEnumValue::Integer(value),
11268                    )),
11269                }
11270            }
11271        }
11272
11273        impl std::convert::From<&str> for State {
11274            fn from(value: &str) -> Self {
11275                use std::string::ToString;
11276                match value {
11277                    "STATE_UNSPECIFIED" => Self::Unspecified,
11278                    "QUEUED" => Self::Queued,
11279                    "RUNNING" => Self::Running,
11280                    "CANCELING" => Self::Canceling,
11281                    "CANCELED" => Self::Canceled,
11282                    "SUCCEEDED" => Self::Succeeded,
11283                    "FAILED" => Self::Failed,
11284                    "SUCCEEDED_WITH_ERRORS" => Self::SucceededWithErrors,
11285                    _ => Self::UnknownValue(state::UnknownValue(
11286                        wkt::internal::UnknownEnumValue::String(value.to_string()),
11287                    )),
11288                }
11289            }
11290        }
11291
11292        impl serde::ser::Serialize for State {
11293            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11294            where
11295                S: serde::Serializer,
11296            {
11297                match self {
11298                    Self::Unspecified => serializer.serialize_i32(0),
11299                    Self::Queued => serializer.serialize_i32(1),
11300                    Self::Running => serializer.serialize_i32(2),
11301                    Self::Canceling => serializer.serialize_i32(3),
11302                    Self::Canceled => serializer.serialize_i32(4),
11303                    Self::Succeeded => serializer.serialize_i32(5),
11304                    Self::Failed => serializer.serialize_i32(6),
11305                    Self::SucceededWithErrors => serializer.serialize_i32(7),
11306                    Self::UnknownValue(u) => u.0.serialize(serializer),
11307                }
11308            }
11309        }
11310
11311        impl<'de> serde::de::Deserialize<'de> for State {
11312            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11313            where
11314                D: serde::Deserializer<'de>,
11315            {
11316                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11317                    ".google.cloud.dataplex.v1.MetadataJob.Status.State",
11318                ))
11319            }
11320        }
11321    }
11322
11323    /// Metadata job type.
11324    ///
11325    /// # Working with unknown values
11326    ///
11327    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11328    /// additional enum variants at any time. Adding new variants is not considered
11329    /// a breaking change. Applications should write their code in anticipation of:
11330    ///
11331    /// - New values appearing in future releases of the client library, **and**
11332    /// - New values received dynamically, without application changes.
11333    ///
11334    /// Please consult the [Working with enums] section in the user guide for some
11335    /// guidelines.
11336    ///
11337    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11338    #[derive(Clone, Debug, PartialEq)]
11339    #[non_exhaustive]
11340    pub enum Type {
11341        /// Unspecified.
11342        Unspecified,
11343        /// Import job.
11344        Import,
11345        /// Export job.
11346        Export,
11347        /// If set, the enum was initialized with an unknown value.
11348        ///
11349        /// Applications can examine the value using [Type::value] or
11350        /// [Type::name].
11351        UnknownValue(r#type::UnknownValue),
11352    }
11353
11354    #[doc(hidden)]
11355    pub mod r#type {
11356        #[allow(unused_imports)]
11357        use super::*;
11358        #[derive(Clone, Debug, PartialEq)]
11359        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11360    }
11361
11362    impl Type {
11363        /// Gets the enum value.
11364        ///
11365        /// Returns `None` if the enum contains an unknown value deserialized from
11366        /// the string representation of enums.
11367        pub fn value(&self) -> std::option::Option<i32> {
11368            match self {
11369                Self::Unspecified => std::option::Option::Some(0),
11370                Self::Import => std::option::Option::Some(1),
11371                Self::Export => std::option::Option::Some(2),
11372                Self::UnknownValue(u) => u.0.value(),
11373            }
11374        }
11375
11376        /// Gets the enum value as a string.
11377        ///
11378        /// Returns `None` if the enum contains an unknown value deserialized from
11379        /// the integer representation of enums.
11380        pub fn name(&self) -> std::option::Option<&str> {
11381            match self {
11382                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
11383                Self::Import => std::option::Option::Some("IMPORT"),
11384                Self::Export => std::option::Option::Some("EXPORT"),
11385                Self::UnknownValue(u) => u.0.name(),
11386            }
11387        }
11388    }
11389
11390    impl std::default::Default for Type {
11391        fn default() -> Self {
11392            use std::convert::From;
11393            Self::from(0)
11394        }
11395    }
11396
11397    impl std::fmt::Display for Type {
11398        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11399            wkt::internal::display_enum(f, self.name(), self.value())
11400        }
11401    }
11402
11403    impl std::convert::From<i32> for Type {
11404        fn from(value: i32) -> Self {
11405            match value {
11406                0 => Self::Unspecified,
11407                1 => Self::Import,
11408                2 => Self::Export,
11409                _ => Self::UnknownValue(r#type::UnknownValue(
11410                    wkt::internal::UnknownEnumValue::Integer(value),
11411                )),
11412            }
11413        }
11414    }
11415
11416    impl std::convert::From<&str> for Type {
11417        fn from(value: &str) -> Self {
11418            use std::string::ToString;
11419            match value {
11420                "TYPE_UNSPECIFIED" => Self::Unspecified,
11421                "IMPORT" => Self::Import,
11422                "EXPORT" => Self::Export,
11423                _ => Self::UnknownValue(r#type::UnknownValue(
11424                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11425                )),
11426            }
11427        }
11428    }
11429
11430    impl serde::ser::Serialize for Type {
11431        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11432        where
11433            S: serde::Serializer,
11434        {
11435            match self {
11436                Self::Unspecified => serializer.serialize_i32(0),
11437                Self::Import => serializer.serialize_i32(1),
11438                Self::Export => serializer.serialize_i32(2),
11439                Self::UnknownValue(u) => u.0.serialize(serializer),
11440            }
11441        }
11442    }
11443
11444    impl<'de> serde::de::Deserialize<'de> for Type {
11445        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11446        where
11447            D: serde::Deserializer<'de>,
11448        {
11449            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
11450                ".google.cloud.dataplex.v1.MetadataJob.Type",
11451            ))
11452        }
11453    }
11454
11455    #[derive(Clone, Debug, PartialEq)]
11456    #[non_exhaustive]
11457    pub enum Spec {
11458        /// Import job specification.
11459        ImportSpec(std::boxed::Box<crate::model::metadata_job::ImportJobSpec>),
11460        /// Export job specification.
11461        ExportSpec(std::boxed::Box<crate::model::metadata_job::ExportJobSpec>),
11462    }
11463
11464    #[derive(Clone, Debug, PartialEq)]
11465    #[non_exhaustive]
11466    pub enum Result {
11467        /// Output only. Import job result.
11468        ImportResult(std::boxed::Box<crate::model::metadata_job::ImportJobResult>),
11469        /// Output only. Export job result.
11470        ExportResult(std::boxed::Box<crate::model::metadata_job::ExportJobResult>),
11471    }
11472}
11473
11474/// EntryLink represents a link between two Entries.
11475#[derive(Clone, Default, PartialEq)]
11476#[non_exhaustive]
11477pub struct EntryLink {
11478    /// Output only. Immutable. Identifier. The relative resource name of the Entry
11479    /// Link, of the form:
11480    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`
11481    pub name: std::string::String,
11482
11483    /// Required. Immutable. Relative resource name of the Entry Link Type used to
11484    /// create this Entry Link. For example:
11485    ///
11486    /// - Entry link between synonym terms in a glossary:
11487    ///   `projects/dataplex-types/locations/global/entryLinkTypes/synonym`
11488    /// - Entry link between related terms in a glossary:
11489    ///   `projects/dataplex-types/locations/global/entryLinkTypes/related`
11490    /// - Entry link between glossary terms and data assets:
11491    ///   `projects/dataplex-types/locations/global/entryLinkTypes/definition`
11492    pub entry_link_type: std::string::String,
11493
11494    /// Output only. The time when the Entry Link was created.
11495    pub create_time: std::option::Option<wkt::Timestamp>,
11496
11497    /// Output only. The time when the Entry Link was last updated.
11498    pub update_time: std::option::Option<wkt::Timestamp>,
11499
11500    /// Required. Specifies the Entries referenced in the Entry Link. There should
11501    /// be exactly two entry references.
11502    pub entry_references: std::vec::Vec<crate::model::entry_link::EntryReference>,
11503
11504    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11505}
11506
11507impl EntryLink {
11508    pub fn new() -> Self {
11509        std::default::Default::default()
11510    }
11511
11512    /// Sets the value of [name][crate::model::EntryLink::name].
11513    ///
11514    /// # Example
11515    /// ```ignore,no_run
11516    /// # use google_cloud_dataplex_v1::model::EntryLink;
11517    /// let x = EntryLink::new().set_name("example");
11518    /// ```
11519    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11520        self.name = v.into();
11521        self
11522    }
11523
11524    /// Sets the value of [entry_link_type][crate::model::EntryLink::entry_link_type].
11525    ///
11526    /// # Example
11527    /// ```ignore,no_run
11528    /// # use google_cloud_dataplex_v1::model::EntryLink;
11529    /// let x = EntryLink::new().set_entry_link_type("example");
11530    /// ```
11531    pub fn set_entry_link_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11532        self.entry_link_type = v.into();
11533        self
11534    }
11535
11536    /// Sets the value of [create_time][crate::model::EntryLink::create_time].
11537    ///
11538    /// # Example
11539    /// ```ignore,no_run
11540    /// # use google_cloud_dataplex_v1::model::EntryLink;
11541    /// use wkt::Timestamp;
11542    /// let x = EntryLink::new().set_create_time(Timestamp::default()/* use setters */);
11543    /// ```
11544    pub fn set_create_time<T>(mut self, v: T) -> Self
11545    where
11546        T: std::convert::Into<wkt::Timestamp>,
11547    {
11548        self.create_time = std::option::Option::Some(v.into());
11549        self
11550    }
11551
11552    /// Sets or clears the value of [create_time][crate::model::EntryLink::create_time].
11553    ///
11554    /// # Example
11555    /// ```ignore,no_run
11556    /// # use google_cloud_dataplex_v1::model::EntryLink;
11557    /// use wkt::Timestamp;
11558    /// let x = EntryLink::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
11559    /// let x = EntryLink::new().set_or_clear_create_time(None::<Timestamp>);
11560    /// ```
11561    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
11562    where
11563        T: std::convert::Into<wkt::Timestamp>,
11564    {
11565        self.create_time = v.map(|x| x.into());
11566        self
11567    }
11568
11569    /// Sets the value of [update_time][crate::model::EntryLink::update_time].
11570    ///
11571    /// # Example
11572    /// ```ignore,no_run
11573    /// # use google_cloud_dataplex_v1::model::EntryLink;
11574    /// use wkt::Timestamp;
11575    /// let x = EntryLink::new().set_update_time(Timestamp::default()/* use setters */);
11576    /// ```
11577    pub fn set_update_time<T>(mut self, v: T) -> Self
11578    where
11579        T: std::convert::Into<wkt::Timestamp>,
11580    {
11581        self.update_time = std::option::Option::Some(v.into());
11582        self
11583    }
11584
11585    /// Sets or clears the value of [update_time][crate::model::EntryLink::update_time].
11586    ///
11587    /// # Example
11588    /// ```ignore,no_run
11589    /// # use google_cloud_dataplex_v1::model::EntryLink;
11590    /// use wkt::Timestamp;
11591    /// let x = EntryLink::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
11592    /// let x = EntryLink::new().set_or_clear_update_time(None::<Timestamp>);
11593    /// ```
11594    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11595    where
11596        T: std::convert::Into<wkt::Timestamp>,
11597    {
11598        self.update_time = v.map(|x| x.into());
11599        self
11600    }
11601
11602    /// Sets the value of [entry_references][crate::model::EntryLink::entry_references].
11603    ///
11604    /// # Example
11605    /// ```ignore,no_run
11606    /// # use google_cloud_dataplex_v1::model::EntryLink;
11607    /// use google_cloud_dataplex_v1::model::entry_link::EntryReference;
11608    /// let x = EntryLink::new()
11609    ///     .set_entry_references([
11610    ///         EntryReference::default()/* use setters */,
11611    ///         EntryReference::default()/* use (different) setters */,
11612    ///     ]);
11613    /// ```
11614    pub fn set_entry_references<T, V>(mut self, v: T) -> Self
11615    where
11616        T: std::iter::IntoIterator<Item = V>,
11617        V: std::convert::Into<crate::model::entry_link::EntryReference>,
11618    {
11619        use std::iter::Iterator;
11620        self.entry_references = v.into_iter().map(|i| i.into()).collect();
11621        self
11622    }
11623}
11624
11625impl wkt::message::Message for EntryLink {
11626    fn typename() -> &'static str {
11627        "type.googleapis.com/google.cloud.dataplex.v1.EntryLink"
11628    }
11629}
11630
11631/// Defines additional types related to [EntryLink].
11632pub mod entry_link {
11633    #[allow(unused_imports)]
11634    use super::*;
11635
11636    /// Reference to the Entry that is linked through the Entry Link.
11637    #[derive(Clone, Default, PartialEq)]
11638    #[non_exhaustive]
11639    pub struct EntryReference {
11640        /// Required. Immutable. The relative resource name of the referenced Entry,
11641        /// of the form:
11642        /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`
11643        pub name: std::string::String,
11644
11645        /// Immutable. The path in the Entry that is referenced in the Entry Link.
11646        /// Empty path denotes that the Entry itself is referenced in the Entry
11647        /// Link.
11648        pub path: std::string::String,
11649
11650        /// Required. Immutable. The reference type of the Entry.
11651        pub r#type: crate::model::entry_link::entry_reference::Type,
11652
11653        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11654    }
11655
11656    impl EntryReference {
11657        pub fn new() -> Self {
11658            std::default::Default::default()
11659        }
11660
11661        /// Sets the value of [name][crate::model::entry_link::EntryReference::name].
11662        ///
11663        /// # Example
11664        /// ```ignore,no_run
11665        /// # use google_cloud_dataplex_v1::model::entry_link::EntryReference;
11666        /// let x = EntryReference::new().set_name("example");
11667        /// ```
11668        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11669            self.name = v.into();
11670            self
11671        }
11672
11673        /// Sets the value of [path][crate::model::entry_link::EntryReference::path].
11674        ///
11675        /// # Example
11676        /// ```ignore,no_run
11677        /// # use google_cloud_dataplex_v1::model::entry_link::EntryReference;
11678        /// let x = EntryReference::new().set_path("example");
11679        /// ```
11680        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11681            self.path = v.into();
11682            self
11683        }
11684
11685        /// Sets the value of [r#type][crate::model::entry_link::EntryReference::type].
11686        ///
11687        /// # Example
11688        /// ```ignore,no_run
11689        /// # use google_cloud_dataplex_v1::model::entry_link::EntryReference;
11690        /// use google_cloud_dataplex_v1::model::entry_link::entry_reference::Type;
11691        /// let x0 = EntryReference::new().set_type(Type::Source);
11692        /// let x1 = EntryReference::new().set_type(Type::Target);
11693        /// ```
11694        pub fn set_type<T: std::convert::Into<crate::model::entry_link::entry_reference::Type>>(
11695            mut self,
11696            v: T,
11697        ) -> Self {
11698            self.r#type = v.into();
11699            self
11700        }
11701    }
11702
11703    impl wkt::message::Message for EntryReference {
11704        fn typename() -> &'static str {
11705            "type.googleapis.com/google.cloud.dataplex.v1.EntryLink.EntryReference"
11706        }
11707    }
11708
11709    /// Defines additional types related to [EntryReference].
11710    pub mod entry_reference {
11711        #[allow(unused_imports)]
11712        use super::*;
11713
11714        /// Reference type of the Entry.
11715        ///
11716        /// # Working with unknown values
11717        ///
11718        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11719        /// additional enum variants at any time. Adding new variants is not considered
11720        /// a breaking change. Applications should write their code in anticipation of:
11721        ///
11722        /// - New values appearing in future releases of the client library, **and**
11723        /// - New values received dynamically, without application changes.
11724        ///
11725        /// Please consult the [Working with enums] section in the user guide for some
11726        /// guidelines.
11727        ///
11728        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11729        #[derive(Clone, Debug, PartialEq)]
11730        #[non_exhaustive]
11731        pub enum Type {
11732            /// Unspecified reference type. Implies that the Entry is referenced
11733            /// in a non-directional Entry Link.
11734            Unspecified,
11735            /// The Entry is referenced as the source of the directional Entry Link.
11736            Source,
11737            /// The Entry is referenced as the target of the directional Entry Link.
11738            Target,
11739            /// If set, the enum was initialized with an unknown value.
11740            ///
11741            /// Applications can examine the value using [Type::value] or
11742            /// [Type::name].
11743            UnknownValue(r#type::UnknownValue),
11744        }
11745
11746        #[doc(hidden)]
11747        pub mod r#type {
11748            #[allow(unused_imports)]
11749            use super::*;
11750            #[derive(Clone, Debug, PartialEq)]
11751            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11752        }
11753
11754        impl Type {
11755            /// Gets the enum value.
11756            ///
11757            /// Returns `None` if the enum contains an unknown value deserialized from
11758            /// the string representation of enums.
11759            pub fn value(&self) -> std::option::Option<i32> {
11760                match self {
11761                    Self::Unspecified => std::option::Option::Some(0),
11762                    Self::Source => std::option::Option::Some(2),
11763                    Self::Target => std::option::Option::Some(3),
11764                    Self::UnknownValue(u) => u.0.value(),
11765                }
11766            }
11767
11768            /// Gets the enum value as a string.
11769            ///
11770            /// Returns `None` if the enum contains an unknown value deserialized from
11771            /// the integer representation of enums.
11772            pub fn name(&self) -> std::option::Option<&str> {
11773                match self {
11774                    Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
11775                    Self::Source => std::option::Option::Some("SOURCE"),
11776                    Self::Target => std::option::Option::Some("TARGET"),
11777                    Self::UnknownValue(u) => u.0.name(),
11778                }
11779            }
11780        }
11781
11782        impl std::default::Default for Type {
11783            fn default() -> Self {
11784                use std::convert::From;
11785                Self::from(0)
11786            }
11787        }
11788
11789        impl std::fmt::Display for Type {
11790            fn fmt(
11791                &self,
11792                f: &mut std::fmt::Formatter<'_>,
11793            ) -> std::result::Result<(), std::fmt::Error> {
11794                wkt::internal::display_enum(f, self.name(), self.value())
11795            }
11796        }
11797
11798        impl std::convert::From<i32> for Type {
11799            fn from(value: i32) -> Self {
11800                match value {
11801                    0 => Self::Unspecified,
11802                    2 => Self::Source,
11803                    3 => Self::Target,
11804                    _ => Self::UnknownValue(r#type::UnknownValue(
11805                        wkt::internal::UnknownEnumValue::Integer(value),
11806                    )),
11807                }
11808            }
11809        }
11810
11811        impl std::convert::From<&str> for Type {
11812            fn from(value: &str) -> Self {
11813                use std::string::ToString;
11814                match value {
11815                    "UNSPECIFIED" => Self::Unspecified,
11816                    "SOURCE" => Self::Source,
11817                    "TARGET" => Self::Target,
11818                    _ => Self::UnknownValue(r#type::UnknownValue(
11819                        wkt::internal::UnknownEnumValue::String(value.to_string()),
11820                    )),
11821                }
11822            }
11823        }
11824
11825        impl serde::ser::Serialize for Type {
11826            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11827            where
11828                S: serde::Serializer,
11829            {
11830                match self {
11831                    Self::Unspecified => serializer.serialize_i32(0),
11832                    Self::Source => serializer.serialize_i32(2),
11833                    Self::Target => serializer.serialize_i32(3),
11834                    Self::UnknownValue(u) => u.0.serialize(serializer),
11835                }
11836            }
11837        }
11838
11839        impl<'de> serde::de::Deserialize<'de> for Type {
11840            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11841            where
11842                D: serde::Deserializer<'de>,
11843            {
11844                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
11845                    ".google.cloud.dataplex.v1.EntryLink.EntryReference.Type",
11846                ))
11847            }
11848        }
11849    }
11850}
11851
11852/// Request message for CreateEntryLink.
11853#[derive(Clone, Default, PartialEq)]
11854#[non_exhaustive]
11855pub struct CreateEntryLinkRequest {
11856    /// Required. The resource name of the parent Entry Group:
11857    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
11858    pub parent: std::string::String,
11859
11860    /// Required. Entry Link identifier
11861    ///
11862    /// * Must contain only lowercase letters, numbers and hyphens.
11863    /// * Must start with a letter.
11864    /// * Must be between 1-63 characters.
11865    /// * Must end with a number or a letter.
11866    /// * Must be unique within the EntryGroup.
11867    pub entry_link_id: std::string::String,
11868
11869    /// Required. Entry Link resource.
11870    pub entry_link: std::option::Option<crate::model::EntryLink>,
11871
11872    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11873}
11874
11875impl CreateEntryLinkRequest {
11876    pub fn new() -> Self {
11877        std::default::Default::default()
11878    }
11879
11880    /// Sets the value of [parent][crate::model::CreateEntryLinkRequest::parent].
11881    ///
11882    /// # Example
11883    /// ```ignore,no_run
11884    /// # use google_cloud_dataplex_v1::model::CreateEntryLinkRequest;
11885    /// let x = CreateEntryLinkRequest::new().set_parent("example");
11886    /// ```
11887    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11888        self.parent = v.into();
11889        self
11890    }
11891
11892    /// Sets the value of [entry_link_id][crate::model::CreateEntryLinkRequest::entry_link_id].
11893    ///
11894    /// # Example
11895    /// ```ignore,no_run
11896    /// # use google_cloud_dataplex_v1::model::CreateEntryLinkRequest;
11897    /// let x = CreateEntryLinkRequest::new().set_entry_link_id("example");
11898    /// ```
11899    pub fn set_entry_link_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11900        self.entry_link_id = v.into();
11901        self
11902    }
11903
11904    /// Sets the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
11905    ///
11906    /// # Example
11907    /// ```ignore,no_run
11908    /// # use google_cloud_dataplex_v1::model::CreateEntryLinkRequest;
11909    /// use google_cloud_dataplex_v1::model::EntryLink;
11910    /// let x = CreateEntryLinkRequest::new().set_entry_link(EntryLink::default()/* use setters */);
11911    /// ```
11912    pub fn set_entry_link<T>(mut self, v: T) -> Self
11913    where
11914        T: std::convert::Into<crate::model::EntryLink>,
11915    {
11916        self.entry_link = std::option::Option::Some(v.into());
11917        self
11918    }
11919
11920    /// Sets or clears the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
11921    ///
11922    /// # Example
11923    /// ```ignore,no_run
11924    /// # use google_cloud_dataplex_v1::model::CreateEntryLinkRequest;
11925    /// use google_cloud_dataplex_v1::model::EntryLink;
11926    /// let x = CreateEntryLinkRequest::new().set_or_clear_entry_link(Some(EntryLink::default()/* use setters */));
11927    /// let x = CreateEntryLinkRequest::new().set_or_clear_entry_link(None::<EntryLink>);
11928    /// ```
11929    pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
11930    where
11931        T: std::convert::Into<crate::model::EntryLink>,
11932    {
11933        self.entry_link = v.map(|x| x.into());
11934        self
11935    }
11936}
11937
11938impl wkt::message::Message for CreateEntryLinkRequest {
11939    fn typename() -> &'static str {
11940        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryLinkRequest"
11941    }
11942}
11943
11944/// Request message for DeleteEntryLink.
11945#[derive(Clone, Default, PartialEq)]
11946#[non_exhaustive]
11947pub struct DeleteEntryLinkRequest {
11948    /// Required. The resource name of the Entry Link:
11949    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`.
11950    pub name: std::string::String,
11951
11952    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11953}
11954
11955impl DeleteEntryLinkRequest {
11956    pub fn new() -> Self {
11957        std::default::Default::default()
11958    }
11959
11960    /// Sets the value of [name][crate::model::DeleteEntryLinkRequest::name].
11961    ///
11962    /// # Example
11963    /// ```ignore,no_run
11964    /// # use google_cloud_dataplex_v1::model::DeleteEntryLinkRequest;
11965    /// let x = DeleteEntryLinkRequest::new().set_name("example");
11966    /// ```
11967    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11968        self.name = v.into();
11969        self
11970    }
11971}
11972
11973impl wkt::message::Message for DeleteEntryLinkRequest {
11974    fn typename() -> &'static str {
11975        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryLinkRequest"
11976    }
11977}
11978
11979/// Request message for GetEntryLink.
11980#[derive(Clone, Default, PartialEq)]
11981#[non_exhaustive]
11982pub struct GetEntryLinkRequest {
11983    /// Required. The resource name of the Entry Link:
11984    /// `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`.
11985    pub name: std::string::String,
11986
11987    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11988}
11989
11990impl GetEntryLinkRequest {
11991    pub fn new() -> Self {
11992        std::default::Default::default()
11993    }
11994
11995    /// Sets the value of [name][crate::model::GetEntryLinkRequest::name].
11996    ///
11997    /// # Example
11998    /// ```ignore,no_run
11999    /// # use google_cloud_dataplex_v1::model::GetEntryLinkRequest;
12000    /// let x = GetEntryLinkRequest::new().set_name("example");
12001    /// ```
12002    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12003        self.name = v.into();
12004        self
12005    }
12006}
12007
12008impl wkt::message::Message for GetEntryLinkRequest {
12009    fn typename() -> &'static str {
12010        "type.googleapis.com/google.cloud.dataplex.v1.GetEntryLinkRequest"
12011    }
12012}
12013
12014/// A Resource designed to manage encryption configurations for customers to
12015/// support Customer Managed Encryption Keys (CMEK).
12016#[derive(Clone, Default, PartialEq)]
12017#[non_exhaustive]
12018pub struct EncryptionConfig {
12019    /// Identifier. The resource name of the EncryptionConfig.
12020    /// Format:
12021    /// organizations/{organization}/locations/{location}/encryptionConfigs/{encryption_config}
12022    /// Global location is not supported.
12023    pub name: std::string::String,
12024
12025    /// Optional. If a key is chosen, it means that the customer is using CMEK.
12026    /// If a key is not chosen, it means that the customer is using Google managed
12027    /// encryption.
12028    pub key: std::string::String,
12029
12030    /// Output only. The time when the Encryption configuration was created.
12031    pub create_time: std::option::Option<wkt::Timestamp>,
12032
12033    /// Output only. The time when the Encryption configuration was last updated.
12034    pub update_time: std::option::Option<wkt::Timestamp>,
12035
12036    /// Output only. The state of encryption of the databases.
12037    pub encryption_state: crate::model::encryption_config::EncryptionState,
12038
12039    /// Etag of the EncryptionConfig. This is a strong etag.
12040    pub etag: std::string::String,
12041
12042    /// Output only. Details of the failure if anything related to Cmek db fails.
12043    pub failure_details: std::option::Option<crate::model::encryption_config::FailureDetails>,
12044
12045    /// Optional. Represent the state of CMEK opt-in for metastore.
12046    pub enable_metastore_encryption: bool,
12047
12048    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12049}
12050
12051impl EncryptionConfig {
12052    pub fn new() -> Self {
12053        std::default::Default::default()
12054    }
12055
12056    /// Sets the value of [name][crate::model::EncryptionConfig::name].
12057    ///
12058    /// # Example
12059    /// ```ignore,no_run
12060    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12061    /// let x = EncryptionConfig::new().set_name("example");
12062    /// ```
12063    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12064        self.name = v.into();
12065        self
12066    }
12067
12068    /// Sets the value of [key][crate::model::EncryptionConfig::key].
12069    ///
12070    /// # Example
12071    /// ```ignore,no_run
12072    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12073    /// let x = EncryptionConfig::new().set_key("example");
12074    /// ```
12075    pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12076        self.key = v.into();
12077        self
12078    }
12079
12080    /// Sets the value of [create_time][crate::model::EncryptionConfig::create_time].
12081    ///
12082    /// # Example
12083    /// ```ignore,no_run
12084    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12085    /// use wkt::Timestamp;
12086    /// let x = EncryptionConfig::new().set_create_time(Timestamp::default()/* use setters */);
12087    /// ```
12088    pub fn set_create_time<T>(mut self, v: T) -> Self
12089    where
12090        T: std::convert::Into<wkt::Timestamp>,
12091    {
12092        self.create_time = std::option::Option::Some(v.into());
12093        self
12094    }
12095
12096    /// Sets or clears the value of [create_time][crate::model::EncryptionConfig::create_time].
12097    ///
12098    /// # Example
12099    /// ```ignore,no_run
12100    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12101    /// use wkt::Timestamp;
12102    /// let x = EncryptionConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
12103    /// let x = EncryptionConfig::new().set_or_clear_create_time(None::<Timestamp>);
12104    /// ```
12105    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
12106    where
12107        T: std::convert::Into<wkt::Timestamp>,
12108    {
12109        self.create_time = v.map(|x| x.into());
12110        self
12111    }
12112
12113    /// Sets the value of [update_time][crate::model::EncryptionConfig::update_time].
12114    ///
12115    /// # Example
12116    /// ```ignore,no_run
12117    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12118    /// use wkt::Timestamp;
12119    /// let x = EncryptionConfig::new().set_update_time(Timestamp::default()/* use setters */);
12120    /// ```
12121    pub fn set_update_time<T>(mut self, v: T) -> Self
12122    where
12123        T: std::convert::Into<wkt::Timestamp>,
12124    {
12125        self.update_time = std::option::Option::Some(v.into());
12126        self
12127    }
12128
12129    /// Sets or clears the value of [update_time][crate::model::EncryptionConfig::update_time].
12130    ///
12131    /// # Example
12132    /// ```ignore,no_run
12133    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12134    /// use wkt::Timestamp;
12135    /// let x = EncryptionConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
12136    /// let x = EncryptionConfig::new().set_or_clear_update_time(None::<Timestamp>);
12137    /// ```
12138    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
12139    where
12140        T: std::convert::Into<wkt::Timestamp>,
12141    {
12142        self.update_time = v.map(|x| x.into());
12143        self
12144    }
12145
12146    /// Sets the value of [encryption_state][crate::model::EncryptionConfig::encryption_state].
12147    ///
12148    /// # Example
12149    /// ```ignore,no_run
12150    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12151    /// use google_cloud_dataplex_v1::model::encryption_config::EncryptionState;
12152    /// let x0 = EncryptionConfig::new().set_encryption_state(EncryptionState::Encrypting);
12153    /// let x1 = EncryptionConfig::new().set_encryption_state(EncryptionState::Completed);
12154    /// let x2 = EncryptionConfig::new().set_encryption_state(EncryptionState::Failed);
12155    /// ```
12156    pub fn set_encryption_state<
12157        T: std::convert::Into<crate::model::encryption_config::EncryptionState>,
12158    >(
12159        mut self,
12160        v: T,
12161    ) -> Self {
12162        self.encryption_state = v.into();
12163        self
12164    }
12165
12166    /// Sets the value of [etag][crate::model::EncryptionConfig::etag].
12167    ///
12168    /// # Example
12169    /// ```ignore,no_run
12170    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12171    /// let x = EncryptionConfig::new().set_etag("example");
12172    /// ```
12173    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12174        self.etag = v.into();
12175        self
12176    }
12177
12178    /// Sets the value of [failure_details][crate::model::EncryptionConfig::failure_details].
12179    ///
12180    /// # Example
12181    /// ```ignore,no_run
12182    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12183    /// use google_cloud_dataplex_v1::model::encryption_config::FailureDetails;
12184    /// let x = EncryptionConfig::new().set_failure_details(FailureDetails::default()/* use setters */);
12185    /// ```
12186    pub fn set_failure_details<T>(mut self, v: T) -> Self
12187    where
12188        T: std::convert::Into<crate::model::encryption_config::FailureDetails>,
12189    {
12190        self.failure_details = std::option::Option::Some(v.into());
12191        self
12192    }
12193
12194    /// Sets or clears the value of [failure_details][crate::model::EncryptionConfig::failure_details].
12195    ///
12196    /// # Example
12197    /// ```ignore,no_run
12198    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12199    /// use google_cloud_dataplex_v1::model::encryption_config::FailureDetails;
12200    /// let x = EncryptionConfig::new().set_or_clear_failure_details(Some(FailureDetails::default()/* use setters */));
12201    /// let x = EncryptionConfig::new().set_or_clear_failure_details(None::<FailureDetails>);
12202    /// ```
12203    pub fn set_or_clear_failure_details<T>(mut self, v: std::option::Option<T>) -> Self
12204    where
12205        T: std::convert::Into<crate::model::encryption_config::FailureDetails>,
12206    {
12207        self.failure_details = v.map(|x| x.into());
12208        self
12209    }
12210
12211    /// Sets the value of [enable_metastore_encryption][crate::model::EncryptionConfig::enable_metastore_encryption].
12212    ///
12213    /// # Example
12214    /// ```ignore,no_run
12215    /// # use google_cloud_dataplex_v1::model::EncryptionConfig;
12216    /// let x = EncryptionConfig::new().set_enable_metastore_encryption(true);
12217    /// ```
12218    pub fn set_enable_metastore_encryption<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12219        self.enable_metastore_encryption = v.into();
12220        self
12221    }
12222}
12223
12224impl wkt::message::Message for EncryptionConfig {
12225    fn typename() -> &'static str {
12226        "type.googleapis.com/google.cloud.dataplex.v1.EncryptionConfig"
12227    }
12228}
12229
12230/// Defines additional types related to [EncryptionConfig].
12231pub mod encryption_config {
12232    #[allow(unused_imports)]
12233    use super::*;
12234
12235    /// Details of the failure if anything related to Cmek db fails.
12236    #[derive(Clone, Default, PartialEq)]
12237    #[non_exhaustive]
12238    pub struct FailureDetails {
12239        /// Output only. The error code for the failure.
12240        pub error_code: crate::model::encryption_config::failure_details::ErrorCode,
12241
12242        /// Output only. The error message will be shown to the user. Set only if the
12243        /// error code is REQUIRE_USER_ACTION.
12244        pub error_message: std::string::String,
12245
12246        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12247    }
12248
12249    impl FailureDetails {
12250        pub fn new() -> Self {
12251            std::default::Default::default()
12252        }
12253
12254        /// Sets the value of [error_code][crate::model::encryption_config::FailureDetails::error_code].
12255        ///
12256        /// # Example
12257        /// ```ignore,no_run
12258        /// # use google_cloud_dataplex_v1::model::encryption_config::FailureDetails;
12259        /// use google_cloud_dataplex_v1::model::encryption_config::failure_details::ErrorCode;
12260        /// let x0 = FailureDetails::new().set_error_code(ErrorCode::InternalError);
12261        /// let x1 = FailureDetails::new().set_error_code(ErrorCode::RequireUserAction);
12262        /// ```
12263        pub fn set_error_code<
12264            T: std::convert::Into<crate::model::encryption_config::failure_details::ErrorCode>,
12265        >(
12266            mut self,
12267            v: T,
12268        ) -> Self {
12269            self.error_code = v.into();
12270            self
12271        }
12272
12273        /// Sets the value of [error_message][crate::model::encryption_config::FailureDetails::error_message].
12274        ///
12275        /// # Example
12276        /// ```ignore,no_run
12277        /// # use google_cloud_dataplex_v1::model::encryption_config::FailureDetails;
12278        /// let x = FailureDetails::new().set_error_message("example");
12279        /// ```
12280        pub fn set_error_message<T: std::convert::Into<std::string::String>>(
12281            mut self,
12282            v: T,
12283        ) -> Self {
12284            self.error_message = v.into();
12285            self
12286        }
12287    }
12288
12289    impl wkt::message::Message for FailureDetails {
12290        fn typename() -> &'static str {
12291            "type.googleapis.com/google.cloud.dataplex.v1.EncryptionConfig.FailureDetails"
12292        }
12293    }
12294
12295    /// Defines additional types related to [FailureDetails].
12296    pub mod failure_details {
12297        #[allow(unused_imports)]
12298        use super::*;
12299
12300        /// Error code for the failure if anything related to Cmek db fails.
12301        ///
12302        /// # Working with unknown values
12303        ///
12304        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12305        /// additional enum variants at any time. Adding new variants is not considered
12306        /// a breaking change. Applications should write their code in anticipation of:
12307        ///
12308        /// - New values appearing in future releases of the client library, **and**
12309        /// - New values received dynamically, without application changes.
12310        ///
12311        /// Please consult the [Working with enums] section in the user guide for some
12312        /// guidelines.
12313        ///
12314        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12315        #[derive(Clone, Debug, PartialEq)]
12316        #[non_exhaustive]
12317        pub enum ErrorCode {
12318            /// The error code is not specified
12319            Unknown,
12320            /// Error because of internal server error, will be retried automatically.
12321            InternalError,
12322            /// User action is required to resolve the error.
12323            RequireUserAction,
12324            /// If set, the enum was initialized with an unknown value.
12325            ///
12326            /// Applications can examine the value using [ErrorCode::value] or
12327            /// [ErrorCode::name].
12328            UnknownValue(error_code::UnknownValue),
12329        }
12330
12331        #[doc(hidden)]
12332        pub mod error_code {
12333            #[allow(unused_imports)]
12334            use super::*;
12335            #[derive(Clone, Debug, PartialEq)]
12336            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12337        }
12338
12339        impl ErrorCode {
12340            /// Gets the enum value.
12341            ///
12342            /// Returns `None` if the enum contains an unknown value deserialized from
12343            /// the string representation of enums.
12344            pub fn value(&self) -> std::option::Option<i32> {
12345                match self {
12346                    Self::Unknown => std::option::Option::Some(0),
12347                    Self::InternalError => std::option::Option::Some(1),
12348                    Self::RequireUserAction => std::option::Option::Some(2),
12349                    Self::UnknownValue(u) => u.0.value(),
12350                }
12351            }
12352
12353            /// Gets the enum value as a string.
12354            ///
12355            /// Returns `None` if the enum contains an unknown value deserialized from
12356            /// the integer representation of enums.
12357            pub fn name(&self) -> std::option::Option<&str> {
12358                match self {
12359                    Self::Unknown => std::option::Option::Some("UNKNOWN"),
12360                    Self::InternalError => std::option::Option::Some("INTERNAL_ERROR"),
12361                    Self::RequireUserAction => std::option::Option::Some("REQUIRE_USER_ACTION"),
12362                    Self::UnknownValue(u) => u.0.name(),
12363                }
12364            }
12365        }
12366
12367        impl std::default::Default for ErrorCode {
12368            fn default() -> Self {
12369                use std::convert::From;
12370                Self::from(0)
12371            }
12372        }
12373
12374        impl std::fmt::Display for ErrorCode {
12375            fn fmt(
12376                &self,
12377                f: &mut std::fmt::Formatter<'_>,
12378            ) -> std::result::Result<(), std::fmt::Error> {
12379                wkt::internal::display_enum(f, self.name(), self.value())
12380            }
12381        }
12382
12383        impl std::convert::From<i32> for ErrorCode {
12384            fn from(value: i32) -> Self {
12385                match value {
12386                    0 => Self::Unknown,
12387                    1 => Self::InternalError,
12388                    2 => Self::RequireUserAction,
12389                    _ => Self::UnknownValue(error_code::UnknownValue(
12390                        wkt::internal::UnknownEnumValue::Integer(value),
12391                    )),
12392                }
12393            }
12394        }
12395
12396        impl std::convert::From<&str> for ErrorCode {
12397            fn from(value: &str) -> Self {
12398                use std::string::ToString;
12399                match value {
12400                    "UNKNOWN" => Self::Unknown,
12401                    "INTERNAL_ERROR" => Self::InternalError,
12402                    "REQUIRE_USER_ACTION" => Self::RequireUserAction,
12403                    _ => Self::UnknownValue(error_code::UnknownValue(
12404                        wkt::internal::UnknownEnumValue::String(value.to_string()),
12405                    )),
12406                }
12407            }
12408        }
12409
12410        impl serde::ser::Serialize for ErrorCode {
12411            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12412            where
12413                S: serde::Serializer,
12414            {
12415                match self {
12416                    Self::Unknown => serializer.serialize_i32(0),
12417                    Self::InternalError => serializer.serialize_i32(1),
12418                    Self::RequireUserAction => serializer.serialize_i32(2),
12419                    Self::UnknownValue(u) => u.0.serialize(serializer),
12420                }
12421            }
12422        }
12423
12424        impl<'de> serde::de::Deserialize<'de> for ErrorCode {
12425            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12426            where
12427                D: serde::Deserializer<'de>,
12428            {
12429                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ErrorCode>::new(
12430                    ".google.cloud.dataplex.v1.EncryptionConfig.FailureDetails.ErrorCode",
12431                ))
12432            }
12433        }
12434    }
12435
12436    /// State of encryption of the databases when EncryptionConfig is created or
12437    /// updated.
12438    ///
12439    /// # Working with unknown values
12440    ///
12441    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12442    /// additional enum variants at any time. Adding new variants is not considered
12443    /// a breaking change. Applications should write their code in anticipation of:
12444    ///
12445    /// - New values appearing in future releases of the client library, **and**
12446    /// - New values received dynamically, without application changes.
12447    ///
12448    /// Please consult the [Working with enums] section in the user guide for some
12449    /// guidelines.
12450    ///
12451    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12452    #[derive(Clone, Debug, PartialEq)]
12453    #[non_exhaustive]
12454    pub enum EncryptionState {
12455        /// State is not specified.
12456        Unspecified,
12457        /// The encryption state of the database when the EncryptionConfig is created
12458        /// or updated. If the encryption fails, it is retried indefinitely and the
12459        /// state is shown as ENCRYPTING.
12460        Encrypting,
12461        /// The encryption of data has completed successfully.
12462        Completed,
12463        /// The encryption of data has failed.
12464        /// The state is set to FAILED when the encryption fails due to reasons like
12465        /// permission issues, invalid key etc.
12466        Failed,
12467        /// If set, the enum was initialized with an unknown value.
12468        ///
12469        /// Applications can examine the value using [EncryptionState::value] or
12470        /// [EncryptionState::name].
12471        UnknownValue(encryption_state::UnknownValue),
12472    }
12473
12474    #[doc(hidden)]
12475    pub mod encryption_state {
12476        #[allow(unused_imports)]
12477        use super::*;
12478        #[derive(Clone, Debug, PartialEq)]
12479        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12480    }
12481
12482    impl EncryptionState {
12483        /// Gets the enum value.
12484        ///
12485        /// Returns `None` if the enum contains an unknown value deserialized from
12486        /// the string representation of enums.
12487        pub fn value(&self) -> std::option::Option<i32> {
12488            match self {
12489                Self::Unspecified => std::option::Option::Some(0),
12490                Self::Encrypting => std::option::Option::Some(1),
12491                Self::Completed => std::option::Option::Some(2),
12492                Self::Failed => std::option::Option::Some(3),
12493                Self::UnknownValue(u) => u.0.value(),
12494            }
12495        }
12496
12497        /// Gets the enum value as a string.
12498        ///
12499        /// Returns `None` if the enum contains an unknown value deserialized from
12500        /// the integer representation of enums.
12501        pub fn name(&self) -> std::option::Option<&str> {
12502            match self {
12503                Self::Unspecified => std::option::Option::Some("ENCRYPTION_STATE_UNSPECIFIED"),
12504                Self::Encrypting => std::option::Option::Some("ENCRYPTING"),
12505                Self::Completed => std::option::Option::Some("COMPLETED"),
12506                Self::Failed => std::option::Option::Some("FAILED"),
12507                Self::UnknownValue(u) => u.0.name(),
12508            }
12509        }
12510    }
12511
12512    impl std::default::Default for EncryptionState {
12513        fn default() -> Self {
12514            use std::convert::From;
12515            Self::from(0)
12516        }
12517    }
12518
12519    impl std::fmt::Display for EncryptionState {
12520        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12521            wkt::internal::display_enum(f, self.name(), self.value())
12522        }
12523    }
12524
12525    impl std::convert::From<i32> for EncryptionState {
12526        fn from(value: i32) -> Self {
12527            match value {
12528                0 => Self::Unspecified,
12529                1 => Self::Encrypting,
12530                2 => Self::Completed,
12531                3 => Self::Failed,
12532                _ => Self::UnknownValue(encryption_state::UnknownValue(
12533                    wkt::internal::UnknownEnumValue::Integer(value),
12534                )),
12535            }
12536        }
12537    }
12538
12539    impl std::convert::From<&str> for EncryptionState {
12540        fn from(value: &str) -> Self {
12541            use std::string::ToString;
12542            match value {
12543                "ENCRYPTION_STATE_UNSPECIFIED" => Self::Unspecified,
12544                "ENCRYPTING" => Self::Encrypting,
12545                "COMPLETED" => Self::Completed,
12546                "FAILED" => Self::Failed,
12547                _ => Self::UnknownValue(encryption_state::UnknownValue(
12548                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12549                )),
12550            }
12551        }
12552    }
12553
12554    impl serde::ser::Serialize for EncryptionState {
12555        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12556        where
12557            S: serde::Serializer,
12558        {
12559            match self {
12560                Self::Unspecified => serializer.serialize_i32(0),
12561                Self::Encrypting => serializer.serialize_i32(1),
12562                Self::Completed => serializer.serialize_i32(2),
12563                Self::Failed => serializer.serialize_i32(3),
12564                Self::UnknownValue(u) => u.0.serialize(serializer),
12565            }
12566        }
12567    }
12568
12569    impl<'de> serde::de::Deserialize<'de> for EncryptionState {
12570        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12571        where
12572            D: serde::Deserializer<'de>,
12573        {
12574            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EncryptionState>::new(
12575                ".google.cloud.dataplex.v1.EncryptionConfig.EncryptionState",
12576            ))
12577        }
12578    }
12579}
12580
12581/// Create EncryptionConfig Request
12582#[derive(Clone, Default, PartialEq)]
12583#[non_exhaustive]
12584pub struct CreateEncryptionConfigRequest {
12585    /// Required. The location at which the EncryptionConfig is to be created.
12586    pub parent: std::string::String,
12587
12588    /// Required. The ID of the
12589    /// [EncryptionConfig][google.cloud.dataplex.v1.EncryptionConfig] to create.
12590    /// Currently, only a value of "default" is supported.
12591    ///
12592    /// [google.cloud.dataplex.v1.EncryptionConfig]: crate::model::EncryptionConfig
12593    pub encryption_config_id: std::string::String,
12594
12595    /// Required. The EncryptionConfig to create.
12596    pub encryption_config: std::option::Option<crate::model::EncryptionConfig>,
12597
12598    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12599}
12600
12601impl CreateEncryptionConfigRequest {
12602    pub fn new() -> Self {
12603        std::default::Default::default()
12604    }
12605
12606    /// Sets the value of [parent][crate::model::CreateEncryptionConfigRequest::parent].
12607    ///
12608    /// # Example
12609    /// ```ignore,no_run
12610    /// # use google_cloud_dataplex_v1::model::CreateEncryptionConfigRequest;
12611    /// let x = CreateEncryptionConfigRequest::new().set_parent("example");
12612    /// ```
12613    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12614        self.parent = v.into();
12615        self
12616    }
12617
12618    /// Sets the value of [encryption_config_id][crate::model::CreateEncryptionConfigRequest::encryption_config_id].
12619    ///
12620    /// # Example
12621    /// ```ignore,no_run
12622    /// # use google_cloud_dataplex_v1::model::CreateEncryptionConfigRequest;
12623    /// let x = CreateEncryptionConfigRequest::new().set_encryption_config_id("example");
12624    /// ```
12625    pub fn set_encryption_config_id<T: std::convert::Into<std::string::String>>(
12626        mut self,
12627        v: T,
12628    ) -> Self {
12629        self.encryption_config_id = v.into();
12630        self
12631    }
12632
12633    /// Sets the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
12634    ///
12635    /// # Example
12636    /// ```ignore,no_run
12637    /// # use google_cloud_dataplex_v1::model::CreateEncryptionConfigRequest;
12638    /// use google_cloud_dataplex_v1::model::EncryptionConfig;
12639    /// let x = CreateEncryptionConfigRequest::new().set_encryption_config(EncryptionConfig::default()/* use setters */);
12640    /// ```
12641    pub fn set_encryption_config<T>(mut self, v: T) -> Self
12642    where
12643        T: std::convert::Into<crate::model::EncryptionConfig>,
12644    {
12645        self.encryption_config = std::option::Option::Some(v.into());
12646        self
12647    }
12648
12649    /// Sets or clears the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
12650    ///
12651    /// # Example
12652    /// ```ignore,no_run
12653    /// # use google_cloud_dataplex_v1::model::CreateEncryptionConfigRequest;
12654    /// use google_cloud_dataplex_v1::model::EncryptionConfig;
12655    /// let x = CreateEncryptionConfigRequest::new().set_or_clear_encryption_config(Some(EncryptionConfig::default()/* use setters */));
12656    /// let x = CreateEncryptionConfigRequest::new().set_or_clear_encryption_config(None::<EncryptionConfig>);
12657    /// ```
12658    pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
12659    where
12660        T: std::convert::Into<crate::model::EncryptionConfig>,
12661    {
12662        self.encryption_config = v.map(|x| x.into());
12663        self
12664    }
12665}
12666
12667impl wkt::message::Message for CreateEncryptionConfigRequest {
12668    fn typename() -> &'static str {
12669        "type.googleapis.com/google.cloud.dataplex.v1.CreateEncryptionConfigRequest"
12670    }
12671}
12672
12673/// Get EncryptionConfig Request
12674#[derive(Clone, Default, PartialEq)]
12675#[non_exhaustive]
12676pub struct GetEncryptionConfigRequest {
12677    /// Required. The name of the EncryptionConfig to fetch.
12678    pub name: std::string::String,
12679
12680    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12681}
12682
12683impl GetEncryptionConfigRequest {
12684    pub fn new() -> Self {
12685        std::default::Default::default()
12686    }
12687
12688    /// Sets the value of [name][crate::model::GetEncryptionConfigRequest::name].
12689    ///
12690    /// # Example
12691    /// ```ignore,no_run
12692    /// # use google_cloud_dataplex_v1::model::GetEncryptionConfigRequest;
12693    /// let x = GetEncryptionConfigRequest::new().set_name("example");
12694    /// ```
12695    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12696        self.name = v.into();
12697        self
12698    }
12699}
12700
12701impl wkt::message::Message for GetEncryptionConfigRequest {
12702    fn typename() -> &'static str {
12703        "type.googleapis.com/google.cloud.dataplex.v1.GetEncryptionConfigRequest"
12704    }
12705}
12706
12707/// Update EncryptionConfig Request
12708#[derive(Clone, Default, PartialEq)]
12709#[non_exhaustive]
12710pub struct UpdateEncryptionConfigRequest {
12711    /// Required. The EncryptionConfig to update.
12712    pub encryption_config: std::option::Option<crate::model::EncryptionConfig>,
12713
12714    /// Optional. Mask of fields to update.
12715    /// The service treats an omitted field mask as an implied field mask
12716    /// equivalent to all fields that are populated (have a non-empty value).
12717    pub update_mask: std::option::Option<wkt::FieldMask>,
12718
12719    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12720}
12721
12722impl UpdateEncryptionConfigRequest {
12723    pub fn new() -> Self {
12724        std::default::Default::default()
12725    }
12726
12727    /// Sets the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
12728    ///
12729    /// # Example
12730    /// ```ignore,no_run
12731    /// # use google_cloud_dataplex_v1::model::UpdateEncryptionConfigRequest;
12732    /// use google_cloud_dataplex_v1::model::EncryptionConfig;
12733    /// let x = UpdateEncryptionConfigRequest::new().set_encryption_config(EncryptionConfig::default()/* use setters */);
12734    /// ```
12735    pub fn set_encryption_config<T>(mut self, v: T) -> Self
12736    where
12737        T: std::convert::Into<crate::model::EncryptionConfig>,
12738    {
12739        self.encryption_config = std::option::Option::Some(v.into());
12740        self
12741    }
12742
12743    /// Sets or clears the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
12744    ///
12745    /// # Example
12746    /// ```ignore,no_run
12747    /// # use google_cloud_dataplex_v1::model::UpdateEncryptionConfigRequest;
12748    /// use google_cloud_dataplex_v1::model::EncryptionConfig;
12749    /// let x = UpdateEncryptionConfigRequest::new().set_or_clear_encryption_config(Some(EncryptionConfig::default()/* use setters */));
12750    /// let x = UpdateEncryptionConfigRequest::new().set_or_clear_encryption_config(None::<EncryptionConfig>);
12751    /// ```
12752    pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
12753    where
12754        T: std::convert::Into<crate::model::EncryptionConfig>,
12755    {
12756        self.encryption_config = v.map(|x| x.into());
12757        self
12758    }
12759
12760    /// Sets the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
12761    ///
12762    /// # Example
12763    /// ```ignore,no_run
12764    /// # use google_cloud_dataplex_v1::model::UpdateEncryptionConfigRequest;
12765    /// use wkt::FieldMask;
12766    /// let x = UpdateEncryptionConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
12767    /// ```
12768    pub fn set_update_mask<T>(mut self, v: T) -> Self
12769    where
12770        T: std::convert::Into<wkt::FieldMask>,
12771    {
12772        self.update_mask = std::option::Option::Some(v.into());
12773        self
12774    }
12775
12776    /// Sets or clears the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
12777    ///
12778    /// # Example
12779    /// ```ignore,no_run
12780    /// # use google_cloud_dataplex_v1::model::UpdateEncryptionConfigRequest;
12781    /// use wkt::FieldMask;
12782    /// let x = UpdateEncryptionConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
12783    /// let x = UpdateEncryptionConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
12784    /// ```
12785    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12786    where
12787        T: std::convert::Into<wkt::FieldMask>,
12788    {
12789        self.update_mask = v.map(|x| x.into());
12790        self
12791    }
12792}
12793
12794impl wkt::message::Message for UpdateEncryptionConfigRequest {
12795    fn typename() -> &'static str {
12796        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEncryptionConfigRequest"
12797    }
12798}
12799
12800/// Delete EncryptionConfig Request
12801#[derive(Clone, Default, PartialEq)]
12802#[non_exhaustive]
12803pub struct DeleteEncryptionConfigRequest {
12804    /// Required. The name of the EncryptionConfig to delete.
12805    pub name: std::string::String,
12806
12807    /// Optional. Etag of the EncryptionConfig. This is a strong etag.
12808    pub etag: std::string::String,
12809
12810    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12811}
12812
12813impl DeleteEncryptionConfigRequest {
12814    pub fn new() -> Self {
12815        std::default::Default::default()
12816    }
12817
12818    /// Sets the value of [name][crate::model::DeleteEncryptionConfigRequest::name].
12819    ///
12820    /// # Example
12821    /// ```ignore,no_run
12822    /// # use google_cloud_dataplex_v1::model::DeleteEncryptionConfigRequest;
12823    /// let x = DeleteEncryptionConfigRequest::new().set_name("example");
12824    /// ```
12825    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12826        self.name = v.into();
12827        self
12828    }
12829
12830    /// Sets the value of [etag][crate::model::DeleteEncryptionConfigRequest::etag].
12831    ///
12832    /// # Example
12833    /// ```ignore,no_run
12834    /// # use google_cloud_dataplex_v1::model::DeleteEncryptionConfigRequest;
12835    /// let x = DeleteEncryptionConfigRequest::new().set_etag("example");
12836    /// ```
12837    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12838        self.etag = v.into();
12839        self
12840    }
12841}
12842
12843impl wkt::message::Message for DeleteEncryptionConfigRequest {
12844    fn typename() -> &'static str {
12845        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEncryptionConfigRequest"
12846    }
12847}
12848
12849/// List EncryptionConfigs Request
12850#[derive(Clone, Default, PartialEq)]
12851#[non_exhaustive]
12852pub struct ListEncryptionConfigsRequest {
12853    /// Required. The location for which the EncryptionConfig is to be listed.
12854    pub parent: std::string::String,
12855
12856    /// Optional. Maximum number of EncryptionConfigs to return. The service may
12857    /// return fewer than this value. If unspecified, at most 10 EncryptionConfigs
12858    /// will be returned. The maximum value is 1000; values above 1000 will be
12859    /// coerced to 1000.
12860    pub page_size: i32,
12861
12862    /// Optional. Page token received from a previous `ListEncryptionConfigs` call.
12863    /// Provide this to retrieve the subsequent page. When paginating, the
12864    /// parameters - filter and order_by provided to `ListEncryptionConfigs` must
12865    /// match the call that provided the page token.
12866    pub page_token: std::string::String,
12867
12868    /// Optional. Filter the EncryptionConfigs to be returned.
12869    /// Using bare literals: (These values will be matched anywhere it may appear
12870    /// in the object's field values)
12871    ///
12872    /// * filter=some_value
12873    ///   Using fields: (These values will be matched only in the specified field)
12874    /// * filter=some_field=some_value
12875    ///   Supported fields:
12876    /// * name, key, create_time, update_time, encryption_state
12877    ///   Example:
12878    /// * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config
12879    ///   conjunctions: (AND, OR, NOT)
12880    /// * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config
12881    ///   AND mode=CMEK
12882    ///   logical operators: (>, <, >=, <=, !=, =, :),
12883    /// * filter=create_time>2024-05-01T00:00:00.000Z
12884    pub filter: std::string::String,
12885
12886    /// Optional. Order by fields for the result.
12887    pub order_by: std::string::String,
12888
12889    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12890}
12891
12892impl ListEncryptionConfigsRequest {
12893    pub fn new() -> Self {
12894        std::default::Default::default()
12895    }
12896
12897    /// Sets the value of [parent][crate::model::ListEncryptionConfigsRequest::parent].
12898    ///
12899    /// # Example
12900    /// ```ignore,no_run
12901    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsRequest;
12902    /// let x = ListEncryptionConfigsRequest::new().set_parent("example");
12903    /// ```
12904    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12905        self.parent = v.into();
12906        self
12907    }
12908
12909    /// Sets the value of [page_size][crate::model::ListEncryptionConfigsRequest::page_size].
12910    ///
12911    /// # Example
12912    /// ```ignore,no_run
12913    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsRequest;
12914    /// let x = ListEncryptionConfigsRequest::new().set_page_size(42);
12915    /// ```
12916    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12917        self.page_size = v.into();
12918        self
12919    }
12920
12921    /// Sets the value of [page_token][crate::model::ListEncryptionConfigsRequest::page_token].
12922    ///
12923    /// # Example
12924    /// ```ignore,no_run
12925    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsRequest;
12926    /// let x = ListEncryptionConfigsRequest::new().set_page_token("example");
12927    /// ```
12928    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12929        self.page_token = v.into();
12930        self
12931    }
12932
12933    /// Sets the value of [filter][crate::model::ListEncryptionConfigsRequest::filter].
12934    ///
12935    /// # Example
12936    /// ```ignore,no_run
12937    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsRequest;
12938    /// let x = ListEncryptionConfigsRequest::new().set_filter("example");
12939    /// ```
12940    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12941        self.filter = v.into();
12942        self
12943    }
12944
12945    /// Sets the value of [order_by][crate::model::ListEncryptionConfigsRequest::order_by].
12946    ///
12947    /// # Example
12948    /// ```ignore,no_run
12949    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsRequest;
12950    /// let x = ListEncryptionConfigsRequest::new().set_order_by("example");
12951    /// ```
12952    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12953        self.order_by = v.into();
12954        self
12955    }
12956}
12957
12958impl wkt::message::Message for ListEncryptionConfigsRequest {
12959    fn typename() -> &'static str {
12960        "type.googleapis.com/google.cloud.dataplex.v1.ListEncryptionConfigsRequest"
12961    }
12962}
12963
12964/// List EncryptionConfigs Response
12965#[derive(Clone, Default, PartialEq)]
12966#[non_exhaustive]
12967pub struct ListEncryptionConfigsResponse {
12968    /// The list of EncryptionConfigs under the given parent location.
12969    pub encryption_configs: std::vec::Vec<crate::model::EncryptionConfig>,
12970
12971    /// Token to retrieve the next page of results, or empty if there are no more
12972    /// results in the list.
12973    pub next_page_token: std::string::String,
12974
12975    /// Locations that could not be reached.
12976    pub unreachable_locations: std::vec::Vec<std::string::String>,
12977
12978    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12979}
12980
12981impl ListEncryptionConfigsResponse {
12982    pub fn new() -> Self {
12983        std::default::Default::default()
12984    }
12985
12986    /// Sets the value of [encryption_configs][crate::model::ListEncryptionConfigsResponse::encryption_configs].
12987    ///
12988    /// # Example
12989    /// ```ignore,no_run
12990    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsResponse;
12991    /// use google_cloud_dataplex_v1::model::EncryptionConfig;
12992    /// let x = ListEncryptionConfigsResponse::new()
12993    ///     .set_encryption_configs([
12994    ///         EncryptionConfig::default()/* use setters */,
12995    ///         EncryptionConfig::default()/* use (different) setters */,
12996    ///     ]);
12997    /// ```
12998    pub fn set_encryption_configs<T, V>(mut self, v: T) -> Self
12999    where
13000        T: std::iter::IntoIterator<Item = V>,
13001        V: std::convert::Into<crate::model::EncryptionConfig>,
13002    {
13003        use std::iter::Iterator;
13004        self.encryption_configs = v.into_iter().map(|i| i.into()).collect();
13005        self
13006    }
13007
13008    /// Sets the value of [next_page_token][crate::model::ListEncryptionConfigsResponse::next_page_token].
13009    ///
13010    /// # Example
13011    /// ```ignore,no_run
13012    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsResponse;
13013    /// let x = ListEncryptionConfigsResponse::new().set_next_page_token("example");
13014    /// ```
13015    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13016        self.next_page_token = v.into();
13017        self
13018    }
13019
13020    /// Sets the value of [unreachable_locations][crate::model::ListEncryptionConfigsResponse::unreachable_locations].
13021    ///
13022    /// # Example
13023    /// ```ignore,no_run
13024    /// # use google_cloud_dataplex_v1::model::ListEncryptionConfigsResponse;
13025    /// let x = ListEncryptionConfigsResponse::new().set_unreachable_locations(["a", "b", "c"]);
13026    /// ```
13027    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
13028    where
13029        T: std::iter::IntoIterator<Item = V>,
13030        V: std::convert::Into<std::string::String>,
13031    {
13032        use std::iter::Iterator;
13033        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
13034        self
13035    }
13036}
13037
13038impl wkt::message::Message for ListEncryptionConfigsResponse {
13039    fn typename() -> &'static str {
13040        "type.googleapis.com/google.cloud.dataplex.v1.ListEncryptionConfigsResponse"
13041    }
13042}
13043
13044#[doc(hidden)]
13045impl google_cloud_gax::paginator::internal::PageableResponse for ListEncryptionConfigsResponse {
13046    type PageItem = crate::model::EncryptionConfig;
13047
13048    fn items(self) -> std::vec::Vec<Self::PageItem> {
13049        self.encryption_configs
13050    }
13051
13052    fn next_page_token(&self) -> std::string::String {
13053        use std::clone::Clone;
13054        self.next_page_token.clone()
13055    }
13056}
13057
13058/// Create content request.
13059#[derive(Clone, Default, PartialEq)]
13060#[non_exhaustive]
13061pub struct CreateContentRequest {
13062    /// Required. The resource name of the parent lake:
13063    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}
13064    pub parent: std::string::String,
13065
13066    /// Required. Content resource.
13067    pub content: std::option::Option<crate::model::Content>,
13068
13069    /// Optional. Only validate the request, but do not perform mutations.
13070    /// The default is false.
13071    pub validate_only: bool,
13072
13073    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13074}
13075
13076impl CreateContentRequest {
13077    pub fn new() -> Self {
13078        std::default::Default::default()
13079    }
13080
13081    /// Sets the value of [parent][crate::model::CreateContentRequest::parent].
13082    ///
13083    /// # Example
13084    /// ```ignore,no_run
13085    /// # use google_cloud_dataplex_v1::model::CreateContentRequest;
13086    /// let x = CreateContentRequest::new().set_parent("example");
13087    /// ```
13088    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13089        self.parent = v.into();
13090        self
13091    }
13092
13093    /// Sets the value of [content][crate::model::CreateContentRequest::content].
13094    ///
13095    /// # Example
13096    /// ```ignore,no_run
13097    /// # use google_cloud_dataplex_v1::model::CreateContentRequest;
13098    /// use google_cloud_dataplex_v1::model::Content;
13099    /// let x = CreateContentRequest::new().set_content(Content::default()/* use setters */);
13100    /// ```
13101    pub fn set_content<T>(mut self, v: T) -> Self
13102    where
13103        T: std::convert::Into<crate::model::Content>,
13104    {
13105        self.content = std::option::Option::Some(v.into());
13106        self
13107    }
13108
13109    /// Sets or clears the value of [content][crate::model::CreateContentRequest::content].
13110    ///
13111    /// # Example
13112    /// ```ignore,no_run
13113    /// # use google_cloud_dataplex_v1::model::CreateContentRequest;
13114    /// use google_cloud_dataplex_v1::model::Content;
13115    /// let x = CreateContentRequest::new().set_or_clear_content(Some(Content::default()/* use setters */));
13116    /// let x = CreateContentRequest::new().set_or_clear_content(None::<Content>);
13117    /// ```
13118    pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
13119    where
13120        T: std::convert::Into<crate::model::Content>,
13121    {
13122        self.content = v.map(|x| x.into());
13123        self
13124    }
13125
13126    /// Sets the value of [validate_only][crate::model::CreateContentRequest::validate_only].
13127    ///
13128    /// # Example
13129    /// ```ignore,no_run
13130    /// # use google_cloud_dataplex_v1::model::CreateContentRequest;
13131    /// let x = CreateContentRequest::new().set_validate_only(true);
13132    /// ```
13133    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13134        self.validate_only = v.into();
13135        self
13136    }
13137}
13138
13139impl wkt::message::Message for CreateContentRequest {
13140    fn typename() -> &'static str {
13141        "type.googleapis.com/google.cloud.dataplex.v1.CreateContentRequest"
13142    }
13143}
13144
13145/// Update content request.
13146#[derive(Clone, Default, PartialEq)]
13147#[non_exhaustive]
13148pub struct UpdateContentRequest {
13149    /// Required. Mask of fields to update.
13150    pub update_mask: std::option::Option<wkt::FieldMask>,
13151
13152    /// Required. Update description.
13153    /// Only fields specified in `update_mask` are updated.
13154    pub content: std::option::Option<crate::model::Content>,
13155
13156    /// Optional. Only validate the request, but do not perform mutations.
13157    /// The default is false.
13158    pub validate_only: bool,
13159
13160    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13161}
13162
13163impl UpdateContentRequest {
13164    pub fn new() -> Self {
13165        std::default::Default::default()
13166    }
13167
13168    /// Sets the value of [update_mask][crate::model::UpdateContentRequest::update_mask].
13169    ///
13170    /// # Example
13171    /// ```ignore,no_run
13172    /// # use google_cloud_dataplex_v1::model::UpdateContentRequest;
13173    /// use wkt::FieldMask;
13174    /// let x = UpdateContentRequest::new().set_update_mask(FieldMask::default()/* use setters */);
13175    /// ```
13176    pub fn set_update_mask<T>(mut self, v: T) -> Self
13177    where
13178        T: std::convert::Into<wkt::FieldMask>,
13179    {
13180        self.update_mask = std::option::Option::Some(v.into());
13181        self
13182    }
13183
13184    /// Sets or clears the value of [update_mask][crate::model::UpdateContentRequest::update_mask].
13185    ///
13186    /// # Example
13187    /// ```ignore,no_run
13188    /// # use google_cloud_dataplex_v1::model::UpdateContentRequest;
13189    /// use wkt::FieldMask;
13190    /// let x = UpdateContentRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
13191    /// let x = UpdateContentRequest::new().set_or_clear_update_mask(None::<FieldMask>);
13192    /// ```
13193    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13194    where
13195        T: std::convert::Into<wkt::FieldMask>,
13196    {
13197        self.update_mask = v.map(|x| x.into());
13198        self
13199    }
13200
13201    /// Sets the value of [content][crate::model::UpdateContentRequest::content].
13202    ///
13203    /// # Example
13204    /// ```ignore,no_run
13205    /// # use google_cloud_dataplex_v1::model::UpdateContentRequest;
13206    /// use google_cloud_dataplex_v1::model::Content;
13207    /// let x = UpdateContentRequest::new().set_content(Content::default()/* use setters */);
13208    /// ```
13209    pub fn set_content<T>(mut self, v: T) -> Self
13210    where
13211        T: std::convert::Into<crate::model::Content>,
13212    {
13213        self.content = std::option::Option::Some(v.into());
13214        self
13215    }
13216
13217    /// Sets or clears the value of [content][crate::model::UpdateContentRequest::content].
13218    ///
13219    /// # Example
13220    /// ```ignore,no_run
13221    /// # use google_cloud_dataplex_v1::model::UpdateContentRequest;
13222    /// use google_cloud_dataplex_v1::model::Content;
13223    /// let x = UpdateContentRequest::new().set_or_clear_content(Some(Content::default()/* use setters */));
13224    /// let x = UpdateContentRequest::new().set_or_clear_content(None::<Content>);
13225    /// ```
13226    pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
13227    where
13228        T: std::convert::Into<crate::model::Content>,
13229    {
13230        self.content = v.map(|x| x.into());
13231        self
13232    }
13233
13234    /// Sets the value of [validate_only][crate::model::UpdateContentRequest::validate_only].
13235    ///
13236    /// # Example
13237    /// ```ignore,no_run
13238    /// # use google_cloud_dataplex_v1::model::UpdateContentRequest;
13239    /// let x = UpdateContentRequest::new().set_validate_only(true);
13240    /// ```
13241    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13242        self.validate_only = v.into();
13243        self
13244    }
13245}
13246
13247impl wkt::message::Message for UpdateContentRequest {
13248    fn typename() -> &'static str {
13249        "type.googleapis.com/google.cloud.dataplex.v1.UpdateContentRequest"
13250    }
13251}
13252
13253/// Delete content request.
13254#[derive(Clone, Default, PartialEq)]
13255#[non_exhaustive]
13256pub struct DeleteContentRequest {
13257    /// Required. The resource name of the content:
13258    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}
13259    pub name: std::string::String,
13260
13261    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13262}
13263
13264impl DeleteContentRequest {
13265    pub fn new() -> Self {
13266        std::default::Default::default()
13267    }
13268
13269    /// Sets the value of [name][crate::model::DeleteContentRequest::name].
13270    ///
13271    /// # Example
13272    /// ```ignore,no_run
13273    /// # use google_cloud_dataplex_v1::model::DeleteContentRequest;
13274    /// let x = DeleteContentRequest::new().set_name("example");
13275    /// ```
13276    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13277        self.name = v.into();
13278        self
13279    }
13280}
13281
13282impl wkt::message::Message for DeleteContentRequest {
13283    fn typename() -> &'static str {
13284        "type.googleapis.com/google.cloud.dataplex.v1.DeleteContentRequest"
13285    }
13286}
13287
13288/// List content request. Returns the BASIC Content view.
13289#[derive(Clone, Default, PartialEq)]
13290#[non_exhaustive]
13291pub struct ListContentRequest {
13292    /// Required. The resource name of the parent lake:
13293    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}
13294    pub parent: std::string::String,
13295
13296    /// Optional. Maximum number of content to return. The service may return fewer
13297    /// than this value. If unspecified, at most 10 content will be returned. The
13298    /// maximum value is 1000; values above 1000 will be coerced to 1000.
13299    pub page_size: i32,
13300
13301    /// Optional. Page token received from a previous `ListContent` call. Provide
13302    /// this to retrieve the subsequent page. When paginating, all other parameters
13303    /// provided to `ListContent` must match the call that provided the page
13304    /// token.
13305    pub page_token: std::string::String,
13306
13307    /// Optional. Filter request. Filters are case-sensitive.
13308    /// The following formats are supported:
13309    ///
13310    /// labels.key1 = "value1"
13311    /// labels:key1
13312    /// type = "NOTEBOOK"
13313    /// type = "SQL_SCRIPT"
13314    ///
13315    /// These restrictions can be coinjoined with AND, OR and NOT conjunctions.
13316    pub filter: std::string::String,
13317
13318    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13319}
13320
13321impl ListContentRequest {
13322    pub fn new() -> Self {
13323        std::default::Default::default()
13324    }
13325
13326    /// Sets the value of [parent][crate::model::ListContentRequest::parent].
13327    ///
13328    /// # Example
13329    /// ```ignore,no_run
13330    /// # use google_cloud_dataplex_v1::model::ListContentRequest;
13331    /// let x = ListContentRequest::new().set_parent("example");
13332    /// ```
13333    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13334        self.parent = v.into();
13335        self
13336    }
13337
13338    /// Sets the value of [page_size][crate::model::ListContentRequest::page_size].
13339    ///
13340    /// # Example
13341    /// ```ignore,no_run
13342    /// # use google_cloud_dataplex_v1::model::ListContentRequest;
13343    /// let x = ListContentRequest::new().set_page_size(42);
13344    /// ```
13345    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13346        self.page_size = v.into();
13347        self
13348    }
13349
13350    /// Sets the value of [page_token][crate::model::ListContentRequest::page_token].
13351    ///
13352    /// # Example
13353    /// ```ignore,no_run
13354    /// # use google_cloud_dataplex_v1::model::ListContentRequest;
13355    /// let x = ListContentRequest::new().set_page_token("example");
13356    /// ```
13357    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13358        self.page_token = v.into();
13359        self
13360    }
13361
13362    /// Sets the value of [filter][crate::model::ListContentRequest::filter].
13363    ///
13364    /// # Example
13365    /// ```ignore,no_run
13366    /// # use google_cloud_dataplex_v1::model::ListContentRequest;
13367    /// let x = ListContentRequest::new().set_filter("example");
13368    /// ```
13369    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13370        self.filter = v.into();
13371        self
13372    }
13373}
13374
13375impl wkt::message::Message for ListContentRequest {
13376    fn typename() -> &'static str {
13377        "type.googleapis.com/google.cloud.dataplex.v1.ListContentRequest"
13378    }
13379}
13380
13381/// List content response.
13382#[derive(Clone, Default, PartialEq)]
13383#[non_exhaustive]
13384pub struct ListContentResponse {
13385    /// Content under the given parent lake.
13386    pub content: std::vec::Vec<crate::model::Content>,
13387
13388    /// Token to retrieve the next page of results, or empty if there are no more
13389    /// results in the list.
13390    pub next_page_token: std::string::String,
13391
13392    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13393}
13394
13395impl ListContentResponse {
13396    pub fn new() -> Self {
13397        std::default::Default::default()
13398    }
13399
13400    /// Sets the value of [content][crate::model::ListContentResponse::content].
13401    ///
13402    /// # Example
13403    /// ```ignore,no_run
13404    /// # use google_cloud_dataplex_v1::model::ListContentResponse;
13405    /// use google_cloud_dataplex_v1::model::Content;
13406    /// let x = ListContentResponse::new()
13407    ///     .set_content([
13408    ///         Content::default()/* use setters */,
13409    ///         Content::default()/* use (different) setters */,
13410    ///     ]);
13411    /// ```
13412    pub fn set_content<T, V>(mut self, v: T) -> Self
13413    where
13414        T: std::iter::IntoIterator<Item = V>,
13415        V: std::convert::Into<crate::model::Content>,
13416    {
13417        use std::iter::Iterator;
13418        self.content = v.into_iter().map(|i| i.into()).collect();
13419        self
13420    }
13421
13422    /// Sets the value of [next_page_token][crate::model::ListContentResponse::next_page_token].
13423    ///
13424    /// # Example
13425    /// ```ignore,no_run
13426    /// # use google_cloud_dataplex_v1::model::ListContentResponse;
13427    /// let x = ListContentResponse::new().set_next_page_token("example");
13428    /// ```
13429    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13430        self.next_page_token = v.into();
13431        self
13432    }
13433}
13434
13435impl wkt::message::Message for ListContentResponse {
13436    fn typename() -> &'static str {
13437        "type.googleapis.com/google.cloud.dataplex.v1.ListContentResponse"
13438    }
13439}
13440
13441#[doc(hidden)]
13442impl google_cloud_gax::paginator::internal::PageableResponse for ListContentResponse {
13443    type PageItem = crate::model::Content;
13444
13445    fn items(self) -> std::vec::Vec<Self::PageItem> {
13446        self.content
13447    }
13448
13449    fn next_page_token(&self) -> std::string::String {
13450        use std::clone::Clone;
13451        self.next_page_token.clone()
13452    }
13453}
13454
13455/// Get content request.
13456#[derive(Clone, Default, PartialEq)]
13457#[non_exhaustive]
13458pub struct GetContentRequest {
13459    /// Required. The resource name of the content:
13460    /// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}
13461    pub name: std::string::String,
13462
13463    /// Optional. Specify content view to make a partial request.
13464    pub view: crate::model::get_content_request::ContentView,
13465
13466    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13467}
13468
13469impl GetContentRequest {
13470    pub fn new() -> Self {
13471        std::default::Default::default()
13472    }
13473
13474    /// Sets the value of [name][crate::model::GetContentRequest::name].
13475    ///
13476    /// # Example
13477    /// ```ignore,no_run
13478    /// # use google_cloud_dataplex_v1::model::GetContentRequest;
13479    /// let x = GetContentRequest::new().set_name("example");
13480    /// ```
13481    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13482        self.name = v.into();
13483        self
13484    }
13485
13486    /// Sets the value of [view][crate::model::GetContentRequest::view].
13487    ///
13488    /// # Example
13489    /// ```ignore,no_run
13490    /// # use google_cloud_dataplex_v1::model::GetContentRequest;
13491    /// use google_cloud_dataplex_v1::model::get_content_request::ContentView;
13492    /// let x0 = GetContentRequest::new().set_view(ContentView::Basic);
13493    /// let x1 = GetContentRequest::new().set_view(ContentView::Full);
13494    /// ```
13495    pub fn set_view<T: std::convert::Into<crate::model::get_content_request::ContentView>>(
13496        mut self,
13497        v: T,
13498    ) -> Self {
13499        self.view = v.into();
13500        self
13501    }
13502}
13503
13504impl wkt::message::Message for GetContentRequest {
13505    fn typename() -> &'static str {
13506        "type.googleapis.com/google.cloud.dataplex.v1.GetContentRequest"
13507    }
13508}
13509
13510/// Defines additional types related to [GetContentRequest].
13511pub mod get_content_request {
13512    #[allow(unused_imports)]
13513    use super::*;
13514
13515    /// Specifies whether the request should return the full or the partial
13516    /// representation.
13517    ///
13518    /// # Working with unknown values
13519    ///
13520    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13521    /// additional enum variants at any time. Adding new variants is not considered
13522    /// a breaking change. Applications should write their code in anticipation of:
13523    ///
13524    /// - New values appearing in future releases of the client library, **and**
13525    /// - New values received dynamically, without application changes.
13526    ///
13527    /// Please consult the [Working with enums] section in the user guide for some
13528    /// guidelines.
13529    ///
13530    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13531    #[derive(Clone, Debug, PartialEq)]
13532    #[non_exhaustive]
13533    pub enum ContentView {
13534        /// Content view not specified. Defaults to BASIC.
13535        /// The API will default to the BASIC view.
13536        Unspecified,
13537        /// Will not return the `data_text` field.
13538        Basic,
13539        /// Returns the complete proto.
13540        Full,
13541        /// If set, the enum was initialized with an unknown value.
13542        ///
13543        /// Applications can examine the value using [ContentView::value] or
13544        /// [ContentView::name].
13545        UnknownValue(content_view::UnknownValue),
13546    }
13547
13548    #[doc(hidden)]
13549    pub mod content_view {
13550        #[allow(unused_imports)]
13551        use super::*;
13552        #[derive(Clone, Debug, PartialEq)]
13553        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13554    }
13555
13556    impl ContentView {
13557        /// Gets the enum value.
13558        ///
13559        /// Returns `None` if the enum contains an unknown value deserialized from
13560        /// the string representation of enums.
13561        pub fn value(&self) -> std::option::Option<i32> {
13562            match self {
13563                Self::Unspecified => std::option::Option::Some(0),
13564                Self::Basic => std::option::Option::Some(1),
13565                Self::Full => std::option::Option::Some(2),
13566                Self::UnknownValue(u) => u.0.value(),
13567            }
13568        }
13569
13570        /// Gets the enum value as a string.
13571        ///
13572        /// Returns `None` if the enum contains an unknown value deserialized from
13573        /// the integer representation of enums.
13574        pub fn name(&self) -> std::option::Option<&str> {
13575            match self {
13576                Self::Unspecified => std::option::Option::Some("CONTENT_VIEW_UNSPECIFIED"),
13577                Self::Basic => std::option::Option::Some("BASIC"),
13578                Self::Full => std::option::Option::Some("FULL"),
13579                Self::UnknownValue(u) => u.0.name(),
13580            }
13581        }
13582    }
13583
13584    impl std::default::Default for ContentView {
13585        fn default() -> Self {
13586            use std::convert::From;
13587            Self::from(0)
13588        }
13589    }
13590
13591    impl std::fmt::Display for ContentView {
13592        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13593            wkt::internal::display_enum(f, self.name(), self.value())
13594        }
13595    }
13596
13597    impl std::convert::From<i32> for ContentView {
13598        fn from(value: i32) -> Self {
13599            match value {
13600                0 => Self::Unspecified,
13601                1 => Self::Basic,
13602                2 => Self::Full,
13603                _ => Self::UnknownValue(content_view::UnknownValue(
13604                    wkt::internal::UnknownEnumValue::Integer(value),
13605                )),
13606            }
13607        }
13608    }
13609
13610    impl std::convert::From<&str> for ContentView {
13611        fn from(value: &str) -> Self {
13612            use std::string::ToString;
13613            match value {
13614                "CONTENT_VIEW_UNSPECIFIED" => Self::Unspecified,
13615                "BASIC" => Self::Basic,
13616                "FULL" => Self::Full,
13617                _ => Self::UnknownValue(content_view::UnknownValue(
13618                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13619                )),
13620            }
13621        }
13622    }
13623
13624    impl serde::ser::Serialize for ContentView {
13625        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13626        where
13627            S: serde::Serializer,
13628        {
13629            match self {
13630                Self::Unspecified => serializer.serialize_i32(0),
13631                Self::Basic => serializer.serialize_i32(1),
13632                Self::Full => serializer.serialize_i32(2),
13633                Self::UnknownValue(u) => u.0.serialize(serializer),
13634            }
13635        }
13636    }
13637
13638    impl<'de> serde::de::Deserialize<'de> for ContentView {
13639        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13640        where
13641            D: serde::Deserializer<'de>,
13642        {
13643            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ContentView>::new(
13644                ".google.cloud.dataplex.v1.GetContentRequest.ContentView",
13645            ))
13646        }
13647    }
13648}
13649
13650/// Spec for a data discovery scan.
13651#[derive(Clone, Default, PartialEq)]
13652#[non_exhaustive]
13653pub struct DataDiscoverySpec {
13654    /// Optional. Configuration for metadata publishing.
13655    pub bigquery_publishing_config:
13656        std::option::Option<crate::model::data_discovery_spec::BigQueryPublishingConfig>,
13657
13658    /// The configurations of the data discovery scan resource.
13659    pub resource_config: std::option::Option<crate::model::data_discovery_spec::ResourceConfig>,
13660
13661    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13662}
13663
13664impl DataDiscoverySpec {
13665    pub fn new() -> Self {
13666        std::default::Default::default()
13667    }
13668
13669    /// Sets the value of [bigquery_publishing_config][crate::model::DataDiscoverySpec::bigquery_publishing_config].
13670    ///
13671    /// # Example
13672    /// ```ignore,no_run
13673    /// # use google_cloud_dataplex_v1::model::DataDiscoverySpec;
13674    /// use google_cloud_dataplex_v1::model::data_discovery_spec::BigQueryPublishingConfig;
13675    /// let x = DataDiscoverySpec::new().set_bigquery_publishing_config(BigQueryPublishingConfig::default()/* use setters */);
13676    /// ```
13677    pub fn set_bigquery_publishing_config<T>(mut self, v: T) -> Self
13678    where
13679        T: std::convert::Into<crate::model::data_discovery_spec::BigQueryPublishingConfig>,
13680    {
13681        self.bigquery_publishing_config = std::option::Option::Some(v.into());
13682        self
13683    }
13684
13685    /// Sets or clears the value of [bigquery_publishing_config][crate::model::DataDiscoverySpec::bigquery_publishing_config].
13686    ///
13687    /// # Example
13688    /// ```ignore,no_run
13689    /// # use google_cloud_dataplex_v1::model::DataDiscoverySpec;
13690    /// use google_cloud_dataplex_v1::model::data_discovery_spec::BigQueryPublishingConfig;
13691    /// let x = DataDiscoverySpec::new().set_or_clear_bigquery_publishing_config(Some(BigQueryPublishingConfig::default()/* use setters */));
13692    /// let x = DataDiscoverySpec::new().set_or_clear_bigquery_publishing_config(None::<BigQueryPublishingConfig>);
13693    /// ```
13694    pub fn set_or_clear_bigquery_publishing_config<T>(mut self, v: std::option::Option<T>) -> Self
13695    where
13696        T: std::convert::Into<crate::model::data_discovery_spec::BigQueryPublishingConfig>,
13697    {
13698        self.bigquery_publishing_config = v.map(|x| x.into());
13699        self
13700    }
13701
13702    /// Sets the value of [resource_config][crate::model::DataDiscoverySpec::resource_config].
13703    ///
13704    /// Note that all the setters affecting `resource_config` are mutually
13705    /// exclusive.
13706    ///
13707    /// # Example
13708    /// ```ignore,no_run
13709    /// # use google_cloud_dataplex_v1::model::DataDiscoverySpec;
13710    /// use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
13711    /// let x = DataDiscoverySpec::new().set_resource_config(Some(
13712    ///     google_cloud_dataplex_v1::model::data_discovery_spec::ResourceConfig::StorageConfig(StorageConfig::default().into())));
13713    /// ```
13714    pub fn set_resource_config<
13715        T: std::convert::Into<std::option::Option<crate::model::data_discovery_spec::ResourceConfig>>,
13716    >(
13717        mut self,
13718        v: T,
13719    ) -> Self {
13720        self.resource_config = v.into();
13721        self
13722    }
13723
13724    /// The value of [resource_config][crate::model::DataDiscoverySpec::resource_config]
13725    /// if it holds a `StorageConfig`, `None` if the field is not set or
13726    /// holds a different branch.
13727    pub fn storage_config(
13728        &self,
13729    ) -> std::option::Option<&std::boxed::Box<crate::model::data_discovery_spec::StorageConfig>>
13730    {
13731        #[allow(unreachable_patterns)]
13732        self.resource_config.as_ref().and_then(|v| match v {
13733            crate::model::data_discovery_spec::ResourceConfig::StorageConfig(v) => {
13734                std::option::Option::Some(v)
13735            }
13736            _ => std::option::Option::None,
13737        })
13738    }
13739
13740    /// Sets the value of [resource_config][crate::model::DataDiscoverySpec::resource_config]
13741    /// to hold a `StorageConfig`.
13742    ///
13743    /// Note that all the setters affecting `resource_config` are
13744    /// mutually exclusive.
13745    ///
13746    /// # Example
13747    /// ```ignore,no_run
13748    /// # use google_cloud_dataplex_v1::model::DataDiscoverySpec;
13749    /// use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
13750    /// let x = DataDiscoverySpec::new().set_storage_config(StorageConfig::default()/* use setters */);
13751    /// assert!(x.storage_config().is_some());
13752    /// ```
13753    pub fn set_storage_config<
13754        T: std::convert::Into<std::boxed::Box<crate::model::data_discovery_spec::StorageConfig>>,
13755    >(
13756        mut self,
13757        v: T,
13758    ) -> Self {
13759        self.resource_config = std::option::Option::Some(
13760            crate::model::data_discovery_spec::ResourceConfig::StorageConfig(v.into()),
13761        );
13762        self
13763    }
13764}
13765
13766impl wkt::message::Message for DataDiscoverySpec {
13767    fn typename() -> &'static str {
13768        "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec"
13769    }
13770}
13771
13772/// Defines additional types related to [DataDiscoverySpec].
13773pub mod data_discovery_spec {
13774    #[allow(unused_imports)]
13775    use super::*;
13776
13777    /// Describes BigQuery publishing configurations.
13778    #[derive(Clone, Default, PartialEq)]
13779    #[non_exhaustive]
13780    pub struct BigQueryPublishingConfig {
13781        /// Optional. Determines whether to  publish discovered tables as BigLake
13782        /// external tables or non-BigLake external tables.
13783        pub table_type: crate::model::data_discovery_spec::big_query_publishing_config::TableType,
13784
13785        /// Optional. The BigQuery connection used to create BigLake tables.
13786        /// Must be in the form
13787        /// `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
13788        pub connection: std::string::String,
13789
13790        /// Optional. The location of the BigQuery dataset to publish BigLake
13791        /// external or non-BigLake external tables to.
13792        ///
13793        /// 1. If the Cloud Storage bucket is located in a multi-region bucket, then
13794        ///    BigQuery dataset can be in the same multi-region bucket or any single
13795        ///    region that is included in the same multi-region bucket. The datascan can
13796        ///    be created in any single region that is included in the same multi-region
13797        ///    bucket
13798        /// 1. If the Cloud Storage bucket is located in a dual-region bucket, then
13799        ///    BigQuery dataset can be located in regions that are included in the
13800        ///    dual-region bucket, or in a multi-region that includes the dual-region.
13801        ///    The datascan can be created in any single region that is included in the
13802        ///    same dual-region bucket.
13803        /// 1. If the Cloud Storage bucket is located in a single region, then
13804        ///    BigQuery dataset can be in the same single region or any multi-region
13805        ///    bucket that includes the same single region. The datascan will be created
13806        ///    in the same single region as the bucket.
13807        /// 1. If the BigQuery dataset is in single region, it must be in the same
13808        ///    single region as the datascan.
13809        ///
13810        /// For supported values, refer to
13811        /// <https://cloud.google.com/bigquery/docs/locations#supported_locations>.
13812        pub location: std::string::String,
13813
13814        /// Optional. The project of the BigQuery dataset to publish BigLake external
13815        /// or non-BigLake external tables to. If not specified, the project of the
13816        /// Cloud Storage bucket will be used. The format is
13817        /// "projects/{project_id_or_number}".
13818        pub project: std::string::String,
13819
13820        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13821    }
13822
13823    impl BigQueryPublishingConfig {
13824        pub fn new() -> Self {
13825            std::default::Default::default()
13826        }
13827
13828        /// Sets the value of [table_type][crate::model::data_discovery_spec::BigQueryPublishingConfig::table_type].
13829        ///
13830        /// # Example
13831        /// ```ignore,no_run
13832        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::BigQueryPublishingConfig;
13833        /// use google_cloud_dataplex_v1::model::data_discovery_spec::big_query_publishing_config::TableType;
13834        /// let x0 = BigQueryPublishingConfig::new().set_table_type(TableType::External);
13835        /// let x1 = BigQueryPublishingConfig::new().set_table_type(TableType::Biglake);
13836        /// ```
13837        pub fn set_table_type<
13838            T: std::convert::Into<
13839                    crate::model::data_discovery_spec::big_query_publishing_config::TableType,
13840                >,
13841        >(
13842            mut self,
13843            v: T,
13844        ) -> Self {
13845            self.table_type = v.into();
13846            self
13847        }
13848
13849        /// Sets the value of [connection][crate::model::data_discovery_spec::BigQueryPublishingConfig::connection].
13850        ///
13851        /// # Example
13852        /// ```ignore,no_run
13853        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::BigQueryPublishingConfig;
13854        /// let x = BigQueryPublishingConfig::new().set_connection("example");
13855        /// ```
13856        pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13857            self.connection = v.into();
13858            self
13859        }
13860
13861        /// Sets the value of [location][crate::model::data_discovery_spec::BigQueryPublishingConfig::location].
13862        ///
13863        /// # Example
13864        /// ```ignore,no_run
13865        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::BigQueryPublishingConfig;
13866        /// let x = BigQueryPublishingConfig::new().set_location("example");
13867        /// ```
13868        pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13869            self.location = v.into();
13870            self
13871        }
13872
13873        /// Sets the value of [project][crate::model::data_discovery_spec::BigQueryPublishingConfig::project].
13874        ///
13875        /// # Example
13876        /// ```ignore,no_run
13877        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::BigQueryPublishingConfig;
13878        /// let x = BigQueryPublishingConfig::new().set_project("example");
13879        /// ```
13880        pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13881            self.project = v.into();
13882            self
13883        }
13884    }
13885
13886    impl wkt::message::Message for BigQueryPublishingConfig {
13887        fn typename() -> &'static str {
13888            "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig"
13889        }
13890    }
13891
13892    /// Defines additional types related to [BigQueryPublishingConfig].
13893    pub mod big_query_publishing_config {
13894        #[allow(unused_imports)]
13895        use super::*;
13896
13897        /// Determines how discovered tables are published.
13898        ///
13899        /// # Working with unknown values
13900        ///
13901        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13902        /// additional enum variants at any time. Adding new variants is not considered
13903        /// a breaking change. Applications should write their code in anticipation of:
13904        ///
13905        /// - New values appearing in future releases of the client library, **and**
13906        /// - New values received dynamically, without application changes.
13907        ///
13908        /// Please consult the [Working with enums] section in the user guide for some
13909        /// guidelines.
13910        ///
13911        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13912        #[derive(Clone, Debug, PartialEq)]
13913        #[non_exhaustive]
13914        pub enum TableType {
13915            /// Table type unspecified.
13916            Unspecified,
13917            /// Default. Discovered tables are published as BigQuery external tables
13918            /// whose data is accessed using the credentials of the user querying the
13919            /// table.
13920            External,
13921            /// Discovered tables are published as BigLake external tables whose data
13922            /// is accessed using the credentials of the associated BigQuery
13923            /// connection.
13924            Biglake,
13925            /// If set, the enum was initialized with an unknown value.
13926            ///
13927            /// Applications can examine the value using [TableType::value] or
13928            /// [TableType::name].
13929            UnknownValue(table_type::UnknownValue),
13930        }
13931
13932        #[doc(hidden)]
13933        pub mod table_type {
13934            #[allow(unused_imports)]
13935            use super::*;
13936            #[derive(Clone, Debug, PartialEq)]
13937            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13938        }
13939
13940        impl TableType {
13941            /// Gets the enum value.
13942            ///
13943            /// Returns `None` if the enum contains an unknown value deserialized from
13944            /// the string representation of enums.
13945            pub fn value(&self) -> std::option::Option<i32> {
13946                match self {
13947                    Self::Unspecified => std::option::Option::Some(0),
13948                    Self::External => std::option::Option::Some(1),
13949                    Self::Biglake => std::option::Option::Some(2),
13950                    Self::UnknownValue(u) => u.0.value(),
13951                }
13952            }
13953
13954            /// Gets the enum value as a string.
13955            ///
13956            /// Returns `None` if the enum contains an unknown value deserialized from
13957            /// the integer representation of enums.
13958            pub fn name(&self) -> std::option::Option<&str> {
13959                match self {
13960                    Self::Unspecified => std::option::Option::Some("TABLE_TYPE_UNSPECIFIED"),
13961                    Self::External => std::option::Option::Some("EXTERNAL"),
13962                    Self::Biglake => std::option::Option::Some("BIGLAKE"),
13963                    Self::UnknownValue(u) => u.0.name(),
13964                }
13965            }
13966        }
13967
13968        impl std::default::Default for TableType {
13969            fn default() -> Self {
13970                use std::convert::From;
13971                Self::from(0)
13972            }
13973        }
13974
13975        impl std::fmt::Display for TableType {
13976            fn fmt(
13977                &self,
13978                f: &mut std::fmt::Formatter<'_>,
13979            ) -> std::result::Result<(), std::fmt::Error> {
13980                wkt::internal::display_enum(f, self.name(), self.value())
13981            }
13982        }
13983
13984        impl std::convert::From<i32> for TableType {
13985            fn from(value: i32) -> Self {
13986                match value {
13987                    0 => Self::Unspecified,
13988                    1 => Self::External,
13989                    2 => Self::Biglake,
13990                    _ => Self::UnknownValue(table_type::UnknownValue(
13991                        wkt::internal::UnknownEnumValue::Integer(value),
13992                    )),
13993                }
13994            }
13995        }
13996
13997        impl std::convert::From<&str> for TableType {
13998            fn from(value: &str) -> Self {
13999                use std::string::ToString;
14000                match value {
14001                    "TABLE_TYPE_UNSPECIFIED" => Self::Unspecified,
14002                    "EXTERNAL" => Self::External,
14003                    "BIGLAKE" => Self::Biglake,
14004                    _ => Self::UnknownValue(table_type::UnknownValue(
14005                        wkt::internal::UnknownEnumValue::String(value.to_string()),
14006                    )),
14007                }
14008            }
14009        }
14010
14011        impl serde::ser::Serialize for TableType {
14012            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14013            where
14014                S: serde::Serializer,
14015            {
14016                match self {
14017                    Self::Unspecified => serializer.serialize_i32(0),
14018                    Self::External => serializer.serialize_i32(1),
14019                    Self::Biglake => serializer.serialize_i32(2),
14020                    Self::UnknownValue(u) => u.0.serialize(serializer),
14021                }
14022            }
14023        }
14024
14025        impl<'de> serde::de::Deserialize<'de> for TableType {
14026            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14027            where
14028                D: serde::Deserializer<'de>,
14029            {
14030                deserializer.deserialize_any(wkt::internal::EnumVisitor::<TableType>::new(
14031                    ".google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType"))
14032            }
14033        }
14034    }
14035
14036    /// Configurations related to Cloud Storage as the data source.
14037    #[derive(Clone, Default, PartialEq)]
14038    #[non_exhaustive]
14039    pub struct StorageConfig {
14040        /// Optional. Defines the data to include during discovery when only a subset
14041        /// of the data should be considered. Provide a list of patterns that
14042        /// identify the data to include. For Cloud Storage bucket assets, these
14043        /// patterns are interpreted as glob patterns used to match object names. For
14044        /// BigQuery dataset assets, these patterns are interpreted as patterns to
14045        /// match table names.
14046        pub include_patterns: std::vec::Vec<std::string::String>,
14047
14048        /// Optional. Defines the data to exclude during discovery. Provide a list of
14049        /// patterns that identify the data to exclude. For Cloud Storage bucket
14050        /// assets, these patterns are interpreted as glob patterns used to match
14051        /// object names. For BigQuery dataset assets, these patterns are interpreted
14052        /// as patterns to match table names.
14053        pub exclude_patterns: std::vec::Vec<std::string::String>,
14054
14055        /// Optional. Configuration for CSV data.
14056        pub csv_options:
14057            std::option::Option<crate::model::data_discovery_spec::storage_config::CsvOptions>,
14058
14059        /// Optional. Configuration for JSON data.
14060        pub json_options:
14061            std::option::Option<crate::model::data_discovery_spec::storage_config::JsonOptions>,
14062
14063        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14064    }
14065
14066    impl StorageConfig {
14067        pub fn new() -> Self {
14068            std::default::Default::default()
14069        }
14070
14071        /// Sets the value of [include_patterns][crate::model::data_discovery_spec::StorageConfig::include_patterns].
14072        ///
14073        /// # Example
14074        /// ```ignore,no_run
14075        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
14076        /// let x = StorageConfig::new().set_include_patterns(["a", "b", "c"]);
14077        /// ```
14078        pub fn set_include_patterns<T, V>(mut self, v: T) -> Self
14079        where
14080            T: std::iter::IntoIterator<Item = V>,
14081            V: std::convert::Into<std::string::String>,
14082        {
14083            use std::iter::Iterator;
14084            self.include_patterns = v.into_iter().map(|i| i.into()).collect();
14085            self
14086        }
14087
14088        /// Sets the value of [exclude_patterns][crate::model::data_discovery_spec::StorageConfig::exclude_patterns].
14089        ///
14090        /// # Example
14091        /// ```ignore,no_run
14092        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
14093        /// let x = StorageConfig::new().set_exclude_patterns(["a", "b", "c"]);
14094        /// ```
14095        pub fn set_exclude_patterns<T, V>(mut self, v: T) -> Self
14096        where
14097            T: std::iter::IntoIterator<Item = V>,
14098            V: std::convert::Into<std::string::String>,
14099        {
14100            use std::iter::Iterator;
14101            self.exclude_patterns = v.into_iter().map(|i| i.into()).collect();
14102            self
14103        }
14104
14105        /// Sets the value of [csv_options][crate::model::data_discovery_spec::StorageConfig::csv_options].
14106        ///
14107        /// # Example
14108        /// ```ignore,no_run
14109        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
14110        /// use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::CsvOptions;
14111        /// let x = StorageConfig::new().set_csv_options(CsvOptions::default()/* use setters */);
14112        /// ```
14113        pub fn set_csv_options<T>(mut self, v: T) -> Self
14114        where
14115            T: std::convert::Into<crate::model::data_discovery_spec::storage_config::CsvOptions>,
14116        {
14117            self.csv_options = std::option::Option::Some(v.into());
14118            self
14119        }
14120
14121        /// Sets or clears the value of [csv_options][crate::model::data_discovery_spec::StorageConfig::csv_options].
14122        ///
14123        /// # Example
14124        /// ```ignore,no_run
14125        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
14126        /// use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::CsvOptions;
14127        /// let x = StorageConfig::new().set_or_clear_csv_options(Some(CsvOptions::default()/* use setters */));
14128        /// let x = StorageConfig::new().set_or_clear_csv_options(None::<CsvOptions>);
14129        /// ```
14130        pub fn set_or_clear_csv_options<T>(mut self, v: std::option::Option<T>) -> Self
14131        where
14132            T: std::convert::Into<crate::model::data_discovery_spec::storage_config::CsvOptions>,
14133        {
14134            self.csv_options = v.map(|x| x.into());
14135            self
14136        }
14137
14138        /// Sets the value of [json_options][crate::model::data_discovery_spec::StorageConfig::json_options].
14139        ///
14140        /// # Example
14141        /// ```ignore,no_run
14142        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
14143        /// use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::JsonOptions;
14144        /// let x = StorageConfig::new().set_json_options(JsonOptions::default()/* use setters */);
14145        /// ```
14146        pub fn set_json_options<T>(mut self, v: T) -> Self
14147        where
14148            T: std::convert::Into<crate::model::data_discovery_spec::storage_config::JsonOptions>,
14149        {
14150            self.json_options = std::option::Option::Some(v.into());
14151            self
14152        }
14153
14154        /// Sets or clears the value of [json_options][crate::model::data_discovery_spec::StorageConfig::json_options].
14155        ///
14156        /// # Example
14157        /// ```ignore,no_run
14158        /// # use google_cloud_dataplex_v1::model::data_discovery_spec::StorageConfig;
14159        /// use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::JsonOptions;
14160        /// let x = StorageConfig::new().set_or_clear_json_options(Some(JsonOptions::default()/* use setters */));
14161        /// let x = StorageConfig::new().set_or_clear_json_options(None::<JsonOptions>);
14162        /// ```
14163        pub fn set_or_clear_json_options<T>(mut self, v: std::option::Option<T>) -> Self
14164        where
14165            T: std::convert::Into<crate::model::data_discovery_spec::storage_config::JsonOptions>,
14166        {
14167            self.json_options = v.map(|x| x.into());
14168            self
14169        }
14170    }
14171
14172    impl wkt::message::Message for StorageConfig {
14173        fn typename() -> &'static str {
14174            "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig"
14175        }
14176    }
14177
14178    /// Defines additional types related to [StorageConfig].
14179    pub mod storage_config {
14180        #[allow(unused_imports)]
14181        use super::*;
14182
14183        /// Describes CSV and similar semi-structured data formats.
14184        #[derive(Clone, Default, PartialEq)]
14185        #[non_exhaustive]
14186        pub struct CsvOptions {
14187            /// Optional. The number of rows to interpret as header rows that should be
14188            /// skipped when reading data rows.
14189            pub header_rows: i32,
14190
14191            /// Optional. The delimiter that is used to separate values. The default is
14192            /// `,` (comma).
14193            pub delimiter: std::string::String,
14194
14195            /// Optional. The character encoding of the data. The default is UTF-8.
14196            pub encoding: std::string::String,
14197
14198            /// Optional. Whether to disable the inference of data types for CSV data.
14199            /// If true, all columns are registered as strings.
14200            pub type_inference_disabled: bool,
14201
14202            /// Optional. The character used to quote column values. Accepts `"`
14203            /// (double quotation mark) or `'` (single quotation mark). If unspecified,
14204            /// defaults to `"` (double quotation mark).
14205            pub quote: std::string::String,
14206
14207            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14208        }
14209
14210        impl CsvOptions {
14211            pub fn new() -> Self {
14212                std::default::Default::default()
14213            }
14214
14215            /// Sets the value of [header_rows][crate::model::data_discovery_spec::storage_config::CsvOptions::header_rows].
14216            ///
14217            /// # Example
14218            /// ```ignore,no_run
14219            /// # use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::CsvOptions;
14220            /// let x = CsvOptions::new().set_header_rows(42);
14221            /// ```
14222            pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14223                self.header_rows = v.into();
14224                self
14225            }
14226
14227            /// Sets the value of [delimiter][crate::model::data_discovery_spec::storage_config::CsvOptions::delimiter].
14228            ///
14229            /// # Example
14230            /// ```ignore,no_run
14231            /// # use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::CsvOptions;
14232            /// let x = CsvOptions::new().set_delimiter("example");
14233            /// ```
14234            pub fn set_delimiter<T: std::convert::Into<std::string::String>>(
14235                mut self,
14236                v: T,
14237            ) -> Self {
14238                self.delimiter = v.into();
14239                self
14240            }
14241
14242            /// Sets the value of [encoding][crate::model::data_discovery_spec::storage_config::CsvOptions::encoding].
14243            ///
14244            /// # Example
14245            /// ```ignore,no_run
14246            /// # use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::CsvOptions;
14247            /// let x = CsvOptions::new().set_encoding("example");
14248            /// ```
14249            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
14250                mut self,
14251                v: T,
14252            ) -> Self {
14253                self.encoding = v.into();
14254                self
14255            }
14256
14257            /// Sets the value of [type_inference_disabled][crate::model::data_discovery_spec::storage_config::CsvOptions::type_inference_disabled].
14258            ///
14259            /// # Example
14260            /// ```ignore,no_run
14261            /// # use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::CsvOptions;
14262            /// let x = CsvOptions::new().set_type_inference_disabled(true);
14263            /// ```
14264            pub fn set_type_inference_disabled<T: std::convert::Into<bool>>(
14265                mut self,
14266                v: T,
14267            ) -> Self {
14268                self.type_inference_disabled = v.into();
14269                self
14270            }
14271
14272            /// Sets the value of [quote][crate::model::data_discovery_spec::storage_config::CsvOptions::quote].
14273            ///
14274            /// # Example
14275            /// ```ignore,no_run
14276            /// # use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::CsvOptions;
14277            /// let x = CsvOptions::new().set_quote("example");
14278            /// ```
14279            pub fn set_quote<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14280                self.quote = v.into();
14281                self
14282            }
14283        }
14284
14285        impl wkt::message::Message for CsvOptions {
14286            fn typename() -> &'static str {
14287                "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions"
14288            }
14289        }
14290
14291        /// Describes JSON data format.
14292        #[derive(Clone, Default, PartialEq)]
14293        #[non_exhaustive]
14294        pub struct JsonOptions {
14295            /// Optional. The character encoding of the data. The default is UTF-8.
14296            pub encoding: std::string::String,
14297
14298            /// Optional. Whether to disable the inference of data types for JSON data.
14299            /// If true, all columns are registered as their primitive types
14300            /// (strings, number, or boolean).
14301            pub type_inference_disabled: bool,
14302
14303            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14304        }
14305
14306        impl JsonOptions {
14307            pub fn new() -> Self {
14308                std::default::Default::default()
14309            }
14310
14311            /// Sets the value of [encoding][crate::model::data_discovery_spec::storage_config::JsonOptions::encoding].
14312            ///
14313            /// # Example
14314            /// ```ignore,no_run
14315            /// # use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::JsonOptions;
14316            /// let x = JsonOptions::new().set_encoding("example");
14317            /// ```
14318            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
14319                mut self,
14320                v: T,
14321            ) -> Self {
14322                self.encoding = v.into();
14323                self
14324            }
14325
14326            /// Sets the value of [type_inference_disabled][crate::model::data_discovery_spec::storage_config::JsonOptions::type_inference_disabled].
14327            ///
14328            /// # Example
14329            /// ```ignore,no_run
14330            /// # use google_cloud_dataplex_v1::model::data_discovery_spec::storage_config::JsonOptions;
14331            /// let x = JsonOptions::new().set_type_inference_disabled(true);
14332            /// ```
14333            pub fn set_type_inference_disabled<T: std::convert::Into<bool>>(
14334                mut self,
14335                v: T,
14336            ) -> Self {
14337                self.type_inference_disabled = v.into();
14338                self
14339            }
14340        }
14341
14342        impl wkt::message::Message for JsonOptions {
14343            fn typename() -> &'static str {
14344                "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions"
14345            }
14346        }
14347    }
14348
14349    /// The configurations of the data discovery scan resource.
14350    #[derive(Clone, Debug, PartialEq)]
14351    #[non_exhaustive]
14352    pub enum ResourceConfig {
14353        /// Cloud Storage related configurations.
14354        StorageConfig(std::boxed::Box<crate::model::data_discovery_spec::StorageConfig>),
14355    }
14356}
14357
14358/// The output of a data discovery scan.
14359#[derive(Clone, Default, PartialEq)]
14360#[non_exhaustive]
14361pub struct DataDiscoveryResult {
14362    /// Output only. Configuration for metadata publishing.
14363    pub bigquery_publishing:
14364        std::option::Option<crate::model::data_discovery_result::BigQueryPublishing>,
14365
14366    /// Output only. Describes result statistics of a data scan discovery job.
14367    pub scan_statistics: std::option::Option<crate::model::data_discovery_result::ScanStatistics>,
14368
14369    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14370}
14371
14372impl DataDiscoveryResult {
14373    pub fn new() -> Self {
14374        std::default::Default::default()
14375    }
14376
14377    /// Sets the value of [bigquery_publishing][crate::model::DataDiscoveryResult::bigquery_publishing].
14378    ///
14379    /// # Example
14380    /// ```ignore,no_run
14381    /// # use google_cloud_dataplex_v1::model::DataDiscoveryResult;
14382    /// use google_cloud_dataplex_v1::model::data_discovery_result::BigQueryPublishing;
14383    /// let x = DataDiscoveryResult::new().set_bigquery_publishing(BigQueryPublishing::default()/* use setters */);
14384    /// ```
14385    pub fn set_bigquery_publishing<T>(mut self, v: T) -> Self
14386    where
14387        T: std::convert::Into<crate::model::data_discovery_result::BigQueryPublishing>,
14388    {
14389        self.bigquery_publishing = std::option::Option::Some(v.into());
14390        self
14391    }
14392
14393    /// Sets or clears the value of [bigquery_publishing][crate::model::DataDiscoveryResult::bigquery_publishing].
14394    ///
14395    /// # Example
14396    /// ```ignore,no_run
14397    /// # use google_cloud_dataplex_v1::model::DataDiscoveryResult;
14398    /// use google_cloud_dataplex_v1::model::data_discovery_result::BigQueryPublishing;
14399    /// let x = DataDiscoveryResult::new().set_or_clear_bigquery_publishing(Some(BigQueryPublishing::default()/* use setters */));
14400    /// let x = DataDiscoveryResult::new().set_or_clear_bigquery_publishing(None::<BigQueryPublishing>);
14401    /// ```
14402    pub fn set_or_clear_bigquery_publishing<T>(mut self, v: std::option::Option<T>) -> Self
14403    where
14404        T: std::convert::Into<crate::model::data_discovery_result::BigQueryPublishing>,
14405    {
14406        self.bigquery_publishing = v.map(|x| x.into());
14407        self
14408    }
14409
14410    /// Sets the value of [scan_statistics][crate::model::DataDiscoveryResult::scan_statistics].
14411    ///
14412    /// # Example
14413    /// ```ignore,no_run
14414    /// # use google_cloud_dataplex_v1::model::DataDiscoveryResult;
14415    /// use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14416    /// let x = DataDiscoveryResult::new().set_scan_statistics(ScanStatistics::default()/* use setters */);
14417    /// ```
14418    pub fn set_scan_statistics<T>(mut self, v: T) -> Self
14419    where
14420        T: std::convert::Into<crate::model::data_discovery_result::ScanStatistics>,
14421    {
14422        self.scan_statistics = std::option::Option::Some(v.into());
14423        self
14424    }
14425
14426    /// Sets or clears the value of [scan_statistics][crate::model::DataDiscoveryResult::scan_statistics].
14427    ///
14428    /// # Example
14429    /// ```ignore,no_run
14430    /// # use google_cloud_dataplex_v1::model::DataDiscoveryResult;
14431    /// use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14432    /// let x = DataDiscoveryResult::new().set_or_clear_scan_statistics(Some(ScanStatistics::default()/* use setters */));
14433    /// let x = DataDiscoveryResult::new().set_or_clear_scan_statistics(None::<ScanStatistics>);
14434    /// ```
14435    pub fn set_or_clear_scan_statistics<T>(mut self, v: std::option::Option<T>) -> Self
14436    where
14437        T: std::convert::Into<crate::model::data_discovery_result::ScanStatistics>,
14438    {
14439        self.scan_statistics = v.map(|x| x.into());
14440        self
14441    }
14442}
14443
14444impl wkt::message::Message for DataDiscoveryResult {
14445    fn typename() -> &'static str {
14446        "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoveryResult"
14447    }
14448}
14449
14450/// Defines additional types related to [DataDiscoveryResult].
14451pub mod data_discovery_result {
14452    #[allow(unused_imports)]
14453    use super::*;
14454
14455    /// Describes BigQuery publishing configurations.
14456    #[derive(Clone, Default, PartialEq)]
14457    #[non_exhaustive]
14458    pub struct BigQueryPublishing {
14459        /// Output only. The BigQuery dataset the discovered tables are published to.
14460        pub dataset: std::string::String,
14461
14462        /// Output only. The location of the BigQuery publishing dataset.
14463        pub location: std::string::String,
14464
14465        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14466    }
14467
14468    impl BigQueryPublishing {
14469        pub fn new() -> Self {
14470            std::default::Default::default()
14471        }
14472
14473        /// Sets the value of [dataset][crate::model::data_discovery_result::BigQueryPublishing::dataset].
14474        ///
14475        /// # Example
14476        /// ```ignore,no_run
14477        /// # use google_cloud_dataplex_v1::model::data_discovery_result::BigQueryPublishing;
14478        /// let x = BigQueryPublishing::new().set_dataset("example");
14479        /// ```
14480        pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14481            self.dataset = v.into();
14482            self
14483        }
14484
14485        /// Sets the value of [location][crate::model::data_discovery_result::BigQueryPublishing::location].
14486        ///
14487        /// # Example
14488        /// ```ignore,no_run
14489        /// # use google_cloud_dataplex_v1::model::data_discovery_result::BigQueryPublishing;
14490        /// let x = BigQueryPublishing::new().set_location("example");
14491        /// ```
14492        pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14493            self.location = v.into();
14494            self
14495        }
14496    }
14497
14498    impl wkt::message::Message for BigQueryPublishing {
14499        fn typename() -> &'static str {
14500            "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing"
14501        }
14502    }
14503
14504    /// Describes result statistics of a data scan discovery job.
14505    #[derive(Clone, Default, PartialEq)]
14506    #[non_exhaustive]
14507    pub struct ScanStatistics {
14508        /// The number of files scanned.
14509        pub scanned_file_count: i32,
14510
14511        /// The data processed in bytes.
14512        pub data_processed_bytes: i64,
14513
14514        /// The number of files excluded.
14515        pub files_excluded: i32,
14516
14517        /// The number of tables created.
14518        pub tables_created: i32,
14519
14520        /// The number of tables deleted.
14521        pub tables_deleted: i32,
14522
14523        /// The number of tables updated.
14524        pub tables_updated: i32,
14525
14526        /// The number of filesets created.
14527        pub filesets_created: i32,
14528
14529        /// The number of filesets deleted.
14530        pub filesets_deleted: i32,
14531
14532        /// The number of filesets updated.
14533        pub filesets_updated: i32,
14534
14535        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14536    }
14537
14538    impl ScanStatistics {
14539        pub fn new() -> Self {
14540            std::default::Default::default()
14541        }
14542
14543        /// Sets the value of [scanned_file_count][crate::model::data_discovery_result::ScanStatistics::scanned_file_count].
14544        ///
14545        /// # Example
14546        /// ```ignore,no_run
14547        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14548        /// let x = ScanStatistics::new().set_scanned_file_count(42);
14549        /// ```
14550        pub fn set_scanned_file_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14551            self.scanned_file_count = v.into();
14552            self
14553        }
14554
14555        /// Sets the value of [data_processed_bytes][crate::model::data_discovery_result::ScanStatistics::data_processed_bytes].
14556        ///
14557        /// # Example
14558        /// ```ignore,no_run
14559        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14560        /// let x = ScanStatistics::new().set_data_processed_bytes(42);
14561        /// ```
14562        pub fn set_data_processed_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14563            self.data_processed_bytes = v.into();
14564            self
14565        }
14566
14567        /// Sets the value of [files_excluded][crate::model::data_discovery_result::ScanStatistics::files_excluded].
14568        ///
14569        /// # Example
14570        /// ```ignore,no_run
14571        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14572        /// let x = ScanStatistics::new().set_files_excluded(42);
14573        /// ```
14574        pub fn set_files_excluded<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14575            self.files_excluded = v.into();
14576            self
14577        }
14578
14579        /// Sets the value of [tables_created][crate::model::data_discovery_result::ScanStatistics::tables_created].
14580        ///
14581        /// # Example
14582        /// ```ignore,no_run
14583        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14584        /// let x = ScanStatistics::new().set_tables_created(42);
14585        /// ```
14586        pub fn set_tables_created<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14587            self.tables_created = v.into();
14588            self
14589        }
14590
14591        /// Sets the value of [tables_deleted][crate::model::data_discovery_result::ScanStatistics::tables_deleted].
14592        ///
14593        /// # Example
14594        /// ```ignore,no_run
14595        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14596        /// let x = ScanStatistics::new().set_tables_deleted(42);
14597        /// ```
14598        pub fn set_tables_deleted<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14599            self.tables_deleted = v.into();
14600            self
14601        }
14602
14603        /// Sets the value of [tables_updated][crate::model::data_discovery_result::ScanStatistics::tables_updated].
14604        ///
14605        /// # Example
14606        /// ```ignore,no_run
14607        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14608        /// let x = ScanStatistics::new().set_tables_updated(42);
14609        /// ```
14610        pub fn set_tables_updated<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14611            self.tables_updated = v.into();
14612            self
14613        }
14614
14615        /// Sets the value of [filesets_created][crate::model::data_discovery_result::ScanStatistics::filesets_created].
14616        ///
14617        /// # Example
14618        /// ```ignore,no_run
14619        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14620        /// let x = ScanStatistics::new().set_filesets_created(42);
14621        /// ```
14622        pub fn set_filesets_created<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14623            self.filesets_created = v.into();
14624            self
14625        }
14626
14627        /// Sets the value of [filesets_deleted][crate::model::data_discovery_result::ScanStatistics::filesets_deleted].
14628        ///
14629        /// # Example
14630        /// ```ignore,no_run
14631        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14632        /// let x = ScanStatistics::new().set_filesets_deleted(42);
14633        /// ```
14634        pub fn set_filesets_deleted<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14635            self.filesets_deleted = v.into();
14636            self
14637        }
14638
14639        /// Sets the value of [filesets_updated][crate::model::data_discovery_result::ScanStatistics::filesets_updated].
14640        ///
14641        /// # Example
14642        /// ```ignore,no_run
14643        /// # use google_cloud_dataplex_v1::model::data_discovery_result::ScanStatistics;
14644        /// let x = ScanStatistics::new().set_filesets_updated(42);
14645        /// ```
14646        pub fn set_filesets_updated<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14647            self.filesets_updated = v.into();
14648            self
14649        }
14650    }
14651
14652    impl wkt::message::Message for ScanStatistics {
14653        fn typename() -> &'static str {
14654            "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoveryResult.ScanStatistics"
14655        }
14656    }
14657}
14658
14659/// DataDocumentation scan related spec.
14660#[derive(Clone, Default, PartialEq)]
14661#[non_exhaustive]
14662pub struct DataDocumentationSpec {
14663    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14664}
14665
14666impl DataDocumentationSpec {
14667    pub fn new() -> Self {
14668        std::default::Default::default()
14669    }
14670}
14671
14672impl wkt::message::Message for DataDocumentationSpec {
14673    fn typename() -> &'static str {
14674        "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationSpec"
14675    }
14676}
14677
14678/// The output of a DataDocumentation scan.
14679#[derive(Clone, Default, PartialEq)]
14680#[non_exhaustive]
14681pub struct DataDocumentationResult {
14682    /// The result of the data documentation scan.
14683    pub result: std::option::Option<crate::model::data_documentation_result::Result>,
14684
14685    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14686}
14687
14688impl DataDocumentationResult {
14689    pub fn new() -> Self {
14690        std::default::Default::default()
14691    }
14692
14693    /// Sets the value of [result][crate::model::DataDocumentationResult::result].
14694    ///
14695    /// Note that all the setters affecting `result` are mutually
14696    /// exclusive.
14697    ///
14698    /// # Example
14699    /// ```ignore,no_run
14700    /// # use google_cloud_dataplex_v1::model::DataDocumentationResult;
14701    /// use google_cloud_dataplex_v1::model::data_documentation_result::TableResult;
14702    /// let x = DataDocumentationResult::new().set_result(Some(
14703    ///     google_cloud_dataplex_v1::model::data_documentation_result::Result::TableResult(TableResult::default().into())));
14704    /// ```
14705    pub fn set_result<
14706        T: std::convert::Into<std::option::Option<crate::model::data_documentation_result::Result>>,
14707    >(
14708        mut self,
14709        v: T,
14710    ) -> Self {
14711        self.result = v.into();
14712        self
14713    }
14714
14715    /// The value of [result][crate::model::DataDocumentationResult::result]
14716    /// if it holds a `TableResult`, `None` if the field is not set or
14717    /// holds a different branch.
14718    pub fn table_result(
14719        &self,
14720    ) -> std::option::Option<&std::boxed::Box<crate::model::data_documentation_result::TableResult>>
14721    {
14722        #[allow(unreachable_patterns)]
14723        self.result.as_ref().and_then(|v| match v {
14724            crate::model::data_documentation_result::Result::TableResult(v) => {
14725                std::option::Option::Some(v)
14726            }
14727            _ => std::option::Option::None,
14728        })
14729    }
14730
14731    /// Sets the value of [result][crate::model::DataDocumentationResult::result]
14732    /// to hold a `TableResult`.
14733    ///
14734    /// Note that all the setters affecting `result` are
14735    /// mutually exclusive.
14736    ///
14737    /// # Example
14738    /// ```ignore,no_run
14739    /// # use google_cloud_dataplex_v1::model::DataDocumentationResult;
14740    /// use google_cloud_dataplex_v1::model::data_documentation_result::TableResult;
14741    /// let x = DataDocumentationResult::new().set_table_result(TableResult::default()/* use setters */);
14742    /// assert!(x.table_result().is_some());
14743    /// ```
14744    pub fn set_table_result<
14745        T: std::convert::Into<std::boxed::Box<crate::model::data_documentation_result::TableResult>>,
14746    >(
14747        mut self,
14748        v: T,
14749    ) -> Self {
14750        self.result = std::option::Option::Some(
14751            crate::model::data_documentation_result::Result::TableResult(v.into()),
14752        );
14753        self
14754    }
14755}
14756
14757impl wkt::message::Message for DataDocumentationResult {
14758    fn typename() -> &'static str {
14759        "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult"
14760    }
14761}
14762
14763/// Defines additional types related to [DataDocumentationResult].
14764pub mod data_documentation_result {
14765    #[allow(unused_imports)]
14766    use super::*;
14767
14768    /// Generated metadata about the table.
14769    #[derive(Clone, Default, PartialEq)]
14770    #[non_exhaustive]
14771    pub struct TableResult {
14772        /// Output only. The service-qualified full resource name of the cloud
14773        /// resource. Ex:
14774        /// //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
14775        pub name: std::string::String,
14776
14777        /// Output only. Generated description of the table.
14778        pub overview: std::string::String,
14779
14780        /// Output only. Schema of the table with generated metadata of the columns
14781        /// in the schema.
14782        pub schema: std::option::Option<crate::model::data_documentation_result::Schema>,
14783
14784        /// Output only. Sample SQL queries for the table.
14785        pub queries: std::vec::Vec<crate::model::data_documentation_result::Query>,
14786
14787        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14788    }
14789
14790    impl TableResult {
14791        pub fn new() -> Self {
14792            std::default::Default::default()
14793        }
14794
14795        /// Sets the value of [name][crate::model::data_documentation_result::TableResult::name].
14796        ///
14797        /// # Example
14798        /// ```ignore,no_run
14799        /// # use google_cloud_dataplex_v1::model::data_documentation_result::TableResult;
14800        /// let x = TableResult::new().set_name("example");
14801        /// ```
14802        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14803            self.name = v.into();
14804            self
14805        }
14806
14807        /// Sets the value of [overview][crate::model::data_documentation_result::TableResult::overview].
14808        ///
14809        /// # Example
14810        /// ```ignore,no_run
14811        /// # use google_cloud_dataplex_v1::model::data_documentation_result::TableResult;
14812        /// let x = TableResult::new().set_overview("example");
14813        /// ```
14814        pub fn set_overview<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14815            self.overview = v.into();
14816            self
14817        }
14818
14819        /// Sets the value of [schema][crate::model::data_documentation_result::TableResult::schema].
14820        ///
14821        /// # Example
14822        /// ```ignore,no_run
14823        /// # use google_cloud_dataplex_v1::model::data_documentation_result::TableResult;
14824        /// use google_cloud_dataplex_v1::model::data_documentation_result::Schema;
14825        /// let x = TableResult::new().set_schema(Schema::default()/* use setters */);
14826        /// ```
14827        pub fn set_schema<T>(mut self, v: T) -> Self
14828        where
14829            T: std::convert::Into<crate::model::data_documentation_result::Schema>,
14830        {
14831            self.schema = std::option::Option::Some(v.into());
14832            self
14833        }
14834
14835        /// Sets or clears the value of [schema][crate::model::data_documentation_result::TableResult::schema].
14836        ///
14837        /// # Example
14838        /// ```ignore,no_run
14839        /// # use google_cloud_dataplex_v1::model::data_documentation_result::TableResult;
14840        /// use google_cloud_dataplex_v1::model::data_documentation_result::Schema;
14841        /// let x = TableResult::new().set_or_clear_schema(Some(Schema::default()/* use setters */));
14842        /// let x = TableResult::new().set_or_clear_schema(None::<Schema>);
14843        /// ```
14844        pub fn set_or_clear_schema<T>(mut self, v: std::option::Option<T>) -> Self
14845        where
14846            T: std::convert::Into<crate::model::data_documentation_result::Schema>,
14847        {
14848            self.schema = v.map(|x| x.into());
14849            self
14850        }
14851
14852        /// Sets the value of [queries][crate::model::data_documentation_result::TableResult::queries].
14853        ///
14854        /// # Example
14855        /// ```ignore,no_run
14856        /// # use google_cloud_dataplex_v1::model::data_documentation_result::TableResult;
14857        /// use google_cloud_dataplex_v1::model::data_documentation_result::Query;
14858        /// let x = TableResult::new()
14859        ///     .set_queries([
14860        ///         Query::default()/* use setters */,
14861        ///         Query::default()/* use (different) setters */,
14862        ///     ]);
14863        /// ```
14864        pub fn set_queries<T, V>(mut self, v: T) -> Self
14865        where
14866            T: std::iter::IntoIterator<Item = V>,
14867            V: std::convert::Into<crate::model::data_documentation_result::Query>,
14868        {
14869            use std::iter::Iterator;
14870            self.queries = v.into_iter().map(|i| i.into()).collect();
14871            self
14872        }
14873    }
14874
14875    impl wkt::message::Message for TableResult {
14876        fn typename() -> &'static str {
14877            "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.TableResult"
14878        }
14879    }
14880
14881    /// A sample SQL query in data documentation.
14882    #[derive(Clone, Default, PartialEq)]
14883    #[non_exhaustive]
14884    pub struct Query {
14885        /// Output only. The SQL query string which can be executed.
14886        pub sql: std::string::String,
14887
14888        /// Output only. The description for the query.
14889        pub description: std::string::String,
14890
14891        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14892    }
14893
14894    impl Query {
14895        pub fn new() -> Self {
14896            std::default::Default::default()
14897        }
14898
14899        /// Sets the value of [sql][crate::model::data_documentation_result::Query::sql].
14900        ///
14901        /// # Example
14902        /// ```ignore,no_run
14903        /// # use google_cloud_dataplex_v1::model::data_documentation_result::Query;
14904        /// let x = Query::new().set_sql("example");
14905        /// ```
14906        pub fn set_sql<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14907            self.sql = v.into();
14908            self
14909        }
14910
14911        /// Sets the value of [description][crate::model::data_documentation_result::Query::description].
14912        ///
14913        /// # Example
14914        /// ```ignore,no_run
14915        /// # use google_cloud_dataplex_v1::model::data_documentation_result::Query;
14916        /// let x = Query::new().set_description("example");
14917        /// ```
14918        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14919            self.description = v.into();
14920            self
14921        }
14922    }
14923
14924    impl wkt::message::Message for Query {
14925        fn typename() -> &'static str {
14926            "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.Query"
14927        }
14928    }
14929
14930    /// Schema of the table with generated metadata of columns.
14931    #[derive(Clone, Default, PartialEq)]
14932    #[non_exhaustive]
14933    pub struct Schema {
14934        /// Output only. The list of columns.
14935        pub fields: std::vec::Vec<crate::model::data_documentation_result::Field>,
14936
14937        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14938    }
14939
14940    impl Schema {
14941        pub fn new() -> Self {
14942            std::default::Default::default()
14943        }
14944
14945        /// Sets the value of [fields][crate::model::data_documentation_result::Schema::fields].
14946        ///
14947        /// # Example
14948        /// ```ignore,no_run
14949        /// # use google_cloud_dataplex_v1::model::data_documentation_result::Schema;
14950        /// use google_cloud_dataplex_v1::model::data_documentation_result::Field;
14951        /// let x = Schema::new()
14952        ///     .set_fields([
14953        ///         Field::default()/* use setters */,
14954        ///         Field::default()/* use (different) setters */,
14955        ///     ]);
14956        /// ```
14957        pub fn set_fields<T, V>(mut self, v: T) -> Self
14958        where
14959            T: std::iter::IntoIterator<Item = V>,
14960            V: std::convert::Into<crate::model::data_documentation_result::Field>,
14961        {
14962            use std::iter::Iterator;
14963            self.fields = v.into_iter().map(|i| i.into()).collect();
14964            self
14965        }
14966    }
14967
14968    impl wkt::message::Message for Schema {
14969        fn typename() -> &'static str {
14970            "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.Schema"
14971        }
14972    }
14973
14974    /// Column of a table with generated metadata and nested fields.
14975    #[derive(Clone, Default, PartialEq)]
14976    #[non_exhaustive]
14977    pub struct Field {
14978        /// Output only. The name of the column.
14979        pub name: std::string::String,
14980
14981        /// Output only. Generated description for columns and fields.
14982        pub description: std::string::String,
14983
14984        /// Output only. Nested fields.
14985        pub fields: std::vec::Vec<crate::model::data_documentation_result::Field>,
14986
14987        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14988    }
14989
14990    impl Field {
14991        pub fn new() -> Self {
14992            std::default::Default::default()
14993        }
14994
14995        /// Sets the value of [name][crate::model::data_documentation_result::Field::name].
14996        ///
14997        /// # Example
14998        /// ```ignore,no_run
14999        /// # use google_cloud_dataplex_v1::model::data_documentation_result::Field;
15000        /// let x = Field::new().set_name("example");
15001        /// ```
15002        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15003            self.name = v.into();
15004            self
15005        }
15006
15007        /// Sets the value of [description][crate::model::data_documentation_result::Field::description].
15008        ///
15009        /// # Example
15010        /// ```ignore,no_run
15011        /// # use google_cloud_dataplex_v1::model::data_documentation_result::Field;
15012        /// let x = Field::new().set_description("example");
15013        /// ```
15014        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15015            self.description = v.into();
15016            self
15017        }
15018
15019        /// Sets the value of [fields][crate::model::data_documentation_result::Field::fields].
15020        ///
15021        /// # Example
15022        /// ```ignore,no_run
15023        /// # use google_cloud_dataplex_v1::model::data_documentation_result::Field;
15024        /// let x = Field::new()
15025        ///     .set_fields([
15026        ///         Field::default()/* use setters */,
15027        ///         Field::default()/* use (different) setters */,
15028        ///     ]);
15029        /// ```
15030        pub fn set_fields<T, V>(mut self, v: T) -> Self
15031        where
15032            T: std::iter::IntoIterator<Item = V>,
15033            V: std::convert::Into<crate::model::data_documentation_result::Field>,
15034        {
15035            use std::iter::Iterator;
15036            self.fields = v.into_iter().map(|i| i.into()).collect();
15037            self
15038        }
15039    }
15040
15041    impl wkt::message::Message for Field {
15042        fn typename() -> &'static str {
15043            "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.Field"
15044        }
15045    }
15046
15047    /// The result of the data documentation scan.
15048    #[derive(Clone, Debug, PartialEq)]
15049    #[non_exhaustive]
15050    pub enum Result {
15051        /// Output only. Table result for insights.
15052        TableResult(std::boxed::Box<crate::model::data_documentation_result::TableResult>),
15053    }
15054}
15055
15056/// DataProfileScan related setting.
15057#[derive(Clone, Default, PartialEq)]
15058#[non_exhaustive]
15059pub struct DataProfileSpec {
15060    /// Optional. The percentage of the records to be selected from the dataset for
15061    /// DataScan.
15062    ///
15063    /// * Value can range between 0.0 and 100.0 with up to 3 significant decimal
15064    ///   digits.
15065    /// * Sampling is not applied if `sampling_percent` is not specified, 0 or
15066    ///
15067    pub sampling_percent: f32,
15068
15069    /// Optional. A filter applied to all rows in a single DataScan job.
15070    /// The filter needs to be a valid SQL expression for a WHERE clause in
15071    /// BigQuery standard SQL syntax.
15072    /// Example: col1 >= 0 AND col2 < 10
15073    pub row_filter: std::string::String,
15074
15075    /// Optional. Actions to take upon job completion..
15076    pub post_scan_actions: std::option::Option<crate::model::data_profile_spec::PostScanActions>,
15077
15078    /// Optional. The fields to include in data profile.
15079    ///
15080    /// If not specified, all fields at the time of profile scan job execution are
15081    /// included, except for ones listed in `exclude_fields`.
15082    pub include_fields: std::option::Option<crate::model::data_profile_spec::SelectedFields>,
15083
15084    /// Optional. The fields to exclude from data profile.
15085    ///
15086    /// If specified, the fields will be excluded from data profile, regardless of
15087    /// `include_fields` value.
15088    pub exclude_fields: std::option::Option<crate::model::data_profile_spec::SelectedFields>,
15089
15090    /// Optional. If set, the latest DataScan job result will be published as
15091    /// Dataplex Universal Catalog metadata.
15092    pub catalog_publishing_enabled: bool,
15093
15094    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15095}
15096
15097impl DataProfileSpec {
15098    pub fn new() -> Self {
15099        std::default::Default::default()
15100    }
15101
15102    /// Sets the value of [sampling_percent][crate::model::DataProfileSpec::sampling_percent].
15103    ///
15104    /// # Example
15105    /// ```ignore,no_run
15106    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15107    /// let x = DataProfileSpec::new().set_sampling_percent(42.0);
15108    /// ```
15109    pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
15110        self.sampling_percent = v.into();
15111        self
15112    }
15113
15114    /// Sets the value of [row_filter][crate::model::DataProfileSpec::row_filter].
15115    ///
15116    /// # Example
15117    /// ```ignore,no_run
15118    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15119    /// let x = DataProfileSpec::new().set_row_filter("example");
15120    /// ```
15121    pub fn set_row_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15122        self.row_filter = v.into();
15123        self
15124    }
15125
15126    /// Sets the value of [post_scan_actions][crate::model::DataProfileSpec::post_scan_actions].
15127    ///
15128    /// # Example
15129    /// ```ignore,no_run
15130    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15131    /// use google_cloud_dataplex_v1::model::data_profile_spec::PostScanActions;
15132    /// let x = DataProfileSpec::new().set_post_scan_actions(PostScanActions::default()/* use setters */);
15133    /// ```
15134    pub fn set_post_scan_actions<T>(mut self, v: T) -> Self
15135    where
15136        T: std::convert::Into<crate::model::data_profile_spec::PostScanActions>,
15137    {
15138        self.post_scan_actions = std::option::Option::Some(v.into());
15139        self
15140    }
15141
15142    /// Sets or clears the value of [post_scan_actions][crate::model::DataProfileSpec::post_scan_actions].
15143    ///
15144    /// # Example
15145    /// ```ignore,no_run
15146    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15147    /// use google_cloud_dataplex_v1::model::data_profile_spec::PostScanActions;
15148    /// let x = DataProfileSpec::new().set_or_clear_post_scan_actions(Some(PostScanActions::default()/* use setters */));
15149    /// let x = DataProfileSpec::new().set_or_clear_post_scan_actions(None::<PostScanActions>);
15150    /// ```
15151    pub fn set_or_clear_post_scan_actions<T>(mut self, v: std::option::Option<T>) -> Self
15152    where
15153        T: std::convert::Into<crate::model::data_profile_spec::PostScanActions>,
15154    {
15155        self.post_scan_actions = v.map(|x| x.into());
15156        self
15157    }
15158
15159    /// Sets the value of [include_fields][crate::model::DataProfileSpec::include_fields].
15160    ///
15161    /// # Example
15162    /// ```ignore,no_run
15163    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15164    /// use google_cloud_dataplex_v1::model::data_profile_spec::SelectedFields;
15165    /// let x = DataProfileSpec::new().set_include_fields(SelectedFields::default()/* use setters */);
15166    /// ```
15167    pub fn set_include_fields<T>(mut self, v: T) -> Self
15168    where
15169        T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
15170    {
15171        self.include_fields = std::option::Option::Some(v.into());
15172        self
15173    }
15174
15175    /// Sets or clears the value of [include_fields][crate::model::DataProfileSpec::include_fields].
15176    ///
15177    /// # Example
15178    /// ```ignore,no_run
15179    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15180    /// use google_cloud_dataplex_v1::model::data_profile_spec::SelectedFields;
15181    /// let x = DataProfileSpec::new().set_or_clear_include_fields(Some(SelectedFields::default()/* use setters */));
15182    /// let x = DataProfileSpec::new().set_or_clear_include_fields(None::<SelectedFields>);
15183    /// ```
15184    pub fn set_or_clear_include_fields<T>(mut self, v: std::option::Option<T>) -> Self
15185    where
15186        T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
15187    {
15188        self.include_fields = v.map(|x| x.into());
15189        self
15190    }
15191
15192    /// Sets the value of [exclude_fields][crate::model::DataProfileSpec::exclude_fields].
15193    ///
15194    /// # Example
15195    /// ```ignore,no_run
15196    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15197    /// use google_cloud_dataplex_v1::model::data_profile_spec::SelectedFields;
15198    /// let x = DataProfileSpec::new().set_exclude_fields(SelectedFields::default()/* use setters */);
15199    /// ```
15200    pub fn set_exclude_fields<T>(mut self, v: T) -> Self
15201    where
15202        T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
15203    {
15204        self.exclude_fields = std::option::Option::Some(v.into());
15205        self
15206    }
15207
15208    /// Sets or clears the value of [exclude_fields][crate::model::DataProfileSpec::exclude_fields].
15209    ///
15210    /// # Example
15211    /// ```ignore,no_run
15212    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15213    /// use google_cloud_dataplex_v1::model::data_profile_spec::SelectedFields;
15214    /// let x = DataProfileSpec::new().set_or_clear_exclude_fields(Some(SelectedFields::default()/* use setters */));
15215    /// let x = DataProfileSpec::new().set_or_clear_exclude_fields(None::<SelectedFields>);
15216    /// ```
15217    pub fn set_or_clear_exclude_fields<T>(mut self, v: std::option::Option<T>) -> Self
15218    where
15219        T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
15220    {
15221        self.exclude_fields = v.map(|x| x.into());
15222        self
15223    }
15224
15225    /// Sets the value of [catalog_publishing_enabled][crate::model::DataProfileSpec::catalog_publishing_enabled].
15226    ///
15227    /// # Example
15228    /// ```ignore,no_run
15229    /// # use google_cloud_dataplex_v1::model::DataProfileSpec;
15230    /// let x = DataProfileSpec::new().set_catalog_publishing_enabled(true);
15231    /// ```
15232    pub fn set_catalog_publishing_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15233        self.catalog_publishing_enabled = v.into();
15234        self
15235    }
15236}
15237
15238impl wkt::message::Message for DataProfileSpec {
15239    fn typename() -> &'static str {
15240        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec"
15241    }
15242}
15243
15244/// Defines additional types related to [DataProfileSpec].
15245pub mod data_profile_spec {
15246    #[allow(unused_imports)]
15247    use super::*;
15248
15249    /// The configuration of post scan actions of DataProfileScan job.
15250    #[derive(Clone, Default, PartialEq)]
15251    #[non_exhaustive]
15252    pub struct PostScanActions {
15253        /// Optional. If set, results will be exported to the provided BigQuery
15254        /// table.
15255        pub bigquery_export:
15256            std::option::Option<crate::model::data_profile_spec::post_scan_actions::BigQueryExport>,
15257
15258        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15259    }
15260
15261    impl PostScanActions {
15262        pub fn new() -> Self {
15263            std::default::Default::default()
15264        }
15265
15266        /// Sets the value of [bigquery_export][crate::model::data_profile_spec::PostScanActions::bigquery_export].
15267        ///
15268        /// # Example
15269        /// ```ignore,no_run
15270        /// # use google_cloud_dataplex_v1::model::data_profile_spec::PostScanActions;
15271        /// use google_cloud_dataplex_v1::model::data_profile_spec::post_scan_actions::BigQueryExport;
15272        /// let x = PostScanActions::new().set_bigquery_export(BigQueryExport::default()/* use setters */);
15273        /// ```
15274        pub fn set_bigquery_export<T>(mut self, v: T) -> Self
15275        where
15276            T: std::convert::Into<
15277                    crate::model::data_profile_spec::post_scan_actions::BigQueryExport,
15278                >,
15279        {
15280            self.bigquery_export = std::option::Option::Some(v.into());
15281            self
15282        }
15283
15284        /// Sets or clears the value of [bigquery_export][crate::model::data_profile_spec::PostScanActions::bigquery_export].
15285        ///
15286        /// # Example
15287        /// ```ignore,no_run
15288        /// # use google_cloud_dataplex_v1::model::data_profile_spec::PostScanActions;
15289        /// use google_cloud_dataplex_v1::model::data_profile_spec::post_scan_actions::BigQueryExport;
15290        /// let x = PostScanActions::new().set_or_clear_bigquery_export(Some(BigQueryExport::default()/* use setters */));
15291        /// let x = PostScanActions::new().set_or_clear_bigquery_export(None::<BigQueryExport>);
15292        /// ```
15293        pub fn set_or_clear_bigquery_export<T>(mut self, v: std::option::Option<T>) -> Self
15294        where
15295            T: std::convert::Into<
15296                    crate::model::data_profile_spec::post_scan_actions::BigQueryExport,
15297                >,
15298        {
15299            self.bigquery_export = v.map(|x| x.into());
15300            self
15301        }
15302    }
15303
15304    impl wkt::message::Message for PostScanActions {
15305        fn typename() -> &'static str {
15306            "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec.PostScanActions"
15307        }
15308    }
15309
15310    /// Defines additional types related to [PostScanActions].
15311    pub mod post_scan_actions {
15312        #[allow(unused_imports)]
15313        use super::*;
15314
15315        /// The configuration of BigQuery export post scan action.
15316        #[derive(Clone, Default, PartialEq)]
15317        #[non_exhaustive]
15318        pub struct BigQueryExport {
15319            /// Optional. The BigQuery table to export DataProfileScan results to.
15320            /// Format:
15321            /// //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
15322            pub results_table: std::string::String,
15323
15324            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15325        }
15326
15327        impl BigQueryExport {
15328            pub fn new() -> Self {
15329                std::default::Default::default()
15330            }
15331
15332            /// Sets the value of [results_table][crate::model::data_profile_spec::post_scan_actions::BigQueryExport::results_table].
15333            ///
15334            /// # Example
15335            /// ```ignore,no_run
15336            /// # use google_cloud_dataplex_v1::model::data_profile_spec::post_scan_actions::BigQueryExport;
15337            /// let x = BigQueryExport::new().set_results_table("example");
15338            /// ```
15339            pub fn set_results_table<T: std::convert::Into<std::string::String>>(
15340                mut self,
15341                v: T,
15342            ) -> Self {
15343                self.results_table = v.into();
15344                self
15345            }
15346        }
15347
15348        impl wkt::message::Message for BigQueryExport {
15349            fn typename() -> &'static str {
15350                "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport"
15351            }
15352        }
15353    }
15354
15355    /// The specification for fields to include or exclude in data profile scan.
15356    #[derive(Clone, Default, PartialEq)]
15357    #[non_exhaustive]
15358    pub struct SelectedFields {
15359        /// Optional. Expected input is a list of fully qualified names of fields as
15360        /// in the schema.
15361        ///
15362        /// Only top-level field names for nested fields are supported.
15363        /// For instance, if 'x' is of nested field type, listing 'x' is supported
15364        /// but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
15365        /// 'x'.
15366        pub field_names: std::vec::Vec<std::string::String>,
15367
15368        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15369    }
15370
15371    impl SelectedFields {
15372        pub fn new() -> Self {
15373            std::default::Default::default()
15374        }
15375
15376        /// Sets the value of [field_names][crate::model::data_profile_spec::SelectedFields::field_names].
15377        ///
15378        /// # Example
15379        /// ```ignore,no_run
15380        /// # use google_cloud_dataplex_v1::model::data_profile_spec::SelectedFields;
15381        /// let x = SelectedFields::new().set_field_names(["a", "b", "c"]);
15382        /// ```
15383        pub fn set_field_names<T, V>(mut self, v: T) -> Self
15384        where
15385            T: std::iter::IntoIterator<Item = V>,
15386            V: std::convert::Into<std::string::String>,
15387        {
15388            use std::iter::Iterator;
15389            self.field_names = v.into_iter().map(|i| i.into()).collect();
15390            self
15391        }
15392    }
15393
15394    impl wkt::message::Message for SelectedFields {
15395        fn typename() -> &'static str {
15396            "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec.SelectedFields"
15397        }
15398    }
15399}
15400
15401/// DataProfileResult defines the output of DataProfileScan. Each field of the
15402/// table will have field type specific profile result.
15403#[derive(Clone, Default, PartialEq)]
15404#[non_exhaustive]
15405pub struct DataProfileResult {
15406    /// Output only. The count of rows scanned.
15407    pub row_count: i64,
15408
15409    /// Output only. The profile information per field.
15410    pub profile: std::option::Option<crate::model::data_profile_result::Profile>,
15411
15412    /// Output only. The data scanned for this result.
15413    pub scanned_data: std::option::Option<crate::model::ScannedData>,
15414
15415    /// Output only. The result of post scan actions.
15416    pub post_scan_actions_result:
15417        std::option::Option<crate::model::data_profile_result::PostScanActionsResult>,
15418
15419    /// Output only. The status of publishing the data scan as Dataplex Universal
15420    /// Catalog metadata.
15421    pub catalog_publishing_status:
15422        std::option::Option<crate::model::DataScanCatalogPublishingStatus>,
15423
15424    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15425}
15426
15427impl DataProfileResult {
15428    pub fn new() -> Self {
15429        std::default::Default::default()
15430    }
15431
15432    /// Sets the value of [row_count][crate::model::DataProfileResult::row_count].
15433    ///
15434    /// # Example
15435    /// ```ignore,no_run
15436    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15437    /// let x = DataProfileResult::new().set_row_count(42);
15438    /// ```
15439    pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15440        self.row_count = v.into();
15441        self
15442    }
15443
15444    /// Sets the value of [profile][crate::model::DataProfileResult::profile].
15445    ///
15446    /// # Example
15447    /// ```ignore,no_run
15448    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15449    /// use google_cloud_dataplex_v1::model::data_profile_result::Profile;
15450    /// let x = DataProfileResult::new().set_profile(Profile::default()/* use setters */);
15451    /// ```
15452    pub fn set_profile<T>(mut self, v: T) -> Self
15453    where
15454        T: std::convert::Into<crate::model::data_profile_result::Profile>,
15455    {
15456        self.profile = std::option::Option::Some(v.into());
15457        self
15458    }
15459
15460    /// Sets or clears the value of [profile][crate::model::DataProfileResult::profile].
15461    ///
15462    /// # Example
15463    /// ```ignore,no_run
15464    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15465    /// use google_cloud_dataplex_v1::model::data_profile_result::Profile;
15466    /// let x = DataProfileResult::new().set_or_clear_profile(Some(Profile::default()/* use setters */));
15467    /// let x = DataProfileResult::new().set_or_clear_profile(None::<Profile>);
15468    /// ```
15469    pub fn set_or_clear_profile<T>(mut self, v: std::option::Option<T>) -> Self
15470    where
15471        T: std::convert::Into<crate::model::data_profile_result::Profile>,
15472    {
15473        self.profile = v.map(|x| x.into());
15474        self
15475    }
15476
15477    /// Sets the value of [scanned_data][crate::model::DataProfileResult::scanned_data].
15478    ///
15479    /// # Example
15480    /// ```ignore,no_run
15481    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15482    /// use google_cloud_dataplex_v1::model::ScannedData;
15483    /// let x = DataProfileResult::new().set_scanned_data(ScannedData::default()/* use setters */);
15484    /// ```
15485    pub fn set_scanned_data<T>(mut self, v: T) -> Self
15486    where
15487        T: std::convert::Into<crate::model::ScannedData>,
15488    {
15489        self.scanned_data = std::option::Option::Some(v.into());
15490        self
15491    }
15492
15493    /// Sets or clears the value of [scanned_data][crate::model::DataProfileResult::scanned_data].
15494    ///
15495    /// # Example
15496    /// ```ignore,no_run
15497    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15498    /// use google_cloud_dataplex_v1::model::ScannedData;
15499    /// let x = DataProfileResult::new().set_or_clear_scanned_data(Some(ScannedData::default()/* use setters */));
15500    /// let x = DataProfileResult::new().set_or_clear_scanned_data(None::<ScannedData>);
15501    /// ```
15502    pub fn set_or_clear_scanned_data<T>(mut self, v: std::option::Option<T>) -> Self
15503    where
15504        T: std::convert::Into<crate::model::ScannedData>,
15505    {
15506        self.scanned_data = v.map(|x| x.into());
15507        self
15508    }
15509
15510    /// Sets the value of [post_scan_actions_result][crate::model::DataProfileResult::post_scan_actions_result].
15511    ///
15512    /// # Example
15513    /// ```ignore,no_run
15514    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15515    /// use google_cloud_dataplex_v1::model::data_profile_result::PostScanActionsResult;
15516    /// let x = DataProfileResult::new().set_post_scan_actions_result(PostScanActionsResult::default()/* use setters */);
15517    /// ```
15518    pub fn set_post_scan_actions_result<T>(mut self, v: T) -> Self
15519    where
15520        T: std::convert::Into<crate::model::data_profile_result::PostScanActionsResult>,
15521    {
15522        self.post_scan_actions_result = std::option::Option::Some(v.into());
15523        self
15524    }
15525
15526    /// Sets or clears the value of [post_scan_actions_result][crate::model::DataProfileResult::post_scan_actions_result].
15527    ///
15528    /// # Example
15529    /// ```ignore,no_run
15530    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15531    /// use google_cloud_dataplex_v1::model::data_profile_result::PostScanActionsResult;
15532    /// let x = DataProfileResult::new().set_or_clear_post_scan_actions_result(Some(PostScanActionsResult::default()/* use setters */));
15533    /// let x = DataProfileResult::new().set_or_clear_post_scan_actions_result(None::<PostScanActionsResult>);
15534    /// ```
15535    pub fn set_or_clear_post_scan_actions_result<T>(mut self, v: std::option::Option<T>) -> Self
15536    where
15537        T: std::convert::Into<crate::model::data_profile_result::PostScanActionsResult>,
15538    {
15539        self.post_scan_actions_result = v.map(|x| x.into());
15540        self
15541    }
15542
15543    /// Sets the value of [catalog_publishing_status][crate::model::DataProfileResult::catalog_publishing_status].
15544    ///
15545    /// # Example
15546    /// ```ignore,no_run
15547    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15548    /// use google_cloud_dataplex_v1::model::DataScanCatalogPublishingStatus;
15549    /// let x = DataProfileResult::new().set_catalog_publishing_status(DataScanCatalogPublishingStatus::default()/* use setters */);
15550    /// ```
15551    pub fn set_catalog_publishing_status<T>(mut self, v: T) -> Self
15552    where
15553        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
15554    {
15555        self.catalog_publishing_status = std::option::Option::Some(v.into());
15556        self
15557    }
15558
15559    /// Sets or clears the value of [catalog_publishing_status][crate::model::DataProfileResult::catalog_publishing_status].
15560    ///
15561    /// # Example
15562    /// ```ignore,no_run
15563    /// # use google_cloud_dataplex_v1::model::DataProfileResult;
15564    /// use google_cloud_dataplex_v1::model::DataScanCatalogPublishingStatus;
15565    /// let x = DataProfileResult::new().set_or_clear_catalog_publishing_status(Some(DataScanCatalogPublishingStatus::default()/* use setters */));
15566    /// let x = DataProfileResult::new().set_or_clear_catalog_publishing_status(None::<DataScanCatalogPublishingStatus>);
15567    /// ```
15568    pub fn set_or_clear_catalog_publishing_status<T>(mut self, v: std::option::Option<T>) -> Self
15569    where
15570        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
15571    {
15572        self.catalog_publishing_status = v.map(|x| x.into());
15573        self
15574    }
15575}
15576
15577impl wkt::message::Message for DataProfileResult {
15578    fn typename() -> &'static str {
15579        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult"
15580    }
15581}
15582
15583/// Defines additional types related to [DataProfileResult].
15584pub mod data_profile_result {
15585    #[allow(unused_imports)]
15586    use super::*;
15587
15588    /// Contains name, type, mode and field type specific profile information.
15589    #[derive(Clone, Default, PartialEq)]
15590    #[non_exhaustive]
15591    pub struct Profile {
15592        /// Output only. List of fields with structural and profile information for
15593        /// each field.
15594        pub fields: std::vec::Vec<crate::model::data_profile_result::profile::Field>,
15595
15596        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15597    }
15598
15599    impl Profile {
15600        pub fn new() -> Self {
15601            std::default::Default::default()
15602        }
15603
15604        /// Sets the value of [fields][crate::model::data_profile_result::Profile::fields].
15605        ///
15606        /// # Example
15607        /// ```ignore,no_run
15608        /// # use google_cloud_dataplex_v1::model::data_profile_result::Profile;
15609        /// use google_cloud_dataplex_v1::model::data_profile_result::profile::Field;
15610        /// let x = Profile::new()
15611        ///     .set_fields([
15612        ///         Field::default()/* use setters */,
15613        ///         Field::default()/* use (different) setters */,
15614        ///     ]);
15615        /// ```
15616        pub fn set_fields<T, V>(mut self, v: T) -> Self
15617        where
15618            T: std::iter::IntoIterator<Item = V>,
15619            V: std::convert::Into<crate::model::data_profile_result::profile::Field>,
15620        {
15621            use std::iter::Iterator;
15622            self.fields = v.into_iter().map(|i| i.into()).collect();
15623            self
15624        }
15625    }
15626
15627    impl wkt::message::Message for Profile {
15628        fn typename() -> &'static str {
15629            "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile"
15630        }
15631    }
15632
15633    /// Defines additional types related to [Profile].
15634    pub mod profile {
15635        #[allow(unused_imports)]
15636        use super::*;
15637
15638        /// A field within a table.
15639        #[derive(Clone, Default, PartialEq)]
15640        #[non_exhaustive]
15641        pub struct Field {
15642            /// Output only. The name of the field.
15643            pub name: std::string::String,
15644
15645            /// Output only. The data type retrieved from the schema of the data
15646            /// source. For instance, for a BigQuery native table, it is the [BigQuery
15647            /// Table
15648            /// Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema).
15649            /// For a Dataplex Universal Catalog Entity, it is the [Entity
15650            /// Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3).
15651            pub r#type: std::string::String,
15652
15653            /// Output only. The mode of the field. Possible values include:
15654            ///
15655            /// * REQUIRED, if it is a required field.
15656            /// * NULLABLE, if it is an optional field.
15657            /// * REPEATED, if it is a repeated field.
15658            pub mode: std::string::String,
15659
15660            /// Output only. Profile information for the corresponding field.
15661            pub profile:
15662                std::option::Option<crate::model::data_profile_result::profile::field::ProfileInfo>,
15663
15664            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15665        }
15666
15667        impl Field {
15668            pub fn new() -> Self {
15669                std::default::Default::default()
15670            }
15671
15672            /// Sets the value of [name][crate::model::data_profile_result::profile::Field::name].
15673            ///
15674            /// # Example
15675            /// ```ignore,no_run
15676            /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::Field;
15677            /// let x = Field::new().set_name("example");
15678            /// ```
15679            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15680                self.name = v.into();
15681                self
15682            }
15683
15684            /// Sets the value of [r#type][crate::model::data_profile_result::profile::Field::type].
15685            ///
15686            /// # Example
15687            /// ```ignore,no_run
15688            /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::Field;
15689            /// let x = Field::new().set_type("example");
15690            /// ```
15691            pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15692                self.r#type = v.into();
15693                self
15694            }
15695
15696            /// Sets the value of [mode][crate::model::data_profile_result::profile::Field::mode].
15697            ///
15698            /// # Example
15699            /// ```ignore,no_run
15700            /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::Field;
15701            /// let x = Field::new().set_mode("example");
15702            /// ```
15703            pub fn set_mode<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15704                self.mode = v.into();
15705                self
15706            }
15707
15708            /// Sets the value of [profile][crate::model::data_profile_result::profile::Field::profile].
15709            ///
15710            /// # Example
15711            /// ```ignore,no_run
15712            /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::Field;
15713            /// use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15714            /// let x = Field::new().set_profile(ProfileInfo::default()/* use setters */);
15715            /// ```
15716            pub fn set_profile<T>(mut self, v: T) -> Self
15717            where
15718                T: std::convert::Into<
15719                        crate::model::data_profile_result::profile::field::ProfileInfo,
15720                    >,
15721            {
15722                self.profile = std::option::Option::Some(v.into());
15723                self
15724            }
15725
15726            /// Sets or clears the value of [profile][crate::model::data_profile_result::profile::Field::profile].
15727            ///
15728            /// # Example
15729            /// ```ignore,no_run
15730            /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::Field;
15731            /// use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15732            /// let x = Field::new().set_or_clear_profile(Some(ProfileInfo::default()/* use setters */));
15733            /// let x = Field::new().set_or_clear_profile(None::<ProfileInfo>);
15734            /// ```
15735            pub fn set_or_clear_profile<T>(mut self, v: std::option::Option<T>) -> Self
15736            where
15737                T: std::convert::Into<
15738                        crate::model::data_profile_result::profile::field::ProfileInfo,
15739                    >,
15740            {
15741                self.profile = v.map(|x| x.into());
15742                self
15743            }
15744        }
15745
15746        impl wkt::message::Message for Field {
15747            fn typename() -> &'static str {
15748                "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field"
15749            }
15750        }
15751
15752        /// Defines additional types related to [Field].
15753        pub mod field {
15754            #[allow(unused_imports)]
15755            use super::*;
15756
15757            /// The profile information for each field type.
15758            #[derive(Clone, Default, PartialEq)]
15759            #[non_exhaustive]
15760            pub struct ProfileInfo {
15761                /// Output only. Ratio of rows with null value against total scanned
15762                /// rows.
15763                pub null_ratio: f64,
15764
15765                /// Output only. Ratio of rows with distinct values against total scanned
15766                /// rows. Not available for complex non-groupable field type, including
15767                /// RECORD, ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE
15768                /// mode.
15769                pub distinct_ratio: f64,
15770
15771                /// Output only. The list of top N non-null values, frequency and ratio
15772                /// with which they occur in the scanned data. N is 10 or equal to the
15773                /// number of distinct values in the field, whichever is smaller. Not
15774                /// available for complex non-groupable field type, including RECORD,
15775                /// ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE mode.
15776                pub top_n_values: std::vec::Vec<
15777                    crate::model::data_profile_result::profile::field::profile_info::TopNValue,
15778                >,
15779
15780                /// Structural and profile information for specific field type. Not
15781                /// available, if mode is REPEATABLE.
15782                pub field_info: std::option::Option<
15783                    crate::model::data_profile_result::profile::field::profile_info::FieldInfo,
15784                >,
15785
15786                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15787            }
15788
15789            impl ProfileInfo {
15790                pub fn new() -> Self {
15791                    std::default::Default::default()
15792                }
15793
15794                /// Sets the value of [null_ratio][crate::model::data_profile_result::profile::field::ProfileInfo::null_ratio].
15795                ///
15796                /// # Example
15797                /// ```ignore,no_run
15798                /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15799                /// let x = ProfileInfo::new().set_null_ratio(42.0);
15800                /// ```
15801                pub fn set_null_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
15802                    self.null_ratio = v.into();
15803                    self
15804                }
15805
15806                /// Sets the value of [distinct_ratio][crate::model::data_profile_result::profile::field::ProfileInfo::distinct_ratio].
15807                ///
15808                /// # Example
15809                /// ```ignore,no_run
15810                /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15811                /// let x = ProfileInfo::new().set_distinct_ratio(42.0);
15812                /// ```
15813                pub fn set_distinct_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
15814                    self.distinct_ratio = v.into();
15815                    self
15816                }
15817
15818                /// Sets the value of [top_n_values][crate::model::data_profile_result::profile::field::ProfileInfo::top_n_values].
15819                ///
15820                /// # Example
15821                /// ```ignore,no_run
15822                /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15823                /// use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::TopNValue;
15824                /// let x = ProfileInfo::new()
15825                ///     .set_top_n_values([
15826                ///         TopNValue::default()/* use setters */,
15827                ///         TopNValue::default()/* use (different) setters */,
15828                ///     ]);
15829                /// ```
15830                pub fn set_top_n_values<T, V>(mut self, v: T) -> Self
15831                where
15832                    T: std::iter::IntoIterator<Item = V>,
15833                    V: std::convert::Into<crate::model::data_profile_result::profile::field::profile_info::TopNValue>
15834                {
15835                    use std::iter::Iterator;
15836                    self.top_n_values = v.into_iter().map(|i| i.into()).collect();
15837                    self
15838                }
15839
15840                /// Sets the value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info].
15841                ///
15842                /// Note that all the setters affecting `field_info` are mutually
15843                /// exclusive.
15844                ///
15845                /// # Example
15846                /// ```ignore,no_run
15847                /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15848                /// use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::StringFieldInfo;
15849                /// let x = ProfileInfo::new().set_field_info(Some(
15850                ///     google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::FieldInfo::StringProfile(StringFieldInfo::default().into())));
15851                /// ```
15852                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
15853                {
15854                    self.field_info = v.into();
15855                    self
15856                }
15857
15858                /// The value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
15859                /// if it holds a `StringProfile`, `None` if the field is not set or
15860                /// holds a different branch.
15861                pub fn string_profile(&self) -> std::option::Option<&std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo>>{
15862                    #[allow(unreachable_patterns)]
15863                    self.field_info.as_ref().and_then(|v| match v {
15864                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::StringProfile(v) => std::option::Option::Some(v),
15865                        _ => std::option::Option::None,
15866                    })
15867                }
15868
15869                /// Sets the value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
15870                /// to hold a `StringProfile`.
15871                ///
15872                /// Note that all the setters affecting `field_info` are
15873                /// mutually exclusive.
15874                ///
15875                /// # Example
15876                /// ```ignore,no_run
15877                /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15878                /// use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::StringFieldInfo;
15879                /// let x = ProfileInfo::new().set_string_profile(StringFieldInfo::default()/* use setters */);
15880                /// assert!(x.string_profile().is_some());
15881                /// assert!(x.integer_profile().is_none());
15882                /// assert!(x.double_profile().is_none());
15883                /// ```
15884                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{
15885                    self.field_info = std::option::Option::Some(
15886                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::StringProfile(
15887                            v.into()
15888                        )
15889                    );
15890                    self
15891                }
15892
15893                /// The value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
15894                /// if it holds a `IntegerProfile`, `None` if the field is not set or
15895                /// holds a different branch.
15896                pub fn integer_profile(&self) -> std::option::Option<&std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo>>{
15897                    #[allow(unreachable_patterns)]
15898                    self.field_info.as_ref().and_then(|v| match v {
15899                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::IntegerProfile(v) => std::option::Option::Some(v),
15900                        _ => std::option::Option::None,
15901                    })
15902                }
15903
15904                /// Sets the value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
15905                /// to hold a `IntegerProfile`.
15906                ///
15907                /// Note that all the setters affecting `field_info` are
15908                /// mutually exclusive.
15909                ///
15910                /// # Example
15911                /// ```ignore,no_run
15912                /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15913                /// use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo;
15914                /// let x = ProfileInfo::new().set_integer_profile(IntegerFieldInfo::default()/* use setters */);
15915                /// assert!(x.integer_profile().is_some());
15916                /// assert!(x.string_profile().is_none());
15917                /// assert!(x.double_profile().is_none());
15918                /// ```
15919                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{
15920                    self.field_info = std::option::Option::Some(
15921                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::IntegerProfile(
15922                            v.into()
15923                        )
15924                    );
15925                    self
15926                }
15927
15928                /// The value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
15929                /// if it holds a `DoubleProfile`, `None` if the field is not set or
15930                /// holds a different branch.
15931                pub fn double_profile(&self) -> std::option::Option<&std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo>>{
15932                    #[allow(unreachable_patterns)]
15933                    self.field_info.as_ref().and_then(|v| match v {
15934                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::DoubleProfile(v) => std::option::Option::Some(v),
15935                        _ => std::option::Option::None,
15936                    })
15937                }
15938
15939                /// Sets the value of [field_info][crate::model::data_profile_result::profile::field::ProfileInfo::field_info]
15940                /// to hold a `DoubleProfile`.
15941                ///
15942                /// Note that all the setters affecting `field_info` are
15943                /// mutually exclusive.
15944                ///
15945                /// # Example
15946                /// ```ignore,no_run
15947                /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::ProfileInfo;
15948                /// use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo;
15949                /// let x = ProfileInfo::new().set_double_profile(DoubleFieldInfo::default()/* use setters */);
15950                /// assert!(x.double_profile().is_some());
15951                /// assert!(x.string_profile().is_none());
15952                /// assert!(x.integer_profile().is_none());
15953                /// ```
15954                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{
15955                    self.field_info = std::option::Option::Some(
15956                        crate::model::data_profile_result::profile::field::profile_info::FieldInfo::DoubleProfile(
15957                            v.into()
15958                        )
15959                    );
15960                    self
15961                }
15962            }
15963
15964            impl wkt::message::Message for ProfileInfo {
15965                fn typename() -> &'static str {
15966                    "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo"
15967                }
15968            }
15969
15970            /// Defines additional types related to [ProfileInfo].
15971            pub mod profile_info {
15972                #[allow(unused_imports)]
15973                use super::*;
15974
15975                /// The profile information for a string type field.
15976                #[derive(Clone, Default, PartialEq)]
15977                #[non_exhaustive]
15978                pub struct StringFieldInfo {
15979                    /// Output only. Minimum length of non-null values in the scanned data.
15980                    pub min_length: i64,
15981
15982                    /// Output only. Maximum length of non-null values in the scanned data.
15983                    pub max_length: i64,
15984
15985                    /// Output only. Average length of non-null values in the scanned data.
15986                    pub average_length: f64,
15987
15988                    pub(crate) _unknown_fields:
15989                        serde_json::Map<std::string::String, serde_json::Value>,
15990                }
15991
15992                impl StringFieldInfo {
15993                    pub fn new() -> Self {
15994                        std::default::Default::default()
15995                    }
15996
15997                    /// Sets the value of [min_length][crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo::min_length].
15998                    ///
15999                    /// # Example
16000                    /// ```ignore,no_run
16001                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::StringFieldInfo;
16002                    /// let x = StringFieldInfo::new().set_min_length(42);
16003                    /// ```
16004                    pub fn set_min_length<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16005                        self.min_length = v.into();
16006                        self
16007                    }
16008
16009                    /// Sets the value of [max_length][crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo::max_length].
16010                    ///
16011                    /// # Example
16012                    /// ```ignore,no_run
16013                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::StringFieldInfo;
16014                    /// let x = StringFieldInfo::new().set_max_length(42);
16015                    /// ```
16016                    pub fn set_max_length<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16017                        self.max_length = v.into();
16018                        self
16019                    }
16020
16021                    /// Sets the value of [average_length][crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo::average_length].
16022                    ///
16023                    /// # Example
16024                    /// ```ignore,no_run
16025                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::StringFieldInfo;
16026                    /// let x = StringFieldInfo::new().set_average_length(42.0);
16027                    /// ```
16028                    pub fn set_average_length<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
16029                        self.average_length = v.into();
16030                        self
16031                    }
16032                }
16033
16034                impl wkt::message::Message for StringFieldInfo {
16035                    fn typename() -> &'static str {
16036                        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo"
16037                    }
16038                }
16039
16040                /// The profile information for an integer type field.
16041                #[derive(Clone, Default, PartialEq)]
16042                #[non_exhaustive]
16043                pub struct IntegerFieldInfo {
16044                    /// Output only. Average of non-null values in the scanned data. NaN,
16045                    /// if the field has a NaN.
16046                    pub average: f64,
16047
16048                    /// Output only. Standard deviation of non-null values in the scanned
16049                    /// data. NaN, if the field has a NaN.
16050                    pub standard_deviation: f64,
16051
16052                    /// Output only. Minimum of non-null values in the scanned data. NaN,
16053                    /// if the field has a NaN.
16054                    pub min: i64,
16055
16056                    /// Output only. A quartile divides the number of data points into four
16057                    /// parts, or quarters, of more-or-less equal size. Three main
16058                    /// quartiles used are: The first quartile (Q1) splits off the lowest
16059                    /// 25% of data from the highest 75%. It is also known as the lower or
16060                    /// 25th empirical quartile, as 25% of the data is below this point.
16061                    /// The second quartile (Q2) is the median of a data set. So, 50% of
16062                    /// the data lies below this point. The third quartile (Q3) splits off
16063                    /// the highest 25% of data from the lowest 75%. It is known as the
16064                    /// upper or 75th empirical quartile, as 75% of the data lies below
16065                    /// this point. Here, the quartiles is provided as an ordered list of
16066                    /// approximate quartile values for the scanned data, occurring in
16067                    /// order Q1, median, Q3.
16068                    pub quartiles: std::vec::Vec<i64>,
16069
16070                    /// Output only. Maximum of non-null values in the scanned data. NaN,
16071                    /// if the field has a NaN.
16072                    pub max: i64,
16073
16074                    pub(crate) _unknown_fields:
16075                        serde_json::Map<std::string::String, serde_json::Value>,
16076                }
16077
16078                impl IntegerFieldInfo {
16079                    pub fn new() -> Self {
16080                        std::default::Default::default()
16081                    }
16082
16083                    /// Sets the value of [average][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::average].
16084                    ///
16085                    /// # Example
16086                    /// ```ignore,no_run
16087                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo;
16088                    /// let x = IntegerFieldInfo::new().set_average(42.0);
16089                    /// ```
16090                    pub fn set_average<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
16091                        self.average = v.into();
16092                        self
16093                    }
16094
16095                    /// Sets the value of [standard_deviation][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::standard_deviation].
16096                    ///
16097                    /// # Example
16098                    /// ```ignore,no_run
16099                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo;
16100                    /// let x = IntegerFieldInfo::new().set_standard_deviation(42.0);
16101                    /// ```
16102                    pub fn set_standard_deviation<T: std::convert::Into<f64>>(
16103                        mut self,
16104                        v: T,
16105                    ) -> Self {
16106                        self.standard_deviation = v.into();
16107                        self
16108                    }
16109
16110                    /// Sets the value of [min][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::min].
16111                    ///
16112                    /// # Example
16113                    /// ```ignore,no_run
16114                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo;
16115                    /// let x = IntegerFieldInfo::new().set_min(42);
16116                    /// ```
16117                    pub fn set_min<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16118                        self.min = v.into();
16119                        self
16120                    }
16121
16122                    /// Sets the value of [quartiles][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::quartiles].
16123                    ///
16124                    /// # Example
16125                    /// ```ignore,no_run
16126                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo;
16127                    /// let x = IntegerFieldInfo::new().set_quartiles([1, 2, 3]);
16128                    /// ```
16129                    pub fn set_quartiles<T, V>(mut self, v: T) -> Self
16130                    where
16131                        T: std::iter::IntoIterator<Item = V>,
16132                        V: std::convert::Into<i64>,
16133                    {
16134                        use std::iter::Iterator;
16135                        self.quartiles = v.into_iter().map(|i| i.into()).collect();
16136                        self
16137                    }
16138
16139                    /// Sets the value of [max][crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo::max].
16140                    ///
16141                    /// # Example
16142                    /// ```ignore,no_run
16143                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo;
16144                    /// let x = IntegerFieldInfo::new().set_max(42);
16145                    /// ```
16146                    pub fn set_max<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16147                        self.max = v.into();
16148                        self
16149                    }
16150                }
16151
16152                impl wkt::message::Message for IntegerFieldInfo {
16153                    fn typename() -> &'static str {
16154                        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo"
16155                    }
16156                }
16157
16158                /// The profile information for a double type field.
16159                #[derive(Clone, Default, PartialEq)]
16160                #[non_exhaustive]
16161                pub struct DoubleFieldInfo {
16162                    /// Output only. Average of non-null values in the scanned data. NaN,
16163                    /// if the field has a NaN.
16164                    pub average: f64,
16165
16166                    /// Output only. Standard deviation of non-null values in the scanned
16167                    /// data. NaN, if the field has a NaN.
16168                    pub standard_deviation: f64,
16169
16170                    /// Output only. Minimum of non-null values in the scanned data. NaN,
16171                    /// if the field has a NaN.
16172                    pub min: f64,
16173
16174                    /// Output only. A quartile divides the number of data points into four
16175                    /// parts, or quarters, of more-or-less equal size. Three main
16176                    /// quartiles used are: The first quartile (Q1) splits off the lowest
16177                    /// 25% of data from the highest 75%. It is also known as the lower or
16178                    /// 25th empirical quartile, as 25% of the data is below this point.
16179                    /// The second quartile (Q2) is the median of a data set. So, 50% of
16180                    /// the data lies below this point. The third quartile (Q3) splits off
16181                    /// the highest 25% of data from the lowest 75%. It is known as the
16182                    /// upper or 75th empirical quartile, as 75% of the data lies below
16183                    /// this point. Here, the quartiles is provided as an ordered list of
16184                    /// quartile values for the scanned data, occurring in order Q1,
16185                    /// median, Q3.
16186                    pub quartiles: std::vec::Vec<f64>,
16187
16188                    /// Output only. Maximum of non-null values in the scanned data. NaN,
16189                    /// if the field has a NaN.
16190                    pub max: f64,
16191
16192                    pub(crate) _unknown_fields:
16193                        serde_json::Map<std::string::String, serde_json::Value>,
16194                }
16195
16196                impl DoubleFieldInfo {
16197                    pub fn new() -> Self {
16198                        std::default::Default::default()
16199                    }
16200
16201                    /// Sets the value of [average][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::average].
16202                    ///
16203                    /// # Example
16204                    /// ```ignore,no_run
16205                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo;
16206                    /// let x = DoubleFieldInfo::new().set_average(42.0);
16207                    /// ```
16208                    pub fn set_average<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
16209                        self.average = v.into();
16210                        self
16211                    }
16212
16213                    /// Sets the value of [standard_deviation][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::standard_deviation].
16214                    ///
16215                    /// # Example
16216                    /// ```ignore,no_run
16217                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo;
16218                    /// let x = DoubleFieldInfo::new().set_standard_deviation(42.0);
16219                    /// ```
16220                    pub fn set_standard_deviation<T: std::convert::Into<f64>>(
16221                        mut self,
16222                        v: T,
16223                    ) -> Self {
16224                        self.standard_deviation = v.into();
16225                        self
16226                    }
16227
16228                    /// Sets the value of [min][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::min].
16229                    ///
16230                    /// # Example
16231                    /// ```ignore,no_run
16232                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo;
16233                    /// let x = DoubleFieldInfo::new().set_min(42.0);
16234                    /// ```
16235                    pub fn set_min<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
16236                        self.min = v.into();
16237                        self
16238                    }
16239
16240                    /// Sets the value of [quartiles][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::quartiles].
16241                    ///
16242                    /// # Example
16243                    /// ```ignore,no_run
16244                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo;
16245                    /// let x = DoubleFieldInfo::new().set_quartiles([1.0, 2.0, 3.0]);
16246                    /// ```
16247                    pub fn set_quartiles<T, V>(mut self, v: T) -> Self
16248                    where
16249                        T: std::iter::IntoIterator<Item = V>,
16250                        V: std::convert::Into<f64>,
16251                    {
16252                        use std::iter::Iterator;
16253                        self.quartiles = v.into_iter().map(|i| i.into()).collect();
16254                        self
16255                    }
16256
16257                    /// Sets the value of [max][crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo::max].
16258                    ///
16259                    /// # Example
16260                    /// ```ignore,no_run
16261                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo;
16262                    /// let x = DoubleFieldInfo::new().set_max(42.0);
16263                    /// ```
16264                    pub fn set_max<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
16265                        self.max = v.into();
16266                        self
16267                    }
16268                }
16269
16270                impl wkt::message::Message for DoubleFieldInfo {
16271                    fn typename() -> &'static str {
16272                        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo"
16273                    }
16274                }
16275
16276                /// Top N non-null values in the scanned data.
16277                #[derive(Clone, Default, PartialEq)]
16278                #[non_exhaustive]
16279                pub struct TopNValue {
16280                    /// Output only. String value of a top N non-null value.
16281                    pub value: std::string::String,
16282
16283                    /// Output only. Count of the corresponding value in the scanned data.
16284                    pub count: i64,
16285
16286                    /// Output only. Ratio of the corresponding value in the field against
16287                    /// the total number of rows in the scanned data.
16288                    pub ratio: f64,
16289
16290                    pub(crate) _unknown_fields:
16291                        serde_json::Map<std::string::String, serde_json::Value>,
16292                }
16293
16294                impl TopNValue {
16295                    pub fn new() -> Self {
16296                        std::default::Default::default()
16297                    }
16298
16299                    /// Sets the value of [value][crate::model::data_profile_result::profile::field::profile_info::TopNValue::value].
16300                    ///
16301                    /// # Example
16302                    /// ```ignore,no_run
16303                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::TopNValue;
16304                    /// let x = TopNValue::new().set_value("example");
16305                    /// ```
16306                    pub fn set_value<T: std::convert::Into<std::string::String>>(
16307                        mut self,
16308                        v: T,
16309                    ) -> Self {
16310                        self.value = v.into();
16311                        self
16312                    }
16313
16314                    /// Sets the value of [count][crate::model::data_profile_result::profile::field::profile_info::TopNValue::count].
16315                    ///
16316                    /// # Example
16317                    /// ```ignore,no_run
16318                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::TopNValue;
16319                    /// let x = TopNValue::new().set_count(42);
16320                    /// ```
16321                    pub fn set_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16322                        self.count = v.into();
16323                        self
16324                    }
16325
16326                    /// Sets the value of [ratio][crate::model::data_profile_result::profile::field::profile_info::TopNValue::ratio].
16327                    ///
16328                    /// # Example
16329                    /// ```ignore,no_run
16330                    /// # use google_cloud_dataplex_v1::model::data_profile_result::profile::field::profile_info::TopNValue;
16331                    /// let x = TopNValue::new().set_ratio(42.0);
16332                    /// ```
16333                    pub fn set_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
16334                        self.ratio = v.into();
16335                        self
16336                    }
16337                }
16338
16339                impl wkt::message::Message for TopNValue {
16340                    fn typename() -> &'static str {
16341                        "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue"
16342                    }
16343                }
16344
16345                /// Structural and profile information for specific field type. Not
16346                /// available, if mode is REPEATABLE.
16347                #[derive(Clone, Debug, PartialEq)]
16348                #[non_exhaustive]
16349                pub enum FieldInfo {
16350                    /// String type field information.
16351                    StringProfile(std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo>),
16352                    /// Integer type field information.
16353                    IntegerProfile(std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo>),
16354                    /// Double type field information.
16355                    DoubleProfile(std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo>),
16356                }
16357            }
16358        }
16359    }
16360
16361    /// The result of post scan actions of DataProfileScan job.
16362    #[derive(Clone, Default, PartialEq)]
16363    #[non_exhaustive]
16364    pub struct PostScanActionsResult {
16365        /// Output only. The result of BigQuery export post scan action.
16366        pub bigquery_export_result: std::option::Option<
16367            crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult,
16368        >,
16369
16370        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16371    }
16372
16373    impl PostScanActionsResult {
16374        pub fn new() -> Self {
16375            std::default::Default::default()
16376        }
16377
16378        /// Sets the value of [bigquery_export_result][crate::model::data_profile_result::PostScanActionsResult::bigquery_export_result].
16379        ///
16380        /// # Example
16381        /// ```ignore,no_run
16382        /// # use google_cloud_dataplex_v1::model::data_profile_result::PostScanActionsResult;
16383        /// use google_cloud_dataplex_v1::model::data_profile_result::post_scan_actions_result::BigQueryExportResult;
16384        /// let x = PostScanActionsResult::new().set_bigquery_export_result(BigQueryExportResult::default()/* use setters */);
16385        /// ```
16386        pub fn set_bigquery_export_result<T>(mut self, v: T) -> Self
16387        where T: std::convert::Into<crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult>
16388        {
16389            self.bigquery_export_result = std::option::Option::Some(v.into());
16390            self
16391        }
16392
16393        /// Sets or clears the value of [bigquery_export_result][crate::model::data_profile_result::PostScanActionsResult::bigquery_export_result].
16394        ///
16395        /// # Example
16396        /// ```ignore,no_run
16397        /// # use google_cloud_dataplex_v1::model::data_profile_result::PostScanActionsResult;
16398        /// use google_cloud_dataplex_v1::model::data_profile_result::post_scan_actions_result::BigQueryExportResult;
16399        /// let x = PostScanActionsResult::new().set_or_clear_bigquery_export_result(Some(BigQueryExportResult::default()/* use setters */));
16400        /// let x = PostScanActionsResult::new().set_or_clear_bigquery_export_result(None::<BigQueryExportResult>);
16401        /// ```
16402        pub fn set_or_clear_bigquery_export_result<T>(mut self, v: std::option::Option<T>) -> Self
16403        where T: std::convert::Into<crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult>
16404        {
16405            self.bigquery_export_result = v.map(|x| x.into());
16406            self
16407        }
16408    }
16409
16410    impl wkt::message::Message for PostScanActionsResult {
16411        fn typename() -> &'static str {
16412            "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult"
16413        }
16414    }
16415
16416    /// Defines additional types related to [PostScanActionsResult].
16417    pub mod post_scan_actions_result {
16418        #[allow(unused_imports)]
16419        use super::*;
16420
16421        /// The result of BigQuery export post scan action.
16422        #[derive(Clone, Default, PartialEq)]
16423        #[non_exhaustive]
16424        pub struct BigQueryExportResult {
16425
16426            /// Output only. Execution state for the BigQuery exporting.
16427            pub state: crate::model::data_profile_result::post_scan_actions_result::big_query_export_result::State,
16428
16429            /// Output only. Additional information about the BigQuery exporting.
16430            pub message: std::string::String,
16431
16432            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16433        }
16434
16435        impl BigQueryExportResult {
16436            pub fn new() -> Self {
16437                std::default::Default::default()
16438            }
16439
16440            /// Sets the value of [state][crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult::state].
16441            ///
16442            /// # Example
16443            /// ```ignore,no_run
16444            /// # use google_cloud_dataplex_v1::model::data_profile_result::post_scan_actions_result::BigQueryExportResult;
16445            /// use google_cloud_dataplex_v1::model::data_profile_result::post_scan_actions_result::big_query_export_result::State;
16446            /// let x0 = BigQueryExportResult::new().set_state(State::Succeeded);
16447            /// let x1 = BigQueryExportResult::new().set_state(State::Failed);
16448            /// let x2 = BigQueryExportResult::new().set_state(State::Skipped);
16449            /// ```
16450            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{
16451                self.state = v.into();
16452                self
16453            }
16454
16455            /// Sets the value of [message][crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult::message].
16456            ///
16457            /// # Example
16458            /// ```ignore,no_run
16459            /// # use google_cloud_dataplex_v1::model::data_profile_result::post_scan_actions_result::BigQueryExportResult;
16460            /// let x = BigQueryExportResult::new().set_message("example");
16461            /// ```
16462            pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16463                self.message = v.into();
16464                self
16465            }
16466        }
16467
16468        impl wkt::message::Message for BigQueryExportResult {
16469            fn typename() -> &'static str {
16470                "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult"
16471            }
16472        }
16473
16474        /// Defines additional types related to [BigQueryExportResult].
16475        pub mod big_query_export_result {
16476            #[allow(unused_imports)]
16477            use super::*;
16478
16479            /// Execution state for the exporting.
16480            ///
16481            /// # Working with unknown values
16482            ///
16483            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16484            /// additional enum variants at any time. Adding new variants is not considered
16485            /// a breaking change. Applications should write their code in anticipation of:
16486            ///
16487            /// - New values appearing in future releases of the client library, **and**
16488            /// - New values received dynamically, without application changes.
16489            ///
16490            /// Please consult the [Working with enums] section in the user guide for some
16491            /// guidelines.
16492            ///
16493            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
16494            #[derive(Clone, Debug, PartialEq)]
16495            #[non_exhaustive]
16496            pub enum State {
16497                /// The exporting state is unspecified.
16498                Unspecified,
16499                /// The exporting completed successfully.
16500                Succeeded,
16501                /// The exporting is no longer running due to an error.
16502                Failed,
16503                /// The exporting is skipped due to no valid scan result to export
16504                /// (usually caused by scan failed).
16505                Skipped,
16506                /// If set, the enum was initialized with an unknown value.
16507                ///
16508                /// Applications can examine the value using [State::value] or
16509                /// [State::name].
16510                UnknownValue(state::UnknownValue),
16511            }
16512
16513            #[doc(hidden)]
16514            pub mod state {
16515                #[allow(unused_imports)]
16516                use super::*;
16517                #[derive(Clone, Debug, PartialEq)]
16518                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16519            }
16520
16521            impl State {
16522                /// Gets the enum value.
16523                ///
16524                /// Returns `None` if the enum contains an unknown value deserialized from
16525                /// the string representation of enums.
16526                pub fn value(&self) -> std::option::Option<i32> {
16527                    match self {
16528                        Self::Unspecified => std::option::Option::Some(0),
16529                        Self::Succeeded => std::option::Option::Some(1),
16530                        Self::Failed => std::option::Option::Some(2),
16531                        Self::Skipped => std::option::Option::Some(3),
16532                        Self::UnknownValue(u) => u.0.value(),
16533                    }
16534                }
16535
16536                /// Gets the enum value as a string.
16537                ///
16538                /// Returns `None` if the enum contains an unknown value deserialized from
16539                /// the integer representation of enums.
16540                pub fn name(&self) -> std::option::Option<&str> {
16541                    match self {
16542                        Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
16543                        Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
16544                        Self::Failed => std::option::Option::Some("FAILED"),
16545                        Self::Skipped => std::option::Option::Some("SKIPPED"),
16546                        Self::UnknownValue(u) => u.0.name(),
16547                    }
16548                }
16549            }
16550
16551            impl std::default::Default for State {
16552                fn default() -> Self {
16553                    use std::convert::From;
16554                    Self::from(0)
16555                }
16556            }
16557
16558            impl std::fmt::Display for State {
16559                fn fmt(
16560                    &self,
16561                    f: &mut std::fmt::Formatter<'_>,
16562                ) -> std::result::Result<(), std::fmt::Error> {
16563                    wkt::internal::display_enum(f, self.name(), self.value())
16564                }
16565            }
16566
16567            impl std::convert::From<i32> for State {
16568                fn from(value: i32) -> Self {
16569                    match value {
16570                        0 => Self::Unspecified,
16571                        1 => Self::Succeeded,
16572                        2 => Self::Failed,
16573                        3 => Self::Skipped,
16574                        _ => Self::UnknownValue(state::UnknownValue(
16575                            wkt::internal::UnknownEnumValue::Integer(value),
16576                        )),
16577                    }
16578                }
16579            }
16580
16581            impl std::convert::From<&str> for State {
16582                fn from(value: &str) -> Self {
16583                    use std::string::ToString;
16584                    match value {
16585                        "STATE_UNSPECIFIED" => Self::Unspecified,
16586                        "SUCCEEDED" => Self::Succeeded,
16587                        "FAILED" => Self::Failed,
16588                        "SKIPPED" => Self::Skipped,
16589                        _ => Self::UnknownValue(state::UnknownValue(
16590                            wkt::internal::UnknownEnumValue::String(value.to_string()),
16591                        )),
16592                    }
16593                }
16594            }
16595
16596            impl serde::ser::Serialize for State {
16597                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16598                where
16599                    S: serde::Serializer,
16600                {
16601                    match self {
16602                        Self::Unspecified => serializer.serialize_i32(0),
16603                        Self::Succeeded => serializer.serialize_i32(1),
16604                        Self::Failed => serializer.serialize_i32(2),
16605                        Self::Skipped => serializer.serialize_i32(3),
16606                        Self::UnknownValue(u) => u.0.serialize(serializer),
16607                    }
16608                }
16609            }
16610
16611            impl<'de> serde::de::Deserialize<'de> for State {
16612                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16613                where
16614                    D: serde::Deserializer<'de>,
16615                {
16616                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
16617                        ".google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State"))
16618                }
16619            }
16620        }
16621    }
16622}
16623
16624/// DataQualityScan related setting.
16625#[derive(Clone, Default, PartialEq)]
16626#[non_exhaustive]
16627pub struct DataQualitySpec {
16628    /// Required. The list of rules to evaluate against a data source. At least one
16629    /// rule is required.
16630    pub rules: std::vec::Vec<crate::model::DataQualityRule>,
16631
16632    /// Optional. The percentage of the records to be selected from the dataset for
16633    /// DataScan.
16634    ///
16635    /// * Value can range between 0.0 and 100.0 with up to 3 significant decimal
16636    ///   digits.
16637    /// * Sampling is not applied if `sampling_percent` is not specified, 0 or
16638    ///
16639    pub sampling_percent: f32,
16640
16641    /// Optional. A filter applied to all rows in a single DataScan job.
16642    /// The filter needs to be a valid SQL expression for a [WHERE clause in
16643    /// GoogleSQL
16644    /// syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#where_clause).
16645    ///
16646    /// Example: col1 >= 0 AND col2 < 10
16647    pub row_filter: std::string::String,
16648
16649    /// Optional. Actions to take upon job completion.
16650    pub post_scan_actions: std::option::Option<crate::model::data_quality_spec::PostScanActions>,
16651
16652    /// Optional. If set, the latest DataScan job result will be published as
16653    /// Dataplex Universal Catalog metadata.
16654    pub catalog_publishing_enabled: bool,
16655
16656    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16657}
16658
16659impl DataQualitySpec {
16660    pub fn new() -> Self {
16661        std::default::Default::default()
16662    }
16663
16664    /// Sets the value of [rules][crate::model::DataQualitySpec::rules].
16665    ///
16666    /// # Example
16667    /// ```ignore,no_run
16668    /// # use google_cloud_dataplex_v1::model::DataQualitySpec;
16669    /// use google_cloud_dataplex_v1::model::DataQualityRule;
16670    /// let x = DataQualitySpec::new()
16671    ///     .set_rules([
16672    ///         DataQualityRule::default()/* use setters */,
16673    ///         DataQualityRule::default()/* use (different) setters */,
16674    ///     ]);
16675    /// ```
16676    pub fn set_rules<T, V>(mut self, v: T) -> Self
16677    where
16678        T: std::iter::IntoIterator<Item = V>,
16679        V: std::convert::Into<crate::model::DataQualityRule>,
16680    {
16681        use std::iter::Iterator;
16682        self.rules = v.into_iter().map(|i| i.into()).collect();
16683        self
16684    }
16685
16686    /// Sets the value of [sampling_percent][crate::model::DataQualitySpec::sampling_percent].
16687    ///
16688    /// # Example
16689    /// ```ignore,no_run
16690    /// # use google_cloud_dataplex_v1::model::DataQualitySpec;
16691    /// let x = DataQualitySpec::new().set_sampling_percent(42.0);
16692    /// ```
16693    pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
16694        self.sampling_percent = v.into();
16695        self
16696    }
16697
16698    /// Sets the value of [row_filter][crate::model::DataQualitySpec::row_filter].
16699    ///
16700    /// # Example
16701    /// ```ignore,no_run
16702    /// # use google_cloud_dataplex_v1::model::DataQualitySpec;
16703    /// let x = DataQualitySpec::new().set_row_filter("example");
16704    /// ```
16705    pub fn set_row_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16706        self.row_filter = v.into();
16707        self
16708    }
16709
16710    /// Sets the value of [post_scan_actions][crate::model::DataQualitySpec::post_scan_actions].
16711    ///
16712    /// # Example
16713    /// ```ignore,no_run
16714    /// # use google_cloud_dataplex_v1::model::DataQualitySpec;
16715    /// use google_cloud_dataplex_v1::model::data_quality_spec::PostScanActions;
16716    /// let x = DataQualitySpec::new().set_post_scan_actions(PostScanActions::default()/* use setters */);
16717    /// ```
16718    pub fn set_post_scan_actions<T>(mut self, v: T) -> Self
16719    where
16720        T: std::convert::Into<crate::model::data_quality_spec::PostScanActions>,
16721    {
16722        self.post_scan_actions = std::option::Option::Some(v.into());
16723        self
16724    }
16725
16726    /// Sets or clears the value of [post_scan_actions][crate::model::DataQualitySpec::post_scan_actions].
16727    ///
16728    /// # Example
16729    /// ```ignore,no_run
16730    /// # use google_cloud_dataplex_v1::model::DataQualitySpec;
16731    /// use google_cloud_dataplex_v1::model::data_quality_spec::PostScanActions;
16732    /// let x = DataQualitySpec::new().set_or_clear_post_scan_actions(Some(PostScanActions::default()/* use setters */));
16733    /// let x = DataQualitySpec::new().set_or_clear_post_scan_actions(None::<PostScanActions>);
16734    /// ```
16735    pub fn set_or_clear_post_scan_actions<T>(mut self, v: std::option::Option<T>) -> Self
16736    where
16737        T: std::convert::Into<crate::model::data_quality_spec::PostScanActions>,
16738    {
16739        self.post_scan_actions = v.map(|x| x.into());
16740        self
16741    }
16742
16743    /// Sets the value of [catalog_publishing_enabled][crate::model::DataQualitySpec::catalog_publishing_enabled].
16744    ///
16745    /// # Example
16746    /// ```ignore,no_run
16747    /// # use google_cloud_dataplex_v1::model::DataQualitySpec;
16748    /// let x = DataQualitySpec::new().set_catalog_publishing_enabled(true);
16749    /// ```
16750    pub fn set_catalog_publishing_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16751        self.catalog_publishing_enabled = v.into();
16752        self
16753    }
16754}
16755
16756impl wkt::message::Message for DataQualitySpec {
16757    fn typename() -> &'static str {
16758        "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec"
16759    }
16760}
16761
16762/// Defines additional types related to [DataQualitySpec].
16763pub mod data_quality_spec {
16764    #[allow(unused_imports)]
16765    use super::*;
16766
16767    /// The configuration of post scan actions of DataQualityScan.
16768    #[derive(Clone, Default, PartialEq)]
16769    #[non_exhaustive]
16770    pub struct PostScanActions {
16771        /// Optional. If set, results will be exported to the provided BigQuery
16772        /// table.
16773        pub bigquery_export:
16774            std::option::Option<crate::model::data_quality_spec::post_scan_actions::BigQueryExport>,
16775
16776        /// Optional. If set, results will be sent to the provided notification
16777        /// receipts upon triggers.
16778        pub notification_report: std::option::Option<
16779            crate::model::data_quality_spec::post_scan_actions::NotificationReport,
16780        >,
16781
16782        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16783    }
16784
16785    impl PostScanActions {
16786        pub fn new() -> Self {
16787            std::default::Default::default()
16788        }
16789
16790        /// Sets the value of [bigquery_export][crate::model::data_quality_spec::PostScanActions::bigquery_export].
16791        ///
16792        /// # Example
16793        /// ```ignore,no_run
16794        /// # use google_cloud_dataplex_v1::model::data_quality_spec::PostScanActions;
16795        /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::BigQueryExport;
16796        /// let x = PostScanActions::new().set_bigquery_export(BigQueryExport::default()/* use setters */);
16797        /// ```
16798        pub fn set_bigquery_export<T>(mut self, v: T) -> Self
16799        where
16800            T: std::convert::Into<
16801                    crate::model::data_quality_spec::post_scan_actions::BigQueryExport,
16802                >,
16803        {
16804            self.bigquery_export = std::option::Option::Some(v.into());
16805            self
16806        }
16807
16808        /// Sets or clears the value of [bigquery_export][crate::model::data_quality_spec::PostScanActions::bigquery_export].
16809        ///
16810        /// # Example
16811        /// ```ignore,no_run
16812        /// # use google_cloud_dataplex_v1::model::data_quality_spec::PostScanActions;
16813        /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::BigQueryExport;
16814        /// let x = PostScanActions::new().set_or_clear_bigquery_export(Some(BigQueryExport::default()/* use setters */));
16815        /// let x = PostScanActions::new().set_or_clear_bigquery_export(None::<BigQueryExport>);
16816        /// ```
16817        pub fn set_or_clear_bigquery_export<T>(mut self, v: std::option::Option<T>) -> Self
16818        where
16819            T: std::convert::Into<
16820                    crate::model::data_quality_spec::post_scan_actions::BigQueryExport,
16821                >,
16822        {
16823            self.bigquery_export = v.map(|x| x.into());
16824            self
16825        }
16826
16827        /// Sets the value of [notification_report][crate::model::data_quality_spec::PostScanActions::notification_report].
16828        ///
16829        /// # Example
16830        /// ```ignore,no_run
16831        /// # use google_cloud_dataplex_v1::model::data_quality_spec::PostScanActions;
16832        /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
16833        /// let x = PostScanActions::new().set_notification_report(NotificationReport::default()/* use setters */);
16834        /// ```
16835        pub fn set_notification_report<T>(mut self, v: T) -> Self
16836        where
16837            T: std::convert::Into<
16838                    crate::model::data_quality_spec::post_scan_actions::NotificationReport,
16839                >,
16840        {
16841            self.notification_report = std::option::Option::Some(v.into());
16842            self
16843        }
16844
16845        /// Sets or clears the value of [notification_report][crate::model::data_quality_spec::PostScanActions::notification_report].
16846        ///
16847        /// # Example
16848        /// ```ignore,no_run
16849        /// # use google_cloud_dataplex_v1::model::data_quality_spec::PostScanActions;
16850        /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
16851        /// let x = PostScanActions::new().set_or_clear_notification_report(Some(NotificationReport::default()/* use setters */));
16852        /// let x = PostScanActions::new().set_or_clear_notification_report(None::<NotificationReport>);
16853        /// ```
16854        pub fn set_or_clear_notification_report<T>(mut self, v: std::option::Option<T>) -> Self
16855        where
16856            T: std::convert::Into<
16857                    crate::model::data_quality_spec::post_scan_actions::NotificationReport,
16858                >,
16859        {
16860            self.notification_report = v.map(|x| x.into());
16861            self
16862        }
16863    }
16864
16865    impl wkt::message::Message for PostScanActions {
16866        fn typename() -> &'static str {
16867            "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions"
16868        }
16869    }
16870
16871    /// Defines additional types related to [PostScanActions].
16872    pub mod post_scan_actions {
16873        #[allow(unused_imports)]
16874        use super::*;
16875
16876        /// The configuration of BigQuery export post scan action.
16877        #[derive(Clone, Default, PartialEq)]
16878        #[non_exhaustive]
16879        pub struct BigQueryExport {
16880            /// Optional. The BigQuery table to export DataQualityScan results to.
16881            /// Format:
16882            /// //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
16883            /// or
16884            /// projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
16885            pub results_table: std::string::String,
16886
16887            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16888        }
16889
16890        impl BigQueryExport {
16891            pub fn new() -> Self {
16892                std::default::Default::default()
16893            }
16894
16895            /// Sets the value of [results_table][crate::model::data_quality_spec::post_scan_actions::BigQueryExport::results_table].
16896            ///
16897            /// # Example
16898            /// ```ignore,no_run
16899            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::BigQueryExport;
16900            /// let x = BigQueryExport::new().set_results_table("example");
16901            /// ```
16902            pub fn set_results_table<T: std::convert::Into<std::string::String>>(
16903                mut self,
16904                v: T,
16905            ) -> Self {
16906                self.results_table = v.into();
16907                self
16908            }
16909        }
16910
16911        impl wkt::message::Message for BigQueryExport {
16912            fn typename() -> &'static str {
16913                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport"
16914            }
16915        }
16916
16917        /// The individuals or groups who are designated to receive notifications
16918        /// upon triggers.
16919        #[derive(Clone, Default, PartialEq)]
16920        #[non_exhaustive]
16921        pub struct Recipients {
16922            /// Optional. The email recipients who will receive the DataQualityScan
16923            /// results report.
16924            pub emails: std::vec::Vec<std::string::String>,
16925
16926            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16927        }
16928
16929        impl Recipients {
16930            pub fn new() -> Self {
16931                std::default::Default::default()
16932            }
16933
16934            /// Sets the value of [emails][crate::model::data_quality_spec::post_scan_actions::Recipients::emails].
16935            ///
16936            /// # Example
16937            /// ```ignore,no_run
16938            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::Recipients;
16939            /// let x = Recipients::new().set_emails(["a", "b", "c"]);
16940            /// ```
16941            pub fn set_emails<T, V>(mut self, v: T) -> Self
16942            where
16943                T: std::iter::IntoIterator<Item = V>,
16944                V: std::convert::Into<std::string::String>,
16945            {
16946                use std::iter::Iterator;
16947                self.emails = v.into_iter().map(|i| i.into()).collect();
16948                self
16949            }
16950        }
16951
16952        impl wkt::message::Message for Recipients {
16953            fn typename() -> &'static str {
16954                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients"
16955            }
16956        }
16957
16958        /// This trigger is triggered when the DQ score in the job result is less
16959        /// than a specified input score.
16960        #[derive(Clone, Default, PartialEq)]
16961        #[non_exhaustive]
16962        pub struct ScoreThresholdTrigger {
16963            /// Optional. The score range is in [0,100].
16964            pub score_threshold: f32,
16965
16966            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16967        }
16968
16969        impl ScoreThresholdTrigger {
16970            pub fn new() -> Self {
16971                std::default::Default::default()
16972            }
16973
16974            /// Sets the value of [score_threshold][crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger::score_threshold].
16975            ///
16976            /// # Example
16977            /// ```ignore,no_run
16978            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger;
16979            /// let x = ScoreThresholdTrigger::new().set_score_threshold(42.0);
16980            /// ```
16981            pub fn set_score_threshold<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
16982                self.score_threshold = v.into();
16983                self
16984            }
16985        }
16986
16987        impl wkt::message::Message for ScoreThresholdTrigger {
16988            fn typename() -> &'static str {
16989                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger"
16990            }
16991        }
16992
16993        /// This trigger is triggered when the scan job itself fails, regardless of
16994        /// the result.
16995        #[derive(Clone, Default, PartialEq)]
16996        #[non_exhaustive]
16997        pub struct JobFailureTrigger {
16998            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16999        }
17000
17001        impl JobFailureTrigger {
17002            pub fn new() -> Self {
17003                std::default::Default::default()
17004            }
17005        }
17006
17007        impl wkt::message::Message for JobFailureTrigger {
17008            fn typename() -> &'static str {
17009                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger"
17010            }
17011        }
17012
17013        /// This trigger is triggered whenever a scan job run ends, regardless
17014        /// of the result.
17015        #[derive(Clone, Default, PartialEq)]
17016        #[non_exhaustive]
17017        pub struct JobEndTrigger {
17018            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17019        }
17020
17021        impl JobEndTrigger {
17022            pub fn new() -> Self {
17023                std::default::Default::default()
17024            }
17025        }
17026
17027        impl wkt::message::Message for JobEndTrigger {
17028            fn typename() -> &'static str {
17029                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger"
17030            }
17031        }
17032
17033        /// The configuration of notification report post scan action.
17034        #[derive(Clone, Default, PartialEq)]
17035        #[non_exhaustive]
17036        pub struct NotificationReport {
17037            /// Required. The recipients who will receive the notification report.
17038            pub recipients:
17039                std::option::Option<crate::model::data_quality_spec::post_scan_actions::Recipients>,
17040
17041            /// Optional. If set, report will be sent when score threshold is met.
17042            pub score_threshold_trigger: std::option::Option<
17043                crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger,
17044            >,
17045
17046            /// Optional. If set, report will be sent when a scan job fails.
17047            pub job_failure_trigger: std::option::Option<
17048                crate::model::data_quality_spec::post_scan_actions::JobFailureTrigger,
17049            >,
17050
17051            /// Optional. If set, report will be sent when a scan job ends.
17052            pub job_end_trigger: std::option::Option<
17053                crate::model::data_quality_spec::post_scan_actions::JobEndTrigger,
17054            >,
17055
17056            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17057        }
17058
17059        impl NotificationReport {
17060            pub fn new() -> Self {
17061                std::default::Default::default()
17062            }
17063
17064            /// Sets the value of [recipients][crate::model::data_quality_spec::post_scan_actions::NotificationReport::recipients].
17065            ///
17066            /// # Example
17067            /// ```ignore,no_run
17068            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17069            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::Recipients;
17070            /// let x = NotificationReport::new().set_recipients(Recipients::default()/* use setters */);
17071            /// ```
17072            pub fn set_recipients<T>(mut self, v: T) -> Self
17073            where
17074                T: std::convert::Into<
17075                        crate::model::data_quality_spec::post_scan_actions::Recipients,
17076                    >,
17077            {
17078                self.recipients = std::option::Option::Some(v.into());
17079                self
17080            }
17081
17082            /// Sets or clears the value of [recipients][crate::model::data_quality_spec::post_scan_actions::NotificationReport::recipients].
17083            ///
17084            /// # Example
17085            /// ```ignore,no_run
17086            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17087            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::Recipients;
17088            /// let x = NotificationReport::new().set_or_clear_recipients(Some(Recipients::default()/* use setters */));
17089            /// let x = NotificationReport::new().set_or_clear_recipients(None::<Recipients>);
17090            /// ```
17091            pub fn set_or_clear_recipients<T>(mut self, v: std::option::Option<T>) -> Self
17092            where
17093                T: std::convert::Into<
17094                        crate::model::data_quality_spec::post_scan_actions::Recipients,
17095                    >,
17096            {
17097                self.recipients = v.map(|x| x.into());
17098                self
17099            }
17100
17101            /// Sets the value of [score_threshold_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::score_threshold_trigger].
17102            ///
17103            /// # Example
17104            /// ```ignore,no_run
17105            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17106            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger;
17107            /// let x = NotificationReport::new().set_score_threshold_trigger(ScoreThresholdTrigger::default()/* use setters */);
17108            /// ```
17109            pub fn set_score_threshold_trigger<T>(mut self, v: T) -> Self
17110            where
17111                T: std::convert::Into<
17112                        crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger,
17113                    >,
17114            {
17115                self.score_threshold_trigger = std::option::Option::Some(v.into());
17116                self
17117            }
17118
17119            /// Sets or clears the value of [score_threshold_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::score_threshold_trigger].
17120            ///
17121            /// # Example
17122            /// ```ignore,no_run
17123            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17124            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger;
17125            /// let x = NotificationReport::new().set_or_clear_score_threshold_trigger(Some(ScoreThresholdTrigger::default()/* use setters */));
17126            /// let x = NotificationReport::new().set_or_clear_score_threshold_trigger(None::<ScoreThresholdTrigger>);
17127            /// ```
17128            pub fn set_or_clear_score_threshold_trigger<T>(
17129                mut self,
17130                v: std::option::Option<T>,
17131            ) -> Self
17132            where
17133                T: std::convert::Into<
17134                        crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger,
17135                    >,
17136            {
17137                self.score_threshold_trigger = v.map(|x| x.into());
17138                self
17139            }
17140
17141            /// Sets the value of [job_failure_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::job_failure_trigger].
17142            ///
17143            /// # Example
17144            /// ```ignore,no_run
17145            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17146            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::JobFailureTrigger;
17147            /// let x = NotificationReport::new().set_job_failure_trigger(JobFailureTrigger::default()/* use setters */);
17148            /// ```
17149            pub fn set_job_failure_trigger<T>(mut self, v: T) -> Self
17150            where
17151                T: std::convert::Into<
17152                        crate::model::data_quality_spec::post_scan_actions::JobFailureTrigger,
17153                    >,
17154            {
17155                self.job_failure_trigger = std::option::Option::Some(v.into());
17156                self
17157            }
17158
17159            /// Sets or clears the value of [job_failure_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::job_failure_trigger].
17160            ///
17161            /// # Example
17162            /// ```ignore,no_run
17163            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17164            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::JobFailureTrigger;
17165            /// let x = NotificationReport::new().set_or_clear_job_failure_trigger(Some(JobFailureTrigger::default()/* use setters */));
17166            /// let x = NotificationReport::new().set_or_clear_job_failure_trigger(None::<JobFailureTrigger>);
17167            /// ```
17168            pub fn set_or_clear_job_failure_trigger<T>(mut self, v: std::option::Option<T>) -> Self
17169            where
17170                T: std::convert::Into<
17171                        crate::model::data_quality_spec::post_scan_actions::JobFailureTrigger,
17172                    >,
17173            {
17174                self.job_failure_trigger = v.map(|x| x.into());
17175                self
17176            }
17177
17178            /// Sets the value of [job_end_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::job_end_trigger].
17179            ///
17180            /// # Example
17181            /// ```ignore,no_run
17182            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17183            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::JobEndTrigger;
17184            /// let x = NotificationReport::new().set_job_end_trigger(JobEndTrigger::default()/* use setters */);
17185            /// ```
17186            pub fn set_job_end_trigger<T>(mut self, v: T) -> Self
17187            where
17188                T: std::convert::Into<
17189                        crate::model::data_quality_spec::post_scan_actions::JobEndTrigger,
17190                    >,
17191            {
17192                self.job_end_trigger = std::option::Option::Some(v.into());
17193                self
17194            }
17195
17196            /// Sets or clears the value of [job_end_trigger][crate::model::data_quality_spec::post_scan_actions::NotificationReport::job_end_trigger].
17197            ///
17198            /// # Example
17199            /// ```ignore,no_run
17200            /// # use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::NotificationReport;
17201            /// use google_cloud_dataplex_v1::model::data_quality_spec::post_scan_actions::JobEndTrigger;
17202            /// let x = NotificationReport::new().set_or_clear_job_end_trigger(Some(JobEndTrigger::default()/* use setters */));
17203            /// let x = NotificationReport::new().set_or_clear_job_end_trigger(None::<JobEndTrigger>);
17204            /// ```
17205            pub fn set_or_clear_job_end_trigger<T>(mut self, v: std::option::Option<T>) -> Self
17206            where
17207                T: std::convert::Into<
17208                        crate::model::data_quality_spec::post_scan_actions::JobEndTrigger,
17209                    >,
17210            {
17211                self.job_end_trigger = v.map(|x| x.into());
17212                self
17213            }
17214        }
17215
17216        impl wkt::message::Message for NotificationReport {
17217            fn typename() -> &'static str {
17218                "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport"
17219            }
17220        }
17221    }
17222}
17223
17224/// The output of a DataQualityScan.
17225#[derive(Clone, Default, PartialEq)]
17226#[non_exhaustive]
17227pub struct DataQualityResult {
17228    /// Output only. Overall data quality result -- `true` if all rules passed.
17229    pub passed: bool,
17230
17231    /// Output only. The overall data quality score.
17232    ///
17233    /// The score ranges between [0, 100] (up to two decimal points).
17234    pub score: std::option::Option<f32>,
17235
17236    /// Output only. A list of results at the dimension level.
17237    ///
17238    /// A dimension will have a corresponding `DataQualityDimensionResult` if and
17239    /// only if there is at least one rule with the 'dimension' field set to it.
17240    pub dimensions: std::vec::Vec<crate::model::DataQualityDimensionResult>,
17241
17242    /// Output only. A list of results at the column level.
17243    ///
17244    /// A column will have a corresponding `DataQualityColumnResult` if and only if
17245    /// there is at least one rule with the 'column' field set to it.
17246    pub columns: std::vec::Vec<crate::model::DataQualityColumnResult>,
17247
17248    /// Output only. A list of all the rules in a job, and their results.
17249    pub rules: std::vec::Vec<crate::model::DataQualityRuleResult>,
17250
17251    /// Output only. The count of rows processed.
17252    pub row_count: i64,
17253
17254    /// Output only. The data scanned for this result.
17255    pub scanned_data: std::option::Option<crate::model::ScannedData>,
17256
17257    /// Output only. The result of post scan actions.
17258    pub post_scan_actions_result:
17259        std::option::Option<crate::model::data_quality_result::PostScanActionsResult>,
17260
17261    /// Output only. The status of publishing the data scan as Dataplex Universal
17262    /// Catalog metadata.
17263    pub catalog_publishing_status:
17264        std::option::Option<crate::model::DataScanCatalogPublishingStatus>,
17265
17266    /// Output only. The generated assets for anomaly detection.
17267    pub anomaly_detection_generated_assets:
17268        std::option::Option<crate::model::data_quality_result::AnomalyDetectionGeneratedAssets>,
17269
17270    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17271}
17272
17273impl DataQualityResult {
17274    pub fn new() -> Self {
17275        std::default::Default::default()
17276    }
17277
17278    /// Sets the value of [passed][crate::model::DataQualityResult::passed].
17279    ///
17280    /// # Example
17281    /// ```ignore,no_run
17282    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17283    /// let x = DataQualityResult::new().set_passed(true);
17284    /// ```
17285    pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17286        self.passed = v.into();
17287        self
17288    }
17289
17290    /// Sets the value of [score][crate::model::DataQualityResult::score].
17291    ///
17292    /// # Example
17293    /// ```ignore,no_run
17294    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17295    /// let x = DataQualityResult::new().set_score(42.0);
17296    /// ```
17297    pub fn set_score<T>(mut self, v: T) -> Self
17298    where
17299        T: std::convert::Into<f32>,
17300    {
17301        self.score = std::option::Option::Some(v.into());
17302        self
17303    }
17304
17305    /// Sets or clears the value of [score][crate::model::DataQualityResult::score].
17306    ///
17307    /// # Example
17308    /// ```ignore,no_run
17309    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17310    /// let x = DataQualityResult::new().set_or_clear_score(Some(42.0));
17311    /// let x = DataQualityResult::new().set_or_clear_score(None::<f32>);
17312    /// ```
17313    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
17314    where
17315        T: std::convert::Into<f32>,
17316    {
17317        self.score = v.map(|x| x.into());
17318        self
17319    }
17320
17321    /// Sets the value of [dimensions][crate::model::DataQualityResult::dimensions].
17322    ///
17323    /// # Example
17324    /// ```ignore,no_run
17325    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17326    /// use google_cloud_dataplex_v1::model::DataQualityDimensionResult;
17327    /// let x = DataQualityResult::new()
17328    ///     .set_dimensions([
17329    ///         DataQualityDimensionResult::default()/* use setters */,
17330    ///         DataQualityDimensionResult::default()/* use (different) setters */,
17331    ///     ]);
17332    /// ```
17333    pub fn set_dimensions<T, V>(mut self, v: T) -> Self
17334    where
17335        T: std::iter::IntoIterator<Item = V>,
17336        V: std::convert::Into<crate::model::DataQualityDimensionResult>,
17337    {
17338        use std::iter::Iterator;
17339        self.dimensions = v.into_iter().map(|i| i.into()).collect();
17340        self
17341    }
17342
17343    /// Sets the value of [columns][crate::model::DataQualityResult::columns].
17344    ///
17345    /// # Example
17346    /// ```ignore,no_run
17347    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17348    /// use google_cloud_dataplex_v1::model::DataQualityColumnResult;
17349    /// let x = DataQualityResult::new()
17350    ///     .set_columns([
17351    ///         DataQualityColumnResult::default()/* use setters */,
17352    ///         DataQualityColumnResult::default()/* use (different) setters */,
17353    ///     ]);
17354    /// ```
17355    pub fn set_columns<T, V>(mut self, v: T) -> Self
17356    where
17357        T: std::iter::IntoIterator<Item = V>,
17358        V: std::convert::Into<crate::model::DataQualityColumnResult>,
17359    {
17360        use std::iter::Iterator;
17361        self.columns = v.into_iter().map(|i| i.into()).collect();
17362        self
17363    }
17364
17365    /// Sets the value of [rules][crate::model::DataQualityResult::rules].
17366    ///
17367    /// # Example
17368    /// ```ignore,no_run
17369    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17370    /// use google_cloud_dataplex_v1::model::DataQualityRuleResult;
17371    /// let x = DataQualityResult::new()
17372    ///     .set_rules([
17373    ///         DataQualityRuleResult::default()/* use setters */,
17374    ///         DataQualityRuleResult::default()/* use (different) setters */,
17375    ///     ]);
17376    /// ```
17377    pub fn set_rules<T, V>(mut self, v: T) -> Self
17378    where
17379        T: std::iter::IntoIterator<Item = V>,
17380        V: std::convert::Into<crate::model::DataQualityRuleResult>,
17381    {
17382        use std::iter::Iterator;
17383        self.rules = v.into_iter().map(|i| i.into()).collect();
17384        self
17385    }
17386
17387    /// Sets the value of [row_count][crate::model::DataQualityResult::row_count].
17388    ///
17389    /// # Example
17390    /// ```ignore,no_run
17391    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17392    /// let x = DataQualityResult::new().set_row_count(42);
17393    /// ```
17394    pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
17395        self.row_count = v.into();
17396        self
17397    }
17398
17399    /// Sets the value of [scanned_data][crate::model::DataQualityResult::scanned_data].
17400    ///
17401    /// # Example
17402    /// ```ignore,no_run
17403    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17404    /// use google_cloud_dataplex_v1::model::ScannedData;
17405    /// let x = DataQualityResult::new().set_scanned_data(ScannedData::default()/* use setters */);
17406    /// ```
17407    pub fn set_scanned_data<T>(mut self, v: T) -> Self
17408    where
17409        T: std::convert::Into<crate::model::ScannedData>,
17410    {
17411        self.scanned_data = std::option::Option::Some(v.into());
17412        self
17413    }
17414
17415    /// Sets or clears the value of [scanned_data][crate::model::DataQualityResult::scanned_data].
17416    ///
17417    /// # Example
17418    /// ```ignore,no_run
17419    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17420    /// use google_cloud_dataplex_v1::model::ScannedData;
17421    /// let x = DataQualityResult::new().set_or_clear_scanned_data(Some(ScannedData::default()/* use setters */));
17422    /// let x = DataQualityResult::new().set_or_clear_scanned_data(None::<ScannedData>);
17423    /// ```
17424    pub fn set_or_clear_scanned_data<T>(mut self, v: std::option::Option<T>) -> Self
17425    where
17426        T: std::convert::Into<crate::model::ScannedData>,
17427    {
17428        self.scanned_data = v.map(|x| x.into());
17429        self
17430    }
17431
17432    /// Sets the value of [post_scan_actions_result][crate::model::DataQualityResult::post_scan_actions_result].
17433    ///
17434    /// # Example
17435    /// ```ignore,no_run
17436    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17437    /// use google_cloud_dataplex_v1::model::data_quality_result::PostScanActionsResult;
17438    /// let x = DataQualityResult::new().set_post_scan_actions_result(PostScanActionsResult::default()/* use setters */);
17439    /// ```
17440    pub fn set_post_scan_actions_result<T>(mut self, v: T) -> Self
17441    where
17442        T: std::convert::Into<crate::model::data_quality_result::PostScanActionsResult>,
17443    {
17444        self.post_scan_actions_result = std::option::Option::Some(v.into());
17445        self
17446    }
17447
17448    /// Sets or clears the value of [post_scan_actions_result][crate::model::DataQualityResult::post_scan_actions_result].
17449    ///
17450    /// # Example
17451    /// ```ignore,no_run
17452    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17453    /// use google_cloud_dataplex_v1::model::data_quality_result::PostScanActionsResult;
17454    /// let x = DataQualityResult::new().set_or_clear_post_scan_actions_result(Some(PostScanActionsResult::default()/* use setters */));
17455    /// let x = DataQualityResult::new().set_or_clear_post_scan_actions_result(None::<PostScanActionsResult>);
17456    /// ```
17457    pub fn set_or_clear_post_scan_actions_result<T>(mut self, v: std::option::Option<T>) -> Self
17458    where
17459        T: std::convert::Into<crate::model::data_quality_result::PostScanActionsResult>,
17460    {
17461        self.post_scan_actions_result = v.map(|x| x.into());
17462        self
17463    }
17464
17465    /// Sets the value of [catalog_publishing_status][crate::model::DataQualityResult::catalog_publishing_status].
17466    ///
17467    /// # Example
17468    /// ```ignore,no_run
17469    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17470    /// use google_cloud_dataplex_v1::model::DataScanCatalogPublishingStatus;
17471    /// let x = DataQualityResult::new().set_catalog_publishing_status(DataScanCatalogPublishingStatus::default()/* use setters */);
17472    /// ```
17473    pub fn set_catalog_publishing_status<T>(mut self, v: T) -> Self
17474    where
17475        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
17476    {
17477        self.catalog_publishing_status = std::option::Option::Some(v.into());
17478        self
17479    }
17480
17481    /// Sets or clears the value of [catalog_publishing_status][crate::model::DataQualityResult::catalog_publishing_status].
17482    ///
17483    /// # Example
17484    /// ```ignore,no_run
17485    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17486    /// use google_cloud_dataplex_v1::model::DataScanCatalogPublishingStatus;
17487    /// let x = DataQualityResult::new().set_or_clear_catalog_publishing_status(Some(DataScanCatalogPublishingStatus::default()/* use setters */));
17488    /// let x = DataQualityResult::new().set_or_clear_catalog_publishing_status(None::<DataScanCatalogPublishingStatus>);
17489    /// ```
17490    pub fn set_or_clear_catalog_publishing_status<T>(mut self, v: std::option::Option<T>) -> Self
17491    where
17492        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
17493    {
17494        self.catalog_publishing_status = v.map(|x| x.into());
17495        self
17496    }
17497
17498    /// Sets the value of [anomaly_detection_generated_assets][crate::model::DataQualityResult::anomaly_detection_generated_assets].
17499    ///
17500    /// # Example
17501    /// ```ignore,no_run
17502    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17503    /// use google_cloud_dataplex_v1::model::data_quality_result::AnomalyDetectionGeneratedAssets;
17504    /// let x = DataQualityResult::new().set_anomaly_detection_generated_assets(AnomalyDetectionGeneratedAssets::default()/* use setters */);
17505    /// ```
17506    pub fn set_anomaly_detection_generated_assets<T>(mut self, v: T) -> Self
17507    where
17508        T: std::convert::Into<crate::model::data_quality_result::AnomalyDetectionGeneratedAssets>,
17509    {
17510        self.anomaly_detection_generated_assets = std::option::Option::Some(v.into());
17511        self
17512    }
17513
17514    /// Sets or clears the value of [anomaly_detection_generated_assets][crate::model::DataQualityResult::anomaly_detection_generated_assets].
17515    ///
17516    /// # Example
17517    /// ```ignore,no_run
17518    /// # use google_cloud_dataplex_v1::model::DataQualityResult;
17519    /// use google_cloud_dataplex_v1::model::data_quality_result::AnomalyDetectionGeneratedAssets;
17520    /// let x = DataQualityResult::new().set_or_clear_anomaly_detection_generated_assets(Some(AnomalyDetectionGeneratedAssets::default()/* use setters */));
17521    /// let x = DataQualityResult::new().set_or_clear_anomaly_detection_generated_assets(None::<AnomalyDetectionGeneratedAssets>);
17522    /// ```
17523    pub fn set_or_clear_anomaly_detection_generated_assets<T>(
17524        mut self,
17525        v: std::option::Option<T>,
17526    ) -> Self
17527    where
17528        T: std::convert::Into<crate::model::data_quality_result::AnomalyDetectionGeneratedAssets>,
17529    {
17530        self.anomaly_detection_generated_assets = v.map(|x| x.into());
17531        self
17532    }
17533}
17534
17535impl wkt::message::Message for DataQualityResult {
17536    fn typename() -> &'static str {
17537        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult"
17538    }
17539}
17540
17541/// Defines additional types related to [DataQualityResult].
17542pub mod data_quality_result {
17543    #[allow(unused_imports)]
17544    use super::*;
17545
17546    /// The result of post scan actions of DataQualityScan job.
17547    #[derive(Clone, Default, PartialEq)]
17548    #[non_exhaustive]
17549    pub struct PostScanActionsResult {
17550        /// Output only. The result of BigQuery export post scan action.
17551        pub bigquery_export_result: std::option::Option<
17552            crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult,
17553        >,
17554
17555        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17556    }
17557
17558    impl PostScanActionsResult {
17559        pub fn new() -> Self {
17560            std::default::Default::default()
17561        }
17562
17563        /// Sets the value of [bigquery_export_result][crate::model::data_quality_result::PostScanActionsResult::bigquery_export_result].
17564        ///
17565        /// # Example
17566        /// ```ignore,no_run
17567        /// # use google_cloud_dataplex_v1::model::data_quality_result::PostScanActionsResult;
17568        /// use google_cloud_dataplex_v1::model::data_quality_result::post_scan_actions_result::BigQueryExportResult;
17569        /// let x = PostScanActionsResult::new().set_bigquery_export_result(BigQueryExportResult::default()/* use setters */);
17570        /// ```
17571        pub fn set_bigquery_export_result<T>(mut self, v: T) -> Self
17572        where T: std::convert::Into<crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult>
17573        {
17574            self.bigquery_export_result = std::option::Option::Some(v.into());
17575            self
17576        }
17577
17578        /// Sets or clears the value of [bigquery_export_result][crate::model::data_quality_result::PostScanActionsResult::bigquery_export_result].
17579        ///
17580        /// # Example
17581        /// ```ignore,no_run
17582        /// # use google_cloud_dataplex_v1::model::data_quality_result::PostScanActionsResult;
17583        /// use google_cloud_dataplex_v1::model::data_quality_result::post_scan_actions_result::BigQueryExportResult;
17584        /// let x = PostScanActionsResult::new().set_or_clear_bigquery_export_result(Some(BigQueryExportResult::default()/* use setters */));
17585        /// let x = PostScanActionsResult::new().set_or_clear_bigquery_export_result(None::<BigQueryExportResult>);
17586        /// ```
17587        pub fn set_or_clear_bigquery_export_result<T>(mut self, v: std::option::Option<T>) -> Self
17588        where T: std::convert::Into<crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult>
17589        {
17590            self.bigquery_export_result = v.map(|x| x.into());
17591            self
17592        }
17593    }
17594
17595    impl wkt::message::Message for PostScanActionsResult {
17596        fn typename() -> &'static str {
17597            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult"
17598        }
17599    }
17600
17601    /// Defines additional types related to [PostScanActionsResult].
17602    pub mod post_scan_actions_result {
17603        #[allow(unused_imports)]
17604        use super::*;
17605
17606        /// The result of BigQuery export post scan action.
17607        #[derive(Clone, Default, PartialEq)]
17608        #[non_exhaustive]
17609        pub struct BigQueryExportResult {
17610
17611            /// Output only. Execution state for the BigQuery exporting.
17612            pub state: crate::model::data_quality_result::post_scan_actions_result::big_query_export_result::State,
17613
17614            /// Output only. Additional information about the BigQuery exporting.
17615            pub message: std::string::String,
17616
17617            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17618        }
17619
17620        impl BigQueryExportResult {
17621            pub fn new() -> Self {
17622                std::default::Default::default()
17623            }
17624
17625            /// Sets the value of [state][crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult::state].
17626            ///
17627            /// # Example
17628            /// ```ignore,no_run
17629            /// # use google_cloud_dataplex_v1::model::data_quality_result::post_scan_actions_result::BigQueryExportResult;
17630            /// use google_cloud_dataplex_v1::model::data_quality_result::post_scan_actions_result::big_query_export_result::State;
17631            /// let x0 = BigQueryExportResult::new().set_state(State::Succeeded);
17632            /// let x1 = BigQueryExportResult::new().set_state(State::Failed);
17633            /// let x2 = BigQueryExportResult::new().set_state(State::Skipped);
17634            /// ```
17635            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{
17636                self.state = v.into();
17637                self
17638            }
17639
17640            /// Sets the value of [message][crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult::message].
17641            ///
17642            /// # Example
17643            /// ```ignore,no_run
17644            /// # use google_cloud_dataplex_v1::model::data_quality_result::post_scan_actions_result::BigQueryExportResult;
17645            /// let x = BigQueryExportResult::new().set_message("example");
17646            /// ```
17647            pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17648                self.message = v.into();
17649                self
17650            }
17651        }
17652
17653        impl wkt::message::Message for BigQueryExportResult {
17654            fn typename() -> &'static str {
17655                "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult"
17656            }
17657        }
17658
17659        /// Defines additional types related to [BigQueryExportResult].
17660        pub mod big_query_export_result {
17661            #[allow(unused_imports)]
17662            use super::*;
17663
17664            /// Execution state for the exporting.
17665            ///
17666            /// # Working with unknown values
17667            ///
17668            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17669            /// additional enum variants at any time. Adding new variants is not considered
17670            /// a breaking change. Applications should write their code in anticipation of:
17671            ///
17672            /// - New values appearing in future releases of the client library, **and**
17673            /// - New values received dynamically, without application changes.
17674            ///
17675            /// Please consult the [Working with enums] section in the user guide for some
17676            /// guidelines.
17677            ///
17678            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
17679            #[derive(Clone, Debug, PartialEq)]
17680            #[non_exhaustive]
17681            pub enum State {
17682                /// The exporting state is unspecified.
17683                Unspecified,
17684                /// The exporting completed successfully.
17685                Succeeded,
17686                /// The exporting is no longer running due to an error.
17687                Failed,
17688                /// The exporting is skipped due to no valid scan result to export
17689                /// (usually caused by scan failed).
17690                Skipped,
17691                /// If set, the enum was initialized with an unknown value.
17692                ///
17693                /// Applications can examine the value using [State::value] or
17694                /// [State::name].
17695                UnknownValue(state::UnknownValue),
17696            }
17697
17698            #[doc(hidden)]
17699            pub mod state {
17700                #[allow(unused_imports)]
17701                use super::*;
17702                #[derive(Clone, Debug, PartialEq)]
17703                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17704            }
17705
17706            impl State {
17707                /// Gets the enum value.
17708                ///
17709                /// Returns `None` if the enum contains an unknown value deserialized from
17710                /// the string representation of enums.
17711                pub fn value(&self) -> std::option::Option<i32> {
17712                    match self {
17713                        Self::Unspecified => std::option::Option::Some(0),
17714                        Self::Succeeded => std::option::Option::Some(1),
17715                        Self::Failed => std::option::Option::Some(2),
17716                        Self::Skipped => std::option::Option::Some(3),
17717                        Self::UnknownValue(u) => u.0.value(),
17718                    }
17719                }
17720
17721                /// Gets the enum value as a string.
17722                ///
17723                /// Returns `None` if the enum contains an unknown value deserialized from
17724                /// the integer representation of enums.
17725                pub fn name(&self) -> std::option::Option<&str> {
17726                    match self {
17727                        Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
17728                        Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
17729                        Self::Failed => std::option::Option::Some("FAILED"),
17730                        Self::Skipped => std::option::Option::Some("SKIPPED"),
17731                        Self::UnknownValue(u) => u.0.name(),
17732                    }
17733                }
17734            }
17735
17736            impl std::default::Default for State {
17737                fn default() -> Self {
17738                    use std::convert::From;
17739                    Self::from(0)
17740                }
17741            }
17742
17743            impl std::fmt::Display for State {
17744                fn fmt(
17745                    &self,
17746                    f: &mut std::fmt::Formatter<'_>,
17747                ) -> std::result::Result<(), std::fmt::Error> {
17748                    wkt::internal::display_enum(f, self.name(), self.value())
17749                }
17750            }
17751
17752            impl std::convert::From<i32> for State {
17753                fn from(value: i32) -> Self {
17754                    match value {
17755                        0 => Self::Unspecified,
17756                        1 => Self::Succeeded,
17757                        2 => Self::Failed,
17758                        3 => Self::Skipped,
17759                        _ => Self::UnknownValue(state::UnknownValue(
17760                            wkt::internal::UnknownEnumValue::Integer(value),
17761                        )),
17762                    }
17763                }
17764            }
17765
17766            impl std::convert::From<&str> for State {
17767                fn from(value: &str) -> Self {
17768                    use std::string::ToString;
17769                    match value {
17770                        "STATE_UNSPECIFIED" => Self::Unspecified,
17771                        "SUCCEEDED" => Self::Succeeded,
17772                        "FAILED" => Self::Failed,
17773                        "SKIPPED" => Self::Skipped,
17774                        _ => Self::UnknownValue(state::UnknownValue(
17775                            wkt::internal::UnknownEnumValue::String(value.to_string()),
17776                        )),
17777                    }
17778                }
17779            }
17780
17781            impl serde::ser::Serialize for State {
17782                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17783                where
17784                    S: serde::Serializer,
17785                {
17786                    match self {
17787                        Self::Unspecified => serializer.serialize_i32(0),
17788                        Self::Succeeded => serializer.serialize_i32(1),
17789                        Self::Failed => serializer.serialize_i32(2),
17790                        Self::Skipped => serializer.serialize_i32(3),
17791                        Self::UnknownValue(u) => u.0.serialize(serializer),
17792                    }
17793                }
17794            }
17795
17796            impl<'de> serde::de::Deserialize<'de> for State {
17797                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17798                where
17799                    D: serde::Deserializer<'de>,
17800                {
17801                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
17802                        ".google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State"))
17803                }
17804            }
17805        }
17806    }
17807
17808    /// The assets generated by Anomaly Detection Data Scan.
17809    #[derive(Clone, Default, PartialEq)]
17810    #[non_exhaustive]
17811    pub struct AnomalyDetectionGeneratedAssets {
17812        /// Output only. The result table for anomaly detection.
17813        /// Format:
17814        /// PROJECT_ID.DATASET_ID.TABLE_ID
17815        /// If the result table is set at AnomalyDetectionAssets, the result table
17816        /// here would be the same as the one set in the
17817        /// AnomalyDetectionAssets.result_table.
17818        pub result_table: std::string::String,
17819
17820        /// Output only. The intermediate table for data anomaly detection.
17821        /// Format:
17822        /// PROJECT_ID.DATASET_ID.TABLE_ID
17823        pub data_intermediate_table: std::string::String,
17824
17825        /// Output only. The intermediate table for freshness anomaly detection.
17826        /// Format:
17827        /// PROJECT_ID.DATASET_ID.TABLE_ID
17828        pub freshness_intermediate_table: std::string::String,
17829
17830        /// Output only. The intermediate table for volume anomaly detection.
17831        /// Format:
17832        /// PROJECT_ID.DATASET_ID.TABLE_ID
17833        pub volume_intermediate_table: std::string::String,
17834
17835        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17836    }
17837
17838    impl AnomalyDetectionGeneratedAssets {
17839        pub fn new() -> Self {
17840            std::default::Default::default()
17841        }
17842
17843        /// Sets the value of [result_table][crate::model::data_quality_result::AnomalyDetectionGeneratedAssets::result_table].
17844        ///
17845        /// # Example
17846        /// ```ignore,no_run
17847        /// # use google_cloud_dataplex_v1::model::data_quality_result::AnomalyDetectionGeneratedAssets;
17848        /// let x = AnomalyDetectionGeneratedAssets::new().set_result_table("example");
17849        /// ```
17850        pub fn set_result_table<T: std::convert::Into<std::string::String>>(
17851            mut self,
17852            v: T,
17853        ) -> Self {
17854            self.result_table = v.into();
17855            self
17856        }
17857
17858        /// Sets the value of [data_intermediate_table][crate::model::data_quality_result::AnomalyDetectionGeneratedAssets::data_intermediate_table].
17859        ///
17860        /// # Example
17861        /// ```ignore,no_run
17862        /// # use google_cloud_dataplex_v1::model::data_quality_result::AnomalyDetectionGeneratedAssets;
17863        /// let x = AnomalyDetectionGeneratedAssets::new().set_data_intermediate_table("example");
17864        /// ```
17865        pub fn set_data_intermediate_table<T: std::convert::Into<std::string::String>>(
17866            mut self,
17867            v: T,
17868        ) -> Self {
17869            self.data_intermediate_table = v.into();
17870            self
17871        }
17872
17873        /// Sets the value of [freshness_intermediate_table][crate::model::data_quality_result::AnomalyDetectionGeneratedAssets::freshness_intermediate_table].
17874        ///
17875        /// # Example
17876        /// ```ignore,no_run
17877        /// # use google_cloud_dataplex_v1::model::data_quality_result::AnomalyDetectionGeneratedAssets;
17878        /// let x = AnomalyDetectionGeneratedAssets::new().set_freshness_intermediate_table("example");
17879        /// ```
17880        pub fn set_freshness_intermediate_table<T: std::convert::Into<std::string::String>>(
17881            mut self,
17882            v: T,
17883        ) -> Self {
17884            self.freshness_intermediate_table = v.into();
17885            self
17886        }
17887
17888        /// Sets the value of [volume_intermediate_table][crate::model::data_quality_result::AnomalyDetectionGeneratedAssets::volume_intermediate_table].
17889        ///
17890        /// # Example
17891        /// ```ignore,no_run
17892        /// # use google_cloud_dataplex_v1::model::data_quality_result::AnomalyDetectionGeneratedAssets;
17893        /// let x = AnomalyDetectionGeneratedAssets::new().set_volume_intermediate_table("example");
17894        /// ```
17895        pub fn set_volume_intermediate_table<T: std::convert::Into<std::string::String>>(
17896            mut self,
17897            v: T,
17898        ) -> Self {
17899            self.volume_intermediate_table = v.into();
17900            self
17901        }
17902    }
17903
17904    impl wkt::message::Message for AnomalyDetectionGeneratedAssets {
17905        fn typename() -> &'static str {
17906            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult.AnomalyDetectionGeneratedAssets"
17907        }
17908    }
17909}
17910
17911/// DataQualityRuleResult provides a more detailed, per-rule view of the results.
17912#[derive(Clone, Default, PartialEq)]
17913#[non_exhaustive]
17914pub struct DataQualityRuleResult {
17915    /// Output only. The rule specified in the DataQualitySpec, as is.
17916    pub rule: std::option::Option<crate::model::DataQualityRule>,
17917
17918    /// Output only. Whether the rule passed or failed.
17919    pub passed: bool,
17920
17921    /// Output only. The number of rows a rule was evaluated against.
17922    ///
17923    /// This field is only valid for row-level type rules.
17924    ///
17925    /// Evaluated count can be configured to either
17926    ///
17927    /// * include all rows (default) - with `null` rows automatically failing rule
17928    ///   evaluation, or
17929    /// * exclude `null` rows from the `evaluated_count`, by setting
17930    ///   `ignore_nulls = true`.
17931    ///
17932    /// This field is not set for rule SqlAssertion.
17933    pub evaluated_count: i64,
17934
17935    /// Output only. The number of rows which passed a rule evaluation.
17936    ///
17937    /// This field is only valid for row-level type rules.
17938    ///
17939    /// This field is not set for rule SqlAssertion.
17940    pub passed_count: i64,
17941
17942    /// Output only. The number of rows with null values in the specified column.
17943    pub null_count: i64,
17944
17945    /// Output only. The ratio of **passed_count / evaluated_count**.
17946    ///
17947    /// This field is only valid for row-level type rules.
17948    pub pass_ratio: f64,
17949
17950    /// Output only. The query to find rows that did not pass this rule.
17951    ///
17952    /// This field is only valid for row-level type rules.
17953    pub failing_rows_query: std::string::String,
17954
17955    /// Output only. The number of rows returned by the SQL statement in a SQL
17956    /// assertion rule.
17957    ///
17958    /// This field is only valid for SQL assertion rules.
17959    pub assertion_row_count: i64,
17960
17961    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17962}
17963
17964impl DataQualityRuleResult {
17965    pub fn new() -> Self {
17966        std::default::Default::default()
17967    }
17968
17969    /// Sets the value of [rule][crate::model::DataQualityRuleResult::rule].
17970    ///
17971    /// # Example
17972    /// ```ignore,no_run
17973    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
17974    /// use google_cloud_dataplex_v1::model::DataQualityRule;
17975    /// let x = DataQualityRuleResult::new().set_rule(DataQualityRule::default()/* use setters */);
17976    /// ```
17977    pub fn set_rule<T>(mut self, v: T) -> Self
17978    where
17979        T: std::convert::Into<crate::model::DataQualityRule>,
17980    {
17981        self.rule = std::option::Option::Some(v.into());
17982        self
17983    }
17984
17985    /// Sets or clears the value of [rule][crate::model::DataQualityRuleResult::rule].
17986    ///
17987    /// # Example
17988    /// ```ignore,no_run
17989    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
17990    /// use google_cloud_dataplex_v1::model::DataQualityRule;
17991    /// let x = DataQualityRuleResult::new().set_or_clear_rule(Some(DataQualityRule::default()/* use setters */));
17992    /// let x = DataQualityRuleResult::new().set_or_clear_rule(None::<DataQualityRule>);
17993    /// ```
17994    pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
17995    where
17996        T: std::convert::Into<crate::model::DataQualityRule>,
17997    {
17998        self.rule = v.map(|x| x.into());
17999        self
18000    }
18001
18002    /// Sets the value of [passed][crate::model::DataQualityRuleResult::passed].
18003    ///
18004    /// # Example
18005    /// ```ignore,no_run
18006    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
18007    /// let x = DataQualityRuleResult::new().set_passed(true);
18008    /// ```
18009    pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18010        self.passed = v.into();
18011        self
18012    }
18013
18014    /// Sets the value of [evaluated_count][crate::model::DataQualityRuleResult::evaluated_count].
18015    ///
18016    /// # Example
18017    /// ```ignore,no_run
18018    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
18019    /// let x = DataQualityRuleResult::new().set_evaluated_count(42);
18020    /// ```
18021    pub fn set_evaluated_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
18022        self.evaluated_count = v.into();
18023        self
18024    }
18025
18026    /// Sets the value of [passed_count][crate::model::DataQualityRuleResult::passed_count].
18027    ///
18028    /// # Example
18029    /// ```ignore,no_run
18030    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
18031    /// let x = DataQualityRuleResult::new().set_passed_count(42);
18032    /// ```
18033    pub fn set_passed_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
18034        self.passed_count = v.into();
18035        self
18036    }
18037
18038    /// Sets the value of [null_count][crate::model::DataQualityRuleResult::null_count].
18039    ///
18040    /// # Example
18041    /// ```ignore,no_run
18042    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
18043    /// let x = DataQualityRuleResult::new().set_null_count(42);
18044    /// ```
18045    pub fn set_null_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
18046        self.null_count = v.into();
18047        self
18048    }
18049
18050    /// Sets the value of [pass_ratio][crate::model::DataQualityRuleResult::pass_ratio].
18051    ///
18052    /// # Example
18053    /// ```ignore,no_run
18054    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
18055    /// let x = DataQualityRuleResult::new().set_pass_ratio(42.0);
18056    /// ```
18057    pub fn set_pass_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
18058        self.pass_ratio = v.into();
18059        self
18060    }
18061
18062    /// Sets the value of [failing_rows_query][crate::model::DataQualityRuleResult::failing_rows_query].
18063    ///
18064    /// # Example
18065    /// ```ignore,no_run
18066    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
18067    /// let x = DataQualityRuleResult::new().set_failing_rows_query("example");
18068    /// ```
18069    pub fn set_failing_rows_query<T: std::convert::Into<std::string::String>>(
18070        mut self,
18071        v: T,
18072    ) -> Self {
18073        self.failing_rows_query = v.into();
18074        self
18075    }
18076
18077    /// Sets the value of [assertion_row_count][crate::model::DataQualityRuleResult::assertion_row_count].
18078    ///
18079    /// # Example
18080    /// ```ignore,no_run
18081    /// # use google_cloud_dataplex_v1::model::DataQualityRuleResult;
18082    /// let x = DataQualityRuleResult::new().set_assertion_row_count(42);
18083    /// ```
18084    pub fn set_assertion_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
18085        self.assertion_row_count = v.into();
18086        self
18087    }
18088}
18089
18090impl wkt::message::Message for DataQualityRuleResult {
18091    fn typename() -> &'static str {
18092        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRuleResult"
18093    }
18094}
18095
18096/// DataQualityDimensionResult provides a more detailed, per-dimension view of
18097/// the results.
18098#[derive(Clone, Default, PartialEq)]
18099#[non_exhaustive]
18100pub struct DataQualityDimensionResult {
18101    /// Output only. The dimension config specified in the DataQualitySpec, as is.
18102    pub dimension: std::option::Option<crate::model::DataQualityDimension>,
18103
18104    /// Output only. Whether the dimension passed or failed.
18105    pub passed: bool,
18106
18107    /// Output only. The dimension-level data quality score for this data scan job
18108    /// if and only if the 'dimension' field is set.
18109    ///
18110    /// The score ranges between [0, 100] (up to two decimal
18111    /// points).
18112    pub score: std::option::Option<f32>,
18113
18114    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18115}
18116
18117impl DataQualityDimensionResult {
18118    pub fn new() -> Self {
18119        std::default::Default::default()
18120    }
18121
18122    /// Sets the value of [dimension][crate::model::DataQualityDimensionResult::dimension].
18123    ///
18124    /// # Example
18125    /// ```ignore,no_run
18126    /// # use google_cloud_dataplex_v1::model::DataQualityDimensionResult;
18127    /// use google_cloud_dataplex_v1::model::DataQualityDimension;
18128    /// let x = DataQualityDimensionResult::new().set_dimension(DataQualityDimension::default()/* use setters */);
18129    /// ```
18130    pub fn set_dimension<T>(mut self, v: T) -> Self
18131    where
18132        T: std::convert::Into<crate::model::DataQualityDimension>,
18133    {
18134        self.dimension = std::option::Option::Some(v.into());
18135        self
18136    }
18137
18138    /// Sets or clears the value of [dimension][crate::model::DataQualityDimensionResult::dimension].
18139    ///
18140    /// # Example
18141    /// ```ignore,no_run
18142    /// # use google_cloud_dataplex_v1::model::DataQualityDimensionResult;
18143    /// use google_cloud_dataplex_v1::model::DataQualityDimension;
18144    /// let x = DataQualityDimensionResult::new().set_or_clear_dimension(Some(DataQualityDimension::default()/* use setters */));
18145    /// let x = DataQualityDimensionResult::new().set_or_clear_dimension(None::<DataQualityDimension>);
18146    /// ```
18147    pub fn set_or_clear_dimension<T>(mut self, v: std::option::Option<T>) -> Self
18148    where
18149        T: std::convert::Into<crate::model::DataQualityDimension>,
18150    {
18151        self.dimension = v.map(|x| x.into());
18152        self
18153    }
18154
18155    /// Sets the value of [passed][crate::model::DataQualityDimensionResult::passed].
18156    ///
18157    /// # Example
18158    /// ```ignore,no_run
18159    /// # use google_cloud_dataplex_v1::model::DataQualityDimensionResult;
18160    /// let x = DataQualityDimensionResult::new().set_passed(true);
18161    /// ```
18162    pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18163        self.passed = v.into();
18164        self
18165    }
18166
18167    /// Sets the value of [score][crate::model::DataQualityDimensionResult::score].
18168    ///
18169    /// # Example
18170    /// ```ignore,no_run
18171    /// # use google_cloud_dataplex_v1::model::DataQualityDimensionResult;
18172    /// let x = DataQualityDimensionResult::new().set_score(42.0);
18173    /// ```
18174    pub fn set_score<T>(mut self, v: T) -> Self
18175    where
18176        T: std::convert::Into<f32>,
18177    {
18178        self.score = std::option::Option::Some(v.into());
18179        self
18180    }
18181
18182    /// Sets or clears the value of [score][crate::model::DataQualityDimensionResult::score].
18183    ///
18184    /// # Example
18185    /// ```ignore,no_run
18186    /// # use google_cloud_dataplex_v1::model::DataQualityDimensionResult;
18187    /// let x = DataQualityDimensionResult::new().set_or_clear_score(Some(42.0));
18188    /// let x = DataQualityDimensionResult::new().set_or_clear_score(None::<f32>);
18189    /// ```
18190    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
18191    where
18192        T: std::convert::Into<f32>,
18193    {
18194        self.score = v.map(|x| x.into());
18195        self
18196    }
18197}
18198
18199impl wkt::message::Message for DataQualityDimensionResult {
18200    fn typename() -> &'static str {
18201        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityDimensionResult"
18202    }
18203}
18204
18205/// A dimension captures data quality intent about a defined subset of the rules
18206/// specified.
18207#[derive(Clone, Default, PartialEq)]
18208#[non_exhaustive]
18209pub struct DataQualityDimension {
18210    /// Output only. The dimension name a rule belongs to. Custom dimension name is
18211    /// supported with all uppercase letters and maximum length of 30 characters.
18212    pub name: std::string::String,
18213
18214    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18215}
18216
18217impl DataQualityDimension {
18218    pub fn new() -> Self {
18219        std::default::Default::default()
18220    }
18221
18222    /// Sets the value of [name][crate::model::DataQualityDimension::name].
18223    ///
18224    /// # Example
18225    /// ```ignore,no_run
18226    /// # use google_cloud_dataplex_v1::model::DataQualityDimension;
18227    /// let x = DataQualityDimension::new().set_name("example");
18228    /// ```
18229    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18230        self.name = v.into();
18231        self
18232    }
18233}
18234
18235impl wkt::message::Message for DataQualityDimension {
18236    fn typename() -> &'static str {
18237        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityDimension"
18238    }
18239}
18240
18241/// A rule captures data quality intent about a data source.
18242#[derive(Clone, Default, PartialEq)]
18243#[non_exhaustive]
18244pub struct DataQualityRule {
18245    /// Optional. The unnested column which this rule is evaluated against.
18246    pub column: std::string::String,
18247
18248    /// Optional. Rows with `null` values will automatically fail a rule, unless
18249    /// `ignore_null` is `true`. In that case, such `null` rows are trivially
18250    /// considered passing.
18251    ///
18252    /// This field is only valid for the following type of rules:
18253    ///
18254    /// * RangeExpectation
18255    /// * RegexExpectation
18256    /// * SetExpectation
18257    /// * UniquenessExpectation
18258    pub ignore_null: bool,
18259
18260    /// Required. The dimension a rule belongs to. Results are also aggregated at
18261    /// the dimension level. Custom dimension name is supported with all uppercase
18262    /// letters and maximum length of 30 characters.
18263    pub dimension: std::string::String,
18264
18265    /// Optional. The minimum ratio of **passing_rows / total_rows** required to
18266    /// pass this rule, with a range of [0.0, 1.0].
18267    ///
18268    /// 0 indicates default value (i.e. 1.0).
18269    ///
18270    /// This field is only valid for row-level type rules.
18271    pub threshold: f64,
18272
18273    /// Optional. A mutable name for the rule.
18274    ///
18275    /// * The name must contain only letters (a-z, A-Z), numbers (0-9), or
18276    ///   hyphens (-).
18277    /// * The maximum length is 63 characters.
18278    /// * Must start with a letter.
18279    /// * Must end with a number or a letter.
18280    pub name: std::string::String,
18281
18282    /// Optional. Description of the rule.
18283    ///
18284    /// * The maximum length is 1,024 characters.
18285    pub description: std::string::String,
18286
18287    /// Optional. Whether the Rule is active or suspended.
18288    /// Default is false.
18289    pub suspended: bool,
18290
18291    /// The rule-specific configuration.
18292    pub rule_type: std::option::Option<crate::model::data_quality_rule::RuleType>,
18293
18294    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18295}
18296
18297impl DataQualityRule {
18298    pub fn new() -> Self {
18299        std::default::Default::default()
18300    }
18301
18302    /// Sets the value of [column][crate::model::DataQualityRule::column].
18303    ///
18304    /// # Example
18305    /// ```ignore,no_run
18306    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18307    /// let x = DataQualityRule::new().set_column("example");
18308    /// ```
18309    pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18310        self.column = v.into();
18311        self
18312    }
18313
18314    /// Sets the value of [ignore_null][crate::model::DataQualityRule::ignore_null].
18315    ///
18316    /// # Example
18317    /// ```ignore,no_run
18318    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18319    /// let x = DataQualityRule::new().set_ignore_null(true);
18320    /// ```
18321    pub fn set_ignore_null<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18322        self.ignore_null = v.into();
18323        self
18324    }
18325
18326    /// Sets the value of [dimension][crate::model::DataQualityRule::dimension].
18327    ///
18328    /// # Example
18329    /// ```ignore,no_run
18330    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18331    /// let x = DataQualityRule::new().set_dimension("example");
18332    /// ```
18333    pub fn set_dimension<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18334        self.dimension = v.into();
18335        self
18336    }
18337
18338    /// Sets the value of [threshold][crate::model::DataQualityRule::threshold].
18339    ///
18340    /// # Example
18341    /// ```ignore,no_run
18342    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18343    /// let x = DataQualityRule::new().set_threshold(42.0);
18344    /// ```
18345    pub fn set_threshold<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
18346        self.threshold = v.into();
18347        self
18348    }
18349
18350    /// Sets the value of [name][crate::model::DataQualityRule::name].
18351    ///
18352    /// # Example
18353    /// ```ignore,no_run
18354    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18355    /// let x = DataQualityRule::new().set_name("example");
18356    /// ```
18357    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18358        self.name = v.into();
18359        self
18360    }
18361
18362    /// Sets the value of [description][crate::model::DataQualityRule::description].
18363    ///
18364    /// # Example
18365    /// ```ignore,no_run
18366    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18367    /// let x = DataQualityRule::new().set_description("example");
18368    /// ```
18369    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18370        self.description = v.into();
18371        self
18372    }
18373
18374    /// Sets the value of [suspended][crate::model::DataQualityRule::suspended].
18375    ///
18376    /// # Example
18377    /// ```ignore,no_run
18378    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18379    /// let x = DataQualityRule::new().set_suspended(true);
18380    /// ```
18381    pub fn set_suspended<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18382        self.suspended = v.into();
18383        self
18384    }
18385
18386    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type].
18387    ///
18388    /// Note that all the setters affecting `rule_type` are mutually
18389    /// exclusive.
18390    ///
18391    /// # Example
18392    /// ```ignore,no_run
18393    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18394    /// use google_cloud_dataplex_v1::model::data_quality_rule::RangeExpectation;
18395    /// let x = DataQualityRule::new().set_rule_type(Some(
18396    ///     google_cloud_dataplex_v1::model::data_quality_rule::RuleType::RangeExpectation(RangeExpectation::default().into())));
18397    /// ```
18398    pub fn set_rule_type<
18399        T: std::convert::Into<std::option::Option<crate::model::data_quality_rule::RuleType>>,
18400    >(
18401        mut self,
18402        v: T,
18403    ) -> Self {
18404        self.rule_type = v.into();
18405        self
18406    }
18407
18408    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18409    /// if it holds a `RangeExpectation`, `None` if the field is not set or
18410    /// holds a different branch.
18411    pub fn range_expectation(
18412        &self,
18413    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::RangeExpectation>>
18414    {
18415        #[allow(unreachable_patterns)]
18416        self.rule_type.as_ref().and_then(|v| match v {
18417            crate::model::data_quality_rule::RuleType::RangeExpectation(v) => {
18418                std::option::Option::Some(v)
18419            }
18420            _ => std::option::Option::None,
18421        })
18422    }
18423
18424    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18425    /// to hold a `RangeExpectation`.
18426    ///
18427    /// Note that all the setters affecting `rule_type` are
18428    /// mutually exclusive.
18429    ///
18430    /// # Example
18431    /// ```ignore,no_run
18432    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18433    /// use google_cloud_dataplex_v1::model::data_quality_rule::RangeExpectation;
18434    /// let x = DataQualityRule::new().set_range_expectation(RangeExpectation::default()/* use setters */);
18435    /// assert!(x.range_expectation().is_some());
18436    /// assert!(x.non_null_expectation().is_none());
18437    /// assert!(x.set_expectation().is_none());
18438    /// assert!(x.regex_expectation().is_none());
18439    /// assert!(x.uniqueness_expectation().is_none());
18440    /// assert!(x.statistic_range_expectation().is_none());
18441    /// assert!(x.row_condition_expectation().is_none());
18442    /// assert!(x.table_condition_expectation().is_none());
18443    /// assert!(x.sql_assertion().is_none());
18444    /// ```
18445    pub fn set_range_expectation<
18446        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::RangeExpectation>>,
18447    >(
18448        mut self,
18449        v: T,
18450    ) -> Self {
18451        self.rule_type = std::option::Option::Some(
18452            crate::model::data_quality_rule::RuleType::RangeExpectation(v.into()),
18453        );
18454        self
18455    }
18456
18457    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18458    /// if it holds a `NonNullExpectation`, `None` if the field is not set or
18459    /// holds a different branch.
18460    pub fn non_null_expectation(
18461        &self,
18462    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::NonNullExpectation>>
18463    {
18464        #[allow(unreachable_patterns)]
18465        self.rule_type.as_ref().and_then(|v| match v {
18466            crate::model::data_quality_rule::RuleType::NonNullExpectation(v) => {
18467                std::option::Option::Some(v)
18468            }
18469            _ => std::option::Option::None,
18470        })
18471    }
18472
18473    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18474    /// to hold a `NonNullExpectation`.
18475    ///
18476    /// Note that all the setters affecting `rule_type` are
18477    /// mutually exclusive.
18478    ///
18479    /// # Example
18480    /// ```ignore,no_run
18481    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18482    /// use google_cloud_dataplex_v1::model::data_quality_rule::NonNullExpectation;
18483    /// let x = DataQualityRule::new().set_non_null_expectation(NonNullExpectation::default()/* use setters */);
18484    /// assert!(x.non_null_expectation().is_some());
18485    /// assert!(x.range_expectation().is_none());
18486    /// assert!(x.set_expectation().is_none());
18487    /// assert!(x.regex_expectation().is_none());
18488    /// assert!(x.uniqueness_expectation().is_none());
18489    /// assert!(x.statistic_range_expectation().is_none());
18490    /// assert!(x.row_condition_expectation().is_none());
18491    /// assert!(x.table_condition_expectation().is_none());
18492    /// assert!(x.sql_assertion().is_none());
18493    /// ```
18494    pub fn set_non_null_expectation<
18495        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::NonNullExpectation>>,
18496    >(
18497        mut self,
18498        v: T,
18499    ) -> Self {
18500        self.rule_type = std::option::Option::Some(
18501            crate::model::data_quality_rule::RuleType::NonNullExpectation(v.into()),
18502        );
18503        self
18504    }
18505
18506    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18507    /// if it holds a `SetExpectation`, `None` if the field is not set or
18508    /// holds a different branch.
18509    pub fn set_expectation(
18510        &self,
18511    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::SetExpectation>>
18512    {
18513        #[allow(unreachable_patterns)]
18514        self.rule_type.as_ref().and_then(|v| match v {
18515            crate::model::data_quality_rule::RuleType::SetExpectation(v) => {
18516                std::option::Option::Some(v)
18517            }
18518            _ => std::option::Option::None,
18519        })
18520    }
18521
18522    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18523    /// to hold a `SetExpectation`.
18524    ///
18525    /// Note that all the setters affecting `rule_type` are
18526    /// mutually exclusive.
18527    ///
18528    /// # Example
18529    /// ```ignore,no_run
18530    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18531    /// use google_cloud_dataplex_v1::model::data_quality_rule::SetExpectation;
18532    /// let x = DataQualityRule::new().set_set_expectation(SetExpectation::default()/* use setters */);
18533    /// assert!(x.set_expectation().is_some());
18534    /// assert!(x.range_expectation().is_none());
18535    /// assert!(x.non_null_expectation().is_none());
18536    /// assert!(x.regex_expectation().is_none());
18537    /// assert!(x.uniqueness_expectation().is_none());
18538    /// assert!(x.statistic_range_expectation().is_none());
18539    /// assert!(x.row_condition_expectation().is_none());
18540    /// assert!(x.table_condition_expectation().is_none());
18541    /// assert!(x.sql_assertion().is_none());
18542    /// ```
18543    pub fn set_set_expectation<
18544        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::SetExpectation>>,
18545    >(
18546        mut self,
18547        v: T,
18548    ) -> Self {
18549        self.rule_type = std::option::Option::Some(
18550            crate::model::data_quality_rule::RuleType::SetExpectation(v.into()),
18551        );
18552        self
18553    }
18554
18555    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18556    /// if it holds a `RegexExpectation`, `None` if the field is not set or
18557    /// holds a different branch.
18558    pub fn regex_expectation(
18559        &self,
18560    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::RegexExpectation>>
18561    {
18562        #[allow(unreachable_patterns)]
18563        self.rule_type.as_ref().and_then(|v| match v {
18564            crate::model::data_quality_rule::RuleType::RegexExpectation(v) => {
18565                std::option::Option::Some(v)
18566            }
18567            _ => std::option::Option::None,
18568        })
18569    }
18570
18571    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18572    /// to hold a `RegexExpectation`.
18573    ///
18574    /// Note that all the setters affecting `rule_type` are
18575    /// mutually exclusive.
18576    ///
18577    /// # Example
18578    /// ```ignore,no_run
18579    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18580    /// use google_cloud_dataplex_v1::model::data_quality_rule::RegexExpectation;
18581    /// let x = DataQualityRule::new().set_regex_expectation(RegexExpectation::default()/* use setters */);
18582    /// assert!(x.regex_expectation().is_some());
18583    /// assert!(x.range_expectation().is_none());
18584    /// assert!(x.non_null_expectation().is_none());
18585    /// assert!(x.set_expectation().is_none());
18586    /// assert!(x.uniqueness_expectation().is_none());
18587    /// assert!(x.statistic_range_expectation().is_none());
18588    /// assert!(x.row_condition_expectation().is_none());
18589    /// assert!(x.table_condition_expectation().is_none());
18590    /// assert!(x.sql_assertion().is_none());
18591    /// ```
18592    pub fn set_regex_expectation<
18593        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::RegexExpectation>>,
18594    >(
18595        mut self,
18596        v: T,
18597    ) -> Self {
18598        self.rule_type = std::option::Option::Some(
18599            crate::model::data_quality_rule::RuleType::RegexExpectation(v.into()),
18600        );
18601        self
18602    }
18603
18604    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18605    /// if it holds a `UniquenessExpectation`, `None` if the field is not set or
18606    /// holds a different branch.
18607    pub fn uniqueness_expectation(
18608        &self,
18609    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::UniquenessExpectation>>
18610    {
18611        #[allow(unreachable_patterns)]
18612        self.rule_type.as_ref().and_then(|v| match v {
18613            crate::model::data_quality_rule::RuleType::UniquenessExpectation(v) => {
18614                std::option::Option::Some(v)
18615            }
18616            _ => std::option::Option::None,
18617        })
18618    }
18619
18620    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18621    /// to hold a `UniquenessExpectation`.
18622    ///
18623    /// Note that all the setters affecting `rule_type` are
18624    /// mutually exclusive.
18625    ///
18626    /// # Example
18627    /// ```ignore,no_run
18628    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18629    /// use google_cloud_dataplex_v1::model::data_quality_rule::UniquenessExpectation;
18630    /// let x = DataQualityRule::new().set_uniqueness_expectation(UniquenessExpectation::default()/* use setters */);
18631    /// assert!(x.uniqueness_expectation().is_some());
18632    /// assert!(x.range_expectation().is_none());
18633    /// assert!(x.non_null_expectation().is_none());
18634    /// assert!(x.set_expectation().is_none());
18635    /// assert!(x.regex_expectation().is_none());
18636    /// assert!(x.statistic_range_expectation().is_none());
18637    /// assert!(x.row_condition_expectation().is_none());
18638    /// assert!(x.table_condition_expectation().is_none());
18639    /// assert!(x.sql_assertion().is_none());
18640    /// ```
18641    pub fn set_uniqueness_expectation<
18642        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::UniquenessExpectation>>,
18643    >(
18644        mut self,
18645        v: T,
18646    ) -> Self {
18647        self.rule_type = std::option::Option::Some(
18648            crate::model::data_quality_rule::RuleType::UniquenessExpectation(v.into()),
18649        );
18650        self
18651    }
18652
18653    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18654    /// if it holds a `StatisticRangeExpectation`, `None` if the field is not set or
18655    /// holds a different branch.
18656    pub fn statistic_range_expectation(
18657        &self,
18658    ) -> std::option::Option<
18659        &std::boxed::Box<crate::model::data_quality_rule::StatisticRangeExpectation>,
18660    > {
18661        #[allow(unreachable_patterns)]
18662        self.rule_type.as_ref().and_then(|v| match v {
18663            crate::model::data_quality_rule::RuleType::StatisticRangeExpectation(v) => {
18664                std::option::Option::Some(v)
18665            }
18666            _ => std::option::Option::None,
18667        })
18668    }
18669
18670    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18671    /// to hold a `StatisticRangeExpectation`.
18672    ///
18673    /// Note that all the setters affecting `rule_type` are
18674    /// mutually exclusive.
18675    ///
18676    /// # Example
18677    /// ```ignore,no_run
18678    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18679    /// use google_cloud_dataplex_v1::model::data_quality_rule::StatisticRangeExpectation;
18680    /// let x = DataQualityRule::new().set_statistic_range_expectation(StatisticRangeExpectation::default()/* use setters */);
18681    /// assert!(x.statistic_range_expectation().is_some());
18682    /// assert!(x.range_expectation().is_none());
18683    /// assert!(x.non_null_expectation().is_none());
18684    /// assert!(x.set_expectation().is_none());
18685    /// assert!(x.regex_expectation().is_none());
18686    /// assert!(x.uniqueness_expectation().is_none());
18687    /// assert!(x.row_condition_expectation().is_none());
18688    /// assert!(x.table_condition_expectation().is_none());
18689    /// assert!(x.sql_assertion().is_none());
18690    /// ```
18691    pub fn set_statistic_range_expectation<
18692        T: std::convert::Into<
18693                std::boxed::Box<crate::model::data_quality_rule::StatisticRangeExpectation>,
18694            >,
18695    >(
18696        mut self,
18697        v: T,
18698    ) -> Self {
18699        self.rule_type = std::option::Option::Some(
18700            crate::model::data_quality_rule::RuleType::StatisticRangeExpectation(v.into()),
18701        );
18702        self
18703    }
18704
18705    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18706    /// if it holds a `RowConditionExpectation`, `None` if the field is not set or
18707    /// holds a different branch.
18708    pub fn row_condition_expectation(
18709        &self,
18710    ) -> std::option::Option<
18711        &std::boxed::Box<crate::model::data_quality_rule::RowConditionExpectation>,
18712    > {
18713        #[allow(unreachable_patterns)]
18714        self.rule_type.as_ref().and_then(|v| match v {
18715            crate::model::data_quality_rule::RuleType::RowConditionExpectation(v) => {
18716                std::option::Option::Some(v)
18717            }
18718            _ => std::option::Option::None,
18719        })
18720    }
18721
18722    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18723    /// to hold a `RowConditionExpectation`.
18724    ///
18725    /// Note that all the setters affecting `rule_type` are
18726    /// mutually exclusive.
18727    ///
18728    /// # Example
18729    /// ```ignore,no_run
18730    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18731    /// use google_cloud_dataplex_v1::model::data_quality_rule::RowConditionExpectation;
18732    /// let x = DataQualityRule::new().set_row_condition_expectation(RowConditionExpectation::default()/* use setters */);
18733    /// assert!(x.row_condition_expectation().is_some());
18734    /// assert!(x.range_expectation().is_none());
18735    /// assert!(x.non_null_expectation().is_none());
18736    /// assert!(x.set_expectation().is_none());
18737    /// assert!(x.regex_expectation().is_none());
18738    /// assert!(x.uniqueness_expectation().is_none());
18739    /// assert!(x.statistic_range_expectation().is_none());
18740    /// assert!(x.table_condition_expectation().is_none());
18741    /// assert!(x.sql_assertion().is_none());
18742    /// ```
18743    pub fn set_row_condition_expectation<
18744        T: std::convert::Into<
18745                std::boxed::Box<crate::model::data_quality_rule::RowConditionExpectation>,
18746            >,
18747    >(
18748        mut self,
18749        v: T,
18750    ) -> Self {
18751        self.rule_type = std::option::Option::Some(
18752            crate::model::data_quality_rule::RuleType::RowConditionExpectation(v.into()),
18753        );
18754        self
18755    }
18756
18757    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18758    /// if it holds a `TableConditionExpectation`, `None` if the field is not set or
18759    /// holds a different branch.
18760    pub fn table_condition_expectation(
18761        &self,
18762    ) -> std::option::Option<
18763        &std::boxed::Box<crate::model::data_quality_rule::TableConditionExpectation>,
18764    > {
18765        #[allow(unreachable_patterns)]
18766        self.rule_type.as_ref().and_then(|v| match v {
18767            crate::model::data_quality_rule::RuleType::TableConditionExpectation(v) => {
18768                std::option::Option::Some(v)
18769            }
18770            _ => std::option::Option::None,
18771        })
18772    }
18773
18774    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18775    /// to hold a `TableConditionExpectation`.
18776    ///
18777    /// Note that all the setters affecting `rule_type` are
18778    /// mutually exclusive.
18779    ///
18780    /// # Example
18781    /// ```ignore,no_run
18782    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18783    /// use google_cloud_dataplex_v1::model::data_quality_rule::TableConditionExpectation;
18784    /// let x = DataQualityRule::new().set_table_condition_expectation(TableConditionExpectation::default()/* use setters */);
18785    /// assert!(x.table_condition_expectation().is_some());
18786    /// assert!(x.range_expectation().is_none());
18787    /// assert!(x.non_null_expectation().is_none());
18788    /// assert!(x.set_expectation().is_none());
18789    /// assert!(x.regex_expectation().is_none());
18790    /// assert!(x.uniqueness_expectation().is_none());
18791    /// assert!(x.statistic_range_expectation().is_none());
18792    /// assert!(x.row_condition_expectation().is_none());
18793    /// assert!(x.sql_assertion().is_none());
18794    /// ```
18795    pub fn set_table_condition_expectation<
18796        T: std::convert::Into<
18797                std::boxed::Box<crate::model::data_quality_rule::TableConditionExpectation>,
18798            >,
18799    >(
18800        mut self,
18801        v: T,
18802    ) -> Self {
18803        self.rule_type = std::option::Option::Some(
18804            crate::model::data_quality_rule::RuleType::TableConditionExpectation(v.into()),
18805        );
18806        self
18807    }
18808
18809    /// The value of [rule_type][crate::model::DataQualityRule::rule_type]
18810    /// if it holds a `SqlAssertion`, `None` if the field is not set or
18811    /// holds a different branch.
18812    pub fn sql_assertion(
18813        &self,
18814    ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::SqlAssertion>> {
18815        #[allow(unreachable_patterns)]
18816        self.rule_type.as_ref().and_then(|v| match v {
18817            crate::model::data_quality_rule::RuleType::SqlAssertion(v) => {
18818                std::option::Option::Some(v)
18819            }
18820            _ => std::option::Option::None,
18821        })
18822    }
18823
18824    /// Sets the value of [rule_type][crate::model::DataQualityRule::rule_type]
18825    /// to hold a `SqlAssertion`.
18826    ///
18827    /// Note that all the setters affecting `rule_type` are
18828    /// mutually exclusive.
18829    ///
18830    /// # Example
18831    /// ```ignore,no_run
18832    /// # use google_cloud_dataplex_v1::model::DataQualityRule;
18833    /// use google_cloud_dataplex_v1::model::data_quality_rule::SqlAssertion;
18834    /// let x = DataQualityRule::new().set_sql_assertion(SqlAssertion::default()/* use setters */);
18835    /// assert!(x.sql_assertion().is_some());
18836    /// assert!(x.range_expectation().is_none());
18837    /// assert!(x.non_null_expectation().is_none());
18838    /// assert!(x.set_expectation().is_none());
18839    /// assert!(x.regex_expectation().is_none());
18840    /// assert!(x.uniqueness_expectation().is_none());
18841    /// assert!(x.statistic_range_expectation().is_none());
18842    /// assert!(x.row_condition_expectation().is_none());
18843    /// assert!(x.table_condition_expectation().is_none());
18844    /// ```
18845    pub fn set_sql_assertion<
18846        T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::SqlAssertion>>,
18847    >(
18848        mut self,
18849        v: T,
18850    ) -> Self {
18851        self.rule_type = std::option::Option::Some(
18852            crate::model::data_quality_rule::RuleType::SqlAssertion(v.into()),
18853        );
18854        self
18855    }
18856}
18857
18858impl wkt::message::Message for DataQualityRule {
18859    fn typename() -> &'static str {
18860        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule"
18861    }
18862}
18863
18864/// Defines additional types related to [DataQualityRule].
18865pub mod data_quality_rule {
18866    #[allow(unused_imports)]
18867    use super::*;
18868
18869    /// Evaluates whether each column value lies between a specified range.
18870    #[derive(Clone, Default, PartialEq)]
18871    #[non_exhaustive]
18872    pub struct RangeExpectation {
18873        /// Optional. The minimum column value allowed for a row to pass this
18874        /// validation. At least one of `min_value` and `max_value` need to be
18875        /// provided.
18876        pub min_value: std::string::String,
18877
18878        /// Optional. The maximum column value allowed for a row to pass this
18879        /// validation. At least one of `min_value` and `max_value` need to be
18880        /// provided.
18881        pub max_value: std::string::String,
18882
18883        /// Optional. Whether each value needs to be strictly greater than ('>') the
18884        /// minimum, or if equality is allowed.
18885        ///
18886        /// Only relevant if a `min_value` has been defined. Default = false.
18887        pub strict_min_enabled: bool,
18888
18889        /// Optional. Whether each value needs to be strictly lesser than ('<') the
18890        /// maximum, or if equality is allowed.
18891        ///
18892        /// Only relevant if a `max_value` has been defined. Default = false.
18893        pub strict_max_enabled: bool,
18894
18895        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18896    }
18897
18898    impl RangeExpectation {
18899        pub fn new() -> Self {
18900            std::default::Default::default()
18901        }
18902
18903        /// Sets the value of [min_value][crate::model::data_quality_rule::RangeExpectation::min_value].
18904        ///
18905        /// # Example
18906        /// ```ignore,no_run
18907        /// # use google_cloud_dataplex_v1::model::data_quality_rule::RangeExpectation;
18908        /// let x = RangeExpectation::new().set_min_value("example");
18909        /// ```
18910        pub fn set_min_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18911            self.min_value = v.into();
18912            self
18913        }
18914
18915        /// Sets the value of [max_value][crate::model::data_quality_rule::RangeExpectation::max_value].
18916        ///
18917        /// # Example
18918        /// ```ignore,no_run
18919        /// # use google_cloud_dataplex_v1::model::data_quality_rule::RangeExpectation;
18920        /// let x = RangeExpectation::new().set_max_value("example");
18921        /// ```
18922        pub fn set_max_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18923            self.max_value = v.into();
18924            self
18925        }
18926
18927        /// Sets the value of [strict_min_enabled][crate::model::data_quality_rule::RangeExpectation::strict_min_enabled].
18928        ///
18929        /// # Example
18930        /// ```ignore,no_run
18931        /// # use google_cloud_dataplex_v1::model::data_quality_rule::RangeExpectation;
18932        /// let x = RangeExpectation::new().set_strict_min_enabled(true);
18933        /// ```
18934        pub fn set_strict_min_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18935            self.strict_min_enabled = v.into();
18936            self
18937        }
18938
18939        /// Sets the value of [strict_max_enabled][crate::model::data_quality_rule::RangeExpectation::strict_max_enabled].
18940        ///
18941        /// # Example
18942        /// ```ignore,no_run
18943        /// # use google_cloud_dataplex_v1::model::data_quality_rule::RangeExpectation;
18944        /// let x = RangeExpectation::new().set_strict_max_enabled(true);
18945        /// ```
18946        pub fn set_strict_max_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18947            self.strict_max_enabled = v.into();
18948            self
18949        }
18950    }
18951
18952    impl wkt::message::Message for RangeExpectation {
18953        fn typename() -> &'static str {
18954            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.RangeExpectation"
18955        }
18956    }
18957
18958    /// Evaluates whether each column value is null.
18959    #[derive(Clone, Default, PartialEq)]
18960    #[non_exhaustive]
18961    pub struct NonNullExpectation {
18962        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18963    }
18964
18965    impl NonNullExpectation {
18966        pub fn new() -> Self {
18967            std::default::Default::default()
18968        }
18969    }
18970
18971    impl wkt::message::Message for NonNullExpectation {
18972        fn typename() -> &'static str {
18973            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation"
18974        }
18975    }
18976
18977    /// Evaluates whether each column value is contained by a specified set.
18978    #[derive(Clone, Default, PartialEq)]
18979    #[non_exhaustive]
18980    pub struct SetExpectation {
18981        /// Optional. Expected values for the column value.
18982        pub values: std::vec::Vec<std::string::String>,
18983
18984        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18985    }
18986
18987    impl SetExpectation {
18988        pub fn new() -> Self {
18989            std::default::Default::default()
18990        }
18991
18992        /// Sets the value of [values][crate::model::data_quality_rule::SetExpectation::values].
18993        ///
18994        /// # Example
18995        /// ```ignore,no_run
18996        /// # use google_cloud_dataplex_v1::model::data_quality_rule::SetExpectation;
18997        /// let x = SetExpectation::new().set_values(["a", "b", "c"]);
18998        /// ```
18999        pub fn set_values<T, V>(mut self, v: T) -> Self
19000        where
19001            T: std::iter::IntoIterator<Item = V>,
19002            V: std::convert::Into<std::string::String>,
19003        {
19004            use std::iter::Iterator;
19005            self.values = v.into_iter().map(|i| i.into()).collect();
19006            self
19007        }
19008    }
19009
19010    impl wkt::message::Message for SetExpectation {
19011        fn typename() -> &'static str {
19012            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.SetExpectation"
19013        }
19014    }
19015
19016    /// Evaluates whether each column value matches a specified regex.
19017    #[derive(Clone, Default, PartialEq)]
19018    #[non_exhaustive]
19019    pub struct RegexExpectation {
19020        /// Optional. A regular expression the column value is expected to match.
19021        pub regex: std::string::String,
19022
19023        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19024    }
19025
19026    impl RegexExpectation {
19027        pub fn new() -> Self {
19028            std::default::Default::default()
19029        }
19030
19031        /// Sets the value of [regex][crate::model::data_quality_rule::RegexExpectation::regex].
19032        ///
19033        /// # Example
19034        /// ```ignore,no_run
19035        /// # use google_cloud_dataplex_v1::model::data_quality_rule::RegexExpectation;
19036        /// let x = RegexExpectation::new().set_regex("example");
19037        /// ```
19038        pub fn set_regex<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19039            self.regex = v.into();
19040            self
19041        }
19042    }
19043
19044    impl wkt::message::Message for RegexExpectation {
19045        fn typename() -> &'static str {
19046            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.RegexExpectation"
19047        }
19048    }
19049
19050    /// Evaluates whether the column has duplicates.
19051    #[derive(Clone, Default, PartialEq)]
19052    #[non_exhaustive]
19053    pub struct UniquenessExpectation {
19054        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19055    }
19056
19057    impl UniquenessExpectation {
19058        pub fn new() -> Self {
19059            std::default::Default::default()
19060        }
19061    }
19062
19063    impl wkt::message::Message for UniquenessExpectation {
19064        fn typename() -> &'static str {
19065            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation"
19066        }
19067    }
19068
19069    /// Evaluates whether the column aggregate statistic lies between a specified
19070    /// range.
19071    #[derive(Clone, Default, PartialEq)]
19072    #[non_exhaustive]
19073    pub struct StatisticRangeExpectation {
19074        /// Optional. The aggregate metric to evaluate.
19075        pub statistic:
19076            crate::model::data_quality_rule::statistic_range_expectation::ColumnStatistic,
19077
19078        /// Optional. The minimum column statistic value allowed for a row to pass
19079        /// this validation.
19080        ///
19081        /// At least one of `min_value` and `max_value` need to be provided.
19082        pub min_value: std::string::String,
19083
19084        /// Optional. The maximum column statistic value allowed for a row to pass
19085        /// this validation.
19086        ///
19087        /// At least one of `min_value` and `max_value` need to be provided.
19088        pub max_value: std::string::String,
19089
19090        /// Optional. Whether column statistic needs to be strictly greater than
19091        /// ('>') the minimum, or if equality is allowed.
19092        ///
19093        /// Only relevant if a `min_value` has been defined. Default = false.
19094        pub strict_min_enabled: bool,
19095
19096        /// Optional. Whether column statistic needs to be strictly lesser than ('<')
19097        /// the maximum, or if equality is allowed.
19098        ///
19099        /// Only relevant if a `max_value` has been defined. Default = false.
19100        pub strict_max_enabled: bool,
19101
19102        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19103    }
19104
19105    impl StatisticRangeExpectation {
19106        pub fn new() -> Self {
19107            std::default::Default::default()
19108        }
19109
19110        /// Sets the value of [statistic][crate::model::data_quality_rule::StatisticRangeExpectation::statistic].
19111        ///
19112        /// # Example
19113        /// ```ignore,no_run
19114        /// # use google_cloud_dataplex_v1::model::data_quality_rule::StatisticRangeExpectation;
19115        /// use google_cloud_dataplex_v1::model::data_quality_rule::statistic_range_expectation::ColumnStatistic;
19116        /// let x0 = StatisticRangeExpectation::new().set_statistic(ColumnStatistic::Mean);
19117        /// let x1 = StatisticRangeExpectation::new().set_statistic(ColumnStatistic::Min);
19118        /// let x2 = StatisticRangeExpectation::new().set_statistic(ColumnStatistic::Max);
19119        /// ```
19120        pub fn set_statistic<
19121            T: std::convert::Into<
19122                    crate::model::data_quality_rule::statistic_range_expectation::ColumnStatistic,
19123                >,
19124        >(
19125            mut self,
19126            v: T,
19127        ) -> Self {
19128            self.statistic = v.into();
19129            self
19130        }
19131
19132        /// Sets the value of [min_value][crate::model::data_quality_rule::StatisticRangeExpectation::min_value].
19133        ///
19134        /// # Example
19135        /// ```ignore,no_run
19136        /// # use google_cloud_dataplex_v1::model::data_quality_rule::StatisticRangeExpectation;
19137        /// let x = StatisticRangeExpectation::new().set_min_value("example");
19138        /// ```
19139        pub fn set_min_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19140            self.min_value = v.into();
19141            self
19142        }
19143
19144        /// Sets the value of [max_value][crate::model::data_quality_rule::StatisticRangeExpectation::max_value].
19145        ///
19146        /// # Example
19147        /// ```ignore,no_run
19148        /// # use google_cloud_dataplex_v1::model::data_quality_rule::StatisticRangeExpectation;
19149        /// let x = StatisticRangeExpectation::new().set_max_value("example");
19150        /// ```
19151        pub fn set_max_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19152            self.max_value = v.into();
19153            self
19154        }
19155
19156        /// Sets the value of [strict_min_enabled][crate::model::data_quality_rule::StatisticRangeExpectation::strict_min_enabled].
19157        ///
19158        /// # Example
19159        /// ```ignore,no_run
19160        /// # use google_cloud_dataplex_v1::model::data_quality_rule::StatisticRangeExpectation;
19161        /// let x = StatisticRangeExpectation::new().set_strict_min_enabled(true);
19162        /// ```
19163        pub fn set_strict_min_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19164            self.strict_min_enabled = v.into();
19165            self
19166        }
19167
19168        /// Sets the value of [strict_max_enabled][crate::model::data_quality_rule::StatisticRangeExpectation::strict_max_enabled].
19169        ///
19170        /// # Example
19171        /// ```ignore,no_run
19172        /// # use google_cloud_dataplex_v1::model::data_quality_rule::StatisticRangeExpectation;
19173        /// let x = StatisticRangeExpectation::new().set_strict_max_enabled(true);
19174        /// ```
19175        pub fn set_strict_max_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19176            self.strict_max_enabled = v.into();
19177            self
19178        }
19179    }
19180
19181    impl wkt::message::Message for StatisticRangeExpectation {
19182        fn typename() -> &'static str {
19183            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation"
19184        }
19185    }
19186
19187    /// Defines additional types related to [StatisticRangeExpectation].
19188    pub mod statistic_range_expectation {
19189        #[allow(unused_imports)]
19190        use super::*;
19191
19192        /// The list of aggregate metrics a rule can be evaluated against.
19193        ///
19194        /// # Working with unknown values
19195        ///
19196        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19197        /// additional enum variants at any time. Adding new variants is not considered
19198        /// a breaking change. Applications should write their code in anticipation of:
19199        ///
19200        /// - New values appearing in future releases of the client library, **and**
19201        /// - New values received dynamically, without application changes.
19202        ///
19203        /// Please consult the [Working with enums] section in the user guide for some
19204        /// guidelines.
19205        ///
19206        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
19207        #[derive(Clone, Debug, PartialEq)]
19208        #[non_exhaustive]
19209        pub enum ColumnStatistic {
19210            /// Unspecified statistic type
19211            StatisticUndefined,
19212            /// Evaluate the column mean
19213            Mean,
19214            /// Evaluate the column min
19215            Min,
19216            /// Evaluate the column max
19217            Max,
19218            /// If set, the enum was initialized with an unknown value.
19219            ///
19220            /// Applications can examine the value using [ColumnStatistic::value] or
19221            /// [ColumnStatistic::name].
19222            UnknownValue(column_statistic::UnknownValue),
19223        }
19224
19225        #[doc(hidden)]
19226        pub mod column_statistic {
19227            #[allow(unused_imports)]
19228            use super::*;
19229            #[derive(Clone, Debug, PartialEq)]
19230            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19231        }
19232
19233        impl ColumnStatistic {
19234            /// Gets the enum value.
19235            ///
19236            /// Returns `None` if the enum contains an unknown value deserialized from
19237            /// the string representation of enums.
19238            pub fn value(&self) -> std::option::Option<i32> {
19239                match self {
19240                    Self::StatisticUndefined => std::option::Option::Some(0),
19241                    Self::Mean => std::option::Option::Some(1),
19242                    Self::Min => std::option::Option::Some(2),
19243                    Self::Max => std::option::Option::Some(3),
19244                    Self::UnknownValue(u) => u.0.value(),
19245                }
19246            }
19247
19248            /// Gets the enum value as a string.
19249            ///
19250            /// Returns `None` if the enum contains an unknown value deserialized from
19251            /// the integer representation of enums.
19252            pub fn name(&self) -> std::option::Option<&str> {
19253                match self {
19254                    Self::StatisticUndefined => std::option::Option::Some("STATISTIC_UNDEFINED"),
19255                    Self::Mean => std::option::Option::Some("MEAN"),
19256                    Self::Min => std::option::Option::Some("MIN"),
19257                    Self::Max => std::option::Option::Some("MAX"),
19258                    Self::UnknownValue(u) => u.0.name(),
19259                }
19260            }
19261        }
19262
19263        impl std::default::Default for ColumnStatistic {
19264            fn default() -> Self {
19265                use std::convert::From;
19266                Self::from(0)
19267            }
19268        }
19269
19270        impl std::fmt::Display for ColumnStatistic {
19271            fn fmt(
19272                &self,
19273                f: &mut std::fmt::Formatter<'_>,
19274            ) -> std::result::Result<(), std::fmt::Error> {
19275                wkt::internal::display_enum(f, self.name(), self.value())
19276            }
19277        }
19278
19279        impl std::convert::From<i32> for ColumnStatistic {
19280            fn from(value: i32) -> Self {
19281                match value {
19282                    0 => Self::StatisticUndefined,
19283                    1 => Self::Mean,
19284                    2 => Self::Min,
19285                    3 => Self::Max,
19286                    _ => Self::UnknownValue(column_statistic::UnknownValue(
19287                        wkt::internal::UnknownEnumValue::Integer(value),
19288                    )),
19289                }
19290            }
19291        }
19292
19293        impl std::convert::From<&str> for ColumnStatistic {
19294            fn from(value: &str) -> Self {
19295                use std::string::ToString;
19296                match value {
19297                    "STATISTIC_UNDEFINED" => Self::StatisticUndefined,
19298                    "MEAN" => Self::Mean,
19299                    "MIN" => Self::Min,
19300                    "MAX" => Self::Max,
19301                    _ => Self::UnknownValue(column_statistic::UnknownValue(
19302                        wkt::internal::UnknownEnumValue::String(value.to_string()),
19303                    )),
19304                }
19305            }
19306        }
19307
19308        impl serde::ser::Serialize for ColumnStatistic {
19309            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19310            where
19311                S: serde::Serializer,
19312            {
19313                match self {
19314                    Self::StatisticUndefined => serializer.serialize_i32(0),
19315                    Self::Mean => serializer.serialize_i32(1),
19316                    Self::Min => serializer.serialize_i32(2),
19317                    Self::Max => serializer.serialize_i32(3),
19318                    Self::UnknownValue(u) => u.0.serialize(serializer),
19319                }
19320            }
19321        }
19322
19323        impl<'de> serde::de::Deserialize<'de> for ColumnStatistic {
19324            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19325            where
19326                D: serde::Deserializer<'de>,
19327            {
19328                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ColumnStatistic>::new(
19329                    ".google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic"))
19330            }
19331        }
19332    }
19333
19334    /// Evaluates whether each row passes the specified condition.
19335    ///
19336    /// The SQL expression needs to use [GoogleSQL
19337    /// syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax)
19338    /// and should produce a boolean value per row as the result.
19339    ///
19340    /// Example: col1 >= 0 AND col2 < 10
19341    #[derive(Clone, Default, PartialEq)]
19342    #[non_exhaustive]
19343    pub struct RowConditionExpectation {
19344        /// Optional. The SQL expression.
19345        pub sql_expression: std::string::String,
19346
19347        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19348    }
19349
19350    impl RowConditionExpectation {
19351        pub fn new() -> Self {
19352            std::default::Default::default()
19353        }
19354
19355        /// Sets the value of [sql_expression][crate::model::data_quality_rule::RowConditionExpectation::sql_expression].
19356        ///
19357        /// # Example
19358        /// ```ignore,no_run
19359        /// # use google_cloud_dataplex_v1::model::data_quality_rule::RowConditionExpectation;
19360        /// let x = RowConditionExpectation::new().set_sql_expression("example");
19361        /// ```
19362        pub fn set_sql_expression<T: std::convert::Into<std::string::String>>(
19363            mut self,
19364            v: T,
19365        ) -> Self {
19366            self.sql_expression = v.into();
19367            self
19368        }
19369    }
19370
19371    impl wkt::message::Message for RowConditionExpectation {
19372        fn typename() -> &'static str {
19373            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation"
19374        }
19375    }
19376
19377    /// Evaluates whether the provided expression is true.
19378    ///
19379    /// The SQL expression needs to use [GoogleSQL
19380    /// syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax)
19381    /// and should produce a scalar boolean result.
19382    ///
19383    /// Example: MIN(col1) >= 0
19384    #[derive(Clone, Default, PartialEq)]
19385    #[non_exhaustive]
19386    pub struct TableConditionExpectation {
19387        /// Optional. The SQL expression.
19388        pub sql_expression: std::string::String,
19389
19390        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19391    }
19392
19393    impl TableConditionExpectation {
19394        pub fn new() -> Self {
19395            std::default::Default::default()
19396        }
19397
19398        /// Sets the value of [sql_expression][crate::model::data_quality_rule::TableConditionExpectation::sql_expression].
19399        ///
19400        /// # Example
19401        /// ```ignore,no_run
19402        /// # use google_cloud_dataplex_v1::model::data_quality_rule::TableConditionExpectation;
19403        /// let x = TableConditionExpectation::new().set_sql_expression("example");
19404        /// ```
19405        pub fn set_sql_expression<T: std::convert::Into<std::string::String>>(
19406            mut self,
19407            v: T,
19408        ) -> Self {
19409            self.sql_expression = v.into();
19410            self
19411        }
19412    }
19413
19414    impl wkt::message::Message for TableConditionExpectation {
19415        fn typename() -> &'static str {
19416            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation"
19417        }
19418    }
19419
19420    /// A SQL statement that is evaluated to return rows that match an invalid
19421    /// state. If any rows are are returned, this rule fails.
19422    ///
19423    /// The SQL statement must use [GoogleSQL
19424    /// syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax),
19425    /// and must not contain any semicolons.
19426    ///
19427    /// You can use the data reference parameter `${data()}` to reference the
19428    /// source table with all of its precondition filters applied. Examples of
19429    /// precondition filters include row filters, incremental data filters, and
19430    /// sampling. For more information, see [Data reference
19431    /// parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter).
19432    ///
19433    /// Example: `SELECT * FROM ${data()} WHERE price < 0`
19434    #[derive(Clone, Default, PartialEq)]
19435    #[non_exhaustive]
19436    pub struct SqlAssertion {
19437        /// Optional. The SQL statement.
19438        pub sql_statement: std::string::String,
19439
19440        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19441    }
19442
19443    impl SqlAssertion {
19444        pub fn new() -> Self {
19445            std::default::Default::default()
19446        }
19447
19448        /// Sets the value of [sql_statement][crate::model::data_quality_rule::SqlAssertion::sql_statement].
19449        ///
19450        /// # Example
19451        /// ```ignore,no_run
19452        /// # use google_cloud_dataplex_v1::model::data_quality_rule::SqlAssertion;
19453        /// let x = SqlAssertion::new().set_sql_statement("example");
19454        /// ```
19455        pub fn set_sql_statement<T: std::convert::Into<std::string::String>>(
19456            mut self,
19457            v: T,
19458        ) -> Self {
19459            self.sql_statement = v.into();
19460            self
19461        }
19462    }
19463
19464    impl wkt::message::Message for SqlAssertion {
19465        fn typename() -> &'static str {
19466            "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.SqlAssertion"
19467        }
19468    }
19469
19470    /// The rule-specific configuration.
19471    #[derive(Clone, Debug, PartialEq)]
19472    #[non_exhaustive]
19473    pub enum RuleType {
19474        /// Row-level rule which evaluates whether each column value lies between a
19475        /// specified range.
19476        RangeExpectation(std::boxed::Box<crate::model::data_quality_rule::RangeExpectation>),
19477        /// Row-level rule which evaluates whether each column value is null.
19478        NonNullExpectation(std::boxed::Box<crate::model::data_quality_rule::NonNullExpectation>),
19479        /// Row-level rule which evaluates whether each column value is contained by
19480        /// a specified set.
19481        SetExpectation(std::boxed::Box<crate::model::data_quality_rule::SetExpectation>),
19482        /// Row-level rule which evaluates whether each column value matches a
19483        /// specified regex.
19484        RegexExpectation(std::boxed::Box<crate::model::data_quality_rule::RegexExpectation>),
19485        /// Row-level rule which evaluates whether each column value is unique.
19486        UniquenessExpectation(
19487            std::boxed::Box<crate::model::data_quality_rule::UniquenessExpectation>,
19488        ),
19489        /// Aggregate rule which evaluates whether the column aggregate
19490        /// statistic lies between a specified range.
19491        StatisticRangeExpectation(
19492            std::boxed::Box<crate::model::data_quality_rule::StatisticRangeExpectation>,
19493        ),
19494        /// Row-level rule which evaluates whether each row in a table passes the
19495        /// specified condition.
19496        RowConditionExpectation(
19497            std::boxed::Box<crate::model::data_quality_rule::RowConditionExpectation>,
19498        ),
19499        /// Aggregate rule which evaluates whether the provided expression is true
19500        /// for a table.
19501        TableConditionExpectation(
19502            std::boxed::Box<crate::model::data_quality_rule::TableConditionExpectation>,
19503        ),
19504        /// Aggregate rule which evaluates the number of rows returned for the
19505        /// provided statement. If any rows are returned, this rule fails.
19506        SqlAssertion(std::boxed::Box<crate::model::data_quality_rule::SqlAssertion>),
19507    }
19508}
19509
19510/// DataQualityColumnResult provides a more detailed, per-column view of
19511/// the results.
19512#[derive(Clone, Default, PartialEq)]
19513#[non_exhaustive]
19514pub struct DataQualityColumnResult {
19515    /// Output only. The column specified in the DataQualityRule.
19516    pub column: std::string::String,
19517
19518    /// Output only. The column-level data quality score for this data scan job if
19519    /// and only if the 'column' field is set.
19520    ///
19521    /// The score ranges between between [0, 100] (up to two decimal
19522    /// points).
19523    pub score: std::option::Option<f32>,
19524
19525    /// Output only. Whether the column passed or failed.
19526    pub passed: bool,
19527
19528    /// Output only. The dimension-level results for this column.
19529    pub dimensions: std::vec::Vec<crate::model::DataQualityDimensionResult>,
19530
19531    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19532}
19533
19534impl DataQualityColumnResult {
19535    pub fn new() -> Self {
19536        std::default::Default::default()
19537    }
19538
19539    /// Sets the value of [column][crate::model::DataQualityColumnResult::column].
19540    ///
19541    /// # Example
19542    /// ```ignore,no_run
19543    /// # use google_cloud_dataplex_v1::model::DataQualityColumnResult;
19544    /// let x = DataQualityColumnResult::new().set_column("example");
19545    /// ```
19546    pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19547        self.column = v.into();
19548        self
19549    }
19550
19551    /// Sets the value of [score][crate::model::DataQualityColumnResult::score].
19552    ///
19553    /// # Example
19554    /// ```ignore,no_run
19555    /// # use google_cloud_dataplex_v1::model::DataQualityColumnResult;
19556    /// let x = DataQualityColumnResult::new().set_score(42.0);
19557    /// ```
19558    pub fn set_score<T>(mut self, v: T) -> Self
19559    where
19560        T: std::convert::Into<f32>,
19561    {
19562        self.score = std::option::Option::Some(v.into());
19563        self
19564    }
19565
19566    /// Sets or clears the value of [score][crate::model::DataQualityColumnResult::score].
19567    ///
19568    /// # Example
19569    /// ```ignore,no_run
19570    /// # use google_cloud_dataplex_v1::model::DataQualityColumnResult;
19571    /// let x = DataQualityColumnResult::new().set_or_clear_score(Some(42.0));
19572    /// let x = DataQualityColumnResult::new().set_or_clear_score(None::<f32>);
19573    /// ```
19574    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
19575    where
19576        T: std::convert::Into<f32>,
19577    {
19578        self.score = v.map(|x| x.into());
19579        self
19580    }
19581
19582    /// Sets the value of [passed][crate::model::DataQualityColumnResult::passed].
19583    ///
19584    /// # Example
19585    /// ```ignore,no_run
19586    /// # use google_cloud_dataplex_v1::model::DataQualityColumnResult;
19587    /// let x = DataQualityColumnResult::new().set_passed(true);
19588    /// ```
19589    pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19590        self.passed = v.into();
19591        self
19592    }
19593
19594    /// Sets the value of [dimensions][crate::model::DataQualityColumnResult::dimensions].
19595    ///
19596    /// # Example
19597    /// ```ignore,no_run
19598    /// # use google_cloud_dataplex_v1::model::DataQualityColumnResult;
19599    /// use google_cloud_dataplex_v1::model::DataQualityDimensionResult;
19600    /// let x = DataQualityColumnResult::new()
19601    ///     .set_dimensions([
19602    ///         DataQualityDimensionResult::default()/* use setters */,
19603    ///         DataQualityDimensionResult::default()/* use (different) setters */,
19604    ///     ]);
19605    /// ```
19606    pub fn set_dimensions<T, V>(mut self, v: T) -> Self
19607    where
19608        T: std::iter::IntoIterator<Item = V>,
19609        V: std::convert::Into<crate::model::DataQualityDimensionResult>,
19610    {
19611        use std::iter::Iterator;
19612        self.dimensions = v.into_iter().map(|i| i.into()).collect();
19613        self
19614    }
19615}
19616
19617impl wkt::message::Message for DataQualityColumnResult {
19618    fn typename() -> &'static str {
19619        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityColumnResult"
19620    }
19621}
19622
19623/// DataTaxonomy represents a set of hierarchical DataAttributes resources,
19624/// grouped with a common theme Eg: 'SensitiveDataTaxonomy' can have attributes
19625/// to manage PII data. It is defined at project level.
19626#[derive(Clone, Default, PartialEq)]
19627#[non_exhaustive]
19628#[deprecated]
19629pub struct DataTaxonomy {
19630    /// Output only. The relative resource name of the DataTaxonomy, of the form:
19631    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}.
19632    pub name: std::string::String,
19633
19634    /// Output only. System generated globally unique ID for the dataTaxonomy. This
19635    /// ID will be different if the DataTaxonomy is deleted and re-created with the
19636    /// same name.
19637    pub uid: std::string::String,
19638
19639    /// Output only. The time when the DataTaxonomy was created.
19640    pub create_time: std::option::Option<wkt::Timestamp>,
19641
19642    /// Output only. The time when the DataTaxonomy was last updated.
19643    pub update_time: std::option::Option<wkt::Timestamp>,
19644
19645    /// Optional. Description of the DataTaxonomy.
19646    pub description: std::string::String,
19647
19648    /// Optional. User friendly display name.
19649    pub display_name: std::string::String,
19650
19651    /// Optional. User-defined labels for the DataTaxonomy.
19652    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
19653
19654    /// Output only. The number of attributes in the DataTaxonomy.
19655    pub attribute_count: i32,
19656
19657    /// This checksum is computed by the server based on the value of other
19658    /// fields, and may be sent on update and delete requests to ensure the
19659    /// client has an up-to-date value before proceeding.
19660    pub etag: std::string::String,
19661
19662    /// Output only. The number of classes in the DataTaxonomy.
19663    pub class_count: i32,
19664
19665    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19666}
19667
19668impl DataTaxonomy {
19669    pub fn new() -> Self {
19670        std::default::Default::default()
19671    }
19672
19673    /// Sets the value of [name][crate::model::DataTaxonomy::name].
19674    ///
19675    /// # Example
19676    /// ```ignore,no_run
19677    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19678    /// let x = DataTaxonomy::new().set_name("example");
19679    /// ```
19680    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19681        self.name = v.into();
19682        self
19683    }
19684
19685    /// Sets the value of [uid][crate::model::DataTaxonomy::uid].
19686    ///
19687    /// # Example
19688    /// ```ignore,no_run
19689    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19690    /// let x = DataTaxonomy::new().set_uid("example");
19691    /// ```
19692    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19693        self.uid = v.into();
19694        self
19695    }
19696
19697    /// Sets the value of [create_time][crate::model::DataTaxonomy::create_time].
19698    ///
19699    /// # Example
19700    /// ```ignore,no_run
19701    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19702    /// use wkt::Timestamp;
19703    /// let x = DataTaxonomy::new().set_create_time(Timestamp::default()/* use setters */);
19704    /// ```
19705    pub fn set_create_time<T>(mut self, v: T) -> Self
19706    where
19707        T: std::convert::Into<wkt::Timestamp>,
19708    {
19709        self.create_time = std::option::Option::Some(v.into());
19710        self
19711    }
19712
19713    /// Sets or clears the value of [create_time][crate::model::DataTaxonomy::create_time].
19714    ///
19715    /// # Example
19716    /// ```ignore,no_run
19717    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19718    /// use wkt::Timestamp;
19719    /// let x = DataTaxonomy::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
19720    /// let x = DataTaxonomy::new().set_or_clear_create_time(None::<Timestamp>);
19721    /// ```
19722    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
19723    where
19724        T: std::convert::Into<wkt::Timestamp>,
19725    {
19726        self.create_time = v.map(|x| x.into());
19727        self
19728    }
19729
19730    /// Sets the value of [update_time][crate::model::DataTaxonomy::update_time].
19731    ///
19732    /// # Example
19733    /// ```ignore,no_run
19734    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19735    /// use wkt::Timestamp;
19736    /// let x = DataTaxonomy::new().set_update_time(Timestamp::default()/* use setters */);
19737    /// ```
19738    pub fn set_update_time<T>(mut self, v: T) -> Self
19739    where
19740        T: std::convert::Into<wkt::Timestamp>,
19741    {
19742        self.update_time = std::option::Option::Some(v.into());
19743        self
19744    }
19745
19746    /// Sets or clears the value of [update_time][crate::model::DataTaxonomy::update_time].
19747    ///
19748    /// # Example
19749    /// ```ignore,no_run
19750    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19751    /// use wkt::Timestamp;
19752    /// let x = DataTaxonomy::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
19753    /// let x = DataTaxonomy::new().set_or_clear_update_time(None::<Timestamp>);
19754    /// ```
19755    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
19756    where
19757        T: std::convert::Into<wkt::Timestamp>,
19758    {
19759        self.update_time = v.map(|x| x.into());
19760        self
19761    }
19762
19763    /// Sets the value of [description][crate::model::DataTaxonomy::description].
19764    ///
19765    /// # Example
19766    /// ```ignore,no_run
19767    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19768    /// let x = DataTaxonomy::new().set_description("example");
19769    /// ```
19770    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19771        self.description = v.into();
19772        self
19773    }
19774
19775    /// Sets the value of [display_name][crate::model::DataTaxonomy::display_name].
19776    ///
19777    /// # Example
19778    /// ```ignore,no_run
19779    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19780    /// let x = DataTaxonomy::new().set_display_name("example");
19781    /// ```
19782    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19783        self.display_name = v.into();
19784        self
19785    }
19786
19787    /// Sets the value of [labels][crate::model::DataTaxonomy::labels].
19788    ///
19789    /// # Example
19790    /// ```ignore,no_run
19791    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19792    /// let x = DataTaxonomy::new().set_labels([
19793    ///     ("key0", "abc"),
19794    ///     ("key1", "xyz"),
19795    /// ]);
19796    /// ```
19797    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
19798    where
19799        T: std::iter::IntoIterator<Item = (K, V)>,
19800        K: std::convert::Into<std::string::String>,
19801        V: std::convert::Into<std::string::String>,
19802    {
19803        use std::iter::Iterator;
19804        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
19805        self
19806    }
19807
19808    /// Sets the value of [attribute_count][crate::model::DataTaxonomy::attribute_count].
19809    ///
19810    /// # Example
19811    /// ```ignore,no_run
19812    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19813    /// let x = DataTaxonomy::new().set_attribute_count(42);
19814    /// ```
19815    pub fn set_attribute_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19816        self.attribute_count = v.into();
19817        self
19818    }
19819
19820    /// Sets the value of [etag][crate::model::DataTaxonomy::etag].
19821    ///
19822    /// # Example
19823    /// ```ignore,no_run
19824    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19825    /// let x = DataTaxonomy::new().set_etag("example");
19826    /// ```
19827    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19828        self.etag = v.into();
19829        self
19830    }
19831
19832    /// Sets the value of [class_count][crate::model::DataTaxonomy::class_count].
19833    ///
19834    /// # Example
19835    /// ```ignore,no_run
19836    /// # use google_cloud_dataplex_v1::model::DataTaxonomy;
19837    /// let x = DataTaxonomy::new().set_class_count(42);
19838    /// ```
19839    pub fn set_class_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19840        self.class_count = v.into();
19841        self
19842    }
19843}
19844
19845impl wkt::message::Message for DataTaxonomy {
19846    fn typename() -> &'static str {
19847        "type.googleapis.com/google.cloud.dataplex.v1.DataTaxonomy"
19848    }
19849}
19850
19851/// Denotes one dataAttribute in a dataTaxonomy, for example, PII.
19852/// DataAttribute resources can be defined in a hierarchy.
19853/// A single dataAttribute resource can contain specs of multiple types
19854///
19855/// ```norust
19856/// PII
19857///   - ResourceAccessSpec :
19858///                 - readers :foo@bar.com
19859///   - DataAccessSpec :
19860///                 - readers :bar@foo.com
19861/// ```
19862#[derive(Clone, Default, PartialEq)]
19863#[non_exhaustive]
19864#[deprecated]
19865pub struct DataAttribute {
19866    /// Output only. The relative resource name of the dataAttribute, of the form:
19867    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.
19868    pub name: std::string::String,
19869
19870    /// Output only. System generated globally unique ID for the DataAttribute.
19871    /// This ID will be different if the DataAttribute is deleted and re-created
19872    /// with the same name.
19873    pub uid: std::string::String,
19874
19875    /// Output only. The time when the DataAttribute was created.
19876    pub create_time: std::option::Option<wkt::Timestamp>,
19877
19878    /// Output only. The time when the DataAttribute was last updated.
19879    pub update_time: std::option::Option<wkt::Timestamp>,
19880
19881    /// Optional. Description of the DataAttribute.
19882    pub description: std::string::String,
19883
19884    /// Optional. User friendly display name.
19885    pub display_name: std::string::String,
19886
19887    /// Optional. User-defined labels for the DataAttribute.
19888    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
19889
19890    /// Optional. The ID of the parent DataAttribute resource, should belong to the
19891    /// same data taxonomy. Circular dependency in parent chain is not valid.
19892    /// Maximum depth of the hierarchy allowed is 4.
19893    /// [a -> b -> c -> d -> e, depth = 4]
19894    pub parent_id: std::string::String,
19895
19896    /// Output only. The number of child attributes present for this attribute.
19897    pub attribute_count: i32,
19898
19899    /// This checksum is computed by the server based on the value of other
19900    /// fields, and may be sent on update and delete requests to ensure the
19901    /// client has an up-to-date value before proceeding.
19902    pub etag: std::string::String,
19903
19904    /// Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
19905    /// BigQuery dataset, BigQuery table).
19906    pub resource_access_spec: std::option::Option<crate::model::ResourceAccessSpec>,
19907
19908    /// Optional. Specified when applied to data stored on the resource (eg: rows,
19909    /// columns in BigQuery Tables).
19910    pub data_access_spec: std::option::Option<crate::model::DataAccessSpec>,
19911
19912    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19913}
19914
19915impl DataAttribute {
19916    pub fn new() -> Self {
19917        std::default::Default::default()
19918    }
19919
19920    /// Sets the value of [name][crate::model::DataAttribute::name].
19921    ///
19922    /// # Example
19923    /// ```ignore,no_run
19924    /// # use google_cloud_dataplex_v1::model::DataAttribute;
19925    /// let x = DataAttribute::new().set_name("example");
19926    /// ```
19927    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19928        self.name = v.into();
19929        self
19930    }
19931
19932    /// Sets the value of [uid][crate::model::DataAttribute::uid].
19933    ///
19934    /// # Example
19935    /// ```ignore,no_run
19936    /// # use google_cloud_dataplex_v1::model::DataAttribute;
19937    /// let x = DataAttribute::new().set_uid("example");
19938    /// ```
19939    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19940        self.uid = v.into();
19941        self
19942    }
19943
19944    /// Sets the value of [create_time][crate::model::DataAttribute::create_time].
19945    ///
19946    /// # Example
19947    /// ```ignore,no_run
19948    /// # use google_cloud_dataplex_v1::model::DataAttribute;
19949    /// use wkt::Timestamp;
19950    /// let x = DataAttribute::new().set_create_time(Timestamp::default()/* use setters */);
19951    /// ```
19952    pub fn set_create_time<T>(mut self, v: T) -> Self
19953    where
19954        T: std::convert::Into<wkt::Timestamp>,
19955    {
19956        self.create_time = std::option::Option::Some(v.into());
19957        self
19958    }
19959
19960    /// Sets or clears the value of [create_time][crate::model::DataAttribute::create_time].
19961    ///
19962    /// # Example
19963    /// ```ignore,no_run
19964    /// # use google_cloud_dataplex_v1::model::DataAttribute;
19965    /// use wkt::Timestamp;
19966    /// let x = DataAttribute::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
19967    /// let x = DataAttribute::new().set_or_clear_create_time(None::<Timestamp>);
19968    /// ```
19969    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
19970    where
19971        T: std::convert::Into<wkt::Timestamp>,
19972    {
19973        self.create_time = v.map(|x| x.into());
19974        self
19975    }
19976
19977    /// Sets the value of [update_time][crate::model::DataAttribute::update_time].
19978    ///
19979    /// # Example
19980    /// ```ignore,no_run
19981    /// # use google_cloud_dataplex_v1::model::DataAttribute;
19982    /// use wkt::Timestamp;
19983    /// let x = DataAttribute::new().set_update_time(Timestamp::default()/* use setters */);
19984    /// ```
19985    pub fn set_update_time<T>(mut self, v: T) -> Self
19986    where
19987        T: std::convert::Into<wkt::Timestamp>,
19988    {
19989        self.update_time = std::option::Option::Some(v.into());
19990        self
19991    }
19992
19993    /// Sets or clears the value of [update_time][crate::model::DataAttribute::update_time].
19994    ///
19995    /// # Example
19996    /// ```ignore,no_run
19997    /// # use google_cloud_dataplex_v1::model::DataAttribute;
19998    /// use wkt::Timestamp;
19999    /// let x = DataAttribute::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
20000    /// let x = DataAttribute::new().set_or_clear_update_time(None::<Timestamp>);
20001    /// ```
20002    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
20003    where
20004        T: std::convert::Into<wkt::Timestamp>,
20005    {
20006        self.update_time = v.map(|x| x.into());
20007        self
20008    }
20009
20010    /// Sets the value of [description][crate::model::DataAttribute::description].
20011    ///
20012    /// # Example
20013    /// ```ignore,no_run
20014    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20015    /// let x = DataAttribute::new().set_description("example");
20016    /// ```
20017    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20018        self.description = v.into();
20019        self
20020    }
20021
20022    /// Sets the value of [display_name][crate::model::DataAttribute::display_name].
20023    ///
20024    /// # Example
20025    /// ```ignore,no_run
20026    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20027    /// let x = DataAttribute::new().set_display_name("example");
20028    /// ```
20029    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20030        self.display_name = v.into();
20031        self
20032    }
20033
20034    /// Sets the value of [labels][crate::model::DataAttribute::labels].
20035    ///
20036    /// # Example
20037    /// ```ignore,no_run
20038    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20039    /// let x = DataAttribute::new().set_labels([
20040    ///     ("key0", "abc"),
20041    ///     ("key1", "xyz"),
20042    /// ]);
20043    /// ```
20044    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
20045    where
20046        T: std::iter::IntoIterator<Item = (K, V)>,
20047        K: std::convert::Into<std::string::String>,
20048        V: std::convert::Into<std::string::String>,
20049    {
20050        use std::iter::Iterator;
20051        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
20052        self
20053    }
20054
20055    /// Sets the value of [parent_id][crate::model::DataAttribute::parent_id].
20056    ///
20057    /// # Example
20058    /// ```ignore,no_run
20059    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20060    /// let x = DataAttribute::new().set_parent_id("example");
20061    /// ```
20062    pub fn set_parent_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20063        self.parent_id = v.into();
20064        self
20065    }
20066
20067    /// Sets the value of [attribute_count][crate::model::DataAttribute::attribute_count].
20068    ///
20069    /// # Example
20070    /// ```ignore,no_run
20071    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20072    /// let x = DataAttribute::new().set_attribute_count(42);
20073    /// ```
20074    pub fn set_attribute_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20075        self.attribute_count = v.into();
20076        self
20077    }
20078
20079    /// Sets the value of [etag][crate::model::DataAttribute::etag].
20080    ///
20081    /// # Example
20082    /// ```ignore,no_run
20083    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20084    /// let x = DataAttribute::new().set_etag("example");
20085    /// ```
20086    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20087        self.etag = v.into();
20088        self
20089    }
20090
20091    /// Sets the value of [resource_access_spec][crate::model::DataAttribute::resource_access_spec].
20092    ///
20093    /// # Example
20094    /// ```ignore,no_run
20095    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20096    /// use google_cloud_dataplex_v1::model::ResourceAccessSpec;
20097    /// let x = DataAttribute::new().set_resource_access_spec(ResourceAccessSpec::default()/* use setters */);
20098    /// ```
20099    pub fn set_resource_access_spec<T>(mut self, v: T) -> Self
20100    where
20101        T: std::convert::Into<crate::model::ResourceAccessSpec>,
20102    {
20103        self.resource_access_spec = std::option::Option::Some(v.into());
20104        self
20105    }
20106
20107    /// Sets or clears the value of [resource_access_spec][crate::model::DataAttribute::resource_access_spec].
20108    ///
20109    /// # Example
20110    /// ```ignore,no_run
20111    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20112    /// use google_cloud_dataplex_v1::model::ResourceAccessSpec;
20113    /// let x = DataAttribute::new().set_or_clear_resource_access_spec(Some(ResourceAccessSpec::default()/* use setters */));
20114    /// let x = DataAttribute::new().set_or_clear_resource_access_spec(None::<ResourceAccessSpec>);
20115    /// ```
20116    pub fn set_or_clear_resource_access_spec<T>(mut self, v: std::option::Option<T>) -> Self
20117    where
20118        T: std::convert::Into<crate::model::ResourceAccessSpec>,
20119    {
20120        self.resource_access_spec = v.map(|x| x.into());
20121        self
20122    }
20123
20124    /// Sets the value of [data_access_spec][crate::model::DataAttribute::data_access_spec].
20125    ///
20126    /// # Example
20127    /// ```ignore,no_run
20128    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20129    /// use google_cloud_dataplex_v1::model::DataAccessSpec;
20130    /// let x = DataAttribute::new().set_data_access_spec(DataAccessSpec::default()/* use setters */);
20131    /// ```
20132    pub fn set_data_access_spec<T>(mut self, v: T) -> Self
20133    where
20134        T: std::convert::Into<crate::model::DataAccessSpec>,
20135    {
20136        self.data_access_spec = std::option::Option::Some(v.into());
20137        self
20138    }
20139
20140    /// Sets or clears the value of [data_access_spec][crate::model::DataAttribute::data_access_spec].
20141    ///
20142    /// # Example
20143    /// ```ignore,no_run
20144    /// # use google_cloud_dataplex_v1::model::DataAttribute;
20145    /// use google_cloud_dataplex_v1::model::DataAccessSpec;
20146    /// let x = DataAttribute::new().set_or_clear_data_access_spec(Some(DataAccessSpec::default()/* use setters */));
20147    /// let x = DataAttribute::new().set_or_clear_data_access_spec(None::<DataAccessSpec>);
20148    /// ```
20149    pub fn set_or_clear_data_access_spec<T>(mut self, v: std::option::Option<T>) -> Self
20150    where
20151        T: std::convert::Into<crate::model::DataAccessSpec>,
20152    {
20153        self.data_access_spec = v.map(|x| x.into());
20154        self
20155    }
20156}
20157
20158impl wkt::message::Message for DataAttribute {
20159    fn typename() -> &'static str {
20160        "type.googleapis.com/google.cloud.dataplex.v1.DataAttribute"
20161    }
20162}
20163
20164/// DataAttributeBinding represents binding of attributes to resources. Eg: Bind
20165/// 'CustomerInfo' entity with 'PII' attribute.
20166#[derive(Clone, Default, PartialEq)]
20167#[non_exhaustive]
20168#[deprecated]
20169pub struct DataAttributeBinding {
20170    /// Output only. The relative resource name of the Data Attribute Binding, of
20171    /// the form:
20172    /// projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}
20173    pub name: std::string::String,
20174
20175    /// Output only. System generated globally unique ID for the
20176    /// DataAttributeBinding. This ID will be different if the DataAttributeBinding
20177    /// is deleted and re-created with the same name.
20178    pub uid: std::string::String,
20179
20180    /// Output only. The time when the DataAttributeBinding was created.
20181    pub create_time: std::option::Option<wkt::Timestamp>,
20182
20183    /// Output only. The time when the DataAttributeBinding was last updated.
20184    pub update_time: std::option::Option<wkt::Timestamp>,
20185
20186    /// Optional. Description of the DataAttributeBinding.
20187    pub description: std::string::String,
20188
20189    /// Optional. User friendly display name.
20190    pub display_name: std::string::String,
20191
20192    /// Optional. User-defined labels for the DataAttributeBinding.
20193    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
20194
20195    /// This checksum is computed by the server based on the value of other
20196    /// fields, and may be sent on update and delete requests to ensure the
20197    /// client has an up-to-date value before proceeding.
20198    /// Etags must be used when calling the DeleteDataAttributeBinding and the
20199    /// UpdateDataAttributeBinding method.
20200    pub etag: std::string::String,
20201
20202    /// Optional. List of attributes to be associated with the resource, provided
20203    /// in the form:
20204    /// projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
20205    pub attributes: std::vec::Vec<std::string::String>,
20206
20207    /// Optional. The list of paths for items within the associated resource (eg.
20208    /// columns and partitions within a table) along with attribute bindings.
20209    pub paths: std::vec::Vec<crate::model::data_attribute_binding::Path>,
20210
20211    /// The reference to the resource that is associated to attributes, or
20212    /// the query to match resources and associate attributes.
20213    pub resource_reference:
20214        std::option::Option<crate::model::data_attribute_binding::ResourceReference>,
20215
20216    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20217}
20218
20219impl DataAttributeBinding {
20220    pub fn new() -> Self {
20221        std::default::Default::default()
20222    }
20223
20224    /// Sets the value of [name][crate::model::DataAttributeBinding::name].
20225    ///
20226    /// # Example
20227    /// ```ignore,no_run
20228    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20229    /// let x = DataAttributeBinding::new().set_name("example");
20230    /// ```
20231    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20232        self.name = v.into();
20233        self
20234    }
20235
20236    /// Sets the value of [uid][crate::model::DataAttributeBinding::uid].
20237    ///
20238    /// # Example
20239    /// ```ignore,no_run
20240    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20241    /// let x = DataAttributeBinding::new().set_uid("example");
20242    /// ```
20243    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20244        self.uid = v.into();
20245        self
20246    }
20247
20248    /// Sets the value of [create_time][crate::model::DataAttributeBinding::create_time].
20249    ///
20250    /// # Example
20251    /// ```ignore,no_run
20252    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20253    /// use wkt::Timestamp;
20254    /// let x = DataAttributeBinding::new().set_create_time(Timestamp::default()/* use setters */);
20255    /// ```
20256    pub fn set_create_time<T>(mut self, v: T) -> Self
20257    where
20258        T: std::convert::Into<wkt::Timestamp>,
20259    {
20260        self.create_time = std::option::Option::Some(v.into());
20261        self
20262    }
20263
20264    /// Sets or clears the value of [create_time][crate::model::DataAttributeBinding::create_time].
20265    ///
20266    /// # Example
20267    /// ```ignore,no_run
20268    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20269    /// use wkt::Timestamp;
20270    /// let x = DataAttributeBinding::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
20271    /// let x = DataAttributeBinding::new().set_or_clear_create_time(None::<Timestamp>);
20272    /// ```
20273    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
20274    where
20275        T: std::convert::Into<wkt::Timestamp>,
20276    {
20277        self.create_time = v.map(|x| x.into());
20278        self
20279    }
20280
20281    /// Sets the value of [update_time][crate::model::DataAttributeBinding::update_time].
20282    ///
20283    /// # Example
20284    /// ```ignore,no_run
20285    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20286    /// use wkt::Timestamp;
20287    /// let x = DataAttributeBinding::new().set_update_time(Timestamp::default()/* use setters */);
20288    /// ```
20289    pub fn set_update_time<T>(mut self, v: T) -> Self
20290    where
20291        T: std::convert::Into<wkt::Timestamp>,
20292    {
20293        self.update_time = std::option::Option::Some(v.into());
20294        self
20295    }
20296
20297    /// Sets or clears the value of [update_time][crate::model::DataAttributeBinding::update_time].
20298    ///
20299    /// # Example
20300    /// ```ignore,no_run
20301    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20302    /// use wkt::Timestamp;
20303    /// let x = DataAttributeBinding::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
20304    /// let x = DataAttributeBinding::new().set_or_clear_update_time(None::<Timestamp>);
20305    /// ```
20306    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
20307    where
20308        T: std::convert::Into<wkt::Timestamp>,
20309    {
20310        self.update_time = v.map(|x| x.into());
20311        self
20312    }
20313
20314    /// Sets the value of [description][crate::model::DataAttributeBinding::description].
20315    ///
20316    /// # Example
20317    /// ```ignore,no_run
20318    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20319    /// let x = DataAttributeBinding::new().set_description("example");
20320    /// ```
20321    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20322        self.description = v.into();
20323        self
20324    }
20325
20326    /// Sets the value of [display_name][crate::model::DataAttributeBinding::display_name].
20327    ///
20328    /// # Example
20329    /// ```ignore,no_run
20330    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20331    /// let x = DataAttributeBinding::new().set_display_name("example");
20332    /// ```
20333    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20334        self.display_name = v.into();
20335        self
20336    }
20337
20338    /// Sets the value of [labels][crate::model::DataAttributeBinding::labels].
20339    ///
20340    /// # Example
20341    /// ```ignore,no_run
20342    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20343    /// let x = DataAttributeBinding::new().set_labels([
20344    ///     ("key0", "abc"),
20345    ///     ("key1", "xyz"),
20346    /// ]);
20347    /// ```
20348    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
20349    where
20350        T: std::iter::IntoIterator<Item = (K, V)>,
20351        K: std::convert::Into<std::string::String>,
20352        V: std::convert::Into<std::string::String>,
20353    {
20354        use std::iter::Iterator;
20355        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
20356        self
20357    }
20358
20359    /// Sets the value of [etag][crate::model::DataAttributeBinding::etag].
20360    ///
20361    /// # Example
20362    /// ```ignore,no_run
20363    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20364    /// let x = DataAttributeBinding::new().set_etag("example");
20365    /// ```
20366    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20367        self.etag = v.into();
20368        self
20369    }
20370
20371    /// Sets the value of [attributes][crate::model::DataAttributeBinding::attributes].
20372    ///
20373    /// # Example
20374    /// ```ignore,no_run
20375    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20376    /// let x = DataAttributeBinding::new().set_attributes(["a", "b", "c"]);
20377    /// ```
20378    pub fn set_attributes<T, V>(mut self, v: T) -> Self
20379    where
20380        T: std::iter::IntoIterator<Item = V>,
20381        V: std::convert::Into<std::string::String>,
20382    {
20383        use std::iter::Iterator;
20384        self.attributes = v.into_iter().map(|i| i.into()).collect();
20385        self
20386    }
20387
20388    /// Sets the value of [paths][crate::model::DataAttributeBinding::paths].
20389    ///
20390    /// # Example
20391    /// ```ignore,no_run
20392    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20393    /// use google_cloud_dataplex_v1::model::data_attribute_binding::Path;
20394    /// let x = DataAttributeBinding::new()
20395    ///     .set_paths([
20396    ///         Path::default()/* use setters */,
20397    ///         Path::default()/* use (different) setters */,
20398    ///     ]);
20399    /// ```
20400    pub fn set_paths<T, V>(mut self, v: T) -> Self
20401    where
20402        T: std::iter::IntoIterator<Item = V>,
20403        V: std::convert::Into<crate::model::data_attribute_binding::Path>,
20404    {
20405        use std::iter::Iterator;
20406        self.paths = v.into_iter().map(|i| i.into()).collect();
20407        self
20408    }
20409
20410    /// Sets the value of [resource_reference][crate::model::DataAttributeBinding::resource_reference].
20411    ///
20412    /// Note that all the setters affecting `resource_reference` are mutually
20413    /// exclusive.
20414    ///
20415    /// # Example
20416    /// ```ignore,no_run
20417    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20418    /// use google_cloud_dataplex_v1::model::data_attribute_binding::ResourceReference;
20419    /// let x = DataAttributeBinding::new().set_resource_reference(Some(ResourceReference::Resource("example".to_string())));
20420    /// ```
20421    pub fn set_resource_reference<
20422        T: std::convert::Into<
20423                std::option::Option<crate::model::data_attribute_binding::ResourceReference>,
20424            >,
20425    >(
20426        mut self,
20427        v: T,
20428    ) -> Self {
20429        self.resource_reference = v.into();
20430        self
20431    }
20432
20433    /// The value of [resource_reference][crate::model::DataAttributeBinding::resource_reference]
20434    /// if it holds a `Resource`, `None` if the field is not set or
20435    /// holds a different branch.
20436    pub fn resource(&self) -> std::option::Option<&std::string::String> {
20437        #[allow(unreachable_patterns)]
20438        self.resource_reference.as_ref().and_then(|v| match v {
20439            crate::model::data_attribute_binding::ResourceReference::Resource(v) => {
20440                std::option::Option::Some(v)
20441            }
20442            _ => std::option::Option::None,
20443        })
20444    }
20445
20446    /// Sets the value of [resource_reference][crate::model::DataAttributeBinding::resource_reference]
20447    /// to hold a `Resource`.
20448    ///
20449    /// Note that all the setters affecting `resource_reference` are
20450    /// mutually exclusive.
20451    ///
20452    /// # Example
20453    /// ```ignore,no_run
20454    /// # use google_cloud_dataplex_v1::model::DataAttributeBinding;
20455    /// let x = DataAttributeBinding::new().set_resource("example");
20456    /// assert!(x.resource().is_some());
20457    /// ```
20458    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20459        self.resource_reference = std::option::Option::Some(
20460            crate::model::data_attribute_binding::ResourceReference::Resource(v.into()),
20461        );
20462        self
20463    }
20464}
20465
20466impl wkt::message::Message for DataAttributeBinding {
20467    fn typename() -> &'static str {
20468        "type.googleapis.com/google.cloud.dataplex.v1.DataAttributeBinding"
20469    }
20470}
20471
20472/// Defines additional types related to [DataAttributeBinding].
20473pub mod data_attribute_binding {
20474    #[allow(unused_imports)]
20475    use super::*;
20476
20477    /// Represents a subresource of the given resource, and associated bindings
20478    /// with it. Currently supported subresources are column and partition schema
20479    /// fields within a table.
20480    #[derive(Clone, Default, PartialEq)]
20481    #[non_exhaustive]
20482    pub struct Path {
20483        /// Required. The name identifier of the path.
20484        /// Nested columns should be of the form: 'address.city'.
20485        pub name: std::string::String,
20486
20487        /// Optional. List of attributes to be associated with the path of the
20488        /// resource, provided in the form:
20489        /// projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
20490        pub attributes: std::vec::Vec<std::string::String>,
20491
20492        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20493    }
20494
20495    impl Path {
20496        pub fn new() -> Self {
20497            std::default::Default::default()
20498        }
20499
20500        /// Sets the value of [name][crate::model::data_attribute_binding::Path::name].
20501        ///
20502        /// # Example
20503        /// ```ignore,no_run
20504        /// # use google_cloud_dataplex_v1::model::data_attribute_binding::Path;
20505        /// let x = Path::new().set_name("example");
20506        /// ```
20507        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20508            self.name = v.into();
20509            self
20510        }
20511
20512        /// Sets the value of [attributes][crate::model::data_attribute_binding::Path::attributes].
20513        ///
20514        /// # Example
20515        /// ```ignore,no_run
20516        /// # use google_cloud_dataplex_v1::model::data_attribute_binding::Path;
20517        /// let x = Path::new().set_attributes(["a", "b", "c"]);
20518        /// ```
20519        pub fn set_attributes<T, V>(mut self, v: T) -> Self
20520        where
20521            T: std::iter::IntoIterator<Item = V>,
20522            V: std::convert::Into<std::string::String>,
20523        {
20524            use std::iter::Iterator;
20525            self.attributes = v.into_iter().map(|i| i.into()).collect();
20526            self
20527        }
20528    }
20529
20530    impl wkt::message::Message for Path {
20531        fn typename() -> &'static str {
20532            "type.googleapis.com/google.cloud.dataplex.v1.DataAttributeBinding.Path"
20533        }
20534    }
20535
20536    /// The reference to the resource that is associated to attributes, or
20537    /// the query to match resources and associate attributes.
20538    #[derive(Clone, Debug, PartialEq)]
20539    #[non_exhaustive]
20540    pub enum ResourceReference {
20541        /// Optional. Immutable. The resource name of the resource that is associated
20542        /// to attributes. Presently, only entity resource is supported in the form:
20543        /// projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
20544        /// Must belong in the same project and region as the attribute binding, and
20545        /// there can only exist one active binding for a resource.
20546        Resource(std::string::String),
20547    }
20548}
20549
20550/// Create DataTaxonomy request.
20551#[derive(Clone, Default, PartialEq)]
20552#[non_exhaustive]
20553#[deprecated]
20554pub struct CreateDataTaxonomyRequest {
20555    pub parent: std::string::String,
20556
20557    /// Required. DataTaxonomy identifier.
20558    ///
20559    /// * Must contain only lowercase letters, numbers and hyphens.
20560    /// * Must start with a letter.
20561    /// * Must be between 1-63 characters.
20562    /// * Must end with a number or a letter.
20563    /// * Must be unique within the Project.
20564    pub data_taxonomy_id: std::string::String,
20565
20566    /// Required. DataTaxonomy resource.
20567    pub data_taxonomy: std::option::Option<crate::model::DataTaxonomy>,
20568
20569    /// Optional. Only validate the request, but do not perform mutations.
20570    /// The default is false.
20571    pub validate_only: bool,
20572
20573    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20574}
20575
20576impl CreateDataTaxonomyRequest {
20577    pub fn new() -> Self {
20578        std::default::Default::default()
20579    }
20580
20581    /// Sets the value of [parent][crate::model::CreateDataTaxonomyRequest::parent].
20582    ///
20583    /// # Example
20584    /// ```ignore,no_run
20585    /// # use google_cloud_dataplex_v1::model::CreateDataTaxonomyRequest;
20586    /// let x = CreateDataTaxonomyRequest::new().set_parent("example");
20587    /// ```
20588    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20589        self.parent = v.into();
20590        self
20591    }
20592
20593    /// Sets the value of [data_taxonomy_id][crate::model::CreateDataTaxonomyRequest::data_taxonomy_id].
20594    ///
20595    /// # Example
20596    /// ```ignore,no_run
20597    /// # use google_cloud_dataplex_v1::model::CreateDataTaxonomyRequest;
20598    /// let x = CreateDataTaxonomyRequest::new().set_data_taxonomy_id("example");
20599    /// ```
20600    pub fn set_data_taxonomy_id<T: std::convert::Into<std::string::String>>(
20601        mut self,
20602        v: T,
20603    ) -> Self {
20604        self.data_taxonomy_id = v.into();
20605        self
20606    }
20607
20608    /// Sets the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
20609    ///
20610    /// # Example
20611    /// ```ignore,no_run
20612    /// # use google_cloud_dataplex_v1::model::CreateDataTaxonomyRequest;
20613    /// use google_cloud_dataplex_v1::model::DataTaxonomy;
20614    /// let x = CreateDataTaxonomyRequest::new().set_data_taxonomy(DataTaxonomy::default()/* use setters */);
20615    /// ```
20616    pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
20617    where
20618        T: std::convert::Into<crate::model::DataTaxonomy>,
20619    {
20620        self.data_taxonomy = std::option::Option::Some(v.into());
20621        self
20622    }
20623
20624    /// Sets or clears the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
20625    ///
20626    /// # Example
20627    /// ```ignore,no_run
20628    /// # use google_cloud_dataplex_v1::model::CreateDataTaxonomyRequest;
20629    /// use google_cloud_dataplex_v1::model::DataTaxonomy;
20630    /// let x = CreateDataTaxonomyRequest::new().set_or_clear_data_taxonomy(Some(DataTaxonomy::default()/* use setters */));
20631    /// let x = CreateDataTaxonomyRequest::new().set_or_clear_data_taxonomy(None::<DataTaxonomy>);
20632    /// ```
20633    pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
20634    where
20635        T: std::convert::Into<crate::model::DataTaxonomy>,
20636    {
20637        self.data_taxonomy = v.map(|x| x.into());
20638        self
20639    }
20640
20641    /// Sets the value of [validate_only][crate::model::CreateDataTaxonomyRequest::validate_only].
20642    ///
20643    /// # Example
20644    /// ```ignore,no_run
20645    /// # use google_cloud_dataplex_v1::model::CreateDataTaxonomyRequest;
20646    /// let x = CreateDataTaxonomyRequest::new().set_validate_only(true);
20647    /// ```
20648    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20649        self.validate_only = v.into();
20650        self
20651    }
20652}
20653
20654impl wkt::message::Message for CreateDataTaxonomyRequest {
20655    fn typename() -> &'static str {
20656        "type.googleapis.com/google.cloud.dataplex.v1.CreateDataTaxonomyRequest"
20657    }
20658}
20659
20660/// Update DataTaxonomy request.
20661#[derive(Clone, Default, PartialEq)]
20662#[non_exhaustive]
20663#[deprecated]
20664pub struct UpdateDataTaxonomyRequest {
20665    /// Required. Mask of fields to update.
20666    pub update_mask: std::option::Option<wkt::FieldMask>,
20667
20668    /// Required. Only fields specified in `update_mask` are updated.
20669    pub data_taxonomy: std::option::Option<crate::model::DataTaxonomy>,
20670
20671    /// Optional. Only validate the request, but do not perform mutations.
20672    /// The default is false.
20673    pub validate_only: bool,
20674
20675    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20676}
20677
20678impl UpdateDataTaxonomyRequest {
20679    pub fn new() -> Self {
20680        std::default::Default::default()
20681    }
20682
20683    /// Sets the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
20684    ///
20685    /// # Example
20686    /// ```ignore,no_run
20687    /// # use google_cloud_dataplex_v1::model::UpdateDataTaxonomyRequest;
20688    /// use wkt::FieldMask;
20689    /// let x = UpdateDataTaxonomyRequest::new().set_update_mask(FieldMask::default()/* use setters */);
20690    /// ```
20691    pub fn set_update_mask<T>(mut self, v: T) -> Self
20692    where
20693        T: std::convert::Into<wkt::FieldMask>,
20694    {
20695        self.update_mask = std::option::Option::Some(v.into());
20696        self
20697    }
20698
20699    /// Sets or clears the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
20700    ///
20701    /// # Example
20702    /// ```ignore,no_run
20703    /// # use google_cloud_dataplex_v1::model::UpdateDataTaxonomyRequest;
20704    /// use wkt::FieldMask;
20705    /// let x = UpdateDataTaxonomyRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
20706    /// let x = UpdateDataTaxonomyRequest::new().set_or_clear_update_mask(None::<FieldMask>);
20707    /// ```
20708    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20709    where
20710        T: std::convert::Into<wkt::FieldMask>,
20711    {
20712        self.update_mask = v.map(|x| x.into());
20713        self
20714    }
20715
20716    /// Sets the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
20717    ///
20718    /// # Example
20719    /// ```ignore,no_run
20720    /// # use google_cloud_dataplex_v1::model::UpdateDataTaxonomyRequest;
20721    /// use google_cloud_dataplex_v1::model::DataTaxonomy;
20722    /// let x = UpdateDataTaxonomyRequest::new().set_data_taxonomy(DataTaxonomy::default()/* use setters */);
20723    /// ```
20724    pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
20725    where
20726        T: std::convert::Into<crate::model::DataTaxonomy>,
20727    {
20728        self.data_taxonomy = std::option::Option::Some(v.into());
20729        self
20730    }
20731
20732    /// Sets or clears the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
20733    ///
20734    /// # Example
20735    /// ```ignore,no_run
20736    /// # use google_cloud_dataplex_v1::model::UpdateDataTaxonomyRequest;
20737    /// use google_cloud_dataplex_v1::model::DataTaxonomy;
20738    /// let x = UpdateDataTaxonomyRequest::new().set_or_clear_data_taxonomy(Some(DataTaxonomy::default()/* use setters */));
20739    /// let x = UpdateDataTaxonomyRequest::new().set_or_clear_data_taxonomy(None::<DataTaxonomy>);
20740    /// ```
20741    pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
20742    where
20743        T: std::convert::Into<crate::model::DataTaxonomy>,
20744    {
20745        self.data_taxonomy = v.map(|x| x.into());
20746        self
20747    }
20748
20749    /// Sets the value of [validate_only][crate::model::UpdateDataTaxonomyRequest::validate_only].
20750    ///
20751    /// # Example
20752    /// ```ignore,no_run
20753    /// # use google_cloud_dataplex_v1::model::UpdateDataTaxonomyRequest;
20754    /// let x = UpdateDataTaxonomyRequest::new().set_validate_only(true);
20755    /// ```
20756    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20757        self.validate_only = v.into();
20758        self
20759    }
20760}
20761
20762impl wkt::message::Message for UpdateDataTaxonomyRequest {
20763    fn typename() -> &'static str {
20764        "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataTaxonomyRequest"
20765    }
20766}
20767
20768/// Get DataTaxonomy request.
20769#[derive(Clone, Default, PartialEq)]
20770#[non_exhaustive]
20771#[deprecated]
20772pub struct GetDataTaxonomyRequest {
20773    pub name: std::string::String,
20774
20775    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20776}
20777
20778impl GetDataTaxonomyRequest {
20779    pub fn new() -> Self {
20780        std::default::Default::default()
20781    }
20782
20783    /// Sets the value of [name][crate::model::GetDataTaxonomyRequest::name].
20784    ///
20785    /// # Example
20786    /// ```ignore,no_run
20787    /// # use google_cloud_dataplex_v1::model::GetDataTaxonomyRequest;
20788    /// let x = GetDataTaxonomyRequest::new().set_name("example");
20789    /// ```
20790    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20791        self.name = v.into();
20792        self
20793    }
20794}
20795
20796impl wkt::message::Message for GetDataTaxonomyRequest {
20797    fn typename() -> &'static str {
20798        "type.googleapis.com/google.cloud.dataplex.v1.GetDataTaxonomyRequest"
20799    }
20800}
20801
20802/// List DataTaxonomies request.
20803#[derive(Clone, Default, PartialEq)]
20804#[non_exhaustive]
20805pub struct ListDataTaxonomiesRequest {
20806    /// Required. The resource name of the DataTaxonomy location, of the form:
20807    /// projects/{project_number}/locations/{location_id}
20808    /// where `location_id` refers to a Google Cloud region.
20809    pub parent: std::string::String,
20810
20811    /// Optional. Maximum number of DataTaxonomies to return. The service may
20812    /// return fewer than this value. If unspecified, at most 10 DataTaxonomies
20813    /// will be returned. The maximum value is 1000; values above 1000 will be
20814    /// coerced to 1000.
20815    pub page_size: i32,
20816
20817    /// Optional. Page token received from a previous ` ListDataTaxonomies` call.
20818    /// Provide this to retrieve the subsequent page. When paginating, all other
20819    /// parameters provided to ` ListDataTaxonomies` must match the call that
20820    /// provided the page token.
20821    pub page_token: std::string::String,
20822
20823    /// Optional. Filter request.
20824    pub filter: std::string::String,
20825
20826    /// Optional. Order by fields for the result.
20827    pub order_by: std::string::String,
20828
20829    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20830}
20831
20832impl ListDataTaxonomiesRequest {
20833    pub fn new() -> Self {
20834        std::default::Default::default()
20835    }
20836
20837    /// Sets the value of [parent][crate::model::ListDataTaxonomiesRequest::parent].
20838    ///
20839    /// # Example
20840    /// ```ignore,no_run
20841    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesRequest;
20842    /// let x = ListDataTaxonomiesRequest::new().set_parent("example");
20843    /// ```
20844    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20845        self.parent = v.into();
20846        self
20847    }
20848
20849    /// Sets the value of [page_size][crate::model::ListDataTaxonomiesRequest::page_size].
20850    ///
20851    /// # Example
20852    /// ```ignore,no_run
20853    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesRequest;
20854    /// let x = ListDataTaxonomiesRequest::new().set_page_size(42);
20855    /// ```
20856    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20857        self.page_size = v.into();
20858        self
20859    }
20860
20861    /// Sets the value of [page_token][crate::model::ListDataTaxonomiesRequest::page_token].
20862    ///
20863    /// # Example
20864    /// ```ignore,no_run
20865    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesRequest;
20866    /// let x = ListDataTaxonomiesRequest::new().set_page_token("example");
20867    /// ```
20868    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20869        self.page_token = v.into();
20870        self
20871    }
20872
20873    /// Sets the value of [filter][crate::model::ListDataTaxonomiesRequest::filter].
20874    ///
20875    /// # Example
20876    /// ```ignore,no_run
20877    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesRequest;
20878    /// let x = ListDataTaxonomiesRequest::new().set_filter("example");
20879    /// ```
20880    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20881        self.filter = v.into();
20882        self
20883    }
20884
20885    /// Sets the value of [order_by][crate::model::ListDataTaxonomiesRequest::order_by].
20886    ///
20887    /// # Example
20888    /// ```ignore,no_run
20889    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesRequest;
20890    /// let x = ListDataTaxonomiesRequest::new().set_order_by("example");
20891    /// ```
20892    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20893        self.order_by = v.into();
20894        self
20895    }
20896}
20897
20898impl wkt::message::Message for ListDataTaxonomiesRequest {
20899    fn typename() -> &'static str {
20900        "type.googleapis.com/google.cloud.dataplex.v1.ListDataTaxonomiesRequest"
20901    }
20902}
20903
20904/// List DataTaxonomies response.
20905#[derive(Clone, Default, PartialEq)]
20906#[non_exhaustive]
20907pub struct ListDataTaxonomiesResponse {
20908    /// DataTaxonomies under the given parent location.
20909    pub data_taxonomies: std::vec::Vec<crate::model::DataTaxonomy>,
20910
20911    /// Token to retrieve the next page of results, or empty if there are no more
20912    /// results in the list.
20913    pub next_page_token: std::string::String,
20914
20915    /// Locations that could not be reached.
20916    pub unreachable_locations: std::vec::Vec<std::string::String>,
20917
20918    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20919}
20920
20921impl ListDataTaxonomiesResponse {
20922    pub fn new() -> Self {
20923        std::default::Default::default()
20924    }
20925
20926    /// Sets the value of [data_taxonomies][crate::model::ListDataTaxonomiesResponse::data_taxonomies].
20927    ///
20928    /// # Example
20929    /// ```ignore,no_run
20930    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesResponse;
20931    /// use google_cloud_dataplex_v1::model::DataTaxonomy;
20932    /// let x = ListDataTaxonomiesResponse::new()
20933    ///     .set_data_taxonomies([
20934    ///         DataTaxonomy::default()/* use setters */,
20935    ///         DataTaxonomy::default()/* use (different) setters */,
20936    ///     ]);
20937    /// ```
20938    pub fn set_data_taxonomies<T, V>(mut self, v: T) -> Self
20939    where
20940        T: std::iter::IntoIterator<Item = V>,
20941        V: std::convert::Into<crate::model::DataTaxonomy>,
20942    {
20943        use std::iter::Iterator;
20944        self.data_taxonomies = v.into_iter().map(|i| i.into()).collect();
20945        self
20946    }
20947
20948    /// Sets the value of [next_page_token][crate::model::ListDataTaxonomiesResponse::next_page_token].
20949    ///
20950    /// # Example
20951    /// ```ignore,no_run
20952    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesResponse;
20953    /// let x = ListDataTaxonomiesResponse::new().set_next_page_token("example");
20954    /// ```
20955    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20956        self.next_page_token = v.into();
20957        self
20958    }
20959
20960    /// Sets the value of [unreachable_locations][crate::model::ListDataTaxonomiesResponse::unreachable_locations].
20961    ///
20962    /// # Example
20963    /// ```ignore,no_run
20964    /// # use google_cloud_dataplex_v1::model::ListDataTaxonomiesResponse;
20965    /// let x = ListDataTaxonomiesResponse::new().set_unreachable_locations(["a", "b", "c"]);
20966    /// ```
20967    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
20968    where
20969        T: std::iter::IntoIterator<Item = V>,
20970        V: std::convert::Into<std::string::String>,
20971    {
20972        use std::iter::Iterator;
20973        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
20974        self
20975    }
20976}
20977
20978impl wkt::message::Message for ListDataTaxonomiesResponse {
20979    fn typename() -> &'static str {
20980        "type.googleapis.com/google.cloud.dataplex.v1.ListDataTaxonomiesResponse"
20981    }
20982}
20983
20984#[doc(hidden)]
20985impl google_cloud_gax::paginator::internal::PageableResponse for ListDataTaxonomiesResponse {
20986    type PageItem = crate::model::DataTaxonomy;
20987
20988    fn items(self) -> std::vec::Vec<Self::PageItem> {
20989        self.data_taxonomies
20990    }
20991
20992    fn next_page_token(&self) -> std::string::String {
20993        use std::clone::Clone;
20994        self.next_page_token.clone()
20995    }
20996}
20997
20998/// Delete DataTaxonomy request.
20999#[derive(Clone, Default, PartialEq)]
21000#[non_exhaustive]
21001#[deprecated]
21002pub struct DeleteDataTaxonomyRequest {
21003    /// Required. The resource name of the DataTaxonomy:
21004    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
21005    pub name: std::string::String,
21006
21007    /// Optional. If the client provided etag value does not match the current etag
21008    /// value,the DeleteDataTaxonomy method returns an ABORTED error.
21009    pub etag: std::string::String,
21010
21011    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21012}
21013
21014impl DeleteDataTaxonomyRequest {
21015    pub fn new() -> Self {
21016        std::default::Default::default()
21017    }
21018
21019    /// Sets the value of [name][crate::model::DeleteDataTaxonomyRequest::name].
21020    ///
21021    /// # Example
21022    /// ```ignore,no_run
21023    /// # use google_cloud_dataplex_v1::model::DeleteDataTaxonomyRequest;
21024    /// let x = DeleteDataTaxonomyRequest::new().set_name("example");
21025    /// ```
21026    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21027        self.name = v.into();
21028        self
21029    }
21030
21031    /// Sets the value of [etag][crate::model::DeleteDataTaxonomyRequest::etag].
21032    ///
21033    /// # Example
21034    /// ```ignore,no_run
21035    /// # use google_cloud_dataplex_v1::model::DeleteDataTaxonomyRequest;
21036    /// let x = DeleteDataTaxonomyRequest::new().set_etag("example");
21037    /// ```
21038    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21039        self.etag = v.into();
21040        self
21041    }
21042}
21043
21044impl wkt::message::Message for DeleteDataTaxonomyRequest {
21045    fn typename() -> &'static str {
21046        "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataTaxonomyRequest"
21047    }
21048}
21049
21050/// Create DataAttribute request.
21051#[derive(Clone, Default, PartialEq)]
21052#[non_exhaustive]
21053pub struct CreateDataAttributeRequest {
21054    /// Required. The resource name of the parent data taxonomy
21055    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
21056    pub parent: std::string::String,
21057
21058    /// Required. DataAttribute identifier.
21059    ///
21060    /// * Must contain only lowercase letters, numbers and hyphens.
21061    /// * Must start with a letter.
21062    /// * Must be between 1-63 characters.
21063    /// * Must end with a number or a letter.
21064    /// * Must be unique within the DataTaxonomy.
21065    pub data_attribute_id: std::string::String,
21066
21067    /// Required. DataAttribute resource.
21068    pub data_attribute: std::option::Option<crate::model::DataAttribute>,
21069
21070    /// Optional. Only validate the request, but do not perform mutations.
21071    /// The default is false.
21072    pub validate_only: bool,
21073
21074    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21075}
21076
21077impl CreateDataAttributeRequest {
21078    pub fn new() -> Self {
21079        std::default::Default::default()
21080    }
21081
21082    /// Sets the value of [parent][crate::model::CreateDataAttributeRequest::parent].
21083    ///
21084    /// # Example
21085    /// ```ignore,no_run
21086    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeRequest;
21087    /// let x = CreateDataAttributeRequest::new().set_parent("example");
21088    /// ```
21089    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21090        self.parent = v.into();
21091        self
21092    }
21093
21094    /// Sets the value of [data_attribute_id][crate::model::CreateDataAttributeRequest::data_attribute_id].
21095    ///
21096    /// # Example
21097    /// ```ignore,no_run
21098    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeRequest;
21099    /// let x = CreateDataAttributeRequest::new().set_data_attribute_id("example");
21100    /// ```
21101    pub fn set_data_attribute_id<T: std::convert::Into<std::string::String>>(
21102        mut self,
21103        v: T,
21104    ) -> Self {
21105        self.data_attribute_id = v.into();
21106        self
21107    }
21108
21109    /// Sets the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
21110    ///
21111    /// # Example
21112    /// ```ignore,no_run
21113    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeRequest;
21114    /// use google_cloud_dataplex_v1::model::DataAttribute;
21115    /// let x = CreateDataAttributeRequest::new().set_data_attribute(DataAttribute::default()/* use setters */);
21116    /// ```
21117    pub fn set_data_attribute<T>(mut self, v: T) -> Self
21118    where
21119        T: std::convert::Into<crate::model::DataAttribute>,
21120    {
21121        self.data_attribute = std::option::Option::Some(v.into());
21122        self
21123    }
21124
21125    /// Sets or clears the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
21126    ///
21127    /// # Example
21128    /// ```ignore,no_run
21129    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeRequest;
21130    /// use google_cloud_dataplex_v1::model::DataAttribute;
21131    /// let x = CreateDataAttributeRequest::new().set_or_clear_data_attribute(Some(DataAttribute::default()/* use setters */));
21132    /// let x = CreateDataAttributeRequest::new().set_or_clear_data_attribute(None::<DataAttribute>);
21133    /// ```
21134    pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
21135    where
21136        T: std::convert::Into<crate::model::DataAttribute>,
21137    {
21138        self.data_attribute = v.map(|x| x.into());
21139        self
21140    }
21141
21142    /// Sets the value of [validate_only][crate::model::CreateDataAttributeRequest::validate_only].
21143    ///
21144    /// # Example
21145    /// ```ignore,no_run
21146    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeRequest;
21147    /// let x = CreateDataAttributeRequest::new().set_validate_only(true);
21148    /// ```
21149    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21150        self.validate_only = v.into();
21151        self
21152    }
21153}
21154
21155impl wkt::message::Message for CreateDataAttributeRequest {
21156    fn typename() -> &'static str {
21157        "type.googleapis.com/google.cloud.dataplex.v1.CreateDataAttributeRequest"
21158    }
21159}
21160
21161/// Update DataAttribute request.
21162#[derive(Clone, Default, PartialEq)]
21163#[non_exhaustive]
21164pub struct UpdateDataAttributeRequest {
21165    /// Required. Mask of fields to update.
21166    pub update_mask: std::option::Option<wkt::FieldMask>,
21167
21168    /// Required. Only fields specified in `update_mask` are updated.
21169    pub data_attribute: std::option::Option<crate::model::DataAttribute>,
21170
21171    /// Optional. Only validate the request, but do not perform mutations.
21172    /// The default is false.
21173    pub validate_only: bool,
21174
21175    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21176}
21177
21178impl UpdateDataAttributeRequest {
21179    pub fn new() -> Self {
21180        std::default::Default::default()
21181    }
21182
21183    /// Sets the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
21184    ///
21185    /// # Example
21186    /// ```ignore,no_run
21187    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeRequest;
21188    /// use wkt::FieldMask;
21189    /// let x = UpdateDataAttributeRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21190    /// ```
21191    pub fn set_update_mask<T>(mut self, v: T) -> Self
21192    where
21193        T: std::convert::Into<wkt::FieldMask>,
21194    {
21195        self.update_mask = std::option::Option::Some(v.into());
21196        self
21197    }
21198
21199    /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
21200    ///
21201    /// # Example
21202    /// ```ignore,no_run
21203    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeRequest;
21204    /// use wkt::FieldMask;
21205    /// let x = UpdateDataAttributeRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21206    /// let x = UpdateDataAttributeRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21207    /// ```
21208    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21209    where
21210        T: std::convert::Into<wkt::FieldMask>,
21211    {
21212        self.update_mask = v.map(|x| x.into());
21213        self
21214    }
21215
21216    /// Sets the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
21217    ///
21218    /// # Example
21219    /// ```ignore,no_run
21220    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeRequest;
21221    /// use google_cloud_dataplex_v1::model::DataAttribute;
21222    /// let x = UpdateDataAttributeRequest::new().set_data_attribute(DataAttribute::default()/* use setters */);
21223    /// ```
21224    pub fn set_data_attribute<T>(mut self, v: T) -> Self
21225    where
21226        T: std::convert::Into<crate::model::DataAttribute>,
21227    {
21228        self.data_attribute = std::option::Option::Some(v.into());
21229        self
21230    }
21231
21232    /// Sets or clears the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
21233    ///
21234    /// # Example
21235    /// ```ignore,no_run
21236    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeRequest;
21237    /// use google_cloud_dataplex_v1::model::DataAttribute;
21238    /// let x = UpdateDataAttributeRequest::new().set_or_clear_data_attribute(Some(DataAttribute::default()/* use setters */));
21239    /// let x = UpdateDataAttributeRequest::new().set_or_clear_data_attribute(None::<DataAttribute>);
21240    /// ```
21241    pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
21242    where
21243        T: std::convert::Into<crate::model::DataAttribute>,
21244    {
21245        self.data_attribute = v.map(|x| x.into());
21246        self
21247    }
21248
21249    /// Sets the value of [validate_only][crate::model::UpdateDataAttributeRequest::validate_only].
21250    ///
21251    /// # Example
21252    /// ```ignore,no_run
21253    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeRequest;
21254    /// let x = UpdateDataAttributeRequest::new().set_validate_only(true);
21255    /// ```
21256    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21257        self.validate_only = v.into();
21258        self
21259    }
21260}
21261
21262impl wkt::message::Message for UpdateDataAttributeRequest {
21263    fn typename() -> &'static str {
21264        "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataAttributeRequest"
21265    }
21266}
21267
21268/// Get DataAttribute request.
21269#[derive(Clone, Default, PartialEq)]
21270#[non_exhaustive]
21271pub struct GetDataAttributeRequest {
21272    /// Required. The resource name of the dataAttribute:
21273    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
21274    pub name: std::string::String,
21275
21276    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21277}
21278
21279impl GetDataAttributeRequest {
21280    pub fn new() -> Self {
21281        std::default::Default::default()
21282    }
21283
21284    /// Sets the value of [name][crate::model::GetDataAttributeRequest::name].
21285    ///
21286    /// # Example
21287    /// ```ignore,no_run
21288    /// # use google_cloud_dataplex_v1::model::GetDataAttributeRequest;
21289    /// let x = GetDataAttributeRequest::new().set_name("example");
21290    /// ```
21291    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21292        self.name = v.into();
21293        self
21294    }
21295}
21296
21297impl wkt::message::Message for GetDataAttributeRequest {
21298    fn typename() -> &'static str {
21299        "type.googleapis.com/google.cloud.dataplex.v1.GetDataAttributeRequest"
21300    }
21301}
21302
21303/// List DataAttributes request.
21304#[derive(Clone, Default, PartialEq)]
21305#[non_exhaustive]
21306pub struct ListDataAttributesRequest {
21307    /// Required. The resource name of the DataTaxonomy:
21308    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
21309    pub parent: std::string::String,
21310
21311    /// Optional. Maximum number of DataAttributes to return. The service may
21312    /// return fewer than this value. If unspecified, at most 10 dataAttributes
21313    /// will be returned. The maximum value is 1000; values above 1000 will be
21314    /// coerced to 1000.
21315    pub page_size: i32,
21316
21317    /// Optional. Page token received from a previous `ListDataAttributes` call.
21318    /// Provide this to retrieve the subsequent page. When paginating, all other
21319    /// parameters provided to `ListDataAttributes` must match the call that
21320    /// provided the page token.
21321    pub page_token: std::string::String,
21322
21323    /// Optional. Filter request.
21324    pub filter: std::string::String,
21325
21326    /// Optional. Order by fields for the result.
21327    pub order_by: std::string::String,
21328
21329    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21330}
21331
21332impl ListDataAttributesRequest {
21333    pub fn new() -> Self {
21334        std::default::Default::default()
21335    }
21336
21337    /// Sets the value of [parent][crate::model::ListDataAttributesRequest::parent].
21338    ///
21339    /// # Example
21340    /// ```ignore,no_run
21341    /// # use google_cloud_dataplex_v1::model::ListDataAttributesRequest;
21342    /// let x = ListDataAttributesRequest::new().set_parent("example");
21343    /// ```
21344    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21345        self.parent = v.into();
21346        self
21347    }
21348
21349    /// Sets the value of [page_size][crate::model::ListDataAttributesRequest::page_size].
21350    ///
21351    /// # Example
21352    /// ```ignore,no_run
21353    /// # use google_cloud_dataplex_v1::model::ListDataAttributesRequest;
21354    /// let x = ListDataAttributesRequest::new().set_page_size(42);
21355    /// ```
21356    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
21357        self.page_size = v.into();
21358        self
21359    }
21360
21361    /// Sets the value of [page_token][crate::model::ListDataAttributesRequest::page_token].
21362    ///
21363    /// # Example
21364    /// ```ignore,no_run
21365    /// # use google_cloud_dataplex_v1::model::ListDataAttributesRequest;
21366    /// let x = ListDataAttributesRequest::new().set_page_token("example");
21367    /// ```
21368    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21369        self.page_token = v.into();
21370        self
21371    }
21372
21373    /// Sets the value of [filter][crate::model::ListDataAttributesRequest::filter].
21374    ///
21375    /// # Example
21376    /// ```ignore,no_run
21377    /// # use google_cloud_dataplex_v1::model::ListDataAttributesRequest;
21378    /// let x = ListDataAttributesRequest::new().set_filter("example");
21379    /// ```
21380    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21381        self.filter = v.into();
21382        self
21383    }
21384
21385    /// Sets the value of [order_by][crate::model::ListDataAttributesRequest::order_by].
21386    ///
21387    /// # Example
21388    /// ```ignore,no_run
21389    /// # use google_cloud_dataplex_v1::model::ListDataAttributesRequest;
21390    /// let x = ListDataAttributesRequest::new().set_order_by("example");
21391    /// ```
21392    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21393        self.order_by = v.into();
21394        self
21395    }
21396}
21397
21398impl wkt::message::Message for ListDataAttributesRequest {
21399    fn typename() -> &'static str {
21400        "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributesRequest"
21401    }
21402}
21403
21404/// List DataAttributes response.
21405#[derive(Clone, Default, PartialEq)]
21406#[non_exhaustive]
21407pub struct ListDataAttributesResponse {
21408    /// DataAttributes under the given parent DataTaxonomy.
21409    pub data_attributes: std::vec::Vec<crate::model::DataAttribute>,
21410
21411    /// Token to retrieve the next page of results, or empty if there are no more
21412    /// results in the list.
21413    pub next_page_token: std::string::String,
21414
21415    /// Locations that could not be reached.
21416    pub unreachable_locations: std::vec::Vec<std::string::String>,
21417
21418    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21419}
21420
21421impl ListDataAttributesResponse {
21422    pub fn new() -> Self {
21423        std::default::Default::default()
21424    }
21425
21426    /// Sets the value of [data_attributes][crate::model::ListDataAttributesResponse::data_attributes].
21427    ///
21428    /// # Example
21429    /// ```ignore,no_run
21430    /// # use google_cloud_dataplex_v1::model::ListDataAttributesResponse;
21431    /// use google_cloud_dataplex_v1::model::DataAttribute;
21432    /// let x = ListDataAttributesResponse::new()
21433    ///     .set_data_attributes([
21434    ///         DataAttribute::default()/* use setters */,
21435    ///         DataAttribute::default()/* use (different) setters */,
21436    ///     ]);
21437    /// ```
21438    pub fn set_data_attributes<T, V>(mut self, v: T) -> Self
21439    where
21440        T: std::iter::IntoIterator<Item = V>,
21441        V: std::convert::Into<crate::model::DataAttribute>,
21442    {
21443        use std::iter::Iterator;
21444        self.data_attributes = v.into_iter().map(|i| i.into()).collect();
21445        self
21446    }
21447
21448    /// Sets the value of [next_page_token][crate::model::ListDataAttributesResponse::next_page_token].
21449    ///
21450    /// # Example
21451    /// ```ignore,no_run
21452    /// # use google_cloud_dataplex_v1::model::ListDataAttributesResponse;
21453    /// let x = ListDataAttributesResponse::new().set_next_page_token("example");
21454    /// ```
21455    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21456        self.next_page_token = v.into();
21457        self
21458    }
21459
21460    /// Sets the value of [unreachable_locations][crate::model::ListDataAttributesResponse::unreachable_locations].
21461    ///
21462    /// # Example
21463    /// ```ignore,no_run
21464    /// # use google_cloud_dataplex_v1::model::ListDataAttributesResponse;
21465    /// let x = ListDataAttributesResponse::new().set_unreachable_locations(["a", "b", "c"]);
21466    /// ```
21467    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
21468    where
21469        T: std::iter::IntoIterator<Item = V>,
21470        V: std::convert::Into<std::string::String>,
21471    {
21472        use std::iter::Iterator;
21473        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
21474        self
21475    }
21476}
21477
21478impl wkt::message::Message for ListDataAttributesResponse {
21479    fn typename() -> &'static str {
21480        "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributesResponse"
21481    }
21482}
21483
21484#[doc(hidden)]
21485impl google_cloud_gax::paginator::internal::PageableResponse for ListDataAttributesResponse {
21486    type PageItem = crate::model::DataAttribute;
21487
21488    fn items(self) -> std::vec::Vec<Self::PageItem> {
21489        self.data_attributes
21490    }
21491
21492    fn next_page_token(&self) -> std::string::String {
21493        use std::clone::Clone;
21494        self.next_page_token.clone()
21495    }
21496}
21497
21498/// Delete DataAttribute request.
21499#[derive(Clone, Default, PartialEq)]
21500#[non_exhaustive]
21501pub struct DeleteDataAttributeRequest {
21502    /// Required. The resource name of the DataAttribute:
21503    /// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
21504    pub name: std::string::String,
21505
21506    /// Optional. If the client provided etag value does not match the current etag
21507    /// value, the DeleteDataAttribute method returns an ABORTED error response.
21508    pub etag: std::string::String,
21509
21510    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21511}
21512
21513impl DeleteDataAttributeRequest {
21514    pub fn new() -> Self {
21515        std::default::Default::default()
21516    }
21517
21518    /// Sets the value of [name][crate::model::DeleteDataAttributeRequest::name].
21519    ///
21520    /// # Example
21521    /// ```ignore,no_run
21522    /// # use google_cloud_dataplex_v1::model::DeleteDataAttributeRequest;
21523    /// let x = DeleteDataAttributeRequest::new().set_name("example");
21524    /// ```
21525    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21526        self.name = v.into();
21527        self
21528    }
21529
21530    /// Sets the value of [etag][crate::model::DeleteDataAttributeRequest::etag].
21531    ///
21532    /// # Example
21533    /// ```ignore,no_run
21534    /// # use google_cloud_dataplex_v1::model::DeleteDataAttributeRequest;
21535    /// let x = DeleteDataAttributeRequest::new().set_etag("example");
21536    /// ```
21537    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21538        self.etag = v.into();
21539        self
21540    }
21541}
21542
21543impl wkt::message::Message for DeleteDataAttributeRequest {
21544    fn typename() -> &'static str {
21545        "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataAttributeRequest"
21546    }
21547}
21548
21549/// Create DataAttributeBinding request.
21550#[derive(Clone, Default, PartialEq)]
21551#[non_exhaustive]
21552pub struct CreateDataAttributeBindingRequest {
21553    /// Required. The resource name of the parent data taxonomy
21554    /// projects/{project_number}/locations/{location_id}
21555    pub parent: std::string::String,
21556
21557    /// Required. DataAttributeBinding identifier.
21558    ///
21559    /// * Must contain only lowercase letters, numbers and hyphens.
21560    /// * Must start with a letter.
21561    /// * Must be between 1-63 characters.
21562    /// * Must end with a number or a letter.
21563    /// * Must be unique within the Location.
21564    pub data_attribute_binding_id: std::string::String,
21565
21566    /// Required. DataAttributeBinding resource.
21567    pub data_attribute_binding: std::option::Option<crate::model::DataAttributeBinding>,
21568
21569    /// Optional. Only validate the request, but do not perform mutations.
21570    /// The default is false.
21571    pub validate_only: bool,
21572
21573    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21574}
21575
21576impl CreateDataAttributeBindingRequest {
21577    pub fn new() -> Self {
21578        std::default::Default::default()
21579    }
21580
21581    /// Sets the value of [parent][crate::model::CreateDataAttributeBindingRequest::parent].
21582    ///
21583    /// # Example
21584    /// ```ignore,no_run
21585    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeBindingRequest;
21586    /// let x = CreateDataAttributeBindingRequest::new().set_parent("example");
21587    /// ```
21588    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21589        self.parent = v.into();
21590        self
21591    }
21592
21593    /// Sets the value of [data_attribute_binding_id][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding_id].
21594    ///
21595    /// # Example
21596    /// ```ignore,no_run
21597    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeBindingRequest;
21598    /// let x = CreateDataAttributeBindingRequest::new().set_data_attribute_binding_id("example");
21599    /// ```
21600    pub fn set_data_attribute_binding_id<T: std::convert::Into<std::string::String>>(
21601        mut self,
21602        v: T,
21603    ) -> Self {
21604        self.data_attribute_binding_id = v.into();
21605        self
21606    }
21607
21608    /// Sets the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
21609    ///
21610    /// # Example
21611    /// ```ignore,no_run
21612    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeBindingRequest;
21613    /// use google_cloud_dataplex_v1::model::DataAttributeBinding;
21614    /// let x = CreateDataAttributeBindingRequest::new().set_data_attribute_binding(DataAttributeBinding::default()/* use setters */);
21615    /// ```
21616    pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
21617    where
21618        T: std::convert::Into<crate::model::DataAttributeBinding>,
21619    {
21620        self.data_attribute_binding = std::option::Option::Some(v.into());
21621        self
21622    }
21623
21624    /// Sets or clears the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
21625    ///
21626    /// # Example
21627    /// ```ignore,no_run
21628    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeBindingRequest;
21629    /// use google_cloud_dataplex_v1::model::DataAttributeBinding;
21630    /// let x = CreateDataAttributeBindingRequest::new().set_or_clear_data_attribute_binding(Some(DataAttributeBinding::default()/* use setters */));
21631    /// let x = CreateDataAttributeBindingRequest::new().set_or_clear_data_attribute_binding(None::<DataAttributeBinding>);
21632    /// ```
21633    pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
21634    where
21635        T: std::convert::Into<crate::model::DataAttributeBinding>,
21636    {
21637        self.data_attribute_binding = v.map(|x| x.into());
21638        self
21639    }
21640
21641    /// Sets the value of [validate_only][crate::model::CreateDataAttributeBindingRequest::validate_only].
21642    ///
21643    /// # Example
21644    /// ```ignore,no_run
21645    /// # use google_cloud_dataplex_v1::model::CreateDataAttributeBindingRequest;
21646    /// let x = CreateDataAttributeBindingRequest::new().set_validate_only(true);
21647    /// ```
21648    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21649        self.validate_only = v.into();
21650        self
21651    }
21652}
21653
21654impl wkt::message::Message for CreateDataAttributeBindingRequest {
21655    fn typename() -> &'static str {
21656        "type.googleapis.com/google.cloud.dataplex.v1.CreateDataAttributeBindingRequest"
21657    }
21658}
21659
21660/// Update DataAttributeBinding request.
21661#[derive(Clone, Default, PartialEq)]
21662#[non_exhaustive]
21663pub struct UpdateDataAttributeBindingRequest {
21664    /// Required. Mask of fields to update.
21665    pub update_mask: std::option::Option<wkt::FieldMask>,
21666
21667    /// Required. Only fields specified in `update_mask` are updated.
21668    pub data_attribute_binding: std::option::Option<crate::model::DataAttributeBinding>,
21669
21670    /// Optional. Only validate the request, but do not perform mutations.
21671    /// The default is false.
21672    pub validate_only: bool,
21673
21674    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21675}
21676
21677impl UpdateDataAttributeBindingRequest {
21678    pub fn new() -> Self {
21679        std::default::Default::default()
21680    }
21681
21682    /// Sets the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
21683    ///
21684    /// # Example
21685    /// ```ignore,no_run
21686    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeBindingRequest;
21687    /// use wkt::FieldMask;
21688    /// let x = UpdateDataAttributeBindingRequest::new().set_update_mask(FieldMask::default()/* use setters */);
21689    /// ```
21690    pub fn set_update_mask<T>(mut self, v: T) -> Self
21691    where
21692        T: std::convert::Into<wkt::FieldMask>,
21693    {
21694        self.update_mask = std::option::Option::Some(v.into());
21695        self
21696    }
21697
21698    /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
21699    ///
21700    /// # Example
21701    /// ```ignore,no_run
21702    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeBindingRequest;
21703    /// use wkt::FieldMask;
21704    /// let x = UpdateDataAttributeBindingRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
21705    /// let x = UpdateDataAttributeBindingRequest::new().set_or_clear_update_mask(None::<FieldMask>);
21706    /// ```
21707    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21708    where
21709        T: std::convert::Into<wkt::FieldMask>,
21710    {
21711        self.update_mask = v.map(|x| x.into());
21712        self
21713    }
21714
21715    /// Sets the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
21716    ///
21717    /// # Example
21718    /// ```ignore,no_run
21719    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeBindingRequest;
21720    /// use google_cloud_dataplex_v1::model::DataAttributeBinding;
21721    /// let x = UpdateDataAttributeBindingRequest::new().set_data_attribute_binding(DataAttributeBinding::default()/* use setters */);
21722    /// ```
21723    pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
21724    where
21725        T: std::convert::Into<crate::model::DataAttributeBinding>,
21726    {
21727        self.data_attribute_binding = std::option::Option::Some(v.into());
21728        self
21729    }
21730
21731    /// Sets or clears the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
21732    ///
21733    /// # Example
21734    /// ```ignore,no_run
21735    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeBindingRequest;
21736    /// use google_cloud_dataplex_v1::model::DataAttributeBinding;
21737    /// let x = UpdateDataAttributeBindingRequest::new().set_or_clear_data_attribute_binding(Some(DataAttributeBinding::default()/* use setters */));
21738    /// let x = UpdateDataAttributeBindingRequest::new().set_or_clear_data_attribute_binding(None::<DataAttributeBinding>);
21739    /// ```
21740    pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
21741    where
21742        T: std::convert::Into<crate::model::DataAttributeBinding>,
21743    {
21744        self.data_attribute_binding = v.map(|x| x.into());
21745        self
21746    }
21747
21748    /// Sets the value of [validate_only][crate::model::UpdateDataAttributeBindingRequest::validate_only].
21749    ///
21750    /// # Example
21751    /// ```ignore,no_run
21752    /// # use google_cloud_dataplex_v1::model::UpdateDataAttributeBindingRequest;
21753    /// let x = UpdateDataAttributeBindingRequest::new().set_validate_only(true);
21754    /// ```
21755    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21756        self.validate_only = v.into();
21757        self
21758    }
21759}
21760
21761impl wkt::message::Message for UpdateDataAttributeBindingRequest {
21762    fn typename() -> &'static str {
21763        "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest"
21764    }
21765}
21766
21767/// Get DataAttributeBinding request.
21768#[derive(Clone, Default, PartialEq)]
21769#[non_exhaustive]
21770pub struct GetDataAttributeBindingRequest {
21771    /// Required. The resource name of the DataAttributeBinding:
21772    /// projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
21773    pub name: std::string::String,
21774
21775    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21776}
21777
21778impl GetDataAttributeBindingRequest {
21779    pub fn new() -> Self {
21780        std::default::Default::default()
21781    }
21782
21783    /// Sets the value of [name][crate::model::GetDataAttributeBindingRequest::name].
21784    ///
21785    /// # Example
21786    /// ```ignore,no_run
21787    /// # use google_cloud_dataplex_v1::model::GetDataAttributeBindingRequest;
21788    /// let x = GetDataAttributeBindingRequest::new().set_name("example");
21789    /// ```
21790    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21791        self.name = v.into();
21792        self
21793    }
21794}
21795
21796impl wkt::message::Message for GetDataAttributeBindingRequest {
21797    fn typename() -> &'static str {
21798        "type.googleapis.com/google.cloud.dataplex.v1.GetDataAttributeBindingRequest"
21799    }
21800}
21801
21802/// List DataAttributeBindings request.
21803#[derive(Clone, Default, PartialEq)]
21804#[non_exhaustive]
21805pub struct ListDataAttributeBindingsRequest {
21806    /// Required. The resource name of the Location:
21807    /// projects/{project_number}/locations/{location_id}
21808    pub parent: std::string::String,
21809
21810    /// Optional. Maximum number of DataAttributeBindings to return. The service
21811    /// may return fewer than this value. If unspecified, at most 10
21812    /// DataAttributeBindings will be returned. The maximum value is 1000; values
21813    /// above 1000 will be coerced to 1000.
21814    pub page_size: i32,
21815
21816    /// Optional. Page token received from a previous `ListDataAttributeBindings`
21817    /// call. Provide this to retrieve the subsequent page. When paginating, all
21818    /// other parameters provided to `ListDataAttributeBindings` must match the
21819    /// call that provided the page token.
21820    pub page_token: std::string::String,
21821
21822    /// Optional. Filter request.
21823    /// Filter using resource: filter=resource:"resource-name"
21824    /// Filter using attribute: filter=attributes:"attribute-name"
21825    /// Filter using attribute in paths list:
21826    /// filter=paths.attributes:"attribute-name"
21827    pub filter: std::string::String,
21828
21829    /// Optional. Order by fields for the result.
21830    pub order_by: std::string::String,
21831
21832    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21833}
21834
21835impl ListDataAttributeBindingsRequest {
21836    pub fn new() -> Self {
21837        std::default::Default::default()
21838    }
21839
21840    /// Sets the value of [parent][crate::model::ListDataAttributeBindingsRequest::parent].
21841    ///
21842    /// # Example
21843    /// ```ignore,no_run
21844    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsRequest;
21845    /// let x = ListDataAttributeBindingsRequest::new().set_parent("example");
21846    /// ```
21847    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21848        self.parent = v.into();
21849        self
21850    }
21851
21852    /// Sets the value of [page_size][crate::model::ListDataAttributeBindingsRequest::page_size].
21853    ///
21854    /// # Example
21855    /// ```ignore,no_run
21856    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsRequest;
21857    /// let x = ListDataAttributeBindingsRequest::new().set_page_size(42);
21858    /// ```
21859    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
21860        self.page_size = v.into();
21861        self
21862    }
21863
21864    /// Sets the value of [page_token][crate::model::ListDataAttributeBindingsRequest::page_token].
21865    ///
21866    /// # Example
21867    /// ```ignore,no_run
21868    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsRequest;
21869    /// let x = ListDataAttributeBindingsRequest::new().set_page_token("example");
21870    /// ```
21871    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21872        self.page_token = v.into();
21873        self
21874    }
21875
21876    /// Sets the value of [filter][crate::model::ListDataAttributeBindingsRequest::filter].
21877    ///
21878    /// # Example
21879    /// ```ignore,no_run
21880    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsRequest;
21881    /// let x = ListDataAttributeBindingsRequest::new().set_filter("example");
21882    /// ```
21883    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21884        self.filter = v.into();
21885        self
21886    }
21887
21888    /// Sets the value of [order_by][crate::model::ListDataAttributeBindingsRequest::order_by].
21889    ///
21890    /// # Example
21891    /// ```ignore,no_run
21892    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsRequest;
21893    /// let x = ListDataAttributeBindingsRequest::new().set_order_by("example");
21894    /// ```
21895    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21896        self.order_by = v.into();
21897        self
21898    }
21899}
21900
21901impl wkt::message::Message for ListDataAttributeBindingsRequest {
21902    fn typename() -> &'static str {
21903        "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributeBindingsRequest"
21904    }
21905}
21906
21907/// List DataAttributeBindings response.
21908#[derive(Clone, Default, PartialEq)]
21909#[non_exhaustive]
21910pub struct ListDataAttributeBindingsResponse {
21911    /// DataAttributeBindings under the given parent Location.
21912    pub data_attribute_bindings: std::vec::Vec<crate::model::DataAttributeBinding>,
21913
21914    /// Token to retrieve the next page of results, or empty if there are no more
21915    /// results in the list.
21916    pub next_page_token: std::string::String,
21917
21918    /// Locations that could not be reached.
21919    pub unreachable_locations: std::vec::Vec<std::string::String>,
21920
21921    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21922}
21923
21924impl ListDataAttributeBindingsResponse {
21925    pub fn new() -> Self {
21926        std::default::Default::default()
21927    }
21928
21929    /// Sets the value of [data_attribute_bindings][crate::model::ListDataAttributeBindingsResponse::data_attribute_bindings].
21930    ///
21931    /// # Example
21932    /// ```ignore,no_run
21933    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsResponse;
21934    /// use google_cloud_dataplex_v1::model::DataAttributeBinding;
21935    /// let x = ListDataAttributeBindingsResponse::new()
21936    ///     .set_data_attribute_bindings([
21937    ///         DataAttributeBinding::default()/* use setters */,
21938    ///         DataAttributeBinding::default()/* use (different) setters */,
21939    ///     ]);
21940    /// ```
21941    pub fn set_data_attribute_bindings<T, V>(mut self, v: T) -> Self
21942    where
21943        T: std::iter::IntoIterator<Item = V>,
21944        V: std::convert::Into<crate::model::DataAttributeBinding>,
21945    {
21946        use std::iter::Iterator;
21947        self.data_attribute_bindings = v.into_iter().map(|i| i.into()).collect();
21948        self
21949    }
21950
21951    /// Sets the value of [next_page_token][crate::model::ListDataAttributeBindingsResponse::next_page_token].
21952    ///
21953    /// # Example
21954    /// ```ignore,no_run
21955    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsResponse;
21956    /// let x = ListDataAttributeBindingsResponse::new().set_next_page_token("example");
21957    /// ```
21958    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21959        self.next_page_token = v.into();
21960        self
21961    }
21962
21963    /// Sets the value of [unreachable_locations][crate::model::ListDataAttributeBindingsResponse::unreachable_locations].
21964    ///
21965    /// # Example
21966    /// ```ignore,no_run
21967    /// # use google_cloud_dataplex_v1::model::ListDataAttributeBindingsResponse;
21968    /// let x = ListDataAttributeBindingsResponse::new().set_unreachable_locations(["a", "b", "c"]);
21969    /// ```
21970    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
21971    where
21972        T: std::iter::IntoIterator<Item = V>,
21973        V: std::convert::Into<std::string::String>,
21974    {
21975        use std::iter::Iterator;
21976        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
21977        self
21978    }
21979}
21980
21981impl wkt::message::Message for ListDataAttributeBindingsResponse {
21982    fn typename() -> &'static str {
21983        "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributeBindingsResponse"
21984    }
21985}
21986
21987#[doc(hidden)]
21988impl google_cloud_gax::paginator::internal::PageableResponse for ListDataAttributeBindingsResponse {
21989    type PageItem = crate::model::DataAttributeBinding;
21990
21991    fn items(self) -> std::vec::Vec<Self::PageItem> {
21992        self.data_attribute_bindings
21993    }
21994
21995    fn next_page_token(&self) -> std::string::String {
21996        use std::clone::Clone;
21997        self.next_page_token.clone()
21998    }
21999}
22000
22001/// Delete DataAttributeBinding request.
22002#[derive(Clone, Default, PartialEq)]
22003#[non_exhaustive]
22004pub struct DeleteDataAttributeBindingRequest {
22005    /// Required. The resource name of the DataAttributeBinding:
22006    /// projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
22007    pub name: std::string::String,
22008
22009    /// Required. If the client provided etag value does not match the current etag
22010    /// value, the DeleteDataAttributeBindingRequest method returns an ABORTED
22011    /// error response. Etags must be used when calling the
22012    /// DeleteDataAttributeBinding.
22013    pub etag: std::string::String,
22014
22015    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22016}
22017
22018impl DeleteDataAttributeBindingRequest {
22019    pub fn new() -> Self {
22020        std::default::Default::default()
22021    }
22022
22023    /// Sets the value of [name][crate::model::DeleteDataAttributeBindingRequest::name].
22024    ///
22025    /// # Example
22026    /// ```ignore,no_run
22027    /// # use google_cloud_dataplex_v1::model::DeleteDataAttributeBindingRequest;
22028    /// let x = DeleteDataAttributeBindingRequest::new().set_name("example");
22029    /// ```
22030    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22031        self.name = v.into();
22032        self
22033    }
22034
22035    /// Sets the value of [etag][crate::model::DeleteDataAttributeBindingRequest::etag].
22036    ///
22037    /// # Example
22038    /// ```ignore,no_run
22039    /// # use google_cloud_dataplex_v1::model::DeleteDataAttributeBindingRequest;
22040    /// let x = DeleteDataAttributeBindingRequest::new().set_etag("example");
22041    /// ```
22042    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22043        self.etag = v.into();
22044        self
22045    }
22046}
22047
22048impl wkt::message::Message for DeleteDataAttributeBindingRequest {
22049    fn typename() -> &'static str {
22050        "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest"
22051    }
22052}
22053
22054/// Create dataScan request.
22055#[derive(Clone, Default, PartialEq)]
22056#[non_exhaustive]
22057pub struct CreateDataScanRequest {
22058    /// Required. The resource name of the parent location:
22059    /// `projects/{project}/locations/{location_id}`
22060    /// where `project` refers to a *project_id* or *project_number* and
22061    /// `location_id` refers to a Google Cloud region.
22062    pub parent: std::string::String,
22063
22064    /// Required. DataScan resource.
22065    pub data_scan: std::option::Option<crate::model::DataScan>,
22066
22067    /// Required. DataScan identifier.
22068    ///
22069    /// * Must contain only lowercase letters, numbers and hyphens.
22070    /// * Must start with a letter.
22071    /// * Must end with a number or a letter.
22072    /// * Must be between 1-63 characters.
22073    /// * Must be unique within the customer project / location.
22074    pub data_scan_id: std::string::String,
22075
22076    /// Optional. Only validate the request, but do not perform mutations.
22077    /// The default is `false`.
22078    pub validate_only: bool,
22079
22080    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22081}
22082
22083impl CreateDataScanRequest {
22084    pub fn new() -> Self {
22085        std::default::Default::default()
22086    }
22087
22088    /// Sets the value of [parent][crate::model::CreateDataScanRequest::parent].
22089    ///
22090    /// # Example
22091    /// ```ignore,no_run
22092    /// # use google_cloud_dataplex_v1::model::CreateDataScanRequest;
22093    /// let x = CreateDataScanRequest::new().set_parent("example");
22094    /// ```
22095    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22096        self.parent = v.into();
22097        self
22098    }
22099
22100    /// Sets the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
22101    ///
22102    /// # Example
22103    /// ```ignore,no_run
22104    /// # use google_cloud_dataplex_v1::model::CreateDataScanRequest;
22105    /// use google_cloud_dataplex_v1::model::DataScan;
22106    /// let x = CreateDataScanRequest::new().set_data_scan(DataScan::default()/* use setters */);
22107    /// ```
22108    pub fn set_data_scan<T>(mut self, v: T) -> Self
22109    where
22110        T: std::convert::Into<crate::model::DataScan>,
22111    {
22112        self.data_scan = std::option::Option::Some(v.into());
22113        self
22114    }
22115
22116    /// Sets or clears the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
22117    ///
22118    /// # Example
22119    /// ```ignore,no_run
22120    /// # use google_cloud_dataplex_v1::model::CreateDataScanRequest;
22121    /// use google_cloud_dataplex_v1::model::DataScan;
22122    /// let x = CreateDataScanRequest::new().set_or_clear_data_scan(Some(DataScan::default()/* use setters */));
22123    /// let x = CreateDataScanRequest::new().set_or_clear_data_scan(None::<DataScan>);
22124    /// ```
22125    pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
22126    where
22127        T: std::convert::Into<crate::model::DataScan>,
22128    {
22129        self.data_scan = v.map(|x| x.into());
22130        self
22131    }
22132
22133    /// Sets the value of [data_scan_id][crate::model::CreateDataScanRequest::data_scan_id].
22134    ///
22135    /// # Example
22136    /// ```ignore,no_run
22137    /// # use google_cloud_dataplex_v1::model::CreateDataScanRequest;
22138    /// let x = CreateDataScanRequest::new().set_data_scan_id("example");
22139    /// ```
22140    pub fn set_data_scan_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22141        self.data_scan_id = v.into();
22142        self
22143    }
22144
22145    /// Sets the value of [validate_only][crate::model::CreateDataScanRequest::validate_only].
22146    ///
22147    /// # Example
22148    /// ```ignore,no_run
22149    /// # use google_cloud_dataplex_v1::model::CreateDataScanRequest;
22150    /// let x = CreateDataScanRequest::new().set_validate_only(true);
22151    /// ```
22152    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22153        self.validate_only = v.into();
22154        self
22155    }
22156}
22157
22158impl wkt::message::Message for CreateDataScanRequest {
22159    fn typename() -> &'static str {
22160        "type.googleapis.com/google.cloud.dataplex.v1.CreateDataScanRequest"
22161    }
22162}
22163
22164/// Update dataScan request.
22165#[derive(Clone, Default, PartialEq)]
22166#[non_exhaustive]
22167pub struct UpdateDataScanRequest {
22168    /// Required. DataScan resource to be updated.
22169    ///
22170    /// Only fields specified in `update_mask` are updated.
22171    pub data_scan: std::option::Option<crate::model::DataScan>,
22172
22173    /// Optional. Mask of fields to update.
22174    pub update_mask: std::option::Option<wkt::FieldMask>,
22175
22176    /// Optional. Only validate the request, but do not perform mutations.
22177    /// The default is `false`.
22178    pub validate_only: bool,
22179
22180    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22181}
22182
22183impl UpdateDataScanRequest {
22184    pub fn new() -> Self {
22185        std::default::Default::default()
22186    }
22187
22188    /// Sets the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
22189    ///
22190    /// # Example
22191    /// ```ignore,no_run
22192    /// # use google_cloud_dataplex_v1::model::UpdateDataScanRequest;
22193    /// use google_cloud_dataplex_v1::model::DataScan;
22194    /// let x = UpdateDataScanRequest::new().set_data_scan(DataScan::default()/* use setters */);
22195    /// ```
22196    pub fn set_data_scan<T>(mut self, v: T) -> Self
22197    where
22198        T: std::convert::Into<crate::model::DataScan>,
22199    {
22200        self.data_scan = std::option::Option::Some(v.into());
22201        self
22202    }
22203
22204    /// Sets or clears the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
22205    ///
22206    /// # Example
22207    /// ```ignore,no_run
22208    /// # use google_cloud_dataplex_v1::model::UpdateDataScanRequest;
22209    /// use google_cloud_dataplex_v1::model::DataScan;
22210    /// let x = UpdateDataScanRequest::new().set_or_clear_data_scan(Some(DataScan::default()/* use setters */));
22211    /// let x = UpdateDataScanRequest::new().set_or_clear_data_scan(None::<DataScan>);
22212    /// ```
22213    pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
22214    where
22215        T: std::convert::Into<crate::model::DataScan>,
22216    {
22217        self.data_scan = v.map(|x| x.into());
22218        self
22219    }
22220
22221    /// Sets the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
22222    ///
22223    /// # Example
22224    /// ```ignore,no_run
22225    /// # use google_cloud_dataplex_v1::model::UpdateDataScanRequest;
22226    /// use wkt::FieldMask;
22227    /// let x = UpdateDataScanRequest::new().set_update_mask(FieldMask::default()/* use setters */);
22228    /// ```
22229    pub fn set_update_mask<T>(mut self, v: T) -> Self
22230    where
22231        T: std::convert::Into<wkt::FieldMask>,
22232    {
22233        self.update_mask = std::option::Option::Some(v.into());
22234        self
22235    }
22236
22237    /// Sets or clears the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
22238    ///
22239    /// # Example
22240    /// ```ignore,no_run
22241    /// # use google_cloud_dataplex_v1::model::UpdateDataScanRequest;
22242    /// use wkt::FieldMask;
22243    /// let x = UpdateDataScanRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
22244    /// let x = UpdateDataScanRequest::new().set_or_clear_update_mask(None::<FieldMask>);
22245    /// ```
22246    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
22247    where
22248        T: std::convert::Into<wkt::FieldMask>,
22249    {
22250        self.update_mask = v.map(|x| x.into());
22251        self
22252    }
22253
22254    /// Sets the value of [validate_only][crate::model::UpdateDataScanRequest::validate_only].
22255    ///
22256    /// # Example
22257    /// ```ignore,no_run
22258    /// # use google_cloud_dataplex_v1::model::UpdateDataScanRequest;
22259    /// let x = UpdateDataScanRequest::new().set_validate_only(true);
22260    /// ```
22261    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22262        self.validate_only = v.into();
22263        self
22264    }
22265}
22266
22267impl wkt::message::Message for UpdateDataScanRequest {
22268    fn typename() -> &'static str {
22269        "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataScanRequest"
22270    }
22271}
22272
22273/// Delete dataScan request.
22274#[derive(Clone, Default, PartialEq)]
22275#[non_exhaustive]
22276pub struct DeleteDataScanRequest {
22277    /// Required. The resource name of the dataScan:
22278    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`
22279    /// where `project` refers to a *project_id* or *project_number* and
22280    /// `location_id` refers to a Google Cloud region.
22281    pub name: std::string::String,
22282
22283    /// Optional. If set to true, any child resources of this data scan will also
22284    /// be deleted. (Otherwise, the request will only work if the data scan has no
22285    /// child resources.)
22286    pub force: bool,
22287
22288    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22289}
22290
22291impl DeleteDataScanRequest {
22292    pub fn new() -> Self {
22293        std::default::Default::default()
22294    }
22295
22296    /// Sets the value of [name][crate::model::DeleteDataScanRequest::name].
22297    ///
22298    /// # Example
22299    /// ```ignore,no_run
22300    /// # use google_cloud_dataplex_v1::model::DeleteDataScanRequest;
22301    /// let x = DeleteDataScanRequest::new().set_name("example");
22302    /// ```
22303    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22304        self.name = v.into();
22305        self
22306    }
22307
22308    /// Sets the value of [force][crate::model::DeleteDataScanRequest::force].
22309    ///
22310    /// # Example
22311    /// ```ignore,no_run
22312    /// # use google_cloud_dataplex_v1::model::DeleteDataScanRequest;
22313    /// let x = DeleteDataScanRequest::new().set_force(true);
22314    /// ```
22315    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22316        self.force = v.into();
22317        self
22318    }
22319}
22320
22321impl wkt::message::Message for DeleteDataScanRequest {
22322    fn typename() -> &'static str {
22323        "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataScanRequest"
22324    }
22325}
22326
22327/// Get dataScan request.
22328#[derive(Clone, Default, PartialEq)]
22329#[non_exhaustive]
22330pub struct GetDataScanRequest {
22331    /// Required. The resource name of the dataScan:
22332    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`
22333    /// where `project` refers to a *project_id* or *project_number* and
22334    /// `location_id` refers to a Google Cloud region.
22335    pub name: std::string::String,
22336
22337    /// Optional. Select the DataScan view to return. Defaults to `BASIC`.
22338    pub view: crate::model::get_data_scan_request::DataScanView,
22339
22340    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22341}
22342
22343impl GetDataScanRequest {
22344    pub fn new() -> Self {
22345        std::default::Default::default()
22346    }
22347
22348    /// Sets the value of [name][crate::model::GetDataScanRequest::name].
22349    ///
22350    /// # Example
22351    /// ```ignore,no_run
22352    /// # use google_cloud_dataplex_v1::model::GetDataScanRequest;
22353    /// let x = GetDataScanRequest::new().set_name("example");
22354    /// ```
22355    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22356        self.name = v.into();
22357        self
22358    }
22359
22360    /// Sets the value of [view][crate::model::GetDataScanRequest::view].
22361    ///
22362    /// # Example
22363    /// ```ignore,no_run
22364    /// # use google_cloud_dataplex_v1::model::GetDataScanRequest;
22365    /// use google_cloud_dataplex_v1::model::get_data_scan_request::DataScanView;
22366    /// let x0 = GetDataScanRequest::new().set_view(DataScanView::Basic);
22367    /// let x1 = GetDataScanRequest::new().set_view(DataScanView::Full);
22368    /// ```
22369    pub fn set_view<T: std::convert::Into<crate::model::get_data_scan_request::DataScanView>>(
22370        mut self,
22371        v: T,
22372    ) -> Self {
22373        self.view = v.into();
22374        self
22375    }
22376}
22377
22378impl wkt::message::Message for GetDataScanRequest {
22379    fn typename() -> &'static str {
22380        "type.googleapis.com/google.cloud.dataplex.v1.GetDataScanRequest"
22381    }
22382}
22383
22384/// Defines additional types related to [GetDataScanRequest].
22385pub mod get_data_scan_request {
22386    #[allow(unused_imports)]
22387    use super::*;
22388
22389    /// DataScan view options.
22390    ///
22391    /// # Working with unknown values
22392    ///
22393    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22394    /// additional enum variants at any time. Adding new variants is not considered
22395    /// a breaking change. Applications should write their code in anticipation of:
22396    ///
22397    /// - New values appearing in future releases of the client library, **and**
22398    /// - New values received dynamically, without application changes.
22399    ///
22400    /// Please consult the [Working with enums] section in the user guide for some
22401    /// guidelines.
22402    ///
22403    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22404    #[derive(Clone, Debug, PartialEq)]
22405    #[non_exhaustive]
22406    pub enum DataScanView {
22407        /// The API will default to the `BASIC` view.
22408        Unspecified,
22409        /// Basic view that does not include *spec* and *result*.
22410        Basic,
22411        /// Include everything.
22412        Full,
22413        /// If set, the enum was initialized with an unknown value.
22414        ///
22415        /// Applications can examine the value using [DataScanView::value] or
22416        /// [DataScanView::name].
22417        UnknownValue(data_scan_view::UnknownValue),
22418    }
22419
22420    #[doc(hidden)]
22421    pub mod data_scan_view {
22422        #[allow(unused_imports)]
22423        use super::*;
22424        #[derive(Clone, Debug, PartialEq)]
22425        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22426    }
22427
22428    impl DataScanView {
22429        /// Gets the enum value.
22430        ///
22431        /// Returns `None` if the enum contains an unknown value deserialized from
22432        /// the string representation of enums.
22433        pub fn value(&self) -> std::option::Option<i32> {
22434            match self {
22435                Self::Unspecified => std::option::Option::Some(0),
22436                Self::Basic => std::option::Option::Some(1),
22437                Self::Full => std::option::Option::Some(10),
22438                Self::UnknownValue(u) => u.0.value(),
22439            }
22440        }
22441
22442        /// Gets the enum value as a string.
22443        ///
22444        /// Returns `None` if the enum contains an unknown value deserialized from
22445        /// the integer representation of enums.
22446        pub fn name(&self) -> std::option::Option<&str> {
22447            match self {
22448                Self::Unspecified => std::option::Option::Some("DATA_SCAN_VIEW_UNSPECIFIED"),
22449                Self::Basic => std::option::Option::Some("BASIC"),
22450                Self::Full => std::option::Option::Some("FULL"),
22451                Self::UnknownValue(u) => u.0.name(),
22452            }
22453        }
22454    }
22455
22456    impl std::default::Default for DataScanView {
22457        fn default() -> Self {
22458            use std::convert::From;
22459            Self::from(0)
22460        }
22461    }
22462
22463    impl std::fmt::Display for DataScanView {
22464        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22465            wkt::internal::display_enum(f, self.name(), self.value())
22466        }
22467    }
22468
22469    impl std::convert::From<i32> for DataScanView {
22470        fn from(value: i32) -> Self {
22471            match value {
22472                0 => Self::Unspecified,
22473                1 => Self::Basic,
22474                10 => Self::Full,
22475                _ => Self::UnknownValue(data_scan_view::UnknownValue(
22476                    wkt::internal::UnknownEnumValue::Integer(value),
22477                )),
22478            }
22479        }
22480    }
22481
22482    impl std::convert::From<&str> for DataScanView {
22483        fn from(value: &str) -> Self {
22484            use std::string::ToString;
22485            match value {
22486                "DATA_SCAN_VIEW_UNSPECIFIED" => Self::Unspecified,
22487                "BASIC" => Self::Basic,
22488                "FULL" => Self::Full,
22489                _ => Self::UnknownValue(data_scan_view::UnknownValue(
22490                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22491                )),
22492            }
22493        }
22494    }
22495
22496    impl serde::ser::Serialize for DataScanView {
22497        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22498        where
22499            S: serde::Serializer,
22500        {
22501            match self {
22502                Self::Unspecified => serializer.serialize_i32(0),
22503                Self::Basic => serializer.serialize_i32(1),
22504                Self::Full => serializer.serialize_i32(10),
22505                Self::UnknownValue(u) => u.0.serialize(serializer),
22506            }
22507        }
22508    }
22509
22510    impl<'de> serde::de::Deserialize<'de> for DataScanView {
22511        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22512        where
22513            D: serde::Deserializer<'de>,
22514        {
22515            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataScanView>::new(
22516                ".google.cloud.dataplex.v1.GetDataScanRequest.DataScanView",
22517            ))
22518        }
22519    }
22520}
22521
22522/// List dataScans request.
22523#[derive(Clone, Default, PartialEq)]
22524#[non_exhaustive]
22525pub struct ListDataScansRequest {
22526    /// Required. The resource name of the parent location:
22527    /// `projects/{project}/locations/{location_id}`
22528    /// where `project` refers to a *project_id* or *project_number* and
22529    /// `location_id` refers to a Google Cloud region.
22530    pub parent: std::string::String,
22531
22532    /// Optional. Maximum number of dataScans to return. The service may return
22533    /// fewer than this value. If unspecified, at most 500 scans will be returned.
22534    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
22535    pub page_size: i32,
22536
22537    /// Optional. Page token received from a previous `ListDataScans` call. Provide
22538    /// this to retrieve the subsequent page. When paginating, all other parameters
22539    /// provided to `ListDataScans` must match the call that provided the
22540    /// page token.
22541    pub page_token: std::string::String,
22542
22543    /// Optional. Filter request.
22544    pub filter: std::string::String,
22545
22546    /// Optional. Order by fields (`name` or `create_time`) for the result.
22547    /// If not specified, the ordering is undefined.
22548    pub order_by: std::string::String,
22549
22550    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22551}
22552
22553impl ListDataScansRequest {
22554    pub fn new() -> Self {
22555        std::default::Default::default()
22556    }
22557
22558    /// Sets the value of [parent][crate::model::ListDataScansRequest::parent].
22559    ///
22560    /// # Example
22561    /// ```ignore,no_run
22562    /// # use google_cloud_dataplex_v1::model::ListDataScansRequest;
22563    /// let x = ListDataScansRequest::new().set_parent("example");
22564    /// ```
22565    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22566        self.parent = v.into();
22567        self
22568    }
22569
22570    /// Sets the value of [page_size][crate::model::ListDataScansRequest::page_size].
22571    ///
22572    /// # Example
22573    /// ```ignore,no_run
22574    /// # use google_cloud_dataplex_v1::model::ListDataScansRequest;
22575    /// let x = ListDataScansRequest::new().set_page_size(42);
22576    /// ```
22577    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
22578        self.page_size = v.into();
22579        self
22580    }
22581
22582    /// Sets the value of [page_token][crate::model::ListDataScansRequest::page_token].
22583    ///
22584    /// # Example
22585    /// ```ignore,no_run
22586    /// # use google_cloud_dataplex_v1::model::ListDataScansRequest;
22587    /// let x = ListDataScansRequest::new().set_page_token("example");
22588    /// ```
22589    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22590        self.page_token = v.into();
22591        self
22592    }
22593
22594    /// Sets the value of [filter][crate::model::ListDataScansRequest::filter].
22595    ///
22596    /// # Example
22597    /// ```ignore,no_run
22598    /// # use google_cloud_dataplex_v1::model::ListDataScansRequest;
22599    /// let x = ListDataScansRequest::new().set_filter("example");
22600    /// ```
22601    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22602        self.filter = v.into();
22603        self
22604    }
22605
22606    /// Sets the value of [order_by][crate::model::ListDataScansRequest::order_by].
22607    ///
22608    /// # Example
22609    /// ```ignore,no_run
22610    /// # use google_cloud_dataplex_v1::model::ListDataScansRequest;
22611    /// let x = ListDataScansRequest::new().set_order_by("example");
22612    /// ```
22613    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22614        self.order_by = v.into();
22615        self
22616    }
22617}
22618
22619impl wkt::message::Message for ListDataScansRequest {
22620    fn typename() -> &'static str {
22621        "type.googleapis.com/google.cloud.dataplex.v1.ListDataScansRequest"
22622    }
22623}
22624
22625/// List dataScans response.
22626#[derive(Clone, Default, PartialEq)]
22627#[non_exhaustive]
22628pub struct ListDataScansResponse {
22629    /// DataScans (`BASIC` view only) under the given parent location.
22630    pub data_scans: std::vec::Vec<crate::model::DataScan>,
22631
22632    /// Token to retrieve the next page of results, or empty if there are no more
22633    /// results in the list.
22634    pub next_page_token: std::string::String,
22635
22636    /// Locations that could not be reached.
22637    pub unreachable: std::vec::Vec<std::string::String>,
22638
22639    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22640}
22641
22642impl ListDataScansResponse {
22643    pub fn new() -> Self {
22644        std::default::Default::default()
22645    }
22646
22647    /// Sets the value of [data_scans][crate::model::ListDataScansResponse::data_scans].
22648    ///
22649    /// # Example
22650    /// ```ignore,no_run
22651    /// # use google_cloud_dataplex_v1::model::ListDataScansResponse;
22652    /// use google_cloud_dataplex_v1::model::DataScan;
22653    /// let x = ListDataScansResponse::new()
22654    ///     .set_data_scans([
22655    ///         DataScan::default()/* use setters */,
22656    ///         DataScan::default()/* use (different) setters */,
22657    ///     ]);
22658    /// ```
22659    pub fn set_data_scans<T, V>(mut self, v: T) -> Self
22660    where
22661        T: std::iter::IntoIterator<Item = V>,
22662        V: std::convert::Into<crate::model::DataScan>,
22663    {
22664        use std::iter::Iterator;
22665        self.data_scans = v.into_iter().map(|i| i.into()).collect();
22666        self
22667    }
22668
22669    /// Sets the value of [next_page_token][crate::model::ListDataScansResponse::next_page_token].
22670    ///
22671    /// # Example
22672    /// ```ignore,no_run
22673    /// # use google_cloud_dataplex_v1::model::ListDataScansResponse;
22674    /// let x = ListDataScansResponse::new().set_next_page_token("example");
22675    /// ```
22676    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22677        self.next_page_token = v.into();
22678        self
22679    }
22680
22681    /// Sets the value of [unreachable][crate::model::ListDataScansResponse::unreachable].
22682    ///
22683    /// # Example
22684    /// ```ignore,no_run
22685    /// # use google_cloud_dataplex_v1::model::ListDataScansResponse;
22686    /// let x = ListDataScansResponse::new().set_unreachable(["a", "b", "c"]);
22687    /// ```
22688    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
22689    where
22690        T: std::iter::IntoIterator<Item = V>,
22691        V: std::convert::Into<std::string::String>,
22692    {
22693        use std::iter::Iterator;
22694        self.unreachable = v.into_iter().map(|i| i.into()).collect();
22695        self
22696    }
22697}
22698
22699impl wkt::message::Message for ListDataScansResponse {
22700    fn typename() -> &'static str {
22701        "type.googleapis.com/google.cloud.dataplex.v1.ListDataScansResponse"
22702    }
22703}
22704
22705#[doc(hidden)]
22706impl google_cloud_gax::paginator::internal::PageableResponse for ListDataScansResponse {
22707    type PageItem = crate::model::DataScan;
22708
22709    fn items(self) -> std::vec::Vec<Self::PageItem> {
22710        self.data_scans
22711    }
22712
22713    fn next_page_token(&self) -> std::string::String {
22714        use std::clone::Clone;
22715        self.next_page_token.clone()
22716    }
22717}
22718
22719/// Run DataScan Request
22720#[derive(Clone, Default, PartialEq)]
22721#[non_exhaustive]
22722pub struct RunDataScanRequest {
22723    /// Required. The resource name of the DataScan:
22724    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`.
22725    /// where `project` refers to a *project_id* or *project_number* and
22726    /// `location_id` refers to a Google Cloud region.
22727    ///
22728    /// Only **OnDemand** data scans are allowed.
22729    pub name: std::string::String,
22730
22731    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22732}
22733
22734impl RunDataScanRequest {
22735    pub fn new() -> Self {
22736        std::default::Default::default()
22737    }
22738
22739    /// Sets the value of [name][crate::model::RunDataScanRequest::name].
22740    ///
22741    /// # Example
22742    /// ```ignore,no_run
22743    /// # use google_cloud_dataplex_v1::model::RunDataScanRequest;
22744    /// let x = RunDataScanRequest::new().set_name("example");
22745    /// ```
22746    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22747        self.name = v.into();
22748        self
22749    }
22750}
22751
22752impl wkt::message::Message for RunDataScanRequest {
22753    fn typename() -> &'static str {
22754        "type.googleapis.com/google.cloud.dataplex.v1.RunDataScanRequest"
22755    }
22756}
22757
22758/// Run DataScan Response.
22759#[derive(Clone, Default, PartialEq)]
22760#[non_exhaustive]
22761pub struct RunDataScanResponse {
22762    /// DataScanJob created by RunDataScan request.
22763    pub job: std::option::Option<crate::model::DataScanJob>,
22764
22765    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22766}
22767
22768impl RunDataScanResponse {
22769    pub fn new() -> Self {
22770        std::default::Default::default()
22771    }
22772
22773    /// Sets the value of [job][crate::model::RunDataScanResponse::job].
22774    ///
22775    /// # Example
22776    /// ```ignore,no_run
22777    /// # use google_cloud_dataplex_v1::model::RunDataScanResponse;
22778    /// use google_cloud_dataplex_v1::model::DataScanJob;
22779    /// let x = RunDataScanResponse::new().set_job(DataScanJob::default()/* use setters */);
22780    /// ```
22781    pub fn set_job<T>(mut self, v: T) -> Self
22782    where
22783        T: std::convert::Into<crate::model::DataScanJob>,
22784    {
22785        self.job = std::option::Option::Some(v.into());
22786        self
22787    }
22788
22789    /// Sets or clears the value of [job][crate::model::RunDataScanResponse::job].
22790    ///
22791    /// # Example
22792    /// ```ignore,no_run
22793    /// # use google_cloud_dataplex_v1::model::RunDataScanResponse;
22794    /// use google_cloud_dataplex_v1::model::DataScanJob;
22795    /// let x = RunDataScanResponse::new().set_or_clear_job(Some(DataScanJob::default()/* use setters */));
22796    /// let x = RunDataScanResponse::new().set_or_clear_job(None::<DataScanJob>);
22797    /// ```
22798    pub fn set_or_clear_job<T>(mut self, v: std::option::Option<T>) -> Self
22799    where
22800        T: std::convert::Into<crate::model::DataScanJob>,
22801    {
22802        self.job = v.map(|x| x.into());
22803        self
22804    }
22805}
22806
22807impl wkt::message::Message for RunDataScanResponse {
22808    fn typename() -> &'static str {
22809        "type.googleapis.com/google.cloud.dataplex.v1.RunDataScanResponse"
22810    }
22811}
22812
22813/// Get DataScanJob request.
22814#[derive(Clone, Default, PartialEq)]
22815#[non_exhaustive]
22816pub struct GetDataScanJobRequest {
22817    /// Required. The resource name of the DataScanJob:
22818    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}`
22819    /// where `project` refers to a *project_id* or *project_number* and
22820    /// `location_id` refers to a Google Cloud region.
22821    pub name: std::string::String,
22822
22823    /// Optional. Select the DataScanJob view to return. Defaults to `BASIC`.
22824    pub view: crate::model::get_data_scan_job_request::DataScanJobView,
22825
22826    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22827}
22828
22829impl GetDataScanJobRequest {
22830    pub fn new() -> Self {
22831        std::default::Default::default()
22832    }
22833
22834    /// Sets the value of [name][crate::model::GetDataScanJobRequest::name].
22835    ///
22836    /// # Example
22837    /// ```ignore,no_run
22838    /// # use google_cloud_dataplex_v1::model::GetDataScanJobRequest;
22839    /// let x = GetDataScanJobRequest::new().set_name("example");
22840    /// ```
22841    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22842        self.name = v.into();
22843        self
22844    }
22845
22846    /// Sets the value of [view][crate::model::GetDataScanJobRequest::view].
22847    ///
22848    /// # Example
22849    /// ```ignore,no_run
22850    /// # use google_cloud_dataplex_v1::model::GetDataScanJobRequest;
22851    /// use google_cloud_dataplex_v1::model::get_data_scan_job_request::DataScanJobView;
22852    /// let x0 = GetDataScanJobRequest::new().set_view(DataScanJobView::Basic);
22853    /// let x1 = GetDataScanJobRequest::new().set_view(DataScanJobView::Full);
22854    /// ```
22855    pub fn set_view<
22856        T: std::convert::Into<crate::model::get_data_scan_job_request::DataScanJobView>,
22857    >(
22858        mut self,
22859        v: T,
22860    ) -> Self {
22861        self.view = v.into();
22862        self
22863    }
22864}
22865
22866impl wkt::message::Message for GetDataScanJobRequest {
22867    fn typename() -> &'static str {
22868        "type.googleapis.com/google.cloud.dataplex.v1.GetDataScanJobRequest"
22869    }
22870}
22871
22872/// Defines additional types related to [GetDataScanJobRequest].
22873pub mod get_data_scan_job_request {
22874    #[allow(unused_imports)]
22875    use super::*;
22876
22877    /// DataScanJob view options.
22878    ///
22879    /// # Working with unknown values
22880    ///
22881    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
22882    /// additional enum variants at any time. Adding new variants is not considered
22883    /// a breaking change. Applications should write their code in anticipation of:
22884    ///
22885    /// - New values appearing in future releases of the client library, **and**
22886    /// - New values received dynamically, without application changes.
22887    ///
22888    /// Please consult the [Working with enums] section in the user guide for some
22889    /// guidelines.
22890    ///
22891    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
22892    #[derive(Clone, Debug, PartialEq)]
22893    #[non_exhaustive]
22894    pub enum DataScanJobView {
22895        /// The API will default to the `BASIC` view.
22896        Unspecified,
22897        /// Basic view that does not include *spec* and *result*.
22898        Basic,
22899        /// Include everything.
22900        Full,
22901        /// If set, the enum was initialized with an unknown value.
22902        ///
22903        /// Applications can examine the value using [DataScanJobView::value] or
22904        /// [DataScanJobView::name].
22905        UnknownValue(data_scan_job_view::UnknownValue),
22906    }
22907
22908    #[doc(hidden)]
22909    pub mod data_scan_job_view {
22910        #[allow(unused_imports)]
22911        use super::*;
22912        #[derive(Clone, Debug, PartialEq)]
22913        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22914    }
22915
22916    impl DataScanJobView {
22917        /// Gets the enum value.
22918        ///
22919        /// Returns `None` if the enum contains an unknown value deserialized from
22920        /// the string representation of enums.
22921        pub fn value(&self) -> std::option::Option<i32> {
22922            match self {
22923                Self::Unspecified => std::option::Option::Some(0),
22924                Self::Basic => std::option::Option::Some(1),
22925                Self::Full => std::option::Option::Some(10),
22926                Self::UnknownValue(u) => u.0.value(),
22927            }
22928        }
22929
22930        /// Gets the enum value as a string.
22931        ///
22932        /// Returns `None` if the enum contains an unknown value deserialized from
22933        /// the integer representation of enums.
22934        pub fn name(&self) -> std::option::Option<&str> {
22935            match self {
22936                Self::Unspecified => std::option::Option::Some("DATA_SCAN_JOB_VIEW_UNSPECIFIED"),
22937                Self::Basic => std::option::Option::Some("BASIC"),
22938                Self::Full => std::option::Option::Some("FULL"),
22939                Self::UnknownValue(u) => u.0.name(),
22940            }
22941        }
22942    }
22943
22944    impl std::default::Default for DataScanJobView {
22945        fn default() -> Self {
22946            use std::convert::From;
22947            Self::from(0)
22948        }
22949    }
22950
22951    impl std::fmt::Display for DataScanJobView {
22952        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22953            wkt::internal::display_enum(f, self.name(), self.value())
22954        }
22955    }
22956
22957    impl std::convert::From<i32> for DataScanJobView {
22958        fn from(value: i32) -> Self {
22959            match value {
22960                0 => Self::Unspecified,
22961                1 => Self::Basic,
22962                10 => Self::Full,
22963                _ => Self::UnknownValue(data_scan_job_view::UnknownValue(
22964                    wkt::internal::UnknownEnumValue::Integer(value),
22965                )),
22966            }
22967        }
22968    }
22969
22970    impl std::convert::From<&str> for DataScanJobView {
22971        fn from(value: &str) -> Self {
22972            use std::string::ToString;
22973            match value {
22974                "DATA_SCAN_JOB_VIEW_UNSPECIFIED" => Self::Unspecified,
22975                "BASIC" => Self::Basic,
22976                "FULL" => Self::Full,
22977                _ => Self::UnknownValue(data_scan_job_view::UnknownValue(
22978                    wkt::internal::UnknownEnumValue::String(value.to_string()),
22979                )),
22980            }
22981        }
22982    }
22983
22984    impl serde::ser::Serialize for DataScanJobView {
22985        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22986        where
22987            S: serde::Serializer,
22988        {
22989            match self {
22990                Self::Unspecified => serializer.serialize_i32(0),
22991                Self::Basic => serializer.serialize_i32(1),
22992                Self::Full => serializer.serialize_i32(10),
22993                Self::UnknownValue(u) => u.0.serialize(serializer),
22994            }
22995        }
22996    }
22997
22998    impl<'de> serde::de::Deserialize<'de> for DataScanJobView {
22999        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23000        where
23001            D: serde::Deserializer<'de>,
23002        {
23003            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataScanJobView>::new(
23004                ".google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView",
23005            ))
23006        }
23007    }
23008}
23009
23010/// List DataScanJobs request.
23011#[derive(Clone, Default, PartialEq)]
23012#[non_exhaustive]
23013pub struct ListDataScanJobsRequest {
23014    /// Required. The resource name of the parent environment:
23015    /// `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`
23016    /// where `project` refers to a *project_id* or *project_number* and
23017    /// `location_id` refers to a Google Cloud region.
23018    pub parent: std::string::String,
23019
23020    /// Optional. Maximum number of DataScanJobs to return. The service may return
23021    /// fewer than this value. If unspecified, at most 10 DataScanJobs will be
23022    /// returned. The maximum value is 1000; values above 1000 will be coerced to
23023    /// 1000.
23024    pub page_size: i32,
23025
23026    /// Optional. Page token received from a previous `ListDataScanJobs` call.
23027    /// Provide this to retrieve the subsequent page. When paginating, all other
23028    /// parameters provided to `ListDataScanJobs` must match the call that provided
23029    /// the page token.
23030    pub page_token: std::string::String,
23031
23032    /// Optional. An expression for filtering the results of the ListDataScanJobs
23033    /// request.
23034    ///
23035    /// If unspecified, all datascan jobs will be returned. Multiple filters can be
23036    /// applied (with `AND`, `OR` logical operators). Filters are case-sensitive.
23037    ///
23038    /// Allowed fields are:
23039    ///
23040    /// - `start_time`
23041    /// - `end_time`
23042    ///
23043    /// `start_time` and `end_time` expect RFC-3339 formatted strings (e.g.
23044    /// 2018-10-08T18:30:00-07:00).
23045    ///
23046    /// For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time <
23047    /// 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between
23048    /// specified start and end times.
23049    pub filter: std::string::String,
23050
23051    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23052}
23053
23054impl ListDataScanJobsRequest {
23055    pub fn new() -> Self {
23056        std::default::Default::default()
23057    }
23058
23059    /// Sets the value of [parent][crate::model::ListDataScanJobsRequest::parent].
23060    ///
23061    /// # Example
23062    /// ```ignore,no_run
23063    /// # use google_cloud_dataplex_v1::model::ListDataScanJobsRequest;
23064    /// let x = ListDataScanJobsRequest::new().set_parent("example");
23065    /// ```
23066    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23067        self.parent = v.into();
23068        self
23069    }
23070
23071    /// Sets the value of [page_size][crate::model::ListDataScanJobsRequest::page_size].
23072    ///
23073    /// # Example
23074    /// ```ignore,no_run
23075    /// # use google_cloud_dataplex_v1::model::ListDataScanJobsRequest;
23076    /// let x = ListDataScanJobsRequest::new().set_page_size(42);
23077    /// ```
23078    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
23079        self.page_size = v.into();
23080        self
23081    }
23082
23083    /// Sets the value of [page_token][crate::model::ListDataScanJobsRequest::page_token].
23084    ///
23085    /// # Example
23086    /// ```ignore,no_run
23087    /// # use google_cloud_dataplex_v1::model::ListDataScanJobsRequest;
23088    /// let x = ListDataScanJobsRequest::new().set_page_token("example");
23089    /// ```
23090    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23091        self.page_token = v.into();
23092        self
23093    }
23094
23095    /// Sets the value of [filter][crate::model::ListDataScanJobsRequest::filter].
23096    ///
23097    /// # Example
23098    /// ```ignore,no_run
23099    /// # use google_cloud_dataplex_v1::model::ListDataScanJobsRequest;
23100    /// let x = ListDataScanJobsRequest::new().set_filter("example");
23101    /// ```
23102    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23103        self.filter = v.into();
23104        self
23105    }
23106}
23107
23108impl wkt::message::Message for ListDataScanJobsRequest {
23109    fn typename() -> &'static str {
23110        "type.googleapis.com/google.cloud.dataplex.v1.ListDataScanJobsRequest"
23111    }
23112}
23113
23114/// List DataScanJobs response.
23115#[derive(Clone, Default, PartialEq)]
23116#[non_exhaustive]
23117pub struct ListDataScanJobsResponse {
23118    /// DataScanJobs (`BASIC` view only) under a given dataScan.
23119    pub data_scan_jobs: std::vec::Vec<crate::model::DataScanJob>,
23120
23121    /// Token to retrieve the next page of results, or empty if there are no more
23122    /// results in the list.
23123    pub next_page_token: std::string::String,
23124
23125    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23126}
23127
23128impl ListDataScanJobsResponse {
23129    pub fn new() -> Self {
23130        std::default::Default::default()
23131    }
23132
23133    /// Sets the value of [data_scan_jobs][crate::model::ListDataScanJobsResponse::data_scan_jobs].
23134    ///
23135    /// # Example
23136    /// ```ignore,no_run
23137    /// # use google_cloud_dataplex_v1::model::ListDataScanJobsResponse;
23138    /// use google_cloud_dataplex_v1::model::DataScanJob;
23139    /// let x = ListDataScanJobsResponse::new()
23140    ///     .set_data_scan_jobs([
23141    ///         DataScanJob::default()/* use setters */,
23142    ///         DataScanJob::default()/* use (different) setters */,
23143    ///     ]);
23144    /// ```
23145    pub fn set_data_scan_jobs<T, V>(mut self, v: T) -> Self
23146    where
23147        T: std::iter::IntoIterator<Item = V>,
23148        V: std::convert::Into<crate::model::DataScanJob>,
23149    {
23150        use std::iter::Iterator;
23151        self.data_scan_jobs = v.into_iter().map(|i| i.into()).collect();
23152        self
23153    }
23154
23155    /// Sets the value of [next_page_token][crate::model::ListDataScanJobsResponse::next_page_token].
23156    ///
23157    /// # Example
23158    /// ```ignore,no_run
23159    /// # use google_cloud_dataplex_v1::model::ListDataScanJobsResponse;
23160    /// let x = ListDataScanJobsResponse::new().set_next_page_token("example");
23161    /// ```
23162    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23163        self.next_page_token = v.into();
23164        self
23165    }
23166}
23167
23168impl wkt::message::Message for ListDataScanJobsResponse {
23169    fn typename() -> &'static str {
23170        "type.googleapis.com/google.cloud.dataplex.v1.ListDataScanJobsResponse"
23171    }
23172}
23173
23174#[doc(hidden)]
23175impl google_cloud_gax::paginator::internal::PageableResponse for ListDataScanJobsResponse {
23176    type PageItem = crate::model::DataScanJob;
23177
23178    fn items(self) -> std::vec::Vec<Self::PageItem> {
23179        self.data_scan_jobs
23180    }
23181
23182    fn next_page_token(&self) -> std::string::String {
23183        use std::clone::Clone;
23184        self.next_page_token.clone()
23185    }
23186}
23187
23188/// Request details for generating data quality rule recommendations.
23189#[derive(Clone, Default, PartialEq)]
23190#[non_exhaustive]
23191pub struct GenerateDataQualityRulesRequest {
23192    /// Required. The name must be one of the following:
23193    ///
23194    /// * The name of a data scan with at least one successful, completed data
23195    ///   profiling job
23196    /// * The name of a successful, completed data profiling job (a data scan job
23197    ///   where the job type is data profiling)
23198    pub name: std::string::String,
23199
23200    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23201}
23202
23203impl GenerateDataQualityRulesRequest {
23204    pub fn new() -> Self {
23205        std::default::Default::default()
23206    }
23207
23208    /// Sets the value of [name][crate::model::GenerateDataQualityRulesRequest::name].
23209    ///
23210    /// # Example
23211    /// ```ignore,no_run
23212    /// # use google_cloud_dataplex_v1::model::GenerateDataQualityRulesRequest;
23213    /// let x = GenerateDataQualityRulesRequest::new().set_name("example");
23214    /// ```
23215    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23216        self.name = v.into();
23217        self
23218    }
23219}
23220
23221impl wkt::message::Message for GenerateDataQualityRulesRequest {
23222    fn typename() -> &'static str {
23223        "type.googleapis.com/google.cloud.dataplex.v1.GenerateDataQualityRulesRequest"
23224    }
23225}
23226
23227/// Response details for data quality rule recommendations.
23228#[derive(Clone, Default, PartialEq)]
23229#[non_exhaustive]
23230pub struct GenerateDataQualityRulesResponse {
23231    /// The data quality rules that Dataplex Universal Catalog generates based on
23232    /// the results of a data profiling scan.
23233    pub rule: std::vec::Vec<crate::model::DataQualityRule>,
23234
23235    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23236}
23237
23238impl GenerateDataQualityRulesResponse {
23239    pub fn new() -> Self {
23240        std::default::Default::default()
23241    }
23242
23243    /// Sets the value of [rule][crate::model::GenerateDataQualityRulesResponse::rule].
23244    ///
23245    /// # Example
23246    /// ```ignore,no_run
23247    /// # use google_cloud_dataplex_v1::model::GenerateDataQualityRulesResponse;
23248    /// use google_cloud_dataplex_v1::model::DataQualityRule;
23249    /// let x = GenerateDataQualityRulesResponse::new()
23250    ///     .set_rule([
23251    ///         DataQualityRule::default()/* use setters */,
23252    ///         DataQualityRule::default()/* use (different) setters */,
23253    ///     ]);
23254    /// ```
23255    pub fn set_rule<T, V>(mut self, v: T) -> Self
23256    where
23257        T: std::iter::IntoIterator<Item = V>,
23258        V: std::convert::Into<crate::model::DataQualityRule>,
23259    {
23260        use std::iter::Iterator;
23261        self.rule = v.into_iter().map(|i| i.into()).collect();
23262        self
23263    }
23264}
23265
23266impl wkt::message::Message for GenerateDataQualityRulesResponse {
23267    fn typename() -> &'static str {
23268        "type.googleapis.com/google.cloud.dataplex.v1.GenerateDataQualityRulesResponse"
23269    }
23270}
23271
23272/// Represents a user-visible job which provides the insights for the related
23273/// data source.
23274///
23275/// For example:
23276///
23277/// * Data quality: generates queries based on the rules and runs against the
23278///   data to get data quality check results. For more information, see [Auto
23279///   data quality
23280///   overview](https://cloud.google.com/dataplex/docs/auto-data-quality-overview).
23281/// * Data profile: analyzes the data in tables and generates insights about
23282///   the structure, content and relationships (such as null percent,
23283///   cardinality, min/max/mean, etc). For more information, see [About data
23284///   profiling](https://cloud.google.com/dataplex/docs/data-profiling-overview).
23285/// * Data discovery: scans data in Cloud Storage buckets to extract and then
23286///   catalog metadata. For more information, see [Discover and catalog Cloud
23287///   Storage data](https://cloud.google.com/bigquery/docs/automatic-discovery).
23288/// * Data documentation: analyzes the table details and generates insights
23289///   including descriptions and sample SQL queries for the table. For more
23290///   information, see [Generate data insights in
23291///   BigQuery](https://cloud.google.com/bigquery/docs/data-insights).
23292#[derive(Clone, Default, PartialEq)]
23293#[non_exhaustive]
23294pub struct DataScan {
23295    /// Output only. Identifier. The relative resource name of the scan, of the
23296    /// form: `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`,
23297    /// where `project` refers to a *project_id* or *project_number* and
23298    /// `location_id` refers to a Google Cloud region.
23299    pub name: std::string::String,
23300
23301    /// Output only. System generated globally unique ID for the scan. This ID will
23302    /// be different if the scan is deleted and re-created with the same name.
23303    pub uid: std::string::String,
23304
23305    /// Optional. Description of the scan.
23306    ///
23307    /// * Must be between 1-1024 characters.
23308    pub description: std::string::String,
23309
23310    /// Optional. User friendly display name.
23311    ///
23312    /// * Must be between 1-256 characters.
23313    pub display_name: std::string::String,
23314
23315    /// Optional. User-defined labels for the scan.
23316    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
23317
23318    /// Output only. Current state of the DataScan.
23319    pub state: crate::model::State,
23320
23321    /// Output only. The time when the scan was created.
23322    pub create_time: std::option::Option<wkt::Timestamp>,
23323
23324    /// Output only. The time when the scan was last updated.
23325    pub update_time: std::option::Option<wkt::Timestamp>,
23326
23327    /// Required. The data source for DataScan.
23328    pub data: std::option::Option<crate::model::DataSource>,
23329
23330    /// Optional. DataScan execution settings.
23331    ///
23332    /// If not specified, the fields in it will use their default values.
23333    pub execution_spec: std::option::Option<crate::model::data_scan::ExecutionSpec>,
23334
23335    /// Output only. Status of the data scan execution.
23336    pub execution_status: std::option::Option<crate::model::data_scan::ExecutionStatus>,
23337
23338    /// Output only. The type of DataScan.
23339    pub r#type: crate::model::DataScanType,
23340
23341    /// Data scan related setting.
23342    /// The settings are required and immutable. After you configure the settings
23343    /// for one type of data scan, you can't change the data scan to a different
23344    /// type of data scan.
23345    pub spec: std::option::Option<crate::model::data_scan::Spec>,
23346
23347    /// The result of the data scan.
23348    pub result: std::option::Option<crate::model::data_scan::Result>,
23349
23350    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23351}
23352
23353impl DataScan {
23354    pub fn new() -> Self {
23355        std::default::Default::default()
23356    }
23357
23358    /// Sets the value of [name][crate::model::DataScan::name].
23359    ///
23360    /// # Example
23361    /// ```ignore,no_run
23362    /// # use google_cloud_dataplex_v1::model::DataScan;
23363    /// let x = DataScan::new().set_name("example");
23364    /// ```
23365    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23366        self.name = v.into();
23367        self
23368    }
23369
23370    /// Sets the value of [uid][crate::model::DataScan::uid].
23371    ///
23372    /// # Example
23373    /// ```ignore,no_run
23374    /// # use google_cloud_dataplex_v1::model::DataScan;
23375    /// let x = DataScan::new().set_uid("example");
23376    /// ```
23377    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23378        self.uid = v.into();
23379        self
23380    }
23381
23382    /// Sets the value of [description][crate::model::DataScan::description].
23383    ///
23384    /// # Example
23385    /// ```ignore,no_run
23386    /// # use google_cloud_dataplex_v1::model::DataScan;
23387    /// let x = DataScan::new().set_description("example");
23388    /// ```
23389    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23390        self.description = v.into();
23391        self
23392    }
23393
23394    /// Sets the value of [display_name][crate::model::DataScan::display_name].
23395    ///
23396    /// # Example
23397    /// ```ignore,no_run
23398    /// # use google_cloud_dataplex_v1::model::DataScan;
23399    /// let x = DataScan::new().set_display_name("example");
23400    /// ```
23401    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23402        self.display_name = v.into();
23403        self
23404    }
23405
23406    /// Sets the value of [labels][crate::model::DataScan::labels].
23407    ///
23408    /// # Example
23409    /// ```ignore,no_run
23410    /// # use google_cloud_dataplex_v1::model::DataScan;
23411    /// let x = DataScan::new().set_labels([
23412    ///     ("key0", "abc"),
23413    ///     ("key1", "xyz"),
23414    /// ]);
23415    /// ```
23416    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
23417    where
23418        T: std::iter::IntoIterator<Item = (K, V)>,
23419        K: std::convert::Into<std::string::String>,
23420        V: std::convert::Into<std::string::String>,
23421    {
23422        use std::iter::Iterator;
23423        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
23424        self
23425    }
23426
23427    /// Sets the value of [state][crate::model::DataScan::state].
23428    ///
23429    /// # Example
23430    /// ```ignore,no_run
23431    /// # use google_cloud_dataplex_v1::model::DataScan;
23432    /// use google_cloud_dataplex_v1::model::State;
23433    /// let x0 = DataScan::new().set_state(State::Active);
23434    /// let x1 = DataScan::new().set_state(State::Creating);
23435    /// let x2 = DataScan::new().set_state(State::Deleting);
23436    /// ```
23437    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
23438        self.state = v.into();
23439        self
23440    }
23441
23442    /// Sets the value of [create_time][crate::model::DataScan::create_time].
23443    ///
23444    /// # Example
23445    /// ```ignore,no_run
23446    /// # use google_cloud_dataplex_v1::model::DataScan;
23447    /// use wkt::Timestamp;
23448    /// let x = DataScan::new().set_create_time(Timestamp::default()/* use setters */);
23449    /// ```
23450    pub fn set_create_time<T>(mut self, v: T) -> Self
23451    where
23452        T: std::convert::Into<wkt::Timestamp>,
23453    {
23454        self.create_time = std::option::Option::Some(v.into());
23455        self
23456    }
23457
23458    /// Sets or clears the value of [create_time][crate::model::DataScan::create_time].
23459    ///
23460    /// # Example
23461    /// ```ignore,no_run
23462    /// # use google_cloud_dataplex_v1::model::DataScan;
23463    /// use wkt::Timestamp;
23464    /// let x = DataScan::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
23465    /// let x = DataScan::new().set_or_clear_create_time(None::<Timestamp>);
23466    /// ```
23467    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
23468    where
23469        T: std::convert::Into<wkt::Timestamp>,
23470    {
23471        self.create_time = v.map(|x| x.into());
23472        self
23473    }
23474
23475    /// Sets the value of [update_time][crate::model::DataScan::update_time].
23476    ///
23477    /// # Example
23478    /// ```ignore,no_run
23479    /// # use google_cloud_dataplex_v1::model::DataScan;
23480    /// use wkt::Timestamp;
23481    /// let x = DataScan::new().set_update_time(Timestamp::default()/* use setters */);
23482    /// ```
23483    pub fn set_update_time<T>(mut self, v: T) -> Self
23484    where
23485        T: std::convert::Into<wkt::Timestamp>,
23486    {
23487        self.update_time = std::option::Option::Some(v.into());
23488        self
23489    }
23490
23491    /// Sets or clears the value of [update_time][crate::model::DataScan::update_time].
23492    ///
23493    /// # Example
23494    /// ```ignore,no_run
23495    /// # use google_cloud_dataplex_v1::model::DataScan;
23496    /// use wkt::Timestamp;
23497    /// let x = DataScan::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
23498    /// let x = DataScan::new().set_or_clear_update_time(None::<Timestamp>);
23499    /// ```
23500    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
23501    where
23502        T: std::convert::Into<wkt::Timestamp>,
23503    {
23504        self.update_time = v.map(|x| x.into());
23505        self
23506    }
23507
23508    /// Sets the value of [data][crate::model::DataScan::data].
23509    ///
23510    /// # Example
23511    /// ```ignore,no_run
23512    /// # use google_cloud_dataplex_v1::model::DataScan;
23513    /// use google_cloud_dataplex_v1::model::DataSource;
23514    /// let x = DataScan::new().set_data(DataSource::default()/* use setters */);
23515    /// ```
23516    pub fn set_data<T>(mut self, v: T) -> Self
23517    where
23518        T: std::convert::Into<crate::model::DataSource>,
23519    {
23520        self.data = std::option::Option::Some(v.into());
23521        self
23522    }
23523
23524    /// Sets or clears the value of [data][crate::model::DataScan::data].
23525    ///
23526    /// # Example
23527    /// ```ignore,no_run
23528    /// # use google_cloud_dataplex_v1::model::DataScan;
23529    /// use google_cloud_dataplex_v1::model::DataSource;
23530    /// let x = DataScan::new().set_or_clear_data(Some(DataSource::default()/* use setters */));
23531    /// let x = DataScan::new().set_or_clear_data(None::<DataSource>);
23532    /// ```
23533    pub fn set_or_clear_data<T>(mut self, v: std::option::Option<T>) -> Self
23534    where
23535        T: std::convert::Into<crate::model::DataSource>,
23536    {
23537        self.data = v.map(|x| x.into());
23538        self
23539    }
23540
23541    /// Sets the value of [execution_spec][crate::model::DataScan::execution_spec].
23542    ///
23543    /// # Example
23544    /// ```ignore,no_run
23545    /// # use google_cloud_dataplex_v1::model::DataScan;
23546    /// use google_cloud_dataplex_v1::model::data_scan::ExecutionSpec;
23547    /// let x = DataScan::new().set_execution_spec(ExecutionSpec::default()/* use setters */);
23548    /// ```
23549    pub fn set_execution_spec<T>(mut self, v: T) -> Self
23550    where
23551        T: std::convert::Into<crate::model::data_scan::ExecutionSpec>,
23552    {
23553        self.execution_spec = std::option::Option::Some(v.into());
23554        self
23555    }
23556
23557    /// Sets or clears the value of [execution_spec][crate::model::DataScan::execution_spec].
23558    ///
23559    /// # Example
23560    /// ```ignore,no_run
23561    /// # use google_cloud_dataplex_v1::model::DataScan;
23562    /// use google_cloud_dataplex_v1::model::data_scan::ExecutionSpec;
23563    /// let x = DataScan::new().set_or_clear_execution_spec(Some(ExecutionSpec::default()/* use setters */));
23564    /// let x = DataScan::new().set_or_clear_execution_spec(None::<ExecutionSpec>);
23565    /// ```
23566    pub fn set_or_clear_execution_spec<T>(mut self, v: std::option::Option<T>) -> Self
23567    where
23568        T: std::convert::Into<crate::model::data_scan::ExecutionSpec>,
23569    {
23570        self.execution_spec = v.map(|x| x.into());
23571        self
23572    }
23573
23574    /// Sets the value of [execution_status][crate::model::DataScan::execution_status].
23575    ///
23576    /// # Example
23577    /// ```ignore,no_run
23578    /// # use google_cloud_dataplex_v1::model::DataScan;
23579    /// use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
23580    /// let x = DataScan::new().set_execution_status(ExecutionStatus::default()/* use setters */);
23581    /// ```
23582    pub fn set_execution_status<T>(mut self, v: T) -> Self
23583    where
23584        T: std::convert::Into<crate::model::data_scan::ExecutionStatus>,
23585    {
23586        self.execution_status = std::option::Option::Some(v.into());
23587        self
23588    }
23589
23590    /// Sets or clears the value of [execution_status][crate::model::DataScan::execution_status].
23591    ///
23592    /// # Example
23593    /// ```ignore,no_run
23594    /// # use google_cloud_dataplex_v1::model::DataScan;
23595    /// use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
23596    /// let x = DataScan::new().set_or_clear_execution_status(Some(ExecutionStatus::default()/* use setters */));
23597    /// let x = DataScan::new().set_or_clear_execution_status(None::<ExecutionStatus>);
23598    /// ```
23599    pub fn set_or_clear_execution_status<T>(mut self, v: std::option::Option<T>) -> Self
23600    where
23601        T: std::convert::Into<crate::model::data_scan::ExecutionStatus>,
23602    {
23603        self.execution_status = v.map(|x| x.into());
23604        self
23605    }
23606
23607    /// Sets the value of [r#type][crate::model::DataScan::type].
23608    ///
23609    /// # Example
23610    /// ```ignore,no_run
23611    /// # use google_cloud_dataplex_v1::model::DataScan;
23612    /// use google_cloud_dataplex_v1::model::DataScanType;
23613    /// let x0 = DataScan::new().set_type(DataScanType::DataQuality);
23614    /// let x1 = DataScan::new().set_type(DataScanType::DataProfile);
23615    /// let x2 = DataScan::new().set_type(DataScanType::DataDiscovery);
23616    /// ```
23617    pub fn set_type<T: std::convert::Into<crate::model::DataScanType>>(mut self, v: T) -> Self {
23618        self.r#type = v.into();
23619        self
23620    }
23621
23622    /// Sets the value of [spec][crate::model::DataScan::spec].
23623    ///
23624    /// Note that all the setters affecting `spec` are mutually
23625    /// exclusive.
23626    ///
23627    /// # Example
23628    /// ```ignore,no_run
23629    /// # use google_cloud_dataplex_v1::model::DataScan;
23630    /// use google_cloud_dataplex_v1::model::DataQualitySpec;
23631    /// let x = DataScan::new().set_spec(Some(
23632    ///     google_cloud_dataplex_v1::model::data_scan::Spec::DataQualitySpec(DataQualitySpec::default().into())));
23633    /// ```
23634    pub fn set_spec<T: std::convert::Into<std::option::Option<crate::model::data_scan::Spec>>>(
23635        mut self,
23636        v: T,
23637    ) -> Self {
23638        self.spec = v.into();
23639        self
23640    }
23641
23642    /// The value of [spec][crate::model::DataScan::spec]
23643    /// if it holds a `DataQualitySpec`, `None` if the field is not set or
23644    /// holds a different branch.
23645    pub fn data_quality_spec(
23646        &self,
23647    ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualitySpec>> {
23648        #[allow(unreachable_patterns)]
23649        self.spec.as_ref().and_then(|v| match v {
23650            crate::model::data_scan::Spec::DataQualitySpec(v) => std::option::Option::Some(v),
23651            _ => std::option::Option::None,
23652        })
23653    }
23654
23655    /// Sets the value of [spec][crate::model::DataScan::spec]
23656    /// to hold a `DataQualitySpec`.
23657    ///
23658    /// Note that all the setters affecting `spec` are
23659    /// mutually exclusive.
23660    ///
23661    /// # Example
23662    /// ```ignore,no_run
23663    /// # use google_cloud_dataplex_v1::model::DataScan;
23664    /// use google_cloud_dataplex_v1::model::DataQualitySpec;
23665    /// let x = DataScan::new().set_data_quality_spec(DataQualitySpec::default()/* use setters */);
23666    /// assert!(x.data_quality_spec().is_some());
23667    /// assert!(x.data_profile_spec().is_none());
23668    /// assert!(x.data_discovery_spec().is_none());
23669    /// assert!(x.data_documentation_spec().is_none());
23670    /// ```
23671    pub fn set_data_quality_spec<
23672        T: std::convert::Into<std::boxed::Box<crate::model::DataQualitySpec>>,
23673    >(
23674        mut self,
23675        v: T,
23676    ) -> Self {
23677        self.spec =
23678            std::option::Option::Some(crate::model::data_scan::Spec::DataQualitySpec(v.into()));
23679        self
23680    }
23681
23682    /// The value of [spec][crate::model::DataScan::spec]
23683    /// if it holds a `DataProfileSpec`, `None` if the field is not set or
23684    /// holds a different branch.
23685    pub fn data_profile_spec(
23686        &self,
23687    ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileSpec>> {
23688        #[allow(unreachable_patterns)]
23689        self.spec.as_ref().and_then(|v| match v {
23690            crate::model::data_scan::Spec::DataProfileSpec(v) => std::option::Option::Some(v),
23691            _ => std::option::Option::None,
23692        })
23693    }
23694
23695    /// Sets the value of [spec][crate::model::DataScan::spec]
23696    /// to hold a `DataProfileSpec`.
23697    ///
23698    /// Note that all the setters affecting `spec` are
23699    /// mutually exclusive.
23700    ///
23701    /// # Example
23702    /// ```ignore,no_run
23703    /// # use google_cloud_dataplex_v1::model::DataScan;
23704    /// use google_cloud_dataplex_v1::model::DataProfileSpec;
23705    /// let x = DataScan::new().set_data_profile_spec(DataProfileSpec::default()/* use setters */);
23706    /// assert!(x.data_profile_spec().is_some());
23707    /// assert!(x.data_quality_spec().is_none());
23708    /// assert!(x.data_discovery_spec().is_none());
23709    /// assert!(x.data_documentation_spec().is_none());
23710    /// ```
23711    pub fn set_data_profile_spec<
23712        T: std::convert::Into<std::boxed::Box<crate::model::DataProfileSpec>>,
23713    >(
23714        mut self,
23715        v: T,
23716    ) -> Self {
23717        self.spec =
23718            std::option::Option::Some(crate::model::data_scan::Spec::DataProfileSpec(v.into()));
23719        self
23720    }
23721
23722    /// The value of [spec][crate::model::DataScan::spec]
23723    /// if it holds a `DataDiscoverySpec`, `None` if the field is not set or
23724    /// holds a different branch.
23725    pub fn data_discovery_spec(
23726        &self,
23727    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoverySpec>> {
23728        #[allow(unreachable_patterns)]
23729        self.spec.as_ref().and_then(|v| match v {
23730            crate::model::data_scan::Spec::DataDiscoverySpec(v) => std::option::Option::Some(v),
23731            _ => std::option::Option::None,
23732        })
23733    }
23734
23735    /// Sets the value of [spec][crate::model::DataScan::spec]
23736    /// to hold a `DataDiscoverySpec`.
23737    ///
23738    /// Note that all the setters affecting `spec` are
23739    /// mutually exclusive.
23740    ///
23741    /// # Example
23742    /// ```ignore,no_run
23743    /// # use google_cloud_dataplex_v1::model::DataScan;
23744    /// use google_cloud_dataplex_v1::model::DataDiscoverySpec;
23745    /// let x = DataScan::new().set_data_discovery_spec(DataDiscoverySpec::default()/* use setters */);
23746    /// assert!(x.data_discovery_spec().is_some());
23747    /// assert!(x.data_quality_spec().is_none());
23748    /// assert!(x.data_profile_spec().is_none());
23749    /// assert!(x.data_documentation_spec().is_none());
23750    /// ```
23751    pub fn set_data_discovery_spec<
23752        T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoverySpec>>,
23753    >(
23754        mut self,
23755        v: T,
23756    ) -> Self {
23757        self.spec =
23758            std::option::Option::Some(crate::model::data_scan::Spec::DataDiscoverySpec(v.into()));
23759        self
23760    }
23761
23762    /// The value of [spec][crate::model::DataScan::spec]
23763    /// if it holds a `DataDocumentationSpec`, `None` if the field is not set or
23764    /// holds a different branch.
23765    pub fn data_documentation_spec(
23766        &self,
23767    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationSpec>> {
23768        #[allow(unreachable_patterns)]
23769        self.spec.as_ref().and_then(|v| match v {
23770            crate::model::data_scan::Spec::DataDocumentationSpec(v) => std::option::Option::Some(v),
23771            _ => std::option::Option::None,
23772        })
23773    }
23774
23775    /// Sets the value of [spec][crate::model::DataScan::spec]
23776    /// to hold a `DataDocumentationSpec`.
23777    ///
23778    /// Note that all the setters affecting `spec` are
23779    /// mutually exclusive.
23780    ///
23781    /// # Example
23782    /// ```ignore,no_run
23783    /// # use google_cloud_dataplex_v1::model::DataScan;
23784    /// use google_cloud_dataplex_v1::model::DataDocumentationSpec;
23785    /// let x = DataScan::new().set_data_documentation_spec(DataDocumentationSpec::default()/* use setters */);
23786    /// assert!(x.data_documentation_spec().is_some());
23787    /// assert!(x.data_quality_spec().is_none());
23788    /// assert!(x.data_profile_spec().is_none());
23789    /// assert!(x.data_discovery_spec().is_none());
23790    /// ```
23791    pub fn set_data_documentation_spec<
23792        T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationSpec>>,
23793    >(
23794        mut self,
23795        v: T,
23796    ) -> Self {
23797        self.spec = std::option::Option::Some(
23798            crate::model::data_scan::Spec::DataDocumentationSpec(v.into()),
23799        );
23800        self
23801    }
23802
23803    /// Sets the value of [result][crate::model::DataScan::result].
23804    ///
23805    /// Note that all the setters affecting `result` are mutually
23806    /// exclusive.
23807    ///
23808    /// # Example
23809    /// ```ignore,no_run
23810    /// # use google_cloud_dataplex_v1::model::DataScan;
23811    /// use google_cloud_dataplex_v1::model::DataQualityResult;
23812    /// let x = DataScan::new().set_result(Some(
23813    ///     google_cloud_dataplex_v1::model::data_scan::Result::DataQualityResult(DataQualityResult::default().into())));
23814    /// ```
23815    pub fn set_result<
23816        T: std::convert::Into<std::option::Option<crate::model::data_scan::Result>>,
23817    >(
23818        mut self,
23819        v: T,
23820    ) -> Self {
23821        self.result = v.into();
23822        self
23823    }
23824
23825    /// The value of [result][crate::model::DataScan::result]
23826    /// if it holds a `DataQualityResult`, `None` if the field is not set or
23827    /// holds a different branch.
23828    pub fn data_quality_result(
23829        &self,
23830    ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualityResult>> {
23831        #[allow(unreachable_patterns)]
23832        self.result.as_ref().and_then(|v| match v {
23833            crate::model::data_scan::Result::DataQualityResult(v) => std::option::Option::Some(v),
23834            _ => std::option::Option::None,
23835        })
23836    }
23837
23838    /// Sets the value of [result][crate::model::DataScan::result]
23839    /// to hold a `DataQualityResult`.
23840    ///
23841    /// Note that all the setters affecting `result` are
23842    /// mutually exclusive.
23843    ///
23844    /// # Example
23845    /// ```ignore,no_run
23846    /// # use google_cloud_dataplex_v1::model::DataScan;
23847    /// use google_cloud_dataplex_v1::model::DataQualityResult;
23848    /// let x = DataScan::new().set_data_quality_result(DataQualityResult::default()/* use setters */);
23849    /// assert!(x.data_quality_result().is_some());
23850    /// assert!(x.data_profile_result().is_none());
23851    /// assert!(x.data_discovery_result().is_none());
23852    /// assert!(x.data_documentation_result().is_none());
23853    /// ```
23854    pub fn set_data_quality_result<
23855        T: std::convert::Into<std::boxed::Box<crate::model::DataQualityResult>>,
23856    >(
23857        mut self,
23858        v: T,
23859    ) -> Self {
23860        self.result =
23861            std::option::Option::Some(crate::model::data_scan::Result::DataQualityResult(v.into()));
23862        self
23863    }
23864
23865    /// The value of [result][crate::model::DataScan::result]
23866    /// if it holds a `DataProfileResult`, `None` if the field is not set or
23867    /// holds a different branch.
23868    pub fn data_profile_result(
23869        &self,
23870    ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileResult>> {
23871        #[allow(unreachable_patterns)]
23872        self.result.as_ref().and_then(|v| match v {
23873            crate::model::data_scan::Result::DataProfileResult(v) => std::option::Option::Some(v),
23874            _ => std::option::Option::None,
23875        })
23876    }
23877
23878    /// Sets the value of [result][crate::model::DataScan::result]
23879    /// to hold a `DataProfileResult`.
23880    ///
23881    /// Note that all the setters affecting `result` are
23882    /// mutually exclusive.
23883    ///
23884    /// # Example
23885    /// ```ignore,no_run
23886    /// # use google_cloud_dataplex_v1::model::DataScan;
23887    /// use google_cloud_dataplex_v1::model::DataProfileResult;
23888    /// let x = DataScan::new().set_data_profile_result(DataProfileResult::default()/* use setters */);
23889    /// assert!(x.data_profile_result().is_some());
23890    /// assert!(x.data_quality_result().is_none());
23891    /// assert!(x.data_discovery_result().is_none());
23892    /// assert!(x.data_documentation_result().is_none());
23893    /// ```
23894    pub fn set_data_profile_result<
23895        T: std::convert::Into<std::boxed::Box<crate::model::DataProfileResult>>,
23896    >(
23897        mut self,
23898        v: T,
23899    ) -> Self {
23900        self.result =
23901            std::option::Option::Some(crate::model::data_scan::Result::DataProfileResult(v.into()));
23902        self
23903    }
23904
23905    /// The value of [result][crate::model::DataScan::result]
23906    /// if it holds a `DataDiscoveryResult`, `None` if the field is not set or
23907    /// holds a different branch.
23908    pub fn data_discovery_result(
23909        &self,
23910    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoveryResult>> {
23911        #[allow(unreachable_patterns)]
23912        self.result.as_ref().and_then(|v| match v {
23913            crate::model::data_scan::Result::DataDiscoveryResult(v) => std::option::Option::Some(v),
23914            _ => std::option::Option::None,
23915        })
23916    }
23917
23918    /// Sets the value of [result][crate::model::DataScan::result]
23919    /// to hold a `DataDiscoveryResult`.
23920    ///
23921    /// Note that all the setters affecting `result` are
23922    /// mutually exclusive.
23923    ///
23924    /// # Example
23925    /// ```ignore,no_run
23926    /// # use google_cloud_dataplex_v1::model::DataScan;
23927    /// use google_cloud_dataplex_v1::model::DataDiscoveryResult;
23928    /// let x = DataScan::new().set_data_discovery_result(DataDiscoveryResult::default()/* use setters */);
23929    /// assert!(x.data_discovery_result().is_some());
23930    /// assert!(x.data_quality_result().is_none());
23931    /// assert!(x.data_profile_result().is_none());
23932    /// assert!(x.data_documentation_result().is_none());
23933    /// ```
23934    pub fn set_data_discovery_result<
23935        T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoveryResult>>,
23936    >(
23937        mut self,
23938        v: T,
23939    ) -> Self {
23940        self.result = std::option::Option::Some(
23941            crate::model::data_scan::Result::DataDiscoveryResult(v.into()),
23942        );
23943        self
23944    }
23945
23946    /// The value of [result][crate::model::DataScan::result]
23947    /// if it holds a `DataDocumentationResult`, `None` if the field is not set or
23948    /// holds a different branch.
23949    pub fn data_documentation_result(
23950        &self,
23951    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationResult>> {
23952        #[allow(unreachable_patterns)]
23953        self.result.as_ref().and_then(|v| match v {
23954            crate::model::data_scan::Result::DataDocumentationResult(v) => {
23955                std::option::Option::Some(v)
23956            }
23957            _ => std::option::Option::None,
23958        })
23959    }
23960
23961    /// Sets the value of [result][crate::model::DataScan::result]
23962    /// to hold a `DataDocumentationResult`.
23963    ///
23964    /// Note that all the setters affecting `result` are
23965    /// mutually exclusive.
23966    ///
23967    /// # Example
23968    /// ```ignore,no_run
23969    /// # use google_cloud_dataplex_v1::model::DataScan;
23970    /// use google_cloud_dataplex_v1::model::DataDocumentationResult;
23971    /// let x = DataScan::new().set_data_documentation_result(DataDocumentationResult::default()/* use setters */);
23972    /// assert!(x.data_documentation_result().is_some());
23973    /// assert!(x.data_quality_result().is_none());
23974    /// assert!(x.data_profile_result().is_none());
23975    /// assert!(x.data_discovery_result().is_none());
23976    /// ```
23977    pub fn set_data_documentation_result<
23978        T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationResult>>,
23979    >(
23980        mut self,
23981        v: T,
23982    ) -> Self {
23983        self.result = std::option::Option::Some(
23984            crate::model::data_scan::Result::DataDocumentationResult(v.into()),
23985        );
23986        self
23987    }
23988}
23989
23990impl wkt::message::Message for DataScan {
23991    fn typename() -> &'static str {
23992        "type.googleapis.com/google.cloud.dataplex.v1.DataScan"
23993    }
23994}
23995
23996/// Defines additional types related to [DataScan].
23997pub mod data_scan {
23998    #[allow(unused_imports)]
23999    use super::*;
24000
24001    /// DataScan execution settings.
24002    #[derive(Clone, Default, PartialEq)]
24003    #[non_exhaustive]
24004    pub struct ExecutionSpec {
24005        /// Optional. Spec related to how often and when a scan should be triggered.
24006        ///
24007        /// If not specified, the default is `OnDemand`, which means the scan will
24008        /// not run until the user calls `RunDataScan` API.
24009        pub trigger: std::option::Option<crate::model::Trigger>,
24010
24011        /// Spec related to incremental scan of the data
24012        ///
24013        /// When an option is selected for incremental scan, it cannot be unset or
24014        /// changed. If not specified, a data scan will run for all data in the
24015        /// table.
24016        pub incremental: std::option::Option<crate::model::data_scan::execution_spec::Incremental>,
24017
24018        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24019    }
24020
24021    impl ExecutionSpec {
24022        pub fn new() -> Self {
24023            std::default::Default::default()
24024        }
24025
24026        /// Sets the value of [trigger][crate::model::data_scan::ExecutionSpec::trigger].
24027        ///
24028        /// # Example
24029        /// ```ignore,no_run
24030        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionSpec;
24031        /// use google_cloud_dataplex_v1::model::Trigger;
24032        /// let x = ExecutionSpec::new().set_trigger(Trigger::default()/* use setters */);
24033        /// ```
24034        pub fn set_trigger<T>(mut self, v: T) -> Self
24035        where
24036            T: std::convert::Into<crate::model::Trigger>,
24037        {
24038            self.trigger = std::option::Option::Some(v.into());
24039            self
24040        }
24041
24042        /// Sets or clears the value of [trigger][crate::model::data_scan::ExecutionSpec::trigger].
24043        ///
24044        /// # Example
24045        /// ```ignore,no_run
24046        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionSpec;
24047        /// use google_cloud_dataplex_v1::model::Trigger;
24048        /// let x = ExecutionSpec::new().set_or_clear_trigger(Some(Trigger::default()/* use setters */));
24049        /// let x = ExecutionSpec::new().set_or_clear_trigger(None::<Trigger>);
24050        /// ```
24051        pub fn set_or_clear_trigger<T>(mut self, v: std::option::Option<T>) -> Self
24052        where
24053            T: std::convert::Into<crate::model::Trigger>,
24054        {
24055            self.trigger = v.map(|x| x.into());
24056            self
24057        }
24058
24059        /// Sets the value of [incremental][crate::model::data_scan::ExecutionSpec::incremental].
24060        ///
24061        /// Note that all the setters affecting `incremental` are mutually
24062        /// exclusive.
24063        ///
24064        /// # Example
24065        /// ```ignore,no_run
24066        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionSpec;
24067        /// use google_cloud_dataplex_v1::model::data_scan::execution_spec::Incremental;
24068        /// let x = ExecutionSpec::new().set_incremental(Some(Incremental::Field("example".to_string())));
24069        /// ```
24070        pub fn set_incremental<
24071            T: std::convert::Into<
24072                    std::option::Option<crate::model::data_scan::execution_spec::Incremental>,
24073                >,
24074        >(
24075            mut self,
24076            v: T,
24077        ) -> Self {
24078            self.incremental = v.into();
24079            self
24080        }
24081
24082        /// The value of [incremental][crate::model::data_scan::ExecutionSpec::incremental]
24083        /// if it holds a `Field`, `None` if the field is not set or
24084        /// holds a different branch.
24085        pub fn field(&self) -> std::option::Option<&std::string::String> {
24086            #[allow(unreachable_patterns)]
24087            self.incremental.as_ref().and_then(|v| match v {
24088                crate::model::data_scan::execution_spec::Incremental::Field(v) => {
24089                    std::option::Option::Some(v)
24090                }
24091                _ => std::option::Option::None,
24092            })
24093        }
24094
24095        /// Sets the value of [incremental][crate::model::data_scan::ExecutionSpec::incremental]
24096        /// to hold a `Field`.
24097        ///
24098        /// Note that all the setters affecting `incremental` are
24099        /// mutually exclusive.
24100        ///
24101        /// # Example
24102        /// ```ignore,no_run
24103        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionSpec;
24104        /// let x = ExecutionSpec::new().set_field("example");
24105        /// assert!(x.field().is_some());
24106        /// ```
24107        pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24108            self.incremental = std::option::Option::Some(
24109                crate::model::data_scan::execution_spec::Incremental::Field(v.into()),
24110            );
24111            self
24112        }
24113    }
24114
24115    impl wkt::message::Message for ExecutionSpec {
24116        fn typename() -> &'static str {
24117            "type.googleapis.com/google.cloud.dataplex.v1.DataScan.ExecutionSpec"
24118        }
24119    }
24120
24121    /// Defines additional types related to [ExecutionSpec].
24122    pub mod execution_spec {
24123        #[allow(unused_imports)]
24124        use super::*;
24125
24126        /// Spec related to incremental scan of the data
24127        ///
24128        /// When an option is selected for incremental scan, it cannot be unset or
24129        /// changed. If not specified, a data scan will run for all data in the
24130        /// table.
24131        #[derive(Clone, Debug, PartialEq)]
24132        #[non_exhaustive]
24133        pub enum Incremental {
24134            /// Immutable. The unnested field (of type *Date* or *Timestamp*) that
24135            /// contains values which monotonically increase over time.
24136            ///
24137            /// If not specified, a data scan will run for all data in the table.
24138            Field(std::string::String),
24139        }
24140    }
24141
24142    /// Status of the data scan execution.
24143    #[derive(Clone, Default, PartialEq)]
24144    #[non_exhaustive]
24145    pub struct ExecutionStatus {
24146        /// Optional. The time when the latest DataScanJob started.
24147        pub latest_job_start_time: std::option::Option<wkt::Timestamp>,
24148
24149        /// Optional. The time when the latest DataScanJob ended.
24150        pub latest_job_end_time: std::option::Option<wkt::Timestamp>,
24151
24152        /// Optional. The time when the DataScanJob execution was created.
24153        pub latest_job_create_time: std::option::Option<wkt::Timestamp>,
24154
24155        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24156    }
24157
24158    impl ExecutionStatus {
24159        pub fn new() -> Self {
24160            std::default::Default::default()
24161        }
24162
24163        /// Sets the value of [latest_job_start_time][crate::model::data_scan::ExecutionStatus::latest_job_start_time].
24164        ///
24165        /// # Example
24166        /// ```ignore,no_run
24167        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
24168        /// use wkt::Timestamp;
24169        /// let x = ExecutionStatus::new().set_latest_job_start_time(Timestamp::default()/* use setters */);
24170        /// ```
24171        pub fn set_latest_job_start_time<T>(mut self, v: T) -> Self
24172        where
24173            T: std::convert::Into<wkt::Timestamp>,
24174        {
24175            self.latest_job_start_time = std::option::Option::Some(v.into());
24176            self
24177        }
24178
24179        /// Sets or clears the value of [latest_job_start_time][crate::model::data_scan::ExecutionStatus::latest_job_start_time].
24180        ///
24181        /// # Example
24182        /// ```ignore,no_run
24183        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
24184        /// use wkt::Timestamp;
24185        /// let x = ExecutionStatus::new().set_or_clear_latest_job_start_time(Some(Timestamp::default()/* use setters */));
24186        /// let x = ExecutionStatus::new().set_or_clear_latest_job_start_time(None::<Timestamp>);
24187        /// ```
24188        pub fn set_or_clear_latest_job_start_time<T>(mut self, v: std::option::Option<T>) -> Self
24189        where
24190            T: std::convert::Into<wkt::Timestamp>,
24191        {
24192            self.latest_job_start_time = v.map(|x| x.into());
24193            self
24194        }
24195
24196        /// Sets the value of [latest_job_end_time][crate::model::data_scan::ExecutionStatus::latest_job_end_time].
24197        ///
24198        /// # Example
24199        /// ```ignore,no_run
24200        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
24201        /// use wkt::Timestamp;
24202        /// let x = ExecutionStatus::new().set_latest_job_end_time(Timestamp::default()/* use setters */);
24203        /// ```
24204        pub fn set_latest_job_end_time<T>(mut self, v: T) -> Self
24205        where
24206            T: std::convert::Into<wkt::Timestamp>,
24207        {
24208            self.latest_job_end_time = std::option::Option::Some(v.into());
24209            self
24210        }
24211
24212        /// Sets or clears the value of [latest_job_end_time][crate::model::data_scan::ExecutionStatus::latest_job_end_time].
24213        ///
24214        /// # Example
24215        /// ```ignore,no_run
24216        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
24217        /// use wkt::Timestamp;
24218        /// let x = ExecutionStatus::new().set_or_clear_latest_job_end_time(Some(Timestamp::default()/* use setters */));
24219        /// let x = ExecutionStatus::new().set_or_clear_latest_job_end_time(None::<Timestamp>);
24220        /// ```
24221        pub fn set_or_clear_latest_job_end_time<T>(mut self, v: std::option::Option<T>) -> Self
24222        where
24223            T: std::convert::Into<wkt::Timestamp>,
24224        {
24225            self.latest_job_end_time = v.map(|x| x.into());
24226            self
24227        }
24228
24229        /// Sets the value of [latest_job_create_time][crate::model::data_scan::ExecutionStatus::latest_job_create_time].
24230        ///
24231        /// # Example
24232        /// ```ignore,no_run
24233        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
24234        /// use wkt::Timestamp;
24235        /// let x = ExecutionStatus::new().set_latest_job_create_time(Timestamp::default()/* use setters */);
24236        /// ```
24237        pub fn set_latest_job_create_time<T>(mut self, v: T) -> Self
24238        where
24239            T: std::convert::Into<wkt::Timestamp>,
24240        {
24241            self.latest_job_create_time = std::option::Option::Some(v.into());
24242            self
24243        }
24244
24245        /// Sets or clears the value of [latest_job_create_time][crate::model::data_scan::ExecutionStatus::latest_job_create_time].
24246        ///
24247        /// # Example
24248        /// ```ignore,no_run
24249        /// # use google_cloud_dataplex_v1::model::data_scan::ExecutionStatus;
24250        /// use wkt::Timestamp;
24251        /// let x = ExecutionStatus::new().set_or_clear_latest_job_create_time(Some(Timestamp::default()/* use setters */));
24252        /// let x = ExecutionStatus::new().set_or_clear_latest_job_create_time(None::<Timestamp>);
24253        /// ```
24254        pub fn set_or_clear_latest_job_create_time<T>(mut self, v: std::option::Option<T>) -> Self
24255        where
24256            T: std::convert::Into<wkt::Timestamp>,
24257        {
24258            self.latest_job_create_time = v.map(|x| x.into());
24259            self
24260        }
24261    }
24262
24263    impl wkt::message::Message for ExecutionStatus {
24264        fn typename() -> &'static str {
24265            "type.googleapis.com/google.cloud.dataplex.v1.DataScan.ExecutionStatus"
24266        }
24267    }
24268
24269    /// Data scan related setting.
24270    /// The settings are required and immutable. After you configure the settings
24271    /// for one type of data scan, you can't change the data scan to a different
24272    /// type of data scan.
24273    #[derive(Clone, Debug, PartialEq)]
24274    #[non_exhaustive]
24275    pub enum Spec {
24276        /// Settings for a data quality scan.
24277        DataQualitySpec(std::boxed::Box<crate::model::DataQualitySpec>),
24278        /// Settings for a data profile scan.
24279        DataProfileSpec(std::boxed::Box<crate::model::DataProfileSpec>),
24280        /// Settings for a data discovery scan.
24281        DataDiscoverySpec(std::boxed::Box<crate::model::DataDiscoverySpec>),
24282        /// Settings for a data documentation scan.
24283        DataDocumentationSpec(std::boxed::Box<crate::model::DataDocumentationSpec>),
24284    }
24285
24286    /// The result of the data scan.
24287    #[derive(Clone, Debug, PartialEq)]
24288    #[non_exhaustive]
24289    pub enum Result {
24290        /// Output only. The result of a data quality scan.
24291        DataQualityResult(std::boxed::Box<crate::model::DataQualityResult>),
24292        /// Output only. The result of a data profile scan.
24293        DataProfileResult(std::boxed::Box<crate::model::DataProfileResult>),
24294        /// Output only. The result of a data discovery scan.
24295        DataDiscoveryResult(std::boxed::Box<crate::model::DataDiscoveryResult>),
24296        /// Output only. The result of a data documentation scan.
24297        DataDocumentationResult(std::boxed::Box<crate::model::DataDocumentationResult>),
24298    }
24299}
24300
24301/// A DataScanJob represents an instance of DataScan execution.
24302#[derive(Clone, Default, PartialEq)]
24303#[non_exhaustive]
24304pub struct DataScanJob {
24305    /// Output only. Identifier. The relative resource name of the DataScanJob, of
24306    /// the form:
24307    /// `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`,
24308    /// where `project` refers to a *project_id* or *project_number* and
24309    /// `location_id` refers to a Google Cloud region.
24310    pub name: std::string::String,
24311
24312    /// Output only. System generated globally unique ID for the DataScanJob.
24313    pub uid: std::string::String,
24314
24315    /// Output only. The time when the DataScanJob was created.
24316    pub create_time: std::option::Option<wkt::Timestamp>,
24317
24318    /// Output only. The time when the DataScanJob was started.
24319    pub start_time: std::option::Option<wkt::Timestamp>,
24320
24321    /// Output only. The time when the DataScanJob ended.
24322    pub end_time: std::option::Option<wkt::Timestamp>,
24323
24324    /// Output only. Execution state for the DataScanJob.
24325    pub state: crate::model::data_scan_job::State,
24326
24327    /// Output only. Additional information about the current state.
24328    pub message: std::string::String,
24329
24330    /// Output only. The type of the parent DataScan.
24331    pub r#type: crate::model::DataScanType,
24332
24333    /// Data scan related setting.
24334    pub spec: std::option::Option<crate::model::data_scan_job::Spec>,
24335
24336    /// The result of the data scan.
24337    pub result: std::option::Option<crate::model::data_scan_job::Result>,
24338
24339    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24340}
24341
24342impl DataScanJob {
24343    pub fn new() -> Self {
24344        std::default::Default::default()
24345    }
24346
24347    /// Sets the value of [name][crate::model::DataScanJob::name].
24348    ///
24349    /// # Example
24350    /// ```ignore,no_run
24351    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24352    /// let x = DataScanJob::new().set_name("example");
24353    /// ```
24354    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24355        self.name = v.into();
24356        self
24357    }
24358
24359    /// Sets the value of [uid][crate::model::DataScanJob::uid].
24360    ///
24361    /// # Example
24362    /// ```ignore,no_run
24363    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24364    /// let x = DataScanJob::new().set_uid("example");
24365    /// ```
24366    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24367        self.uid = v.into();
24368        self
24369    }
24370
24371    /// Sets the value of [create_time][crate::model::DataScanJob::create_time].
24372    ///
24373    /// # Example
24374    /// ```ignore,no_run
24375    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24376    /// use wkt::Timestamp;
24377    /// let x = DataScanJob::new().set_create_time(Timestamp::default()/* use setters */);
24378    /// ```
24379    pub fn set_create_time<T>(mut self, v: T) -> Self
24380    where
24381        T: std::convert::Into<wkt::Timestamp>,
24382    {
24383        self.create_time = std::option::Option::Some(v.into());
24384        self
24385    }
24386
24387    /// Sets or clears the value of [create_time][crate::model::DataScanJob::create_time].
24388    ///
24389    /// # Example
24390    /// ```ignore,no_run
24391    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24392    /// use wkt::Timestamp;
24393    /// let x = DataScanJob::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
24394    /// let x = DataScanJob::new().set_or_clear_create_time(None::<Timestamp>);
24395    /// ```
24396    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
24397    where
24398        T: std::convert::Into<wkt::Timestamp>,
24399    {
24400        self.create_time = v.map(|x| x.into());
24401        self
24402    }
24403
24404    /// Sets the value of [start_time][crate::model::DataScanJob::start_time].
24405    ///
24406    /// # Example
24407    /// ```ignore,no_run
24408    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24409    /// use wkt::Timestamp;
24410    /// let x = DataScanJob::new().set_start_time(Timestamp::default()/* use setters */);
24411    /// ```
24412    pub fn set_start_time<T>(mut self, v: T) -> Self
24413    where
24414        T: std::convert::Into<wkt::Timestamp>,
24415    {
24416        self.start_time = std::option::Option::Some(v.into());
24417        self
24418    }
24419
24420    /// Sets or clears the value of [start_time][crate::model::DataScanJob::start_time].
24421    ///
24422    /// # Example
24423    /// ```ignore,no_run
24424    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24425    /// use wkt::Timestamp;
24426    /// let x = DataScanJob::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
24427    /// let x = DataScanJob::new().set_or_clear_start_time(None::<Timestamp>);
24428    /// ```
24429    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
24430    where
24431        T: std::convert::Into<wkt::Timestamp>,
24432    {
24433        self.start_time = v.map(|x| x.into());
24434        self
24435    }
24436
24437    /// Sets the value of [end_time][crate::model::DataScanJob::end_time].
24438    ///
24439    /// # Example
24440    /// ```ignore,no_run
24441    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24442    /// use wkt::Timestamp;
24443    /// let x = DataScanJob::new().set_end_time(Timestamp::default()/* use setters */);
24444    /// ```
24445    pub fn set_end_time<T>(mut self, v: T) -> Self
24446    where
24447        T: std::convert::Into<wkt::Timestamp>,
24448    {
24449        self.end_time = std::option::Option::Some(v.into());
24450        self
24451    }
24452
24453    /// Sets or clears the value of [end_time][crate::model::DataScanJob::end_time].
24454    ///
24455    /// # Example
24456    /// ```ignore,no_run
24457    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24458    /// use wkt::Timestamp;
24459    /// let x = DataScanJob::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
24460    /// let x = DataScanJob::new().set_or_clear_end_time(None::<Timestamp>);
24461    /// ```
24462    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
24463    where
24464        T: std::convert::Into<wkt::Timestamp>,
24465    {
24466        self.end_time = v.map(|x| x.into());
24467        self
24468    }
24469
24470    /// Sets the value of [state][crate::model::DataScanJob::state].
24471    ///
24472    /// # Example
24473    /// ```ignore,no_run
24474    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24475    /// use google_cloud_dataplex_v1::model::data_scan_job::State;
24476    /// let x0 = DataScanJob::new().set_state(State::Running);
24477    /// let x1 = DataScanJob::new().set_state(State::Canceling);
24478    /// let x2 = DataScanJob::new().set_state(State::Cancelled);
24479    /// ```
24480    pub fn set_state<T: std::convert::Into<crate::model::data_scan_job::State>>(
24481        mut self,
24482        v: T,
24483    ) -> Self {
24484        self.state = v.into();
24485        self
24486    }
24487
24488    /// Sets the value of [message][crate::model::DataScanJob::message].
24489    ///
24490    /// # Example
24491    /// ```ignore,no_run
24492    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24493    /// let x = DataScanJob::new().set_message("example");
24494    /// ```
24495    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24496        self.message = v.into();
24497        self
24498    }
24499
24500    /// Sets the value of [r#type][crate::model::DataScanJob::type].
24501    ///
24502    /// # Example
24503    /// ```ignore,no_run
24504    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24505    /// use google_cloud_dataplex_v1::model::DataScanType;
24506    /// let x0 = DataScanJob::new().set_type(DataScanType::DataQuality);
24507    /// let x1 = DataScanJob::new().set_type(DataScanType::DataProfile);
24508    /// let x2 = DataScanJob::new().set_type(DataScanType::DataDiscovery);
24509    /// ```
24510    pub fn set_type<T: std::convert::Into<crate::model::DataScanType>>(mut self, v: T) -> Self {
24511        self.r#type = v.into();
24512        self
24513    }
24514
24515    /// Sets the value of [spec][crate::model::DataScanJob::spec].
24516    ///
24517    /// Note that all the setters affecting `spec` are mutually
24518    /// exclusive.
24519    ///
24520    /// # Example
24521    /// ```ignore,no_run
24522    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24523    /// use google_cloud_dataplex_v1::model::DataQualitySpec;
24524    /// let x = DataScanJob::new().set_spec(Some(
24525    ///     google_cloud_dataplex_v1::model::data_scan_job::Spec::DataQualitySpec(DataQualitySpec::default().into())));
24526    /// ```
24527    pub fn set_spec<
24528        T: std::convert::Into<std::option::Option<crate::model::data_scan_job::Spec>>,
24529    >(
24530        mut self,
24531        v: T,
24532    ) -> Self {
24533        self.spec = v.into();
24534        self
24535    }
24536
24537    /// The value of [spec][crate::model::DataScanJob::spec]
24538    /// if it holds a `DataQualitySpec`, `None` if the field is not set or
24539    /// holds a different branch.
24540    pub fn data_quality_spec(
24541        &self,
24542    ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualitySpec>> {
24543        #[allow(unreachable_patterns)]
24544        self.spec.as_ref().and_then(|v| match v {
24545            crate::model::data_scan_job::Spec::DataQualitySpec(v) => std::option::Option::Some(v),
24546            _ => std::option::Option::None,
24547        })
24548    }
24549
24550    /// Sets the value of [spec][crate::model::DataScanJob::spec]
24551    /// to hold a `DataQualitySpec`.
24552    ///
24553    /// Note that all the setters affecting `spec` are
24554    /// mutually exclusive.
24555    ///
24556    /// # Example
24557    /// ```ignore,no_run
24558    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24559    /// use google_cloud_dataplex_v1::model::DataQualitySpec;
24560    /// let x = DataScanJob::new().set_data_quality_spec(DataQualitySpec::default()/* use setters */);
24561    /// assert!(x.data_quality_spec().is_some());
24562    /// assert!(x.data_profile_spec().is_none());
24563    /// assert!(x.data_discovery_spec().is_none());
24564    /// assert!(x.data_documentation_spec().is_none());
24565    /// ```
24566    pub fn set_data_quality_spec<
24567        T: std::convert::Into<std::boxed::Box<crate::model::DataQualitySpec>>,
24568    >(
24569        mut self,
24570        v: T,
24571    ) -> Self {
24572        self.spec =
24573            std::option::Option::Some(crate::model::data_scan_job::Spec::DataQualitySpec(v.into()));
24574        self
24575    }
24576
24577    /// The value of [spec][crate::model::DataScanJob::spec]
24578    /// if it holds a `DataProfileSpec`, `None` if the field is not set or
24579    /// holds a different branch.
24580    pub fn data_profile_spec(
24581        &self,
24582    ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileSpec>> {
24583        #[allow(unreachable_patterns)]
24584        self.spec.as_ref().and_then(|v| match v {
24585            crate::model::data_scan_job::Spec::DataProfileSpec(v) => std::option::Option::Some(v),
24586            _ => std::option::Option::None,
24587        })
24588    }
24589
24590    /// Sets the value of [spec][crate::model::DataScanJob::spec]
24591    /// to hold a `DataProfileSpec`.
24592    ///
24593    /// Note that all the setters affecting `spec` are
24594    /// mutually exclusive.
24595    ///
24596    /// # Example
24597    /// ```ignore,no_run
24598    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24599    /// use google_cloud_dataplex_v1::model::DataProfileSpec;
24600    /// let x = DataScanJob::new().set_data_profile_spec(DataProfileSpec::default()/* use setters */);
24601    /// assert!(x.data_profile_spec().is_some());
24602    /// assert!(x.data_quality_spec().is_none());
24603    /// assert!(x.data_discovery_spec().is_none());
24604    /// assert!(x.data_documentation_spec().is_none());
24605    /// ```
24606    pub fn set_data_profile_spec<
24607        T: std::convert::Into<std::boxed::Box<crate::model::DataProfileSpec>>,
24608    >(
24609        mut self,
24610        v: T,
24611    ) -> Self {
24612        self.spec =
24613            std::option::Option::Some(crate::model::data_scan_job::Spec::DataProfileSpec(v.into()));
24614        self
24615    }
24616
24617    /// The value of [spec][crate::model::DataScanJob::spec]
24618    /// if it holds a `DataDiscoverySpec`, `None` if the field is not set or
24619    /// holds a different branch.
24620    pub fn data_discovery_spec(
24621        &self,
24622    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoverySpec>> {
24623        #[allow(unreachable_patterns)]
24624        self.spec.as_ref().and_then(|v| match v {
24625            crate::model::data_scan_job::Spec::DataDiscoverySpec(v) => std::option::Option::Some(v),
24626            _ => std::option::Option::None,
24627        })
24628    }
24629
24630    /// Sets the value of [spec][crate::model::DataScanJob::spec]
24631    /// to hold a `DataDiscoverySpec`.
24632    ///
24633    /// Note that all the setters affecting `spec` are
24634    /// mutually exclusive.
24635    ///
24636    /// # Example
24637    /// ```ignore,no_run
24638    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24639    /// use google_cloud_dataplex_v1::model::DataDiscoverySpec;
24640    /// let x = DataScanJob::new().set_data_discovery_spec(DataDiscoverySpec::default()/* use setters */);
24641    /// assert!(x.data_discovery_spec().is_some());
24642    /// assert!(x.data_quality_spec().is_none());
24643    /// assert!(x.data_profile_spec().is_none());
24644    /// assert!(x.data_documentation_spec().is_none());
24645    /// ```
24646    pub fn set_data_discovery_spec<
24647        T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoverySpec>>,
24648    >(
24649        mut self,
24650        v: T,
24651    ) -> Self {
24652        self.spec = std::option::Option::Some(
24653            crate::model::data_scan_job::Spec::DataDiscoverySpec(v.into()),
24654        );
24655        self
24656    }
24657
24658    /// The value of [spec][crate::model::DataScanJob::spec]
24659    /// if it holds a `DataDocumentationSpec`, `None` if the field is not set or
24660    /// holds a different branch.
24661    pub fn data_documentation_spec(
24662        &self,
24663    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationSpec>> {
24664        #[allow(unreachable_patterns)]
24665        self.spec.as_ref().and_then(|v| match v {
24666            crate::model::data_scan_job::Spec::DataDocumentationSpec(v) => {
24667                std::option::Option::Some(v)
24668            }
24669            _ => std::option::Option::None,
24670        })
24671    }
24672
24673    /// Sets the value of [spec][crate::model::DataScanJob::spec]
24674    /// to hold a `DataDocumentationSpec`.
24675    ///
24676    /// Note that all the setters affecting `spec` are
24677    /// mutually exclusive.
24678    ///
24679    /// # Example
24680    /// ```ignore,no_run
24681    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24682    /// use google_cloud_dataplex_v1::model::DataDocumentationSpec;
24683    /// let x = DataScanJob::new().set_data_documentation_spec(DataDocumentationSpec::default()/* use setters */);
24684    /// assert!(x.data_documentation_spec().is_some());
24685    /// assert!(x.data_quality_spec().is_none());
24686    /// assert!(x.data_profile_spec().is_none());
24687    /// assert!(x.data_discovery_spec().is_none());
24688    /// ```
24689    pub fn set_data_documentation_spec<
24690        T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationSpec>>,
24691    >(
24692        mut self,
24693        v: T,
24694    ) -> Self {
24695        self.spec = std::option::Option::Some(
24696            crate::model::data_scan_job::Spec::DataDocumentationSpec(v.into()),
24697        );
24698        self
24699    }
24700
24701    /// Sets the value of [result][crate::model::DataScanJob::result].
24702    ///
24703    /// Note that all the setters affecting `result` are mutually
24704    /// exclusive.
24705    ///
24706    /// # Example
24707    /// ```ignore,no_run
24708    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24709    /// use google_cloud_dataplex_v1::model::DataQualityResult;
24710    /// let x = DataScanJob::new().set_result(Some(
24711    ///     google_cloud_dataplex_v1::model::data_scan_job::Result::DataQualityResult(DataQualityResult::default().into())));
24712    /// ```
24713    pub fn set_result<
24714        T: std::convert::Into<std::option::Option<crate::model::data_scan_job::Result>>,
24715    >(
24716        mut self,
24717        v: T,
24718    ) -> Self {
24719        self.result = v.into();
24720        self
24721    }
24722
24723    /// The value of [result][crate::model::DataScanJob::result]
24724    /// if it holds a `DataQualityResult`, `None` if the field is not set or
24725    /// holds a different branch.
24726    pub fn data_quality_result(
24727        &self,
24728    ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualityResult>> {
24729        #[allow(unreachable_patterns)]
24730        self.result.as_ref().and_then(|v| match v {
24731            crate::model::data_scan_job::Result::DataQualityResult(v) => {
24732                std::option::Option::Some(v)
24733            }
24734            _ => std::option::Option::None,
24735        })
24736    }
24737
24738    /// Sets the value of [result][crate::model::DataScanJob::result]
24739    /// to hold a `DataQualityResult`.
24740    ///
24741    /// Note that all the setters affecting `result` are
24742    /// mutually exclusive.
24743    ///
24744    /// # Example
24745    /// ```ignore,no_run
24746    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24747    /// use google_cloud_dataplex_v1::model::DataQualityResult;
24748    /// let x = DataScanJob::new().set_data_quality_result(DataQualityResult::default()/* use setters */);
24749    /// assert!(x.data_quality_result().is_some());
24750    /// assert!(x.data_profile_result().is_none());
24751    /// assert!(x.data_discovery_result().is_none());
24752    /// assert!(x.data_documentation_result().is_none());
24753    /// ```
24754    pub fn set_data_quality_result<
24755        T: std::convert::Into<std::boxed::Box<crate::model::DataQualityResult>>,
24756    >(
24757        mut self,
24758        v: T,
24759    ) -> Self {
24760        self.result = std::option::Option::Some(
24761            crate::model::data_scan_job::Result::DataQualityResult(v.into()),
24762        );
24763        self
24764    }
24765
24766    /// The value of [result][crate::model::DataScanJob::result]
24767    /// if it holds a `DataProfileResult`, `None` if the field is not set or
24768    /// holds a different branch.
24769    pub fn data_profile_result(
24770        &self,
24771    ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileResult>> {
24772        #[allow(unreachable_patterns)]
24773        self.result.as_ref().and_then(|v| match v {
24774            crate::model::data_scan_job::Result::DataProfileResult(v) => {
24775                std::option::Option::Some(v)
24776            }
24777            _ => std::option::Option::None,
24778        })
24779    }
24780
24781    /// Sets the value of [result][crate::model::DataScanJob::result]
24782    /// to hold a `DataProfileResult`.
24783    ///
24784    /// Note that all the setters affecting `result` are
24785    /// mutually exclusive.
24786    ///
24787    /// # Example
24788    /// ```ignore,no_run
24789    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24790    /// use google_cloud_dataplex_v1::model::DataProfileResult;
24791    /// let x = DataScanJob::new().set_data_profile_result(DataProfileResult::default()/* use setters */);
24792    /// assert!(x.data_profile_result().is_some());
24793    /// assert!(x.data_quality_result().is_none());
24794    /// assert!(x.data_discovery_result().is_none());
24795    /// assert!(x.data_documentation_result().is_none());
24796    /// ```
24797    pub fn set_data_profile_result<
24798        T: std::convert::Into<std::boxed::Box<crate::model::DataProfileResult>>,
24799    >(
24800        mut self,
24801        v: T,
24802    ) -> Self {
24803        self.result = std::option::Option::Some(
24804            crate::model::data_scan_job::Result::DataProfileResult(v.into()),
24805        );
24806        self
24807    }
24808
24809    /// The value of [result][crate::model::DataScanJob::result]
24810    /// if it holds a `DataDiscoveryResult`, `None` if the field is not set or
24811    /// holds a different branch.
24812    pub fn data_discovery_result(
24813        &self,
24814    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoveryResult>> {
24815        #[allow(unreachable_patterns)]
24816        self.result.as_ref().and_then(|v| match v {
24817            crate::model::data_scan_job::Result::DataDiscoveryResult(v) => {
24818                std::option::Option::Some(v)
24819            }
24820            _ => std::option::Option::None,
24821        })
24822    }
24823
24824    /// Sets the value of [result][crate::model::DataScanJob::result]
24825    /// to hold a `DataDiscoveryResult`.
24826    ///
24827    /// Note that all the setters affecting `result` are
24828    /// mutually exclusive.
24829    ///
24830    /// # Example
24831    /// ```ignore,no_run
24832    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24833    /// use google_cloud_dataplex_v1::model::DataDiscoveryResult;
24834    /// let x = DataScanJob::new().set_data_discovery_result(DataDiscoveryResult::default()/* use setters */);
24835    /// assert!(x.data_discovery_result().is_some());
24836    /// assert!(x.data_quality_result().is_none());
24837    /// assert!(x.data_profile_result().is_none());
24838    /// assert!(x.data_documentation_result().is_none());
24839    /// ```
24840    pub fn set_data_discovery_result<
24841        T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoveryResult>>,
24842    >(
24843        mut self,
24844        v: T,
24845    ) -> Self {
24846        self.result = std::option::Option::Some(
24847            crate::model::data_scan_job::Result::DataDiscoveryResult(v.into()),
24848        );
24849        self
24850    }
24851
24852    /// The value of [result][crate::model::DataScanJob::result]
24853    /// if it holds a `DataDocumentationResult`, `None` if the field is not set or
24854    /// holds a different branch.
24855    pub fn data_documentation_result(
24856        &self,
24857    ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationResult>> {
24858        #[allow(unreachable_patterns)]
24859        self.result.as_ref().and_then(|v| match v {
24860            crate::model::data_scan_job::Result::DataDocumentationResult(v) => {
24861                std::option::Option::Some(v)
24862            }
24863            _ => std::option::Option::None,
24864        })
24865    }
24866
24867    /// Sets the value of [result][crate::model::DataScanJob::result]
24868    /// to hold a `DataDocumentationResult`.
24869    ///
24870    /// Note that all the setters affecting `result` are
24871    /// mutually exclusive.
24872    ///
24873    /// # Example
24874    /// ```ignore,no_run
24875    /// # use google_cloud_dataplex_v1::model::DataScanJob;
24876    /// use google_cloud_dataplex_v1::model::DataDocumentationResult;
24877    /// let x = DataScanJob::new().set_data_documentation_result(DataDocumentationResult::default()/* use setters */);
24878    /// assert!(x.data_documentation_result().is_some());
24879    /// assert!(x.data_quality_result().is_none());
24880    /// assert!(x.data_profile_result().is_none());
24881    /// assert!(x.data_discovery_result().is_none());
24882    /// ```
24883    pub fn set_data_documentation_result<
24884        T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationResult>>,
24885    >(
24886        mut self,
24887        v: T,
24888    ) -> Self {
24889        self.result = std::option::Option::Some(
24890            crate::model::data_scan_job::Result::DataDocumentationResult(v.into()),
24891        );
24892        self
24893    }
24894}
24895
24896impl wkt::message::Message for DataScanJob {
24897    fn typename() -> &'static str {
24898        "type.googleapis.com/google.cloud.dataplex.v1.DataScanJob"
24899    }
24900}
24901
24902/// Defines additional types related to [DataScanJob].
24903pub mod data_scan_job {
24904    #[allow(unused_imports)]
24905    use super::*;
24906
24907    /// Execution state for the DataScanJob.
24908    ///
24909    /// # Working with unknown values
24910    ///
24911    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
24912    /// additional enum variants at any time. Adding new variants is not considered
24913    /// a breaking change. Applications should write their code in anticipation of:
24914    ///
24915    /// - New values appearing in future releases of the client library, **and**
24916    /// - New values received dynamically, without application changes.
24917    ///
24918    /// Please consult the [Working with enums] section in the user guide for some
24919    /// guidelines.
24920    ///
24921    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
24922    #[derive(Clone, Debug, PartialEq)]
24923    #[non_exhaustive]
24924    pub enum State {
24925        /// The DataScanJob state is unspecified.
24926        Unspecified,
24927        /// The DataScanJob is running.
24928        Running,
24929        /// The DataScanJob is canceling.
24930        Canceling,
24931        /// The DataScanJob cancellation was successful.
24932        Cancelled,
24933        /// The DataScanJob completed successfully.
24934        Succeeded,
24935        /// The DataScanJob is no longer running due to an error.
24936        Failed,
24937        /// The DataScanJob has been created but not started to run yet.
24938        Pending,
24939        /// If set, the enum was initialized with an unknown value.
24940        ///
24941        /// Applications can examine the value using [State::value] or
24942        /// [State::name].
24943        UnknownValue(state::UnknownValue),
24944    }
24945
24946    #[doc(hidden)]
24947    pub mod state {
24948        #[allow(unused_imports)]
24949        use super::*;
24950        #[derive(Clone, Debug, PartialEq)]
24951        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24952    }
24953
24954    impl State {
24955        /// Gets the enum value.
24956        ///
24957        /// Returns `None` if the enum contains an unknown value deserialized from
24958        /// the string representation of enums.
24959        pub fn value(&self) -> std::option::Option<i32> {
24960            match self {
24961                Self::Unspecified => std::option::Option::Some(0),
24962                Self::Running => std::option::Option::Some(1),
24963                Self::Canceling => std::option::Option::Some(2),
24964                Self::Cancelled => std::option::Option::Some(3),
24965                Self::Succeeded => std::option::Option::Some(4),
24966                Self::Failed => std::option::Option::Some(5),
24967                Self::Pending => std::option::Option::Some(7),
24968                Self::UnknownValue(u) => u.0.value(),
24969            }
24970        }
24971
24972        /// Gets the enum value as a string.
24973        ///
24974        /// Returns `None` if the enum contains an unknown value deserialized from
24975        /// the integer representation of enums.
24976        pub fn name(&self) -> std::option::Option<&str> {
24977            match self {
24978                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
24979                Self::Running => std::option::Option::Some("RUNNING"),
24980                Self::Canceling => std::option::Option::Some("CANCELING"),
24981                Self::Cancelled => std::option::Option::Some("CANCELLED"),
24982                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
24983                Self::Failed => std::option::Option::Some("FAILED"),
24984                Self::Pending => std::option::Option::Some("PENDING"),
24985                Self::UnknownValue(u) => u.0.name(),
24986            }
24987        }
24988    }
24989
24990    impl std::default::Default for State {
24991        fn default() -> Self {
24992            use std::convert::From;
24993            Self::from(0)
24994        }
24995    }
24996
24997    impl std::fmt::Display for State {
24998        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24999            wkt::internal::display_enum(f, self.name(), self.value())
25000        }
25001    }
25002
25003    impl std::convert::From<i32> for State {
25004        fn from(value: i32) -> Self {
25005            match value {
25006                0 => Self::Unspecified,
25007                1 => Self::Running,
25008                2 => Self::Canceling,
25009                3 => Self::Cancelled,
25010                4 => Self::Succeeded,
25011                5 => Self::Failed,
25012                7 => Self::Pending,
25013                _ => Self::UnknownValue(state::UnknownValue(
25014                    wkt::internal::UnknownEnumValue::Integer(value),
25015                )),
25016            }
25017        }
25018    }
25019
25020    impl std::convert::From<&str> for State {
25021        fn from(value: &str) -> Self {
25022            use std::string::ToString;
25023            match value {
25024                "STATE_UNSPECIFIED" => Self::Unspecified,
25025                "RUNNING" => Self::Running,
25026                "CANCELING" => Self::Canceling,
25027                "CANCELLED" => Self::Cancelled,
25028                "SUCCEEDED" => Self::Succeeded,
25029                "FAILED" => Self::Failed,
25030                "PENDING" => Self::Pending,
25031                _ => Self::UnknownValue(state::UnknownValue(
25032                    wkt::internal::UnknownEnumValue::String(value.to_string()),
25033                )),
25034            }
25035        }
25036    }
25037
25038    impl serde::ser::Serialize for State {
25039        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25040        where
25041            S: serde::Serializer,
25042        {
25043            match self {
25044                Self::Unspecified => serializer.serialize_i32(0),
25045                Self::Running => serializer.serialize_i32(1),
25046                Self::Canceling => serializer.serialize_i32(2),
25047                Self::Cancelled => serializer.serialize_i32(3),
25048                Self::Succeeded => serializer.serialize_i32(4),
25049                Self::Failed => serializer.serialize_i32(5),
25050                Self::Pending => serializer.serialize_i32(7),
25051                Self::UnknownValue(u) => u.0.serialize(serializer),
25052            }
25053        }
25054    }
25055
25056    impl<'de> serde::de::Deserialize<'de> for State {
25057        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25058        where
25059            D: serde::Deserializer<'de>,
25060        {
25061            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
25062                ".google.cloud.dataplex.v1.DataScanJob.State",
25063            ))
25064        }
25065    }
25066
25067    /// Data scan related setting.
25068    #[derive(Clone, Debug, PartialEq)]
25069    #[non_exhaustive]
25070    pub enum Spec {
25071        /// Output only. Settings for a data quality scan.
25072        DataQualitySpec(std::boxed::Box<crate::model::DataQualitySpec>),
25073        /// Output only. Settings for a data profile scan.
25074        DataProfileSpec(std::boxed::Box<crate::model::DataProfileSpec>),
25075        /// Output only. Settings for a data discovery scan.
25076        DataDiscoverySpec(std::boxed::Box<crate::model::DataDiscoverySpec>),
25077        /// Output only. Settings for a data documentation scan.
25078        DataDocumentationSpec(std::boxed::Box<crate::model::DataDocumentationSpec>),
25079    }
25080
25081    /// The result of the data scan.
25082    #[derive(Clone, Debug, PartialEq)]
25083    #[non_exhaustive]
25084    pub enum Result {
25085        /// Output only. The result of a data quality scan.
25086        DataQualityResult(std::boxed::Box<crate::model::DataQualityResult>),
25087        /// Output only. The result of a data profile scan.
25088        DataProfileResult(std::boxed::Box<crate::model::DataProfileResult>),
25089        /// Output only. The result of a data discovery scan.
25090        DataDiscoveryResult(std::boxed::Box<crate::model::DataDiscoveryResult>),
25091        /// Output only. The result of a data documentation scan.
25092        DataDocumentationResult(std::boxed::Box<crate::model::DataDocumentationResult>),
25093    }
25094}
25095
25096/// The status of publishing the data scan result as Dataplex Universal Catalog
25097/// metadata.
25098#[derive(Clone, Default, PartialEq)]
25099#[non_exhaustive]
25100pub struct DataScanCatalogPublishingStatus {
25101    /// Output only. Execution state for catalog publishing.
25102    pub state: crate::model::data_scan_catalog_publishing_status::State,
25103
25104    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25105}
25106
25107impl DataScanCatalogPublishingStatus {
25108    pub fn new() -> Self {
25109        std::default::Default::default()
25110    }
25111
25112    /// Sets the value of [state][crate::model::DataScanCatalogPublishingStatus::state].
25113    ///
25114    /// # Example
25115    /// ```ignore,no_run
25116    /// # use google_cloud_dataplex_v1::model::DataScanCatalogPublishingStatus;
25117    /// use google_cloud_dataplex_v1::model::data_scan_catalog_publishing_status::State;
25118    /// let x0 = DataScanCatalogPublishingStatus::new().set_state(State::Succeeded);
25119    /// let x1 = DataScanCatalogPublishingStatus::new().set_state(State::Failed);
25120    /// ```
25121    pub fn set_state<
25122        T: std::convert::Into<crate::model::data_scan_catalog_publishing_status::State>,
25123    >(
25124        mut self,
25125        v: T,
25126    ) -> Self {
25127        self.state = v.into();
25128        self
25129    }
25130}
25131
25132impl wkt::message::Message for DataScanCatalogPublishingStatus {
25133    fn typename() -> &'static str {
25134        "type.googleapis.com/google.cloud.dataplex.v1.DataScanCatalogPublishingStatus"
25135    }
25136}
25137
25138/// Defines additional types related to [DataScanCatalogPublishingStatus].
25139pub mod data_scan_catalog_publishing_status {
25140    #[allow(unused_imports)]
25141    use super::*;
25142
25143    /// Execution state for the publishing.
25144    ///
25145    /// # Working with unknown values
25146    ///
25147    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25148    /// additional enum variants at any time. Adding new variants is not considered
25149    /// a breaking change. Applications should write their code in anticipation of:
25150    ///
25151    /// - New values appearing in future releases of the client library, **and**
25152    /// - New values received dynamically, without application changes.
25153    ///
25154    /// Please consult the [Working with enums] section in the user guide for some
25155    /// guidelines.
25156    ///
25157    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25158    #[derive(Clone, Debug, PartialEq)]
25159    #[non_exhaustive]
25160    pub enum State {
25161        /// The publishing state is unspecified.
25162        Unspecified,
25163        /// Publish to catalog completed successfully.
25164        Succeeded,
25165        /// Publish to catalog failed.
25166        Failed,
25167        /// If set, the enum was initialized with an unknown value.
25168        ///
25169        /// Applications can examine the value using [State::value] or
25170        /// [State::name].
25171        UnknownValue(state::UnknownValue),
25172    }
25173
25174    #[doc(hidden)]
25175    pub mod state {
25176        #[allow(unused_imports)]
25177        use super::*;
25178        #[derive(Clone, Debug, PartialEq)]
25179        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25180    }
25181
25182    impl State {
25183        /// Gets the enum value.
25184        ///
25185        /// Returns `None` if the enum contains an unknown value deserialized from
25186        /// the string representation of enums.
25187        pub fn value(&self) -> std::option::Option<i32> {
25188            match self {
25189                Self::Unspecified => std::option::Option::Some(0),
25190                Self::Succeeded => std::option::Option::Some(1),
25191                Self::Failed => std::option::Option::Some(2),
25192                Self::UnknownValue(u) => u.0.value(),
25193            }
25194        }
25195
25196        /// Gets the enum value as a string.
25197        ///
25198        /// Returns `None` if the enum contains an unknown value deserialized from
25199        /// the integer representation of enums.
25200        pub fn name(&self) -> std::option::Option<&str> {
25201            match self {
25202                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
25203                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
25204                Self::Failed => std::option::Option::Some("FAILED"),
25205                Self::UnknownValue(u) => u.0.name(),
25206            }
25207        }
25208    }
25209
25210    impl std::default::Default for State {
25211        fn default() -> Self {
25212            use std::convert::From;
25213            Self::from(0)
25214        }
25215    }
25216
25217    impl std::fmt::Display for State {
25218        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25219            wkt::internal::display_enum(f, self.name(), self.value())
25220        }
25221    }
25222
25223    impl std::convert::From<i32> for State {
25224        fn from(value: i32) -> Self {
25225            match value {
25226                0 => Self::Unspecified,
25227                1 => Self::Succeeded,
25228                2 => Self::Failed,
25229                _ => Self::UnknownValue(state::UnknownValue(
25230                    wkt::internal::UnknownEnumValue::Integer(value),
25231                )),
25232            }
25233        }
25234    }
25235
25236    impl std::convert::From<&str> for State {
25237        fn from(value: &str) -> Self {
25238            use std::string::ToString;
25239            match value {
25240                "STATE_UNSPECIFIED" => Self::Unspecified,
25241                "SUCCEEDED" => Self::Succeeded,
25242                "FAILED" => Self::Failed,
25243                _ => Self::UnknownValue(state::UnknownValue(
25244                    wkt::internal::UnknownEnumValue::String(value.to_string()),
25245                )),
25246            }
25247        }
25248    }
25249
25250    impl serde::ser::Serialize for State {
25251        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25252        where
25253            S: serde::Serializer,
25254        {
25255            match self {
25256                Self::Unspecified => serializer.serialize_i32(0),
25257                Self::Succeeded => serializer.serialize_i32(1),
25258                Self::Failed => serializer.serialize_i32(2),
25259                Self::UnknownValue(u) => u.0.serialize(serializer),
25260            }
25261        }
25262    }
25263
25264    impl<'de> serde::de::Deserialize<'de> for State {
25265        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25266        where
25267            D: serde::Deserializer<'de>,
25268        {
25269            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
25270                ".google.cloud.dataplex.v1.DataScanCatalogPublishingStatus.State",
25271            ))
25272        }
25273    }
25274}
25275
25276/// The payload associated with Discovery data processing.
25277#[derive(Clone, Default, PartialEq)]
25278#[non_exhaustive]
25279pub struct DiscoveryEvent {
25280    /// The log message.
25281    pub message: std::string::String,
25282
25283    /// The id of the associated lake.
25284    pub lake_id: std::string::String,
25285
25286    /// The id of the associated zone.
25287    pub zone_id: std::string::String,
25288
25289    /// The id of the associated asset.
25290    pub asset_id: std::string::String,
25291
25292    /// The data location associated with the event.
25293    pub data_location: std::string::String,
25294
25295    /// The id of the associated datascan for standalone discovery.
25296    pub datascan_id: std::string::String,
25297
25298    /// The type of the event being logged.
25299    pub r#type: crate::model::discovery_event::EventType,
25300
25301    /// Additional details about the event.
25302    pub details: std::option::Option<crate::model::discovery_event::Details>,
25303
25304    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25305}
25306
25307impl DiscoveryEvent {
25308    pub fn new() -> Self {
25309        std::default::Default::default()
25310    }
25311
25312    /// Sets the value of [message][crate::model::DiscoveryEvent::message].
25313    ///
25314    /// # Example
25315    /// ```ignore,no_run
25316    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25317    /// let x = DiscoveryEvent::new().set_message("example");
25318    /// ```
25319    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25320        self.message = v.into();
25321        self
25322    }
25323
25324    /// Sets the value of [lake_id][crate::model::DiscoveryEvent::lake_id].
25325    ///
25326    /// # Example
25327    /// ```ignore,no_run
25328    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25329    /// let x = DiscoveryEvent::new().set_lake_id("example");
25330    /// ```
25331    pub fn set_lake_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25332        self.lake_id = v.into();
25333        self
25334    }
25335
25336    /// Sets the value of [zone_id][crate::model::DiscoveryEvent::zone_id].
25337    ///
25338    /// # Example
25339    /// ```ignore,no_run
25340    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25341    /// let x = DiscoveryEvent::new().set_zone_id("example");
25342    /// ```
25343    pub fn set_zone_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25344        self.zone_id = v.into();
25345        self
25346    }
25347
25348    /// Sets the value of [asset_id][crate::model::DiscoveryEvent::asset_id].
25349    ///
25350    /// # Example
25351    /// ```ignore,no_run
25352    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25353    /// let x = DiscoveryEvent::new().set_asset_id("example");
25354    /// ```
25355    pub fn set_asset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25356        self.asset_id = v.into();
25357        self
25358    }
25359
25360    /// Sets the value of [data_location][crate::model::DiscoveryEvent::data_location].
25361    ///
25362    /// # Example
25363    /// ```ignore,no_run
25364    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25365    /// let x = DiscoveryEvent::new().set_data_location("example");
25366    /// ```
25367    pub fn set_data_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25368        self.data_location = v.into();
25369        self
25370    }
25371
25372    /// Sets the value of [datascan_id][crate::model::DiscoveryEvent::datascan_id].
25373    ///
25374    /// # Example
25375    /// ```ignore,no_run
25376    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25377    /// let x = DiscoveryEvent::new().set_datascan_id("example");
25378    /// ```
25379    pub fn set_datascan_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25380        self.datascan_id = v.into();
25381        self
25382    }
25383
25384    /// Sets the value of [r#type][crate::model::DiscoveryEvent::type].
25385    ///
25386    /// # Example
25387    /// ```ignore,no_run
25388    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25389    /// use google_cloud_dataplex_v1::model::discovery_event::EventType;
25390    /// let x0 = DiscoveryEvent::new().set_type(EventType::Config);
25391    /// let x1 = DiscoveryEvent::new().set_type(EventType::EntityCreated);
25392    /// let x2 = DiscoveryEvent::new().set_type(EventType::EntityUpdated);
25393    /// ```
25394    pub fn set_type<T: std::convert::Into<crate::model::discovery_event::EventType>>(
25395        mut self,
25396        v: T,
25397    ) -> Self {
25398        self.r#type = v.into();
25399        self
25400    }
25401
25402    /// Sets the value of [details][crate::model::DiscoveryEvent::details].
25403    ///
25404    /// Note that all the setters affecting `details` are mutually
25405    /// exclusive.
25406    ///
25407    /// # Example
25408    /// ```ignore,no_run
25409    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25410    /// use google_cloud_dataplex_v1::model::discovery_event::ConfigDetails;
25411    /// let x = DiscoveryEvent::new().set_details(Some(
25412    ///     google_cloud_dataplex_v1::model::discovery_event::Details::Config(ConfigDetails::default().into())));
25413    /// ```
25414    pub fn set_details<
25415        T: std::convert::Into<std::option::Option<crate::model::discovery_event::Details>>,
25416    >(
25417        mut self,
25418        v: T,
25419    ) -> Self {
25420        self.details = v.into();
25421        self
25422    }
25423
25424    /// The value of [details][crate::model::DiscoveryEvent::details]
25425    /// if it holds a `Config`, `None` if the field is not set or
25426    /// holds a different branch.
25427    pub fn config(
25428        &self,
25429    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::ConfigDetails>> {
25430        #[allow(unreachable_patterns)]
25431        self.details.as_ref().and_then(|v| match v {
25432            crate::model::discovery_event::Details::Config(v) => std::option::Option::Some(v),
25433            _ => std::option::Option::None,
25434        })
25435    }
25436
25437    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
25438    /// to hold a `Config`.
25439    ///
25440    /// Note that all the setters affecting `details` are
25441    /// mutually exclusive.
25442    ///
25443    /// # Example
25444    /// ```ignore,no_run
25445    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25446    /// use google_cloud_dataplex_v1::model::discovery_event::ConfigDetails;
25447    /// let x = DiscoveryEvent::new().set_config(ConfigDetails::default()/* use setters */);
25448    /// assert!(x.config().is_some());
25449    /// assert!(x.entity().is_none());
25450    /// assert!(x.partition().is_none());
25451    /// assert!(x.action().is_none());
25452    /// assert!(x.table().is_none());
25453    /// ```
25454    pub fn set_config<
25455        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::ConfigDetails>>,
25456    >(
25457        mut self,
25458        v: T,
25459    ) -> Self {
25460        self.details =
25461            std::option::Option::Some(crate::model::discovery_event::Details::Config(v.into()));
25462        self
25463    }
25464
25465    /// The value of [details][crate::model::DiscoveryEvent::details]
25466    /// if it holds a `Entity`, `None` if the field is not set or
25467    /// holds a different branch.
25468    pub fn entity(
25469        &self,
25470    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::EntityDetails>> {
25471        #[allow(unreachable_patterns)]
25472        self.details.as_ref().and_then(|v| match v {
25473            crate::model::discovery_event::Details::Entity(v) => std::option::Option::Some(v),
25474            _ => std::option::Option::None,
25475        })
25476    }
25477
25478    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
25479    /// to hold a `Entity`.
25480    ///
25481    /// Note that all the setters affecting `details` are
25482    /// mutually exclusive.
25483    ///
25484    /// # Example
25485    /// ```ignore,no_run
25486    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25487    /// use google_cloud_dataplex_v1::model::discovery_event::EntityDetails;
25488    /// let x = DiscoveryEvent::new().set_entity(EntityDetails::default()/* use setters */);
25489    /// assert!(x.entity().is_some());
25490    /// assert!(x.config().is_none());
25491    /// assert!(x.partition().is_none());
25492    /// assert!(x.action().is_none());
25493    /// assert!(x.table().is_none());
25494    /// ```
25495    pub fn set_entity<
25496        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::EntityDetails>>,
25497    >(
25498        mut self,
25499        v: T,
25500    ) -> Self {
25501        self.details =
25502            std::option::Option::Some(crate::model::discovery_event::Details::Entity(v.into()));
25503        self
25504    }
25505
25506    /// The value of [details][crate::model::DiscoveryEvent::details]
25507    /// if it holds a `Partition`, `None` if the field is not set or
25508    /// holds a different branch.
25509    pub fn partition(
25510        &self,
25511    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::PartitionDetails>>
25512    {
25513        #[allow(unreachable_patterns)]
25514        self.details.as_ref().and_then(|v| match v {
25515            crate::model::discovery_event::Details::Partition(v) => std::option::Option::Some(v),
25516            _ => std::option::Option::None,
25517        })
25518    }
25519
25520    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
25521    /// to hold a `Partition`.
25522    ///
25523    /// Note that all the setters affecting `details` are
25524    /// mutually exclusive.
25525    ///
25526    /// # Example
25527    /// ```ignore,no_run
25528    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25529    /// use google_cloud_dataplex_v1::model::discovery_event::PartitionDetails;
25530    /// let x = DiscoveryEvent::new().set_partition(PartitionDetails::default()/* use setters */);
25531    /// assert!(x.partition().is_some());
25532    /// assert!(x.config().is_none());
25533    /// assert!(x.entity().is_none());
25534    /// assert!(x.action().is_none());
25535    /// assert!(x.table().is_none());
25536    /// ```
25537    pub fn set_partition<
25538        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::PartitionDetails>>,
25539    >(
25540        mut self,
25541        v: T,
25542    ) -> Self {
25543        self.details =
25544            std::option::Option::Some(crate::model::discovery_event::Details::Partition(v.into()));
25545        self
25546    }
25547
25548    /// The value of [details][crate::model::DiscoveryEvent::details]
25549    /// if it holds a `Action`, `None` if the field is not set or
25550    /// holds a different branch.
25551    pub fn action(
25552        &self,
25553    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::ActionDetails>> {
25554        #[allow(unreachable_patterns)]
25555        self.details.as_ref().and_then(|v| match v {
25556            crate::model::discovery_event::Details::Action(v) => std::option::Option::Some(v),
25557            _ => std::option::Option::None,
25558        })
25559    }
25560
25561    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
25562    /// to hold a `Action`.
25563    ///
25564    /// Note that all the setters affecting `details` are
25565    /// mutually exclusive.
25566    ///
25567    /// # Example
25568    /// ```ignore,no_run
25569    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25570    /// use google_cloud_dataplex_v1::model::discovery_event::ActionDetails;
25571    /// let x = DiscoveryEvent::new().set_action(ActionDetails::default()/* use setters */);
25572    /// assert!(x.action().is_some());
25573    /// assert!(x.config().is_none());
25574    /// assert!(x.entity().is_none());
25575    /// assert!(x.partition().is_none());
25576    /// assert!(x.table().is_none());
25577    /// ```
25578    pub fn set_action<
25579        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::ActionDetails>>,
25580    >(
25581        mut self,
25582        v: T,
25583    ) -> Self {
25584        self.details =
25585            std::option::Option::Some(crate::model::discovery_event::Details::Action(v.into()));
25586        self
25587    }
25588
25589    /// The value of [details][crate::model::DiscoveryEvent::details]
25590    /// if it holds a `Table`, `None` if the field is not set or
25591    /// holds a different branch.
25592    pub fn table(
25593        &self,
25594    ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::TableDetails>> {
25595        #[allow(unreachable_patterns)]
25596        self.details.as_ref().and_then(|v| match v {
25597            crate::model::discovery_event::Details::Table(v) => std::option::Option::Some(v),
25598            _ => std::option::Option::None,
25599        })
25600    }
25601
25602    /// Sets the value of [details][crate::model::DiscoveryEvent::details]
25603    /// to hold a `Table`.
25604    ///
25605    /// Note that all the setters affecting `details` are
25606    /// mutually exclusive.
25607    ///
25608    /// # Example
25609    /// ```ignore,no_run
25610    /// # use google_cloud_dataplex_v1::model::DiscoveryEvent;
25611    /// use google_cloud_dataplex_v1::model::discovery_event::TableDetails;
25612    /// let x = DiscoveryEvent::new().set_table(TableDetails::default()/* use setters */);
25613    /// assert!(x.table().is_some());
25614    /// assert!(x.config().is_none());
25615    /// assert!(x.entity().is_none());
25616    /// assert!(x.partition().is_none());
25617    /// assert!(x.action().is_none());
25618    /// ```
25619    pub fn set_table<
25620        T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::TableDetails>>,
25621    >(
25622        mut self,
25623        v: T,
25624    ) -> Self {
25625        self.details =
25626            std::option::Option::Some(crate::model::discovery_event::Details::Table(v.into()));
25627        self
25628    }
25629}
25630
25631impl wkt::message::Message for DiscoveryEvent {
25632    fn typename() -> &'static str {
25633        "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent"
25634    }
25635}
25636
25637/// Defines additional types related to [DiscoveryEvent].
25638pub mod discovery_event {
25639    #[allow(unused_imports)]
25640    use super::*;
25641
25642    /// Details about configuration events.
25643    #[derive(Clone, Default, PartialEq)]
25644    #[non_exhaustive]
25645    pub struct ConfigDetails {
25646        /// A list of discovery configuration parameters in effect.
25647        /// The keys are the field paths within DiscoverySpec.
25648        /// Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference,
25649        /// etc.
25650        pub parameters: std::collections::HashMap<std::string::String, std::string::String>,
25651
25652        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25653    }
25654
25655    impl ConfigDetails {
25656        pub fn new() -> Self {
25657            std::default::Default::default()
25658        }
25659
25660        /// Sets the value of [parameters][crate::model::discovery_event::ConfigDetails::parameters].
25661        ///
25662        /// # Example
25663        /// ```ignore,no_run
25664        /// # use google_cloud_dataplex_v1::model::discovery_event::ConfigDetails;
25665        /// let x = ConfigDetails::new().set_parameters([
25666        ///     ("key0", "abc"),
25667        ///     ("key1", "xyz"),
25668        /// ]);
25669        /// ```
25670        pub fn set_parameters<T, K, V>(mut self, v: T) -> Self
25671        where
25672            T: std::iter::IntoIterator<Item = (K, V)>,
25673            K: std::convert::Into<std::string::String>,
25674            V: std::convert::Into<std::string::String>,
25675        {
25676            use std::iter::Iterator;
25677            self.parameters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
25678            self
25679        }
25680    }
25681
25682    impl wkt::message::Message for ConfigDetails {
25683        fn typename() -> &'static str {
25684            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails"
25685        }
25686    }
25687
25688    /// Details about the entity.
25689    #[derive(Clone, Default, PartialEq)]
25690    #[non_exhaustive]
25691    pub struct EntityDetails {
25692        /// The name of the entity resource.
25693        /// The name is the fully-qualified resource name.
25694        pub entity: std::string::String,
25695
25696        /// The type of the entity resource.
25697        pub r#type: crate::model::discovery_event::EntityType,
25698
25699        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25700    }
25701
25702    impl EntityDetails {
25703        pub fn new() -> Self {
25704            std::default::Default::default()
25705        }
25706
25707        /// Sets the value of [entity][crate::model::discovery_event::EntityDetails::entity].
25708        ///
25709        /// # Example
25710        /// ```ignore,no_run
25711        /// # use google_cloud_dataplex_v1::model::discovery_event::EntityDetails;
25712        /// let x = EntityDetails::new().set_entity("example");
25713        /// ```
25714        pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25715            self.entity = v.into();
25716            self
25717        }
25718
25719        /// Sets the value of [r#type][crate::model::discovery_event::EntityDetails::type].
25720        ///
25721        /// # Example
25722        /// ```ignore,no_run
25723        /// # use google_cloud_dataplex_v1::model::discovery_event::EntityDetails;
25724        /// use google_cloud_dataplex_v1::model::discovery_event::EntityType;
25725        /// let x0 = EntityDetails::new().set_type(EntityType::Table);
25726        /// let x1 = EntityDetails::new().set_type(EntityType::Fileset);
25727        /// ```
25728        pub fn set_type<T: std::convert::Into<crate::model::discovery_event::EntityType>>(
25729            mut self,
25730            v: T,
25731        ) -> Self {
25732            self.r#type = v.into();
25733            self
25734        }
25735    }
25736
25737    impl wkt::message::Message for EntityDetails {
25738        fn typename() -> &'static str {
25739            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails"
25740        }
25741    }
25742
25743    /// Details about the published table.
25744    #[derive(Clone, Default, PartialEq)]
25745    #[non_exhaustive]
25746    pub struct TableDetails {
25747        /// The fully-qualified resource name of the table resource.
25748        pub table: std::string::String,
25749
25750        /// The type of the table resource.
25751        pub r#type: crate::model::discovery_event::TableType,
25752
25753        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25754    }
25755
25756    impl TableDetails {
25757        pub fn new() -> Self {
25758            std::default::Default::default()
25759        }
25760
25761        /// Sets the value of [table][crate::model::discovery_event::TableDetails::table].
25762        ///
25763        /// # Example
25764        /// ```ignore,no_run
25765        /// # use google_cloud_dataplex_v1::model::discovery_event::TableDetails;
25766        /// let x = TableDetails::new().set_table("example");
25767        /// ```
25768        pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25769            self.table = v.into();
25770            self
25771        }
25772
25773        /// Sets the value of [r#type][crate::model::discovery_event::TableDetails::type].
25774        ///
25775        /// # Example
25776        /// ```ignore,no_run
25777        /// # use google_cloud_dataplex_v1::model::discovery_event::TableDetails;
25778        /// use google_cloud_dataplex_v1::model::discovery_event::TableType;
25779        /// let x0 = TableDetails::new().set_type(TableType::ExternalTable);
25780        /// let x1 = TableDetails::new().set_type(TableType::BiglakeTable);
25781        /// let x2 = TableDetails::new().set_type(TableType::ObjectTable);
25782        /// ```
25783        pub fn set_type<T: std::convert::Into<crate::model::discovery_event::TableType>>(
25784            mut self,
25785            v: T,
25786        ) -> Self {
25787            self.r#type = v.into();
25788            self
25789        }
25790    }
25791
25792    impl wkt::message::Message for TableDetails {
25793        fn typename() -> &'static str {
25794            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.TableDetails"
25795        }
25796    }
25797
25798    /// Details about the partition.
25799    #[derive(Clone, Default, PartialEq)]
25800    #[non_exhaustive]
25801    pub struct PartitionDetails {
25802        /// The name to the partition resource.
25803        /// The name is the fully-qualified resource name.
25804        pub partition: std::string::String,
25805
25806        /// The name to the containing entity resource.
25807        /// The name is the fully-qualified resource name.
25808        pub entity: std::string::String,
25809
25810        /// The type of the containing entity resource.
25811        pub r#type: crate::model::discovery_event::EntityType,
25812
25813        /// The locations of the data items (e.g., a Cloud Storage objects) sampled
25814        /// for metadata inference.
25815        pub sampled_data_locations: std::vec::Vec<std::string::String>,
25816
25817        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25818    }
25819
25820    impl PartitionDetails {
25821        pub fn new() -> Self {
25822            std::default::Default::default()
25823        }
25824
25825        /// Sets the value of [partition][crate::model::discovery_event::PartitionDetails::partition].
25826        ///
25827        /// # Example
25828        /// ```ignore,no_run
25829        /// # use google_cloud_dataplex_v1::model::discovery_event::PartitionDetails;
25830        /// let x = PartitionDetails::new().set_partition("example");
25831        /// ```
25832        pub fn set_partition<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25833            self.partition = v.into();
25834            self
25835        }
25836
25837        /// Sets the value of [entity][crate::model::discovery_event::PartitionDetails::entity].
25838        ///
25839        /// # Example
25840        /// ```ignore,no_run
25841        /// # use google_cloud_dataplex_v1::model::discovery_event::PartitionDetails;
25842        /// let x = PartitionDetails::new().set_entity("example");
25843        /// ```
25844        pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25845            self.entity = v.into();
25846            self
25847        }
25848
25849        /// Sets the value of [r#type][crate::model::discovery_event::PartitionDetails::type].
25850        ///
25851        /// # Example
25852        /// ```ignore,no_run
25853        /// # use google_cloud_dataplex_v1::model::discovery_event::PartitionDetails;
25854        /// use google_cloud_dataplex_v1::model::discovery_event::EntityType;
25855        /// let x0 = PartitionDetails::new().set_type(EntityType::Table);
25856        /// let x1 = PartitionDetails::new().set_type(EntityType::Fileset);
25857        /// ```
25858        pub fn set_type<T: std::convert::Into<crate::model::discovery_event::EntityType>>(
25859            mut self,
25860            v: T,
25861        ) -> Self {
25862            self.r#type = v.into();
25863            self
25864        }
25865
25866        /// Sets the value of [sampled_data_locations][crate::model::discovery_event::PartitionDetails::sampled_data_locations].
25867        ///
25868        /// # Example
25869        /// ```ignore,no_run
25870        /// # use google_cloud_dataplex_v1::model::discovery_event::PartitionDetails;
25871        /// let x = PartitionDetails::new().set_sampled_data_locations(["a", "b", "c"]);
25872        /// ```
25873        pub fn set_sampled_data_locations<T, V>(mut self, v: T) -> Self
25874        where
25875            T: std::iter::IntoIterator<Item = V>,
25876            V: std::convert::Into<std::string::String>,
25877        {
25878            use std::iter::Iterator;
25879            self.sampled_data_locations = v.into_iter().map(|i| i.into()).collect();
25880            self
25881        }
25882    }
25883
25884    impl wkt::message::Message for PartitionDetails {
25885        fn typename() -> &'static str {
25886            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails"
25887        }
25888    }
25889
25890    /// Details about the action.
25891    #[derive(Clone, Default, PartialEq)]
25892    #[non_exhaustive]
25893    pub struct ActionDetails {
25894        /// The type of action.
25895        /// Eg. IncompatibleDataSchema, InvalidDataFormat
25896        pub r#type: std::string::String,
25897
25898        /// The human readable issue associated with the action.
25899        pub issue: std::string::String,
25900
25901        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25902    }
25903
25904    impl ActionDetails {
25905        pub fn new() -> Self {
25906            std::default::Default::default()
25907        }
25908
25909        /// Sets the value of [r#type][crate::model::discovery_event::ActionDetails::type].
25910        ///
25911        /// # Example
25912        /// ```ignore,no_run
25913        /// # use google_cloud_dataplex_v1::model::discovery_event::ActionDetails;
25914        /// let x = ActionDetails::new().set_type("example");
25915        /// ```
25916        pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25917            self.r#type = v.into();
25918            self
25919        }
25920
25921        /// Sets the value of [issue][crate::model::discovery_event::ActionDetails::issue].
25922        ///
25923        /// # Example
25924        /// ```ignore,no_run
25925        /// # use google_cloud_dataplex_v1::model::discovery_event::ActionDetails;
25926        /// let x = ActionDetails::new().set_issue("example");
25927        /// ```
25928        pub fn set_issue<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25929            self.issue = v.into();
25930            self
25931        }
25932    }
25933
25934    impl wkt::message::Message for ActionDetails {
25935        fn typename() -> &'static str {
25936            "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails"
25937        }
25938    }
25939
25940    /// The type of the event.
25941    ///
25942    /// # Working with unknown values
25943    ///
25944    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25945    /// additional enum variants at any time. Adding new variants is not considered
25946    /// a breaking change. Applications should write their code in anticipation of:
25947    ///
25948    /// - New values appearing in future releases of the client library, **and**
25949    /// - New values received dynamically, without application changes.
25950    ///
25951    /// Please consult the [Working with enums] section in the user guide for some
25952    /// guidelines.
25953    ///
25954    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25955    #[derive(Clone, Debug, PartialEq)]
25956    #[non_exhaustive]
25957    pub enum EventType {
25958        /// An unspecified event type.
25959        Unspecified,
25960        /// An event representing discovery configuration in effect.
25961        Config,
25962        /// An event representing a metadata entity being created.
25963        EntityCreated,
25964        /// An event representing a metadata entity being updated.
25965        EntityUpdated,
25966        /// An event representing a metadata entity being deleted.
25967        EntityDeleted,
25968        /// An event representing a partition being created.
25969        PartitionCreated,
25970        /// An event representing a partition being updated.
25971        PartitionUpdated,
25972        /// An event representing a partition being deleted.
25973        PartitionDeleted,
25974        /// An event representing a table being published.
25975        TablePublished,
25976        /// An event representing a table being updated.
25977        TableUpdated,
25978        /// An event representing a table being skipped in publishing.
25979        TableIgnored,
25980        /// An event representing a table being deleted.
25981        TableDeleted,
25982        /// If set, the enum was initialized with an unknown value.
25983        ///
25984        /// Applications can examine the value using [EventType::value] or
25985        /// [EventType::name].
25986        UnknownValue(event_type::UnknownValue),
25987    }
25988
25989    #[doc(hidden)]
25990    pub mod event_type {
25991        #[allow(unused_imports)]
25992        use super::*;
25993        #[derive(Clone, Debug, PartialEq)]
25994        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25995    }
25996
25997    impl EventType {
25998        /// Gets the enum value.
25999        ///
26000        /// Returns `None` if the enum contains an unknown value deserialized from
26001        /// the string representation of enums.
26002        pub fn value(&self) -> std::option::Option<i32> {
26003            match self {
26004                Self::Unspecified => std::option::Option::Some(0),
26005                Self::Config => std::option::Option::Some(1),
26006                Self::EntityCreated => std::option::Option::Some(2),
26007                Self::EntityUpdated => std::option::Option::Some(3),
26008                Self::EntityDeleted => std::option::Option::Some(4),
26009                Self::PartitionCreated => std::option::Option::Some(5),
26010                Self::PartitionUpdated => std::option::Option::Some(6),
26011                Self::PartitionDeleted => std::option::Option::Some(7),
26012                Self::TablePublished => std::option::Option::Some(10),
26013                Self::TableUpdated => std::option::Option::Some(11),
26014                Self::TableIgnored => std::option::Option::Some(12),
26015                Self::TableDeleted => std::option::Option::Some(13),
26016                Self::UnknownValue(u) => u.0.value(),
26017            }
26018        }
26019
26020        /// Gets the enum value as a string.
26021        ///
26022        /// Returns `None` if the enum contains an unknown value deserialized from
26023        /// the integer representation of enums.
26024        pub fn name(&self) -> std::option::Option<&str> {
26025            match self {
26026                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
26027                Self::Config => std::option::Option::Some("CONFIG"),
26028                Self::EntityCreated => std::option::Option::Some("ENTITY_CREATED"),
26029                Self::EntityUpdated => std::option::Option::Some("ENTITY_UPDATED"),
26030                Self::EntityDeleted => std::option::Option::Some("ENTITY_DELETED"),
26031                Self::PartitionCreated => std::option::Option::Some("PARTITION_CREATED"),
26032                Self::PartitionUpdated => std::option::Option::Some("PARTITION_UPDATED"),
26033                Self::PartitionDeleted => std::option::Option::Some("PARTITION_DELETED"),
26034                Self::TablePublished => std::option::Option::Some("TABLE_PUBLISHED"),
26035                Self::TableUpdated => std::option::Option::Some("TABLE_UPDATED"),
26036                Self::TableIgnored => std::option::Option::Some("TABLE_IGNORED"),
26037                Self::TableDeleted => std::option::Option::Some("TABLE_DELETED"),
26038                Self::UnknownValue(u) => u.0.name(),
26039            }
26040        }
26041    }
26042
26043    impl std::default::Default for EventType {
26044        fn default() -> Self {
26045            use std::convert::From;
26046            Self::from(0)
26047        }
26048    }
26049
26050    impl std::fmt::Display for EventType {
26051        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26052            wkt::internal::display_enum(f, self.name(), self.value())
26053        }
26054    }
26055
26056    impl std::convert::From<i32> for EventType {
26057        fn from(value: i32) -> Self {
26058            match value {
26059                0 => Self::Unspecified,
26060                1 => Self::Config,
26061                2 => Self::EntityCreated,
26062                3 => Self::EntityUpdated,
26063                4 => Self::EntityDeleted,
26064                5 => Self::PartitionCreated,
26065                6 => Self::PartitionUpdated,
26066                7 => Self::PartitionDeleted,
26067                10 => Self::TablePublished,
26068                11 => Self::TableUpdated,
26069                12 => Self::TableIgnored,
26070                13 => Self::TableDeleted,
26071                _ => Self::UnknownValue(event_type::UnknownValue(
26072                    wkt::internal::UnknownEnumValue::Integer(value),
26073                )),
26074            }
26075        }
26076    }
26077
26078    impl std::convert::From<&str> for EventType {
26079        fn from(value: &str) -> Self {
26080            use std::string::ToString;
26081            match value {
26082                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
26083                "CONFIG" => Self::Config,
26084                "ENTITY_CREATED" => Self::EntityCreated,
26085                "ENTITY_UPDATED" => Self::EntityUpdated,
26086                "ENTITY_DELETED" => Self::EntityDeleted,
26087                "PARTITION_CREATED" => Self::PartitionCreated,
26088                "PARTITION_UPDATED" => Self::PartitionUpdated,
26089                "PARTITION_DELETED" => Self::PartitionDeleted,
26090                "TABLE_PUBLISHED" => Self::TablePublished,
26091                "TABLE_UPDATED" => Self::TableUpdated,
26092                "TABLE_IGNORED" => Self::TableIgnored,
26093                "TABLE_DELETED" => Self::TableDeleted,
26094                _ => Self::UnknownValue(event_type::UnknownValue(
26095                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26096                )),
26097            }
26098        }
26099    }
26100
26101    impl serde::ser::Serialize for EventType {
26102        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26103        where
26104            S: serde::Serializer,
26105        {
26106            match self {
26107                Self::Unspecified => serializer.serialize_i32(0),
26108                Self::Config => serializer.serialize_i32(1),
26109                Self::EntityCreated => serializer.serialize_i32(2),
26110                Self::EntityUpdated => serializer.serialize_i32(3),
26111                Self::EntityDeleted => serializer.serialize_i32(4),
26112                Self::PartitionCreated => serializer.serialize_i32(5),
26113                Self::PartitionUpdated => serializer.serialize_i32(6),
26114                Self::PartitionDeleted => serializer.serialize_i32(7),
26115                Self::TablePublished => serializer.serialize_i32(10),
26116                Self::TableUpdated => serializer.serialize_i32(11),
26117                Self::TableIgnored => serializer.serialize_i32(12),
26118                Self::TableDeleted => serializer.serialize_i32(13),
26119                Self::UnknownValue(u) => u.0.serialize(serializer),
26120            }
26121        }
26122    }
26123
26124    impl<'de> serde::de::Deserialize<'de> for EventType {
26125        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26126        where
26127            D: serde::Deserializer<'de>,
26128        {
26129            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
26130                ".google.cloud.dataplex.v1.DiscoveryEvent.EventType",
26131            ))
26132        }
26133    }
26134
26135    /// The type of the entity.
26136    ///
26137    /// # Working with unknown values
26138    ///
26139    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26140    /// additional enum variants at any time. Adding new variants is not considered
26141    /// a breaking change. Applications should write their code in anticipation of:
26142    ///
26143    /// - New values appearing in future releases of the client library, **and**
26144    /// - New values received dynamically, without application changes.
26145    ///
26146    /// Please consult the [Working with enums] section in the user guide for some
26147    /// guidelines.
26148    ///
26149    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26150    #[derive(Clone, Debug, PartialEq)]
26151    #[non_exhaustive]
26152    pub enum EntityType {
26153        /// An unspecified event type.
26154        Unspecified,
26155        /// Entities representing structured data.
26156        Table,
26157        /// Entities representing unstructured data.
26158        Fileset,
26159        /// If set, the enum was initialized with an unknown value.
26160        ///
26161        /// Applications can examine the value using [EntityType::value] or
26162        /// [EntityType::name].
26163        UnknownValue(entity_type::UnknownValue),
26164    }
26165
26166    #[doc(hidden)]
26167    pub mod entity_type {
26168        #[allow(unused_imports)]
26169        use super::*;
26170        #[derive(Clone, Debug, PartialEq)]
26171        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26172    }
26173
26174    impl EntityType {
26175        /// Gets the enum value.
26176        ///
26177        /// Returns `None` if the enum contains an unknown value deserialized from
26178        /// the string representation of enums.
26179        pub fn value(&self) -> std::option::Option<i32> {
26180            match self {
26181                Self::Unspecified => std::option::Option::Some(0),
26182                Self::Table => std::option::Option::Some(1),
26183                Self::Fileset => std::option::Option::Some(2),
26184                Self::UnknownValue(u) => u.0.value(),
26185            }
26186        }
26187
26188        /// Gets the enum value as a string.
26189        ///
26190        /// Returns `None` if the enum contains an unknown value deserialized from
26191        /// the integer representation of enums.
26192        pub fn name(&self) -> std::option::Option<&str> {
26193            match self {
26194                Self::Unspecified => std::option::Option::Some("ENTITY_TYPE_UNSPECIFIED"),
26195                Self::Table => std::option::Option::Some("TABLE"),
26196                Self::Fileset => std::option::Option::Some("FILESET"),
26197                Self::UnknownValue(u) => u.0.name(),
26198            }
26199        }
26200    }
26201
26202    impl std::default::Default for EntityType {
26203        fn default() -> Self {
26204            use std::convert::From;
26205            Self::from(0)
26206        }
26207    }
26208
26209    impl std::fmt::Display for EntityType {
26210        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26211            wkt::internal::display_enum(f, self.name(), self.value())
26212        }
26213    }
26214
26215    impl std::convert::From<i32> for EntityType {
26216        fn from(value: i32) -> Self {
26217            match value {
26218                0 => Self::Unspecified,
26219                1 => Self::Table,
26220                2 => Self::Fileset,
26221                _ => Self::UnknownValue(entity_type::UnknownValue(
26222                    wkt::internal::UnknownEnumValue::Integer(value),
26223                )),
26224            }
26225        }
26226    }
26227
26228    impl std::convert::From<&str> for EntityType {
26229        fn from(value: &str) -> Self {
26230            use std::string::ToString;
26231            match value {
26232                "ENTITY_TYPE_UNSPECIFIED" => Self::Unspecified,
26233                "TABLE" => Self::Table,
26234                "FILESET" => Self::Fileset,
26235                _ => Self::UnknownValue(entity_type::UnknownValue(
26236                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26237                )),
26238            }
26239        }
26240    }
26241
26242    impl serde::ser::Serialize for EntityType {
26243        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26244        where
26245            S: serde::Serializer,
26246        {
26247            match self {
26248                Self::Unspecified => serializer.serialize_i32(0),
26249                Self::Table => serializer.serialize_i32(1),
26250                Self::Fileset => serializer.serialize_i32(2),
26251                Self::UnknownValue(u) => u.0.serialize(serializer),
26252            }
26253        }
26254    }
26255
26256    impl<'de> serde::de::Deserialize<'de> for EntityType {
26257        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26258        where
26259            D: serde::Deserializer<'de>,
26260        {
26261            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityType>::new(
26262                ".google.cloud.dataplex.v1.DiscoveryEvent.EntityType",
26263            ))
26264        }
26265    }
26266
26267    /// The type of the published table.
26268    ///
26269    /// # Working with unknown values
26270    ///
26271    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26272    /// additional enum variants at any time. Adding new variants is not considered
26273    /// a breaking change. Applications should write their code in anticipation of:
26274    ///
26275    /// - New values appearing in future releases of the client library, **and**
26276    /// - New values received dynamically, without application changes.
26277    ///
26278    /// Please consult the [Working with enums] section in the user guide for some
26279    /// guidelines.
26280    ///
26281    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26282    #[derive(Clone, Debug, PartialEq)]
26283    #[non_exhaustive]
26284    pub enum TableType {
26285        /// An unspecified table type.
26286        Unspecified,
26287        /// External table type.
26288        ExternalTable,
26289        /// BigLake table type.
26290        BiglakeTable,
26291        /// Object table type for unstructured data.
26292        ObjectTable,
26293        /// If set, the enum was initialized with an unknown value.
26294        ///
26295        /// Applications can examine the value using [TableType::value] or
26296        /// [TableType::name].
26297        UnknownValue(table_type::UnknownValue),
26298    }
26299
26300    #[doc(hidden)]
26301    pub mod table_type {
26302        #[allow(unused_imports)]
26303        use super::*;
26304        #[derive(Clone, Debug, PartialEq)]
26305        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26306    }
26307
26308    impl TableType {
26309        /// Gets the enum value.
26310        ///
26311        /// Returns `None` if the enum contains an unknown value deserialized from
26312        /// the string representation of enums.
26313        pub fn value(&self) -> std::option::Option<i32> {
26314            match self {
26315                Self::Unspecified => std::option::Option::Some(0),
26316                Self::ExternalTable => std::option::Option::Some(1),
26317                Self::BiglakeTable => std::option::Option::Some(2),
26318                Self::ObjectTable => std::option::Option::Some(3),
26319                Self::UnknownValue(u) => u.0.value(),
26320            }
26321        }
26322
26323        /// Gets the enum value as a string.
26324        ///
26325        /// Returns `None` if the enum contains an unknown value deserialized from
26326        /// the integer representation of enums.
26327        pub fn name(&self) -> std::option::Option<&str> {
26328            match self {
26329                Self::Unspecified => std::option::Option::Some("TABLE_TYPE_UNSPECIFIED"),
26330                Self::ExternalTable => std::option::Option::Some("EXTERNAL_TABLE"),
26331                Self::BiglakeTable => std::option::Option::Some("BIGLAKE_TABLE"),
26332                Self::ObjectTable => std::option::Option::Some("OBJECT_TABLE"),
26333                Self::UnknownValue(u) => u.0.name(),
26334            }
26335        }
26336    }
26337
26338    impl std::default::Default for TableType {
26339        fn default() -> Self {
26340            use std::convert::From;
26341            Self::from(0)
26342        }
26343    }
26344
26345    impl std::fmt::Display for TableType {
26346        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26347            wkt::internal::display_enum(f, self.name(), self.value())
26348        }
26349    }
26350
26351    impl std::convert::From<i32> for TableType {
26352        fn from(value: i32) -> Self {
26353            match value {
26354                0 => Self::Unspecified,
26355                1 => Self::ExternalTable,
26356                2 => Self::BiglakeTable,
26357                3 => Self::ObjectTable,
26358                _ => Self::UnknownValue(table_type::UnknownValue(
26359                    wkt::internal::UnknownEnumValue::Integer(value),
26360                )),
26361            }
26362        }
26363    }
26364
26365    impl std::convert::From<&str> for TableType {
26366        fn from(value: &str) -> Self {
26367            use std::string::ToString;
26368            match value {
26369                "TABLE_TYPE_UNSPECIFIED" => Self::Unspecified,
26370                "EXTERNAL_TABLE" => Self::ExternalTable,
26371                "BIGLAKE_TABLE" => Self::BiglakeTable,
26372                "OBJECT_TABLE" => Self::ObjectTable,
26373                _ => Self::UnknownValue(table_type::UnknownValue(
26374                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26375                )),
26376            }
26377        }
26378    }
26379
26380    impl serde::ser::Serialize for TableType {
26381        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26382        where
26383            S: serde::Serializer,
26384        {
26385            match self {
26386                Self::Unspecified => serializer.serialize_i32(0),
26387                Self::ExternalTable => serializer.serialize_i32(1),
26388                Self::BiglakeTable => serializer.serialize_i32(2),
26389                Self::ObjectTable => serializer.serialize_i32(3),
26390                Self::UnknownValue(u) => u.0.serialize(serializer),
26391            }
26392        }
26393    }
26394
26395    impl<'de> serde::de::Deserialize<'de> for TableType {
26396        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26397        where
26398            D: serde::Deserializer<'de>,
26399        {
26400            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TableType>::new(
26401                ".google.cloud.dataplex.v1.DiscoveryEvent.TableType",
26402            ))
26403        }
26404    }
26405
26406    /// Additional details about the event.
26407    #[derive(Clone, Debug, PartialEq)]
26408    #[non_exhaustive]
26409    pub enum Details {
26410        /// Details about discovery configuration in effect.
26411        Config(std::boxed::Box<crate::model::discovery_event::ConfigDetails>),
26412        /// Details about the entity associated with the event.
26413        Entity(std::boxed::Box<crate::model::discovery_event::EntityDetails>),
26414        /// Details about the partition associated with the event.
26415        Partition(std::boxed::Box<crate::model::discovery_event::PartitionDetails>),
26416        /// Details about the action associated with the event.
26417        Action(std::boxed::Box<crate::model::discovery_event::ActionDetails>),
26418        /// Details about the BigQuery table publishing associated with the event.
26419        Table(std::boxed::Box<crate::model::discovery_event::TableDetails>),
26420    }
26421}
26422
26423/// The payload associated with Job logs that contains events describing jobs
26424/// that have run within a Lake.
26425#[derive(Clone, Default, PartialEq)]
26426#[non_exhaustive]
26427pub struct JobEvent {
26428    /// The log message.
26429    pub message: std::string::String,
26430
26431    /// The unique id identifying the job.
26432    pub job_id: std::string::String,
26433
26434    /// The time when the job started running.
26435    pub start_time: std::option::Option<wkt::Timestamp>,
26436
26437    /// The time when the job ended running.
26438    pub end_time: std::option::Option<wkt::Timestamp>,
26439
26440    /// The job state on completion.
26441    pub state: crate::model::job_event::State,
26442
26443    /// The number of retries.
26444    pub retries: i32,
26445
26446    /// The type of the job.
26447    pub r#type: crate::model::job_event::Type,
26448
26449    /// The service used to execute the job.
26450    pub service: crate::model::job_event::Service,
26451
26452    /// The reference to the job within the service.
26453    pub service_job: std::string::String,
26454
26455    /// Job execution trigger.
26456    pub execution_trigger: crate::model::job_event::ExecutionTrigger,
26457
26458    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26459}
26460
26461impl JobEvent {
26462    pub fn new() -> Self {
26463        std::default::Default::default()
26464    }
26465
26466    /// Sets the value of [message][crate::model::JobEvent::message].
26467    ///
26468    /// # Example
26469    /// ```ignore,no_run
26470    /// # use google_cloud_dataplex_v1::model::JobEvent;
26471    /// let x = JobEvent::new().set_message("example");
26472    /// ```
26473    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26474        self.message = v.into();
26475        self
26476    }
26477
26478    /// Sets the value of [job_id][crate::model::JobEvent::job_id].
26479    ///
26480    /// # Example
26481    /// ```ignore,no_run
26482    /// # use google_cloud_dataplex_v1::model::JobEvent;
26483    /// let x = JobEvent::new().set_job_id("example");
26484    /// ```
26485    pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26486        self.job_id = v.into();
26487        self
26488    }
26489
26490    /// Sets the value of [start_time][crate::model::JobEvent::start_time].
26491    ///
26492    /// # Example
26493    /// ```ignore,no_run
26494    /// # use google_cloud_dataplex_v1::model::JobEvent;
26495    /// use wkt::Timestamp;
26496    /// let x = JobEvent::new().set_start_time(Timestamp::default()/* use setters */);
26497    /// ```
26498    pub fn set_start_time<T>(mut self, v: T) -> Self
26499    where
26500        T: std::convert::Into<wkt::Timestamp>,
26501    {
26502        self.start_time = std::option::Option::Some(v.into());
26503        self
26504    }
26505
26506    /// Sets or clears the value of [start_time][crate::model::JobEvent::start_time].
26507    ///
26508    /// # Example
26509    /// ```ignore,no_run
26510    /// # use google_cloud_dataplex_v1::model::JobEvent;
26511    /// use wkt::Timestamp;
26512    /// let x = JobEvent::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
26513    /// let x = JobEvent::new().set_or_clear_start_time(None::<Timestamp>);
26514    /// ```
26515    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
26516    where
26517        T: std::convert::Into<wkt::Timestamp>,
26518    {
26519        self.start_time = v.map(|x| x.into());
26520        self
26521    }
26522
26523    /// Sets the value of [end_time][crate::model::JobEvent::end_time].
26524    ///
26525    /// # Example
26526    /// ```ignore,no_run
26527    /// # use google_cloud_dataplex_v1::model::JobEvent;
26528    /// use wkt::Timestamp;
26529    /// let x = JobEvent::new().set_end_time(Timestamp::default()/* use setters */);
26530    /// ```
26531    pub fn set_end_time<T>(mut self, v: T) -> Self
26532    where
26533        T: std::convert::Into<wkt::Timestamp>,
26534    {
26535        self.end_time = std::option::Option::Some(v.into());
26536        self
26537    }
26538
26539    /// Sets or clears the value of [end_time][crate::model::JobEvent::end_time].
26540    ///
26541    /// # Example
26542    /// ```ignore,no_run
26543    /// # use google_cloud_dataplex_v1::model::JobEvent;
26544    /// use wkt::Timestamp;
26545    /// let x = JobEvent::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
26546    /// let x = JobEvent::new().set_or_clear_end_time(None::<Timestamp>);
26547    /// ```
26548    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
26549    where
26550        T: std::convert::Into<wkt::Timestamp>,
26551    {
26552        self.end_time = v.map(|x| x.into());
26553        self
26554    }
26555
26556    /// Sets the value of [state][crate::model::JobEvent::state].
26557    ///
26558    /// # Example
26559    /// ```ignore,no_run
26560    /// # use google_cloud_dataplex_v1::model::JobEvent;
26561    /// use google_cloud_dataplex_v1::model::job_event::State;
26562    /// let x0 = JobEvent::new().set_state(State::Succeeded);
26563    /// let x1 = JobEvent::new().set_state(State::Failed);
26564    /// let x2 = JobEvent::new().set_state(State::Cancelled);
26565    /// ```
26566    pub fn set_state<T: std::convert::Into<crate::model::job_event::State>>(
26567        mut self,
26568        v: T,
26569    ) -> Self {
26570        self.state = v.into();
26571        self
26572    }
26573
26574    /// Sets the value of [retries][crate::model::JobEvent::retries].
26575    ///
26576    /// # Example
26577    /// ```ignore,no_run
26578    /// # use google_cloud_dataplex_v1::model::JobEvent;
26579    /// let x = JobEvent::new().set_retries(42);
26580    /// ```
26581    pub fn set_retries<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
26582        self.retries = v.into();
26583        self
26584    }
26585
26586    /// Sets the value of [r#type][crate::model::JobEvent::type].
26587    ///
26588    /// # Example
26589    /// ```ignore,no_run
26590    /// # use google_cloud_dataplex_v1::model::JobEvent;
26591    /// use google_cloud_dataplex_v1::model::job_event::Type;
26592    /// let x0 = JobEvent::new().set_type(Type::Spark);
26593    /// let x1 = JobEvent::new().set_type(Type::Notebook);
26594    /// ```
26595    pub fn set_type<T: std::convert::Into<crate::model::job_event::Type>>(mut self, v: T) -> Self {
26596        self.r#type = v.into();
26597        self
26598    }
26599
26600    /// Sets the value of [service][crate::model::JobEvent::service].
26601    ///
26602    /// # Example
26603    /// ```ignore,no_run
26604    /// # use google_cloud_dataplex_v1::model::JobEvent;
26605    /// use google_cloud_dataplex_v1::model::job_event::Service;
26606    /// let x0 = JobEvent::new().set_service(Service::Dataproc);
26607    /// ```
26608    pub fn set_service<T: std::convert::Into<crate::model::job_event::Service>>(
26609        mut self,
26610        v: T,
26611    ) -> Self {
26612        self.service = v.into();
26613        self
26614    }
26615
26616    /// Sets the value of [service_job][crate::model::JobEvent::service_job].
26617    ///
26618    /// # Example
26619    /// ```ignore,no_run
26620    /// # use google_cloud_dataplex_v1::model::JobEvent;
26621    /// let x = JobEvent::new().set_service_job("example");
26622    /// ```
26623    pub fn set_service_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26624        self.service_job = v.into();
26625        self
26626    }
26627
26628    /// Sets the value of [execution_trigger][crate::model::JobEvent::execution_trigger].
26629    ///
26630    /// # Example
26631    /// ```ignore,no_run
26632    /// # use google_cloud_dataplex_v1::model::JobEvent;
26633    /// use google_cloud_dataplex_v1::model::job_event::ExecutionTrigger;
26634    /// let x0 = JobEvent::new().set_execution_trigger(ExecutionTrigger::TaskConfig);
26635    /// let x1 = JobEvent::new().set_execution_trigger(ExecutionTrigger::RunRequest);
26636    /// ```
26637    pub fn set_execution_trigger<
26638        T: std::convert::Into<crate::model::job_event::ExecutionTrigger>,
26639    >(
26640        mut self,
26641        v: T,
26642    ) -> Self {
26643        self.execution_trigger = v.into();
26644        self
26645    }
26646}
26647
26648impl wkt::message::Message for JobEvent {
26649    fn typename() -> &'static str {
26650        "type.googleapis.com/google.cloud.dataplex.v1.JobEvent"
26651    }
26652}
26653
26654/// Defines additional types related to [JobEvent].
26655pub mod job_event {
26656    #[allow(unused_imports)]
26657    use super::*;
26658
26659    /// The type of the job.
26660    ///
26661    /// # Working with unknown values
26662    ///
26663    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26664    /// additional enum variants at any time. Adding new variants is not considered
26665    /// a breaking change. Applications should write their code in anticipation of:
26666    ///
26667    /// - New values appearing in future releases of the client library, **and**
26668    /// - New values received dynamically, without application changes.
26669    ///
26670    /// Please consult the [Working with enums] section in the user guide for some
26671    /// guidelines.
26672    ///
26673    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26674    #[derive(Clone, Debug, PartialEq)]
26675    #[non_exhaustive]
26676    pub enum Type {
26677        /// Unspecified job type.
26678        Unspecified,
26679        /// Spark jobs.
26680        Spark,
26681        /// Notebook jobs.
26682        Notebook,
26683        /// If set, the enum was initialized with an unknown value.
26684        ///
26685        /// Applications can examine the value using [Type::value] or
26686        /// [Type::name].
26687        UnknownValue(r#type::UnknownValue),
26688    }
26689
26690    #[doc(hidden)]
26691    pub mod r#type {
26692        #[allow(unused_imports)]
26693        use super::*;
26694        #[derive(Clone, Debug, PartialEq)]
26695        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26696    }
26697
26698    impl Type {
26699        /// Gets the enum value.
26700        ///
26701        /// Returns `None` if the enum contains an unknown value deserialized from
26702        /// the string representation of enums.
26703        pub fn value(&self) -> std::option::Option<i32> {
26704            match self {
26705                Self::Unspecified => std::option::Option::Some(0),
26706                Self::Spark => std::option::Option::Some(1),
26707                Self::Notebook => std::option::Option::Some(2),
26708                Self::UnknownValue(u) => u.0.value(),
26709            }
26710        }
26711
26712        /// Gets the enum value as a string.
26713        ///
26714        /// Returns `None` if the enum contains an unknown value deserialized from
26715        /// the integer representation of enums.
26716        pub fn name(&self) -> std::option::Option<&str> {
26717            match self {
26718                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
26719                Self::Spark => std::option::Option::Some("SPARK"),
26720                Self::Notebook => std::option::Option::Some("NOTEBOOK"),
26721                Self::UnknownValue(u) => u.0.name(),
26722            }
26723        }
26724    }
26725
26726    impl std::default::Default for Type {
26727        fn default() -> Self {
26728            use std::convert::From;
26729            Self::from(0)
26730        }
26731    }
26732
26733    impl std::fmt::Display for Type {
26734        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26735            wkt::internal::display_enum(f, self.name(), self.value())
26736        }
26737    }
26738
26739    impl std::convert::From<i32> for Type {
26740        fn from(value: i32) -> Self {
26741            match value {
26742                0 => Self::Unspecified,
26743                1 => Self::Spark,
26744                2 => Self::Notebook,
26745                _ => Self::UnknownValue(r#type::UnknownValue(
26746                    wkt::internal::UnknownEnumValue::Integer(value),
26747                )),
26748            }
26749        }
26750    }
26751
26752    impl std::convert::From<&str> for Type {
26753        fn from(value: &str) -> Self {
26754            use std::string::ToString;
26755            match value {
26756                "TYPE_UNSPECIFIED" => Self::Unspecified,
26757                "SPARK" => Self::Spark,
26758                "NOTEBOOK" => Self::Notebook,
26759                _ => Self::UnknownValue(r#type::UnknownValue(
26760                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26761                )),
26762            }
26763        }
26764    }
26765
26766    impl serde::ser::Serialize for Type {
26767        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26768        where
26769            S: serde::Serializer,
26770        {
26771            match self {
26772                Self::Unspecified => serializer.serialize_i32(0),
26773                Self::Spark => serializer.serialize_i32(1),
26774                Self::Notebook => serializer.serialize_i32(2),
26775                Self::UnknownValue(u) => u.0.serialize(serializer),
26776            }
26777        }
26778    }
26779
26780    impl<'de> serde::de::Deserialize<'de> for Type {
26781        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26782        where
26783            D: serde::Deserializer<'de>,
26784        {
26785            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
26786                ".google.cloud.dataplex.v1.JobEvent.Type",
26787            ))
26788        }
26789    }
26790
26791    /// The completion status of the job.
26792    ///
26793    /// # Working with unknown values
26794    ///
26795    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26796    /// additional enum variants at any time. Adding new variants is not considered
26797    /// a breaking change. Applications should write their code in anticipation of:
26798    ///
26799    /// - New values appearing in future releases of the client library, **and**
26800    /// - New values received dynamically, without application changes.
26801    ///
26802    /// Please consult the [Working with enums] section in the user guide for some
26803    /// guidelines.
26804    ///
26805    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26806    #[derive(Clone, Debug, PartialEq)]
26807    #[non_exhaustive]
26808    pub enum State {
26809        /// Unspecified job state.
26810        Unspecified,
26811        /// Job successfully completed.
26812        Succeeded,
26813        /// Job was unsuccessful.
26814        Failed,
26815        /// Job was cancelled by the user.
26816        Cancelled,
26817        /// Job was cancelled or aborted via the service executing the job.
26818        Aborted,
26819        /// If set, the enum was initialized with an unknown value.
26820        ///
26821        /// Applications can examine the value using [State::value] or
26822        /// [State::name].
26823        UnknownValue(state::UnknownValue),
26824    }
26825
26826    #[doc(hidden)]
26827    pub mod state {
26828        #[allow(unused_imports)]
26829        use super::*;
26830        #[derive(Clone, Debug, PartialEq)]
26831        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26832    }
26833
26834    impl State {
26835        /// Gets the enum value.
26836        ///
26837        /// Returns `None` if the enum contains an unknown value deserialized from
26838        /// the string representation of enums.
26839        pub fn value(&self) -> std::option::Option<i32> {
26840            match self {
26841                Self::Unspecified => std::option::Option::Some(0),
26842                Self::Succeeded => std::option::Option::Some(1),
26843                Self::Failed => std::option::Option::Some(2),
26844                Self::Cancelled => std::option::Option::Some(3),
26845                Self::Aborted => std::option::Option::Some(4),
26846                Self::UnknownValue(u) => u.0.value(),
26847            }
26848        }
26849
26850        /// Gets the enum value as a string.
26851        ///
26852        /// Returns `None` if the enum contains an unknown value deserialized from
26853        /// the integer representation of enums.
26854        pub fn name(&self) -> std::option::Option<&str> {
26855            match self {
26856                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
26857                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
26858                Self::Failed => std::option::Option::Some("FAILED"),
26859                Self::Cancelled => std::option::Option::Some("CANCELLED"),
26860                Self::Aborted => std::option::Option::Some("ABORTED"),
26861                Self::UnknownValue(u) => u.0.name(),
26862            }
26863        }
26864    }
26865
26866    impl std::default::Default for State {
26867        fn default() -> Self {
26868            use std::convert::From;
26869            Self::from(0)
26870        }
26871    }
26872
26873    impl std::fmt::Display for State {
26874        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26875            wkt::internal::display_enum(f, self.name(), self.value())
26876        }
26877    }
26878
26879    impl std::convert::From<i32> for State {
26880        fn from(value: i32) -> Self {
26881            match value {
26882                0 => Self::Unspecified,
26883                1 => Self::Succeeded,
26884                2 => Self::Failed,
26885                3 => Self::Cancelled,
26886                4 => Self::Aborted,
26887                _ => Self::UnknownValue(state::UnknownValue(
26888                    wkt::internal::UnknownEnumValue::Integer(value),
26889                )),
26890            }
26891        }
26892    }
26893
26894    impl std::convert::From<&str> for State {
26895        fn from(value: &str) -> Self {
26896            use std::string::ToString;
26897            match value {
26898                "STATE_UNSPECIFIED" => Self::Unspecified,
26899                "SUCCEEDED" => Self::Succeeded,
26900                "FAILED" => Self::Failed,
26901                "CANCELLED" => Self::Cancelled,
26902                "ABORTED" => Self::Aborted,
26903                _ => Self::UnknownValue(state::UnknownValue(
26904                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26905                )),
26906            }
26907        }
26908    }
26909
26910    impl serde::ser::Serialize for State {
26911        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26912        where
26913            S: serde::Serializer,
26914        {
26915            match self {
26916                Self::Unspecified => serializer.serialize_i32(0),
26917                Self::Succeeded => serializer.serialize_i32(1),
26918                Self::Failed => serializer.serialize_i32(2),
26919                Self::Cancelled => serializer.serialize_i32(3),
26920                Self::Aborted => serializer.serialize_i32(4),
26921                Self::UnknownValue(u) => u.0.serialize(serializer),
26922            }
26923        }
26924    }
26925
26926    impl<'de> serde::de::Deserialize<'de> for State {
26927        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26928        where
26929            D: serde::Deserializer<'de>,
26930        {
26931            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
26932                ".google.cloud.dataplex.v1.JobEvent.State",
26933            ))
26934        }
26935    }
26936
26937    /// The service used to execute the job.
26938    ///
26939    /// # Working with unknown values
26940    ///
26941    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26942    /// additional enum variants at any time. Adding new variants is not considered
26943    /// a breaking change. Applications should write their code in anticipation of:
26944    ///
26945    /// - New values appearing in future releases of the client library, **and**
26946    /// - New values received dynamically, without application changes.
26947    ///
26948    /// Please consult the [Working with enums] section in the user guide for some
26949    /// guidelines.
26950    ///
26951    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26952    #[derive(Clone, Debug, PartialEq)]
26953    #[non_exhaustive]
26954    pub enum Service {
26955        /// Unspecified service.
26956        Unspecified,
26957        /// Cloud Dataproc.
26958        Dataproc,
26959        /// If set, the enum was initialized with an unknown value.
26960        ///
26961        /// Applications can examine the value using [Service::value] or
26962        /// [Service::name].
26963        UnknownValue(service::UnknownValue),
26964    }
26965
26966    #[doc(hidden)]
26967    pub mod service {
26968        #[allow(unused_imports)]
26969        use super::*;
26970        #[derive(Clone, Debug, PartialEq)]
26971        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26972    }
26973
26974    impl Service {
26975        /// Gets the enum value.
26976        ///
26977        /// Returns `None` if the enum contains an unknown value deserialized from
26978        /// the string representation of enums.
26979        pub fn value(&self) -> std::option::Option<i32> {
26980            match self {
26981                Self::Unspecified => std::option::Option::Some(0),
26982                Self::Dataproc => std::option::Option::Some(1),
26983                Self::UnknownValue(u) => u.0.value(),
26984            }
26985        }
26986
26987        /// Gets the enum value as a string.
26988        ///
26989        /// Returns `None` if the enum contains an unknown value deserialized from
26990        /// the integer representation of enums.
26991        pub fn name(&self) -> std::option::Option<&str> {
26992            match self {
26993                Self::Unspecified => std::option::Option::Some("SERVICE_UNSPECIFIED"),
26994                Self::Dataproc => std::option::Option::Some("DATAPROC"),
26995                Self::UnknownValue(u) => u.0.name(),
26996            }
26997        }
26998    }
26999
27000    impl std::default::Default for Service {
27001        fn default() -> Self {
27002            use std::convert::From;
27003            Self::from(0)
27004        }
27005    }
27006
27007    impl std::fmt::Display for Service {
27008        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27009            wkt::internal::display_enum(f, self.name(), self.value())
27010        }
27011    }
27012
27013    impl std::convert::From<i32> for Service {
27014        fn from(value: i32) -> Self {
27015            match value {
27016                0 => Self::Unspecified,
27017                1 => Self::Dataproc,
27018                _ => Self::UnknownValue(service::UnknownValue(
27019                    wkt::internal::UnknownEnumValue::Integer(value),
27020                )),
27021            }
27022        }
27023    }
27024
27025    impl std::convert::From<&str> for Service {
27026        fn from(value: &str) -> Self {
27027            use std::string::ToString;
27028            match value {
27029                "SERVICE_UNSPECIFIED" => Self::Unspecified,
27030                "DATAPROC" => Self::Dataproc,
27031                _ => Self::UnknownValue(service::UnknownValue(
27032                    wkt::internal::UnknownEnumValue::String(value.to_string()),
27033                )),
27034            }
27035        }
27036    }
27037
27038    impl serde::ser::Serialize for Service {
27039        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27040        where
27041            S: serde::Serializer,
27042        {
27043            match self {
27044                Self::Unspecified => serializer.serialize_i32(0),
27045                Self::Dataproc => serializer.serialize_i32(1),
27046                Self::UnknownValue(u) => u.0.serialize(serializer),
27047            }
27048        }
27049    }
27050
27051    impl<'de> serde::de::Deserialize<'de> for Service {
27052        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27053        where
27054            D: serde::Deserializer<'de>,
27055        {
27056            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Service>::new(
27057                ".google.cloud.dataplex.v1.JobEvent.Service",
27058            ))
27059        }
27060    }
27061
27062    /// Job Execution trigger.
27063    ///
27064    /// # Working with unknown values
27065    ///
27066    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
27067    /// additional enum variants at any time. Adding new variants is not considered
27068    /// a breaking change. Applications should write their code in anticipation of:
27069    ///
27070    /// - New values appearing in future releases of the client library, **and**
27071    /// - New values received dynamically, without application changes.
27072    ///
27073    /// Please consult the [Working with enums] section in the user guide for some
27074    /// guidelines.
27075    ///
27076    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
27077    #[derive(Clone, Debug, PartialEq)]
27078    #[non_exhaustive]
27079    pub enum ExecutionTrigger {
27080        /// The job execution trigger is unspecified.
27081        Unspecified,
27082        /// The job was triggered by Dataplex Universal Catalog based on trigger spec
27083        /// from task definition.
27084        TaskConfig,
27085        /// The job was triggered by the explicit call of Task API.
27086        RunRequest,
27087        /// If set, the enum was initialized with an unknown value.
27088        ///
27089        /// Applications can examine the value using [ExecutionTrigger::value] or
27090        /// [ExecutionTrigger::name].
27091        UnknownValue(execution_trigger::UnknownValue),
27092    }
27093
27094    #[doc(hidden)]
27095    pub mod execution_trigger {
27096        #[allow(unused_imports)]
27097        use super::*;
27098        #[derive(Clone, Debug, PartialEq)]
27099        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27100    }
27101
27102    impl ExecutionTrigger {
27103        /// Gets the enum value.
27104        ///
27105        /// Returns `None` if the enum contains an unknown value deserialized from
27106        /// the string representation of enums.
27107        pub fn value(&self) -> std::option::Option<i32> {
27108            match self {
27109                Self::Unspecified => std::option::Option::Some(0),
27110                Self::TaskConfig => std::option::Option::Some(1),
27111                Self::RunRequest => std::option::Option::Some(2),
27112                Self::UnknownValue(u) => u.0.value(),
27113            }
27114        }
27115
27116        /// Gets the enum value as a string.
27117        ///
27118        /// Returns `None` if the enum contains an unknown value deserialized from
27119        /// the integer representation of enums.
27120        pub fn name(&self) -> std::option::Option<&str> {
27121            match self {
27122                Self::Unspecified => std::option::Option::Some("EXECUTION_TRIGGER_UNSPECIFIED"),
27123                Self::TaskConfig => std::option::Option::Some("TASK_CONFIG"),
27124                Self::RunRequest => std::option::Option::Some("RUN_REQUEST"),
27125                Self::UnknownValue(u) => u.0.name(),
27126            }
27127        }
27128    }
27129
27130    impl std::default::Default for ExecutionTrigger {
27131        fn default() -> Self {
27132            use std::convert::From;
27133            Self::from(0)
27134        }
27135    }
27136
27137    impl std::fmt::Display for ExecutionTrigger {
27138        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27139            wkt::internal::display_enum(f, self.name(), self.value())
27140        }
27141    }
27142
27143    impl std::convert::From<i32> for ExecutionTrigger {
27144        fn from(value: i32) -> Self {
27145            match value {
27146                0 => Self::Unspecified,
27147                1 => Self::TaskConfig,
27148                2 => Self::RunRequest,
27149                _ => Self::UnknownValue(execution_trigger::UnknownValue(
27150                    wkt::internal::UnknownEnumValue::Integer(value),
27151                )),
27152            }
27153        }
27154    }
27155
27156    impl std::convert::From<&str> for ExecutionTrigger {
27157        fn from(value: &str) -> Self {
27158            use std::string::ToString;
27159            match value {
27160                "EXECUTION_TRIGGER_UNSPECIFIED" => Self::Unspecified,
27161                "TASK_CONFIG" => Self::TaskConfig,
27162                "RUN_REQUEST" => Self::RunRequest,
27163                _ => Self::UnknownValue(execution_trigger::UnknownValue(
27164                    wkt::internal::UnknownEnumValue::String(value.to_string()),
27165                )),
27166            }
27167        }
27168    }
27169
27170    impl serde::ser::Serialize for ExecutionTrigger {
27171        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27172        where
27173            S: serde::Serializer,
27174        {
27175            match self {
27176                Self::Unspecified => serializer.serialize_i32(0),
27177                Self::TaskConfig => serializer.serialize_i32(1),
27178                Self::RunRequest => serializer.serialize_i32(2),
27179                Self::UnknownValue(u) => u.0.serialize(serializer),
27180            }
27181        }
27182    }
27183
27184    impl<'de> serde::de::Deserialize<'de> for ExecutionTrigger {
27185        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27186        where
27187            D: serde::Deserializer<'de>,
27188        {
27189            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ExecutionTrigger>::new(
27190                ".google.cloud.dataplex.v1.JobEvent.ExecutionTrigger",
27191            ))
27192        }
27193    }
27194}
27195
27196/// These messages contain information about sessions within an environment.
27197/// The monitored resource is 'Environment'.
27198#[derive(Clone, Default, PartialEq)]
27199#[non_exhaustive]
27200pub struct SessionEvent {
27201    /// The log message.
27202    pub message: std::string::String,
27203
27204    /// The information about the user that created the session. It will be the
27205    /// email address of the user.
27206    pub user_id: std::string::String,
27207
27208    /// Unique identifier for the session.
27209    pub session_id: std::string::String,
27210
27211    /// The type of the event.
27212    pub r#type: crate::model::session_event::EventType,
27213
27214    /// The status of the event.
27215    pub event_succeeded: bool,
27216
27217    /// If the session is associated with an environment with fast startup enabled,
27218    /// and was created before being assigned to a user.
27219    pub fast_startup_enabled: bool,
27220
27221    /// The idle duration of a warm pooled session before it is assigned to user.
27222    pub unassigned_duration: std::option::Option<wkt::Duration>,
27223
27224    /// Additional information about the Query metadata.
27225    pub detail: std::option::Option<crate::model::session_event::Detail>,
27226
27227    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27228}
27229
27230impl SessionEvent {
27231    pub fn new() -> Self {
27232        std::default::Default::default()
27233    }
27234
27235    /// Sets the value of [message][crate::model::SessionEvent::message].
27236    ///
27237    /// # Example
27238    /// ```ignore,no_run
27239    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27240    /// let x = SessionEvent::new().set_message("example");
27241    /// ```
27242    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27243        self.message = v.into();
27244        self
27245    }
27246
27247    /// Sets the value of [user_id][crate::model::SessionEvent::user_id].
27248    ///
27249    /// # Example
27250    /// ```ignore,no_run
27251    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27252    /// let x = SessionEvent::new().set_user_id("example");
27253    /// ```
27254    pub fn set_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27255        self.user_id = v.into();
27256        self
27257    }
27258
27259    /// Sets the value of [session_id][crate::model::SessionEvent::session_id].
27260    ///
27261    /// # Example
27262    /// ```ignore,no_run
27263    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27264    /// let x = SessionEvent::new().set_session_id("example");
27265    /// ```
27266    pub fn set_session_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27267        self.session_id = v.into();
27268        self
27269    }
27270
27271    /// Sets the value of [r#type][crate::model::SessionEvent::type].
27272    ///
27273    /// # Example
27274    /// ```ignore,no_run
27275    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27276    /// use google_cloud_dataplex_v1::model::session_event::EventType;
27277    /// let x0 = SessionEvent::new().set_type(EventType::Start);
27278    /// let x1 = SessionEvent::new().set_type(EventType::Stop);
27279    /// let x2 = SessionEvent::new().set_type(EventType::Query);
27280    /// ```
27281    pub fn set_type<T: std::convert::Into<crate::model::session_event::EventType>>(
27282        mut self,
27283        v: T,
27284    ) -> Self {
27285        self.r#type = v.into();
27286        self
27287    }
27288
27289    /// Sets the value of [event_succeeded][crate::model::SessionEvent::event_succeeded].
27290    ///
27291    /// # Example
27292    /// ```ignore,no_run
27293    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27294    /// let x = SessionEvent::new().set_event_succeeded(true);
27295    /// ```
27296    pub fn set_event_succeeded<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
27297        self.event_succeeded = v.into();
27298        self
27299    }
27300
27301    /// Sets the value of [fast_startup_enabled][crate::model::SessionEvent::fast_startup_enabled].
27302    ///
27303    /// # Example
27304    /// ```ignore,no_run
27305    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27306    /// let x = SessionEvent::new().set_fast_startup_enabled(true);
27307    /// ```
27308    pub fn set_fast_startup_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
27309        self.fast_startup_enabled = v.into();
27310        self
27311    }
27312
27313    /// Sets the value of [unassigned_duration][crate::model::SessionEvent::unassigned_duration].
27314    ///
27315    /// # Example
27316    /// ```ignore,no_run
27317    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27318    /// use wkt::Duration;
27319    /// let x = SessionEvent::new().set_unassigned_duration(Duration::default()/* use setters */);
27320    /// ```
27321    pub fn set_unassigned_duration<T>(mut self, v: T) -> Self
27322    where
27323        T: std::convert::Into<wkt::Duration>,
27324    {
27325        self.unassigned_duration = std::option::Option::Some(v.into());
27326        self
27327    }
27328
27329    /// Sets or clears the value of [unassigned_duration][crate::model::SessionEvent::unassigned_duration].
27330    ///
27331    /// # Example
27332    /// ```ignore,no_run
27333    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27334    /// use wkt::Duration;
27335    /// let x = SessionEvent::new().set_or_clear_unassigned_duration(Some(Duration::default()/* use setters */));
27336    /// let x = SessionEvent::new().set_or_clear_unassigned_duration(None::<Duration>);
27337    /// ```
27338    pub fn set_or_clear_unassigned_duration<T>(mut self, v: std::option::Option<T>) -> Self
27339    where
27340        T: std::convert::Into<wkt::Duration>,
27341    {
27342        self.unassigned_duration = v.map(|x| x.into());
27343        self
27344    }
27345
27346    /// Sets the value of [detail][crate::model::SessionEvent::detail].
27347    ///
27348    /// Note that all the setters affecting `detail` are mutually
27349    /// exclusive.
27350    ///
27351    /// # Example
27352    /// ```ignore,no_run
27353    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27354    /// use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27355    /// let x = SessionEvent::new().set_detail(Some(
27356    ///     google_cloud_dataplex_v1::model::session_event::Detail::Query(QueryDetail::default().into())));
27357    /// ```
27358    pub fn set_detail<
27359        T: std::convert::Into<std::option::Option<crate::model::session_event::Detail>>,
27360    >(
27361        mut self,
27362        v: T,
27363    ) -> Self {
27364        self.detail = v.into();
27365        self
27366    }
27367
27368    /// The value of [detail][crate::model::SessionEvent::detail]
27369    /// if it holds a `Query`, `None` if the field is not set or
27370    /// holds a different branch.
27371    pub fn query(
27372        &self,
27373    ) -> std::option::Option<&std::boxed::Box<crate::model::session_event::QueryDetail>> {
27374        #[allow(unreachable_patterns)]
27375        self.detail.as_ref().and_then(|v| match v {
27376            crate::model::session_event::Detail::Query(v) => std::option::Option::Some(v),
27377            _ => std::option::Option::None,
27378        })
27379    }
27380
27381    /// Sets the value of [detail][crate::model::SessionEvent::detail]
27382    /// to hold a `Query`.
27383    ///
27384    /// Note that all the setters affecting `detail` are
27385    /// mutually exclusive.
27386    ///
27387    /// # Example
27388    /// ```ignore,no_run
27389    /// # use google_cloud_dataplex_v1::model::SessionEvent;
27390    /// use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27391    /// let x = SessionEvent::new().set_query(QueryDetail::default()/* use setters */);
27392    /// assert!(x.query().is_some());
27393    /// ```
27394    pub fn set_query<
27395        T: std::convert::Into<std::boxed::Box<crate::model::session_event::QueryDetail>>,
27396    >(
27397        mut self,
27398        v: T,
27399    ) -> Self {
27400        self.detail =
27401            std::option::Option::Some(crate::model::session_event::Detail::Query(v.into()));
27402        self
27403    }
27404}
27405
27406impl wkt::message::Message for SessionEvent {
27407    fn typename() -> &'static str {
27408        "type.googleapis.com/google.cloud.dataplex.v1.SessionEvent"
27409    }
27410}
27411
27412/// Defines additional types related to [SessionEvent].
27413pub mod session_event {
27414    #[allow(unused_imports)]
27415    use super::*;
27416
27417    /// Execution details of the query.
27418    #[derive(Clone, Default, PartialEq)]
27419    #[non_exhaustive]
27420    pub struct QueryDetail {
27421        /// The unique Query id identifying the query.
27422        pub query_id: std::string::String,
27423
27424        /// The query text executed.
27425        pub query_text: std::string::String,
27426
27427        /// Query Execution engine.
27428        pub engine: crate::model::session_event::query_detail::Engine,
27429
27430        /// Time taken for execution of the query.
27431        pub duration: std::option::Option<wkt::Duration>,
27432
27433        /// The size of results the query produced.
27434        pub result_size_bytes: i64,
27435
27436        /// The data processed by the query.
27437        pub data_processed_bytes: i64,
27438
27439        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27440    }
27441
27442    impl QueryDetail {
27443        pub fn new() -> Self {
27444            std::default::Default::default()
27445        }
27446
27447        /// Sets the value of [query_id][crate::model::session_event::QueryDetail::query_id].
27448        ///
27449        /// # Example
27450        /// ```ignore,no_run
27451        /// # use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27452        /// let x = QueryDetail::new().set_query_id("example");
27453        /// ```
27454        pub fn set_query_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27455            self.query_id = v.into();
27456            self
27457        }
27458
27459        /// Sets the value of [query_text][crate::model::session_event::QueryDetail::query_text].
27460        ///
27461        /// # Example
27462        /// ```ignore,no_run
27463        /// # use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27464        /// let x = QueryDetail::new().set_query_text("example");
27465        /// ```
27466        pub fn set_query_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27467            self.query_text = v.into();
27468            self
27469        }
27470
27471        /// Sets the value of [engine][crate::model::session_event::QueryDetail::engine].
27472        ///
27473        /// # Example
27474        /// ```ignore,no_run
27475        /// # use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27476        /// use google_cloud_dataplex_v1::model::session_event::query_detail::Engine;
27477        /// let x0 = QueryDetail::new().set_engine(Engine::SparkSql);
27478        /// let x1 = QueryDetail::new().set_engine(Engine::Bigquery);
27479        /// ```
27480        pub fn set_engine<
27481            T: std::convert::Into<crate::model::session_event::query_detail::Engine>,
27482        >(
27483            mut self,
27484            v: T,
27485        ) -> Self {
27486            self.engine = v.into();
27487            self
27488        }
27489
27490        /// Sets the value of [duration][crate::model::session_event::QueryDetail::duration].
27491        ///
27492        /// # Example
27493        /// ```ignore,no_run
27494        /// # use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27495        /// use wkt::Duration;
27496        /// let x = QueryDetail::new().set_duration(Duration::default()/* use setters */);
27497        /// ```
27498        pub fn set_duration<T>(mut self, v: T) -> Self
27499        where
27500            T: std::convert::Into<wkt::Duration>,
27501        {
27502            self.duration = std::option::Option::Some(v.into());
27503            self
27504        }
27505
27506        /// Sets or clears the value of [duration][crate::model::session_event::QueryDetail::duration].
27507        ///
27508        /// # Example
27509        /// ```ignore,no_run
27510        /// # use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27511        /// use wkt::Duration;
27512        /// let x = QueryDetail::new().set_or_clear_duration(Some(Duration::default()/* use setters */));
27513        /// let x = QueryDetail::new().set_or_clear_duration(None::<Duration>);
27514        /// ```
27515        pub fn set_or_clear_duration<T>(mut self, v: std::option::Option<T>) -> Self
27516        where
27517            T: std::convert::Into<wkt::Duration>,
27518        {
27519            self.duration = v.map(|x| x.into());
27520            self
27521        }
27522
27523        /// Sets the value of [result_size_bytes][crate::model::session_event::QueryDetail::result_size_bytes].
27524        ///
27525        /// # Example
27526        /// ```ignore,no_run
27527        /// # use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27528        /// let x = QueryDetail::new().set_result_size_bytes(42);
27529        /// ```
27530        pub fn set_result_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
27531            self.result_size_bytes = v.into();
27532            self
27533        }
27534
27535        /// Sets the value of [data_processed_bytes][crate::model::session_event::QueryDetail::data_processed_bytes].
27536        ///
27537        /// # Example
27538        /// ```ignore,no_run
27539        /// # use google_cloud_dataplex_v1::model::session_event::QueryDetail;
27540        /// let x = QueryDetail::new().set_data_processed_bytes(42);
27541        /// ```
27542        pub fn set_data_processed_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
27543            self.data_processed_bytes = v.into();
27544            self
27545        }
27546    }
27547
27548    impl wkt::message::Message for QueryDetail {
27549        fn typename() -> &'static str {
27550            "type.googleapis.com/google.cloud.dataplex.v1.SessionEvent.QueryDetail"
27551        }
27552    }
27553
27554    /// Defines additional types related to [QueryDetail].
27555    pub mod query_detail {
27556        #[allow(unused_imports)]
27557        use super::*;
27558
27559        /// Query Execution engine.
27560        ///
27561        /// # Working with unknown values
27562        ///
27563        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
27564        /// additional enum variants at any time. Adding new variants is not considered
27565        /// a breaking change. Applications should write their code in anticipation of:
27566        ///
27567        /// - New values appearing in future releases of the client library, **and**
27568        /// - New values received dynamically, without application changes.
27569        ///
27570        /// Please consult the [Working with enums] section in the user guide for some
27571        /// guidelines.
27572        ///
27573        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
27574        #[derive(Clone, Debug, PartialEq)]
27575        #[non_exhaustive]
27576        pub enum Engine {
27577            /// An unspecified Engine type.
27578            Unspecified,
27579            /// Spark-sql engine is specified in Query.
27580            SparkSql,
27581            /// BigQuery engine is specified in Query.
27582            Bigquery,
27583            /// If set, the enum was initialized with an unknown value.
27584            ///
27585            /// Applications can examine the value using [Engine::value] or
27586            /// [Engine::name].
27587            UnknownValue(engine::UnknownValue),
27588        }
27589
27590        #[doc(hidden)]
27591        pub mod engine {
27592            #[allow(unused_imports)]
27593            use super::*;
27594            #[derive(Clone, Debug, PartialEq)]
27595            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27596        }
27597
27598        impl Engine {
27599            /// Gets the enum value.
27600            ///
27601            /// Returns `None` if the enum contains an unknown value deserialized from
27602            /// the string representation of enums.
27603            pub fn value(&self) -> std::option::Option<i32> {
27604                match self {
27605                    Self::Unspecified => std::option::Option::Some(0),
27606                    Self::SparkSql => std::option::Option::Some(1),
27607                    Self::Bigquery => std::option::Option::Some(2),
27608                    Self::UnknownValue(u) => u.0.value(),
27609                }
27610            }
27611
27612            /// Gets the enum value as a string.
27613            ///
27614            /// Returns `None` if the enum contains an unknown value deserialized from
27615            /// the integer representation of enums.
27616            pub fn name(&self) -> std::option::Option<&str> {
27617                match self {
27618                    Self::Unspecified => std::option::Option::Some("ENGINE_UNSPECIFIED"),
27619                    Self::SparkSql => std::option::Option::Some("SPARK_SQL"),
27620                    Self::Bigquery => std::option::Option::Some("BIGQUERY"),
27621                    Self::UnknownValue(u) => u.0.name(),
27622                }
27623            }
27624        }
27625
27626        impl std::default::Default for Engine {
27627            fn default() -> Self {
27628                use std::convert::From;
27629                Self::from(0)
27630            }
27631        }
27632
27633        impl std::fmt::Display for Engine {
27634            fn fmt(
27635                &self,
27636                f: &mut std::fmt::Formatter<'_>,
27637            ) -> std::result::Result<(), std::fmt::Error> {
27638                wkt::internal::display_enum(f, self.name(), self.value())
27639            }
27640        }
27641
27642        impl std::convert::From<i32> for Engine {
27643            fn from(value: i32) -> Self {
27644                match value {
27645                    0 => Self::Unspecified,
27646                    1 => Self::SparkSql,
27647                    2 => Self::Bigquery,
27648                    _ => Self::UnknownValue(engine::UnknownValue(
27649                        wkt::internal::UnknownEnumValue::Integer(value),
27650                    )),
27651                }
27652            }
27653        }
27654
27655        impl std::convert::From<&str> for Engine {
27656            fn from(value: &str) -> Self {
27657                use std::string::ToString;
27658                match value {
27659                    "ENGINE_UNSPECIFIED" => Self::Unspecified,
27660                    "SPARK_SQL" => Self::SparkSql,
27661                    "BIGQUERY" => Self::Bigquery,
27662                    _ => Self::UnknownValue(engine::UnknownValue(
27663                        wkt::internal::UnknownEnumValue::String(value.to_string()),
27664                    )),
27665                }
27666            }
27667        }
27668
27669        impl serde::ser::Serialize for Engine {
27670            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27671            where
27672                S: serde::Serializer,
27673            {
27674                match self {
27675                    Self::Unspecified => serializer.serialize_i32(0),
27676                    Self::SparkSql => serializer.serialize_i32(1),
27677                    Self::Bigquery => serializer.serialize_i32(2),
27678                    Self::UnknownValue(u) => u.0.serialize(serializer),
27679                }
27680            }
27681        }
27682
27683        impl<'de> serde::de::Deserialize<'de> for Engine {
27684            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27685            where
27686                D: serde::Deserializer<'de>,
27687            {
27688                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Engine>::new(
27689                    ".google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine",
27690                ))
27691            }
27692        }
27693    }
27694
27695    /// The type of the event.
27696    ///
27697    /// # Working with unknown values
27698    ///
27699    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
27700    /// additional enum variants at any time. Adding new variants is not considered
27701    /// a breaking change. Applications should write their code in anticipation of:
27702    ///
27703    /// - New values appearing in future releases of the client library, **and**
27704    /// - New values received dynamically, without application changes.
27705    ///
27706    /// Please consult the [Working with enums] section in the user guide for some
27707    /// guidelines.
27708    ///
27709    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
27710    #[derive(Clone, Debug, PartialEq)]
27711    #[non_exhaustive]
27712    pub enum EventType {
27713        /// An unspecified event type.
27714        Unspecified,
27715        /// Event when the session is assigned to a user.
27716        Start,
27717        /// Event for stop of a session.
27718        Stop,
27719        /// Query events in the session.
27720        Query,
27721        /// Event for creation of a cluster. It is not yet assigned to a user.
27722        /// This comes before START in the sequence
27723        Create,
27724        /// If set, the enum was initialized with an unknown value.
27725        ///
27726        /// Applications can examine the value using [EventType::value] or
27727        /// [EventType::name].
27728        UnknownValue(event_type::UnknownValue),
27729    }
27730
27731    #[doc(hidden)]
27732    pub mod event_type {
27733        #[allow(unused_imports)]
27734        use super::*;
27735        #[derive(Clone, Debug, PartialEq)]
27736        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27737    }
27738
27739    impl EventType {
27740        /// Gets the enum value.
27741        ///
27742        /// Returns `None` if the enum contains an unknown value deserialized from
27743        /// the string representation of enums.
27744        pub fn value(&self) -> std::option::Option<i32> {
27745            match self {
27746                Self::Unspecified => std::option::Option::Some(0),
27747                Self::Start => std::option::Option::Some(1),
27748                Self::Stop => std::option::Option::Some(2),
27749                Self::Query => std::option::Option::Some(3),
27750                Self::Create => std::option::Option::Some(4),
27751                Self::UnknownValue(u) => u.0.value(),
27752            }
27753        }
27754
27755        /// Gets the enum value as a string.
27756        ///
27757        /// Returns `None` if the enum contains an unknown value deserialized from
27758        /// the integer representation of enums.
27759        pub fn name(&self) -> std::option::Option<&str> {
27760            match self {
27761                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
27762                Self::Start => std::option::Option::Some("START"),
27763                Self::Stop => std::option::Option::Some("STOP"),
27764                Self::Query => std::option::Option::Some("QUERY"),
27765                Self::Create => std::option::Option::Some("CREATE"),
27766                Self::UnknownValue(u) => u.0.name(),
27767            }
27768        }
27769    }
27770
27771    impl std::default::Default for EventType {
27772        fn default() -> Self {
27773            use std::convert::From;
27774            Self::from(0)
27775        }
27776    }
27777
27778    impl std::fmt::Display for EventType {
27779        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
27780            wkt::internal::display_enum(f, self.name(), self.value())
27781        }
27782    }
27783
27784    impl std::convert::From<i32> for EventType {
27785        fn from(value: i32) -> Self {
27786            match value {
27787                0 => Self::Unspecified,
27788                1 => Self::Start,
27789                2 => Self::Stop,
27790                3 => Self::Query,
27791                4 => Self::Create,
27792                _ => Self::UnknownValue(event_type::UnknownValue(
27793                    wkt::internal::UnknownEnumValue::Integer(value),
27794                )),
27795            }
27796        }
27797    }
27798
27799    impl std::convert::From<&str> for EventType {
27800        fn from(value: &str) -> Self {
27801            use std::string::ToString;
27802            match value {
27803                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
27804                "START" => Self::Start,
27805                "STOP" => Self::Stop,
27806                "QUERY" => Self::Query,
27807                "CREATE" => Self::Create,
27808                _ => Self::UnknownValue(event_type::UnknownValue(
27809                    wkt::internal::UnknownEnumValue::String(value.to_string()),
27810                )),
27811            }
27812        }
27813    }
27814
27815    impl serde::ser::Serialize for EventType {
27816        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27817        where
27818            S: serde::Serializer,
27819        {
27820            match self {
27821                Self::Unspecified => serializer.serialize_i32(0),
27822                Self::Start => serializer.serialize_i32(1),
27823                Self::Stop => serializer.serialize_i32(2),
27824                Self::Query => serializer.serialize_i32(3),
27825                Self::Create => serializer.serialize_i32(4),
27826                Self::UnknownValue(u) => u.0.serialize(serializer),
27827            }
27828        }
27829    }
27830
27831    impl<'de> serde::de::Deserialize<'de> for EventType {
27832        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27833        where
27834            D: serde::Deserializer<'de>,
27835        {
27836            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
27837                ".google.cloud.dataplex.v1.SessionEvent.EventType",
27838            ))
27839        }
27840    }
27841
27842    /// Additional information about the Query metadata.
27843    #[derive(Clone, Debug, PartialEq)]
27844    #[non_exhaustive]
27845    pub enum Detail {
27846        /// The execution details of the query.
27847        Query(std::boxed::Box<crate::model::session_event::QueryDetail>),
27848    }
27849}
27850
27851/// Payload associated with Governance related log events.
27852#[derive(Clone, Default, PartialEq)]
27853#[non_exhaustive]
27854pub struct GovernanceEvent {
27855    /// The log message.
27856    pub message: std::string::String,
27857
27858    /// The type of the event.
27859    pub event_type: crate::model::governance_event::EventType,
27860
27861    /// Entity resource information if the log event is associated with a
27862    /// specific entity.
27863    pub entity: std::option::Option<crate::model::governance_event::Entity>,
27864
27865    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27866}
27867
27868impl GovernanceEvent {
27869    pub fn new() -> Self {
27870        std::default::Default::default()
27871    }
27872
27873    /// Sets the value of [message][crate::model::GovernanceEvent::message].
27874    ///
27875    /// # Example
27876    /// ```ignore,no_run
27877    /// # use google_cloud_dataplex_v1::model::GovernanceEvent;
27878    /// let x = GovernanceEvent::new().set_message("example");
27879    /// ```
27880    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27881        self.message = v.into();
27882        self
27883    }
27884
27885    /// Sets the value of [event_type][crate::model::GovernanceEvent::event_type].
27886    ///
27887    /// # Example
27888    /// ```ignore,no_run
27889    /// # use google_cloud_dataplex_v1::model::GovernanceEvent;
27890    /// use google_cloud_dataplex_v1::model::governance_event::EventType;
27891    /// let x0 = GovernanceEvent::new().set_event_type(EventType::ResourceIamPolicyUpdate);
27892    /// let x1 = GovernanceEvent::new().set_event_type(EventType::BigqueryTableCreate);
27893    /// let x2 = GovernanceEvent::new().set_event_type(EventType::BigqueryTableUpdate);
27894    /// ```
27895    pub fn set_event_type<T: std::convert::Into<crate::model::governance_event::EventType>>(
27896        mut self,
27897        v: T,
27898    ) -> Self {
27899        self.event_type = v.into();
27900        self
27901    }
27902
27903    /// Sets the value of [entity][crate::model::GovernanceEvent::entity].
27904    ///
27905    /// # Example
27906    /// ```ignore,no_run
27907    /// # use google_cloud_dataplex_v1::model::GovernanceEvent;
27908    /// use google_cloud_dataplex_v1::model::governance_event::Entity;
27909    /// let x = GovernanceEvent::new().set_entity(Entity::default()/* use setters */);
27910    /// ```
27911    pub fn set_entity<T>(mut self, v: T) -> Self
27912    where
27913        T: std::convert::Into<crate::model::governance_event::Entity>,
27914    {
27915        self.entity = std::option::Option::Some(v.into());
27916        self
27917    }
27918
27919    /// Sets or clears the value of [entity][crate::model::GovernanceEvent::entity].
27920    ///
27921    /// # Example
27922    /// ```ignore,no_run
27923    /// # use google_cloud_dataplex_v1::model::GovernanceEvent;
27924    /// use google_cloud_dataplex_v1::model::governance_event::Entity;
27925    /// let x = GovernanceEvent::new().set_or_clear_entity(Some(Entity::default()/* use setters */));
27926    /// let x = GovernanceEvent::new().set_or_clear_entity(None::<Entity>);
27927    /// ```
27928    pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
27929    where
27930        T: std::convert::Into<crate::model::governance_event::Entity>,
27931    {
27932        self.entity = v.map(|x| x.into());
27933        self
27934    }
27935}
27936
27937impl wkt::message::Message for GovernanceEvent {
27938    fn typename() -> &'static str {
27939        "type.googleapis.com/google.cloud.dataplex.v1.GovernanceEvent"
27940    }
27941}
27942
27943/// Defines additional types related to [GovernanceEvent].
27944pub mod governance_event {
27945    #[allow(unused_imports)]
27946    use super::*;
27947
27948    /// Information about Entity resource that the log event is associated with.
27949    #[derive(Clone, Default, PartialEq)]
27950    #[non_exhaustive]
27951    pub struct Entity {
27952        /// The Entity resource the log event is associated with.
27953        /// Format:
27954        /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`
27955        pub entity: std::string::String,
27956
27957        /// Type of entity.
27958        pub entity_type: crate::model::governance_event::entity::EntityType,
27959
27960        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27961    }
27962
27963    impl Entity {
27964        pub fn new() -> Self {
27965            std::default::Default::default()
27966        }
27967
27968        /// Sets the value of [entity][crate::model::governance_event::Entity::entity].
27969        ///
27970        /// # Example
27971        /// ```ignore,no_run
27972        /// # use google_cloud_dataplex_v1::model::governance_event::Entity;
27973        /// let x = Entity::new().set_entity("example");
27974        /// ```
27975        pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27976            self.entity = v.into();
27977            self
27978        }
27979
27980        /// Sets the value of [entity_type][crate::model::governance_event::Entity::entity_type].
27981        ///
27982        /// # Example
27983        /// ```ignore,no_run
27984        /// # use google_cloud_dataplex_v1::model::governance_event::Entity;
27985        /// use google_cloud_dataplex_v1::model::governance_event::entity::EntityType;
27986        /// let x0 = Entity::new().set_entity_type(EntityType::Table);
27987        /// let x1 = Entity::new().set_entity_type(EntityType::Fileset);
27988        /// ```
27989        pub fn set_entity_type<
27990            T: std::convert::Into<crate::model::governance_event::entity::EntityType>,
27991        >(
27992            mut self,
27993            v: T,
27994        ) -> Self {
27995            self.entity_type = v.into();
27996            self
27997        }
27998    }
27999
28000    impl wkt::message::Message for Entity {
28001        fn typename() -> &'static str {
28002            "type.googleapis.com/google.cloud.dataplex.v1.GovernanceEvent.Entity"
28003        }
28004    }
28005
28006    /// Defines additional types related to [Entity].
28007    pub mod entity {
28008        #[allow(unused_imports)]
28009        use super::*;
28010
28011        /// Type of entity.
28012        ///
28013        /// # Working with unknown values
28014        ///
28015        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28016        /// additional enum variants at any time. Adding new variants is not considered
28017        /// a breaking change. Applications should write their code in anticipation of:
28018        ///
28019        /// - New values appearing in future releases of the client library, **and**
28020        /// - New values received dynamically, without application changes.
28021        ///
28022        /// Please consult the [Working with enums] section in the user guide for some
28023        /// guidelines.
28024        ///
28025        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28026        #[derive(Clone, Debug, PartialEq)]
28027        #[non_exhaustive]
28028        pub enum EntityType {
28029            /// An unspecified Entity type.
28030            Unspecified,
28031            /// Table entity type.
28032            Table,
28033            /// Fileset entity type.
28034            Fileset,
28035            /// If set, the enum was initialized with an unknown value.
28036            ///
28037            /// Applications can examine the value using [EntityType::value] or
28038            /// [EntityType::name].
28039            UnknownValue(entity_type::UnknownValue),
28040        }
28041
28042        #[doc(hidden)]
28043        pub mod entity_type {
28044            #[allow(unused_imports)]
28045            use super::*;
28046            #[derive(Clone, Debug, PartialEq)]
28047            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28048        }
28049
28050        impl EntityType {
28051            /// Gets the enum value.
28052            ///
28053            /// Returns `None` if the enum contains an unknown value deserialized from
28054            /// the string representation of enums.
28055            pub fn value(&self) -> std::option::Option<i32> {
28056                match self {
28057                    Self::Unspecified => std::option::Option::Some(0),
28058                    Self::Table => std::option::Option::Some(1),
28059                    Self::Fileset => std::option::Option::Some(2),
28060                    Self::UnknownValue(u) => u.0.value(),
28061                }
28062            }
28063
28064            /// Gets the enum value as a string.
28065            ///
28066            /// Returns `None` if the enum contains an unknown value deserialized from
28067            /// the integer representation of enums.
28068            pub fn name(&self) -> std::option::Option<&str> {
28069                match self {
28070                    Self::Unspecified => std::option::Option::Some("ENTITY_TYPE_UNSPECIFIED"),
28071                    Self::Table => std::option::Option::Some("TABLE"),
28072                    Self::Fileset => std::option::Option::Some("FILESET"),
28073                    Self::UnknownValue(u) => u.0.name(),
28074                }
28075            }
28076        }
28077
28078        impl std::default::Default for EntityType {
28079            fn default() -> Self {
28080                use std::convert::From;
28081                Self::from(0)
28082            }
28083        }
28084
28085        impl std::fmt::Display for EntityType {
28086            fn fmt(
28087                &self,
28088                f: &mut std::fmt::Formatter<'_>,
28089            ) -> std::result::Result<(), std::fmt::Error> {
28090                wkt::internal::display_enum(f, self.name(), self.value())
28091            }
28092        }
28093
28094        impl std::convert::From<i32> for EntityType {
28095            fn from(value: i32) -> Self {
28096                match value {
28097                    0 => Self::Unspecified,
28098                    1 => Self::Table,
28099                    2 => Self::Fileset,
28100                    _ => Self::UnknownValue(entity_type::UnknownValue(
28101                        wkt::internal::UnknownEnumValue::Integer(value),
28102                    )),
28103                }
28104            }
28105        }
28106
28107        impl std::convert::From<&str> for EntityType {
28108            fn from(value: &str) -> Self {
28109                use std::string::ToString;
28110                match value {
28111                    "ENTITY_TYPE_UNSPECIFIED" => Self::Unspecified,
28112                    "TABLE" => Self::Table,
28113                    "FILESET" => Self::Fileset,
28114                    _ => Self::UnknownValue(entity_type::UnknownValue(
28115                        wkt::internal::UnknownEnumValue::String(value.to_string()),
28116                    )),
28117                }
28118            }
28119        }
28120
28121        impl serde::ser::Serialize for EntityType {
28122            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28123            where
28124                S: serde::Serializer,
28125            {
28126                match self {
28127                    Self::Unspecified => serializer.serialize_i32(0),
28128                    Self::Table => serializer.serialize_i32(1),
28129                    Self::Fileset => serializer.serialize_i32(2),
28130                    Self::UnknownValue(u) => u.0.serialize(serializer),
28131                }
28132            }
28133        }
28134
28135        impl<'de> serde::de::Deserialize<'de> for EntityType {
28136            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28137            where
28138                D: serde::Deserializer<'de>,
28139            {
28140                deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityType>::new(
28141                    ".google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType",
28142                ))
28143            }
28144        }
28145    }
28146
28147    /// Type of governance log event.
28148    ///
28149    /// # Working with unknown values
28150    ///
28151    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28152    /// additional enum variants at any time. Adding new variants is not considered
28153    /// a breaking change. Applications should write their code in anticipation of:
28154    ///
28155    /// - New values appearing in future releases of the client library, **and**
28156    /// - New values received dynamically, without application changes.
28157    ///
28158    /// Please consult the [Working with enums] section in the user guide for some
28159    /// guidelines.
28160    ///
28161    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28162    #[derive(Clone, Debug, PartialEq)]
28163    #[non_exhaustive]
28164    pub enum EventType {
28165        /// An unspecified event type.
28166        Unspecified,
28167        /// Resource IAM policy update event.
28168        ResourceIamPolicyUpdate,
28169        /// BigQuery table create event.
28170        BigqueryTableCreate,
28171        /// BigQuery table update event.
28172        BigqueryTableUpdate,
28173        /// BigQuery table delete event.
28174        BigqueryTableDelete,
28175        /// BigQuery connection create event.
28176        BigqueryConnectionCreate,
28177        /// BigQuery connection update event.
28178        BigqueryConnectionUpdate,
28179        /// BigQuery connection delete event.
28180        BigqueryConnectionDelete,
28181        /// BigQuery taxonomy created.
28182        BigqueryTaxonomyCreate,
28183        /// BigQuery policy tag created.
28184        BigqueryPolicyTagCreate,
28185        /// BigQuery policy tag deleted.
28186        BigqueryPolicyTagDelete,
28187        /// BigQuery set iam policy for policy tag.
28188        BigqueryPolicyTagSetIamPolicy,
28189        /// Access policy update event.
28190        AccessPolicyUpdate,
28191        /// Number of resources matched with particular Query.
28192        GovernanceRuleMatchedResources,
28193        /// Rule processing exceeds the allowed limit.
28194        GovernanceRuleSearchLimitExceeds,
28195        /// Rule processing errors.
28196        GovernanceRuleErrors,
28197        /// Governance rule processing Event.
28198        GovernanceRuleProcessing,
28199        /// If set, the enum was initialized with an unknown value.
28200        ///
28201        /// Applications can examine the value using [EventType::value] or
28202        /// [EventType::name].
28203        UnknownValue(event_type::UnknownValue),
28204    }
28205
28206    #[doc(hidden)]
28207    pub mod event_type {
28208        #[allow(unused_imports)]
28209        use super::*;
28210        #[derive(Clone, Debug, PartialEq)]
28211        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28212    }
28213
28214    impl EventType {
28215        /// Gets the enum value.
28216        ///
28217        /// Returns `None` if the enum contains an unknown value deserialized from
28218        /// the string representation of enums.
28219        pub fn value(&self) -> std::option::Option<i32> {
28220            match self {
28221                Self::Unspecified => std::option::Option::Some(0),
28222                Self::ResourceIamPolicyUpdate => std::option::Option::Some(1),
28223                Self::BigqueryTableCreate => std::option::Option::Some(2),
28224                Self::BigqueryTableUpdate => std::option::Option::Some(3),
28225                Self::BigqueryTableDelete => std::option::Option::Some(4),
28226                Self::BigqueryConnectionCreate => std::option::Option::Some(5),
28227                Self::BigqueryConnectionUpdate => std::option::Option::Some(6),
28228                Self::BigqueryConnectionDelete => std::option::Option::Some(7),
28229                Self::BigqueryTaxonomyCreate => std::option::Option::Some(10),
28230                Self::BigqueryPolicyTagCreate => std::option::Option::Some(11),
28231                Self::BigqueryPolicyTagDelete => std::option::Option::Some(12),
28232                Self::BigqueryPolicyTagSetIamPolicy => std::option::Option::Some(13),
28233                Self::AccessPolicyUpdate => std::option::Option::Some(14),
28234                Self::GovernanceRuleMatchedResources => std::option::Option::Some(15),
28235                Self::GovernanceRuleSearchLimitExceeds => std::option::Option::Some(16),
28236                Self::GovernanceRuleErrors => std::option::Option::Some(17),
28237                Self::GovernanceRuleProcessing => std::option::Option::Some(18),
28238                Self::UnknownValue(u) => u.0.value(),
28239            }
28240        }
28241
28242        /// Gets the enum value as a string.
28243        ///
28244        /// Returns `None` if the enum contains an unknown value deserialized from
28245        /// the integer representation of enums.
28246        pub fn name(&self) -> std::option::Option<&str> {
28247            match self {
28248                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
28249                Self::ResourceIamPolicyUpdate => {
28250                    std::option::Option::Some("RESOURCE_IAM_POLICY_UPDATE")
28251                }
28252                Self::BigqueryTableCreate => std::option::Option::Some("BIGQUERY_TABLE_CREATE"),
28253                Self::BigqueryTableUpdate => std::option::Option::Some("BIGQUERY_TABLE_UPDATE"),
28254                Self::BigqueryTableDelete => std::option::Option::Some("BIGQUERY_TABLE_DELETE"),
28255                Self::BigqueryConnectionCreate => {
28256                    std::option::Option::Some("BIGQUERY_CONNECTION_CREATE")
28257                }
28258                Self::BigqueryConnectionUpdate => {
28259                    std::option::Option::Some("BIGQUERY_CONNECTION_UPDATE")
28260                }
28261                Self::BigqueryConnectionDelete => {
28262                    std::option::Option::Some("BIGQUERY_CONNECTION_DELETE")
28263                }
28264                Self::BigqueryTaxonomyCreate => {
28265                    std::option::Option::Some("BIGQUERY_TAXONOMY_CREATE")
28266                }
28267                Self::BigqueryPolicyTagCreate => {
28268                    std::option::Option::Some("BIGQUERY_POLICY_TAG_CREATE")
28269                }
28270                Self::BigqueryPolicyTagDelete => {
28271                    std::option::Option::Some("BIGQUERY_POLICY_TAG_DELETE")
28272                }
28273                Self::BigqueryPolicyTagSetIamPolicy => {
28274                    std::option::Option::Some("BIGQUERY_POLICY_TAG_SET_IAM_POLICY")
28275                }
28276                Self::AccessPolicyUpdate => std::option::Option::Some("ACCESS_POLICY_UPDATE"),
28277                Self::GovernanceRuleMatchedResources => {
28278                    std::option::Option::Some("GOVERNANCE_RULE_MATCHED_RESOURCES")
28279                }
28280                Self::GovernanceRuleSearchLimitExceeds => {
28281                    std::option::Option::Some("GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS")
28282                }
28283                Self::GovernanceRuleErrors => std::option::Option::Some("GOVERNANCE_RULE_ERRORS"),
28284                Self::GovernanceRuleProcessing => {
28285                    std::option::Option::Some("GOVERNANCE_RULE_PROCESSING")
28286                }
28287                Self::UnknownValue(u) => u.0.name(),
28288            }
28289        }
28290    }
28291
28292    impl std::default::Default for EventType {
28293        fn default() -> Self {
28294            use std::convert::From;
28295            Self::from(0)
28296        }
28297    }
28298
28299    impl std::fmt::Display for EventType {
28300        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28301            wkt::internal::display_enum(f, self.name(), self.value())
28302        }
28303    }
28304
28305    impl std::convert::From<i32> for EventType {
28306        fn from(value: i32) -> Self {
28307            match value {
28308                0 => Self::Unspecified,
28309                1 => Self::ResourceIamPolicyUpdate,
28310                2 => Self::BigqueryTableCreate,
28311                3 => Self::BigqueryTableUpdate,
28312                4 => Self::BigqueryTableDelete,
28313                5 => Self::BigqueryConnectionCreate,
28314                6 => Self::BigqueryConnectionUpdate,
28315                7 => Self::BigqueryConnectionDelete,
28316                10 => Self::BigqueryTaxonomyCreate,
28317                11 => Self::BigqueryPolicyTagCreate,
28318                12 => Self::BigqueryPolicyTagDelete,
28319                13 => Self::BigqueryPolicyTagSetIamPolicy,
28320                14 => Self::AccessPolicyUpdate,
28321                15 => Self::GovernanceRuleMatchedResources,
28322                16 => Self::GovernanceRuleSearchLimitExceeds,
28323                17 => Self::GovernanceRuleErrors,
28324                18 => Self::GovernanceRuleProcessing,
28325                _ => Self::UnknownValue(event_type::UnknownValue(
28326                    wkt::internal::UnknownEnumValue::Integer(value),
28327                )),
28328            }
28329        }
28330    }
28331
28332    impl std::convert::From<&str> for EventType {
28333        fn from(value: &str) -> Self {
28334            use std::string::ToString;
28335            match value {
28336                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
28337                "RESOURCE_IAM_POLICY_UPDATE" => Self::ResourceIamPolicyUpdate,
28338                "BIGQUERY_TABLE_CREATE" => Self::BigqueryTableCreate,
28339                "BIGQUERY_TABLE_UPDATE" => Self::BigqueryTableUpdate,
28340                "BIGQUERY_TABLE_DELETE" => Self::BigqueryTableDelete,
28341                "BIGQUERY_CONNECTION_CREATE" => Self::BigqueryConnectionCreate,
28342                "BIGQUERY_CONNECTION_UPDATE" => Self::BigqueryConnectionUpdate,
28343                "BIGQUERY_CONNECTION_DELETE" => Self::BigqueryConnectionDelete,
28344                "BIGQUERY_TAXONOMY_CREATE" => Self::BigqueryTaxonomyCreate,
28345                "BIGQUERY_POLICY_TAG_CREATE" => Self::BigqueryPolicyTagCreate,
28346                "BIGQUERY_POLICY_TAG_DELETE" => Self::BigqueryPolicyTagDelete,
28347                "BIGQUERY_POLICY_TAG_SET_IAM_POLICY" => Self::BigqueryPolicyTagSetIamPolicy,
28348                "ACCESS_POLICY_UPDATE" => Self::AccessPolicyUpdate,
28349                "GOVERNANCE_RULE_MATCHED_RESOURCES" => Self::GovernanceRuleMatchedResources,
28350                "GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS" => Self::GovernanceRuleSearchLimitExceeds,
28351                "GOVERNANCE_RULE_ERRORS" => Self::GovernanceRuleErrors,
28352                "GOVERNANCE_RULE_PROCESSING" => Self::GovernanceRuleProcessing,
28353                _ => Self::UnknownValue(event_type::UnknownValue(
28354                    wkt::internal::UnknownEnumValue::String(value.to_string()),
28355                )),
28356            }
28357        }
28358    }
28359
28360    impl serde::ser::Serialize for EventType {
28361        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28362        where
28363            S: serde::Serializer,
28364        {
28365            match self {
28366                Self::Unspecified => serializer.serialize_i32(0),
28367                Self::ResourceIamPolicyUpdate => serializer.serialize_i32(1),
28368                Self::BigqueryTableCreate => serializer.serialize_i32(2),
28369                Self::BigqueryTableUpdate => serializer.serialize_i32(3),
28370                Self::BigqueryTableDelete => serializer.serialize_i32(4),
28371                Self::BigqueryConnectionCreate => serializer.serialize_i32(5),
28372                Self::BigqueryConnectionUpdate => serializer.serialize_i32(6),
28373                Self::BigqueryConnectionDelete => serializer.serialize_i32(7),
28374                Self::BigqueryTaxonomyCreate => serializer.serialize_i32(10),
28375                Self::BigqueryPolicyTagCreate => serializer.serialize_i32(11),
28376                Self::BigqueryPolicyTagDelete => serializer.serialize_i32(12),
28377                Self::BigqueryPolicyTagSetIamPolicy => serializer.serialize_i32(13),
28378                Self::AccessPolicyUpdate => serializer.serialize_i32(14),
28379                Self::GovernanceRuleMatchedResources => serializer.serialize_i32(15),
28380                Self::GovernanceRuleSearchLimitExceeds => serializer.serialize_i32(16),
28381                Self::GovernanceRuleErrors => serializer.serialize_i32(17),
28382                Self::GovernanceRuleProcessing => serializer.serialize_i32(18),
28383                Self::UnknownValue(u) => u.0.serialize(serializer),
28384            }
28385        }
28386    }
28387
28388    impl<'de> serde::de::Deserialize<'de> for EventType {
28389        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28390        where
28391            D: serde::Deserializer<'de>,
28392        {
28393            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
28394                ".google.cloud.dataplex.v1.GovernanceEvent.EventType",
28395            ))
28396        }
28397    }
28398}
28399
28400/// These messages contain information about the execution of a datascan.
28401/// The monitored resource is 'DataScan'
28402#[derive(Clone, Default, PartialEq)]
28403#[non_exhaustive]
28404pub struct DataScanEvent {
28405    /// The data source of the data scan
28406    pub data_source: std::string::String,
28407
28408    /// The identifier of the specific data scan job this log entry is for.
28409    pub job_id: std::string::String,
28410
28411    /// The time when the data scan job was created.
28412    pub create_time: std::option::Option<wkt::Timestamp>,
28413
28414    /// The time when the data scan job started to run.
28415    pub start_time: std::option::Option<wkt::Timestamp>,
28416
28417    /// The time when the data scan job finished.
28418    pub end_time: std::option::Option<wkt::Timestamp>,
28419
28420    /// The type of the data scan.
28421    pub r#type: crate::model::data_scan_event::ScanType,
28422
28423    /// The status of the data scan job.
28424    pub state: crate::model::data_scan_event::State,
28425
28426    /// The message describing the data scan job event.
28427    pub message: std::string::String,
28428
28429    /// A version identifier of the spec which was used to execute this job.
28430    pub spec_version: std::string::String,
28431
28432    /// The trigger type of the data scan job.
28433    pub trigger: crate::model::data_scan_event::Trigger,
28434
28435    /// The scope of the data scan (e.g. full, incremental).
28436    pub scope: crate::model::data_scan_event::Scope,
28437
28438    /// The result of post scan actions.
28439    pub post_scan_actions_result:
28440        std::option::Option<crate::model::data_scan_event::PostScanActionsResult>,
28441
28442    /// The status of publishing the data scan as Dataplex Universal Catalog
28443    /// metadata.
28444    pub catalog_publishing_status:
28445        std::option::Option<crate::model::DataScanCatalogPublishingStatus>,
28446
28447    /// The result of the data scan job.
28448    pub result: std::option::Option<crate::model::data_scan_event::Result>,
28449
28450    /// The applied configs in the data scan job.
28451    pub applied_configs: std::option::Option<crate::model::data_scan_event::AppliedConfigs>,
28452
28453    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28454}
28455
28456impl DataScanEvent {
28457    pub fn new() -> Self {
28458        std::default::Default::default()
28459    }
28460
28461    /// Sets the value of [data_source][crate::model::DataScanEvent::data_source].
28462    ///
28463    /// # Example
28464    /// ```ignore,no_run
28465    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28466    /// let x = DataScanEvent::new().set_data_source("example");
28467    /// ```
28468    pub fn set_data_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28469        self.data_source = v.into();
28470        self
28471    }
28472
28473    /// Sets the value of [job_id][crate::model::DataScanEvent::job_id].
28474    ///
28475    /// # Example
28476    /// ```ignore,no_run
28477    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28478    /// let x = DataScanEvent::new().set_job_id("example");
28479    /// ```
28480    pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28481        self.job_id = v.into();
28482        self
28483    }
28484
28485    /// Sets the value of [create_time][crate::model::DataScanEvent::create_time].
28486    ///
28487    /// # Example
28488    /// ```ignore,no_run
28489    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28490    /// use wkt::Timestamp;
28491    /// let x = DataScanEvent::new().set_create_time(Timestamp::default()/* use setters */);
28492    /// ```
28493    pub fn set_create_time<T>(mut self, v: T) -> Self
28494    where
28495        T: std::convert::Into<wkt::Timestamp>,
28496    {
28497        self.create_time = std::option::Option::Some(v.into());
28498        self
28499    }
28500
28501    /// Sets or clears the value of [create_time][crate::model::DataScanEvent::create_time].
28502    ///
28503    /// # Example
28504    /// ```ignore,no_run
28505    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28506    /// use wkt::Timestamp;
28507    /// let x = DataScanEvent::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
28508    /// let x = DataScanEvent::new().set_or_clear_create_time(None::<Timestamp>);
28509    /// ```
28510    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
28511    where
28512        T: std::convert::Into<wkt::Timestamp>,
28513    {
28514        self.create_time = v.map(|x| x.into());
28515        self
28516    }
28517
28518    /// Sets the value of [start_time][crate::model::DataScanEvent::start_time].
28519    ///
28520    /// # Example
28521    /// ```ignore,no_run
28522    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28523    /// use wkt::Timestamp;
28524    /// let x = DataScanEvent::new().set_start_time(Timestamp::default()/* use setters */);
28525    /// ```
28526    pub fn set_start_time<T>(mut self, v: T) -> Self
28527    where
28528        T: std::convert::Into<wkt::Timestamp>,
28529    {
28530        self.start_time = std::option::Option::Some(v.into());
28531        self
28532    }
28533
28534    /// Sets or clears the value of [start_time][crate::model::DataScanEvent::start_time].
28535    ///
28536    /// # Example
28537    /// ```ignore,no_run
28538    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28539    /// use wkt::Timestamp;
28540    /// let x = DataScanEvent::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
28541    /// let x = DataScanEvent::new().set_or_clear_start_time(None::<Timestamp>);
28542    /// ```
28543    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
28544    where
28545        T: std::convert::Into<wkt::Timestamp>,
28546    {
28547        self.start_time = v.map(|x| x.into());
28548        self
28549    }
28550
28551    /// Sets the value of [end_time][crate::model::DataScanEvent::end_time].
28552    ///
28553    /// # Example
28554    /// ```ignore,no_run
28555    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28556    /// use wkt::Timestamp;
28557    /// let x = DataScanEvent::new().set_end_time(Timestamp::default()/* use setters */);
28558    /// ```
28559    pub fn set_end_time<T>(mut self, v: T) -> Self
28560    where
28561        T: std::convert::Into<wkt::Timestamp>,
28562    {
28563        self.end_time = std::option::Option::Some(v.into());
28564        self
28565    }
28566
28567    /// Sets or clears the value of [end_time][crate::model::DataScanEvent::end_time].
28568    ///
28569    /// # Example
28570    /// ```ignore,no_run
28571    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28572    /// use wkt::Timestamp;
28573    /// let x = DataScanEvent::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
28574    /// let x = DataScanEvent::new().set_or_clear_end_time(None::<Timestamp>);
28575    /// ```
28576    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
28577    where
28578        T: std::convert::Into<wkt::Timestamp>,
28579    {
28580        self.end_time = v.map(|x| x.into());
28581        self
28582    }
28583
28584    /// Sets the value of [r#type][crate::model::DataScanEvent::type].
28585    ///
28586    /// # Example
28587    /// ```ignore,no_run
28588    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28589    /// use google_cloud_dataplex_v1::model::data_scan_event::ScanType;
28590    /// let x0 = DataScanEvent::new().set_type(ScanType::DataProfile);
28591    /// let x1 = DataScanEvent::new().set_type(ScanType::DataQuality);
28592    /// let x2 = DataScanEvent::new().set_type(ScanType::DataDiscovery);
28593    /// ```
28594    pub fn set_type<T: std::convert::Into<crate::model::data_scan_event::ScanType>>(
28595        mut self,
28596        v: T,
28597    ) -> Self {
28598        self.r#type = v.into();
28599        self
28600    }
28601
28602    /// Sets the value of [state][crate::model::DataScanEvent::state].
28603    ///
28604    /// # Example
28605    /// ```ignore,no_run
28606    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28607    /// use google_cloud_dataplex_v1::model::data_scan_event::State;
28608    /// let x0 = DataScanEvent::new().set_state(State::Started);
28609    /// let x1 = DataScanEvent::new().set_state(State::Succeeded);
28610    /// let x2 = DataScanEvent::new().set_state(State::Failed);
28611    /// ```
28612    pub fn set_state<T: std::convert::Into<crate::model::data_scan_event::State>>(
28613        mut self,
28614        v: T,
28615    ) -> Self {
28616        self.state = v.into();
28617        self
28618    }
28619
28620    /// Sets the value of [message][crate::model::DataScanEvent::message].
28621    ///
28622    /// # Example
28623    /// ```ignore,no_run
28624    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28625    /// let x = DataScanEvent::new().set_message("example");
28626    /// ```
28627    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28628        self.message = v.into();
28629        self
28630    }
28631
28632    /// Sets the value of [spec_version][crate::model::DataScanEvent::spec_version].
28633    ///
28634    /// # Example
28635    /// ```ignore,no_run
28636    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28637    /// let x = DataScanEvent::new().set_spec_version("example");
28638    /// ```
28639    pub fn set_spec_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28640        self.spec_version = v.into();
28641        self
28642    }
28643
28644    /// Sets the value of [trigger][crate::model::DataScanEvent::trigger].
28645    ///
28646    /// # Example
28647    /// ```ignore,no_run
28648    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28649    /// use google_cloud_dataplex_v1::model::data_scan_event::Trigger;
28650    /// let x0 = DataScanEvent::new().set_trigger(Trigger::OnDemand);
28651    /// let x1 = DataScanEvent::new().set_trigger(Trigger::Schedule);
28652    /// ```
28653    pub fn set_trigger<T: std::convert::Into<crate::model::data_scan_event::Trigger>>(
28654        mut self,
28655        v: T,
28656    ) -> Self {
28657        self.trigger = v.into();
28658        self
28659    }
28660
28661    /// Sets the value of [scope][crate::model::DataScanEvent::scope].
28662    ///
28663    /// # Example
28664    /// ```ignore,no_run
28665    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28666    /// use google_cloud_dataplex_v1::model::data_scan_event::Scope;
28667    /// let x0 = DataScanEvent::new().set_scope(Scope::Full);
28668    /// let x1 = DataScanEvent::new().set_scope(Scope::Incremental);
28669    /// ```
28670    pub fn set_scope<T: std::convert::Into<crate::model::data_scan_event::Scope>>(
28671        mut self,
28672        v: T,
28673    ) -> Self {
28674        self.scope = v.into();
28675        self
28676    }
28677
28678    /// Sets the value of [post_scan_actions_result][crate::model::DataScanEvent::post_scan_actions_result].
28679    ///
28680    /// # Example
28681    /// ```ignore,no_run
28682    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28683    /// use google_cloud_dataplex_v1::model::data_scan_event::PostScanActionsResult;
28684    /// let x = DataScanEvent::new().set_post_scan_actions_result(PostScanActionsResult::default()/* use setters */);
28685    /// ```
28686    pub fn set_post_scan_actions_result<T>(mut self, v: T) -> Self
28687    where
28688        T: std::convert::Into<crate::model::data_scan_event::PostScanActionsResult>,
28689    {
28690        self.post_scan_actions_result = std::option::Option::Some(v.into());
28691        self
28692    }
28693
28694    /// Sets or clears the value of [post_scan_actions_result][crate::model::DataScanEvent::post_scan_actions_result].
28695    ///
28696    /// # Example
28697    /// ```ignore,no_run
28698    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28699    /// use google_cloud_dataplex_v1::model::data_scan_event::PostScanActionsResult;
28700    /// let x = DataScanEvent::new().set_or_clear_post_scan_actions_result(Some(PostScanActionsResult::default()/* use setters */));
28701    /// let x = DataScanEvent::new().set_or_clear_post_scan_actions_result(None::<PostScanActionsResult>);
28702    /// ```
28703    pub fn set_or_clear_post_scan_actions_result<T>(mut self, v: std::option::Option<T>) -> Self
28704    where
28705        T: std::convert::Into<crate::model::data_scan_event::PostScanActionsResult>,
28706    {
28707        self.post_scan_actions_result = v.map(|x| x.into());
28708        self
28709    }
28710
28711    /// Sets the value of [catalog_publishing_status][crate::model::DataScanEvent::catalog_publishing_status].
28712    ///
28713    /// # Example
28714    /// ```ignore,no_run
28715    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28716    /// use google_cloud_dataplex_v1::model::DataScanCatalogPublishingStatus;
28717    /// let x = DataScanEvent::new().set_catalog_publishing_status(DataScanCatalogPublishingStatus::default()/* use setters */);
28718    /// ```
28719    pub fn set_catalog_publishing_status<T>(mut self, v: T) -> Self
28720    where
28721        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
28722    {
28723        self.catalog_publishing_status = std::option::Option::Some(v.into());
28724        self
28725    }
28726
28727    /// Sets or clears the value of [catalog_publishing_status][crate::model::DataScanEvent::catalog_publishing_status].
28728    ///
28729    /// # Example
28730    /// ```ignore,no_run
28731    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28732    /// use google_cloud_dataplex_v1::model::DataScanCatalogPublishingStatus;
28733    /// let x = DataScanEvent::new().set_or_clear_catalog_publishing_status(Some(DataScanCatalogPublishingStatus::default()/* use setters */));
28734    /// let x = DataScanEvent::new().set_or_clear_catalog_publishing_status(None::<DataScanCatalogPublishingStatus>);
28735    /// ```
28736    pub fn set_or_clear_catalog_publishing_status<T>(mut self, v: std::option::Option<T>) -> Self
28737    where
28738        T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
28739    {
28740        self.catalog_publishing_status = v.map(|x| x.into());
28741        self
28742    }
28743
28744    /// Sets the value of [result][crate::model::DataScanEvent::result].
28745    ///
28746    /// Note that all the setters affecting `result` are mutually
28747    /// exclusive.
28748    ///
28749    /// # Example
28750    /// ```ignore,no_run
28751    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28752    /// use google_cloud_dataplex_v1::model::data_scan_event::DataProfileResult;
28753    /// let x = DataScanEvent::new().set_result(Some(
28754    ///     google_cloud_dataplex_v1::model::data_scan_event::Result::DataProfile(DataProfileResult::default().into())));
28755    /// ```
28756    pub fn set_result<
28757        T: std::convert::Into<std::option::Option<crate::model::data_scan_event::Result>>,
28758    >(
28759        mut self,
28760        v: T,
28761    ) -> Self {
28762        self.result = v.into();
28763        self
28764    }
28765
28766    /// The value of [result][crate::model::DataScanEvent::result]
28767    /// if it holds a `DataProfile`, `None` if the field is not set or
28768    /// holds a different branch.
28769    pub fn data_profile(
28770        &self,
28771    ) -> std::option::Option<&std::boxed::Box<crate::model::data_scan_event::DataProfileResult>>
28772    {
28773        #[allow(unreachable_patterns)]
28774        self.result.as_ref().and_then(|v| match v {
28775            crate::model::data_scan_event::Result::DataProfile(v) => std::option::Option::Some(v),
28776            _ => std::option::Option::None,
28777        })
28778    }
28779
28780    /// Sets the value of [result][crate::model::DataScanEvent::result]
28781    /// to hold a `DataProfile`.
28782    ///
28783    /// Note that all the setters affecting `result` are
28784    /// mutually exclusive.
28785    ///
28786    /// # Example
28787    /// ```ignore,no_run
28788    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28789    /// use google_cloud_dataplex_v1::model::data_scan_event::DataProfileResult;
28790    /// let x = DataScanEvent::new().set_data_profile(DataProfileResult::default()/* use setters */);
28791    /// assert!(x.data_profile().is_some());
28792    /// assert!(x.data_quality().is_none());
28793    /// ```
28794    pub fn set_data_profile<
28795        T: std::convert::Into<std::boxed::Box<crate::model::data_scan_event::DataProfileResult>>,
28796    >(
28797        mut self,
28798        v: T,
28799    ) -> Self {
28800        self.result =
28801            std::option::Option::Some(crate::model::data_scan_event::Result::DataProfile(v.into()));
28802        self
28803    }
28804
28805    /// The value of [result][crate::model::DataScanEvent::result]
28806    /// if it holds a `DataQuality`, `None` if the field is not set or
28807    /// holds a different branch.
28808    pub fn data_quality(
28809        &self,
28810    ) -> std::option::Option<&std::boxed::Box<crate::model::data_scan_event::DataQualityResult>>
28811    {
28812        #[allow(unreachable_patterns)]
28813        self.result.as_ref().and_then(|v| match v {
28814            crate::model::data_scan_event::Result::DataQuality(v) => std::option::Option::Some(v),
28815            _ => std::option::Option::None,
28816        })
28817    }
28818
28819    /// Sets the value of [result][crate::model::DataScanEvent::result]
28820    /// to hold a `DataQuality`.
28821    ///
28822    /// Note that all the setters affecting `result` are
28823    /// mutually exclusive.
28824    ///
28825    /// # Example
28826    /// ```ignore,no_run
28827    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28828    /// use google_cloud_dataplex_v1::model::data_scan_event::DataQualityResult;
28829    /// let x = DataScanEvent::new().set_data_quality(DataQualityResult::default()/* use setters */);
28830    /// assert!(x.data_quality().is_some());
28831    /// assert!(x.data_profile().is_none());
28832    /// ```
28833    pub fn set_data_quality<
28834        T: std::convert::Into<std::boxed::Box<crate::model::data_scan_event::DataQualityResult>>,
28835    >(
28836        mut self,
28837        v: T,
28838    ) -> Self {
28839        self.result =
28840            std::option::Option::Some(crate::model::data_scan_event::Result::DataQuality(v.into()));
28841        self
28842    }
28843
28844    /// Sets the value of [applied_configs][crate::model::DataScanEvent::applied_configs].
28845    ///
28846    /// Note that all the setters affecting `applied_configs` are mutually
28847    /// exclusive.
28848    ///
28849    /// # Example
28850    /// ```ignore,no_run
28851    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28852    /// use google_cloud_dataplex_v1::model::data_scan_event::DataProfileAppliedConfigs;
28853    /// let x = DataScanEvent::new().set_applied_configs(Some(
28854    ///     google_cloud_dataplex_v1::model::data_scan_event::AppliedConfigs::DataProfileConfigs(DataProfileAppliedConfigs::default().into())));
28855    /// ```
28856    pub fn set_applied_configs<
28857        T: std::convert::Into<std::option::Option<crate::model::data_scan_event::AppliedConfigs>>,
28858    >(
28859        mut self,
28860        v: T,
28861    ) -> Self {
28862        self.applied_configs = v.into();
28863        self
28864    }
28865
28866    /// The value of [applied_configs][crate::model::DataScanEvent::applied_configs]
28867    /// if it holds a `DataProfileConfigs`, `None` if the field is not set or
28868    /// holds a different branch.
28869    pub fn data_profile_configs(
28870        &self,
28871    ) -> std::option::Option<
28872        &std::boxed::Box<crate::model::data_scan_event::DataProfileAppliedConfigs>,
28873    > {
28874        #[allow(unreachable_patterns)]
28875        self.applied_configs.as_ref().and_then(|v| match v {
28876            crate::model::data_scan_event::AppliedConfigs::DataProfileConfigs(v) => {
28877                std::option::Option::Some(v)
28878            }
28879            _ => std::option::Option::None,
28880        })
28881    }
28882
28883    /// Sets the value of [applied_configs][crate::model::DataScanEvent::applied_configs]
28884    /// to hold a `DataProfileConfigs`.
28885    ///
28886    /// Note that all the setters affecting `applied_configs` are
28887    /// mutually exclusive.
28888    ///
28889    /// # Example
28890    /// ```ignore,no_run
28891    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28892    /// use google_cloud_dataplex_v1::model::data_scan_event::DataProfileAppliedConfigs;
28893    /// let x = DataScanEvent::new().set_data_profile_configs(DataProfileAppliedConfigs::default()/* use setters */);
28894    /// assert!(x.data_profile_configs().is_some());
28895    /// assert!(x.data_quality_configs().is_none());
28896    /// ```
28897    pub fn set_data_profile_configs<
28898        T: std::convert::Into<
28899                std::boxed::Box<crate::model::data_scan_event::DataProfileAppliedConfigs>,
28900            >,
28901    >(
28902        mut self,
28903        v: T,
28904    ) -> Self {
28905        self.applied_configs = std::option::Option::Some(
28906            crate::model::data_scan_event::AppliedConfigs::DataProfileConfigs(v.into()),
28907        );
28908        self
28909    }
28910
28911    /// The value of [applied_configs][crate::model::DataScanEvent::applied_configs]
28912    /// if it holds a `DataQualityConfigs`, `None` if the field is not set or
28913    /// holds a different branch.
28914    pub fn data_quality_configs(
28915        &self,
28916    ) -> std::option::Option<
28917        &std::boxed::Box<crate::model::data_scan_event::DataQualityAppliedConfigs>,
28918    > {
28919        #[allow(unreachable_patterns)]
28920        self.applied_configs.as_ref().and_then(|v| match v {
28921            crate::model::data_scan_event::AppliedConfigs::DataQualityConfigs(v) => {
28922                std::option::Option::Some(v)
28923            }
28924            _ => std::option::Option::None,
28925        })
28926    }
28927
28928    /// Sets the value of [applied_configs][crate::model::DataScanEvent::applied_configs]
28929    /// to hold a `DataQualityConfigs`.
28930    ///
28931    /// Note that all the setters affecting `applied_configs` are
28932    /// mutually exclusive.
28933    ///
28934    /// # Example
28935    /// ```ignore,no_run
28936    /// # use google_cloud_dataplex_v1::model::DataScanEvent;
28937    /// use google_cloud_dataplex_v1::model::data_scan_event::DataQualityAppliedConfigs;
28938    /// let x = DataScanEvent::new().set_data_quality_configs(DataQualityAppliedConfigs::default()/* use setters */);
28939    /// assert!(x.data_quality_configs().is_some());
28940    /// assert!(x.data_profile_configs().is_none());
28941    /// ```
28942    pub fn set_data_quality_configs<
28943        T: std::convert::Into<
28944                std::boxed::Box<crate::model::data_scan_event::DataQualityAppliedConfigs>,
28945            >,
28946    >(
28947        mut self,
28948        v: T,
28949    ) -> Self {
28950        self.applied_configs = std::option::Option::Some(
28951            crate::model::data_scan_event::AppliedConfigs::DataQualityConfigs(v.into()),
28952        );
28953        self
28954    }
28955}
28956
28957impl wkt::message::Message for DataScanEvent {
28958    fn typename() -> &'static str {
28959        "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent"
28960    }
28961}
28962
28963/// Defines additional types related to [DataScanEvent].
28964pub mod data_scan_event {
28965    #[allow(unused_imports)]
28966    use super::*;
28967
28968    /// Data profile result for data scan job.
28969    #[derive(Clone, Default, PartialEq)]
28970    #[non_exhaustive]
28971    pub struct DataProfileResult {
28972        /// The count of rows processed in the data scan job.
28973        pub row_count: i64,
28974
28975        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28976    }
28977
28978    impl DataProfileResult {
28979        pub fn new() -> Self {
28980            std::default::Default::default()
28981        }
28982
28983        /// Sets the value of [row_count][crate::model::data_scan_event::DataProfileResult::row_count].
28984        ///
28985        /// # Example
28986        /// ```ignore,no_run
28987        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataProfileResult;
28988        /// let x = DataProfileResult::new().set_row_count(42);
28989        /// ```
28990        pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
28991            self.row_count = v.into();
28992            self
28993        }
28994    }
28995
28996    impl wkt::message::Message for DataProfileResult {
28997        fn typename() -> &'static str {
28998            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataProfileResult"
28999        }
29000    }
29001
29002    /// Data quality result for data scan job.
29003    #[derive(Clone, Default, PartialEq)]
29004    #[non_exhaustive]
29005    pub struct DataQualityResult {
29006        /// The count of rows processed in the data scan job.
29007        pub row_count: i64,
29008
29009        /// Whether the data quality result was `pass` or not.
29010        pub passed: bool,
29011
29012        /// The result of each dimension for data quality result.
29013        /// The key of the map is the name of the dimension.
29014        /// The value is the bool value depicting whether the dimension result was
29015        /// `pass` or not.
29016        pub dimension_passed: std::collections::HashMap<std::string::String, bool>,
29017
29018        /// The table-level data quality score for the data scan job.
29019        ///
29020        /// The data quality score ranges between [0, 100] (up to two decimal
29021        /// points).
29022        pub score: f32,
29023
29024        /// The score of each dimension for data quality result.
29025        /// The key of the map is the name of the dimension.
29026        /// The value is the data quality score for the dimension.
29027        ///
29028        /// The score ranges between [0, 100] (up to two decimal
29029        /// points).
29030        pub dimension_score: std::collections::HashMap<std::string::String, f32>,
29031
29032        /// The score of each column scanned in the data scan job.
29033        /// The key of the map is the name of the column.
29034        /// The value is the data quality score for the column.
29035        ///
29036        /// The score ranges between [0, 100] (up to two decimal
29037        /// points).
29038        pub column_score: std::collections::HashMap<std::string::String, f32>,
29039
29040        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29041    }
29042
29043    impl DataQualityResult {
29044        pub fn new() -> Self {
29045            std::default::Default::default()
29046        }
29047
29048        /// Sets the value of [row_count][crate::model::data_scan_event::DataQualityResult::row_count].
29049        ///
29050        /// # Example
29051        /// ```ignore,no_run
29052        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityResult;
29053        /// let x = DataQualityResult::new().set_row_count(42);
29054        /// ```
29055        pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
29056            self.row_count = v.into();
29057            self
29058        }
29059
29060        /// Sets the value of [passed][crate::model::data_scan_event::DataQualityResult::passed].
29061        ///
29062        /// # Example
29063        /// ```ignore,no_run
29064        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityResult;
29065        /// let x = DataQualityResult::new().set_passed(true);
29066        /// ```
29067        pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
29068            self.passed = v.into();
29069            self
29070        }
29071
29072        /// Sets the value of [dimension_passed][crate::model::data_scan_event::DataQualityResult::dimension_passed].
29073        ///
29074        /// # Example
29075        /// ```ignore,no_run
29076        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityResult;
29077        /// let x = DataQualityResult::new().set_dimension_passed([
29078        ///     ("key0", true),
29079        ///     ("key1", false),
29080        /// ]);
29081        /// ```
29082        pub fn set_dimension_passed<T, K, V>(mut self, v: T) -> Self
29083        where
29084            T: std::iter::IntoIterator<Item = (K, V)>,
29085            K: std::convert::Into<std::string::String>,
29086            V: std::convert::Into<bool>,
29087        {
29088            use std::iter::Iterator;
29089            self.dimension_passed = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
29090            self
29091        }
29092
29093        /// Sets the value of [score][crate::model::data_scan_event::DataQualityResult::score].
29094        ///
29095        /// # Example
29096        /// ```ignore,no_run
29097        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityResult;
29098        /// let x = DataQualityResult::new().set_score(42.0);
29099        /// ```
29100        pub fn set_score<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
29101            self.score = v.into();
29102            self
29103        }
29104
29105        /// Sets the value of [dimension_score][crate::model::data_scan_event::DataQualityResult::dimension_score].
29106        ///
29107        /// # Example
29108        /// ```ignore,no_run
29109        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityResult;
29110        /// let x = DataQualityResult::new().set_dimension_score([
29111        ///     ("key0", 123.5),
29112        ///     ("key1", 456.5),
29113        /// ]);
29114        /// ```
29115        pub fn set_dimension_score<T, K, V>(mut self, v: T) -> Self
29116        where
29117            T: std::iter::IntoIterator<Item = (K, V)>,
29118            K: std::convert::Into<std::string::String>,
29119            V: std::convert::Into<f32>,
29120        {
29121            use std::iter::Iterator;
29122            self.dimension_score = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
29123            self
29124        }
29125
29126        /// Sets the value of [column_score][crate::model::data_scan_event::DataQualityResult::column_score].
29127        ///
29128        /// # Example
29129        /// ```ignore,no_run
29130        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityResult;
29131        /// let x = DataQualityResult::new().set_column_score([
29132        ///     ("key0", 123.5),
29133        ///     ("key1", 456.5),
29134        /// ]);
29135        /// ```
29136        pub fn set_column_score<T, K, V>(mut self, v: T) -> Self
29137        where
29138            T: std::iter::IntoIterator<Item = (K, V)>,
29139            K: std::convert::Into<std::string::String>,
29140            V: std::convert::Into<f32>,
29141        {
29142            use std::iter::Iterator;
29143            self.column_score = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
29144            self
29145        }
29146    }
29147
29148    impl wkt::message::Message for DataQualityResult {
29149        fn typename() -> &'static str {
29150            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataQualityResult"
29151        }
29152    }
29153
29154    /// Applied configs for data profile type data scan job.
29155    #[derive(Clone, Default, PartialEq)]
29156    #[non_exhaustive]
29157    pub struct DataProfileAppliedConfigs {
29158        /// The percentage of the records selected from the dataset for DataScan.
29159        ///
29160        /// * Value ranges between 0.0 and 100.0.
29161        /// * Value 0.0 or 100.0 imply that sampling was not applied.
29162        pub sampling_percent: f32,
29163
29164        /// Boolean indicating whether a row filter was applied in the DataScan job.
29165        pub row_filter_applied: bool,
29166
29167        /// Boolean indicating whether a column filter was applied in the DataScan
29168        /// job.
29169        pub column_filter_applied: bool,
29170
29171        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29172    }
29173
29174    impl DataProfileAppliedConfigs {
29175        pub fn new() -> Self {
29176            std::default::Default::default()
29177        }
29178
29179        /// Sets the value of [sampling_percent][crate::model::data_scan_event::DataProfileAppliedConfigs::sampling_percent].
29180        ///
29181        /// # Example
29182        /// ```ignore,no_run
29183        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataProfileAppliedConfigs;
29184        /// let x = DataProfileAppliedConfigs::new().set_sampling_percent(42.0);
29185        /// ```
29186        pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
29187            self.sampling_percent = v.into();
29188            self
29189        }
29190
29191        /// Sets the value of [row_filter_applied][crate::model::data_scan_event::DataProfileAppliedConfigs::row_filter_applied].
29192        ///
29193        /// # Example
29194        /// ```ignore,no_run
29195        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataProfileAppliedConfigs;
29196        /// let x = DataProfileAppliedConfigs::new().set_row_filter_applied(true);
29197        /// ```
29198        pub fn set_row_filter_applied<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
29199            self.row_filter_applied = v.into();
29200            self
29201        }
29202
29203        /// Sets the value of [column_filter_applied][crate::model::data_scan_event::DataProfileAppliedConfigs::column_filter_applied].
29204        ///
29205        /// # Example
29206        /// ```ignore,no_run
29207        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataProfileAppliedConfigs;
29208        /// let x = DataProfileAppliedConfigs::new().set_column_filter_applied(true);
29209        /// ```
29210        pub fn set_column_filter_applied<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
29211            self.column_filter_applied = v.into();
29212            self
29213        }
29214    }
29215
29216    impl wkt::message::Message for DataProfileAppliedConfigs {
29217        fn typename() -> &'static str {
29218            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs"
29219        }
29220    }
29221
29222    /// Applied configs for data quality type data scan job.
29223    #[derive(Clone, Default, PartialEq)]
29224    #[non_exhaustive]
29225    pub struct DataQualityAppliedConfigs {
29226        /// The percentage of the records selected from the dataset for DataScan.
29227        ///
29228        /// * Value ranges between 0.0 and 100.0.
29229        /// * Value 0.0 or 100.0 imply that sampling was not applied.
29230        pub sampling_percent: f32,
29231
29232        /// Boolean indicating whether a row filter was applied in the DataScan job.
29233        pub row_filter_applied: bool,
29234
29235        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29236    }
29237
29238    impl DataQualityAppliedConfigs {
29239        pub fn new() -> Self {
29240            std::default::Default::default()
29241        }
29242
29243        /// Sets the value of [sampling_percent][crate::model::data_scan_event::DataQualityAppliedConfigs::sampling_percent].
29244        ///
29245        /// # Example
29246        /// ```ignore,no_run
29247        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityAppliedConfigs;
29248        /// let x = DataQualityAppliedConfigs::new().set_sampling_percent(42.0);
29249        /// ```
29250        pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
29251            self.sampling_percent = v.into();
29252            self
29253        }
29254
29255        /// Sets the value of [row_filter_applied][crate::model::data_scan_event::DataQualityAppliedConfigs::row_filter_applied].
29256        ///
29257        /// # Example
29258        /// ```ignore,no_run
29259        /// # use google_cloud_dataplex_v1::model::data_scan_event::DataQualityAppliedConfigs;
29260        /// let x = DataQualityAppliedConfigs::new().set_row_filter_applied(true);
29261        /// ```
29262        pub fn set_row_filter_applied<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
29263            self.row_filter_applied = v.into();
29264            self
29265        }
29266    }
29267
29268    impl wkt::message::Message for DataQualityAppliedConfigs {
29269        fn typename() -> &'static str {
29270            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs"
29271        }
29272    }
29273
29274    /// Post scan actions result for data scan job.
29275    #[derive(Clone, Default, PartialEq)]
29276    #[non_exhaustive]
29277    pub struct PostScanActionsResult {
29278        /// The result of BigQuery export post scan action.
29279        pub bigquery_export_result: std::option::Option<
29280            crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult,
29281        >,
29282
29283        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29284    }
29285
29286    impl PostScanActionsResult {
29287        pub fn new() -> Self {
29288            std::default::Default::default()
29289        }
29290
29291        /// Sets the value of [bigquery_export_result][crate::model::data_scan_event::PostScanActionsResult::bigquery_export_result].
29292        ///
29293        /// # Example
29294        /// ```ignore,no_run
29295        /// # use google_cloud_dataplex_v1::model::data_scan_event::PostScanActionsResult;
29296        /// use google_cloud_dataplex_v1::model::data_scan_event::post_scan_actions_result::BigQueryExportResult;
29297        /// let x = PostScanActionsResult::new().set_bigquery_export_result(BigQueryExportResult::default()/* use setters */);
29298        /// ```
29299        pub fn set_bigquery_export_result<T>(mut self, v: T) -> Self
29300        where
29301            T: std::convert::Into<
29302                    crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult,
29303                >,
29304        {
29305            self.bigquery_export_result = std::option::Option::Some(v.into());
29306            self
29307        }
29308
29309        /// Sets or clears the value of [bigquery_export_result][crate::model::data_scan_event::PostScanActionsResult::bigquery_export_result].
29310        ///
29311        /// # Example
29312        /// ```ignore,no_run
29313        /// # use google_cloud_dataplex_v1::model::data_scan_event::PostScanActionsResult;
29314        /// use google_cloud_dataplex_v1::model::data_scan_event::post_scan_actions_result::BigQueryExportResult;
29315        /// let x = PostScanActionsResult::new().set_or_clear_bigquery_export_result(Some(BigQueryExportResult::default()/* use setters */));
29316        /// let x = PostScanActionsResult::new().set_or_clear_bigquery_export_result(None::<BigQueryExportResult>);
29317        /// ```
29318        pub fn set_or_clear_bigquery_export_result<T>(mut self, v: std::option::Option<T>) -> Self
29319        where
29320            T: std::convert::Into<
29321                    crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult,
29322                >,
29323        {
29324            self.bigquery_export_result = v.map(|x| x.into());
29325            self
29326        }
29327    }
29328
29329    impl wkt::message::Message for PostScanActionsResult {
29330        fn typename() -> &'static str {
29331            "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult"
29332        }
29333    }
29334
29335    /// Defines additional types related to [PostScanActionsResult].
29336    pub mod post_scan_actions_result {
29337        #[allow(unused_imports)]
29338        use super::*;
29339
29340        /// The result of BigQuery export post scan action.
29341        #[derive(Clone, Default, PartialEq)]
29342        #[non_exhaustive]
29343        pub struct BigQueryExportResult {
29344
29345            /// Execution state for the BigQuery exporting.
29346            pub state: crate::model::data_scan_event::post_scan_actions_result::big_query_export_result::State,
29347
29348            /// Additional information about the BigQuery exporting.
29349            pub message: std::string::String,
29350
29351            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29352        }
29353
29354        impl BigQueryExportResult {
29355            pub fn new() -> Self {
29356                std::default::Default::default()
29357            }
29358
29359            /// Sets the value of [state][crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult::state].
29360            ///
29361            /// # Example
29362            /// ```ignore,no_run
29363            /// # use google_cloud_dataplex_v1::model::data_scan_event::post_scan_actions_result::BigQueryExportResult;
29364            /// use google_cloud_dataplex_v1::model::data_scan_event::post_scan_actions_result::big_query_export_result::State;
29365            /// let x0 = BigQueryExportResult::new().set_state(State::Succeeded);
29366            /// let x1 = BigQueryExportResult::new().set_state(State::Failed);
29367            /// let x2 = BigQueryExportResult::new().set_state(State::Skipped);
29368            /// ```
29369            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{
29370                self.state = v.into();
29371                self
29372            }
29373
29374            /// Sets the value of [message][crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult::message].
29375            ///
29376            /// # Example
29377            /// ```ignore,no_run
29378            /// # use google_cloud_dataplex_v1::model::data_scan_event::post_scan_actions_result::BigQueryExportResult;
29379            /// let x = BigQueryExportResult::new().set_message("example");
29380            /// ```
29381            pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29382                self.message = v.into();
29383                self
29384            }
29385        }
29386
29387        impl wkt::message::Message for BigQueryExportResult {
29388            fn typename() -> &'static str {
29389                "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult"
29390            }
29391        }
29392
29393        /// Defines additional types related to [BigQueryExportResult].
29394        pub mod big_query_export_result {
29395            #[allow(unused_imports)]
29396            use super::*;
29397
29398            /// Execution state for the exporting.
29399            ///
29400            /// # Working with unknown values
29401            ///
29402            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29403            /// additional enum variants at any time. Adding new variants is not considered
29404            /// a breaking change. Applications should write their code in anticipation of:
29405            ///
29406            /// - New values appearing in future releases of the client library, **and**
29407            /// - New values received dynamically, without application changes.
29408            ///
29409            /// Please consult the [Working with enums] section in the user guide for some
29410            /// guidelines.
29411            ///
29412            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29413            #[derive(Clone, Debug, PartialEq)]
29414            #[non_exhaustive]
29415            pub enum State {
29416                /// The exporting state is unspecified.
29417                Unspecified,
29418                /// The exporting completed successfully.
29419                Succeeded,
29420                /// The exporting is no longer running due to an error.
29421                Failed,
29422                /// The exporting is skipped due to no valid scan result to export
29423                /// (usually caused by scan failed).
29424                Skipped,
29425                /// If set, the enum was initialized with an unknown value.
29426                ///
29427                /// Applications can examine the value using [State::value] or
29428                /// [State::name].
29429                UnknownValue(state::UnknownValue),
29430            }
29431
29432            #[doc(hidden)]
29433            pub mod state {
29434                #[allow(unused_imports)]
29435                use super::*;
29436                #[derive(Clone, Debug, PartialEq)]
29437                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29438            }
29439
29440            impl State {
29441                /// Gets the enum value.
29442                ///
29443                /// Returns `None` if the enum contains an unknown value deserialized from
29444                /// the string representation of enums.
29445                pub fn value(&self) -> std::option::Option<i32> {
29446                    match self {
29447                        Self::Unspecified => std::option::Option::Some(0),
29448                        Self::Succeeded => std::option::Option::Some(1),
29449                        Self::Failed => std::option::Option::Some(2),
29450                        Self::Skipped => std::option::Option::Some(3),
29451                        Self::UnknownValue(u) => u.0.value(),
29452                    }
29453                }
29454
29455                /// Gets the enum value as a string.
29456                ///
29457                /// Returns `None` if the enum contains an unknown value deserialized from
29458                /// the integer representation of enums.
29459                pub fn name(&self) -> std::option::Option<&str> {
29460                    match self {
29461                        Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
29462                        Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
29463                        Self::Failed => std::option::Option::Some("FAILED"),
29464                        Self::Skipped => std::option::Option::Some("SKIPPED"),
29465                        Self::UnknownValue(u) => u.0.name(),
29466                    }
29467                }
29468            }
29469
29470            impl std::default::Default for State {
29471                fn default() -> Self {
29472                    use std::convert::From;
29473                    Self::from(0)
29474                }
29475            }
29476
29477            impl std::fmt::Display for State {
29478                fn fmt(
29479                    &self,
29480                    f: &mut std::fmt::Formatter<'_>,
29481                ) -> std::result::Result<(), std::fmt::Error> {
29482                    wkt::internal::display_enum(f, self.name(), self.value())
29483                }
29484            }
29485
29486            impl std::convert::From<i32> for State {
29487                fn from(value: i32) -> Self {
29488                    match value {
29489                        0 => Self::Unspecified,
29490                        1 => Self::Succeeded,
29491                        2 => Self::Failed,
29492                        3 => Self::Skipped,
29493                        _ => Self::UnknownValue(state::UnknownValue(
29494                            wkt::internal::UnknownEnumValue::Integer(value),
29495                        )),
29496                    }
29497                }
29498            }
29499
29500            impl std::convert::From<&str> for State {
29501                fn from(value: &str) -> Self {
29502                    use std::string::ToString;
29503                    match value {
29504                        "STATE_UNSPECIFIED" => Self::Unspecified,
29505                        "SUCCEEDED" => Self::Succeeded,
29506                        "FAILED" => Self::Failed,
29507                        "SKIPPED" => Self::Skipped,
29508                        _ => Self::UnknownValue(state::UnknownValue(
29509                            wkt::internal::UnknownEnumValue::String(value.to_string()),
29510                        )),
29511                    }
29512                }
29513            }
29514
29515            impl serde::ser::Serialize for State {
29516                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29517                where
29518                    S: serde::Serializer,
29519                {
29520                    match self {
29521                        Self::Unspecified => serializer.serialize_i32(0),
29522                        Self::Succeeded => serializer.serialize_i32(1),
29523                        Self::Failed => serializer.serialize_i32(2),
29524                        Self::Skipped => serializer.serialize_i32(3),
29525                        Self::UnknownValue(u) => u.0.serialize(serializer),
29526                    }
29527                }
29528            }
29529
29530            impl<'de> serde::de::Deserialize<'de> for State {
29531                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29532                where
29533                    D: serde::Deserializer<'de>,
29534                {
29535                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
29536                        ".google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State"))
29537                }
29538            }
29539        }
29540    }
29541
29542    /// The type of the data scan.
29543    ///
29544    /// # Working with unknown values
29545    ///
29546    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29547    /// additional enum variants at any time. Adding new variants is not considered
29548    /// a breaking change. Applications should write their code in anticipation of:
29549    ///
29550    /// - New values appearing in future releases of the client library, **and**
29551    /// - New values received dynamically, without application changes.
29552    ///
29553    /// Please consult the [Working with enums] section in the user guide for some
29554    /// guidelines.
29555    ///
29556    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29557    #[derive(Clone, Debug, PartialEq)]
29558    #[non_exhaustive]
29559    pub enum ScanType {
29560        /// An unspecified data scan type.
29561        Unspecified,
29562        /// Data scan for data profile.
29563        DataProfile,
29564        /// Data scan for data quality.
29565        DataQuality,
29566        /// Data scan for data discovery.
29567        DataDiscovery,
29568        /// If set, the enum was initialized with an unknown value.
29569        ///
29570        /// Applications can examine the value using [ScanType::value] or
29571        /// [ScanType::name].
29572        UnknownValue(scan_type::UnknownValue),
29573    }
29574
29575    #[doc(hidden)]
29576    pub mod scan_type {
29577        #[allow(unused_imports)]
29578        use super::*;
29579        #[derive(Clone, Debug, PartialEq)]
29580        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29581    }
29582
29583    impl ScanType {
29584        /// Gets the enum value.
29585        ///
29586        /// Returns `None` if the enum contains an unknown value deserialized from
29587        /// the string representation of enums.
29588        pub fn value(&self) -> std::option::Option<i32> {
29589            match self {
29590                Self::Unspecified => std::option::Option::Some(0),
29591                Self::DataProfile => std::option::Option::Some(1),
29592                Self::DataQuality => std::option::Option::Some(2),
29593                Self::DataDiscovery => std::option::Option::Some(4),
29594                Self::UnknownValue(u) => u.0.value(),
29595            }
29596        }
29597
29598        /// Gets the enum value as a string.
29599        ///
29600        /// Returns `None` if the enum contains an unknown value deserialized from
29601        /// the integer representation of enums.
29602        pub fn name(&self) -> std::option::Option<&str> {
29603            match self {
29604                Self::Unspecified => std::option::Option::Some("SCAN_TYPE_UNSPECIFIED"),
29605                Self::DataProfile => std::option::Option::Some("DATA_PROFILE"),
29606                Self::DataQuality => std::option::Option::Some("DATA_QUALITY"),
29607                Self::DataDiscovery => std::option::Option::Some("DATA_DISCOVERY"),
29608                Self::UnknownValue(u) => u.0.name(),
29609            }
29610        }
29611    }
29612
29613    impl std::default::Default for ScanType {
29614        fn default() -> Self {
29615            use std::convert::From;
29616            Self::from(0)
29617        }
29618    }
29619
29620    impl std::fmt::Display for ScanType {
29621        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29622            wkt::internal::display_enum(f, self.name(), self.value())
29623        }
29624    }
29625
29626    impl std::convert::From<i32> for ScanType {
29627        fn from(value: i32) -> Self {
29628            match value {
29629                0 => Self::Unspecified,
29630                1 => Self::DataProfile,
29631                2 => Self::DataQuality,
29632                4 => Self::DataDiscovery,
29633                _ => Self::UnknownValue(scan_type::UnknownValue(
29634                    wkt::internal::UnknownEnumValue::Integer(value),
29635                )),
29636            }
29637        }
29638    }
29639
29640    impl std::convert::From<&str> for ScanType {
29641        fn from(value: &str) -> Self {
29642            use std::string::ToString;
29643            match value {
29644                "SCAN_TYPE_UNSPECIFIED" => Self::Unspecified,
29645                "DATA_PROFILE" => Self::DataProfile,
29646                "DATA_QUALITY" => Self::DataQuality,
29647                "DATA_DISCOVERY" => Self::DataDiscovery,
29648                _ => Self::UnknownValue(scan_type::UnknownValue(
29649                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29650                )),
29651            }
29652        }
29653    }
29654
29655    impl serde::ser::Serialize for ScanType {
29656        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29657        where
29658            S: serde::Serializer,
29659        {
29660            match self {
29661                Self::Unspecified => serializer.serialize_i32(0),
29662                Self::DataProfile => serializer.serialize_i32(1),
29663                Self::DataQuality => serializer.serialize_i32(2),
29664                Self::DataDiscovery => serializer.serialize_i32(4),
29665                Self::UnknownValue(u) => u.0.serialize(serializer),
29666            }
29667        }
29668    }
29669
29670    impl<'de> serde::de::Deserialize<'de> for ScanType {
29671        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29672        where
29673            D: serde::Deserializer<'de>,
29674        {
29675            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ScanType>::new(
29676                ".google.cloud.dataplex.v1.DataScanEvent.ScanType",
29677            ))
29678        }
29679    }
29680
29681    /// The job state of the data scan.
29682    ///
29683    /// # Working with unknown values
29684    ///
29685    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29686    /// additional enum variants at any time. Adding new variants is not considered
29687    /// a breaking change. Applications should write their code in anticipation of:
29688    ///
29689    /// - New values appearing in future releases of the client library, **and**
29690    /// - New values received dynamically, without application changes.
29691    ///
29692    /// Please consult the [Working with enums] section in the user guide for some
29693    /// guidelines.
29694    ///
29695    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29696    #[derive(Clone, Debug, PartialEq)]
29697    #[non_exhaustive]
29698    pub enum State {
29699        /// Unspecified job state.
29700        Unspecified,
29701        /// Data scan job started.
29702        Started,
29703        /// Data scan job successfully completed.
29704        Succeeded,
29705        /// Data scan job was unsuccessful.
29706        Failed,
29707        /// Data scan job was cancelled.
29708        Cancelled,
29709        /// Data scan job was created.
29710        Created,
29711        /// If set, the enum was initialized with an unknown value.
29712        ///
29713        /// Applications can examine the value using [State::value] or
29714        /// [State::name].
29715        UnknownValue(state::UnknownValue),
29716    }
29717
29718    #[doc(hidden)]
29719    pub mod state {
29720        #[allow(unused_imports)]
29721        use super::*;
29722        #[derive(Clone, Debug, PartialEq)]
29723        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29724    }
29725
29726    impl State {
29727        /// Gets the enum value.
29728        ///
29729        /// Returns `None` if the enum contains an unknown value deserialized from
29730        /// the string representation of enums.
29731        pub fn value(&self) -> std::option::Option<i32> {
29732            match self {
29733                Self::Unspecified => std::option::Option::Some(0),
29734                Self::Started => std::option::Option::Some(1),
29735                Self::Succeeded => std::option::Option::Some(2),
29736                Self::Failed => std::option::Option::Some(3),
29737                Self::Cancelled => std::option::Option::Some(4),
29738                Self::Created => std::option::Option::Some(5),
29739                Self::UnknownValue(u) => u.0.value(),
29740            }
29741        }
29742
29743        /// Gets the enum value as a string.
29744        ///
29745        /// Returns `None` if the enum contains an unknown value deserialized from
29746        /// the integer representation of enums.
29747        pub fn name(&self) -> std::option::Option<&str> {
29748            match self {
29749                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
29750                Self::Started => std::option::Option::Some("STARTED"),
29751                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
29752                Self::Failed => std::option::Option::Some("FAILED"),
29753                Self::Cancelled => std::option::Option::Some("CANCELLED"),
29754                Self::Created => std::option::Option::Some("CREATED"),
29755                Self::UnknownValue(u) => u.0.name(),
29756            }
29757        }
29758    }
29759
29760    impl std::default::Default for State {
29761        fn default() -> Self {
29762            use std::convert::From;
29763            Self::from(0)
29764        }
29765    }
29766
29767    impl std::fmt::Display for State {
29768        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29769            wkt::internal::display_enum(f, self.name(), self.value())
29770        }
29771    }
29772
29773    impl std::convert::From<i32> for State {
29774        fn from(value: i32) -> Self {
29775            match value {
29776                0 => Self::Unspecified,
29777                1 => Self::Started,
29778                2 => Self::Succeeded,
29779                3 => Self::Failed,
29780                4 => Self::Cancelled,
29781                5 => Self::Created,
29782                _ => Self::UnknownValue(state::UnknownValue(
29783                    wkt::internal::UnknownEnumValue::Integer(value),
29784                )),
29785            }
29786        }
29787    }
29788
29789    impl std::convert::From<&str> for State {
29790        fn from(value: &str) -> Self {
29791            use std::string::ToString;
29792            match value {
29793                "STATE_UNSPECIFIED" => Self::Unspecified,
29794                "STARTED" => Self::Started,
29795                "SUCCEEDED" => Self::Succeeded,
29796                "FAILED" => Self::Failed,
29797                "CANCELLED" => Self::Cancelled,
29798                "CREATED" => Self::Created,
29799                _ => Self::UnknownValue(state::UnknownValue(
29800                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29801                )),
29802            }
29803        }
29804    }
29805
29806    impl serde::ser::Serialize for State {
29807        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29808        where
29809            S: serde::Serializer,
29810        {
29811            match self {
29812                Self::Unspecified => serializer.serialize_i32(0),
29813                Self::Started => serializer.serialize_i32(1),
29814                Self::Succeeded => serializer.serialize_i32(2),
29815                Self::Failed => serializer.serialize_i32(3),
29816                Self::Cancelled => serializer.serialize_i32(4),
29817                Self::Created => serializer.serialize_i32(5),
29818                Self::UnknownValue(u) => u.0.serialize(serializer),
29819            }
29820        }
29821    }
29822
29823    impl<'de> serde::de::Deserialize<'de> for State {
29824        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29825        where
29826            D: serde::Deserializer<'de>,
29827        {
29828            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
29829                ".google.cloud.dataplex.v1.DataScanEvent.State",
29830            ))
29831        }
29832    }
29833
29834    /// The trigger type for the data scan.
29835    ///
29836    /// # Working with unknown values
29837    ///
29838    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29839    /// additional enum variants at any time. Adding new variants is not considered
29840    /// a breaking change. Applications should write their code in anticipation of:
29841    ///
29842    /// - New values appearing in future releases of the client library, **and**
29843    /// - New values received dynamically, without application changes.
29844    ///
29845    /// Please consult the [Working with enums] section in the user guide for some
29846    /// guidelines.
29847    ///
29848    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29849    #[derive(Clone, Debug, PartialEq)]
29850    #[non_exhaustive]
29851    pub enum Trigger {
29852        /// An unspecified trigger type.
29853        Unspecified,
29854        /// Data scan triggers on demand.
29855        OnDemand,
29856        /// Data scan triggers as per schedule.
29857        Schedule,
29858        /// If set, the enum was initialized with an unknown value.
29859        ///
29860        /// Applications can examine the value using [Trigger::value] or
29861        /// [Trigger::name].
29862        UnknownValue(trigger::UnknownValue),
29863    }
29864
29865    #[doc(hidden)]
29866    pub mod trigger {
29867        #[allow(unused_imports)]
29868        use super::*;
29869        #[derive(Clone, Debug, PartialEq)]
29870        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29871    }
29872
29873    impl Trigger {
29874        /// Gets the enum value.
29875        ///
29876        /// Returns `None` if the enum contains an unknown value deserialized from
29877        /// the string representation of enums.
29878        pub fn value(&self) -> std::option::Option<i32> {
29879            match self {
29880                Self::Unspecified => std::option::Option::Some(0),
29881                Self::OnDemand => std::option::Option::Some(1),
29882                Self::Schedule => std::option::Option::Some(2),
29883                Self::UnknownValue(u) => u.0.value(),
29884            }
29885        }
29886
29887        /// Gets the enum value as a string.
29888        ///
29889        /// Returns `None` if the enum contains an unknown value deserialized from
29890        /// the integer representation of enums.
29891        pub fn name(&self) -> std::option::Option<&str> {
29892            match self {
29893                Self::Unspecified => std::option::Option::Some("TRIGGER_UNSPECIFIED"),
29894                Self::OnDemand => std::option::Option::Some("ON_DEMAND"),
29895                Self::Schedule => std::option::Option::Some("SCHEDULE"),
29896                Self::UnknownValue(u) => u.0.name(),
29897            }
29898        }
29899    }
29900
29901    impl std::default::Default for Trigger {
29902        fn default() -> Self {
29903            use std::convert::From;
29904            Self::from(0)
29905        }
29906    }
29907
29908    impl std::fmt::Display for Trigger {
29909        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29910            wkt::internal::display_enum(f, self.name(), self.value())
29911        }
29912    }
29913
29914    impl std::convert::From<i32> for Trigger {
29915        fn from(value: i32) -> Self {
29916            match value {
29917                0 => Self::Unspecified,
29918                1 => Self::OnDemand,
29919                2 => Self::Schedule,
29920                _ => Self::UnknownValue(trigger::UnknownValue(
29921                    wkt::internal::UnknownEnumValue::Integer(value),
29922                )),
29923            }
29924        }
29925    }
29926
29927    impl std::convert::From<&str> for Trigger {
29928        fn from(value: &str) -> Self {
29929            use std::string::ToString;
29930            match value {
29931                "TRIGGER_UNSPECIFIED" => Self::Unspecified,
29932                "ON_DEMAND" => Self::OnDemand,
29933                "SCHEDULE" => Self::Schedule,
29934                _ => Self::UnknownValue(trigger::UnknownValue(
29935                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29936                )),
29937            }
29938        }
29939    }
29940
29941    impl serde::ser::Serialize for Trigger {
29942        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29943        where
29944            S: serde::Serializer,
29945        {
29946            match self {
29947                Self::Unspecified => serializer.serialize_i32(0),
29948                Self::OnDemand => serializer.serialize_i32(1),
29949                Self::Schedule => serializer.serialize_i32(2),
29950                Self::UnknownValue(u) => u.0.serialize(serializer),
29951            }
29952        }
29953    }
29954
29955    impl<'de> serde::de::Deserialize<'de> for Trigger {
29956        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29957        where
29958            D: serde::Deserializer<'de>,
29959        {
29960            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Trigger>::new(
29961                ".google.cloud.dataplex.v1.DataScanEvent.Trigger",
29962            ))
29963        }
29964    }
29965
29966    /// The scope of job for the data scan.
29967    ///
29968    /// # Working with unknown values
29969    ///
29970    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29971    /// additional enum variants at any time. Adding new variants is not considered
29972    /// a breaking change. Applications should write their code in anticipation of:
29973    ///
29974    /// - New values appearing in future releases of the client library, **and**
29975    /// - New values received dynamically, without application changes.
29976    ///
29977    /// Please consult the [Working with enums] section in the user guide for some
29978    /// guidelines.
29979    ///
29980    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29981    #[derive(Clone, Debug, PartialEq)]
29982    #[non_exhaustive]
29983    pub enum Scope {
29984        /// An unspecified scope type.
29985        Unspecified,
29986        /// Data scan runs on all of the data.
29987        Full,
29988        /// Data scan runs on incremental data.
29989        Incremental,
29990        /// If set, the enum was initialized with an unknown value.
29991        ///
29992        /// Applications can examine the value using [Scope::value] or
29993        /// [Scope::name].
29994        UnknownValue(scope::UnknownValue),
29995    }
29996
29997    #[doc(hidden)]
29998    pub mod scope {
29999        #[allow(unused_imports)]
30000        use super::*;
30001        #[derive(Clone, Debug, PartialEq)]
30002        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30003    }
30004
30005    impl Scope {
30006        /// Gets the enum value.
30007        ///
30008        /// Returns `None` if the enum contains an unknown value deserialized from
30009        /// the string representation of enums.
30010        pub fn value(&self) -> std::option::Option<i32> {
30011            match self {
30012                Self::Unspecified => std::option::Option::Some(0),
30013                Self::Full => std::option::Option::Some(1),
30014                Self::Incremental => std::option::Option::Some(2),
30015                Self::UnknownValue(u) => u.0.value(),
30016            }
30017        }
30018
30019        /// Gets the enum value as a string.
30020        ///
30021        /// Returns `None` if the enum contains an unknown value deserialized from
30022        /// the integer representation of enums.
30023        pub fn name(&self) -> std::option::Option<&str> {
30024            match self {
30025                Self::Unspecified => std::option::Option::Some("SCOPE_UNSPECIFIED"),
30026                Self::Full => std::option::Option::Some("FULL"),
30027                Self::Incremental => std::option::Option::Some("INCREMENTAL"),
30028                Self::UnknownValue(u) => u.0.name(),
30029            }
30030        }
30031    }
30032
30033    impl std::default::Default for Scope {
30034        fn default() -> Self {
30035            use std::convert::From;
30036            Self::from(0)
30037        }
30038    }
30039
30040    impl std::fmt::Display for Scope {
30041        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30042            wkt::internal::display_enum(f, self.name(), self.value())
30043        }
30044    }
30045
30046    impl std::convert::From<i32> for Scope {
30047        fn from(value: i32) -> Self {
30048            match value {
30049                0 => Self::Unspecified,
30050                1 => Self::Full,
30051                2 => Self::Incremental,
30052                _ => Self::UnknownValue(scope::UnknownValue(
30053                    wkt::internal::UnknownEnumValue::Integer(value),
30054                )),
30055            }
30056        }
30057    }
30058
30059    impl std::convert::From<&str> for Scope {
30060        fn from(value: &str) -> Self {
30061            use std::string::ToString;
30062            match value {
30063                "SCOPE_UNSPECIFIED" => Self::Unspecified,
30064                "FULL" => Self::Full,
30065                "INCREMENTAL" => Self::Incremental,
30066                _ => Self::UnknownValue(scope::UnknownValue(
30067                    wkt::internal::UnknownEnumValue::String(value.to_string()),
30068                )),
30069            }
30070        }
30071    }
30072
30073    impl serde::ser::Serialize for Scope {
30074        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30075        where
30076            S: serde::Serializer,
30077        {
30078            match self {
30079                Self::Unspecified => serializer.serialize_i32(0),
30080                Self::Full => serializer.serialize_i32(1),
30081                Self::Incremental => serializer.serialize_i32(2),
30082                Self::UnknownValue(u) => u.0.serialize(serializer),
30083            }
30084        }
30085    }
30086
30087    impl<'de> serde::de::Deserialize<'de> for Scope {
30088        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30089        where
30090            D: serde::Deserializer<'de>,
30091        {
30092            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
30093                ".google.cloud.dataplex.v1.DataScanEvent.Scope",
30094            ))
30095        }
30096    }
30097
30098    /// The result of the data scan job.
30099    #[derive(Clone, Debug, PartialEq)]
30100    #[non_exhaustive]
30101    pub enum Result {
30102        /// Data profile result for data profile type data scan.
30103        DataProfile(std::boxed::Box<crate::model::data_scan_event::DataProfileResult>),
30104        /// Data quality result for data quality type data scan.
30105        DataQuality(std::boxed::Box<crate::model::data_scan_event::DataQualityResult>),
30106    }
30107
30108    /// The applied configs in the data scan job.
30109    #[derive(Clone, Debug, PartialEq)]
30110    #[non_exhaustive]
30111    pub enum AppliedConfigs {
30112        /// Applied configs for data profile type data scan.
30113        DataProfileConfigs(
30114            std::boxed::Box<crate::model::data_scan_event::DataProfileAppliedConfigs>,
30115        ),
30116        /// Applied configs for data quality type data scan.
30117        DataQualityConfigs(
30118            std::boxed::Box<crate::model::data_scan_event::DataQualityAppliedConfigs>,
30119        ),
30120    }
30121}
30122
30123/// Information about the result of a data quality rule for data quality scan.
30124/// The monitored resource is 'DataScan'.
30125#[derive(Clone, Default, PartialEq)]
30126#[non_exhaustive]
30127pub struct DataQualityScanRuleResult {
30128    /// Identifier of the specific data scan job this log entry is for.
30129    pub job_id: std::string::String,
30130
30131    /// The data source of the data scan (e.g. BigQuery table name).
30132    pub data_source: std::string::String,
30133
30134    /// The column which this rule is evaluated against.
30135    pub column: std::string::String,
30136
30137    /// The name of the data quality rule.
30138    pub rule_name: std::string::String,
30139
30140    /// The type of the data quality rule.
30141    pub rule_type: crate::model::data_quality_scan_rule_result::RuleType,
30142
30143    /// The evaluation type of the data quality rule.
30144    pub evalution_type: crate::model::data_quality_scan_rule_result::EvaluationType,
30145
30146    /// The dimension of the data quality rule.
30147    pub rule_dimension: std::string::String,
30148
30149    /// The passing threshold ([0.0, 100.0]) of the data quality rule.
30150    pub threshold_percent: f64,
30151
30152    /// The result of the data quality rule.
30153    pub result: crate::model::data_quality_scan_rule_result::Result,
30154
30155    /// The number of rows evaluated against the data quality rule.
30156    /// This field is only valid for rules of PER_ROW evaluation type.
30157    pub evaluated_row_count: i64,
30158
30159    /// The number of rows which passed a rule evaluation.
30160    /// This field is only valid for rules of PER_ROW evaluation type.
30161    pub passed_row_count: i64,
30162
30163    /// The number of rows with null values in the specified column.
30164    pub null_row_count: i64,
30165
30166    /// The number of rows returned by the SQL statement in a SQL assertion rule.
30167    /// This field is only valid for SQL assertion rules.
30168    pub assertion_row_count: i64,
30169
30170    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30171}
30172
30173impl DataQualityScanRuleResult {
30174    pub fn new() -> Self {
30175        std::default::Default::default()
30176    }
30177
30178    /// Sets the value of [job_id][crate::model::DataQualityScanRuleResult::job_id].
30179    ///
30180    /// # Example
30181    /// ```ignore,no_run
30182    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30183    /// let x = DataQualityScanRuleResult::new().set_job_id("example");
30184    /// ```
30185    pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30186        self.job_id = v.into();
30187        self
30188    }
30189
30190    /// Sets the value of [data_source][crate::model::DataQualityScanRuleResult::data_source].
30191    ///
30192    /// # Example
30193    /// ```ignore,no_run
30194    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30195    /// let x = DataQualityScanRuleResult::new().set_data_source("example");
30196    /// ```
30197    pub fn set_data_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30198        self.data_source = v.into();
30199        self
30200    }
30201
30202    /// Sets the value of [column][crate::model::DataQualityScanRuleResult::column].
30203    ///
30204    /// # Example
30205    /// ```ignore,no_run
30206    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30207    /// let x = DataQualityScanRuleResult::new().set_column("example");
30208    /// ```
30209    pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30210        self.column = v.into();
30211        self
30212    }
30213
30214    /// Sets the value of [rule_name][crate::model::DataQualityScanRuleResult::rule_name].
30215    ///
30216    /// # Example
30217    /// ```ignore,no_run
30218    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30219    /// let x = DataQualityScanRuleResult::new().set_rule_name("example");
30220    /// ```
30221    pub fn set_rule_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30222        self.rule_name = v.into();
30223        self
30224    }
30225
30226    /// Sets the value of [rule_type][crate::model::DataQualityScanRuleResult::rule_type].
30227    ///
30228    /// # Example
30229    /// ```ignore,no_run
30230    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30231    /// use google_cloud_dataplex_v1::model::data_quality_scan_rule_result::RuleType;
30232    /// let x0 = DataQualityScanRuleResult::new().set_rule_type(RuleType::NonNullExpectation);
30233    /// let x1 = DataQualityScanRuleResult::new().set_rule_type(RuleType::RangeExpectation);
30234    /// let x2 = DataQualityScanRuleResult::new().set_rule_type(RuleType::RegexExpectation);
30235    /// ```
30236    pub fn set_rule_type<
30237        T: std::convert::Into<crate::model::data_quality_scan_rule_result::RuleType>,
30238    >(
30239        mut self,
30240        v: T,
30241    ) -> Self {
30242        self.rule_type = v.into();
30243        self
30244    }
30245
30246    /// Sets the value of [evalution_type][crate::model::DataQualityScanRuleResult::evalution_type].
30247    ///
30248    /// # Example
30249    /// ```ignore,no_run
30250    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30251    /// use google_cloud_dataplex_v1::model::data_quality_scan_rule_result::EvaluationType;
30252    /// let x0 = DataQualityScanRuleResult::new().set_evalution_type(EvaluationType::PerRow);
30253    /// let x1 = DataQualityScanRuleResult::new().set_evalution_type(EvaluationType::Aggregate);
30254    /// ```
30255    pub fn set_evalution_type<
30256        T: std::convert::Into<crate::model::data_quality_scan_rule_result::EvaluationType>,
30257    >(
30258        mut self,
30259        v: T,
30260    ) -> Self {
30261        self.evalution_type = v.into();
30262        self
30263    }
30264
30265    /// Sets the value of [rule_dimension][crate::model::DataQualityScanRuleResult::rule_dimension].
30266    ///
30267    /// # Example
30268    /// ```ignore,no_run
30269    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30270    /// let x = DataQualityScanRuleResult::new().set_rule_dimension("example");
30271    /// ```
30272    pub fn set_rule_dimension<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30273        self.rule_dimension = v.into();
30274        self
30275    }
30276
30277    /// Sets the value of [threshold_percent][crate::model::DataQualityScanRuleResult::threshold_percent].
30278    ///
30279    /// # Example
30280    /// ```ignore,no_run
30281    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30282    /// let x = DataQualityScanRuleResult::new().set_threshold_percent(42.0);
30283    /// ```
30284    pub fn set_threshold_percent<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
30285        self.threshold_percent = v.into();
30286        self
30287    }
30288
30289    /// Sets the value of [result][crate::model::DataQualityScanRuleResult::result].
30290    ///
30291    /// # Example
30292    /// ```ignore,no_run
30293    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30294    /// use google_cloud_dataplex_v1::model::data_quality_scan_rule_result::Result;
30295    /// let x0 = DataQualityScanRuleResult::new().set_result(Result::Passed);
30296    /// let x1 = DataQualityScanRuleResult::new().set_result(Result::Failed);
30297    /// ```
30298    pub fn set_result<
30299        T: std::convert::Into<crate::model::data_quality_scan_rule_result::Result>,
30300    >(
30301        mut self,
30302        v: T,
30303    ) -> Self {
30304        self.result = v.into();
30305        self
30306    }
30307
30308    /// Sets the value of [evaluated_row_count][crate::model::DataQualityScanRuleResult::evaluated_row_count].
30309    ///
30310    /// # Example
30311    /// ```ignore,no_run
30312    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30313    /// let x = DataQualityScanRuleResult::new().set_evaluated_row_count(42);
30314    /// ```
30315    pub fn set_evaluated_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
30316        self.evaluated_row_count = v.into();
30317        self
30318    }
30319
30320    /// Sets the value of [passed_row_count][crate::model::DataQualityScanRuleResult::passed_row_count].
30321    ///
30322    /// # Example
30323    /// ```ignore,no_run
30324    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30325    /// let x = DataQualityScanRuleResult::new().set_passed_row_count(42);
30326    /// ```
30327    pub fn set_passed_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
30328        self.passed_row_count = v.into();
30329        self
30330    }
30331
30332    /// Sets the value of [null_row_count][crate::model::DataQualityScanRuleResult::null_row_count].
30333    ///
30334    /// # Example
30335    /// ```ignore,no_run
30336    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30337    /// let x = DataQualityScanRuleResult::new().set_null_row_count(42);
30338    /// ```
30339    pub fn set_null_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
30340        self.null_row_count = v.into();
30341        self
30342    }
30343
30344    /// Sets the value of [assertion_row_count][crate::model::DataQualityScanRuleResult::assertion_row_count].
30345    ///
30346    /// # Example
30347    /// ```ignore,no_run
30348    /// # use google_cloud_dataplex_v1::model::DataQualityScanRuleResult;
30349    /// let x = DataQualityScanRuleResult::new().set_assertion_row_count(42);
30350    /// ```
30351    pub fn set_assertion_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
30352        self.assertion_row_count = v.into();
30353        self
30354    }
30355}
30356
30357impl wkt::message::Message for DataQualityScanRuleResult {
30358    fn typename() -> &'static str {
30359        "type.googleapis.com/google.cloud.dataplex.v1.DataQualityScanRuleResult"
30360    }
30361}
30362
30363/// Defines additional types related to [DataQualityScanRuleResult].
30364pub mod data_quality_scan_rule_result {
30365    #[allow(unused_imports)]
30366    use super::*;
30367
30368    /// The type of the data quality rule.
30369    ///
30370    /// # Working with unknown values
30371    ///
30372    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30373    /// additional enum variants at any time. Adding new variants is not considered
30374    /// a breaking change. Applications should write their code in anticipation of:
30375    ///
30376    /// - New values appearing in future releases of the client library, **and**
30377    /// - New values received dynamically, without application changes.
30378    ///
30379    /// Please consult the [Working with enums] section in the user guide for some
30380    /// guidelines.
30381    ///
30382    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30383    #[derive(Clone, Debug, PartialEq)]
30384    #[non_exhaustive]
30385    pub enum RuleType {
30386        /// An unspecified rule type.
30387        Unspecified,
30388        /// See
30389        /// [DataQualityRule.NonNullExpectation][google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation].
30390        ///
30391        /// [google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation]: crate::model::data_quality_rule::NonNullExpectation
30392        NonNullExpectation,
30393        /// See
30394        /// [DataQualityRule.RangeExpectation][google.cloud.dataplex.v1.DataQualityRule.RangeExpectation].
30395        ///
30396        /// [google.cloud.dataplex.v1.DataQualityRule.RangeExpectation]: crate::model::data_quality_rule::RangeExpectation
30397        RangeExpectation,
30398        /// See
30399        /// [DataQualityRule.RegexExpectation][google.cloud.dataplex.v1.DataQualityRule.RegexExpectation].
30400        ///
30401        /// [google.cloud.dataplex.v1.DataQualityRule.RegexExpectation]: crate::model::data_quality_rule::RegexExpectation
30402        RegexExpectation,
30403        /// See
30404        /// [DataQualityRule.RowConditionExpectation][google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation].
30405        ///
30406        /// [google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation]: crate::model::data_quality_rule::RowConditionExpectation
30407        RowConditionExpectation,
30408        /// See
30409        /// [DataQualityRule.SetExpectation][google.cloud.dataplex.v1.DataQualityRule.SetExpectation].
30410        ///
30411        /// [google.cloud.dataplex.v1.DataQualityRule.SetExpectation]: crate::model::data_quality_rule::SetExpectation
30412        SetExpectation,
30413        /// See
30414        /// [DataQualityRule.StatisticRangeExpectation][google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation].
30415        ///
30416        /// [google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation]: crate::model::data_quality_rule::StatisticRangeExpectation
30417        StatisticRangeExpectation,
30418        /// See
30419        /// [DataQualityRule.TableConditionExpectation][google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation].
30420        ///
30421        /// [google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation]: crate::model::data_quality_rule::TableConditionExpectation
30422        TableConditionExpectation,
30423        /// See
30424        /// [DataQualityRule.UniquenessExpectation][google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation].
30425        ///
30426        /// [google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation]: crate::model::data_quality_rule::UniquenessExpectation
30427        UniquenessExpectation,
30428        /// See
30429        /// [DataQualityRule.SqlAssertion][google.cloud.dataplex.v1.DataQualityRule.SqlAssertion].
30430        ///
30431        /// [google.cloud.dataplex.v1.DataQualityRule.SqlAssertion]: crate::model::data_quality_rule::SqlAssertion
30432        SqlAssertion,
30433        /// If set, the enum was initialized with an unknown value.
30434        ///
30435        /// Applications can examine the value using [RuleType::value] or
30436        /// [RuleType::name].
30437        UnknownValue(rule_type::UnknownValue),
30438    }
30439
30440    #[doc(hidden)]
30441    pub mod rule_type {
30442        #[allow(unused_imports)]
30443        use super::*;
30444        #[derive(Clone, Debug, PartialEq)]
30445        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30446    }
30447
30448    impl RuleType {
30449        /// Gets the enum value.
30450        ///
30451        /// Returns `None` if the enum contains an unknown value deserialized from
30452        /// the string representation of enums.
30453        pub fn value(&self) -> std::option::Option<i32> {
30454            match self {
30455                Self::Unspecified => std::option::Option::Some(0),
30456                Self::NonNullExpectation => std::option::Option::Some(1),
30457                Self::RangeExpectation => std::option::Option::Some(2),
30458                Self::RegexExpectation => std::option::Option::Some(3),
30459                Self::RowConditionExpectation => std::option::Option::Some(4),
30460                Self::SetExpectation => std::option::Option::Some(5),
30461                Self::StatisticRangeExpectation => std::option::Option::Some(6),
30462                Self::TableConditionExpectation => std::option::Option::Some(7),
30463                Self::UniquenessExpectation => std::option::Option::Some(8),
30464                Self::SqlAssertion => std::option::Option::Some(9),
30465                Self::UnknownValue(u) => u.0.value(),
30466            }
30467        }
30468
30469        /// Gets the enum value as a string.
30470        ///
30471        /// Returns `None` if the enum contains an unknown value deserialized from
30472        /// the integer representation of enums.
30473        pub fn name(&self) -> std::option::Option<&str> {
30474            match self {
30475                Self::Unspecified => std::option::Option::Some("RULE_TYPE_UNSPECIFIED"),
30476                Self::NonNullExpectation => std::option::Option::Some("NON_NULL_EXPECTATION"),
30477                Self::RangeExpectation => std::option::Option::Some("RANGE_EXPECTATION"),
30478                Self::RegexExpectation => std::option::Option::Some("REGEX_EXPECTATION"),
30479                Self::RowConditionExpectation => {
30480                    std::option::Option::Some("ROW_CONDITION_EXPECTATION")
30481                }
30482                Self::SetExpectation => std::option::Option::Some("SET_EXPECTATION"),
30483                Self::StatisticRangeExpectation => {
30484                    std::option::Option::Some("STATISTIC_RANGE_EXPECTATION")
30485                }
30486                Self::TableConditionExpectation => {
30487                    std::option::Option::Some("TABLE_CONDITION_EXPECTATION")
30488                }
30489                Self::UniquenessExpectation => std::option::Option::Some("UNIQUENESS_EXPECTATION"),
30490                Self::SqlAssertion => std::option::Option::Some("SQL_ASSERTION"),
30491                Self::UnknownValue(u) => u.0.name(),
30492            }
30493        }
30494    }
30495
30496    impl std::default::Default for RuleType {
30497        fn default() -> Self {
30498            use std::convert::From;
30499            Self::from(0)
30500        }
30501    }
30502
30503    impl std::fmt::Display for RuleType {
30504        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30505            wkt::internal::display_enum(f, self.name(), self.value())
30506        }
30507    }
30508
30509    impl std::convert::From<i32> for RuleType {
30510        fn from(value: i32) -> Self {
30511            match value {
30512                0 => Self::Unspecified,
30513                1 => Self::NonNullExpectation,
30514                2 => Self::RangeExpectation,
30515                3 => Self::RegexExpectation,
30516                4 => Self::RowConditionExpectation,
30517                5 => Self::SetExpectation,
30518                6 => Self::StatisticRangeExpectation,
30519                7 => Self::TableConditionExpectation,
30520                8 => Self::UniquenessExpectation,
30521                9 => Self::SqlAssertion,
30522                _ => Self::UnknownValue(rule_type::UnknownValue(
30523                    wkt::internal::UnknownEnumValue::Integer(value),
30524                )),
30525            }
30526        }
30527    }
30528
30529    impl std::convert::From<&str> for RuleType {
30530        fn from(value: &str) -> Self {
30531            use std::string::ToString;
30532            match value {
30533                "RULE_TYPE_UNSPECIFIED" => Self::Unspecified,
30534                "NON_NULL_EXPECTATION" => Self::NonNullExpectation,
30535                "RANGE_EXPECTATION" => Self::RangeExpectation,
30536                "REGEX_EXPECTATION" => Self::RegexExpectation,
30537                "ROW_CONDITION_EXPECTATION" => Self::RowConditionExpectation,
30538                "SET_EXPECTATION" => Self::SetExpectation,
30539                "STATISTIC_RANGE_EXPECTATION" => Self::StatisticRangeExpectation,
30540                "TABLE_CONDITION_EXPECTATION" => Self::TableConditionExpectation,
30541                "UNIQUENESS_EXPECTATION" => Self::UniquenessExpectation,
30542                "SQL_ASSERTION" => Self::SqlAssertion,
30543                _ => Self::UnknownValue(rule_type::UnknownValue(
30544                    wkt::internal::UnknownEnumValue::String(value.to_string()),
30545                )),
30546            }
30547        }
30548    }
30549
30550    impl serde::ser::Serialize for RuleType {
30551        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30552        where
30553            S: serde::Serializer,
30554        {
30555            match self {
30556                Self::Unspecified => serializer.serialize_i32(0),
30557                Self::NonNullExpectation => serializer.serialize_i32(1),
30558                Self::RangeExpectation => serializer.serialize_i32(2),
30559                Self::RegexExpectation => serializer.serialize_i32(3),
30560                Self::RowConditionExpectation => serializer.serialize_i32(4),
30561                Self::SetExpectation => serializer.serialize_i32(5),
30562                Self::StatisticRangeExpectation => serializer.serialize_i32(6),
30563                Self::TableConditionExpectation => serializer.serialize_i32(7),
30564                Self::UniquenessExpectation => serializer.serialize_i32(8),
30565                Self::SqlAssertion => serializer.serialize_i32(9),
30566                Self::UnknownValue(u) => u.0.serialize(serializer),
30567            }
30568        }
30569    }
30570
30571    impl<'de> serde::de::Deserialize<'de> for RuleType {
30572        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30573        where
30574            D: serde::Deserializer<'de>,
30575        {
30576            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RuleType>::new(
30577                ".google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType",
30578            ))
30579        }
30580    }
30581
30582    /// The evaluation type of the data quality rule.
30583    ///
30584    /// # Working with unknown values
30585    ///
30586    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30587    /// additional enum variants at any time. Adding new variants is not considered
30588    /// a breaking change. Applications should write their code in anticipation of:
30589    ///
30590    /// - New values appearing in future releases of the client library, **and**
30591    /// - New values received dynamically, without application changes.
30592    ///
30593    /// Please consult the [Working with enums] section in the user guide for some
30594    /// guidelines.
30595    ///
30596    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30597    #[derive(Clone, Debug, PartialEq)]
30598    #[non_exhaustive]
30599    pub enum EvaluationType {
30600        /// An unspecified evaluation type.
30601        Unspecified,
30602        /// The rule evaluation is done at per row level.
30603        PerRow,
30604        /// The rule evaluation is done for an aggregate of rows.
30605        Aggregate,
30606        /// If set, the enum was initialized with an unknown value.
30607        ///
30608        /// Applications can examine the value using [EvaluationType::value] or
30609        /// [EvaluationType::name].
30610        UnknownValue(evaluation_type::UnknownValue),
30611    }
30612
30613    #[doc(hidden)]
30614    pub mod evaluation_type {
30615        #[allow(unused_imports)]
30616        use super::*;
30617        #[derive(Clone, Debug, PartialEq)]
30618        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30619    }
30620
30621    impl EvaluationType {
30622        /// Gets the enum value.
30623        ///
30624        /// Returns `None` if the enum contains an unknown value deserialized from
30625        /// the string representation of enums.
30626        pub fn value(&self) -> std::option::Option<i32> {
30627            match self {
30628                Self::Unspecified => std::option::Option::Some(0),
30629                Self::PerRow => std::option::Option::Some(1),
30630                Self::Aggregate => std::option::Option::Some(2),
30631                Self::UnknownValue(u) => u.0.value(),
30632            }
30633        }
30634
30635        /// Gets the enum value as a string.
30636        ///
30637        /// Returns `None` if the enum contains an unknown value deserialized from
30638        /// the integer representation of enums.
30639        pub fn name(&self) -> std::option::Option<&str> {
30640            match self {
30641                Self::Unspecified => std::option::Option::Some("EVALUATION_TYPE_UNSPECIFIED"),
30642                Self::PerRow => std::option::Option::Some("PER_ROW"),
30643                Self::Aggregate => std::option::Option::Some("AGGREGATE"),
30644                Self::UnknownValue(u) => u.0.name(),
30645            }
30646        }
30647    }
30648
30649    impl std::default::Default for EvaluationType {
30650        fn default() -> Self {
30651            use std::convert::From;
30652            Self::from(0)
30653        }
30654    }
30655
30656    impl std::fmt::Display for EvaluationType {
30657        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30658            wkt::internal::display_enum(f, self.name(), self.value())
30659        }
30660    }
30661
30662    impl std::convert::From<i32> for EvaluationType {
30663        fn from(value: i32) -> Self {
30664            match value {
30665                0 => Self::Unspecified,
30666                1 => Self::PerRow,
30667                2 => Self::Aggregate,
30668                _ => Self::UnknownValue(evaluation_type::UnknownValue(
30669                    wkt::internal::UnknownEnumValue::Integer(value),
30670                )),
30671            }
30672        }
30673    }
30674
30675    impl std::convert::From<&str> for EvaluationType {
30676        fn from(value: &str) -> Self {
30677            use std::string::ToString;
30678            match value {
30679                "EVALUATION_TYPE_UNSPECIFIED" => Self::Unspecified,
30680                "PER_ROW" => Self::PerRow,
30681                "AGGREGATE" => Self::Aggregate,
30682                _ => Self::UnknownValue(evaluation_type::UnknownValue(
30683                    wkt::internal::UnknownEnumValue::String(value.to_string()),
30684                )),
30685            }
30686        }
30687    }
30688
30689    impl serde::ser::Serialize for EvaluationType {
30690        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30691        where
30692            S: serde::Serializer,
30693        {
30694            match self {
30695                Self::Unspecified => serializer.serialize_i32(0),
30696                Self::PerRow => serializer.serialize_i32(1),
30697                Self::Aggregate => serializer.serialize_i32(2),
30698                Self::UnknownValue(u) => u.0.serialize(serializer),
30699            }
30700        }
30701    }
30702
30703    impl<'de> serde::de::Deserialize<'de> for EvaluationType {
30704        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30705        where
30706            D: serde::Deserializer<'de>,
30707        {
30708            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EvaluationType>::new(
30709                ".google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType",
30710            ))
30711        }
30712    }
30713
30714    /// Whether the data quality rule passed or failed.
30715    ///
30716    /// # Working with unknown values
30717    ///
30718    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30719    /// additional enum variants at any time. Adding new variants is not considered
30720    /// a breaking change. Applications should write their code in anticipation of:
30721    ///
30722    /// - New values appearing in future releases of the client library, **and**
30723    /// - New values received dynamically, without application changes.
30724    ///
30725    /// Please consult the [Working with enums] section in the user guide for some
30726    /// guidelines.
30727    ///
30728    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30729    #[derive(Clone, Debug, PartialEq)]
30730    #[non_exhaustive]
30731    pub enum Result {
30732        /// An unspecified result.
30733        Unspecified,
30734        /// The data quality rule passed.
30735        Passed,
30736        /// The data quality rule failed.
30737        Failed,
30738        /// If set, the enum was initialized with an unknown value.
30739        ///
30740        /// Applications can examine the value using [Result::value] or
30741        /// [Result::name].
30742        UnknownValue(result::UnknownValue),
30743    }
30744
30745    #[doc(hidden)]
30746    pub mod result {
30747        #[allow(unused_imports)]
30748        use super::*;
30749        #[derive(Clone, Debug, PartialEq)]
30750        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30751    }
30752
30753    impl Result {
30754        /// Gets the enum value.
30755        ///
30756        /// Returns `None` if the enum contains an unknown value deserialized from
30757        /// the string representation of enums.
30758        pub fn value(&self) -> std::option::Option<i32> {
30759            match self {
30760                Self::Unspecified => std::option::Option::Some(0),
30761                Self::Passed => std::option::Option::Some(1),
30762                Self::Failed => std::option::Option::Some(2),
30763                Self::UnknownValue(u) => u.0.value(),
30764            }
30765        }
30766
30767        /// Gets the enum value as a string.
30768        ///
30769        /// Returns `None` if the enum contains an unknown value deserialized from
30770        /// the integer representation of enums.
30771        pub fn name(&self) -> std::option::Option<&str> {
30772            match self {
30773                Self::Unspecified => std::option::Option::Some("RESULT_UNSPECIFIED"),
30774                Self::Passed => std::option::Option::Some("PASSED"),
30775                Self::Failed => std::option::Option::Some("FAILED"),
30776                Self::UnknownValue(u) => u.0.name(),
30777            }
30778        }
30779    }
30780
30781    impl std::default::Default for Result {
30782        fn default() -> Self {
30783            use std::convert::From;
30784            Self::from(0)
30785        }
30786    }
30787
30788    impl std::fmt::Display for Result {
30789        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
30790            wkt::internal::display_enum(f, self.name(), self.value())
30791        }
30792    }
30793
30794    impl std::convert::From<i32> for Result {
30795        fn from(value: i32) -> Self {
30796            match value {
30797                0 => Self::Unspecified,
30798                1 => Self::Passed,
30799                2 => Self::Failed,
30800                _ => Self::UnknownValue(result::UnknownValue(
30801                    wkt::internal::UnknownEnumValue::Integer(value),
30802                )),
30803            }
30804        }
30805    }
30806
30807    impl std::convert::From<&str> for Result {
30808        fn from(value: &str) -> Self {
30809            use std::string::ToString;
30810            match value {
30811                "RESULT_UNSPECIFIED" => Self::Unspecified,
30812                "PASSED" => Self::Passed,
30813                "FAILED" => Self::Failed,
30814                _ => Self::UnknownValue(result::UnknownValue(
30815                    wkt::internal::UnknownEnumValue::String(value.to_string()),
30816                )),
30817            }
30818        }
30819    }
30820
30821    impl serde::ser::Serialize for Result {
30822        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30823        where
30824            S: serde::Serializer,
30825        {
30826            match self {
30827                Self::Unspecified => serializer.serialize_i32(0),
30828                Self::Passed => serializer.serialize_i32(1),
30829                Self::Failed => serializer.serialize_i32(2),
30830                Self::UnknownValue(u) => u.0.serialize(serializer),
30831            }
30832        }
30833    }
30834
30835    impl<'de> serde::de::Deserialize<'de> for Result {
30836        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30837        where
30838            D: serde::Deserializer<'de>,
30839        {
30840            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Result>::new(
30841                ".google.cloud.dataplex.v1.DataQualityScanRuleResult.Result",
30842            ))
30843        }
30844    }
30845}
30846
30847/// Payload associated with Business Glossary related log events.
30848#[derive(Clone, Default, PartialEq)]
30849#[non_exhaustive]
30850pub struct BusinessGlossaryEvent {
30851    /// The log message.
30852    pub message: std::string::String,
30853
30854    /// The type of the event.
30855    pub event_type: crate::model::business_glossary_event::EventType,
30856
30857    /// Name of the resource.
30858    pub resource: std::string::String,
30859
30860    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30861}
30862
30863impl BusinessGlossaryEvent {
30864    pub fn new() -> Self {
30865        std::default::Default::default()
30866    }
30867
30868    /// Sets the value of [message][crate::model::BusinessGlossaryEvent::message].
30869    ///
30870    /// # Example
30871    /// ```ignore,no_run
30872    /// # use google_cloud_dataplex_v1::model::BusinessGlossaryEvent;
30873    /// let x = BusinessGlossaryEvent::new().set_message("example");
30874    /// ```
30875    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30876        self.message = v.into();
30877        self
30878    }
30879
30880    /// Sets the value of [event_type][crate::model::BusinessGlossaryEvent::event_type].
30881    ///
30882    /// # Example
30883    /// ```ignore,no_run
30884    /// # use google_cloud_dataplex_v1::model::BusinessGlossaryEvent;
30885    /// use google_cloud_dataplex_v1::model::business_glossary_event::EventType;
30886    /// let x0 = BusinessGlossaryEvent::new().set_event_type(EventType::GlossaryCreate);
30887    /// let x1 = BusinessGlossaryEvent::new().set_event_type(EventType::GlossaryUpdate);
30888    /// let x2 = BusinessGlossaryEvent::new().set_event_type(EventType::GlossaryDelete);
30889    /// ```
30890    pub fn set_event_type<
30891        T: std::convert::Into<crate::model::business_glossary_event::EventType>,
30892    >(
30893        mut self,
30894        v: T,
30895    ) -> Self {
30896        self.event_type = v.into();
30897        self
30898    }
30899
30900    /// Sets the value of [resource][crate::model::BusinessGlossaryEvent::resource].
30901    ///
30902    /// # Example
30903    /// ```ignore,no_run
30904    /// # use google_cloud_dataplex_v1::model::BusinessGlossaryEvent;
30905    /// let x = BusinessGlossaryEvent::new().set_resource("example");
30906    /// ```
30907    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30908        self.resource = v.into();
30909        self
30910    }
30911}
30912
30913impl wkt::message::Message for BusinessGlossaryEvent {
30914    fn typename() -> &'static str {
30915        "type.googleapis.com/google.cloud.dataplex.v1.BusinessGlossaryEvent"
30916    }
30917}
30918
30919/// Defines additional types related to [BusinessGlossaryEvent].
30920pub mod business_glossary_event {
30921    #[allow(unused_imports)]
30922    use super::*;
30923
30924    /// Type of glossary log event.
30925    ///
30926    /// # Working with unknown values
30927    ///
30928    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30929    /// additional enum variants at any time. Adding new variants is not considered
30930    /// a breaking change. Applications should write their code in anticipation of:
30931    ///
30932    /// - New values appearing in future releases of the client library, **and**
30933    /// - New values received dynamically, without application changes.
30934    ///
30935    /// Please consult the [Working with enums] section in the user guide for some
30936    /// guidelines.
30937    ///
30938    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30939    #[derive(Clone, Debug, PartialEq)]
30940    #[non_exhaustive]
30941    pub enum EventType {
30942        /// An unspecified event type.
30943        Unspecified,
30944        /// Glossary create event.
30945        GlossaryCreate,
30946        /// Glossary update event.
30947        GlossaryUpdate,
30948        /// Glossary delete event.
30949        GlossaryDelete,
30950        /// Glossary category create event.
30951        GlossaryCategoryCreate,
30952        /// Glossary category update event.
30953        GlossaryCategoryUpdate,
30954        /// Glossary category delete event.
30955        GlossaryCategoryDelete,
30956        /// Glossary term create event.
30957        GlossaryTermCreate,
30958        /// Glossary term update event.
30959        GlossaryTermUpdate,
30960        /// Glossary term delete event.
30961        GlossaryTermDelete,
30962        /// If set, the enum was initialized with an unknown value.
30963        ///
30964        /// Applications can examine the value using [EventType::value] or
30965        /// [EventType::name].
30966        UnknownValue(event_type::UnknownValue),
30967    }
30968
30969    #[doc(hidden)]
30970    pub mod event_type {
30971        #[allow(unused_imports)]
30972        use super::*;
30973        #[derive(Clone, Debug, PartialEq)]
30974        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30975    }
30976
30977    impl EventType {
30978        /// Gets the enum value.
30979        ///
30980        /// Returns `None` if the enum contains an unknown value deserialized from
30981        /// the string representation of enums.
30982        pub fn value(&self) -> std::option::Option<i32> {
30983            match self {
30984                Self::Unspecified => std::option::Option::Some(0),
30985                Self::GlossaryCreate => std::option::Option::Some(1),
30986                Self::GlossaryUpdate => std::option::Option::Some(2),
30987                Self::GlossaryDelete => std::option::Option::Some(3),
30988                Self::GlossaryCategoryCreate => std::option::Option::Some(4),
30989                Self::GlossaryCategoryUpdate => std::option::Option::Some(5),
30990                Self::GlossaryCategoryDelete => std::option::Option::Some(6),
30991                Self::GlossaryTermCreate => std::option::Option::Some(7),
30992                Self::GlossaryTermUpdate => std::option::Option::Some(8),
30993                Self::GlossaryTermDelete => std::option::Option::Some(9),
30994                Self::UnknownValue(u) => u.0.value(),
30995            }
30996        }
30997
30998        /// Gets the enum value as a string.
30999        ///
31000        /// Returns `None` if the enum contains an unknown value deserialized from
31001        /// the integer representation of enums.
31002        pub fn name(&self) -> std::option::Option<&str> {
31003            match self {
31004                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
31005                Self::GlossaryCreate => std::option::Option::Some("GLOSSARY_CREATE"),
31006                Self::GlossaryUpdate => std::option::Option::Some("GLOSSARY_UPDATE"),
31007                Self::GlossaryDelete => std::option::Option::Some("GLOSSARY_DELETE"),
31008                Self::GlossaryCategoryCreate => {
31009                    std::option::Option::Some("GLOSSARY_CATEGORY_CREATE")
31010                }
31011                Self::GlossaryCategoryUpdate => {
31012                    std::option::Option::Some("GLOSSARY_CATEGORY_UPDATE")
31013                }
31014                Self::GlossaryCategoryDelete => {
31015                    std::option::Option::Some("GLOSSARY_CATEGORY_DELETE")
31016                }
31017                Self::GlossaryTermCreate => std::option::Option::Some("GLOSSARY_TERM_CREATE"),
31018                Self::GlossaryTermUpdate => std::option::Option::Some("GLOSSARY_TERM_UPDATE"),
31019                Self::GlossaryTermDelete => std::option::Option::Some("GLOSSARY_TERM_DELETE"),
31020                Self::UnknownValue(u) => u.0.name(),
31021            }
31022        }
31023    }
31024
31025    impl std::default::Default for EventType {
31026        fn default() -> Self {
31027            use std::convert::From;
31028            Self::from(0)
31029        }
31030    }
31031
31032    impl std::fmt::Display for EventType {
31033        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
31034            wkt::internal::display_enum(f, self.name(), self.value())
31035        }
31036    }
31037
31038    impl std::convert::From<i32> for EventType {
31039        fn from(value: i32) -> Self {
31040            match value {
31041                0 => Self::Unspecified,
31042                1 => Self::GlossaryCreate,
31043                2 => Self::GlossaryUpdate,
31044                3 => Self::GlossaryDelete,
31045                4 => Self::GlossaryCategoryCreate,
31046                5 => Self::GlossaryCategoryUpdate,
31047                6 => Self::GlossaryCategoryDelete,
31048                7 => Self::GlossaryTermCreate,
31049                8 => Self::GlossaryTermUpdate,
31050                9 => Self::GlossaryTermDelete,
31051                _ => Self::UnknownValue(event_type::UnknownValue(
31052                    wkt::internal::UnknownEnumValue::Integer(value),
31053                )),
31054            }
31055        }
31056    }
31057
31058    impl std::convert::From<&str> for EventType {
31059        fn from(value: &str) -> Self {
31060            use std::string::ToString;
31061            match value {
31062                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
31063                "GLOSSARY_CREATE" => Self::GlossaryCreate,
31064                "GLOSSARY_UPDATE" => Self::GlossaryUpdate,
31065                "GLOSSARY_DELETE" => Self::GlossaryDelete,
31066                "GLOSSARY_CATEGORY_CREATE" => Self::GlossaryCategoryCreate,
31067                "GLOSSARY_CATEGORY_UPDATE" => Self::GlossaryCategoryUpdate,
31068                "GLOSSARY_CATEGORY_DELETE" => Self::GlossaryCategoryDelete,
31069                "GLOSSARY_TERM_CREATE" => Self::GlossaryTermCreate,
31070                "GLOSSARY_TERM_UPDATE" => Self::GlossaryTermUpdate,
31071                "GLOSSARY_TERM_DELETE" => Self::GlossaryTermDelete,
31072                _ => Self::UnknownValue(event_type::UnknownValue(
31073                    wkt::internal::UnknownEnumValue::String(value.to_string()),
31074                )),
31075            }
31076        }
31077    }
31078
31079    impl serde::ser::Serialize for EventType {
31080        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31081        where
31082            S: serde::Serializer,
31083        {
31084            match self {
31085                Self::Unspecified => serializer.serialize_i32(0),
31086                Self::GlossaryCreate => serializer.serialize_i32(1),
31087                Self::GlossaryUpdate => serializer.serialize_i32(2),
31088                Self::GlossaryDelete => serializer.serialize_i32(3),
31089                Self::GlossaryCategoryCreate => serializer.serialize_i32(4),
31090                Self::GlossaryCategoryUpdate => serializer.serialize_i32(5),
31091                Self::GlossaryCategoryDelete => serializer.serialize_i32(6),
31092                Self::GlossaryTermCreate => serializer.serialize_i32(7),
31093                Self::GlossaryTermUpdate => serializer.serialize_i32(8),
31094                Self::GlossaryTermDelete => serializer.serialize_i32(9),
31095                Self::UnknownValue(u) => u.0.serialize(serializer),
31096            }
31097        }
31098    }
31099
31100    impl<'de> serde::de::Deserialize<'de> for EventType {
31101        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31102        where
31103            D: serde::Deserializer<'de>,
31104        {
31105            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
31106                ".google.cloud.dataplex.v1.BusinessGlossaryEvent.EventType",
31107            ))
31108        }
31109    }
31110}
31111
31112/// Payload associated with Entry related log events.
31113#[derive(Clone, Default, PartialEq)]
31114#[non_exhaustive]
31115pub struct EntryLinkEvent {
31116    /// The log message.
31117    pub message: std::string::String,
31118
31119    /// The type of the event.
31120    pub event_type: crate::model::entry_link_event::EventType,
31121
31122    /// Name of the resource.
31123    pub resource: std::string::String,
31124
31125    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31126}
31127
31128impl EntryLinkEvent {
31129    pub fn new() -> Self {
31130        std::default::Default::default()
31131    }
31132
31133    /// Sets the value of [message][crate::model::EntryLinkEvent::message].
31134    ///
31135    /// # Example
31136    /// ```ignore,no_run
31137    /// # use google_cloud_dataplex_v1::model::EntryLinkEvent;
31138    /// let x = EntryLinkEvent::new().set_message("example");
31139    /// ```
31140    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31141        self.message = v.into();
31142        self
31143    }
31144
31145    /// Sets the value of [event_type][crate::model::EntryLinkEvent::event_type].
31146    ///
31147    /// # Example
31148    /// ```ignore,no_run
31149    /// # use google_cloud_dataplex_v1::model::EntryLinkEvent;
31150    /// use google_cloud_dataplex_v1::model::entry_link_event::EventType;
31151    /// let x0 = EntryLinkEvent::new().set_event_type(EventType::EntryLinkCreate);
31152    /// let x1 = EntryLinkEvent::new().set_event_type(EventType::EntryLinkDelete);
31153    /// ```
31154    pub fn set_event_type<T: std::convert::Into<crate::model::entry_link_event::EventType>>(
31155        mut self,
31156        v: T,
31157    ) -> Self {
31158        self.event_type = v.into();
31159        self
31160    }
31161
31162    /// Sets the value of [resource][crate::model::EntryLinkEvent::resource].
31163    ///
31164    /// # Example
31165    /// ```ignore,no_run
31166    /// # use google_cloud_dataplex_v1::model::EntryLinkEvent;
31167    /// let x = EntryLinkEvent::new().set_resource("example");
31168    /// ```
31169    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31170        self.resource = v.into();
31171        self
31172    }
31173}
31174
31175impl wkt::message::Message for EntryLinkEvent {
31176    fn typename() -> &'static str {
31177        "type.googleapis.com/google.cloud.dataplex.v1.EntryLinkEvent"
31178    }
31179}
31180
31181/// Defines additional types related to [EntryLinkEvent].
31182pub mod entry_link_event {
31183    #[allow(unused_imports)]
31184    use super::*;
31185
31186    /// Type of entry link log event.
31187    ///
31188    /// # Working with unknown values
31189    ///
31190    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
31191    /// additional enum variants at any time. Adding new variants is not considered
31192    /// a breaking change. Applications should write their code in anticipation of:
31193    ///
31194    /// - New values appearing in future releases of the client library, **and**
31195    /// - New values received dynamically, without application changes.
31196    ///
31197    /// Please consult the [Working with enums] section in the user guide for some
31198    /// guidelines.
31199    ///
31200    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
31201    #[derive(Clone, Debug, PartialEq)]
31202    #[non_exhaustive]
31203    pub enum EventType {
31204        /// An unspecified event type.
31205        Unspecified,
31206        /// EntryLink create event.
31207        EntryLinkCreate,
31208        /// EntryLink delete event.
31209        EntryLinkDelete,
31210        /// If set, the enum was initialized with an unknown value.
31211        ///
31212        /// Applications can examine the value using [EventType::value] or
31213        /// [EventType::name].
31214        UnknownValue(event_type::UnknownValue),
31215    }
31216
31217    #[doc(hidden)]
31218    pub mod event_type {
31219        #[allow(unused_imports)]
31220        use super::*;
31221        #[derive(Clone, Debug, PartialEq)]
31222        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31223    }
31224
31225    impl EventType {
31226        /// Gets the enum value.
31227        ///
31228        /// Returns `None` if the enum contains an unknown value deserialized from
31229        /// the string representation of enums.
31230        pub fn value(&self) -> std::option::Option<i32> {
31231            match self {
31232                Self::Unspecified => std::option::Option::Some(0),
31233                Self::EntryLinkCreate => std::option::Option::Some(1),
31234                Self::EntryLinkDelete => std::option::Option::Some(2),
31235                Self::UnknownValue(u) => u.0.value(),
31236            }
31237        }
31238
31239        /// Gets the enum value as a string.
31240        ///
31241        /// Returns `None` if the enum contains an unknown value deserialized from
31242        /// the integer representation of enums.
31243        pub fn name(&self) -> std::option::Option<&str> {
31244            match self {
31245                Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
31246                Self::EntryLinkCreate => std::option::Option::Some("ENTRY_LINK_CREATE"),
31247                Self::EntryLinkDelete => std::option::Option::Some("ENTRY_LINK_DELETE"),
31248                Self::UnknownValue(u) => u.0.name(),
31249            }
31250        }
31251    }
31252
31253    impl std::default::Default for EventType {
31254        fn default() -> Self {
31255            use std::convert::From;
31256            Self::from(0)
31257        }
31258    }
31259
31260    impl std::fmt::Display for EventType {
31261        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
31262            wkt::internal::display_enum(f, self.name(), self.value())
31263        }
31264    }
31265
31266    impl std::convert::From<i32> for EventType {
31267        fn from(value: i32) -> Self {
31268            match value {
31269                0 => Self::Unspecified,
31270                1 => Self::EntryLinkCreate,
31271                2 => Self::EntryLinkDelete,
31272                _ => Self::UnknownValue(event_type::UnknownValue(
31273                    wkt::internal::UnknownEnumValue::Integer(value),
31274                )),
31275            }
31276        }
31277    }
31278
31279    impl std::convert::From<&str> for EventType {
31280        fn from(value: &str) -> Self {
31281            use std::string::ToString;
31282            match value {
31283                "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
31284                "ENTRY_LINK_CREATE" => Self::EntryLinkCreate,
31285                "ENTRY_LINK_DELETE" => Self::EntryLinkDelete,
31286                _ => Self::UnknownValue(event_type::UnknownValue(
31287                    wkt::internal::UnknownEnumValue::String(value.to_string()),
31288                )),
31289            }
31290        }
31291    }
31292
31293    impl serde::ser::Serialize for EventType {
31294        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31295        where
31296            S: serde::Serializer,
31297        {
31298            match self {
31299                Self::Unspecified => serializer.serialize_i32(0),
31300                Self::EntryLinkCreate => serializer.serialize_i32(1),
31301                Self::EntryLinkDelete => serializer.serialize_i32(2),
31302                Self::UnknownValue(u) => u.0.serialize(serializer),
31303            }
31304        }
31305    }
31306
31307    impl<'de> serde::de::Deserialize<'de> for EventType {
31308        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31309        where
31310            D: serde::Deserializer<'de>,
31311        {
31312            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
31313                ".google.cloud.dataplex.v1.EntryLinkEvent.EventType",
31314            ))
31315        }
31316    }
31317}
31318
31319/// Create a metadata entity request.
31320#[derive(Clone, Default, PartialEq)]
31321#[non_exhaustive]
31322pub struct CreateEntityRequest {
31323    /// Required. The resource name of the parent zone:
31324    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
31325    pub parent: std::string::String,
31326
31327    /// Required. Entity resource.
31328    pub entity: std::option::Option<crate::model::Entity>,
31329
31330    /// Optional. Only validate the request, but do not perform mutations.
31331    /// The default is false.
31332    pub validate_only: bool,
31333
31334    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31335}
31336
31337impl CreateEntityRequest {
31338    pub fn new() -> Self {
31339        std::default::Default::default()
31340    }
31341
31342    /// Sets the value of [parent][crate::model::CreateEntityRequest::parent].
31343    ///
31344    /// # Example
31345    /// ```ignore,no_run
31346    /// # use google_cloud_dataplex_v1::model::CreateEntityRequest;
31347    /// let x = CreateEntityRequest::new().set_parent("example");
31348    /// ```
31349    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31350        self.parent = v.into();
31351        self
31352    }
31353
31354    /// Sets the value of [entity][crate::model::CreateEntityRequest::entity].
31355    ///
31356    /// # Example
31357    /// ```ignore,no_run
31358    /// # use google_cloud_dataplex_v1::model::CreateEntityRequest;
31359    /// use google_cloud_dataplex_v1::model::Entity;
31360    /// let x = CreateEntityRequest::new().set_entity(Entity::default()/* use setters */);
31361    /// ```
31362    pub fn set_entity<T>(mut self, v: T) -> Self
31363    where
31364        T: std::convert::Into<crate::model::Entity>,
31365    {
31366        self.entity = std::option::Option::Some(v.into());
31367        self
31368    }
31369
31370    /// Sets or clears the value of [entity][crate::model::CreateEntityRequest::entity].
31371    ///
31372    /// # Example
31373    /// ```ignore,no_run
31374    /// # use google_cloud_dataplex_v1::model::CreateEntityRequest;
31375    /// use google_cloud_dataplex_v1::model::Entity;
31376    /// let x = CreateEntityRequest::new().set_or_clear_entity(Some(Entity::default()/* use setters */));
31377    /// let x = CreateEntityRequest::new().set_or_clear_entity(None::<Entity>);
31378    /// ```
31379    pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
31380    where
31381        T: std::convert::Into<crate::model::Entity>,
31382    {
31383        self.entity = v.map(|x| x.into());
31384        self
31385    }
31386
31387    /// Sets the value of [validate_only][crate::model::CreateEntityRequest::validate_only].
31388    ///
31389    /// # Example
31390    /// ```ignore,no_run
31391    /// # use google_cloud_dataplex_v1::model::CreateEntityRequest;
31392    /// let x = CreateEntityRequest::new().set_validate_only(true);
31393    /// ```
31394    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
31395        self.validate_only = v.into();
31396        self
31397    }
31398}
31399
31400impl wkt::message::Message for CreateEntityRequest {
31401    fn typename() -> &'static str {
31402        "type.googleapis.com/google.cloud.dataplex.v1.CreateEntityRequest"
31403    }
31404}
31405
31406/// Update a metadata entity request.
31407/// The exiting entity will be fully replaced by the entity in the request.
31408/// The entity ID is mutable. To modify the ID, use the current entity ID in the
31409/// request URL and specify the new ID in the request body.
31410#[derive(Clone, Default, PartialEq)]
31411#[non_exhaustive]
31412pub struct UpdateEntityRequest {
31413    /// Required. Update description.
31414    pub entity: std::option::Option<crate::model::Entity>,
31415
31416    /// Optional. Only validate the request, but do not perform mutations.
31417    /// The default is false.
31418    pub validate_only: bool,
31419
31420    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31421}
31422
31423impl UpdateEntityRequest {
31424    pub fn new() -> Self {
31425        std::default::Default::default()
31426    }
31427
31428    /// Sets the value of [entity][crate::model::UpdateEntityRequest::entity].
31429    ///
31430    /// # Example
31431    /// ```ignore,no_run
31432    /// # use google_cloud_dataplex_v1::model::UpdateEntityRequest;
31433    /// use google_cloud_dataplex_v1::model::Entity;
31434    /// let x = UpdateEntityRequest::new().set_entity(Entity::default()/* use setters */);
31435    /// ```
31436    pub fn set_entity<T>(mut self, v: T) -> Self
31437    where
31438        T: std::convert::Into<crate::model::Entity>,
31439    {
31440        self.entity = std::option::Option::Some(v.into());
31441        self
31442    }
31443
31444    /// Sets or clears the value of [entity][crate::model::UpdateEntityRequest::entity].
31445    ///
31446    /// # Example
31447    /// ```ignore,no_run
31448    /// # use google_cloud_dataplex_v1::model::UpdateEntityRequest;
31449    /// use google_cloud_dataplex_v1::model::Entity;
31450    /// let x = UpdateEntityRequest::new().set_or_clear_entity(Some(Entity::default()/* use setters */));
31451    /// let x = UpdateEntityRequest::new().set_or_clear_entity(None::<Entity>);
31452    /// ```
31453    pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
31454    where
31455        T: std::convert::Into<crate::model::Entity>,
31456    {
31457        self.entity = v.map(|x| x.into());
31458        self
31459    }
31460
31461    /// Sets the value of [validate_only][crate::model::UpdateEntityRequest::validate_only].
31462    ///
31463    /// # Example
31464    /// ```ignore,no_run
31465    /// # use google_cloud_dataplex_v1::model::UpdateEntityRequest;
31466    /// let x = UpdateEntityRequest::new().set_validate_only(true);
31467    /// ```
31468    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
31469        self.validate_only = v.into();
31470        self
31471    }
31472}
31473
31474impl wkt::message::Message for UpdateEntityRequest {
31475    fn typename() -> &'static str {
31476        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntityRequest"
31477    }
31478}
31479
31480/// Delete a metadata entity request.
31481#[derive(Clone, Default, PartialEq)]
31482#[non_exhaustive]
31483pub struct DeleteEntityRequest {
31484    /// Required. The resource name of the entity:
31485    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
31486    pub name: std::string::String,
31487
31488    /// Required. The etag associated with the entity, which can be retrieved with
31489    /// a [GetEntity][] request.
31490    pub etag: std::string::String,
31491
31492    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31493}
31494
31495impl DeleteEntityRequest {
31496    pub fn new() -> Self {
31497        std::default::Default::default()
31498    }
31499
31500    /// Sets the value of [name][crate::model::DeleteEntityRequest::name].
31501    ///
31502    /// # Example
31503    /// ```ignore,no_run
31504    /// # use google_cloud_dataplex_v1::model::DeleteEntityRequest;
31505    /// let x = DeleteEntityRequest::new().set_name("example");
31506    /// ```
31507    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31508        self.name = v.into();
31509        self
31510    }
31511
31512    /// Sets the value of [etag][crate::model::DeleteEntityRequest::etag].
31513    ///
31514    /// # Example
31515    /// ```ignore,no_run
31516    /// # use google_cloud_dataplex_v1::model::DeleteEntityRequest;
31517    /// let x = DeleteEntityRequest::new().set_etag("example");
31518    /// ```
31519    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31520        self.etag = v.into();
31521        self
31522    }
31523}
31524
31525impl wkt::message::Message for DeleteEntityRequest {
31526    fn typename() -> &'static str {
31527        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntityRequest"
31528    }
31529}
31530
31531/// List metadata entities request.
31532#[derive(Clone, Default, PartialEq)]
31533#[non_exhaustive]
31534pub struct ListEntitiesRequest {
31535    /// Required. The resource name of the parent zone:
31536    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
31537    pub parent: std::string::String,
31538
31539    /// Required. Specify the entity view to make a partial list request.
31540    pub view: crate::model::list_entities_request::EntityView,
31541
31542    /// Optional. Maximum number of entities to return. The service may return
31543    /// fewer than this value. If unspecified, 100 entities will be returned by
31544    /// default. The maximum value is 500; larger values will will be truncated to
31545    /// 500.
31546    pub page_size: i32,
31547
31548    /// Optional. Page token received from a previous `ListEntities` call. Provide
31549    /// this to retrieve the subsequent page. When paginating, all other parameters
31550    /// provided to `ListEntities` must match the call that provided the
31551    /// page token.
31552    pub page_token: std::string::String,
31553
31554    /// Optional. The following filter parameters can be added to the URL to limit
31555    /// the entities returned by the API:
31556    ///
31557    /// - Entity ID: ?filter="id=entityID"
31558    /// - Asset ID: ?filter="asset=assetID"
31559    /// - Data path ?filter="data_path=gs://my-bucket"
31560    /// - Is HIVE compatible: ?filter="hive_compatible=true"
31561    /// - Is BigQuery compatible: ?filter="bigquery_compatible=true"
31562    pub filter: std::string::String,
31563
31564    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31565}
31566
31567impl ListEntitiesRequest {
31568    pub fn new() -> Self {
31569        std::default::Default::default()
31570    }
31571
31572    /// Sets the value of [parent][crate::model::ListEntitiesRequest::parent].
31573    ///
31574    /// # Example
31575    /// ```ignore,no_run
31576    /// # use google_cloud_dataplex_v1::model::ListEntitiesRequest;
31577    /// let x = ListEntitiesRequest::new().set_parent("example");
31578    /// ```
31579    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31580        self.parent = v.into();
31581        self
31582    }
31583
31584    /// Sets the value of [view][crate::model::ListEntitiesRequest::view].
31585    ///
31586    /// # Example
31587    /// ```ignore,no_run
31588    /// # use google_cloud_dataplex_v1::model::ListEntitiesRequest;
31589    /// use google_cloud_dataplex_v1::model::list_entities_request::EntityView;
31590    /// let x0 = ListEntitiesRequest::new().set_view(EntityView::Tables);
31591    /// let x1 = ListEntitiesRequest::new().set_view(EntityView::Filesets);
31592    /// ```
31593    pub fn set_view<T: std::convert::Into<crate::model::list_entities_request::EntityView>>(
31594        mut self,
31595        v: T,
31596    ) -> Self {
31597        self.view = v.into();
31598        self
31599    }
31600
31601    /// Sets the value of [page_size][crate::model::ListEntitiesRequest::page_size].
31602    ///
31603    /// # Example
31604    /// ```ignore,no_run
31605    /// # use google_cloud_dataplex_v1::model::ListEntitiesRequest;
31606    /// let x = ListEntitiesRequest::new().set_page_size(42);
31607    /// ```
31608    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
31609        self.page_size = v.into();
31610        self
31611    }
31612
31613    /// Sets the value of [page_token][crate::model::ListEntitiesRequest::page_token].
31614    ///
31615    /// # Example
31616    /// ```ignore,no_run
31617    /// # use google_cloud_dataplex_v1::model::ListEntitiesRequest;
31618    /// let x = ListEntitiesRequest::new().set_page_token("example");
31619    /// ```
31620    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31621        self.page_token = v.into();
31622        self
31623    }
31624
31625    /// Sets the value of [filter][crate::model::ListEntitiesRequest::filter].
31626    ///
31627    /// # Example
31628    /// ```ignore,no_run
31629    /// # use google_cloud_dataplex_v1::model::ListEntitiesRequest;
31630    /// let x = ListEntitiesRequest::new().set_filter("example");
31631    /// ```
31632    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31633        self.filter = v.into();
31634        self
31635    }
31636}
31637
31638impl wkt::message::Message for ListEntitiesRequest {
31639    fn typename() -> &'static str {
31640        "type.googleapis.com/google.cloud.dataplex.v1.ListEntitiesRequest"
31641    }
31642}
31643
31644/// Defines additional types related to [ListEntitiesRequest].
31645pub mod list_entities_request {
31646    #[allow(unused_imports)]
31647    use super::*;
31648
31649    /// Entity views.
31650    ///
31651    /// # Working with unknown values
31652    ///
31653    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
31654    /// additional enum variants at any time. Adding new variants is not considered
31655    /// a breaking change. Applications should write their code in anticipation of:
31656    ///
31657    /// - New values appearing in future releases of the client library, **and**
31658    /// - New values received dynamically, without application changes.
31659    ///
31660    /// Please consult the [Working with enums] section in the user guide for some
31661    /// guidelines.
31662    ///
31663    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
31664    #[derive(Clone, Debug, PartialEq)]
31665    #[non_exhaustive]
31666    pub enum EntityView {
31667        /// The default unset value. Return both table and fileset entities
31668        /// if unspecified.
31669        Unspecified,
31670        /// Only list table entities.
31671        Tables,
31672        /// Only list fileset entities.
31673        Filesets,
31674        /// If set, the enum was initialized with an unknown value.
31675        ///
31676        /// Applications can examine the value using [EntityView::value] or
31677        /// [EntityView::name].
31678        UnknownValue(entity_view::UnknownValue),
31679    }
31680
31681    #[doc(hidden)]
31682    pub mod entity_view {
31683        #[allow(unused_imports)]
31684        use super::*;
31685        #[derive(Clone, Debug, PartialEq)]
31686        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31687    }
31688
31689    impl EntityView {
31690        /// Gets the enum value.
31691        ///
31692        /// Returns `None` if the enum contains an unknown value deserialized from
31693        /// the string representation of enums.
31694        pub fn value(&self) -> std::option::Option<i32> {
31695            match self {
31696                Self::Unspecified => std::option::Option::Some(0),
31697                Self::Tables => std::option::Option::Some(1),
31698                Self::Filesets => std::option::Option::Some(2),
31699                Self::UnknownValue(u) => u.0.value(),
31700            }
31701        }
31702
31703        /// Gets the enum value as a string.
31704        ///
31705        /// Returns `None` if the enum contains an unknown value deserialized from
31706        /// the integer representation of enums.
31707        pub fn name(&self) -> std::option::Option<&str> {
31708            match self {
31709                Self::Unspecified => std::option::Option::Some("ENTITY_VIEW_UNSPECIFIED"),
31710                Self::Tables => std::option::Option::Some("TABLES"),
31711                Self::Filesets => std::option::Option::Some("FILESETS"),
31712                Self::UnknownValue(u) => u.0.name(),
31713            }
31714        }
31715    }
31716
31717    impl std::default::Default for EntityView {
31718        fn default() -> Self {
31719            use std::convert::From;
31720            Self::from(0)
31721        }
31722    }
31723
31724    impl std::fmt::Display for EntityView {
31725        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
31726            wkt::internal::display_enum(f, self.name(), self.value())
31727        }
31728    }
31729
31730    impl std::convert::From<i32> for EntityView {
31731        fn from(value: i32) -> Self {
31732            match value {
31733                0 => Self::Unspecified,
31734                1 => Self::Tables,
31735                2 => Self::Filesets,
31736                _ => Self::UnknownValue(entity_view::UnknownValue(
31737                    wkt::internal::UnknownEnumValue::Integer(value),
31738                )),
31739            }
31740        }
31741    }
31742
31743    impl std::convert::From<&str> for EntityView {
31744        fn from(value: &str) -> Self {
31745            use std::string::ToString;
31746            match value {
31747                "ENTITY_VIEW_UNSPECIFIED" => Self::Unspecified,
31748                "TABLES" => Self::Tables,
31749                "FILESETS" => Self::Filesets,
31750                _ => Self::UnknownValue(entity_view::UnknownValue(
31751                    wkt::internal::UnknownEnumValue::String(value.to_string()),
31752                )),
31753            }
31754        }
31755    }
31756
31757    impl serde::ser::Serialize for EntityView {
31758        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31759        where
31760            S: serde::Serializer,
31761        {
31762            match self {
31763                Self::Unspecified => serializer.serialize_i32(0),
31764                Self::Tables => serializer.serialize_i32(1),
31765                Self::Filesets => serializer.serialize_i32(2),
31766                Self::UnknownValue(u) => u.0.serialize(serializer),
31767            }
31768        }
31769    }
31770
31771    impl<'de> serde::de::Deserialize<'de> for EntityView {
31772        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31773        where
31774            D: serde::Deserializer<'de>,
31775        {
31776            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityView>::new(
31777                ".google.cloud.dataplex.v1.ListEntitiesRequest.EntityView",
31778            ))
31779        }
31780    }
31781}
31782
31783/// List metadata entities response.
31784#[derive(Clone, Default, PartialEq)]
31785#[non_exhaustive]
31786pub struct ListEntitiesResponse {
31787    /// Entities in the specified parent zone.
31788    pub entities: std::vec::Vec<crate::model::Entity>,
31789
31790    /// Token to retrieve the next page of results, or empty if there are no
31791    /// remaining results in the list.
31792    pub next_page_token: std::string::String,
31793
31794    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31795}
31796
31797impl ListEntitiesResponse {
31798    pub fn new() -> Self {
31799        std::default::Default::default()
31800    }
31801
31802    /// Sets the value of [entities][crate::model::ListEntitiesResponse::entities].
31803    ///
31804    /// # Example
31805    /// ```ignore,no_run
31806    /// # use google_cloud_dataplex_v1::model::ListEntitiesResponse;
31807    /// use google_cloud_dataplex_v1::model::Entity;
31808    /// let x = ListEntitiesResponse::new()
31809    ///     .set_entities([
31810    ///         Entity::default()/* use setters */,
31811    ///         Entity::default()/* use (different) setters */,
31812    ///     ]);
31813    /// ```
31814    pub fn set_entities<T, V>(mut self, v: T) -> Self
31815    where
31816        T: std::iter::IntoIterator<Item = V>,
31817        V: std::convert::Into<crate::model::Entity>,
31818    {
31819        use std::iter::Iterator;
31820        self.entities = v.into_iter().map(|i| i.into()).collect();
31821        self
31822    }
31823
31824    /// Sets the value of [next_page_token][crate::model::ListEntitiesResponse::next_page_token].
31825    ///
31826    /// # Example
31827    /// ```ignore,no_run
31828    /// # use google_cloud_dataplex_v1::model::ListEntitiesResponse;
31829    /// let x = ListEntitiesResponse::new().set_next_page_token("example");
31830    /// ```
31831    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31832        self.next_page_token = v.into();
31833        self
31834    }
31835}
31836
31837impl wkt::message::Message for ListEntitiesResponse {
31838    fn typename() -> &'static str {
31839        "type.googleapis.com/google.cloud.dataplex.v1.ListEntitiesResponse"
31840    }
31841}
31842
31843#[doc(hidden)]
31844impl google_cloud_gax::paginator::internal::PageableResponse for ListEntitiesResponse {
31845    type PageItem = crate::model::Entity;
31846
31847    fn items(self) -> std::vec::Vec<Self::PageItem> {
31848        self.entities
31849    }
31850
31851    fn next_page_token(&self) -> std::string::String {
31852        use std::clone::Clone;
31853        self.next_page_token.clone()
31854    }
31855}
31856
31857/// Get metadata entity request.
31858#[derive(Clone, Default, PartialEq)]
31859#[non_exhaustive]
31860pub struct GetEntityRequest {
31861    /// Required. The resource name of the entity:
31862    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.`
31863    pub name: std::string::String,
31864
31865    /// Optional. Used to select the subset of entity information to return.
31866    /// Defaults to `BASIC`.
31867    pub view: crate::model::get_entity_request::EntityView,
31868
31869    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31870}
31871
31872impl GetEntityRequest {
31873    pub fn new() -> Self {
31874        std::default::Default::default()
31875    }
31876
31877    /// Sets the value of [name][crate::model::GetEntityRequest::name].
31878    ///
31879    /// # Example
31880    /// ```ignore,no_run
31881    /// # use google_cloud_dataplex_v1::model::GetEntityRequest;
31882    /// let x = GetEntityRequest::new().set_name("example");
31883    /// ```
31884    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31885        self.name = v.into();
31886        self
31887    }
31888
31889    /// Sets the value of [view][crate::model::GetEntityRequest::view].
31890    ///
31891    /// # Example
31892    /// ```ignore,no_run
31893    /// # use google_cloud_dataplex_v1::model::GetEntityRequest;
31894    /// use google_cloud_dataplex_v1::model::get_entity_request::EntityView;
31895    /// let x0 = GetEntityRequest::new().set_view(EntityView::Basic);
31896    /// let x1 = GetEntityRequest::new().set_view(EntityView::Schema);
31897    /// let x2 = GetEntityRequest::new().set_view(EntityView::Full);
31898    /// ```
31899    pub fn set_view<T: std::convert::Into<crate::model::get_entity_request::EntityView>>(
31900        mut self,
31901        v: T,
31902    ) -> Self {
31903        self.view = v.into();
31904        self
31905    }
31906}
31907
31908impl wkt::message::Message for GetEntityRequest {
31909    fn typename() -> &'static str {
31910        "type.googleapis.com/google.cloud.dataplex.v1.GetEntityRequest"
31911    }
31912}
31913
31914/// Defines additional types related to [GetEntityRequest].
31915pub mod get_entity_request {
31916    #[allow(unused_imports)]
31917    use super::*;
31918
31919    /// Entity views for get entity partial result.
31920    ///
31921    /// # Working with unknown values
31922    ///
31923    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
31924    /// additional enum variants at any time. Adding new variants is not considered
31925    /// a breaking change. Applications should write their code in anticipation of:
31926    ///
31927    /// - New values appearing in future releases of the client library, **and**
31928    /// - New values received dynamically, without application changes.
31929    ///
31930    /// Please consult the [Working with enums] section in the user guide for some
31931    /// guidelines.
31932    ///
31933    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
31934    #[derive(Clone, Debug, PartialEq)]
31935    #[non_exhaustive]
31936    pub enum EntityView {
31937        /// The API will default to the `BASIC` view.
31938        Unspecified,
31939        /// Minimal view that does not include the schema.
31940        Basic,
31941        /// Include basic information and schema.
31942        Schema,
31943        /// Include everything. Currently, this is the same as the SCHEMA view.
31944        Full,
31945        /// If set, the enum was initialized with an unknown value.
31946        ///
31947        /// Applications can examine the value using [EntityView::value] or
31948        /// [EntityView::name].
31949        UnknownValue(entity_view::UnknownValue),
31950    }
31951
31952    #[doc(hidden)]
31953    pub mod entity_view {
31954        #[allow(unused_imports)]
31955        use super::*;
31956        #[derive(Clone, Debug, PartialEq)]
31957        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31958    }
31959
31960    impl EntityView {
31961        /// Gets the enum value.
31962        ///
31963        /// Returns `None` if the enum contains an unknown value deserialized from
31964        /// the string representation of enums.
31965        pub fn value(&self) -> std::option::Option<i32> {
31966            match self {
31967                Self::Unspecified => std::option::Option::Some(0),
31968                Self::Basic => std::option::Option::Some(1),
31969                Self::Schema => std::option::Option::Some(2),
31970                Self::Full => std::option::Option::Some(4),
31971                Self::UnknownValue(u) => u.0.value(),
31972            }
31973        }
31974
31975        /// Gets the enum value as a string.
31976        ///
31977        /// Returns `None` if the enum contains an unknown value deserialized from
31978        /// the integer representation of enums.
31979        pub fn name(&self) -> std::option::Option<&str> {
31980            match self {
31981                Self::Unspecified => std::option::Option::Some("ENTITY_VIEW_UNSPECIFIED"),
31982                Self::Basic => std::option::Option::Some("BASIC"),
31983                Self::Schema => std::option::Option::Some("SCHEMA"),
31984                Self::Full => std::option::Option::Some("FULL"),
31985                Self::UnknownValue(u) => u.0.name(),
31986            }
31987        }
31988    }
31989
31990    impl std::default::Default for EntityView {
31991        fn default() -> Self {
31992            use std::convert::From;
31993            Self::from(0)
31994        }
31995    }
31996
31997    impl std::fmt::Display for EntityView {
31998        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
31999            wkt::internal::display_enum(f, self.name(), self.value())
32000        }
32001    }
32002
32003    impl std::convert::From<i32> for EntityView {
32004        fn from(value: i32) -> Self {
32005            match value {
32006                0 => Self::Unspecified,
32007                1 => Self::Basic,
32008                2 => Self::Schema,
32009                4 => Self::Full,
32010                _ => Self::UnknownValue(entity_view::UnknownValue(
32011                    wkt::internal::UnknownEnumValue::Integer(value),
32012                )),
32013            }
32014        }
32015    }
32016
32017    impl std::convert::From<&str> for EntityView {
32018        fn from(value: &str) -> Self {
32019            use std::string::ToString;
32020            match value {
32021                "ENTITY_VIEW_UNSPECIFIED" => Self::Unspecified,
32022                "BASIC" => Self::Basic,
32023                "SCHEMA" => Self::Schema,
32024                "FULL" => Self::Full,
32025                _ => Self::UnknownValue(entity_view::UnknownValue(
32026                    wkt::internal::UnknownEnumValue::String(value.to_string()),
32027                )),
32028            }
32029        }
32030    }
32031
32032    impl serde::ser::Serialize for EntityView {
32033        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
32034        where
32035            S: serde::Serializer,
32036        {
32037            match self {
32038                Self::Unspecified => serializer.serialize_i32(0),
32039                Self::Basic => serializer.serialize_i32(1),
32040                Self::Schema => serializer.serialize_i32(2),
32041                Self::Full => serializer.serialize_i32(4),
32042                Self::UnknownValue(u) => u.0.serialize(serializer),
32043            }
32044        }
32045    }
32046
32047    impl<'de> serde::de::Deserialize<'de> for EntityView {
32048        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
32049        where
32050            D: serde::Deserializer<'de>,
32051        {
32052            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityView>::new(
32053                ".google.cloud.dataplex.v1.GetEntityRequest.EntityView",
32054            ))
32055        }
32056    }
32057}
32058
32059/// List metadata partitions request.
32060#[derive(Clone, Default, PartialEq)]
32061#[non_exhaustive]
32062pub struct ListPartitionsRequest {
32063    /// Required. The resource name of the parent entity:
32064    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
32065    pub parent: std::string::String,
32066
32067    /// Optional. Maximum number of partitions to return. The service may return
32068    /// fewer than this value. If unspecified, 100 partitions will be returned by
32069    /// default. The maximum page size is 500; larger values will will be truncated
32070    /// to 500.
32071    pub page_size: i32,
32072
32073    /// Optional. Page token received from a previous `ListPartitions` call.
32074    /// Provide this to retrieve the subsequent page. When paginating, all other
32075    /// parameters provided to `ListPartitions` must match the call that provided
32076    /// the page token.
32077    pub page_token: std::string::String,
32078
32079    /// Optional. Filter the partitions returned to the caller using a key value
32080    /// pair expression. Supported operators and syntax:
32081    ///
32082    /// - logic operators: AND, OR
32083    /// - comparison operators: <, >, >=, <= ,=, !=
32084    /// - LIKE operators:
32085    ///   - The right hand of a LIKE operator supports "." and
32086    ///     "*" for wildcard searches, for example "value1 LIKE ".*oo.*"
32087    /// - parenthetical grouping: ( )
32088    ///
32089    /// Sample filter expression: `?filter="key1 < value1 OR key2 > value2"
32090    ///
32091    /// **Notes:**
32092    ///
32093    /// - Keys to the left of operators are case insensitive.
32094    /// - Partition results are sorted first by creation time, then by
32095    ///   lexicographic order.
32096    /// - Up to 20 key value filter pairs are allowed, but due to performance
32097    ///   considerations, only the first 10 will be used as a filter.
32098    pub filter: std::string::String,
32099
32100    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32101}
32102
32103impl ListPartitionsRequest {
32104    pub fn new() -> Self {
32105        std::default::Default::default()
32106    }
32107
32108    /// Sets the value of [parent][crate::model::ListPartitionsRequest::parent].
32109    ///
32110    /// # Example
32111    /// ```ignore,no_run
32112    /// # use google_cloud_dataplex_v1::model::ListPartitionsRequest;
32113    /// let x = ListPartitionsRequest::new().set_parent("example");
32114    /// ```
32115    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32116        self.parent = v.into();
32117        self
32118    }
32119
32120    /// Sets the value of [page_size][crate::model::ListPartitionsRequest::page_size].
32121    ///
32122    /// # Example
32123    /// ```ignore,no_run
32124    /// # use google_cloud_dataplex_v1::model::ListPartitionsRequest;
32125    /// let x = ListPartitionsRequest::new().set_page_size(42);
32126    /// ```
32127    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
32128        self.page_size = v.into();
32129        self
32130    }
32131
32132    /// Sets the value of [page_token][crate::model::ListPartitionsRequest::page_token].
32133    ///
32134    /// # Example
32135    /// ```ignore,no_run
32136    /// # use google_cloud_dataplex_v1::model::ListPartitionsRequest;
32137    /// let x = ListPartitionsRequest::new().set_page_token("example");
32138    /// ```
32139    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32140        self.page_token = v.into();
32141        self
32142    }
32143
32144    /// Sets the value of [filter][crate::model::ListPartitionsRequest::filter].
32145    ///
32146    /// # Example
32147    /// ```ignore,no_run
32148    /// # use google_cloud_dataplex_v1::model::ListPartitionsRequest;
32149    /// let x = ListPartitionsRequest::new().set_filter("example");
32150    /// ```
32151    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32152        self.filter = v.into();
32153        self
32154    }
32155}
32156
32157impl wkt::message::Message for ListPartitionsRequest {
32158    fn typename() -> &'static str {
32159        "type.googleapis.com/google.cloud.dataplex.v1.ListPartitionsRequest"
32160    }
32161}
32162
32163/// Create metadata partition request.
32164#[derive(Clone, Default, PartialEq)]
32165#[non_exhaustive]
32166pub struct CreatePartitionRequest {
32167    /// Required. The resource name of the parent zone:
32168    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
32169    pub parent: std::string::String,
32170
32171    /// Required. Partition resource.
32172    pub partition: std::option::Option<crate::model::Partition>,
32173
32174    /// Optional. Only validate the request, but do not perform mutations.
32175    /// The default is false.
32176    pub validate_only: bool,
32177
32178    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32179}
32180
32181impl CreatePartitionRequest {
32182    pub fn new() -> Self {
32183        std::default::Default::default()
32184    }
32185
32186    /// Sets the value of [parent][crate::model::CreatePartitionRequest::parent].
32187    ///
32188    /// # Example
32189    /// ```ignore,no_run
32190    /// # use google_cloud_dataplex_v1::model::CreatePartitionRequest;
32191    /// let x = CreatePartitionRequest::new().set_parent("example");
32192    /// ```
32193    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32194        self.parent = v.into();
32195        self
32196    }
32197
32198    /// Sets the value of [partition][crate::model::CreatePartitionRequest::partition].
32199    ///
32200    /// # Example
32201    /// ```ignore,no_run
32202    /// # use google_cloud_dataplex_v1::model::CreatePartitionRequest;
32203    /// use google_cloud_dataplex_v1::model::Partition;
32204    /// let x = CreatePartitionRequest::new().set_partition(Partition::default()/* use setters */);
32205    /// ```
32206    pub fn set_partition<T>(mut self, v: T) -> Self
32207    where
32208        T: std::convert::Into<crate::model::Partition>,
32209    {
32210        self.partition = std::option::Option::Some(v.into());
32211        self
32212    }
32213
32214    /// Sets or clears the value of [partition][crate::model::CreatePartitionRequest::partition].
32215    ///
32216    /// # Example
32217    /// ```ignore,no_run
32218    /// # use google_cloud_dataplex_v1::model::CreatePartitionRequest;
32219    /// use google_cloud_dataplex_v1::model::Partition;
32220    /// let x = CreatePartitionRequest::new().set_or_clear_partition(Some(Partition::default()/* use setters */));
32221    /// let x = CreatePartitionRequest::new().set_or_clear_partition(None::<Partition>);
32222    /// ```
32223    pub fn set_or_clear_partition<T>(mut self, v: std::option::Option<T>) -> Self
32224    where
32225        T: std::convert::Into<crate::model::Partition>,
32226    {
32227        self.partition = v.map(|x| x.into());
32228        self
32229    }
32230
32231    /// Sets the value of [validate_only][crate::model::CreatePartitionRequest::validate_only].
32232    ///
32233    /// # Example
32234    /// ```ignore,no_run
32235    /// # use google_cloud_dataplex_v1::model::CreatePartitionRequest;
32236    /// let x = CreatePartitionRequest::new().set_validate_only(true);
32237    /// ```
32238    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32239        self.validate_only = v.into();
32240        self
32241    }
32242}
32243
32244impl wkt::message::Message for CreatePartitionRequest {
32245    fn typename() -> &'static str {
32246        "type.googleapis.com/google.cloud.dataplex.v1.CreatePartitionRequest"
32247    }
32248}
32249
32250/// Delete metadata partition request.
32251#[derive(Clone, Default, PartialEq)]
32252#[non_exhaustive]
32253pub struct DeletePartitionRequest {
32254    /// Required. The resource name of the partition.
32255    /// format:
32256    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`.
32257    /// The {partition_value_path} segment consists of an ordered sequence of
32258    /// partition values separated by "/". All values must be provided.
32259    pub name: std::string::String,
32260
32261    /// Optional. The etag associated with the partition.
32262    #[deprecated]
32263    pub etag: std::string::String,
32264
32265    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32266}
32267
32268impl DeletePartitionRequest {
32269    pub fn new() -> Self {
32270        std::default::Default::default()
32271    }
32272
32273    /// Sets the value of [name][crate::model::DeletePartitionRequest::name].
32274    ///
32275    /// # Example
32276    /// ```ignore,no_run
32277    /// # use google_cloud_dataplex_v1::model::DeletePartitionRequest;
32278    /// let x = DeletePartitionRequest::new().set_name("example");
32279    /// ```
32280    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32281        self.name = v.into();
32282        self
32283    }
32284
32285    /// Sets the value of [etag][crate::model::DeletePartitionRequest::etag].
32286    ///
32287    /// # Example
32288    /// ```ignore,no_run
32289    /// # use google_cloud_dataplex_v1::model::DeletePartitionRequest;
32290    /// let x = DeletePartitionRequest::new().set_etag("example");
32291    /// ```
32292    #[deprecated]
32293    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32294        self.etag = v.into();
32295        self
32296    }
32297}
32298
32299impl wkt::message::Message for DeletePartitionRequest {
32300    fn typename() -> &'static str {
32301        "type.googleapis.com/google.cloud.dataplex.v1.DeletePartitionRequest"
32302    }
32303}
32304
32305/// List metadata partitions response.
32306#[derive(Clone, Default, PartialEq)]
32307#[non_exhaustive]
32308pub struct ListPartitionsResponse {
32309    /// Partitions under the specified parent entity.
32310    pub partitions: std::vec::Vec<crate::model::Partition>,
32311
32312    /// Token to retrieve the next page of results, or empty if there are no
32313    /// remaining results in the list.
32314    pub next_page_token: std::string::String,
32315
32316    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32317}
32318
32319impl ListPartitionsResponse {
32320    pub fn new() -> Self {
32321        std::default::Default::default()
32322    }
32323
32324    /// Sets the value of [partitions][crate::model::ListPartitionsResponse::partitions].
32325    ///
32326    /// # Example
32327    /// ```ignore,no_run
32328    /// # use google_cloud_dataplex_v1::model::ListPartitionsResponse;
32329    /// use google_cloud_dataplex_v1::model::Partition;
32330    /// let x = ListPartitionsResponse::new()
32331    ///     .set_partitions([
32332    ///         Partition::default()/* use setters */,
32333    ///         Partition::default()/* use (different) setters */,
32334    ///     ]);
32335    /// ```
32336    pub fn set_partitions<T, V>(mut self, v: T) -> Self
32337    where
32338        T: std::iter::IntoIterator<Item = V>,
32339        V: std::convert::Into<crate::model::Partition>,
32340    {
32341        use std::iter::Iterator;
32342        self.partitions = v.into_iter().map(|i| i.into()).collect();
32343        self
32344    }
32345
32346    /// Sets the value of [next_page_token][crate::model::ListPartitionsResponse::next_page_token].
32347    ///
32348    /// # Example
32349    /// ```ignore,no_run
32350    /// # use google_cloud_dataplex_v1::model::ListPartitionsResponse;
32351    /// let x = ListPartitionsResponse::new().set_next_page_token("example");
32352    /// ```
32353    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32354        self.next_page_token = v.into();
32355        self
32356    }
32357}
32358
32359impl wkt::message::Message for ListPartitionsResponse {
32360    fn typename() -> &'static str {
32361        "type.googleapis.com/google.cloud.dataplex.v1.ListPartitionsResponse"
32362    }
32363}
32364
32365#[doc(hidden)]
32366impl google_cloud_gax::paginator::internal::PageableResponse for ListPartitionsResponse {
32367    type PageItem = crate::model::Partition;
32368
32369    fn items(self) -> std::vec::Vec<Self::PageItem> {
32370        self.partitions
32371    }
32372
32373    fn next_page_token(&self) -> std::string::String {
32374        use std::clone::Clone;
32375        self.next_page_token.clone()
32376    }
32377}
32378
32379/// Get metadata partition request.
32380#[derive(Clone, Default, PartialEq)]
32381#[non_exhaustive]
32382pub struct GetPartitionRequest {
32383    /// Required. The resource name of the partition:
32384    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`.
32385    /// The {partition_value_path} segment consists of an ordered sequence of
32386    /// partition values separated by "/". All values must be provided.
32387    pub name: std::string::String,
32388
32389    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32390}
32391
32392impl GetPartitionRequest {
32393    pub fn new() -> Self {
32394        std::default::Default::default()
32395    }
32396
32397    /// Sets the value of [name][crate::model::GetPartitionRequest::name].
32398    ///
32399    /// # Example
32400    /// ```ignore,no_run
32401    /// # use google_cloud_dataplex_v1::model::GetPartitionRequest;
32402    /// let x = GetPartitionRequest::new().set_name("example");
32403    /// ```
32404    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32405        self.name = v.into();
32406        self
32407    }
32408}
32409
32410impl wkt::message::Message for GetPartitionRequest {
32411    fn typename() -> &'static str {
32412        "type.googleapis.com/google.cloud.dataplex.v1.GetPartitionRequest"
32413    }
32414}
32415
32416/// Represents tables and fileset metadata contained within a zone.
32417#[derive(Clone, Default, PartialEq)]
32418#[non_exhaustive]
32419pub struct Entity {
32420    /// Output only. The resource name of the entity, of the form:
32421    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`.
32422    pub name: std::string::String,
32423
32424    /// Optional. Display name must be shorter than or equal to 256 characters.
32425    pub display_name: std::string::String,
32426
32427    /// Optional. User friendly longer description text. Must be shorter than or
32428    /// equal to 1024 characters.
32429    pub description: std::string::String,
32430
32431    /// Output only. The time when the entity was created.
32432    pub create_time: std::option::Option<wkt::Timestamp>,
32433
32434    /// Output only. The time when the entity was last updated.
32435    pub update_time: std::option::Option<wkt::Timestamp>,
32436
32437    /// Required. A user-provided entity ID. It is mutable, and will be used as the
32438    /// published table name. Specifying a new ID in an update entity
32439    /// request will override the existing value.
32440    /// The ID must contain only letters (a-z, A-Z), numbers (0-9), and
32441    /// underscores, and consist of 256 or fewer characters.
32442    pub id: std::string::String,
32443
32444    /// Optional. The etag associated with the entity, which can be retrieved with
32445    /// a [GetEntity][] request. Required for update and delete requests.
32446    pub etag: std::string::String,
32447
32448    /// Required. Immutable. The type of entity.
32449    pub r#type: crate::model::entity::Type,
32450
32451    /// Required. Immutable. The ID of the asset associated with the storage
32452    /// location containing the entity data. The entity must be with in the same
32453    /// zone with the asset.
32454    pub asset: std::string::String,
32455
32456    /// Required. Immutable. The storage path of the entity data.
32457    /// For Cloud Storage data, this is the fully-qualified path to the entity,
32458    /// such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of
32459    /// the table resource, such as
32460    /// `projects/project_id/datasets/dataset_id/tables/table_id`.
32461    pub data_path: std::string::String,
32462
32463    /// Optional. The set of items within the data path constituting the data in
32464    /// the entity, represented as a glob path. Example:
32465    /// `gs://bucket/path/to/data/**/*.csv`.
32466    pub data_path_pattern: std::string::String,
32467
32468    /// Output only. The name of the associated Data Catalog entry.
32469    pub catalog_entry: std::string::String,
32470
32471    /// Required. Immutable. Identifies the storage system of the entity data.
32472    pub system: crate::model::StorageSystem,
32473
32474    /// Required. Identifies the storage format of the entity data.
32475    /// It does not apply to entities with data stored in BigQuery.
32476    pub format: std::option::Option<crate::model::StorageFormat>,
32477
32478    /// Output only. Metadata stores that the entity is compatible with.
32479    pub compatibility: std::option::Option<crate::model::entity::CompatibilityStatus>,
32480
32481    /// Output only. Identifies the access mechanism to the entity. Not user
32482    /// settable.
32483    pub access: std::option::Option<crate::model::StorageAccess>,
32484
32485    /// Output only. System generated unique ID for the Entity. This ID will be
32486    /// different if the Entity is deleted and re-created with the same name.
32487    pub uid: std::string::String,
32488
32489    /// Required. The description of the data structure and layout.
32490    /// The schema is not included in list responses. It is only included in
32491    /// `SCHEMA` and `FULL` entity views of a `GetEntity` response.
32492    pub schema: std::option::Option<crate::model::Schema>,
32493
32494    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32495}
32496
32497impl Entity {
32498    pub fn new() -> Self {
32499        std::default::Default::default()
32500    }
32501
32502    /// Sets the value of [name][crate::model::Entity::name].
32503    ///
32504    /// # Example
32505    /// ```ignore,no_run
32506    /// # use google_cloud_dataplex_v1::model::Entity;
32507    /// let x = Entity::new().set_name("example");
32508    /// ```
32509    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32510        self.name = v.into();
32511        self
32512    }
32513
32514    /// Sets the value of [display_name][crate::model::Entity::display_name].
32515    ///
32516    /// # Example
32517    /// ```ignore,no_run
32518    /// # use google_cloud_dataplex_v1::model::Entity;
32519    /// let x = Entity::new().set_display_name("example");
32520    /// ```
32521    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32522        self.display_name = v.into();
32523        self
32524    }
32525
32526    /// Sets the value of [description][crate::model::Entity::description].
32527    ///
32528    /// # Example
32529    /// ```ignore,no_run
32530    /// # use google_cloud_dataplex_v1::model::Entity;
32531    /// let x = Entity::new().set_description("example");
32532    /// ```
32533    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32534        self.description = v.into();
32535        self
32536    }
32537
32538    /// Sets the value of [create_time][crate::model::Entity::create_time].
32539    ///
32540    /// # Example
32541    /// ```ignore,no_run
32542    /// # use google_cloud_dataplex_v1::model::Entity;
32543    /// use wkt::Timestamp;
32544    /// let x = Entity::new().set_create_time(Timestamp::default()/* use setters */);
32545    /// ```
32546    pub fn set_create_time<T>(mut self, v: T) -> Self
32547    where
32548        T: std::convert::Into<wkt::Timestamp>,
32549    {
32550        self.create_time = std::option::Option::Some(v.into());
32551        self
32552    }
32553
32554    /// Sets or clears the value of [create_time][crate::model::Entity::create_time].
32555    ///
32556    /// # Example
32557    /// ```ignore,no_run
32558    /// # use google_cloud_dataplex_v1::model::Entity;
32559    /// use wkt::Timestamp;
32560    /// let x = Entity::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
32561    /// let x = Entity::new().set_or_clear_create_time(None::<Timestamp>);
32562    /// ```
32563    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
32564    where
32565        T: std::convert::Into<wkt::Timestamp>,
32566    {
32567        self.create_time = v.map(|x| x.into());
32568        self
32569    }
32570
32571    /// Sets the value of [update_time][crate::model::Entity::update_time].
32572    ///
32573    /// # Example
32574    /// ```ignore,no_run
32575    /// # use google_cloud_dataplex_v1::model::Entity;
32576    /// use wkt::Timestamp;
32577    /// let x = Entity::new().set_update_time(Timestamp::default()/* use setters */);
32578    /// ```
32579    pub fn set_update_time<T>(mut self, v: T) -> Self
32580    where
32581        T: std::convert::Into<wkt::Timestamp>,
32582    {
32583        self.update_time = std::option::Option::Some(v.into());
32584        self
32585    }
32586
32587    /// Sets or clears the value of [update_time][crate::model::Entity::update_time].
32588    ///
32589    /// # Example
32590    /// ```ignore,no_run
32591    /// # use google_cloud_dataplex_v1::model::Entity;
32592    /// use wkt::Timestamp;
32593    /// let x = Entity::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
32594    /// let x = Entity::new().set_or_clear_update_time(None::<Timestamp>);
32595    /// ```
32596    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
32597    where
32598        T: std::convert::Into<wkt::Timestamp>,
32599    {
32600        self.update_time = v.map(|x| x.into());
32601        self
32602    }
32603
32604    /// Sets the value of [id][crate::model::Entity::id].
32605    ///
32606    /// # Example
32607    /// ```ignore,no_run
32608    /// # use google_cloud_dataplex_v1::model::Entity;
32609    /// let x = Entity::new().set_id("example");
32610    /// ```
32611    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32612        self.id = v.into();
32613        self
32614    }
32615
32616    /// Sets the value of [etag][crate::model::Entity::etag].
32617    ///
32618    /// # Example
32619    /// ```ignore,no_run
32620    /// # use google_cloud_dataplex_v1::model::Entity;
32621    /// let x = Entity::new().set_etag("example");
32622    /// ```
32623    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32624        self.etag = v.into();
32625        self
32626    }
32627
32628    /// Sets the value of [r#type][crate::model::Entity::type].
32629    ///
32630    /// # Example
32631    /// ```ignore,no_run
32632    /// # use google_cloud_dataplex_v1::model::Entity;
32633    /// use google_cloud_dataplex_v1::model::entity::Type;
32634    /// let x0 = Entity::new().set_type(Type::Table);
32635    /// let x1 = Entity::new().set_type(Type::Fileset);
32636    /// ```
32637    pub fn set_type<T: std::convert::Into<crate::model::entity::Type>>(mut self, v: T) -> Self {
32638        self.r#type = v.into();
32639        self
32640    }
32641
32642    /// Sets the value of [asset][crate::model::Entity::asset].
32643    ///
32644    /// # Example
32645    /// ```ignore,no_run
32646    /// # use google_cloud_dataplex_v1::model::Entity;
32647    /// let x = Entity::new().set_asset("example");
32648    /// ```
32649    pub fn set_asset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32650        self.asset = v.into();
32651        self
32652    }
32653
32654    /// Sets the value of [data_path][crate::model::Entity::data_path].
32655    ///
32656    /// # Example
32657    /// ```ignore,no_run
32658    /// # use google_cloud_dataplex_v1::model::Entity;
32659    /// let x = Entity::new().set_data_path("example");
32660    /// ```
32661    pub fn set_data_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32662        self.data_path = v.into();
32663        self
32664    }
32665
32666    /// Sets the value of [data_path_pattern][crate::model::Entity::data_path_pattern].
32667    ///
32668    /// # Example
32669    /// ```ignore,no_run
32670    /// # use google_cloud_dataplex_v1::model::Entity;
32671    /// let x = Entity::new().set_data_path_pattern("example");
32672    /// ```
32673    pub fn set_data_path_pattern<T: std::convert::Into<std::string::String>>(
32674        mut self,
32675        v: T,
32676    ) -> Self {
32677        self.data_path_pattern = v.into();
32678        self
32679    }
32680
32681    /// Sets the value of [catalog_entry][crate::model::Entity::catalog_entry].
32682    ///
32683    /// # Example
32684    /// ```ignore,no_run
32685    /// # use google_cloud_dataplex_v1::model::Entity;
32686    /// let x = Entity::new().set_catalog_entry("example");
32687    /// ```
32688    pub fn set_catalog_entry<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32689        self.catalog_entry = v.into();
32690        self
32691    }
32692
32693    /// Sets the value of [system][crate::model::Entity::system].
32694    ///
32695    /// # Example
32696    /// ```ignore,no_run
32697    /// # use google_cloud_dataplex_v1::model::Entity;
32698    /// use google_cloud_dataplex_v1::model::StorageSystem;
32699    /// let x0 = Entity::new().set_system(StorageSystem::CloudStorage);
32700    /// let x1 = Entity::new().set_system(StorageSystem::Bigquery);
32701    /// ```
32702    pub fn set_system<T: std::convert::Into<crate::model::StorageSystem>>(mut self, v: T) -> Self {
32703        self.system = v.into();
32704        self
32705    }
32706
32707    /// Sets the value of [format][crate::model::Entity::format].
32708    ///
32709    /// # Example
32710    /// ```ignore,no_run
32711    /// # use google_cloud_dataplex_v1::model::Entity;
32712    /// use google_cloud_dataplex_v1::model::StorageFormat;
32713    /// let x = Entity::new().set_format(StorageFormat::default()/* use setters */);
32714    /// ```
32715    pub fn set_format<T>(mut self, v: T) -> Self
32716    where
32717        T: std::convert::Into<crate::model::StorageFormat>,
32718    {
32719        self.format = std::option::Option::Some(v.into());
32720        self
32721    }
32722
32723    /// Sets or clears the value of [format][crate::model::Entity::format].
32724    ///
32725    /// # Example
32726    /// ```ignore,no_run
32727    /// # use google_cloud_dataplex_v1::model::Entity;
32728    /// use google_cloud_dataplex_v1::model::StorageFormat;
32729    /// let x = Entity::new().set_or_clear_format(Some(StorageFormat::default()/* use setters */));
32730    /// let x = Entity::new().set_or_clear_format(None::<StorageFormat>);
32731    /// ```
32732    pub fn set_or_clear_format<T>(mut self, v: std::option::Option<T>) -> Self
32733    where
32734        T: std::convert::Into<crate::model::StorageFormat>,
32735    {
32736        self.format = v.map(|x| x.into());
32737        self
32738    }
32739
32740    /// Sets the value of [compatibility][crate::model::Entity::compatibility].
32741    ///
32742    /// # Example
32743    /// ```ignore,no_run
32744    /// # use google_cloud_dataplex_v1::model::Entity;
32745    /// use google_cloud_dataplex_v1::model::entity::CompatibilityStatus;
32746    /// let x = Entity::new().set_compatibility(CompatibilityStatus::default()/* use setters */);
32747    /// ```
32748    pub fn set_compatibility<T>(mut self, v: T) -> Self
32749    where
32750        T: std::convert::Into<crate::model::entity::CompatibilityStatus>,
32751    {
32752        self.compatibility = std::option::Option::Some(v.into());
32753        self
32754    }
32755
32756    /// Sets or clears the value of [compatibility][crate::model::Entity::compatibility].
32757    ///
32758    /// # Example
32759    /// ```ignore,no_run
32760    /// # use google_cloud_dataplex_v1::model::Entity;
32761    /// use google_cloud_dataplex_v1::model::entity::CompatibilityStatus;
32762    /// let x = Entity::new().set_or_clear_compatibility(Some(CompatibilityStatus::default()/* use setters */));
32763    /// let x = Entity::new().set_or_clear_compatibility(None::<CompatibilityStatus>);
32764    /// ```
32765    pub fn set_or_clear_compatibility<T>(mut self, v: std::option::Option<T>) -> Self
32766    where
32767        T: std::convert::Into<crate::model::entity::CompatibilityStatus>,
32768    {
32769        self.compatibility = v.map(|x| x.into());
32770        self
32771    }
32772
32773    /// Sets the value of [access][crate::model::Entity::access].
32774    ///
32775    /// # Example
32776    /// ```ignore,no_run
32777    /// # use google_cloud_dataplex_v1::model::Entity;
32778    /// use google_cloud_dataplex_v1::model::StorageAccess;
32779    /// let x = Entity::new().set_access(StorageAccess::default()/* use setters */);
32780    /// ```
32781    pub fn set_access<T>(mut self, v: T) -> Self
32782    where
32783        T: std::convert::Into<crate::model::StorageAccess>,
32784    {
32785        self.access = std::option::Option::Some(v.into());
32786        self
32787    }
32788
32789    /// Sets or clears the value of [access][crate::model::Entity::access].
32790    ///
32791    /// # Example
32792    /// ```ignore,no_run
32793    /// # use google_cloud_dataplex_v1::model::Entity;
32794    /// use google_cloud_dataplex_v1::model::StorageAccess;
32795    /// let x = Entity::new().set_or_clear_access(Some(StorageAccess::default()/* use setters */));
32796    /// let x = Entity::new().set_or_clear_access(None::<StorageAccess>);
32797    /// ```
32798    pub fn set_or_clear_access<T>(mut self, v: std::option::Option<T>) -> Self
32799    where
32800        T: std::convert::Into<crate::model::StorageAccess>,
32801    {
32802        self.access = v.map(|x| x.into());
32803        self
32804    }
32805
32806    /// Sets the value of [uid][crate::model::Entity::uid].
32807    ///
32808    /// # Example
32809    /// ```ignore,no_run
32810    /// # use google_cloud_dataplex_v1::model::Entity;
32811    /// let x = Entity::new().set_uid("example");
32812    /// ```
32813    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32814        self.uid = v.into();
32815        self
32816    }
32817
32818    /// Sets the value of [schema][crate::model::Entity::schema].
32819    ///
32820    /// # Example
32821    /// ```ignore,no_run
32822    /// # use google_cloud_dataplex_v1::model::Entity;
32823    /// use google_cloud_dataplex_v1::model::Schema;
32824    /// let x = Entity::new().set_schema(Schema::default()/* use setters */);
32825    /// ```
32826    pub fn set_schema<T>(mut self, v: T) -> Self
32827    where
32828        T: std::convert::Into<crate::model::Schema>,
32829    {
32830        self.schema = std::option::Option::Some(v.into());
32831        self
32832    }
32833
32834    /// Sets or clears the value of [schema][crate::model::Entity::schema].
32835    ///
32836    /// # Example
32837    /// ```ignore,no_run
32838    /// # use google_cloud_dataplex_v1::model::Entity;
32839    /// use google_cloud_dataplex_v1::model::Schema;
32840    /// let x = Entity::new().set_or_clear_schema(Some(Schema::default()/* use setters */));
32841    /// let x = Entity::new().set_or_clear_schema(None::<Schema>);
32842    /// ```
32843    pub fn set_or_clear_schema<T>(mut self, v: std::option::Option<T>) -> Self
32844    where
32845        T: std::convert::Into<crate::model::Schema>,
32846    {
32847        self.schema = v.map(|x| x.into());
32848        self
32849    }
32850}
32851
32852impl wkt::message::Message for Entity {
32853    fn typename() -> &'static str {
32854        "type.googleapis.com/google.cloud.dataplex.v1.Entity"
32855    }
32856}
32857
32858/// Defines additional types related to [Entity].
32859pub mod entity {
32860    #[allow(unused_imports)]
32861    use super::*;
32862
32863    /// Provides compatibility information for various metadata stores.
32864    #[derive(Clone, Default, PartialEq)]
32865    #[non_exhaustive]
32866    pub struct CompatibilityStatus {
32867        /// Output only. Whether this entity is compatible with Hive Metastore.
32868        pub hive_metastore:
32869            std::option::Option<crate::model::entity::compatibility_status::Compatibility>,
32870
32871        /// Output only. Whether this entity is compatible with BigQuery.
32872        pub bigquery:
32873            std::option::Option<crate::model::entity::compatibility_status::Compatibility>,
32874
32875        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32876    }
32877
32878    impl CompatibilityStatus {
32879        pub fn new() -> Self {
32880            std::default::Default::default()
32881        }
32882
32883        /// Sets the value of [hive_metastore][crate::model::entity::CompatibilityStatus::hive_metastore].
32884        ///
32885        /// # Example
32886        /// ```ignore,no_run
32887        /// # use google_cloud_dataplex_v1::model::entity::CompatibilityStatus;
32888        /// use google_cloud_dataplex_v1::model::entity::compatibility_status::Compatibility;
32889        /// let x = CompatibilityStatus::new().set_hive_metastore(Compatibility::default()/* use setters */);
32890        /// ```
32891        pub fn set_hive_metastore<T>(mut self, v: T) -> Self
32892        where
32893            T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
32894        {
32895            self.hive_metastore = std::option::Option::Some(v.into());
32896            self
32897        }
32898
32899        /// Sets or clears the value of [hive_metastore][crate::model::entity::CompatibilityStatus::hive_metastore].
32900        ///
32901        /// # Example
32902        /// ```ignore,no_run
32903        /// # use google_cloud_dataplex_v1::model::entity::CompatibilityStatus;
32904        /// use google_cloud_dataplex_v1::model::entity::compatibility_status::Compatibility;
32905        /// let x = CompatibilityStatus::new().set_or_clear_hive_metastore(Some(Compatibility::default()/* use setters */));
32906        /// let x = CompatibilityStatus::new().set_or_clear_hive_metastore(None::<Compatibility>);
32907        /// ```
32908        pub fn set_or_clear_hive_metastore<T>(mut self, v: std::option::Option<T>) -> Self
32909        where
32910            T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
32911        {
32912            self.hive_metastore = v.map(|x| x.into());
32913            self
32914        }
32915
32916        /// Sets the value of [bigquery][crate::model::entity::CompatibilityStatus::bigquery].
32917        ///
32918        /// # Example
32919        /// ```ignore,no_run
32920        /// # use google_cloud_dataplex_v1::model::entity::CompatibilityStatus;
32921        /// use google_cloud_dataplex_v1::model::entity::compatibility_status::Compatibility;
32922        /// let x = CompatibilityStatus::new().set_bigquery(Compatibility::default()/* use setters */);
32923        /// ```
32924        pub fn set_bigquery<T>(mut self, v: T) -> Self
32925        where
32926            T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
32927        {
32928            self.bigquery = std::option::Option::Some(v.into());
32929            self
32930        }
32931
32932        /// Sets or clears the value of [bigquery][crate::model::entity::CompatibilityStatus::bigquery].
32933        ///
32934        /// # Example
32935        /// ```ignore,no_run
32936        /// # use google_cloud_dataplex_v1::model::entity::CompatibilityStatus;
32937        /// use google_cloud_dataplex_v1::model::entity::compatibility_status::Compatibility;
32938        /// let x = CompatibilityStatus::new().set_or_clear_bigquery(Some(Compatibility::default()/* use setters */));
32939        /// let x = CompatibilityStatus::new().set_or_clear_bigquery(None::<Compatibility>);
32940        /// ```
32941        pub fn set_or_clear_bigquery<T>(mut self, v: std::option::Option<T>) -> Self
32942        where
32943            T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
32944        {
32945            self.bigquery = v.map(|x| x.into());
32946            self
32947        }
32948    }
32949
32950    impl wkt::message::Message for CompatibilityStatus {
32951        fn typename() -> &'static str {
32952            "type.googleapis.com/google.cloud.dataplex.v1.Entity.CompatibilityStatus"
32953        }
32954    }
32955
32956    /// Defines additional types related to [CompatibilityStatus].
32957    pub mod compatibility_status {
32958        #[allow(unused_imports)]
32959        use super::*;
32960
32961        /// Provides compatibility information for a specific metadata store.
32962        #[derive(Clone, Default, PartialEq)]
32963        #[non_exhaustive]
32964        pub struct Compatibility {
32965            /// Output only. Whether the entity is compatible and can be represented in
32966            /// the metadata store.
32967            pub compatible: bool,
32968
32969            /// Output only. Provides additional detail if the entity is incompatible
32970            /// with the metadata store.
32971            pub reason: std::string::String,
32972
32973            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32974        }
32975
32976        impl Compatibility {
32977            pub fn new() -> Self {
32978                std::default::Default::default()
32979            }
32980
32981            /// Sets the value of [compatible][crate::model::entity::compatibility_status::Compatibility::compatible].
32982            ///
32983            /// # Example
32984            /// ```ignore,no_run
32985            /// # use google_cloud_dataplex_v1::model::entity::compatibility_status::Compatibility;
32986            /// let x = Compatibility::new().set_compatible(true);
32987            /// ```
32988            pub fn set_compatible<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32989                self.compatible = v.into();
32990                self
32991            }
32992
32993            /// Sets the value of [reason][crate::model::entity::compatibility_status::Compatibility::reason].
32994            ///
32995            /// # Example
32996            /// ```ignore,no_run
32997            /// # use google_cloud_dataplex_v1::model::entity::compatibility_status::Compatibility;
32998            /// let x = Compatibility::new().set_reason("example");
32999            /// ```
33000            pub fn set_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33001                self.reason = v.into();
33002                self
33003            }
33004        }
33005
33006        impl wkt::message::Message for Compatibility {
33007            fn typename() -> &'static str {
33008                "type.googleapis.com/google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility"
33009            }
33010        }
33011    }
33012
33013    /// The type of entity.
33014    ///
33015    /// # Working with unknown values
33016    ///
33017    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
33018    /// additional enum variants at any time. Adding new variants is not considered
33019    /// a breaking change. Applications should write their code in anticipation of:
33020    ///
33021    /// - New values appearing in future releases of the client library, **and**
33022    /// - New values received dynamically, without application changes.
33023    ///
33024    /// Please consult the [Working with enums] section in the user guide for some
33025    /// guidelines.
33026    ///
33027    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
33028    #[derive(Clone, Debug, PartialEq)]
33029    #[non_exhaustive]
33030    pub enum Type {
33031        /// Type unspecified.
33032        Unspecified,
33033        /// Structured and semi-structured data.
33034        Table,
33035        /// Unstructured data.
33036        Fileset,
33037        /// If set, the enum was initialized with an unknown value.
33038        ///
33039        /// Applications can examine the value using [Type::value] or
33040        /// [Type::name].
33041        UnknownValue(r#type::UnknownValue),
33042    }
33043
33044    #[doc(hidden)]
33045    pub mod r#type {
33046        #[allow(unused_imports)]
33047        use super::*;
33048        #[derive(Clone, Debug, PartialEq)]
33049        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
33050    }
33051
33052    impl Type {
33053        /// Gets the enum value.
33054        ///
33055        /// Returns `None` if the enum contains an unknown value deserialized from
33056        /// the string representation of enums.
33057        pub fn value(&self) -> std::option::Option<i32> {
33058            match self {
33059                Self::Unspecified => std::option::Option::Some(0),
33060                Self::Table => std::option::Option::Some(1),
33061                Self::Fileset => std::option::Option::Some(2),
33062                Self::UnknownValue(u) => u.0.value(),
33063            }
33064        }
33065
33066        /// Gets the enum value as a string.
33067        ///
33068        /// Returns `None` if the enum contains an unknown value deserialized from
33069        /// the integer representation of enums.
33070        pub fn name(&self) -> std::option::Option<&str> {
33071            match self {
33072                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
33073                Self::Table => std::option::Option::Some("TABLE"),
33074                Self::Fileset => std::option::Option::Some("FILESET"),
33075                Self::UnknownValue(u) => u.0.name(),
33076            }
33077        }
33078    }
33079
33080    impl std::default::Default for Type {
33081        fn default() -> Self {
33082            use std::convert::From;
33083            Self::from(0)
33084        }
33085    }
33086
33087    impl std::fmt::Display for Type {
33088        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
33089            wkt::internal::display_enum(f, self.name(), self.value())
33090        }
33091    }
33092
33093    impl std::convert::From<i32> for Type {
33094        fn from(value: i32) -> Self {
33095            match value {
33096                0 => Self::Unspecified,
33097                1 => Self::Table,
33098                2 => Self::Fileset,
33099                _ => Self::UnknownValue(r#type::UnknownValue(
33100                    wkt::internal::UnknownEnumValue::Integer(value),
33101                )),
33102            }
33103        }
33104    }
33105
33106    impl std::convert::From<&str> for Type {
33107        fn from(value: &str) -> Self {
33108            use std::string::ToString;
33109            match value {
33110                "TYPE_UNSPECIFIED" => Self::Unspecified,
33111                "TABLE" => Self::Table,
33112                "FILESET" => Self::Fileset,
33113                _ => Self::UnknownValue(r#type::UnknownValue(
33114                    wkt::internal::UnknownEnumValue::String(value.to_string()),
33115                )),
33116            }
33117        }
33118    }
33119
33120    impl serde::ser::Serialize for Type {
33121        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
33122        where
33123            S: serde::Serializer,
33124        {
33125            match self {
33126                Self::Unspecified => serializer.serialize_i32(0),
33127                Self::Table => serializer.serialize_i32(1),
33128                Self::Fileset => serializer.serialize_i32(2),
33129                Self::UnknownValue(u) => u.0.serialize(serializer),
33130            }
33131        }
33132    }
33133
33134    impl<'de> serde::de::Deserialize<'de> for Type {
33135        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
33136        where
33137            D: serde::Deserializer<'de>,
33138        {
33139            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
33140                ".google.cloud.dataplex.v1.Entity.Type",
33141            ))
33142        }
33143    }
33144}
33145
33146/// Represents partition metadata contained within entity instances.
33147#[derive(Clone, Default, PartialEq)]
33148#[non_exhaustive]
33149pub struct Partition {
33150    /// Output only. Partition values used in the HTTP URL must be
33151    /// double encoded. For example, `url_encode(url_encode(value))` can be used
33152    /// to encode "US:CA/CA#Sunnyvale so that the request URL ends
33153    /// with "/partitions/US%253ACA/CA%2523Sunnyvale".
33154    /// The name field in the response retains the encoded format.
33155    pub name: std::string::String,
33156
33157    /// Required. Immutable. The set of values representing the partition, which
33158    /// correspond to the partition schema defined in the parent entity.
33159    pub values: std::vec::Vec<std::string::String>,
33160
33161    /// Required. Immutable. The location of the entity data within the partition,
33162    /// for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or
33163    /// `projects/<project_id>/datasets/<dataset_id>/tables/<table_id>`
33164    pub location: std::string::String,
33165
33166    /// Optional. The etag for this partition.
33167    #[deprecated]
33168    pub etag: std::string::String,
33169
33170    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33171}
33172
33173impl Partition {
33174    pub fn new() -> Self {
33175        std::default::Default::default()
33176    }
33177
33178    /// Sets the value of [name][crate::model::Partition::name].
33179    ///
33180    /// # Example
33181    /// ```ignore,no_run
33182    /// # use google_cloud_dataplex_v1::model::Partition;
33183    /// let x = Partition::new().set_name("example");
33184    /// ```
33185    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33186        self.name = v.into();
33187        self
33188    }
33189
33190    /// Sets the value of [values][crate::model::Partition::values].
33191    ///
33192    /// # Example
33193    /// ```ignore,no_run
33194    /// # use google_cloud_dataplex_v1::model::Partition;
33195    /// let x = Partition::new().set_values(["a", "b", "c"]);
33196    /// ```
33197    pub fn set_values<T, V>(mut self, v: T) -> Self
33198    where
33199        T: std::iter::IntoIterator<Item = V>,
33200        V: std::convert::Into<std::string::String>,
33201    {
33202        use std::iter::Iterator;
33203        self.values = v.into_iter().map(|i| i.into()).collect();
33204        self
33205    }
33206
33207    /// Sets the value of [location][crate::model::Partition::location].
33208    ///
33209    /// # Example
33210    /// ```ignore,no_run
33211    /// # use google_cloud_dataplex_v1::model::Partition;
33212    /// let x = Partition::new().set_location("example");
33213    /// ```
33214    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33215        self.location = v.into();
33216        self
33217    }
33218
33219    /// Sets the value of [etag][crate::model::Partition::etag].
33220    ///
33221    /// # Example
33222    /// ```ignore,no_run
33223    /// # use google_cloud_dataplex_v1::model::Partition;
33224    /// let x = Partition::new().set_etag("example");
33225    /// ```
33226    #[deprecated]
33227    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33228        self.etag = v.into();
33229        self
33230    }
33231}
33232
33233impl wkt::message::Message for Partition {
33234    fn typename() -> &'static str {
33235        "type.googleapis.com/google.cloud.dataplex.v1.Partition"
33236    }
33237}
33238
33239/// Schema information describing the structure and layout of the data.
33240#[derive(Clone, Default, PartialEq)]
33241#[non_exhaustive]
33242pub struct Schema {
33243    /// Required. Set to `true` if user-managed or `false` if managed by Dataplex
33244    /// Universal Catalog. The default is `false` (managed by Dataplex Universal
33245    /// Catalog).
33246    ///
33247    /// - Set to `false`to enable Dataplex Universal Catalog discovery to update
33248    ///   the schema.
33249    ///   including new data discovery, schema inference, and schema evolution.
33250    ///   Users retain the ability to input and edit the schema. Dataplex Universal
33251    ///   Catalog treats schema input by the user as though produced by a previous
33252    ///   Dataplex Universal Catalog discovery operation, and it will evolve the
33253    ///   schema and take action based on that treatment.
33254    ///
33255    /// - Set to `true` to fully manage the entity
33256    ///   schema. This setting guarantees that Dataplex Universal Catalog will not
33257    ///   change schema fields.
33258    ///
33259    pub user_managed: bool,
33260
33261    /// Optional. The sequence of fields describing data in table entities.
33262    /// **Note:** BigQuery SchemaFields are immutable.
33263    pub fields: std::vec::Vec<crate::model::schema::SchemaField>,
33264
33265    /// Optional. The sequence of fields describing the partition structure in
33266    /// entities. If this field is empty, there are no partitions within the data.
33267    pub partition_fields: std::vec::Vec<crate::model::schema::PartitionField>,
33268
33269    /// Optional. The structure of paths containing partition data within the
33270    /// entity.
33271    pub partition_style: crate::model::schema::PartitionStyle,
33272
33273    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33274}
33275
33276impl Schema {
33277    pub fn new() -> Self {
33278        std::default::Default::default()
33279    }
33280
33281    /// Sets the value of [user_managed][crate::model::Schema::user_managed].
33282    ///
33283    /// # Example
33284    /// ```ignore,no_run
33285    /// # use google_cloud_dataplex_v1::model::Schema;
33286    /// let x = Schema::new().set_user_managed(true);
33287    /// ```
33288    pub fn set_user_managed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
33289        self.user_managed = v.into();
33290        self
33291    }
33292
33293    /// Sets the value of [fields][crate::model::Schema::fields].
33294    ///
33295    /// # Example
33296    /// ```ignore,no_run
33297    /// # use google_cloud_dataplex_v1::model::Schema;
33298    /// use google_cloud_dataplex_v1::model::schema::SchemaField;
33299    /// let x = Schema::new()
33300    ///     .set_fields([
33301    ///         SchemaField::default()/* use setters */,
33302    ///         SchemaField::default()/* use (different) setters */,
33303    ///     ]);
33304    /// ```
33305    pub fn set_fields<T, V>(mut self, v: T) -> Self
33306    where
33307        T: std::iter::IntoIterator<Item = V>,
33308        V: std::convert::Into<crate::model::schema::SchemaField>,
33309    {
33310        use std::iter::Iterator;
33311        self.fields = v.into_iter().map(|i| i.into()).collect();
33312        self
33313    }
33314
33315    /// Sets the value of [partition_fields][crate::model::Schema::partition_fields].
33316    ///
33317    /// # Example
33318    /// ```ignore,no_run
33319    /// # use google_cloud_dataplex_v1::model::Schema;
33320    /// use google_cloud_dataplex_v1::model::schema::PartitionField;
33321    /// let x = Schema::new()
33322    ///     .set_partition_fields([
33323    ///         PartitionField::default()/* use setters */,
33324    ///         PartitionField::default()/* use (different) setters */,
33325    ///     ]);
33326    /// ```
33327    pub fn set_partition_fields<T, V>(mut self, v: T) -> Self
33328    where
33329        T: std::iter::IntoIterator<Item = V>,
33330        V: std::convert::Into<crate::model::schema::PartitionField>,
33331    {
33332        use std::iter::Iterator;
33333        self.partition_fields = v.into_iter().map(|i| i.into()).collect();
33334        self
33335    }
33336
33337    /// Sets the value of [partition_style][crate::model::Schema::partition_style].
33338    ///
33339    /// # Example
33340    /// ```ignore,no_run
33341    /// # use google_cloud_dataplex_v1::model::Schema;
33342    /// use google_cloud_dataplex_v1::model::schema::PartitionStyle;
33343    /// let x0 = Schema::new().set_partition_style(PartitionStyle::HiveCompatible);
33344    /// ```
33345    pub fn set_partition_style<T: std::convert::Into<crate::model::schema::PartitionStyle>>(
33346        mut self,
33347        v: T,
33348    ) -> Self {
33349        self.partition_style = v.into();
33350        self
33351    }
33352}
33353
33354impl wkt::message::Message for Schema {
33355    fn typename() -> &'static str {
33356        "type.googleapis.com/google.cloud.dataplex.v1.Schema"
33357    }
33358}
33359
33360/// Defines additional types related to [Schema].
33361pub mod schema {
33362    #[allow(unused_imports)]
33363    use super::*;
33364
33365    /// Represents a column field within a table schema.
33366    #[derive(Clone, Default, PartialEq)]
33367    #[non_exhaustive]
33368    pub struct SchemaField {
33369        /// Required. The name of the field. Must contain only letters, numbers and
33370        /// underscores, with a maximum length of 767 characters,
33371        /// and must begin with a letter or underscore.
33372        pub name: std::string::String,
33373
33374        /// Optional. User friendly field description. Must be less than or equal to
33375        /// 1024 characters.
33376        pub description: std::string::String,
33377
33378        /// Required. The type of field.
33379        pub r#type: crate::model::schema::Type,
33380
33381        /// Required. Additional field semantics.
33382        pub mode: crate::model::schema::Mode,
33383
33384        /// Optional. Any nested field for complex types.
33385        pub fields: std::vec::Vec<crate::model::schema::SchemaField>,
33386
33387        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33388    }
33389
33390    impl SchemaField {
33391        pub fn new() -> Self {
33392            std::default::Default::default()
33393        }
33394
33395        /// Sets the value of [name][crate::model::schema::SchemaField::name].
33396        ///
33397        /// # Example
33398        /// ```ignore,no_run
33399        /// # use google_cloud_dataplex_v1::model::schema::SchemaField;
33400        /// let x = SchemaField::new().set_name("example");
33401        /// ```
33402        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33403            self.name = v.into();
33404            self
33405        }
33406
33407        /// Sets the value of [description][crate::model::schema::SchemaField::description].
33408        ///
33409        /// # Example
33410        /// ```ignore,no_run
33411        /// # use google_cloud_dataplex_v1::model::schema::SchemaField;
33412        /// let x = SchemaField::new().set_description("example");
33413        /// ```
33414        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33415            self.description = v.into();
33416            self
33417        }
33418
33419        /// Sets the value of [r#type][crate::model::schema::SchemaField::type].
33420        ///
33421        /// # Example
33422        /// ```ignore,no_run
33423        /// # use google_cloud_dataplex_v1::model::schema::SchemaField;
33424        /// use google_cloud_dataplex_v1::model::schema::Type;
33425        /// let x0 = SchemaField::new().set_type(Type::Boolean);
33426        /// let x1 = SchemaField::new().set_type(Type::Byte);
33427        /// let x2 = SchemaField::new().set_type(Type::Int16);
33428        /// ```
33429        pub fn set_type<T: std::convert::Into<crate::model::schema::Type>>(mut self, v: T) -> Self {
33430            self.r#type = v.into();
33431            self
33432        }
33433
33434        /// Sets the value of [mode][crate::model::schema::SchemaField::mode].
33435        ///
33436        /// # Example
33437        /// ```ignore,no_run
33438        /// # use google_cloud_dataplex_v1::model::schema::SchemaField;
33439        /// use google_cloud_dataplex_v1::model::schema::Mode;
33440        /// let x0 = SchemaField::new().set_mode(Mode::Required);
33441        /// let x1 = SchemaField::new().set_mode(Mode::Nullable);
33442        /// let x2 = SchemaField::new().set_mode(Mode::Repeated);
33443        /// ```
33444        pub fn set_mode<T: std::convert::Into<crate::model::schema::Mode>>(mut self, v: T) -> Self {
33445            self.mode = v.into();
33446            self
33447        }
33448
33449        /// Sets the value of [fields][crate::model::schema::SchemaField::fields].
33450        ///
33451        /// # Example
33452        /// ```ignore,no_run
33453        /// # use google_cloud_dataplex_v1::model::schema::SchemaField;
33454        /// let x = SchemaField::new()
33455        ///     .set_fields([
33456        ///         SchemaField::default()/* use setters */,
33457        ///         SchemaField::default()/* use (different) setters */,
33458        ///     ]);
33459        /// ```
33460        pub fn set_fields<T, V>(mut self, v: T) -> Self
33461        where
33462            T: std::iter::IntoIterator<Item = V>,
33463            V: std::convert::Into<crate::model::schema::SchemaField>,
33464        {
33465            use std::iter::Iterator;
33466            self.fields = v.into_iter().map(|i| i.into()).collect();
33467            self
33468        }
33469    }
33470
33471    impl wkt::message::Message for SchemaField {
33472        fn typename() -> &'static str {
33473            "type.googleapis.com/google.cloud.dataplex.v1.Schema.SchemaField"
33474        }
33475    }
33476
33477    /// Represents a key field within the entity's partition structure. You could
33478    /// have up to 20 partition fields, but only the first 10 partitions have the
33479    /// filtering ability due to performance consideration. **Note:**
33480    /// Partition fields are immutable.
33481    #[derive(Clone, Default, PartialEq)]
33482    #[non_exhaustive]
33483    pub struct PartitionField {
33484        /// Required. Partition field name must consist of letters, numbers, and
33485        /// underscores only, with a maximum of length of 256 characters, and must
33486        /// begin with a letter or underscore..
33487        pub name: std::string::String,
33488
33489        /// Required. Immutable. The type of field.
33490        pub r#type: crate::model::schema::Type,
33491
33492        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33493    }
33494
33495    impl PartitionField {
33496        pub fn new() -> Self {
33497            std::default::Default::default()
33498        }
33499
33500        /// Sets the value of [name][crate::model::schema::PartitionField::name].
33501        ///
33502        /// # Example
33503        /// ```ignore,no_run
33504        /// # use google_cloud_dataplex_v1::model::schema::PartitionField;
33505        /// let x = PartitionField::new().set_name("example");
33506        /// ```
33507        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33508            self.name = v.into();
33509            self
33510        }
33511
33512        /// Sets the value of [r#type][crate::model::schema::PartitionField::type].
33513        ///
33514        /// # Example
33515        /// ```ignore,no_run
33516        /// # use google_cloud_dataplex_v1::model::schema::PartitionField;
33517        /// use google_cloud_dataplex_v1::model::schema::Type;
33518        /// let x0 = PartitionField::new().set_type(Type::Boolean);
33519        /// let x1 = PartitionField::new().set_type(Type::Byte);
33520        /// let x2 = PartitionField::new().set_type(Type::Int16);
33521        /// ```
33522        pub fn set_type<T: std::convert::Into<crate::model::schema::Type>>(mut self, v: T) -> Self {
33523            self.r#type = v.into();
33524            self
33525        }
33526    }
33527
33528    impl wkt::message::Message for PartitionField {
33529        fn typename() -> &'static str {
33530            "type.googleapis.com/google.cloud.dataplex.v1.Schema.PartitionField"
33531        }
33532    }
33533
33534    /// Type information for fields in schemas and partition schemas.
33535    ///
33536    /// # Working with unknown values
33537    ///
33538    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
33539    /// additional enum variants at any time. Adding new variants is not considered
33540    /// a breaking change. Applications should write their code in anticipation of:
33541    ///
33542    /// - New values appearing in future releases of the client library, **and**
33543    /// - New values received dynamically, without application changes.
33544    ///
33545    /// Please consult the [Working with enums] section in the user guide for some
33546    /// guidelines.
33547    ///
33548    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
33549    #[derive(Clone, Debug, PartialEq)]
33550    #[non_exhaustive]
33551    pub enum Type {
33552        /// SchemaType unspecified.
33553        Unspecified,
33554        /// Boolean field.
33555        Boolean,
33556        /// Single byte numeric field.
33557        Byte,
33558        /// 16-bit numeric field.
33559        Int16,
33560        /// 32-bit numeric field.
33561        Int32,
33562        /// 64-bit numeric field.
33563        Int64,
33564        /// Floating point numeric field.
33565        Float,
33566        /// Double precision numeric field.
33567        Double,
33568        /// Real value numeric field.
33569        Decimal,
33570        /// Sequence of characters field.
33571        String,
33572        /// Sequence of bytes field.
33573        Binary,
33574        /// Date and time field.
33575        Timestamp,
33576        /// Date field.
33577        Date,
33578        /// Time field.
33579        Time,
33580        /// Structured field. Nested fields that define the structure of the map.
33581        /// If all nested fields are nullable, this field represents a union.
33582        Record,
33583        /// Null field that does not have values.
33584        Null,
33585        /// If set, the enum was initialized with an unknown value.
33586        ///
33587        /// Applications can examine the value using [Type::value] or
33588        /// [Type::name].
33589        UnknownValue(r#type::UnknownValue),
33590    }
33591
33592    #[doc(hidden)]
33593    pub mod r#type {
33594        #[allow(unused_imports)]
33595        use super::*;
33596        #[derive(Clone, Debug, PartialEq)]
33597        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
33598    }
33599
33600    impl Type {
33601        /// Gets the enum value.
33602        ///
33603        /// Returns `None` if the enum contains an unknown value deserialized from
33604        /// the string representation of enums.
33605        pub fn value(&self) -> std::option::Option<i32> {
33606            match self {
33607                Self::Unspecified => std::option::Option::Some(0),
33608                Self::Boolean => std::option::Option::Some(1),
33609                Self::Byte => std::option::Option::Some(2),
33610                Self::Int16 => std::option::Option::Some(3),
33611                Self::Int32 => std::option::Option::Some(4),
33612                Self::Int64 => std::option::Option::Some(5),
33613                Self::Float => std::option::Option::Some(6),
33614                Self::Double => std::option::Option::Some(7),
33615                Self::Decimal => std::option::Option::Some(8),
33616                Self::String => std::option::Option::Some(9),
33617                Self::Binary => std::option::Option::Some(10),
33618                Self::Timestamp => std::option::Option::Some(11),
33619                Self::Date => std::option::Option::Some(12),
33620                Self::Time => std::option::Option::Some(13),
33621                Self::Record => std::option::Option::Some(14),
33622                Self::Null => std::option::Option::Some(100),
33623                Self::UnknownValue(u) => u.0.value(),
33624            }
33625        }
33626
33627        /// Gets the enum value as a string.
33628        ///
33629        /// Returns `None` if the enum contains an unknown value deserialized from
33630        /// the integer representation of enums.
33631        pub fn name(&self) -> std::option::Option<&str> {
33632            match self {
33633                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
33634                Self::Boolean => std::option::Option::Some("BOOLEAN"),
33635                Self::Byte => std::option::Option::Some("BYTE"),
33636                Self::Int16 => std::option::Option::Some("INT16"),
33637                Self::Int32 => std::option::Option::Some("INT32"),
33638                Self::Int64 => std::option::Option::Some("INT64"),
33639                Self::Float => std::option::Option::Some("FLOAT"),
33640                Self::Double => std::option::Option::Some("DOUBLE"),
33641                Self::Decimal => std::option::Option::Some("DECIMAL"),
33642                Self::String => std::option::Option::Some("STRING"),
33643                Self::Binary => std::option::Option::Some("BINARY"),
33644                Self::Timestamp => std::option::Option::Some("TIMESTAMP"),
33645                Self::Date => std::option::Option::Some("DATE"),
33646                Self::Time => std::option::Option::Some("TIME"),
33647                Self::Record => std::option::Option::Some("RECORD"),
33648                Self::Null => std::option::Option::Some("NULL"),
33649                Self::UnknownValue(u) => u.0.name(),
33650            }
33651        }
33652    }
33653
33654    impl std::default::Default for Type {
33655        fn default() -> Self {
33656            use std::convert::From;
33657            Self::from(0)
33658        }
33659    }
33660
33661    impl std::fmt::Display for Type {
33662        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
33663            wkt::internal::display_enum(f, self.name(), self.value())
33664        }
33665    }
33666
33667    impl std::convert::From<i32> for Type {
33668        fn from(value: i32) -> Self {
33669            match value {
33670                0 => Self::Unspecified,
33671                1 => Self::Boolean,
33672                2 => Self::Byte,
33673                3 => Self::Int16,
33674                4 => Self::Int32,
33675                5 => Self::Int64,
33676                6 => Self::Float,
33677                7 => Self::Double,
33678                8 => Self::Decimal,
33679                9 => Self::String,
33680                10 => Self::Binary,
33681                11 => Self::Timestamp,
33682                12 => Self::Date,
33683                13 => Self::Time,
33684                14 => Self::Record,
33685                100 => Self::Null,
33686                _ => Self::UnknownValue(r#type::UnknownValue(
33687                    wkt::internal::UnknownEnumValue::Integer(value),
33688                )),
33689            }
33690        }
33691    }
33692
33693    impl std::convert::From<&str> for Type {
33694        fn from(value: &str) -> Self {
33695            use std::string::ToString;
33696            match value {
33697                "TYPE_UNSPECIFIED" => Self::Unspecified,
33698                "BOOLEAN" => Self::Boolean,
33699                "BYTE" => Self::Byte,
33700                "INT16" => Self::Int16,
33701                "INT32" => Self::Int32,
33702                "INT64" => Self::Int64,
33703                "FLOAT" => Self::Float,
33704                "DOUBLE" => Self::Double,
33705                "DECIMAL" => Self::Decimal,
33706                "STRING" => Self::String,
33707                "BINARY" => Self::Binary,
33708                "TIMESTAMP" => Self::Timestamp,
33709                "DATE" => Self::Date,
33710                "TIME" => Self::Time,
33711                "RECORD" => Self::Record,
33712                "NULL" => Self::Null,
33713                _ => Self::UnknownValue(r#type::UnknownValue(
33714                    wkt::internal::UnknownEnumValue::String(value.to_string()),
33715                )),
33716            }
33717        }
33718    }
33719
33720    impl serde::ser::Serialize for Type {
33721        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
33722        where
33723            S: serde::Serializer,
33724        {
33725            match self {
33726                Self::Unspecified => serializer.serialize_i32(0),
33727                Self::Boolean => serializer.serialize_i32(1),
33728                Self::Byte => serializer.serialize_i32(2),
33729                Self::Int16 => serializer.serialize_i32(3),
33730                Self::Int32 => serializer.serialize_i32(4),
33731                Self::Int64 => serializer.serialize_i32(5),
33732                Self::Float => serializer.serialize_i32(6),
33733                Self::Double => serializer.serialize_i32(7),
33734                Self::Decimal => serializer.serialize_i32(8),
33735                Self::String => serializer.serialize_i32(9),
33736                Self::Binary => serializer.serialize_i32(10),
33737                Self::Timestamp => serializer.serialize_i32(11),
33738                Self::Date => serializer.serialize_i32(12),
33739                Self::Time => serializer.serialize_i32(13),
33740                Self::Record => serializer.serialize_i32(14),
33741                Self::Null => serializer.serialize_i32(100),
33742                Self::UnknownValue(u) => u.0.serialize(serializer),
33743            }
33744        }
33745    }
33746
33747    impl<'de> serde::de::Deserialize<'de> for Type {
33748        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
33749        where
33750            D: serde::Deserializer<'de>,
33751        {
33752            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
33753                ".google.cloud.dataplex.v1.Schema.Type",
33754            ))
33755        }
33756    }
33757
33758    /// Additional qualifiers to define field semantics.
33759    ///
33760    /// # Working with unknown values
33761    ///
33762    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
33763    /// additional enum variants at any time. Adding new variants is not considered
33764    /// a breaking change. Applications should write their code in anticipation of:
33765    ///
33766    /// - New values appearing in future releases of the client library, **and**
33767    /// - New values received dynamically, without application changes.
33768    ///
33769    /// Please consult the [Working with enums] section in the user guide for some
33770    /// guidelines.
33771    ///
33772    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
33773    #[derive(Clone, Debug, PartialEq)]
33774    #[non_exhaustive]
33775    pub enum Mode {
33776        /// Mode unspecified.
33777        Unspecified,
33778        /// The field has required semantics.
33779        Required,
33780        /// The field has optional semantics, and may be null.
33781        Nullable,
33782        /// The field has repeated (0 or more) semantics, and is a list of values.
33783        Repeated,
33784        /// If set, the enum was initialized with an unknown value.
33785        ///
33786        /// Applications can examine the value using [Mode::value] or
33787        /// [Mode::name].
33788        UnknownValue(mode::UnknownValue),
33789    }
33790
33791    #[doc(hidden)]
33792    pub mod mode {
33793        #[allow(unused_imports)]
33794        use super::*;
33795        #[derive(Clone, Debug, PartialEq)]
33796        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
33797    }
33798
33799    impl Mode {
33800        /// Gets the enum value.
33801        ///
33802        /// Returns `None` if the enum contains an unknown value deserialized from
33803        /// the string representation of enums.
33804        pub fn value(&self) -> std::option::Option<i32> {
33805            match self {
33806                Self::Unspecified => std::option::Option::Some(0),
33807                Self::Required => std::option::Option::Some(1),
33808                Self::Nullable => std::option::Option::Some(2),
33809                Self::Repeated => std::option::Option::Some(3),
33810                Self::UnknownValue(u) => u.0.value(),
33811            }
33812        }
33813
33814        /// Gets the enum value as a string.
33815        ///
33816        /// Returns `None` if the enum contains an unknown value deserialized from
33817        /// the integer representation of enums.
33818        pub fn name(&self) -> std::option::Option<&str> {
33819            match self {
33820                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
33821                Self::Required => std::option::Option::Some("REQUIRED"),
33822                Self::Nullable => std::option::Option::Some("NULLABLE"),
33823                Self::Repeated => std::option::Option::Some("REPEATED"),
33824                Self::UnknownValue(u) => u.0.name(),
33825            }
33826        }
33827    }
33828
33829    impl std::default::Default for Mode {
33830        fn default() -> Self {
33831            use std::convert::From;
33832            Self::from(0)
33833        }
33834    }
33835
33836    impl std::fmt::Display for Mode {
33837        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
33838            wkt::internal::display_enum(f, self.name(), self.value())
33839        }
33840    }
33841
33842    impl std::convert::From<i32> for Mode {
33843        fn from(value: i32) -> Self {
33844            match value {
33845                0 => Self::Unspecified,
33846                1 => Self::Required,
33847                2 => Self::Nullable,
33848                3 => Self::Repeated,
33849                _ => Self::UnknownValue(mode::UnknownValue(
33850                    wkt::internal::UnknownEnumValue::Integer(value),
33851                )),
33852            }
33853        }
33854    }
33855
33856    impl std::convert::From<&str> for Mode {
33857        fn from(value: &str) -> Self {
33858            use std::string::ToString;
33859            match value {
33860                "MODE_UNSPECIFIED" => Self::Unspecified,
33861                "REQUIRED" => Self::Required,
33862                "NULLABLE" => Self::Nullable,
33863                "REPEATED" => Self::Repeated,
33864                _ => Self::UnknownValue(mode::UnknownValue(
33865                    wkt::internal::UnknownEnumValue::String(value.to_string()),
33866                )),
33867            }
33868        }
33869    }
33870
33871    impl serde::ser::Serialize for Mode {
33872        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
33873        where
33874            S: serde::Serializer,
33875        {
33876            match self {
33877                Self::Unspecified => serializer.serialize_i32(0),
33878                Self::Required => serializer.serialize_i32(1),
33879                Self::Nullable => serializer.serialize_i32(2),
33880                Self::Repeated => serializer.serialize_i32(3),
33881                Self::UnknownValue(u) => u.0.serialize(serializer),
33882            }
33883        }
33884    }
33885
33886    impl<'de> serde::de::Deserialize<'de> for Mode {
33887        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
33888        where
33889            D: serde::Deserializer<'de>,
33890        {
33891            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
33892                ".google.cloud.dataplex.v1.Schema.Mode",
33893            ))
33894        }
33895    }
33896
33897    /// The structure of paths within the entity, which represent partitions.
33898    ///
33899    /// # Working with unknown values
33900    ///
33901    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
33902    /// additional enum variants at any time. Adding new variants is not considered
33903    /// a breaking change. Applications should write their code in anticipation of:
33904    ///
33905    /// - New values appearing in future releases of the client library, **and**
33906    /// - New values received dynamically, without application changes.
33907    ///
33908    /// Please consult the [Working with enums] section in the user guide for some
33909    /// guidelines.
33910    ///
33911    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
33912    #[derive(Clone, Debug, PartialEq)]
33913    #[non_exhaustive]
33914    pub enum PartitionStyle {
33915        /// PartitionStyle unspecified
33916        Unspecified,
33917        /// Partitions are hive-compatible.
33918        /// Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`,
33919        /// `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`.
33920        HiveCompatible,
33921        /// If set, the enum was initialized with an unknown value.
33922        ///
33923        /// Applications can examine the value using [PartitionStyle::value] or
33924        /// [PartitionStyle::name].
33925        UnknownValue(partition_style::UnknownValue),
33926    }
33927
33928    #[doc(hidden)]
33929    pub mod partition_style {
33930        #[allow(unused_imports)]
33931        use super::*;
33932        #[derive(Clone, Debug, PartialEq)]
33933        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
33934    }
33935
33936    impl PartitionStyle {
33937        /// Gets the enum value.
33938        ///
33939        /// Returns `None` if the enum contains an unknown value deserialized from
33940        /// the string representation of enums.
33941        pub fn value(&self) -> std::option::Option<i32> {
33942            match self {
33943                Self::Unspecified => std::option::Option::Some(0),
33944                Self::HiveCompatible => std::option::Option::Some(1),
33945                Self::UnknownValue(u) => u.0.value(),
33946            }
33947        }
33948
33949        /// Gets the enum value as a string.
33950        ///
33951        /// Returns `None` if the enum contains an unknown value deserialized from
33952        /// the integer representation of enums.
33953        pub fn name(&self) -> std::option::Option<&str> {
33954            match self {
33955                Self::Unspecified => std::option::Option::Some("PARTITION_STYLE_UNSPECIFIED"),
33956                Self::HiveCompatible => std::option::Option::Some("HIVE_COMPATIBLE"),
33957                Self::UnknownValue(u) => u.0.name(),
33958            }
33959        }
33960    }
33961
33962    impl std::default::Default for PartitionStyle {
33963        fn default() -> Self {
33964            use std::convert::From;
33965            Self::from(0)
33966        }
33967    }
33968
33969    impl std::fmt::Display for PartitionStyle {
33970        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
33971            wkt::internal::display_enum(f, self.name(), self.value())
33972        }
33973    }
33974
33975    impl std::convert::From<i32> for PartitionStyle {
33976        fn from(value: i32) -> Self {
33977            match value {
33978                0 => Self::Unspecified,
33979                1 => Self::HiveCompatible,
33980                _ => Self::UnknownValue(partition_style::UnknownValue(
33981                    wkt::internal::UnknownEnumValue::Integer(value),
33982                )),
33983            }
33984        }
33985    }
33986
33987    impl std::convert::From<&str> for PartitionStyle {
33988        fn from(value: &str) -> Self {
33989            use std::string::ToString;
33990            match value {
33991                "PARTITION_STYLE_UNSPECIFIED" => Self::Unspecified,
33992                "HIVE_COMPATIBLE" => Self::HiveCompatible,
33993                _ => Self::UnknownValue(partition_style::UnknownValue(
33994                    wkt::internal::UnknownEnumValue::String(value.to_string()),
33995                )),
33996            }
33997        }
33998    }
33999
34000    impl serde::ser::Serialize for PartitionStyle {
34001        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
34002        where
34003            S: serde::Serializer,
34004        {
34005            match self {
34006                Self::Unspecified => serializer.serialize_i32(0),
34007                Self::HiveCompatible => serializer.serialize_i32(1),
34008                Self::UnknownValue(u) => u.0.serialize(serializer),
34009            }
34010        }
34011    }
34012
34013    impl<'de> serde::de::Deserialize<'de> for PartitionStyle {
34014        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
34015        where
34016            D: serde::Deserializer<'de>,
34017        {
34018            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PartitionStyle>::new(
34019                ".google.cloud.dataplex.v1.Schema.PartitionStyle",
34020            ))
34021        }
34022    }
34023}
34024
34025/// Describes the format of the data within its storage location.
34026#[derive(Clone, Default, PartialEq)]
34027#[non_exhaustive]
34028pub struct StorageFormat {
34029    /// Output only. The data format associated with the stored data, which
34030    /// represents content type values. The value is inferred from mime type.
34031    pub format: crate::model::storage_format::Format,
34032
34033    /// Optional. The compression type associated with the stored data.
34034    /// If unspecified, the data is uncompressed.
34035    pub compression_format: crate::model::storage_format::CompressionFormat,
34036
34037    /// Required. The mime type descriptor for the data. Must match the pattern
34038    /// {type}/{subtype}. Supported values:
34039    ///
34040    /// - application/x-parquet
34041    /// - application/x-avro
34042    /// - application/x-orc
34043    /// - application/x-tfrecord
34044    /// - application/x-parquet+iceberg
34045    /// - application/x-avro+iceberg
34046    /// - application/x-orc+iceberg
34047    /// - application/json
34048    /// - application/{subtypes}
34049    /// - text/csv
34050    /// - text/\<subtypes\>
34051    /// - image/{image subtype}
34052    /// - video/{video subtype}
34053    /// - audio/{audio subtype}
34054    pub mime_type: std::string::String,
34055
34056    /// Additional format-specific options.
34057    pub options: std::option::Option<crate::model::storage_format::Options>,
34058
34059    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34060}
34061
34062impl StorageFormat {
34063    pub fn new() -> Self {
34064        std::default::Default::default()
34065    }
34066
34067    /// Sets the value of [format][crate::model::StorageFormat::format].
34068    ///
34069    /// # Example
34070    /// ```ignore,no_run
34071    /// # use google_cloud_dataplex_v1::model::StorageFormat;
34072    /// use google_cloud_dataplex_v1::model::storage_format::Format;
34073    /// let x0 = StorageFormat::new().set_format(Format::Parquet);
34074    /// let x1 = StorageFormat::new().set_format(Format::Avro);
34075    /// let x2 = StorageFormat::new().set_format(Format::Orc);
34076    /// ```
34077    pub fn set_format<T: std::convert::Into<crate::model::storage_format::Format>>(
34078        mut self,
34079        v: T,
34080    ) -> Self {
34081        self.format = v.into();
34082        self
34083    }
34084
34085    /// Sets the value of [compression_format][crate::model::StorageFormat::compression_format].
34086    ///
34087    /// # Example
34088    /// ```ignore,no_run
34089    /// # use google_cloud_dataplex_v1::model::StorageFormat;
34090    /// use google_cloud_dataplex_v1::model::storage_format::CompressionFormat;
34091    /// let x0 = StorageFormat::new().set_compression_format(CompressionFormat::Gzip);
34092    /// let x1 = StorageFormat::new().set_compression_format(CompressionFormat::Bzip2);
34093    /// ```
34094    pub fn set_compression_format<
34095        T: std::convert::Into<crate::model::storage_format::CompressionFormat>,
34096    >(
34097        mut self,
34098        v: T,
34099    ) -> Self {
34100        self.compression_format = v.into();
34101        self
34102    }
34103
34104    /// Sets the value of [mime_type][crate::model::StorageFormat::mime_type].
34105    ///
34106    /// # Example
34107    /// ```ignore,no_run
34108    /// # use google_cloud_dataplex_v1::model::StorageFormat;
34109    /// let x = StorageFormat::new().set_mime_type("example");
34110    /// ```
34111    pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34112        self.mime_type = v.into();
34113        self
34114    }
34115
34116    /// Sets the value of [options][crate::model::StorageFormat::options].
34117    ///
34118    /// Note that all the setters affecting `options` are mutually
34119    /// exclusive.
34120    ///
34121    /// # Example
34122    /// ```ignore,no_run
34123    /// # use google_cloud_dataplex_v1::model::StorageFormat;
34124    /// use google_cloud_dataplex_v1::model::storage_format::CsvOptions;
34125    /// let x = StorageFormat::new().set_options(Some(
34126    ///     google_cloud_dataplex_v1::model::storage_format::Options::Csv(CsvOptions::default().into())));
34127    /// ```
34128    pub fn set_options<
34129        T: std::convert::Into<std::option::Option<crate::model::storage_format::Options>>,
34130    >(
34131        mut self,
34132        v: T,
34133    ) -> Self {
34134        self.options = v.into();
34135        self
34136    }
34137
34138    /// The value of [options][crate::model::StorageFormat::options]
34139    /// if it holds a `Csv`, `None` if the field is not set or
34140    /// holds a different branch.
34141    pub fn csv(
34142        &self,
34143    ) -> std::option::Option<&std::boxed::Box<crate::model::storage_format::CsvOptions>> {
34144        #[allow(unreachable_patterns)]
34145        self.options.as_ref().and_then(|v| match v {
34146            crate::model::storage_format::Options::Csv(v) => std::option::Option::Some(v),
34147            _ => std::option::Option::None,
34148        })
34149    }
34150
34151    /// Sets the value of [options][crate::model::StorageFormat::options]
34152    /// to hold a `Csv`.
34153    ///
34154    /// Note that all the setters affecting `options` are
34155    /// mutually exclusive.
34156    ///
34157    /// # Example
34158    /// ```ignore,no_run
34159    /// # use google_cloud_dataplex_v1::model::StorageFormat;
34160    /// use google_cloud_dataplex_v1::model::storage_format::CsvOptions;
34161    /// let x = StorageFormat::new().set_csv(CsvOptions::default()/* use setters */);
34162    /// assert!(x.csv().is_some());
34163    /// assert!(x.json().is_none());
34164    /// assert!(x.iceberg().is_none());
34165    /// ```
34166    pub fn set_csv<
34167        T: std::convert::Into<std::boxed::Box<crate::model::storage_format::CsvOptions>>,
34168    >(
34169        mut self,
34170        v: T,
34171    ) -> Self {
34172        self.options =
34173            std::option::Option::Some(crate::model::storage_format::Options::Csv(v.into()));
34174        self
34175    }
34176
34177    /// The value of [options][crate::model::StorageFormat::options]
34178    /// if it holds a `Json`, `None` if the field is not set or
34179    /// holds a different branch.
34180    pub fn json(
34181        &self,
34182    ) -> std::option::Option<&std::boxed::Box<crate::model::storage_format::JsonOptions>> {
34183        #[allow(unreachable_patterns)]
34184        self.options.as_ref().and_then(|v| match v {
34185            crate::model::storage_format::Options::Json(v) => std::option::Option::Some(v),
34186            _ => std::option::Option::None,
34187        })
34188    }
34189
34190    /// Sets the value of [options][crate::model::StorageFormat::options]
34191    /// to hold a `Json`.
34192    ///
34193    /// Note that all the setters affecting `options` are
34194    /// mutually exclusive.
34195    ///
34196    /// # Example
34197    /// ```ignore,no_run
34198    /// # use google_cloud_dataplex_v1::model::StorageFormat;
34199    /// use google_cloud_dataplex_v1::model::storage_format::JsonOptions;
34200    /// let x = StorageFormat::new().set_json(JsonOptions::default()/* use setters */);
34201    /// assert!(x.json().is_some());
34202    /// assert!(x.csv().is_none());
34203    /// assert!(x.iceberg().is_none());
34204    /// ```
34205    pub fn set_json<
34206        T: std::convert::Into<std::boxed::Box<crate::model::storage_format::JsonOptions>>,
34207    >(
34208        mut self,
34209        v: T,
34210    ) -> Self {
34211        self.options =
34212            std::option::Option::Some(crate::model::storage_format::Options::Json(v.into()));
34213        self
34214    }
34215
34216    /// The value of [options][crate::model::StorageFormat::options]
34217    /// if it holds a `Iceberg`, `None` if the field is not set or
34218    /// holds a different branch.
34219    pub fn iceberg(
34220        &self,
34221    ) -> std::option::Option<&std::boxed::Box<crate::model::storage_format::IcebergOptions>> {
34222        #[allow(unreachable_patterns)]
34223        self.options.as_ref().and_then(|v| match v {
34224            crate::model::storage_format::Options::Iceberg(v) => std::option::Option::Some(v),
34225            _ => std::option::Option::None,
34226        })
34227    }
34228
34229    /// Sets the value of [options][crate::model::StorageFormat::options]
34230    /// to hold a `Iceberg`.
34231    ///
34232    /// Note that all the setters affecting `options` are
34233    /// mutually exclusive.
34234    ///
34235    /// # Example
34236    /// ```ignore,no_run
34237    /// # use google_cloud_dataplex_v1::model::StorageFormat;
34238    /// use google_cloud_dataplex_v1::model::storage_format::IcebergOptions;
34239    /// let x = StorageFormat::new().set_iceberg(IcebergOptions::default()/* use setters */);
34240    /// assert!(x.iceberg().is_some());
34241    /// assert!(x.csv().is_none());
34242    /// assert!(x.json().is_none());
34243    /// ```
34244    pub fn set_iceberg<
34245        T: std::convert::Into<std::boxed::Box<crate::model::storage_format::IcebergOptions>>,
34246    >(
34247        mut self,
34248        v: T,
34249    ) -> Self {
34250        self.options =
34251            std::option::Option::Some(crate::model::storage_format::Options::Iceberg(v.into()));
34252        self
34253    }
34254}
34255
34256impl wkt::message::Message for StorageFormat {
34257    fn typename() -> &'static str {
34258        "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat"
34259    }
34260}
34261
34262/// Defines additional types related to [StorageFormat].
34263pub mod storage_format {
34264    #[allow(unused_imports)]
34265    use super::*;
34266
34267    /// Describes CSV and similar semi-structured data formats.
34268    #[derive(Clone, Default, PartialEq)]
34269    #[non_exhaustive]
34270    pub struct CsvOptions {
34271        /// Optional. The character encoding of the data. Accepts "US-ASCII",
34272        /// "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified.
34273        pub encoding: std::string::String,
34274
34275        /// Optional. The number of rows to interpret as header rows that should be
34276        /// skipped when reading data rows. Defaults to 0.
34277        pub header_rows: i32,
34278
34279        /// Optional. The delimiter used to separate values. Defaults to ','.
34280        pub delimiter: std::string::String,
34281
34282        /// Optional. The character used to quote column values. Accepts '"'
34283        /// (double quotation mark) or ''' (single quotation mark). Defaults to
34284        /// '"' (double quotation mark) if unspecified.
34285        pub quote: std::string::String,
34286
34287        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34288    }
34289
34290    impl CsvOptions {
34291        pub fn new() -> Self {
34292            std::default::Default::default()
34293        }
34294
34295        /// Sets the value of [encoding][crate::model::storage_format::CsvOptions::encoding].
34296        ///
34297        /// # Example
34298        /// ```ignore,no_run
34299        /// # use google_cloud_dataplex_v1::model::storage_format::CsvOptions;
34300        /// let x = CsvOptions::new().set_encoding("example");
34301        /// ```
34302        pub fn set_encoding<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34303            self.encoding = v.into();
34304            self
34305        }
34306
34307        /// Sets the value of [header_rows][crate::model::storage_format::CsvOptions::header_rows].
34308        ///
34309        /// # Example
34310        /// ```ignore,no_run
34311        /// # use google_cloud_dataplex_v1::model::storage_format::CsvOptions;
34312        /// let x = CsvOptions::new().set_header_rows(42);
34313        /// ```
34314        pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
34315            self.header_rows = v.into();
34316            self
34317        }
34318
34319        /// Sets the value of [delimiter][crate::model::storage_format::CsvOptions::delimiter].
34320        ///
34321        /// # Example
34322        /// ```ignore,no_run
34323        /// # use google_cloud_dataplex_v1::model::storage_format::CsvOptions;
34324        /// let x = CsvOptions::new().set_delimiter("example");
34325        /// ```
34326        pub fn set_delimiter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34327            self.delimiter = v.into();
34328            self
34329        }
34330
34331        /// Sets the value of [quote][crate::model::storage_format::CsvOptions::quote].
34332        ///
34333        /// # Example
34334        /// ```ignore,no_run
34335        /// # use google_cloud_dataplex_v1::model::storage_format::CsvOptions;
34336        /// let x = CsvOptions::new().set_quote("example");
34337        /// ```
34338        pub fn set_quote<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34339            self.quote = v.into();
34340            self
34341        }
34342    }
34343
34344    impl wkt::message::Message for CsvOptions {
34345        fn typename() -> &'static str {
34346            "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat.CsvOptions"
34347        }
34348    }
34349
34350    /// Describes JSON data format.
34351    #[derive(Clone, Default, PartialEq)]
34352    #[non_exhaustive]
34353    pub struct JsonOptions {
34354        /// Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8"
34355        /// and "ISO-8859-1". Defaults to UTF-8 if not specified.
34356        pub encoding: std::string::String,
34357
34358        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34359    }
34360
34361    impl JsonOptions {
34362        pub fn new() -> Self {
34363            std::default::Default::default()
34364        }
34365
34366        /// Sets the value of [encoding][crate::model::storage_format::JsonOptions::encoding].
34367        ///
34368        /// # Example
34369        /// ```ignore,no_run
34370        /// # use google_cloud_dataplex_v1::model::storage_format::JsonOptions;
34371        /// let x = JsonOptions::new().set_encoding("example");
34372        /// ```
34373        pub fn set_encoding<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34374            self.encoding = v.into();
34375            self
34376        }
34377    }
34378
34379    impl wkt::message::Message for JsonOptions {
34380        fn typename() -> &'static str {
34381            "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat.JsonOptions"
34382        }
34383    }
34384
34385    /// Describes Iceberg data format.
34386    #[derive(Clone, Default, PartialEq)]
34387    #[non_exhaustive]
34388    pub struct IcebergOptions {
34389        /// Optional. The location of where the iceberg metadata is present, must be
34390        /// within the table path
34391        pub metadata_location: std::string::String,
34392
34393        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34394    }
34395
34396    impl IcebergOptions {
34397        pub fn new() -> Self {
34398            std::default::Default::default()
34399        }
34400
34401        /// Sets the value of [metadata_location][crate::model::storage_format::IcebergOptions::metadata_location].
34402        ///
34403        /// # Example
34404        /// ```ignore,no_run
34405        /// # use google_cloud_dataplex_v1::model::storage_format::IcebergOptions;
34406        /// let x = IcebergOptions::new().set_metadata_location("example");
34407        /// ```
34408        pub fn set_metadata_location<T: std::convert::Into<std::string::String>>(
34409            mut self,
34410            v: T,
34411        ) -> Self {
34412            self.metadata_location = v.into();
34413            self
34414        }
34415    }
34416
34417    impl wkt::message::Message for IcebergOptions {
34418        fn typename() -> &'static str {
34419            "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat.IcebergOptions"
34420        }
34421    }
34422
34423    /// The specific file format of the data.
34424    ///
34425    /// # Working with unknown values
34426    ///
34427    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
34428    /// additional enum variants at any time. Adding new variants is not considered
34429    /// a breaking change. Applications should write their code in anticipation of:
34430    ///
34431    /// - New values appearing in future releases of the client library, **and**
34432    /// - New values received dynamically, without application changes.
34433    ///
34434    /// Please consult the [Working with enums] section in the user guide for some
34435    /// guidelines.
34436    ///
34437    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
34438    #[derive(Clone, Debug, PartialEq)]
34439    #[non_exhaustive]
34440    pub enum Format {
34441        /// Format unspecified.
34442        Unspecified,
34443        /// Parquet-formatted structured data.
34444        Parquet,
34445        /// Avro-formatted structured data.
34446        Avro,
34447        /// Orc-formatted structured data.
34448        Orc,
34449        /// Csv-formatted semi-structured data.
34450        Csv,
34451        /// Json-formatted semi-structured data.
34452        Json,
34453        /// Image data formats (such as jpg and png).
34454        Image,
34455        /// Audio data formats (such as mp3, and wav).
34456        Audio,
34457        /// Video data formats (such as mp4 and mpg).
34458        Video,
34459        /// Textual data formats (such as txt and xml).
34460        Text,
34461        /// TensorFlow record format.
34462        Tfrecord,
34463        /// Data that doesn't match a specific format.
34464        Other,
34465        /// Data of an unknown format.
34466        Unknown,
34467        /// If set, the enum was initialized with an unknown value.
34468        ///
34469        /// Applications can examine the value using [Format::value] or
34470        /// [Format::name].
34471        UnknownValue(format::UnknownValue),
34472    }
34473
34474    #[doc(hidden)]
34475    pub mod format {
34476        #[allow(unused_imports)]
34477        use super::*;
34478        #[derive(Clone, Debug, PartialEq)]
34479        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
34480    }
34481
34482    impl Format {
34483        /// Gets the enum value.
34484        ///
34485        /// Returns `None` if the enum contains an unknown value deserialized from
34486        /// the string representation of enums.
34487        pub fn value(&self) -> std::option::Option<i32> {
34488            match self {
34489                Self::Unspecified => std::option::Option::Some(0),
34490                Self::Parquet => std::option::Option::Some(1),
34491                Self::Avro => std::option::Option::Some(2),
34492                Self::Orc => std::option::Option::Some(3),
34493                Self::Csv => std::option::Option::Some(100),
34494                Self::Json => std::option::Option::Some(101),
34495                Self::Image => std::option::Option::Some(200),
34496                Self::Audio => std::option::Option::Some(201),
34497                Self::Video => std::option::Option::Some(202),
34498                Self::Text => std::option::Option::Some(203),
34499                Self::Tfrecord => std::option::Option::Some(204),
34500                Self::Other => std::option::Option::Some(1000),
34501                Self::Unknown => std::option::Option::Some(1001),
34502                Self::UnknownValue(u) => u.0.value(),
34503            }
34504        }
34505
34506        /// Gets the enum value as a string.
34507        ///
34508        /// Returns `None` if the enum contains an unknown value deserialized from
34509        /// the integer representation of enums.
34510        pub fn name(&self) -> std::option::Option<&str> {
34511            match self {
34512                Self::Unspecified => std::option::Option::Some("FORMAT_UNSPECIFIED"),
34513                Self::Parquet => std::option::Option::Some("PARQUET"),
34514                Self::Avro => std::option::Option::Some("AVRO"),
34515                Self::Orc => std::option::Option::Some("ORC"),
34516                Self::Csv => std::option::Option::Some("CSV"),
34517                Self::Json => std::option::Option::Some("JSON"),
34518                Self::Image => std::option::Option::Some("IMAGE"),
34519                Self::Audio => std::option::Option::Some("AUDIO"),
34520                Self::Video => std::option::Option::Some("VIDEO"),
34521                Self::Text => std::option::Option::Some("TEXT"),
34522                Self::Tfrecord => std::option::Option::Some("TFRECORD"),
34523                Self::Other => std::option::Option::Some("OTHER"),
34524                Self::Unknown => std::option::Option::Some("UNKNOWN"),
34525                Self::UnknownValue(u) => u.0.name(),
34526            }
34527        }
34528    }
34529
34530    impl std::default::Default for Format {
34531        fn default() -> Self {
34532            use std::convert::From;
34533            Self::from(0)
34534        }
34535    }
34536
34537    impl std::fmt::Display for Format {
34538        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
34539            wkt::internal::display_enum(f, self.name(), self.value())
34540        }
34541    }
34542
34543    impl std::convert::From<i32> for Format {
34544        fn from(value: i32) -> Self {
34545            match value {
34546                0 => Self::Unspecified,
34547                1 => Self::Parquet,
34548                2 => Self::Avro,
34549                3 => Self::Orc,
34550                100 => Self::Csv,
34551                101 => Self::Json,
34552                200 => Self::Image,
34553                201 => Self::Audio,
34554                202 => Self::Video,
34555                203 => Self::Text,
34556                204 => Self::Tfrecord,
34557                1000 => Self::Other,
34558                1001 => Self::Unknown,
34559                _ => Self::UnknownValue(format::UnknownValue(
34560                    wkt::internal::UnknownEnumValue::Integer(value),
34561                )),
34562            }
34563        }
34564    }
34565
34566    impl std::convert::From<&str> for Format {
34567        fn from(value: &str) -> Self {
34568            use std::string::ToString;
34569            match value {
34570                "FORMAT_UNSPECIFIED" => Self::Unspecified,
34571                "PARQUET" => Self::Parquet,
34572                "AVRO" => Self::Avro,
34573                "ORC" => Self::Orc,
34574                "CSV" => Self::Csv,
34575                "JSON" => Self::Json,
34576                "IMAGE" => Self::Image,
34577                "AUDIO" => Self::Audio,
34578                "VIDEO" => Self::Video,
34579                "TEXT" => Self::Text,
34580                "TFRECORD" => Self::Tfrecord,
34581                "OTHER" => Self::Other,
34582                "UNKNOWN" => Self::Unknown,
34583                _ => Self::UnknownValue(format::UnknownValue(
34584                    wkt::internal::UnknownEnumValue::String(value.to_string()),
34585                )),
34586            }
34587        }
34588    }
34589
34590    impl serde::ser::Serialize for Format {
34591        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
34592        where
34593            S: serde::Serializer,
34594        {
34595            match self {
34596                Self::Unspecified => serializer.serialize_i32(0),
34597                Self::Parquet => serializer.serialize_i32(1),
34598                Self::Avro => serializer.serialize_i32(2),
34599                Self::Orc => serializer.serialize_i32(3),
34600                Self::Csv => serializer.serialize_i32(100),
34601                Self::Json => serializer.serialize_i32(101),
34602                Self::Image => serializer.serialize_i32(200),
34603                Self::Audio => serializer.serialize_i32(201),
34604                Self::Video => serializer.serialize_i32(202),
34605                Self::Text => serializer.serialize_i32(203),
34606                Self::Tfrecord => serializer.serialize_i32(204),
34607                Self::Other => serializer.serialize_i32(1000),
34608                Self::Unknown => serializer.serialize_i32(1001),
34609                Self::UnknownValue(u) => u.0.serialize(serializer),
34610            }
34611        }
34612    }
34613
34614    impl<'de> serde::de::Deserialize<'de> for Format {
34615        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
34616        where
34617            D: serde::Deserializer<'de>,
34618        {
34619            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Format>::new(
34620                ".google.cloud.dataplex.v1.StorageFormat.Format",
34621            ))
34622        }
34623    }
34624
34625    /// The specific compressed file format of the data.
34626    ///
34627    /// # Working with unknown values
34628    ///
34629    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
34630    /// additional enum variants at any time. Adding new variants is not considered
34631    /// a breaking change. Applications should write their code in anticipation of:
34632    ///
34633    /// - New values appearing in future releases of the client library, **and**
34634    /// - New values received dynamically, without application changes.
34635    ///
34636    /// Please consult the [Working with enums] section in the user guide for some
34637    /// guidelines.
34638    ///
34639    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
34640    #[derive(Clone, Debug, PartialEq)]
34641    #[non_exhaustive]
34642    pub enum CompressionFormat {
34643        /// CompressionFormat unspecified. Implies uncompressed data.
34644        Unspecified,
34645        /// GZip compressed set of files.
34646        Gzip,
34647        /// BZip2 compressed set of files.
34648        Bzip2,
34649        /// If set, the enum was initialized with an unknown value.
34650        ///
34651        /// Applications can examine the value using [CompressionFormat::value] or
34652        /// [CompressionFormat::name].
34653        UnknownValue(compression_format::UnknownValue),
34654    }
34655
34656    #[doc(hidden)]
34657    pub mod compression_format {
34658        #[allow(unused_imports)]
34659        use super::*;
34660        #[derive(Clone, Debug, PartialEq)]
34661        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
34662    }
34663
34664    impl CompressionFormat {
34665        /// Gets the enum value.
34666        ///
34667        /// Returns `None` if the enum contains an unknown value deserialized from
34668        /// the string representation of enums.
34669        pub fn value(&self) -> std::option::Option<i32> {
34670            match self {
34671                Self::Unspecified => std::option::Option::Some(0),
34672                Self::Gzip => std::option::Option::Some(2),
34673                Self::Bzip2 => std::option::Option::Some(3),
34674                Self::UnknownValue(u) => u.0.value(),
34675            }
34676        }
34677
34678        /// Gets the enum value as a string.
34679        ///
34680        /// Returns `None` if the enum contains an unknown value deserialized from
34681        /// the integer representation of enums.
34682        pub fn name(&self) -> std::option::Option<&str> {
34683            match self {
34684                Self::Unspecified => std::option::Option::Some("COMPRESSION_FORMAT_UNSPECIFIED"),
34685                Self::Gzip => std::option::Option::Some("GZIP"),
34686                Self::Bzip2 => std::option::Option::Some("BZIP2"),
34687                Self::UnknownValue(u) => u.0.name(),
34688            }
34689        }
34690    }
34691
34692    impl std::default::Default for CompressionFormat {
34693        fn default() -> Self {
34694            use std::convert::From;
34695            Self::from(0)
34696        }
34697    }
34698
34699    impl std::fmt::Display for CompressionFormat {
34700        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
34701            wkt::internal::display_enum(f, self.name(), self.value())
34702        }
34703    }
34704
34705    impl std::convert::From<i32> for CompressionFormat {
34706        fn from(value: i32) -> Self {
34707            match value {
34708                0 => Self::Unspecified,
34709                2 => Self::Gzip,
34710                3 => Self::Bzip2,
34711                _ => Self::UnknownValue(compression_format::UnknownValue(
34712                    wkt::internal::UnknownEnumValue::Integer(value),
34713                )),
34714            }
34715        }
34716    }
34717
34718    impl std::convert::From<&str> for CompressionFormat {
34719        fn from(value: &str) -> Self {
34720            use std::string::ToString;
34721            match value {
34722                "COMPRESSION_FORMAT_UNSPECIFIED" => Self::Unspecified,
34723                "GZIP" => Self::Gzip,
34724                "BZIP2" => Self::Bzip2,
34725                _ => Self::UnknownValue(compression_format::UnknownValue(
34726                    wkt::internal::UnknownEnumValue::String(value.to_string()),
34727                )),
34728            }
34729        }
34730    }
34731
34732    impl serde::ser::Serialize for CompressionFormat {
34733        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
34734        where
34735            S: serde::Serializer,
34736        {
34737            match self {
34738                Self::Unspecified => serializer.serialize_i32(0),
34739                Self::Gzip => serializer.serialize_i32(2),
34740                Self::Bzip2 => serializer.serialize_i32(3),
34741                Self::UnknownValue(u) => u.0.serialize(serializer),
34742            }
34743        }
34744    }
34745
34746    impl<'de> serde::de::Deserialize<'de> for CompressionFormat {
34747        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
34748        where
34749            D: serde::Deserializer<'de>,
34750        {
34751            deserializer.deserialize_any(wkt::internal::EnumVisitor::<CompressionFormat>::new(
34752                ".google.cloud.dataplex.v1.StorageFormat.CompressionFormat",
34753            ))
34754        }
34755    }
34756
34757    /// Additional format-specific options.
34758    #[derive(Clone, Debug, PartialEq)]
34759    #[non_exhaustive]
34760    pub enum Options {
34761        /// Optional. Additional information about CSV formatted data.
34762        Csv(std::boxed::Box<crate::model::storage_format::CsvOptions>),
34763        /// Optional. Additional information about CSV formatted data.
34764        Json(std::boxed::Box<crate::model::storage_format::JsonOptions>),
34765        /// Optional. Additional information about iceberg tables.
34766        Iceberg(std::boxed::Box<crate::model::storage_format::IcebergOptions>),
34767    }
34768}
34769
34770/// Describes the access mechanism of the data within its storage location.
34771#[derive(Clone, Default, PartialEq)]
34772#[non_exhaustive]
34773pub struct StorageAccess {
34774    /// Output only. Describes the read access mechanism of the data. Not user
34775    /// settable.
34776    pub read: crate::model::storage_access::AccessMode,
34777
34778    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34779}
34780
34781impl StorageAccess {
34782    pub fn new() -> Self {
34783        std::default::Default::default()
34784    }
34785
34786    /// Sets the value of [read][crate::model::StorageAccess::read].
34787    ///
34788    /// # Example
34789    /// ```ignore,no_run
34790    /// # use google_cloud_dataplex_v1::model::StorageAccess;
34791    /// use google_cloud_dataplex_v1::model::storage_access::AccessMode;
34792    /// let x0 = StorageAccess::new().set_read(AccessMode::Direct);
34793    /// let x1 = StorageAccess::new().set_read(AccessMode::Managed);
34794    /// ```
34795    pub fn set_read<T: std::convert::Into<crate::model::storage_access::AccessMode>>(
34796        mut self,
34797        v: T,
34798    ) -> Self {
34799        self.read = v.into();
34800        self
34801    }
34802}
34803
34804impl wkt::message::Message for StorageAccess {
34805    fn typename() -> &'static str {
34806        "type.googleapis.com/google.cloud.dataplex.v1.StorageAccess"
34807    }
34808}
34809
34810/// Defines additional types related to [StorageAccess].
34811pub mod storage_access {
34812    #[allow(unused_imports)]
34813    use super::*;
34814
34815    /// Access Mode determines how data stored within the Entity is read.
34816    ///
34817    /// # Working with unknown values
34818    ///
34819    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
34820    /// additional enum variants at any time. Adding new variants is not considered
34821    /// a breaking change. Applications should write their code in anticipation of:
34822    ///
34823    /// - New values appearing in future releases of the client library, **and**
34824    /// - New values received dynamically, without application changes.
34825    ///
34826    /// Please consult the [Working with enums] section in the user guide for some
34827    /// guidelines.
34828    ///
34829    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
34830    #[derive(Clone, Debug, PartialEq)]
34831    #[non_exhaustive]
34832    pub enum AccessMode {
34833        /// Access mode unspecified.
34834        Unspecified,
34835        /// Default. Data is accessed directly using storage APIs.
34836        Direct,
34837        /// Data is accessed through a managed interface using BigQuery APIs.
34838        Managed,
34839        /// If set, the enum was initialized with an unknown value.
34840        ///
34841        /// Applications can examine the value using [AccessMode::value] or
34842        /// [AccessMode::name].
34843        UnknownValue(access_mode::UnknownValue),
34844    }
34845
34846    #[doc(hidden)]
34847    pub mod access_mode {
34848        #[allow(unused_imports)]
34849        use super::*;
34850        #[derive(Clone, Debug, PartialEq)]
34851        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
34852    }
34853
34854    impl AccessMode {
34855        /// Gets the enum value.
34856        ///
34857        /// Returns `None` if the enum contains an unknown value deserialized from
34858        /// the string representation of enums.
34859        pub fn value(&self) -> std::option::Option<i32> {
34860            match self {
34861                Self::Unspecified => std::option::Option::Some(0),
34862                Self::Direct => std::option::Option::Some(1),
34863                Self::Managed => std::option::Option::Some(2),
34864                Self::UnknownValue(u) => u.0.value(),
34865            }
34866        }
34867
34868        /// Gets the enum value as a string.
34869        ///
34870        /// Returns `None` if the enum contains an unknown value deserialized from
34871        /// the integer representation of enums.
34872        pub fn name(&self) -> std::option::Option<&str> {
34873            match self {
34874                Self::Unspecified => std::option::Option::Some("ACCESS_MODE_UNSPECIFIED"),
34875                Self::Direct => std::option::Option::Some("DIRECT"),
34876                Self::Managed => std::option::Option::Some("MANAGED"),
34877                Self::UnknownValue(u) => u.0.name(),
34878            }
34879        }
34880    }
34881
34882    impl std::default::Default for AccessMode {
34883        fn default() -> Self {
34884            use std::convert::From;
34885            Self::from(0)
34886        }
34887    }
34888
34889    impl std::fmt::Display for AccessMode {
34890        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
34891            wkt::internal::display_enum(f, self.name(), self.value())
34892        }
34893    }
34894
34895    impl std::convert::From<i32> for AccessMode {
34896        fn from(value: i32) -> Self {
34897            match value {
34898                0 => Self::Unspecified,
34899                1 => Self::Direct,
34900                2 => Self::Managed,
34901                _ => Self::UnknownValue(access_mode::UnknownValue(
34902                    wkt::internal::UnknownEnumValue::Integer(value),
34903                )),
34904            }
34905        }
34906    }
34907
34908    impl std::convert::From<&str> for AccessMode {
34909        fn from(value: &str) -> Self {
34910            use std::string::ToString;
34911            match value {
34912                "ACCESS_MODE_UNSPECIFIED" => Self::Unspecified,
34913                "DIRECT" => Self::Direct,
34914                "MANAGED" => Self::Managed,
34915                _ => Self::UnknownValue(access_mode::UnknownValue(
34916                    wkt::internal::UnknownEnumValue::String(value.to_string()),
34917                )),
34918            }
34919        }
34920    }
34921
34922    impl serde::ser::Serialize for AccessMode {
34923        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
34924        where
34925            S: serde::Serializer,
34926        {
34927            match self {
34928                Self::Unspecified => serializer.serialize_i32(0),
34929                Self::Direct => serializer.serialize_i32(1),
34930                Self::Managed => serializer.serialize_i32(2),
34931                Self::UnknownValue(u) => u.0.serialize(serializer),
34932            }
34933        }
34934    }
34935
34936    impl<'de> serde::de::Deserialize<'de> for AccessMode {
34937        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
34938        where
34939            D: serde::Deserializer<'de>,
34940        {
34941            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AccessMode>::new(
34942                ".google.cloud.dataplex.v1.StorageAccess.AccessMode",
34943            ))
34944        }
34945    }
34946}
34947
34948/// DataScan scheduling and trigger settings.
34949#[derive(Clone, Default, PartialEq)]
34950#[non_exhaustive]
34951pub struct Trigger {
34952    /// DataScan scheduling and trigger settings.
34953    ///
34954    /// If not specified, the default is `onDemand`.
34955    pub mode: std::option::Option<crate::model::trigger::Mode>,
34956
34957    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34958}
34959
34960impl Trigger {
34961    pub fn new() -> Self {
34962        std::default::Default::default()
34963    }
34964
34965    /// Sets the value of [mode][crate::model::Trigger::mode].
34966    ///
34967    /// Note that all the setters affecting `mode` are mutually
34968    /// exclusive.
34969    ///
34970    /// # Example
34971    /// ```ignore,no_run
34972    /// # use google_cloud_dataplex_v1::model::Trigger;
34973    /// use google_cloud_dataplex_v1::model::trigger::OnDemand;
34974    /// let x = Trigger::new().set_mode(Some(
34975    ///     google_cloud_dataplex_v1::model::trigger::Mode::OnDemand(OnDemand::default().into())));
34976    /// ```
34977    pub fn set_mode<T: std::convert::Into<std::option::Option<crate::model::trigger::Mode>>>(
34978        mut self,
34979        v: T,
34980    ) -> Self {
34981        self.mode = v.into();
34982        self
34983    }
34984
34985    /// The value of [mode][crate::model::Trigger::mode]
34986    /// if it holds a `OnDemand`, `None` if the field is not set or
34987    /// holds a different branch.
34988    pub fn on_demand(
34989        &self,
34990    ) -> std::option::Option<&std::boxed::Box<crate::model::trigger::OnDemand>> {
34991        #[allow(unreachable_patterns)]
34992        self.mode.as_ref().and_then(|v| match v {
34993            crate::model::trigger::Mode::OnDemand(v) => std::option::Option::Some(v),
34994            _ => std::option::Option::None,
34995        })
34996    }
34997
34998    /// Sets the value of [mode][crate::model::Trigger::mode]
34999    /// to hold a `OnDemand`.
35000    ///
35001    /// Note that all the setters affecting `mode` are
35002    /// mutually exclusive.
35003    ///
35004    /// # Example
35005    /// ```ignore,no_run
35006    /// # use google_cloud_dataplex_v1::model::Trigger;
35007    /// use google_cloud_dataplex_v1::model::trigger::OnDemand;
35008    /// let x = Trigger::new().set_on_demand(OnDemand::default()/* use setters */);
35009    /// assert!(x.on_demand().is_some());
35010    /// assert!(x.schedule().is_none());
35011    /// ```
35012    pub fn set_on_demand<
35013        T: std::convert::Into<std::boxed::Box<crate::model::trigger::OnDemand>>,
35014    >(
35015        mut self,
35016        v: T,
35017    ) -> Self {
35018        self.mode = std::option::Option::Some(crate::model::trigger::Mode::OnDemand(v.into()));
35019        self
35020    }
35021
35022    /// The value of [mode][crate::model::Trigger::mode]
35023    /// if it holds a `Schedule`, `None` if the field is not set or
35024    /// holds a different branch.
35025    pub fn schedule(
35026        &self,
35027    ) -> std::option::Option<&std::boxed::Box<crate::model::trigger::Schedule>> {
35028        #[allow(unreachable_patterns)]
35029        self.mode.as_ref().and_then(|v| match v {
35030            crate::model::trigger::Mode::Schedule(v) => std::option::Option::Some(v),
35031            _ => std::option::Option::None,
35032        })
35033    }
35034
35035    /// Sets the value of [mode][crate::model::Trigger::mode]
35036    /// to hold a `Schedule`.
35037    ///
35038    /// Note that all the setters affecting `mode` are
35039    /// mutually exclusive.
35040    ///
35041    /// # Example
35042    /// ```ignore,no_run
35043    /// # use google_cloud_dataplex_v1::model::Trigger;
35044    /// use google_cloud_dataplex_v1::model::trigger::Schedule;
35045    /// let x = Trigger::new().set_schedule(Schedule::default()/* use setters */);
35046    /// assert!(x.schedule().is_some());
35047    /// assert!(x.on_demand().is_none());
35048    /// ```
35049    pub fn set_schedule<T: std::convert::Into<std::boxed::Box<crate::model::trigger::Schedule>>>(
35050        mut self,
35051        v: T,
35052    ) -> Self {
35053        self.mode = std::option::Option::Some(crate::model::trigger::Mode::Schedule(v.into()));
35054        self
35055    }
35056}
35057
35058impl wkt::message::Message for Trigger {
35059    fn typename() -> &'static str {
35060        "type.googleapis.com/google.cloud.dataplex.v1.Trigger"
35061    }
35062}
35063
35064/// Defines additional types related to [Trigger].
35065pub mod trigger {
35066    #[allow(unused_imports)]
35067    use super::*;
35068
35069    /// The scan runs once via `RunDataScan` API.
35070    #[derive(Clone, Default, PartialEq)]
35071    #[non_exhaustive]
35072    pub struct OnDemand {
35073        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35074    }
35075
35076    impl OnDemand {
35077        pub fn new() -> Self {
35078            std::default::Default::default()
35079        }
35080    }
35081
35082    impl wkt::message::Message for OnDemand {
35083        fn typename() -> &'static str {
35084            "type.googleapis.com/google.cloud.dataplex.v1.Trigger.OnDemand"
35085        }
35086    }
35087
35088    /// The scan is scheduled to run periodically.
35089    #[derive(Clone, Default, PartialEq)]
35090    #[non_exhaustive]
35091    pub struct Schedule {
35092        /// Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running
35093        /// scans periodically.
35094        ///
35095        /// To explicitly set a timezone in the cron tab, apply a prefix in the
35096        /// cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**.
35097        /// The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone
35098        /// database
35099        /// ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)).
35100        /// For example, `CRON_TZ=America/New_York 1 * * * *`, or
35101        /// `TZ=America/New_York 1 * * * *`.
35102        ///
35103        /// This field is required for Schedule scans.
35104        pub cron: std::string::String,
35105
35106        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35107    }
35108
35109    impl Schedule {
35110        pub fn new() -> Self {
35111            std::default::Default::default()
35112        }
35113
35114        /// Sets the value of [cron][crate::model::trigger::Schedule::cron].
35115        ///
35116        /// # Example
35117        /// ```ignore,no_run
35118        /// # use google_cloud_dataplex_v1::model::trigger::Schedule;
35119        /// let x = Schedule::new().set_cron("example");
35120        /// ```
35121        pub fn set_cron<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35122            self.cron = v.into();
35123            self
35124        }
35125    }
35126
35127    impl wkt::message::Message for Schedule {
35128        fn typename() -> &'static str {
35129            "type.googleapis.com/google.cloud.dataplex.v1.Trigger.Schedule"
35130        }
35131    }
35132
35133    /// DataScan scheduling and trigger settings.
35134    ///
35135    /// If not specified, the default is `onDemand`.
35136    #[derive(Clone, Debug, PartialEq)]
35137    #[non_exhaustive]
35138    pub enum Mode {
35139        /// The scan runs once via `RunDataScan` API.
35140        OnDemand(std::boxed::Box<crate::model::trigger::OnDemand>),
35141        /// The scan is scheduled to run periodically.
35142        Schedule(std::boxed::Box<crate::model::trigger::Schedule>),
35143    }
35144}
35145
35146/// The data source for DataScan.
35147#[derive(Clone, Default, PartialEq)]
35148#[non_exhaustive]
35149pub struct DataSource {
35150    /// The source is required and immutable. Once it is set, it cannot be change
35151    /// to others.
35152    pub source: std::option::Option<crate::model::data_source::Source>,
35153
35154    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35155}
35156
35157impl DataSource {
35158    pub fn new() -> Self {
35159        std::default::Default::default()
35160    }
35161
35162    /// Sets the value of [source][crate::model::DataSource::source].
35163    ///
35164    /// Note that all the setters affecting `source` are mutually
35165    /// exclusive.
35166    ///
35167    /// # Example
35168    /// ```ignore,no_run
35169    /// # use google_cloud_dataplex_v1::model::DataSource;
35170    /// use google_cloud_dataplex_v1::model::data_source::Source;
35171    /// let x = DataSource::new().set_source(Some(Source::Entity("example".to_string())));
35172    /// ```
35173    pub fn set_source<
35174        T: std::convert::Into<std::option::Option<crate::model::data_source::Source>>,
35175    >(
35176        mut self,
35177        v: T,
35178    ) -> Self {
35179        self.source = v.into();
35180        self
35181    }
35182
35183    /// The value of [source][crate::model::DataSource::source]
35184    /// if it holds a `Entity`, `None` if the field is not set or
35185    /// holds a different branch.
35186    pub fn entity(&self) -> std::option::Option<&std::string::String> {
35187        #[allow(unreachable_patterns)]
35188        self.source.as_ref().and_then(|v| match v {
35189            crate::model::data_source::Source::Entity(v) => std::option::Option::Some(v),
35190            _ => std::option::Option::None,
35191        })
35192    }
35193
35194    /// Sets the value of [source][crate::model::DataSource::source]
35195    /// to hold a `Entity`.
35196    ///
35197    /// Note that all the setters affecting `source` are
35198    /// mutually exclusive.
35199    ///
35200    /// # Example
35201    /// ```ignore,no_run
35202    /// # use google_cloud_dataplex_v1::model::DataSource;
35203    /// let x = DataSource::new().set_entity("example");
35204    /// assert!(x.entity().is_some());
35205    /// assert!(x.resource().is_none());
35206    /// ```
35207    pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35208        self.source =
35209            std::option::Option::Some(crate::model::data_source::Source::Entity(v.into()));
35210        self
35211    }
35212
35213    /// The value of [source][crate::model::DataSource::source]
35214    /// if it holds a `Resource`, `None` if the field is not set or
35215    /// holds a different branch.
35216    pub fn resource(&self) -> std::option::Option<&std::string::String> {
35217        #[allow(unreachable_patterns)]
35218        self.source.as_ref().and_then(|v| match v {
35219            crate::model::data_source::Source::Resource(v) => std::option::Option::Some(v),
35220            _ => std::option::Option::None,
35221        })
35222    }
35223
35224    /// Sets the value of [source][crate::model::DataSource::source]
35225    /// to hold a `Resource`.
35226    ///
35227    /// Note that all the setters affecting `source` are
35228    /// mutually exclusive.
35229    ///
35230    /// # Example
35231    /// ```ignore,no_run
35232    /// # use google_cloud_dataplex_v1::model::DataSource;
35233    /// let x = DataSource::new().set_resource("example");
35234    /// assert!(x.resource().is_some());
35235    /// assert!(x.entity().is_none());
35236    /// ```
35237    pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35238        self.source =
35239            std::option::Option::Some(crate::model::data_source::Source::Resource(v.into()));
35240        self
35241    }
35242}
35243
35244impl wkt::message::Message for DataSource {
35245    fn typename() -> &'static str {
35246        "type.googleapis.com/google.cloud.dataplex.v1.DataSource"
35247    }
35248}
35249
35250/// Defines additional types related to [DataSource].
35251pub mod data_source {
35252    #[allow(unused_imports)]
35253    use super::*;
35254
35255    /// The source is required and immutable. Once it is set, it cannot be change
35256    /// to others.
35257    #[derive(Clone, Debug, PartialEq)]
35258    #[non_exhaustive]
35259    pub enum Source {
35260        /// Immutable. The Dataplex Universal Catalog entity that represents the data
35261        /// source (e.g. BigQuery table) for DataScan, of the form:
35262        /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
35263        Entity(std::string::String),
35264        /// Immutable. The service-qualified full resource name of the cloud resource
35265        /// for a DataScan job to scan against. The field could either be: Cloud
35266        /// Storage bucket for DataDiscoveryScan Format:
35267        /// //storage.googleapis.com/projects/PROJECT_ID/buckets/BUCKET_ID
35268        /// or
35269        /// BigQuery table of type "TABLE" for
35270        /// DataProfileScan/DataQualityScan/DataDocumentationScan Format:
35271        /// //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
35272        Resource(std::string::String),
35273    }
35274}
35275
35276/// The data scanned during processing (e.g. in incremental DataScan)
35277#[derive(Clone, Default, PartialEq)]
35278#[non_exhaustive]
35279pub struct ScannedData {
35280    /// The range of scanned data
35281    pub data_range: std::option::Option<crate::model::scanned_data::DataRange>,
35282
35283    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35284}
35285
35286impl ScannedData {
35287    pub fn new() -> Self {
35288        std::default::Default::default()
35289    }
35290
35291    /// Sets the value of [data_range][crate::model::ScannedData::data_range].
35292    ///
35293    /// Note that all the setters affecting `data_range` are mutually
35294    /// exclusive.
35295    ///
35296    /// # Example
35297    /// ```ignore,no_run
35298    /// # use google_cloud_dataplex_v1::model::ScannedData;
35299    /// use google_cloud_dataplex_v1::model::scanned_data::IncrementalField;
35300    /// let x = ScannedData::new().set_data_range(Some(
35301    ///     google_cloud_dataplex_v1::model::scanned_data::DataRange::IncrementalField(IncrementalField::default().into())));
35302    /// ```
35303    pub fn set_data_range<
35304        T: std::convert::Into<std::option::Option<crate::model::scanned_data::DataRange>>,
35305    >(
35306        mut self,
35307        v: T,
35308    ) -> Self {
35309        self.data_range = v.into();
35310        self
35311    }
35312
35313    /// The value of [data_range][crate::model::ScannedData::data_range]
35314    /// if it holds a `IncrementalField`, `None` if the field is not set or
35315    /// holds a different branch.
35316    pub fn incremental_field(
35317        &self,
35318    ) -> std::option::Option<&std::boxed::Box<crate::model::scanned_data::IncrementalField>> {
35319        #[allow(unreachable_patterns)]
35320        self.data_range.as_ref().and_then(|v| match v {
35321            crate::model::scanned_data::DataRange::IncrementalField(v) => {
35322                std::option::Option::Some(v)
35323            }
35324            _ => std::option::Option::None,
35325        })
35326    }
35327
35328    /// Sets the value of [data_range][crate::model::ScannedData::data_range]
35329    /// to hold a `IncrementalField`.
35330    ///
35331    /// Note that all the setters affecting `data_range` are
35332    /// mutually exclusive.
35333    ///
35334    /// # Example
35335    /// ```ignore,no_run
35336    /// # use google_cloud_dataplex_v1::model::ScannedData;
35337    /// use google_cloud_dataplex_v1::model::scanned_data::IncrementalField;
35338    /// let x = ScannedData::new().set_incremental_field(IncrementalField::default()/* use setters */);
35339    /// assert!(x.incremental_field().is_some());
35340    /// ```
35341    pub fn set_incremental_field<
35342        T: std::convert::Into<std::boxed::Box<crate::model::scanned_data::IncrementalField>>,
35343    >(
35344        mut self,
35345        v: T,
35346    ) -> Self {
35347        self.data_range = std::option::Option::Some(
35348            crate::model::scanned_data::DataRange::IncrementalField(v.into()),
35349        );
35350        self
35351    }
35352}
35353
35354impl wkt::message::Message for ScannedData {
35355    fn typename() -> &'static str {
35356        "type.googleapis.com/google.cloud.dataplex.v1.ScannedData"
35357    }
35358}
35359
35360/// Defines additional types related to [ScannedData].
35361pub mod scanned_data {
35362    #[allow(unused_imports)]
35363    use super::*;
35364
35365    /// A data range denoted by a pair of start/end values of a field.
35366    #[derive(Clone, Default, PartialEq)]
35367    #[non_exhaustive]
35368    pub struct IncrementalField {
35369        /// Output only. The field that contains values which monotonically increases
35370        /// over time (e.g. a timestamp column).
35371        pub field: std::string::String,
35372
35373        /// Output only. Value that marks the start of the range.
35374        pub start: std::string::String,
35375
35376        /// Output only. Value that marks the end of the range.
35377        pub end: std::string::String,
35378
35379        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35380    }
35381
35382    impl IncrementalField {
35383        pub fn new() -> Self {
35384            std::default::Default::default()
35385        }
35386
35387        /// Sets the value of [field][crate::model::scanned_data::IncrementalField::field].
35388        ///
35389        /// # Example
35390        /// ```ignore,no_run
35391        /// # use google_cloud_dataplex_v1::model::scanned_data::IncrementalField;
35392        /// let x = IncrementalField::new().set_field("example");
35393        /// ```
35394        pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35395            self.field = v.into();
35396            self
35397        }
35398
35399        /// Sets the value of [start][crate::model::scanned_data::IncrementalField::start].
35400        ///
35401        /// # Example
35402        /// ```ignore,no_run
35403        /// # use google_cloud_dataplex_v1::model::scanned_data::IncrementalField;
35404        /// let x = IncrementalField::new().set_start("example");
35405        /// ```
35406        pub fn set_start<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35407            self.start = v.into();
35408            self
35409        }
35410
35411        /// Sets the value of [end][crate::model::scanned_data::IncrementalField::end].
35412        ///
35413        /// # Example
35414        /// ```ignore,no_run
35415        /// # use google_cloud_dataplex_v1::model::scanned_data::IncrementalField;
35416        /// let x = IncrementalField::new().set_end("example");
35417        /// ```
35418        pub fn set_end<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35419            self.end = v.into();
35420            self
35421        }
35422    }
35423
35424    impl wkt::message::Message for IncrementalField {
35425        fn typename() -> &'static str {
35426            "type.googleapis.com/google.cloud.dataplex.v1.ScannedData.IncrementalField"
35427        }
35428    }
35429
35430    /// The range of scanned data
35431    #[derive(Clone, Debug, PartialEq)]
35432    #[non_exhaustive]
35433    pub enum DataRange {
35434        /// The range denoted by values of an incremental field
35435        IncrementalField(std::boxed::Box<crate::model::scanned_data::IncrementalField>),
35436    }
35437}
35438
35439/// A lake is a centralized repository for managing enterprise data across the
35440/// organization distributed across many cloud projects, and stored in a variety
35441/// of storage services such as Google Cloud Storage and BigQuery. The resources
35442/// attached to a lake are referred to as managed resources. Data within these
35443/// managed resources can be structured or unstructured. A lake provides data
35444/// admins with tools to organize, secure and manage their data at scale, and
35445/// provides data scientists and data engineers an integrated experience to
35446/// easily search, discover, analyze and transform data and associated metadata.
35447#[derive(Clone, Default, PartialEq)]
35448#[non_exhaustive]
35449pub struct Lake {
35450    /// Output only. The relative resource name of the lake, of the form:
35451    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
35452    pub name: std::string::String,
35453
35454    /// Optional. User friendly display name.
35455    pub display_name: std::string::String,
35456
35457    /// Output only. System generated globally unique ID for the lake. This ID will
35458    /// be different if the lake is deleted and re-created with the same name.
35459    pub uid: std::string::String,
35460
35461    /// Output only. The time when the lake was created.
35462    pub create_time: std::option::Option<wkt::Timestamp>,
35463
35464    /// Output only. The time when the lake was last updated.
35465    pub update_time: std::option::Option<wkt::Timestamp>,
35466
35467    /// Optional. User-defined labels for the lake.
35468    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
35469
35470    /// Optional. Description of the lake.
35471    pub description: std::string::String,
35472
35473    /// Output only. Current state of the lake.
35474    pub state: crate::model::State,
35475
35476    /// Output only. Service account associated with this lake. This service
35477    /// account must be authorized to access or operate on resources managed by the
35478    /// lake.
35479    pub service_account: std::string::String,
35480
35481    /// Optional. Settings to manage lake and Dataproc Metastore service instance
35482    /// association.
35483    pub metastore: std::option::Option<crate::model::lake::Metastore>,
35484
35485    /// Output only. Aggregated status of the underlying assets of the lake.
35486    pub asset_status: std::option::Option<crate::model::AssetStatus>,
35487
35488    /// Output only. Metastore status of the lake.
35489    pub metastore_status: std::option::Option<crate::model::lake::MetastoreStatus>,
35490
35491    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35492}
35493
35494impl Lake {
35495    pub fn new() -> Self {
35496        std::default::Default::default()
35497    }
35498
35499    /// Sets the value of [name][crate::model::Lake::name].
35500    ///
35501    /// # Example
35502    /// ```ignore,no_run
35503    /// # use google_cloud_dataplex_v1::model::Lake;
35504    /// let x = Lake::new().set_name("example");
35505    /// ```
35506    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35507        self.name = v.into();
35508        self
35509    }
35510
35511    /// Sets the value of [display_name][crate::model::Lake::display_name].
35512    ///
35513    /// # Example
35514    /// ```ignore,no_run
35515    /// # use google_cloud_dataplex_v1::model::Lake;
35516    /// let x = Lake::new().set_display_name("example");
35517    /// ```
35518    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35519        self.display_name = v.into();
35520        self
35521    }
35522
35523    /// Sets the value of [uid][crate::model::Lake::uid].
35524    ///
35525    /// # Example
35526    /// ```ignore,no_run
35527    /// # use google_cloud_dataplex_v1::model::Lake;
35528    /// let x = Lake::new().set_uid("example");
35529    /// ```
35530    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35531        self.uid = v.into();
35532        self
35533    }
35534
35535    /// Sets the value of [create_time][crate::model::Lake::create_time].
35536    ///
35537    /// # Example
35538    /// ```ignore,no_run
35539    /// # use google_cloud_dataplex_v1::model::Lake;
35540    /// use wkt::Timestamp;
35541    /// let x = Lake::new().set_create_time(Timestamp::default()/* use setters */);
35542    /// ```
35543    pub fn set_create_time<T>(mut self, v: T) -> Self
35544    where
35545        T: std::convert::Into<wkt::Timestamp>,
35546    {
35547        self.create_time = std::option::Option::Some(v.into());
35548        self
35549    }
35550
35551    /// Sets or clears the value of [create_time][crate::model::Lake::create_time].
35552    ///
35553    /// # Example
35554    /// ```ignore,no_run
35555    /// # use google_cloud_dataplex_v1::model::Lake;
35556    /// use wkt::Timestamp;
35557    /// let x = Lake::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
35558    /// let x = Lake::new().set_or_clear_create_time(None::<Timestamp>);
35559    /// ```
35560    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
35561    where
35562        T: std::convert::Into<wkt::Timestamp>,
35563    {
35564        self.create_time = v.map(|x| x.into());
35565        self
35566    }
35567
35568    /// Sets the value of [update_time][crate::model::Lake::update_time].
35569    ///
35570    /// # Example
35571    /// ```ignore,no_run
35572    /// # use google_cloud_dataplex_v1::model::Lake;
35573    /// use wkt::Timestamp;
35574    /// let x = Lake::new().set_update_time(Timestamp::default()/* use setters */);
35575    /// ```
35576    pub fn set_update_time<T>(mut self, v: T) -> Self
35577    where
35578        T: std::convert::Into<wkt::Timestamp>,
35579    {
35580        self.update_time = std::option::Option::Some(v.into());
35581        self
35582    }
35583
35584    /// Sets or clears the value of [update_time][crate::model::Lake::update_time].
35585    ///
35586    /// # Example
35587    /// ```ignore,no_run
35588    /// # use google_cloud_dataplex_v1::model::Lake;
35589    /// use wkt::Timestamp;
35590    /// let x = Lake::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
35591    /// let x = Lake::new().set_or_clear_update_time(None::<Timestamp>);
35592    /// ```
35593    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
35594    where
35595        T: std::convert::Into<wkt::Timestamp>,
35596    {
35597        self.update_time = v.map(|x| x.into());
35598        self
35599    }
35600
35601    /// Sets the value of [labels][crate::model::Lake::labels].
35602    ///
35603    /// # Example
35604    /// ```ignore,no_run
35605    /// # use google_cloud_dataplex_v1::model::Lake;
35606    /// let x = Lake::new().set_labels([
35607    ///     ("key0", "abc"),
35608    ///     ("key1", "xyz"),
35609    /// ]);
35610    /// ```
35611    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
35612    where
35613        T: std::iter::IntoIterator<Item = (K, V)>,
35614        K: std::convert::Into<std::string::String>,
35615        V: std::convert::Into<std::string::String>,
35616    {
35617        use std::iter::Iterator;
35618        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
35619        self
35620    }
35621
35622    /// Sets the value of [description][crate::model::Lake::description].
35623    ///
35624    /// # Example
35625    /// ```ignore,no_run
35626    /// # use google_cloud_dataplex_v1::model::Lake;
35627    /// let x = Lake::new().set_description("example");
35628    /// ```
35629    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35630        self.description = v.into();
35631        self
35632    }
35633
35634    /// Sets the value of [state][crate::model::Lake::state].
35635    ///
35636    /// # Example
35637    /// ```ignore,no_run
35638    /// # use google_cloud_dataplex_v1::model::Lake;
35639    /// use google_cloud_dataplex_v1::model::State;
35640    /// let x0 = Lake::new().set_state(State::Active);
35641    /// let x1 = Lake::new().set_state(State::Creating);
35642    /// let x2 = Lake::new().set_state(State::Deleting);
35643    /// ```
35644    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
35645        self.state = v.into();
35646        self
35647    }
35648
35649    /// Sets the value of [service_account][crate::model::Lake::service_account].
35650    ///
35651    /// # Example
35652    /// ```ignore,no_run
35653    /// # use google_cloud_dataplex_v1::model::Lake;
35654    /// let x = Lake::new().set_service_account("example");
35655    /// ```
35656    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35657        self.service_account = v.into();
35658        self
35659    }
35660
35661    /// Sets the value of [metastore][crate::model::Lake::metastore].
35662    ///
35663    /// # Example
35664    /// ```ignore,no_run
35665    /// # use google_cloud_dataplex_v1::model::Lake;
35666    /// use google_cloud_dataplex_v1::model::lake::Metastore;
35667    /// let x = Lake::new().set_metastore(Metastore::default()/* use setters */);
35668    /// ```
35669    pub fn set_metastore<T>(mut self, v: T) -> Self
35670    where
35671        T: std::convert::Into<crate::model::lake::Metastore>,
35672    {
35673        self.metastore = std::option::Option::Some(v.into());
35674        self
35675    }
35676
35677    /// Sets or clears the value of [metastore][crate::model::Lake::metastore].
35678    ///
35679    /// # Example
35680    /// ```ignore,no_run
35681    /// # use google_cloud_dataplex_v1::model::Lake;
35682    /// use google_cloud_dataplex_v1::model::lake::Metastore;
35683    /// let x = Lake::new().set_or_clear_metastore(Some(Metastore::default()/* use setters */));
35684    /// let x = Lake::new().set_or_clear_metastore(None::<Metastore>);
35685    /// ```
35686    pub fn set_or_clear_metastore<T>(mut self, v: std::option::Option<T>) -> Self
35687    where
35688        T: std::convert::Into<crate::model::lake::Metastore>,
35689    {
35690        self.metastore = v.map(|x| x.into());
35691        self
35692    }
35693
35694    /// Sets the value of [asset_status][crate::model::Lake::asset_status].
35695    ///
35696    /// # Example
35697    /// ```ignore,no_run
35698    /// # use google_cloud_dataplex_v1::model::Lake;
35699    /// use google_cloud_dataplex_v1::model::AssetStatus;
35700    /// let x = Lake::new().set_asset_status(AssetStatus::default()/* use setters */);
35701    /// ```
35702    pub fn set_asset_status<T>(mut self, v: T) -> Self
35703    where
35704        T: std::convert::Into<crate::model::AssetStatus>,
35705    {
35706        self.asset_status = std::option::Option::Some(v.into());
35707        self
35708    }
35709
35710    /// Sets or clears the value of [asset_status][crate::model::Lake::asset_status].
35711    ///
35712    /// # Example
35713    /// ```ignore,no_run
35714    /// # use google_cloud_dataplex_v1::model::Lake;
35715    /// use google_cloud_dataplex_v1::model::AssetStatus;
35716    /// let x = Lake::new().set_or_clear_asset_status(Some(AssetStatus::default()/* use setters */));
35717    /// let x = Lake::new().set_or_clear_asset_status(None::<AssetStatus>);
35718    /// ```
35719    pub fn set_or_clear_asset_status<T>(mut self, v: std::option::Option<T>) -> Self
35720    where
35721        T: std::convert::Into<crate::model::AssetStatus>,
35722    {
35723        self.asset_status = v.map(|x| x.into());
35724        self
35725    }
35726
35727    /// Sets the value of [metastore_status][crate::model::Lake::metastore_status].
35728    ///
35729    /// # Example
35730    /// ```ignore,no_run
35731    /// # use google_cloud_dataplex_v1::model::Lake;
35732    /// use google_cloud_dataplex_v1::model::lake::MetastoreStatus;
35733    /// let x = Lake::new().set_metastore_status(MetastoreStatus::default()/* use setters */);
35734    /// ```
35735    pub fn set_metastore_status<T>(mut self, v: T) -> Self
35736    where
35737        T: std::convert::Into<crate::model::lake::MetastoreStatus>,
35738    {
35739        self.metastore_status = std::option::Option::Some(v.into());
35740        self
35741    }
35742
35743    /// Sets or clears the value of [metastore_status][crate::model::Lake::metastore_status].
35744    ///
35745    /// # Example
35746    /// ```ignore,no_run
35747    /// # use google_cloud_dataplex_v1::model::Lake;
35748    /// use google_cloud_dataplex_v1::model::lake::MetastoreStatus;
35749    /// let x = Lake::new().set_or_clear_metastore_status(Some(MetastoreStatus::default()/* use setters */));
35750    /// let x = Lake::new().set_or_clear_metastore_status(None::<MetastoreStatus>);
35751    /// ```
35752    pub fn set_or_clear_metastore_status<T>(mut self, v: std::option::Option<T>) -> Self
35753    where
35754        T: std::convert::Into<crate::model::lake::MetastoreStatus>,
35755    {
35756        self.metastore_status = v.map(|x| x.into());
35757        self
35758    }
35759}
35760
35761impl wkt::message::Message for Lake {
35762    fn typename() -> &'static str {
35763        "type.googleapis.com/google.cloud.dataplex.v1.Lake"
35764    }
35765}
35766
35767/// Defines additional types related to [Lake].
35768pub mod lake {
35769    #[allow(unused_imports)]
35770    use super::*;
35771
35772    /// Settings to manage association of Dataproc Metastore with a lake.
35773    #[derive(Clone, Default, PartialEq)]
35774    #[non_exhaustive]
35775    pub struct Metastore {
35776        /// Optional. A relative reference to the Dataproc Metastore
35777        /// (<https://cloud.google.com/dataproc-metastore/docs>) service associated
35778        /// with the lake:
35779        /// `projects/{project_id}/locations/{location_id}/services/{service_id}`
35780        pub service: std::string::String,
35781
35782        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35783    }
35784
35785    impl Metastore {
35786        pub fn new() -> Self {
35787            std::default::Default::default()
35788        }
35789
35790        /// Sets the value of [service][crate::model::lake::Metastore::service].
35791        ///
35792        /// # Example
35793        /// ```ignore,no_run
35794        /// # use google_cloud_dataplex_v1::model::lake::Metastore;
35795        /// let x = Metastore::new().set_service("example");
35796        /// ```
35797        pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35798            self.service = v.into();
35799            self
35800        }
35801    }
35802
35803    impl wkt::message::Message for Metastore {
35804        fn typename() -> &'static str {
35805            "type.googleapis.com/google.cloud.dataplex.v1.Lake.Metastore"
35806        }
35807    }
35808
35809    /// Status of Lake and Dataproc Metastore service instance association.
35810    #[derive(Clone, Default, PartialEq)]
35811    #[non_exhaustive]
35812    pub struct MetastoreStatus {
35813        /// Current state of association.
35814        pub state: crate::model::lake::metastore_status::State,
35815
35816        /// Additional information about the current status.
35817        pub message: std::string::String,
35818
35819        /// Last update time of the metastore status of the lake.
35820        pub update_time: std::option::Option<wkt::Timestamp>,
35821
35822        /// The URI of the endpoint used to access the Metastore service.
35823        pub endpoint: std::string::String,
35824
35825        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35826    }
35827
35828    impl MetastoreStatus {
35829        pub fn new() -> Self {
35830            std::default::Default::default()
35831        }
35832
35833        /// Sets the value of [state][crate::model::lake::MetastoreStatus::state].
35834        ///
35835        /// # Example
35836        /// ```ignore,no_run
35837        /// # use google_cloud_dataplex_v1::model::lake::MetastoreStatus;
35838        /// use google_cloud_dataplex_v1::model::lake::metastore_status::State;
35839        /// let x0 = MetastoreStatus::new().set_state(State::None);
35840        /// let x1 = MetastoreStatus::new().set_state(State::Ready);
35841        /// let x2 = MetastoreStatus::new().set_state(State::Updating);
35842        /// ```
35843        pub fn set_state<T: std::convert::Into<crate::model::lake::metastore_status::State>>(
35844            mut self,
35845            v: T,
35846        ) -> Self {
35847            self.state = v.into();
35848            self
35849        }
35850
35851        /// Sets the value of [message][crate::model::lake::MetastoreStatus::message].
35852        ///
35853        /// # Example
35854        /// ```ignore,no_run
35855        /// # use google_cloud_dataplex_v1::model::lake::MetastoreStatus;
35856        /// let x = MetastoreStatus::new().set_message("example");
35857        /// ```
35858        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35859            self.message = v.into();
35860            self
35861        }
35862
35863        /// Sets the value of [update_time][crate::model::lake::MetastoreStatus::update_time].
35864        ///
35865        /// # Example
35866        /// ```ignore,no_run
35867        /// # use google_cloud_dataplex_v1::model::lake::MetastoreStatus;
35868        /// use wkt::Timestamp;
35869        /// let x = MetastoreStatus::new().set_update_time(Timestamp::default()/* use setters */);
35870        /// ```
35871        pub fn set_update_time<T>(mut self, v: T) -> Self
35872        where
35873            T: std::convert::Into<wkt::Timestamp>,
35874        {
35875            self.update_time = std::option::Option::Some(v.into());
35876            self
35877        }
35878
35879        /// Sets or clears the value of [update_time][crate::model::lake::MetastoreStatus::update_time].
35880        ///
35881        /// # Example
35882        /// ```ignore,no_run
35883        /// # use google_cloud_dataplex_v1::model::lake::MetastoreStatus;
35884        /// use wkt::Timestamp;
35885        /// let x = MetastoreStatus::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
35886        /// let x = MetastoreStatus::new().set_or_clear_update_time(None::<Timestamp>);
35887        /// ```
35888        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
35889        where
35890            T: std::convert::Into<wkt::Timestamp>,
35891        {
35892            self.update_time = v.map(|x| x.into());
35893            self
35894        }
35895
35896        /// Sets the value of [endpoint][crate::model::lake::MetastoreStatus::endpoint].
35897        ///
35898        /// # Example
35899        /// ```ignore,no_run
35900        /// # use google_cloud_dataplex_v1::model::lake::MetastoreStatus;
35901        /// let x = MetastoreStatus::new().set_endpoint("example");
35902        /// ```
35903        pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35904            self.endpoint = v.into();
35905            self
35906        }
35907    }
35908
35909    impl wkt::message::Message for MetastoreStatus {
35910        fn typename() -> &'static str {
35911            "type.googleapis.com/google.cloud.dataplex.v1.Lake.MetastoreStatus"
35912        }
35913    }
35914
35915    /// Defines additional types related to [MetastoreStatus].
35916    pub mod metastore_status {
35917        #[allow(unused_imports)]
35918        use super::*;
35919
35920        /// Current state of association.
35921        ///
35922        /// # Working with unknown values
35923        ///
35924        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
35925        /// additional enum variants at any time. Adding new variants is not considered
35926        /// a breaking change. Applications should write their code in anticipation of:
35927        ///
35928        /// - New values appearing in future releases of the client library, **and**
35929        /// - New values received dynamically, without application changes.
35930        ///
35931        /// Please consult the [Working with enums] section in the user guide for some
35932        /// guidelines.
35933        ///
35934        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
35935        #[derive(Clone, Debug, PartialEq)]
35936        #[non_exhaustive]
35937        pub enum State {
35938            /// Unspecified.
35939            Unspecified,
35940            /// A Metastore service instance is not associated with the lake.
35941            None,
35942            /// A Metastore service instance is attached to the lake.
35943            Ready,
35944            /// Attach/detach is in progress.
35945            Updating,
35946            /// Attach/detach could not be done due to errors.
35947            Error,
35948            /// If set, the enum was initialized with an unknown value.
35949            ///
35950            /// Applications can examine the value using [State::value] or
35951            /// [State::name].
35952            UnknownValue(state::UnknownValue),
35953        }
35954
35955        #[doc(hidden)]
35956        pub mod state {
35957            #[allow(unused_imports)]
35958            use super::*;
35959            #[derive(Clone, Debug, PartialEq)]
35960            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
35961        }
35962
35963        impl State {
35964            /// Gets the enum value.
35965            ///
35966            /// Returns `None` if the enum contains an unknown value deserialized from
35967            /// the string representation of enums.
35968            pub fn value(&self) -> std::option::Option<i32> {
35969                match self {
35970                    Self::Unspecified => std::option::Option::Some(0),
35971                    Self::None => std::option::Option::Some(1),
35972                    Self::Ready => std::option::Option::Some(2),
35973                    Self::Updating => std::option::Option::Some(3),
35974                    Self::Error => std::option::Option::Some(4),
35975                    Self::UnknownValue(u) => u.0.value(),
35976                }
35977            }
35978
35979            /// Gets the enum value as a string.
35980            ///
35981            /// Returns `None` if the enum contains an unknown value deserialized from
35982            /// the integer representation of enums.
35983            pub fn name(&self) -> std::option::Option<&str> {
35984                match self {
35985                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
35986                    Self::None => std::option::Option::Some("NONE"),
35987                    Self::Ready => std::option::Option::Some("READY"),
35988                    Self::Updating => std::option::Option::Some("UPDATING"),
35989                    Self::Error => std::option::Option::Some("ERROR"),
35990                    Self::UnknownValue(u) => u.0.name(),
35991                }
35992            }
35993        }
35994
35995        impl std::default::Default for State {
35996            fn default() -> Self {
35997                use std::convert::From;
35998                Self::from(0)
35999            }
36000        }
36001
36002        impl std::fmt::Display for State {
36003            fn fmt(
36004                &self,
36005                f: &mut std::fmt::Formatter<'_>,
36006            ) -> std::result::Result<(), std::fmt::Error> {
36007                wkt::internal::display_enum(f, self.name(), self.value())
36008            }
36009        }
36010
36011        impl std::convert::From<i32> for State {
36012            fn from(value: i32) -> Self {
36013                match value {
36014                    0 => Self::Unspecified,
36015                    1 => Self::None,
36016                    2 => Self::Ready,
36017                    3 => Self::Updating,
36018                    4 => Self::Error,
36019                    _ => Self::UnknownValue(state::UnknownValue(
36020                        wkt::internal::UnknownEnumValue::Integer(value),
36021                    )),
36022                }
36023            }
36024        }
36025
36026        impl std::convert::From<&str> for State {
36027            fn from(value: &str) -> Self {
36028                use std::string::ToString;
36029                match value {
36030                    "STATE_UNSPECIFIED" => Self::Unspecified,
36031                    "NONE" => Self::None,
36032                    "READY" => Self::Ready,
36033                    "UPDATING" => Self::Updating,
36034                    "ERROR" => Self::Error,
36035                    _ => Self::UnknownValue(state::UnknownValue(
36036                        wkt::internal::UnknownEnumValue::String(value.to_string()),
36037                    )),
36038                }
36039            }
36040        }
36041
36042        impl serde::ser::Serialize for State {
36043            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36044            where
36045                S: serde::Serializer,
36046            {
36047                match self {
36048                    Self::Unspecified => serializer.serialize_i32(0),
36049                    Self::None => serializer.serialize_i32(1),
36050                    Self::Ready => serializer.serialize_i32(2),
36051                    Self::Updating => serializer.serialize_i32(3),
36052                    Self::Error => serializer.serialize_i32(4),
36053                    Self::UnknownValue(u) => u.0.serialize(serializer),
36054                }
36055            }
36056        }
36057
36058        impl<'de> serde::de::Deserialize<'de> for State {
36059            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36060            where
36061                D: serde::Deserializer<'de>,
36062            {
36063                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
36064                    ".google.cloud.dataplex.v1.Lake.MetastoreStatus.State",
36065                ))
36066            }
36067        }
36068    }
36069}
36070
36071/// Aggregated status of the underlying assets of a lake or zone.
36072#[derive(Clone, Default, PartialEq)]
36073#[non_exhaustive]
36074pub struct AssetStatus {
36075    /// Last update time of the status.
36076    pub update_time: std::option::Option<wkt::Timestamp>,
36077
36078    /// Number of active assets.
36079    pub active_assets: i32,
36080
36081    /// Number of assets that are in process of updating the security policy on
36082    /// attached resources.
36083    pub security_policy_applying_assets: i32,
36084
36085    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36086}
36087
36088impl AssetStatus {
36089    pub fn new() -> Self {
36090        std::default::Default::default()
36091    }
36092
36093    /// Sets the value of [update_time][crate::model::AssetStatus::update_time].
36094    ///
36095    /// # Example
36096    /// ```ignore,no_run
36097    /// # use google_cloud_dataplex_v1::model::AssetStatus;
36098    /// use wkt::Timestamp;
36099    /// let x = AssetStatus::new().set_update_time(Timestamp::default()/* use setters */);
36100    /// ```
36101    pub fn set_update_time<T>(mut self, v: T) -> Self
36102    where
36103        T: std::convert::Into<wkt::Timestamp>,
36104    {
36105        self.update_time = std::option::Option::Some(v.into());
36106        self
36107    }
36108
36109    /// Sets or clears the value of [update_time][crate::model::AssetStatus::update_time].
36110    ///
36111    /// # Example
36112    /// ```ignore,no_run
36113    /// # use google_cloud_dataplex_v1::model::AssetStatus;
36114    /// use wkt::Timestamp;
36115    /// let x = AssetStatus::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
36116    /// let x = AssetStatus::new().set_or_clear_update_time(None::<Timestamp>);
36117    /// ```
36118    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
36119    where
36120        T: std::convert::Into<wkt::Timestamp>,
36121    {
36122        self.update_time = v.map(|x| x.into());
36123        self
36124    }
36125
36126    /// Sets the value of [active_assets][crate::model::AssetStatus::active_assets].
36127    ///
36128    /// # Example
36129    /// ```ignore,no_run
36130    /// # use google_cloud_dataplex_v1::model::AssetStatus;
36131    /// let x = AssetStatus::new().set_active_assets(42);
36132    /// ```
36133    pub fn set_active_assets<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
36134        self.active_assets = v.into();
36135        self
36136    }
36137
36138    /// Sets the value of [security_policy_applying_assets][crate::model::AssetStatus::security_policy_applying_assets].
36139    ///
36140    /// # Example
36141    /// ```ignore,no_run
36142    /// # use google_cloud_dataplex_v1::model::AssetStatus;
36143    /// let x = AssetStatus::new().set_security_policy_applying_assets(42);
36144    /// ```
36145    pub fn set_security_policy_applying_assets<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
36146        self.security_policy_applying_assets = v.into();
36147        self
36148    }
36149}
36150
36151impl wkt::message::Message for AssetStatus {
36152    fn typename() -> &'static str {
36153        "type.googleapis.com/google.cloud.dataplex.v1.AssetStatus"
36154    }
36155}
36156
36157/// A zone represents a logical group of related assets within a lake. A zone can
36158/// be used to map to organizational structure or represent stages of data
36159/// readiness from raw to curated. It provides managing behavior that is shared
36160/// or inherited by all contained assets.
36161#[derive(Clone, Default, PartialEq)]
36162#[non_exhaustive]
36163pub struct Zone {
36164    /// Output only. The relative resource name of the zone, of the form:
36165    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
36166    pub name: std::string::String,
36167
36168    /// Optional. User friendly display name.
36169    pub display_name: std::string::String,
36170
36171    /// Output only. System generated globally unique ID for the zone. This ID will
36172    /// be different if the zone is deleted and re-created with the same name.
36173    pub uid: std::string::String,
36174
36175    /// Output only. The time when the zone was created.
36176    pub create_time: std::option::Option<wkt::Timestamp>,
36177
36178    /// Output only. The time when the zone was last updated.
36179    pub update_time: std::option::Option<wkt::Timestamp>,
36180
36181    /// Optional. User defined labels for the zone.
36182    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
36183
36184    /// Optional. Description of the zone.
36185    pub description: std::string::String,
36186
36187    /// Output only. Current state of the zone.
36188    pub state: crate::model::State,
36189
36190    /// Required. Immutable. The type of the zone.
36191    pub r#type: crate::model::zone::Type,
36192
36193    /// Optional. Specification of the discovery feature applied to data in this
36194    /// zone.
36195    pub discovery_spec: std::option::Option<crate::model::zone::DiscoverySpec>,
36196
36197    /// Required. Specification of the resources that are referenced by the assets
36198    /// within this zone.
36199    pub resource_spec: std::option::Option<crate::model::zone::ResourceSpec>,
36200
36201    /// Output only. Aggregated status of the underlying assets of the zone.
36202    pub asset_status: std::option::Option<crate::model::AssetStatus>,
36203
36204    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36205}
36206
36207impl Zone {
36208    pub fn new() -> Self {
36209        std::default::Default::default()
36210    }
36211
36212    /// Sets the value of [name][crate::model::Zone::name].
36213    ///
36214    /// # Example
36215    /// ```ignore,no_run
36216    /// # use google_cloud_dataplex_v1::model::Zone;
36217    /// let x = Zone::new().set_name("example");
36218    /// ```
36219    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36220        self.name = v.into();
36221        self
36222    }
36223
36224    /// Sets the value of [display_name][crate::model::Zone::display_name].
36225    ///
36226    /// # Example
36227    /// ```ignore,no_run
36228    /// # use google_cloud_dataplex_v1::model::Zone;
36229    /// let x = Zone::new().set_display_name("example");
36230    /// ```
36231    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36232        self.display_name = v.into();
36233        self
36234    }
36235
36236    /// Sets the value of [uid][crate::model::Zone::uid].
36237    ///
36238    /// # Example
36239    /// ```ignore,no_run
36240    /// # use google_cloud_dataplex_v1::model::Zone;
36241    /// let x = Zone::new().set_uid("example");
36242    /// ```
36243    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36244        self.uid = v.into();
36245        self
36246    }
36247
36248    /// Sets the value of [create_time][crate::model::Zone::create_time].
36249    ///
36250    /// # Example
36251    /// ```ignore,no_run
36252    /// # use google_cloud_dataplex_v1::model::Zone;
36253    /// use wkt::Timestamp;
36254    /// let x = Zone::new().set_create_time(Timestamp::default()/* use setters */);
36255    /// ```
36256    pub fn set_create_time<T>(mut self, v: T) -> Self
36257    where
36258        T: std::convert::Into<wkt::Timestamp>,
36259    {
36260        self.create_time = std::option::Option::Some(v.into());
36261        self
36262    }
36263
36264    /// Sets or clears the value of [create_time][crate::model::Zone::create_time].
36265    ///
36266    /// # Example
36267    /// ```ignore,no_run
36268    /// # use google_cloud_dataplex_v1::model::Zone;
36269    /// use wkt::Timestamp;
36270    /// let x = Zone::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
36271    /// let x = Zone::new().set_or_clear_create_time(None::<Timestamp>);
36272    /// ```
36273    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
36274    where
36275        T: std::convert::Into<wkt::Timestamp>,
36276    {
36277        self.create_time = v.map(|x| x.into());
36278        self
36279    }
36280
36281    /// Sets the value of [update_time][crate::model::Zone::update_time].
36282    ///
36283    /// # Example
36284    /// ```ignore,no_run
36285    /// # use google_cloud_dataplex_v1::model::Zone;
36286    /// use wkt::Timestamp;
36287    /// let x = Zone::new().set_update_time(Timestamp::default()/* use setters */);
36288    /// ```
36289    pub fn set_update_time<T>(mut self, v: T) -> Self
36290    where
36291        T: std::convert::Into<wkt::Timestamp>,
36292    {
36293        self.update_time = std::option::Option::Some(v.into());
36294        self
36295    }
36296
36297    /// Sets or clears the value of [update_time][crate::model::Zone::update_time].
36298    ///
36299    /// # Example
36300    /// ```ignore,no_run
36301    /// # use google_cloud_dataplex_v1::model::Zone;
36302    /// use wkt::Timestamp;
36303    /// let x = Zone::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
36304    /// let x = Zone::new().set_or_clear_update_time(None::<Timestamp>);
36305    /// ```
36306    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
36307    where
36308        T: std::convert::Into<wkt::Timestamp>,
36309    {
36310        self.update_time = v.map(|x| x.into());
36311        self
36312    }
36313
36314    /// Sets the value of [labels][crate::model::Zone::labels].
36315    ///
36316    /// # Example
36317    /// ```ignore,no_run
36318    /// # use google_cloud_dataplex_v1::model::Zone;
36319    /// let x = Zone::new().set_labels([
36320    ///     ("key0", "abc"),
36321    ///     ("key1", "xyz"),
36322    /// ]);
36323    /// ```
36324    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
36325    where
36326        T: std::iter::IntoIterator<Item = (K, V)>,
36327        K: std::convert::Into<std::string::String>,
36328        V: std::convert::Into<std::string::String>,
36329    {
36330        use std::iter::Iterator;
36331        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
36332        self
36333    }
36334
36335    /// Sets the value of [description][crate::model::Zone::description].
36336    ///
36337    /// # Example
36338    /// ```ignore,no_run
36339    /// # use google_cloud_dataplex_v1::model::Zone;
36340    /// let x = Zone::new().set_description("example");
36341    /// ```
36342    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36343        self.description = v.into();
36344        self
36345    }
36346
36347    /// Sets the value of [state][crate::model::Zone::state].
36348    ///
36349    /// # Example
36350    /// ```ignore,no_run
36351    /// # use google_cloud_dataplex_v1::model::Zone;
36352    /// use google_cloud_dataplex_v1::model::State;
36353    /// let x0 = Zone::new().set_state(State::Active);
36354    /// let x1 = Zone::new().set_state(State::Creating);
36355    /// let x2 = Zone::new().set_state(State::Deleting);
36356    /// ```
36357    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
36358        self.state = v.into();
36359        self
36360    }
36361
36362    /// Sets the value of [r#type][crate::model::Zone::type].
36363    ///
36364    /// # Example
36365    /// ```ignore,no_run
36366    /// # use google_cloud_dataplex_v1::model::Zone;
36367    /// use google_cloud_dataplex_v1::model::zone::Type;
36368    /// let x0 = Zone::new().set_type(Type::Raw);
36369    /// let x1 = Zone::new().set_type(Type::Curated);
36370    /// ```
36371    pub fn set_type<T: std::convert::Into<crate::model::zone::Type>>(mut self, v: T) -> Self {
36372        self.r#type = v.into();
36373        self
36374    }
36375
36376    /// Sets the value of [discovery_spec][crate::model::Zone::discovery_spec].
36377    ///
36378    /// # Example
36379    /// ```ignore,no_run
36380    /// # use google_cloud_dataplex_v1::model::Zone;
36381    /// use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36382    /// let x = Zone::new().set_discovery_spec(DiscoverySpec::default()/* use setters */);
36383    /// ```
36384    pub fn set_discovery_spec<T>(mut self, v: T) -> Self
36385    where
36386        T: std::convert::Into<crate::model::zone::DiscoverySpec>,
36387    {
36388        self.discovery_spec = std::option::Option::Some(v.into());
36389        self
36390    }
36391
36392    /// Sets or clears the value of [discovery_spec][crate::model::Zone::discovery_spec].
36393    ///
36394    /// # Example
36395    /// ```ignore,no_run
36396    /// # use google_cloud_dataplex_v1::model::Zone;
36397    /// use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36398    /// let x = Zone::new().set_or_clear_discovery_spec(Some(DiscoverySpec::default()/* use setters */));
36399    /// let x = Zone::new().set_or_clear_discovery_spec(None::<DiscoverySpec>);
36400    /// ```
36401    pub fn set_or_clear_discovery_spec<T>(mut self, v: std::option::Option<T>) -> Self
36402    where
36403        T: std::convert::Into<crate::model::zone::DiscoverySpec>,
36404    {
36405        self.discovery_spec = v.map(|x| x.into());
36406        self
36407    }
36408
36409    /// Sets the value of [resource_spec][crate::model::Zone::resource_spec].
36410    ///
36411    /// # Example
36412    /// ```ignore,no_run
36413    /// # use google_cloud_dataplex_v1::model::Zone;
36414    /// use google_cloud_dataplex_v1::model::zone::ResourceSpec;
36415    /// let x = Zone::new().set_resource_spec(ResourceSpec::default()/* use setters */);
36416    /// ```
36417    pub fn set_resource_spec<T>(mut self, v: T) -> Self
36418    where
36419        T: std::convert::Into<crate::model::zone::ResourceSpec>,
36420    {
36421        self.resource_spec = std::option::Option::Some(v.into());
36422        self
36423    }
36424
36425    /// Sets or clears the value of [resource_spec][crate::model::Zone::resource_spec].
36426    ///
36427    /// # Example
36428    /// ```ignore,no_run
36429    /// # use google_cloud_dataplex_v1::model::Zone;
36430    /// use google_cloud_dataplex_v1::model::zone::ResourceSpec;
36431    /// let x = Zone::new().set_or_clear_resource_spec(Some(ResourceSpec::default()/* use setters */));
36432    /// let x = Zone::new().set_or_clear_resource_spec(None::<ResourceSpec>);
36433    /// ```
36434    pub fn set_or_clear_resource_spec<T>(mut self, v: std::option::Option<T>) -> Self
36435    where
36436        T: std::convert::Into<crate::model::zone::ResourceSpec>,
36437    {
36438        self.resource_spec = v.map(|x| x.into());
36439        self
36440    }
36441
36442    /// Sets the value of [asset_status][crate::model::Zone::asset_status].
36443    ///
36444    /// # Example
36445    /// ```ignore,no_run
36446    /// # use google_cloud_dataplex_v1::model::Zone;
36447    /// use google_cloud_dataplex_v1::model::AssetStatus;
36448    /// let x = Zone::new().set_asset_status(AssetStatus::default()/* use setters */);
36449    /// ```
36450    pub fn set_asset_status<T>(mut self, v: T) -> Self
36451    where
36452        T: std::convert::Into<crate::model::AssetStatus>,
36453    {
36454        self.asset_status = std::option::Option::Some(v.into());
36455        self
36456    }
36457
36458    /// Sets or clears the value of [asset_status][crate::model::Zone::asset_status].
36459    ///
36460    /// # Example
36461    /// ```ignore,no_run
36462    /// # use google_cloud_dataplex_v1::model::Zone;
36463    /// use google_cloud_dataplex_v1::model::AssetStatus;
36464    /// let x = Zone::new().set_or_clear_asset_status(Some(AssetStatus::default()/* use setters */));
36465    /// let x = Zone::new().set_or_clear_asset_status(None::<AssetStatus>);
36466    /// ```
36467    pub fn set_or_clear_asset_status<T>(mut self, v: std::option::Option<T>) -> Self
36468    where
36469        T: std::convert::Into<crate::model::AssetStatus>,
36470    {
36471        self.asset_status = v.map(|x| x.into());
36472        self
36473    }
36474}
36475
36476impl wkt::message::Message for Zone {
36477    fn typename() -> &'static str {
36478        "type.googleapis.com/google.cloud.dataplex.v1.Zone"
36479    }
36480}
36481
36482/// Defines additional types related to [Zone].
36483pub mod zone {
36484    #[allow(unused_imports)]
36485    use super::*;
36486
36487    /// Settings for resources attached as assets within a zone.
36488    #[derive(Clone, Default, PartialEq)]
36489    #[non_exhaustive]
36490    pub struct ResourceSpec {
36491        /// Required. Immutable. The location type of the resources that are allowed
36492        /// to be attached to the assets within this zone.
36493        pub location_type: crate::model::zone::resource_spec::LocationType,
36494
36495        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36496    }
36497
36498    impl ResourceSpec {
36499        pub fn new() -> Self {
36500            std::default::Default::default()
36501        }
36502
36503        /// Sets the value of [location_type][crate::model::zone::ResourceSpec::location_type].
36504        ///
36505        /// # Example
36506        /// ```ignore,no_run
36507        /// # use google_cloud_dataplex_v1::model::zone::ResourceSpec;
36508        /// use google_cloud_dataplex_v1::model::zone::resource_spec::LocationType;
36509        /// let x0 = ResourceSpec::new().set_location_type(LocationType::SingleRegion);
36510        /// let x1 = ResourceSpec::new().set_location_type(LocationType::MultiRegion);
36511        /// ```
36512        pub fn set_location_type<
36513            T: std::convert::Into<crate::model::zone::resource_spec::LocationType>,
36514        >(
36515            mut self,
36516            v: T,
36517        ) -> Self {
36518            self.location_type = v.into();
36519            self
36520        }
36521    }
36522
36523    impl wkt::message::Message for ResourceSpec {
36524        fn typename() -> &'static str {
36525            "type.googleapis.com/google.cloud.dataplex.v1.Zone.ResourceSpec"
36526        }
36527    }
36528
36529    /// Defines additional types related to [ResourceSpec].
36530    pub mod resource_spec {
36531        #[allow(unused_imports)]
36532        use super::*;
36533
36534        /// Location type of the resources attached to a zone.
36535        ///
36536        /// # Working with unknown values
36537        ///
36538        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
36539        /// additional enum variants at any time. Adding new variants is not considered
36540        /// a breaking change. Applications should write their code in anticipation of:
36541        ///
36542        /// - New values appearing in future releases of the client library, **and**
36543        /// - New values received dynamically, without application changes.
36544        ///
36545        /// Please consult the [Working with enums] section in the user guide for some
36546        /// guidelines.
36547        ///
36548        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
36549        #[derive(Clone, Debug, PartialEq)]
36550        #[non_exhaustive]
36551        pub enum LocationType {
36552            /// Unspecified location type.
36553            Unspecified,
36554            /// Resources that are associated with a single region.
36555            SingleRegion,
36556            /// Resources that are associated with a multi-region location.
36557            MultiRegion,
36558            /// If set, the enum was initialized with an unknown value.
36559            ///
36560            /// Applications can examine the value using [LocationType::value] or
36561            /// [LocationType::name].
36562            UnknownValue(location_type::UnknownValue),
36563        }
36564
36565        #[doc(hidden)]
36566        pub mod location_type {
36567            #[allow(unused_imports)]
36568            use super::*;
36569            #[derive(Clone, Debug, PartialEq)]
36570            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36571        }
36572
36573        impl LocationType {
36574            /// Gets the enum value.
36575            ///
36576            /// Returns `None` if the enum contains an unknown value deserialized from
36577            /// the string representation of enums.
36578            pub fn value(&self) -> std::option::Option<i32> {
36579                match self {
36580                    Self::Unspecified => std::option::Option::Some(0),
36581                    Self::SingleRegion => std::option::Option::Some(1),
36582                    Self::MultiRegion => std::option::Option::Some(2),
36583                    Self::UnknownValue(u) => u.0.value(),
36584                }
36585            }
36586
36587            /// Gets the enum value as a string.
36588            ///
36589            /// Returns `None` if the enum contains an unknown value deserialized from
36590            /// the integer representation of enums.
36591            pub fn name(&self) -> std::option::Option<&str> {
36592                match self {
36593                    Self::Unspecified => std::option::Option::Some("LOCATION_TYPE_UNSPECIFIED"),
36594                    Self::SingleRegion => std::option::Option::Some("SINGLE_REGION"),
36595                    Self::MultiRegion => std::option::Option::Some("MULTI_REGION"),
36596                    Self::UnknownValue(u) => u.0.name(),
36597                }
36598            }
36599        }
36600
36601        impl std::default::Default for LocationType {
36602            fn default() -> Self {
36603                use std::convert::From;
36604                Self::from(0)
36605            }
36606        }
36607
36608        impl std::fmt::Display for LocationType {
36609            fn fmt(
36610                &self,
36611                f: &mut std::fmt::Formatter<'_>,
36612            ) -> std::result::Result<(), std::fmt::Error> {
36613                wkt::internal::display_enum(f, self.name(), self.value())
36614            }
36615        }
36616
36617        impl std::convert::From<i32> for LocationType {
36618            fn from(value: i32) -> Self {
36619                match value {
36620                    0 => Self::Unspecified,
36621                    1 => Self::SingleRegion,
36622                    2 => Self::MultiRegion,
36623                    _ => Self::UnknownValue(location_type::UnknownValue(
36624                        wkt::internal::UnknownEnumValue::Integer(value),
36625                    )),
36626                }
36627            }
36628        }
36629
36630        impl std::convert::From<&str> for LocationType {
36631            fn from(value: &str) -> Self {
36632                use std::string::ToString;
36633                match value {
36634                    "LOCATION_TYPE_UNSPECIFIED" => Self::Unspecified,
36635                    "SINGLE_REGION" => Self::SingleRegion,
36636                    "MULTI_REGION" => Self::MultiRegion,
36637                    _ => Self::UnknownValue(location_type::UnknownValue(
36638                        wkt::internal::UnknownEnumValue::String(value.to_string()),
36639                    )),
36640                }
36641            }
36642        }
36643
36644        impl serde::ser::Serialize for LocationType {
36645            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36646            where
36647                S: serde::Serializer,
36648            {
36649                match self {
36650                    Self::Unspecified => serializer.serialize_i32(0),
36651                    Self::SingleRegion => serializer.serialize_i32(1),
36652                    Self::MultiRegion => serializer.serialize_i32(2),
36653                    Self::UnknownValue(u) => u.0.serialize(serializer),
36654                }
36655            }
36656        }
36657
36658        impl<'de> serde::de::Deserialize<'de> for LocationType {
36659            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36660            where
36661                D: serde::Deserializer<'de>,
36662            {
36663                deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocationType>::new(
36664                    ".google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType",
36665                ))
36666            }
36667        }
36668    }
36669
36670    /// Settings to manage the metadata discovery and publishing in a zone.
36671    #[derive(Clone, Default, PartialEq)]
36672    #[non_exhaustive]
36673    pub struct DiscoverySpec {
36674        /// Required. Whether discovery is enabled.
36675        pub enabled: bool,
36676
36677        /// Optional. The list of patterns to apply for selecting data to include
36678        /// during discovery if only a subset of the data should considered. For
36679        /// Cloud Storage bucket assets, these are interpreted as glob patterns used
36680        /// to match object names. For BigQuery dataset assets, these are interpreted
36681        /// as patterns to match table names.
36682        pub include_patterns: std::vec::Vec<std::string::String>,
36683
36684        /// Optional. The list of patterns to apply for selecting data to exclude
36685        /// during discovery.  For Cloud Storage bucket assets, these are interpreted
36686        /// as glob patterns used to match object names. For BigQuery dataset assets,
36687        /// these are interpreted as patterns to match table names.
36688        pub exclude_patterns: std::vec::Vec<std::string::String>,
36689
36690        /// Optional. Configuration for CSV data.
36691        pub csv_options: std::option::Option<crate::model::zone::discovery_spec::CsvOptions>,
36692
36693        /// Optional. Configuration for Json data.
36694        pub json_options: std::option::Option<crate::model::zone::discovery_spec::JsonOptions>,
36695
36696        /// Determines when discovery is triggered.
36697        pub trigger: std::option::Option<crate::model::zone::discovery_spec::Trigger>,
36698
36699        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36700    }
36701
36702    impl DiscoverySpec {
36703        pub fn new() -> Self {
36704            std::default::Default::default()
36705        }
36706
36707        /// Sets the value of [enabled][crate::model::zone::DiscoverySpec::enabled].
36708        ///
36709        /// # Example
36710        /// ```ignore,no_run
36711        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36712        /// let x = DiscoverySpec::new().set_enabled(true);
36713        /// ```
36714        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
36715            self.enabled = v.into();
36716            self
36717        }
36718
36719        /// Sets the value of [include_patterns][crate::model::zone::DiscoverySpec::include_patterns].
36720        ///
36721        /// # Example
36722        /// ```ignore,no_run
36723        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36724        /// let x = DiscoverySpec::new().set_include_patterns(["a", "b", "c"]);
36725        /// ```
36726        pub fn set_include_patterns<T, V>(mut self, v: T) -> Self
36727        where
36728            T: std::iter::IntoIterator<Item = V>,
36729            V: std::convert::Into<std::string::String>,
36730        {
36731            use std::iter::Iterator;
36732            self.include_patterns = v.into_iter().map(|i| i.into()).collect();
36733            self
36734        }
36735
36736        /// Sets the value of [exclude_patterns][crate::model::zone::DiscoverySpec::exclude_patterns].
36737        ///
36738        /// # Example
36739        /// ```ignore,no_run
36740        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36741        /// let x = DiscoverySpec::new().set_exclude_patterns(["a", "b", "c"]);
36742        /// ```
36743        pub fn set_exclude_patterns<T, V>(mut self, v: T) -> Self
36744        where
36745            T: std::iter::IntoIterator<Item = V>,
36746            V: std::convert::Into<std::string::String>,
36747        {
36748            use std::iter::Iterator;
36749            self.exclude_patterns = v.into_iter().map(|i| i.into()).collect();
36750            self
36751        }
36752
36753        /// Sets the value of [csv_options][crate::model::zone::DiscoverySpec::csv_options].
36754        ///
36755        /// # Example
36756        /// ```ignore,no_run
36757        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36758        /// use google_cloud_dataplex_v1::model::zone::discovery_spec::CsvOptions;
36759        /// let x = DiscoverySpec::new().set_csv_options(CsvOptions::default()/* use setters */);
36760        /// ```
36761        pub fn set_csv_options<T>(mut self, v: T) -> Self
36762        where
36763            T: std::convert::Into<crate::model::zone::discovery_spec::CsvOptions>,
36764        {
36765            self.csv_options = std::option::Option::Some(v.into());
36766            self
36767        }
36768
36769        /// Sets or clears the value of [csv_options][crate::model::zone::DiscoverySpec::csv_options].
36770        ///
36771        /// # Example
36772        /// ```ignore,no_run
36773        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36774        /// use google_cloud_dataplex_v1::model::zone::discovery_spec::CsvOptions;
36775        /// let x = DiscoverySpec::new().set_or_clear_csv_options(Some(CsvOptions::default()/* use setters */));
36776        /// let x = DiscoverySpec::new().set_or_clear_csv_options(None::<CsvOptions>);
36777        /// ```
36778        pub fn set_or_clear_csv_options<T>(mut self, v: std::option::Option<T>) -> Self
36779        where
36780            T: std::convert::Into<crate::model::zone::discovery_spec::CsvOptions>,
36781        {
36782            self.csv_options = v.map(|x| x.into());
36783            self
36784        }
36785
36786        /// Sets the value of [json_options][crate::model::zone::DiscoverySpec::json_options].
36787        ///
36788        /// # Example
36789        /// ```ignore,no_run
36790        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36791        /// use google_cloud_dataplex_v1::model::zone::discovery_spec::JsonOptions;
36792        /// let x = DiscoverySpec::new().set_json_options(JsonOptions::default()/* use setters */);
36793        /// ```
36794        pub fn set_json_options<T>(mut self, v: T) -> Self
36795        where
36796            T: std::convert::Into<crate::model::zone::discovery_spec::JsonOptions>,
36797        {
36798            self.json_options = std::option::Option::Some(v.into());
36799            self
36800        }
36801
36802        /// Sets or clears the value of [json_options][crate::model::zone::DiscoverySpec::json_options].
36803        ///
36804        /// # Example
36805        /// ```ignore,no_run
36806        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36807        /// use google_cloud_dataplex_v1::model::zone::discovery_spec::JsonOptions;
36808        /// let x = DiscoverySpec::new().set_or_clear_json_options(Some(JsonOptions::default()/* use setters */));
36809        /// let x = DiscoverySpec::new().set_or_clear_json_options(None::<JsonOptions>);
36810        /// ```
36811        pub fn set_or_clear_json_options<T>(mut self, v: std::option::Option<T>) -> Self
36812        where
36813            T: std::convert::Into<crate::model::zone::discovery_spec::JsonOptions>,
36814        {
36815            self.json_options = v.map(|x| x.into());
36816            self
36817        }
36818
36819        /// Sets the value of [trigger][crate::model::zone::DiscoverySpec::trigger].
36820        ///
36821        /// Note that all the setters affecting `trigger` are mutually
36822        /// exclusive.
36823        ///
36824        /// # Example
36825        /// ```ignore,no_run
36826        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36827        /// use google_cloud_dataplex_v1::model::zone::discovery_spec::Trigger;
36828        /// let x = DiscoverySpec::new().set_trigger(Some(Trigger::Schedule("example".to_string())));
36829        /// ```
36830        pub fn set_trigger<
36831            T: std::convert::Into<std::option::Option<crate::model::zone::discovery_spec::Trigger>>,
36832        >(
36833            mut self,
36834            v: T,
36835        ) -> Self {
36836            self.trigger = v.into();
36837            self
36838        }
36839
36840        /// The value of [trigger][crate::model::zone::DiscoverySpec::trigger]
36841        /// if it holds a `Schedule`, `None` if the field is not set or
36842        /// holds a different branch.
36843        pub fn schedule(&self) -> std::option::Option<&std::string::String> {
36844            #[allow(unreachable_patterns)]
36845            self.trigger.as_ref().and_then(|v| match v {
36846                crate::model::zone::discovery_spec::Trigger::Schedule(v) => {
36847                    std::option::Option::Some(v)
36848                }
36849                _ => std::option::Option::None,
36850            })
36851        }
36852
36853        /// Sets the value of [trigger][crate::model::zone::DiscoverySpec::trigger]
36854        /// to hold a `Schedule`.
36855        ///
36856        /// Note that all the setters affecting `trigger` are
36857        /// mutually exclusive.
36858        ///
36859        /// # Example
36860        /// ```ignore,no_run
36861        /// # use google_cloud_dataplex_v1::model::zone::DiscoverySpec;
36862        /// let x = DiscoverySpec::new().set_schedule("example");
36863        /// assert!(x.schedule().is_some());
36864        /// ```
36865        pub fn set_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36866            self.trigger = std::option::Option::Some(
36867                crate::model::zone::discovery_spec::Trigger::Schedule(v.into()),
36868            );
36869            self
36870        }
36871    }
36872
36873    impl wkt::message::Message for DiscoverySpec {
36874        fn typename() -> &'static str {
36875            "type.googleapis.com/google.cloud.dataplex.v1.Zone.DiscoverySpec"
36876        }
36877    }
36878
36879    /// Defines additional types related to [DiscoverySpec].
36880    pub mod discovery_spec {
36881        #[allow(unused_imports)]
36882        use super::*;
36883
36884        /// Describe CSV and similar semi-structured data formats.
36885        #[derive(Clone, Default, PartialEq)]
36886        #[non_exhaustive]
36887        pub struct CsvOptions {
36888            /// Optional. The number of rows to interpret as header rows that should be
36889            /// skipped when reading data rows.
36890            pub header_rows: i32,
36891
36892            /// Optional. The delimiter being used to separate values. This defaults to
36893            /// ','.
36894            pub delimiter: std::string::String,
36895
36896            /// Optional. The character encoding of the data. The default is UTF-8.
36897            pub encoding: std::string::String,
36898
36899            /// Optional. Whether to disable the inference of data type for CSV data.
36900            /// If true, all columns will be registered as strings.
36901            pub disable_type_inference: bool,
36902
36903            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36904        }
36905
36906        impl CsvOptions {
36907            pub fn new() -> Self {
36908                std::default::Default::default()
36909            }
36910
36911            /// Sets the value of [header_rows][crate::model::zone::discovery_spec::CsvOptions::header_rows].
36912            ///
36913            /// # Example
36914            /// ```ignore,no_run
36915            /// # use google_cloud_dataplex_v1::model::zone::discovery_spec::CsvOptions;
36916            /// let x = CsvOptions::new().set_header_rows(42);
36917            /// ```
36918            pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
36919                self.header_rows = v.into();
36920                self
36921            }
36922
36923            /// Sets the value of [delimiter][crate::model::zone::discovery_spec::CsvOptions::delimiter].
36924            ///
36925            /// # Example
36926            /// ```ignore,no_run
36927            /// # use google_cloud_dataplex_v1::model::zone::discovery_spec::CsvOptions;
36928            /// let x = CsvOptions::new().set_delimiter("example");
36929            /// ```
36930            pub fn set_delimiter<T: std::convert::Into<std::string::String>>(
36931                mut self,
36932                v: T,
36933            ) -> Self {
36934                self.delimiter = v.into();
36935                self
36936            }
36937
36938            /// Sets the value of [encoding][crate::model::zone::discovery_spec::CsvOptions::encoding].
36939            ///
36940            /// # Example
36941            /// ```ignore,no_run
36942            /// # use google_cloud_dataplex_v1::model::zone::discovery_spec::CsvOptions;
36943            /// let x = CsvOptions::new().set_encoding("example");
36944            /// ```
36945            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
36946                mut self,
36947                v: T,
36948            ) -> Self {
36949                self.encoding = v.into();
36950                self
36951            }
36952
36953            /// Sets the value of [disable_type_inference][crate::model::zone::discovery_spec::CsvOptions::disable_type_inference].
36954            ///
36955            /// # Example
36956            /// ```ignore,no_run
36957            /// # use google_cloud_dataplex_v1::model::zone::discovery_spec::CsvOptions;
36958            /// let x = CsvOptions::new().set_disable_type_inference(true);
36959            /// ```
36960            pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
36961                self.disable_type_inference = v.into();
36962                self
36963            }
36964        }
36965
36966        impl wkt::message::Message for CsvOptions {
36967            fn typename() -> &'static str {
36968                "type.googleapis.com/google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions"
36969            }
36970        }
36971
36972        /// Describe JSON data format.
36973        #[derive(Clone, Default, PartialEq)]
36974        #[non_exhaustive]
36975        pub struct JsonOptions {
36976            /// Optional. The character encoding of the data. The default is UTF-8.
36977            pub encoding: std::string::String,
36978
36979            /// Optional. Whether to disable the inference of data type for Json data.
36980            /// If true, all columns will be registered as their primitive types
36981            /// (strings, number or boolean).
36982            pub disable_type_inference: bool,
36983
36984            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36985        }
36986
36987        impl JsonOptions {
36988            pub fn new() -> Self {
36989                std::default::Default::default()
36990            }
36991
36992            /// Sets the value of [encoding][crate::model::zone::discovery_spec::JsonOptions::encoding].
36993            ///
36994            /// # Example
36995            /// ```ignore,no_run
36996            /// # use google_cloud_dataplex_v1::model::zone::discovery_spec::JsonOptions;
36997            /// let x = JsonOptions::new().set_encoding("example");
36998            /// ```
36999            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
37000                mut self,
37001                v: T,
37002            ) -> Self {
37003                self.encoding = v.into();
37004                self
37005            }
37006
37007            /// Sets the value of [disable_type_inference][crate::model::zone::discovery_spec::JsonOptions::disable_type_inference].
37008            ///
37009            /// # Example
37010            /// ```ignore,no_run
37011            /// # use google_cloud_dataplex_v1::model::zone::discovery_spec::JsonOptions;
37012            /// let x = JsonOptions::new().set_disable_type_inference(true);
37013            /// ```
37014            pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
37015                self.disable_type_inference = v.into();
37016                self
37017            }
37018        }
37019
37020        impl wkt::message::Message for JsonOptions {
37021            fn typename() -> &'static str {
37022                "type.googleapis.com/google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions"
37023            }
37024        }
37025
37026        /// Determines when discovery is triggered.
37027        #[derive(Clone, Debug, PartialEq)]
37028        #[non_exhaustive]
37029        pub enum Trigger {
37030            /// Optional. Cron schedule (<https://en.wikipedia.org/wiki/Cron>) for
37031            /// running discovery periodically. Successive discovery runs must be
37032            /// scheduled at least 60 minutes apart. The default value is to run
37033            /// discovery every 60 minutes.
37034            ///
37035            /// To explicitly set a timezone to the cron tab, apply a prefix in the
37036            /// cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or TZ=${IANA_TIME_ZONE}".
37037            /// The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
37038            /// database. For example, `CRON_TZ=America/New_York 1 * * * *`, or
37039            /// `TZ=America/New_York 1 * * * *`.
37040            Schedule(std::string::String),
37041        }
37042    }
37043
37044    /// Type of zone.
37045    ///
37046    /// # Working with unknown values
37047    ///
37048    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
37049    /// additional enum variants at any time. Adding new variants is not considered
37050    /// a breaking change. Applications should write their code in anticipation of:
37051    ///
37052    /// - New values appearing in future releases of the client library, **and**
37053    /// - New values received dynamically, without application changes.
37054    ///
37055    /// Please consult the [Working with enums] section in the user guide for some
37056    /// guidelines.
37057    ///
37058    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
37059    #[derive(Clone, Debug, PartialEq)]
37060    #[non_exhaustive]
37061    pub enum Type {
37062        /// Zone type not specified.
37063        Unspecified,
37064        /// A zone that contains data that needs further processing before it is
37065        /// considered generally ready for consumption and analytics workloads.
37066        Raw,
37067        /// A zone that contains data that is considered to be ready for broader
37068        /// consumption and analytics workloads. Curated structured data stored in
37069        /// Cloud Storage must conform to certain file formats (parquet, avro and
37070        /// orc) and organized in a hive-compatible directory layout.
37071        Curated,
37072        /// If set, the enum was initialized with an unknown value.
37073        ///
37074        /// Applications can examine the value using [Type::value] or
37075        /// [Type::name].
37076        UnknownValue(r#type::UnknownValue),
37077    }
37078
37079    #[doc(hidden)]
37080    pub mod r#type {
37081        #[allow(unused_imports)]
37082        use super::*;
37083        #[derive(Clone, Debug, PartialEq)]
37084        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
37085    }
37086
37087    impl Type {
37088        /// Gets the enum value.
37089        ///
37090        /// Returns `None` if the enum contains an unknown value deserialized from
37091        /// the string representation of enums.
37092        pub fn value(&self) -> std::option::Option<i32> {
37093            match self {
37094                Self::Unspecified => std::option::Option::Some(0),
37095                Self::Raw => std::option::Option::Some(1),
37096                Self::Curated => std::option::Option::Some(2),
37097                Self::UnknownValue(u) => u.0.value(),
37098            }
37099        }
37100
37101        /// Gets the enum value as a string.
37102        ///
37103        /// Returns `None` if the enum contains an unknown value deserialized from
37104        /// the integer representation of enums.
37105        pub fn name(&self) -> std::option::Option<&str> {
37106            match self {
37107                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
37108                Self::Raw => std::option::Option::Some("RAW"),
37109                Self::Curated => std::option::Option::Some("CURATED"),
37110                Self::UnknownValue(u) => u.0.name(),
37111            }
37112        }
37113    }
37114
37115    impl std::default::Default for Type {
37116        fn default() -> Self {
37117            use std::convert::From;
37118            Self::from(0)
37119        }
37120    }
37121
37122    impl std::fmt::Display for Type {
37123        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
37124            wkt::internal::display_enum(f, self.name(), self.value())
37125        }
37126    }
37127
37128    impl std::convert::From<i32> for Type {
37129        fn from(value: i32) -> Self {
37130            match value {
37131                0 => Self::Unspecified,
37132                1 => Self::Raw,
37133                2 => Self::Curated,
37134                _ => Self::UnknownValue(r#type::UnknownValue(
37135                    wkt::internal::UnknownEnumValue::Integer(value),
37136                )),
37137            }
37138        }
37139    }
37140
37141    impl std::convert::From<&str> for Type {
37142        fn from(value: &str) -> Self {
37143            use std::string::ToString;
37144            match value {
37145                "TYPE_UNSPECIFIED" => Self::Unspecified,
37146                "RAW" => Self::Raw,
37147                "CURATED" => Self::Curated,
37148                _ => Self::UnknownValue(r#type::UnknownValue(
37149                    wkt::internal::UnknownEnumValue::String(value.to_string()),
37150                )),
37151            }
37152        }
37153    }
37154
37155    impl serde::ser::Serialize for Type {
37156        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
37157        where
37158            S: serde::Serializer,
37159        {
37160            match self {
37161                Self::Unspecified => serializer.serialize_i32(0),
37162                Self::Raw => serializer.serialize_i32(1),
37163                Self::Curated => serializer.serialize_i32(2),
37164                Self::UnknownValue(u) => u.0.serialize(serializer),
37165            }
37166        }
37167    }
37168
37169    impl<'de> serde::de::Deserialize<'de> for Type {
37170        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
37171        where
37172            D: serde::Deserializer<'de>,
37173        {
37174            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
37175                ".google.cloud.dataplex.v1.Zone.Type",
37176            ))
37177        }
37178    }
37179}
37180
37181/// Action represents an issue requiring administrator action for resolution.
37182#[derive(Clone, Default, PartialEq)]
37183#[non_exhaustive]
37184pub struct Action {
37185    /// The category of issue associated with the action.
37186    pub category: crate::model::action::Category,
37187
37188    /// Detailed description of the issue requiring action.
37189    pub issue: std::string::String,
37190
37191    /// The time that the issue was detected.
37192    pub detect_time: std::option::Option<wkt::Timestamp>,
37193
37194    /// Output only. The relative resource name of the action, of the form:
37195    /// `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}`
37196    /// `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}`
37197    /// `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`.
37198    pub name: std::string::String,
37199
37200    /// Output only. The relative resource name of the lake, of the form:
37201    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
37202    pub lake: std::string::String,
37203
37204    /// Output only. The relative resource name of the zone, of the form:
37205    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
37206    pub zone: std::string::String,
37207
37208    /// Output only. The relative resource name of the asset, of the form:
37209    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
37210    pub asset: std::string::String,
37211
37212    /// The list of data locations associated with this action. Cloud Storage
37213    /// locations are represented as URI paths(E.g.
37214    /// `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to
37215    /// resource names(E.g.
37216    /// `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`).
37217    pub data_locations: std::vec::Vec<std::string::String>,
37218
37219    /// Additional details about the action based on the action category.
37220    pub details: std::option::Option<crate::model::action::Details>,
37221
37222    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37223}
37224
37225impl Action {
37226    pub fn new() -> Self {
37227        std::default::Default::default()
37228    }
37229
37230    /// Sets the value of [category][crate::model::Action::category].
37231    ///
37232    /// # Example
37233    /// ```ignore,no_run
37234    /// # use google_cloud_dataplex_v1::model::Action;
37235    /// use google_cloud_dataplex_v1::model::action::Category;
37236    /// let x0 = Action::new().set_category(Category::ResourceManagement);
37237    /// let x1 = Action::new().set_category(Category::SecurityPolicy);
37238    /// let x2 = Action::new().set_category(Category::DataDiscovery);
37239    /// ```
37240    pub fn set_category<T: std::convert::Into<crate::model::action::Category>>(
37241        mut self,
37242        v: T,
37243    ) -> Self {
37244        self.category = v.into();
37245        self
37246    }
37247
37248    /// Sets the value of [issue][crate::model::Action::issue].
37249    ///
37250    /// # Example
37251    /// ```ignore,no_run
37252    /// # use google_cloud_dataplex_v1::model::Action;
37253    /// let x = Action::new().set_issue("example");
37254    /// ```
37255    pub fn set_issue<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37256        self.issue = v.into();
37257        self
37258    }
37259
37260    /// Sets the value of [detect_time][crate::model::Action::detect_time].
37261    ///
37262    /// # Example
37263    /// ```ignore,no_run
37264    /// # use google_cloud_dataplex_v1::model::Action;
37265    /// use wkt::Timestamp;
37266    /// let x = Action::new().set_detect_time(Timestamp::default()/* use setters */);
37267    /// ```
37268    pub fn set_detect_time<T>(mut self, v: T) -> Self
37269    where
37270        T: std::convert::Into<wkt::Timestamp>,
37271    {
37272        self.detect_time = std::option::Option::Some(v.into());
37273        self
37274    }
37275
37276    /// Sets or clears the value of [detect_time][crate::model::Action::detect_time].
37277    ///
37278    /// # Example
37279    /// ```ignore,no_run
37280    /// # use google_cloud_dataplex_v1::model::Action;
37281    /// use wkt::Timestamp;
37282    /// let x = Action::new().set_or_clear_detect_time(Some(Timestamp::default()/* use setters */));
37283    /// let x = Action::new().set_or_clear_detect_time(None::<Timestamp>);
37284    /// ```
37285    pub fn set_or_clear_detect_time<T>(mut self, v: std::option::Option<T>) -> Self
37286    where
37287        T: std::convert::Into<wkt::Timestamp>,
37288    {
37289        self.detect_time = v.map(|x| x.into());
37290        self
37291    }
37292
37293    /// Sets the value of [name][crate::model::Action::name].
37294    ///
37295    /// # Example
37296    /// ```ignore,no_run
37297    /// # use google_cloud_dataplex_v1::model::Action;
37298    /// let x = Action::new().set_name("example");
37299    /// ```
37300    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37301        self.name = v.into();
37302        self
37303    }
37304
37305    /// Sets the value of [lake][crate::model::Action::lake].
37306    ///
37307    /// # Example
37308    /// ```ignore,no_run
37309    /// # use google_cloud_dataplex_v1::model::Action;
37310    /// let x = Action::new().set_lake("example");
37311    /// ```
37312    pub fn set_lake<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37313        self.lake = v.into();
37314        self
37315    }
37316
37317    /// Sets the value of [zone][crate::model::Action::zone].
37318    ///
37319    /// # Example
37320    /// ```ignore,no_run
37321    /// # use google_cloud_dataplex_v1::model::Action;
37322    /// let x = Action::new().set_zone("example");
37323    /// ```
37324    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37325        self.zone = v.into();
37326        self
37327    }
37328
37329    /// Sets the value of [asset][crate::model::Action::asset].
37330    ///
37331    /// # Example
37332    /// ```ignore,no_run
37333    /// # use google_cloud_dataplex_v1::model::Action;
37334    /// let x = Action::new().set_asset("example");
37335    /// ```
37336    pub fn set_asset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37337        self.asset = v.into();
37338        self
37339    }
37340
37341    /// Sets the value of [data_locations][crate::model::Action::data_locations].
37342    ///
37343    /// # Example
37344    /// ```ignore,no_run
37345    /// # use google_cloud_dataplex_v1::model::Action;
37346    /// let x = Action::new().set_data_locations(["a", "b", "c"]);
37347    /// ```
37348    pub fn set_data_locations<T, V>(mut self, v: T) -> Self
37349    where
37350        T: std::iter::IntoIterator<Item = V>,
37351        V: std::convert::Into<std::string::String>,
37352    {
37353        use std::iter::Iterator;
37354        self.data_locations = v.into_iter().map(|i| i.into()).collect();
37355        self
37356    }
37357
37358    /// Sets the value of [details][crate::model::Action::details].
37359    ///
37360    /// Note that all the setters affecting `details` are mutually
37361    /// exclusive.
37362    ///
37363    /// # Example
37364    /// ```ignore,no_run
37365    /// # use google_cloud_dataplex_v1::model::Action;
37366    /// use google_cloud_dataplex_v1::model::action::InvalidDataFormat;
37367    /// let x = Action::new().set_details(Some(
37368    ///     google_cloud_dataplex_v1::model::action::Details::InvalidDataFormat(InvalidDataFormat::default().into())));
37369    /// ```
37370    pub fn set_details<
37371        T: std::convert::Into<std::option::Option<crate::model::action::Details>>,
37372    >(
37373        mut self,
37374        v: T,
37375    ) -> Self {
37376        self.details = v.into();
37377        self
37378    }
37379
37380    /// The value of [details][crate::model::Action::details]
37381    /// if it holds a `InvalidDataFormat`, `None` if the field is not set or
37382    /// holds a different branch.
37383    pub fn invalid_data_format(
37384        &self,
37385    ) -> std::option::Option<&std::boxed::Box<crate::model::action::InvalidDataFormat>> {
37386        #[allow(unreachable_patterns)]
37387        self.details.as_ref().and_then(|v| match v {
37388            crate::model::action::Details::InvalidDataFormat(v) => std::option::Option::Some(v),
37389            _ => std::option::Option::None,
37390        })
37391    }
37392
37393    /// Sets the value of [details][crate::model::Action::details]
37394    /// to hold a `InvalidDataFormat`.
37395    ///
37396    /// Note that all the setters affecting `details` are
37397    /// mutually exclusive.
37398    ///
37399    /// # Example
37400    /// ```ignore,no_run
37401    /// # use google_cloud_dataplex_v1::model::Action;
37402    /// use google_cloud_dataplex_v1::model::action::InvalidDataFormat;
37403    /// let x = Action::new().set_invalid_data_format(InvalidDataFormat::default()/* use setters */);
37404    /// assert!(x.invalid_data_format().is_some());
37405    /// assert!(x.incompatible_data_schema().is_none());
37406    /// assert!(x.invalid_data_partition().is_none());
37407    /// assert!(x.missing_data().is_none());
37408    /// assert!(x.missing_resource().is_none());
37409    /// assert!(x.unauthorized_resource().is_none());
37410    /// assert!(x.failed_security_policy_apply().is_none());
37411    /// assert!(x.invalid_data_organization().is_none());
37412    /// ```
37413    pub fn set_invalid_data_format<
37414        T: std::convert::Into<std::boxed::Box<crate::model::action::InvalidDataFormat>>,
37415    >(
37416        mut self,
37417        v: T,
37418    ) -> Self {
37419        self.details =
37420            std::option::Option::Some(crate::model::action::Details::InvalidDataFormat(v.into()));
37421        self
37422    }
37423
37424    /// The value of [details][crate::model::Action::details]
37425    /// if it holds a `IncompatibleDataSchema`, `None` if the field is not set or
37426    /// holds a different branch.
37427    pub fn incompatible_data_schema(
37428        &self,
37429    ) -> std::option::Option<&std::boxed::Box<crate::model::action::IncompatibleDataSchema>> {
37430        #[allow(unreachable_patterns)]
37431        self.details.as_ref().and_then(|v| match v {
37432            crate::model::action::Details::IncompatibleDataSchema(v) => {
37433                std::option::Option::Some(v)
37434            }
37435            _ => std::option::Option::None,
37436        })
37437    }
37438
37439    /// Sets the value of [details][crate::model::Action::details]
37440    /// to hold a `IncompatibleDataSchema`.
37441    ///
37442    /// Note that all the setters affecting `details` are
37443    /// mutually exclusive.
37444    ///
37445    /// # Example
37446    /// ```ignore,no_run
37447    /// # use google_cloud_dataplex_v1::model::Action;
37448    /// use google_cloud_dataplex_v1::model::action::IncompatibleDataSchema;
37449    /// let x = Action::new().set_incompatible_data_schema(IncompatibleDataSchema::default()/* use setters */);
37450    /// assert!(x.incompatible_data_schema().is_some());
37451    /// assert!(x.invalid_data_format().is_none());
37452    /// assert!(x.invalid_data_partition().is_none());
37453    /// assert!(x.missing_data().is_none());
37454    /// assert!(x.missing_resource().is_none());
37455    /// assert!(x.unauthorized_resource().is_none());
37456    /// assert!(x.failed_security_policy_apply().is_none());
37457    /// assert!(x.invalid_data_organization().is_none());
37458    /// ```
37459    pub fn set_incompatible_data_schema<
37460        T: std::convert::Into<std::boxed::Box<crate::model::action::IncompatibleDataSchema>>,
37461    >(
37462        mut self,
37463        v: T,
37464    ) -> Self {
37465        self.details = std::option::Option::Some(
37466            crate::model::action::Details::IncompatibleDataSchema(v.into()),
37467        );
37468        self
37469    }
37470
37471    /// The value of [details][crate::model::Action::details]
37472    /// if it holds a `InvalidDataPartition`, `None` if the field is not set or
37473    /// holds a different branch.
37474    pub fn invalid_data_partition(
37475        &self,
37476    ) -> std::option::Option<&std::boxed::Box<crate::model::action::InvalidDataPartition>> {
37477        #[allow(unreachable_patterns)]
37478        self.details.as_ref().and_then(|v| match v {
37479            crate::model::action::Details::InvalidDataPartition(v) => std::option::Option::Some(v),
37480            _ => std::option::Option::None,
37481        })
37482    }
37483
37484    /// Sets the value of [details][crate::model::Action::details]
37485    /// to hold a `InvalidDataPartition`.
37486    ///
37487    /// Note that all the setters affecting `details` are
37488    /// mutually exclusive.
37489    ///
37490    /// # Example
37491    /// ```ignore,no_run
37492    /// # use google_cloud_dataplex_v1::model::Action;
37493    /// use google_cloud_dataplex_v1::model::action::InvalidDataPartition;
37494    /// let x = Action::new().set_invalid_data_partition(InvalidDataPartition::default()/* use setters */);
37495    /// assert!(x.invalid_data_partition().is_some());
37496    /// assert!(x.invalid_data_format().is_none());
37497    /// assert!(x.incompatible_data_schema().is_none());
37498    /// assert!(x.missing_data().is_none());
37499    /// assert!(x.missing_resource().is_none());
37500    /// assert!(x.unauthorized_resource().is_none());
37501    /// assert!(x.failed_security_policy_apply().is_none());
37502    /// assert!(x.invalid_data_organization().is_none());
37503    /// ```
37504    pub fn set_invalid_data_partition<
37505        T: std::convert::Into<std::boxed::Box<crate::model::action::InvalidDataPartition>>,
37506    >(
37507        mut self,
37508        v: T,
37509    ) -> Self {
37510        self.details = std::option::Option::Some(
37511            crate::model::action::Details::InvalidDataPartition(v.into()),
37512        );
37513        self
37514    }
37515
37516    /// The value of [details][crate::model::Action::details]
37517    /// if it holds a `MissingData`, `None` if the field is not set or
37518    /// holds a different branch.
37519    pub fn missing_data(
37520        &self,
37521    ) -> std::option::Option<&std::boxed::Box<crate::model::action::MissingData>> {
37522        #[allow(unreachable_patterns)]
37523        self.details.as_ref().and_then(|v| match v {
37524            crate::model::action::Details::MissingData(v) => std::option::Option::Some(v),
37525            _ => std::option::Option::None,
37526        })
37527    }
37528
37529    /// Sets the value of [details][crate::model::Action::details]
37530    /// to hold a `MissingData`.
37531    ///
37532    /// Note that all the setters affecting `details` are
37533    /// mutually exclusive.
37534    ///
37535    /// # Example
37536    /// ```ignore,no_run
37537    /// # use google_cloud_dataplex_v1::model::Action;
37538    /// use google_cloud_dataplex_v1::model::action::MissingData;
37539    /// let x = Action::new().set_missing_data(MissingData::default()/* use setters */);
37540    /// assert!(x.missing_data().is_some());
37541    /// assert!(x.invalid_data_format().is_none());
37542    /// assert!(x.incompatible_data_schema().is_none());
37543    /// assert!(x.invalid_data_partition().is_none());
37544    /// assert!(x.missing_resource().is_none());
37545    /// assert!(x.unauthorized_resource().is_none());
37546    /// assert!(x.failed_security_policy_apply().is_none());
37547    /// assert!(x.invalid_data_organization().is_none());
37548    /// ```
37549    pub fn set_missing_data<
37550        T: std::convert::Into<std::boxed::Box<crate::model::action::MissingData>>,
37551    >(
37552        mut self,
37553        v: T,
37554    ) -> Self {
37555        self.details =
37556            std::option::Option::Some(crate::model::action::Details::MissingData(v.into()));
37557        self
37558    }
37559
37560    /// The value of [details][crate::model::Action::details]
37561    /// if it holds a `MissingResource`, `None` if the field is not set or
37562    /// holds a different branch.
37563    pub fn missing_resource(
37564        &self,
37565    ) -> std::option::Option<&std::boxed::Box<crate::model::action::MissingResource>> {
37566        #[allow(unreachable_patterns)]
37567        self.details.as_ref().and_then(|v| match v {
37568            crate::model::action::Details::MissingResource(v) => std::option::Option::Some(v),
37569            _ => std::option::Option::None,
37570        })
37571    }
37572
37573    /// Sets the value of [details][crate::model::Action::details]
37574    /// to hold a `MissingResource`.
37575    ///
37576    /// Note that all the setters affecting `details` are
37577    /// mutually exclusive.
37578    ///
37579    /// # Example
37580    /// ```ignore,no_run
37581    /// # use google_cloud_dataplex_v1::model::Action;
37582    /// use google_cloud_dataplex_v1::model::action::MissingResource;
37583    /// let x = Action::new().set_missing_resource(MissingResource::default()/* use setters */);
37584    /// assert!(x.missing_resource().is_some());
37585    /// assert!(x.invalid_data_format().is_none());
37586    /// assert!(x.incompatible_data_schema().is_none());
37587    /// assert!(x.invalid_data_partition().is_none());
37588    /// assert!(x.missing_data().is_none());
37589    /// assert!(x.unauthorized_resource().is_none());
37590    /// assert!(x.failed_security_policy_apply().is_none());
37591    /// assert!(x.invalid_data_organization().is_none());
37592    /// ```
37593    pub fn set_missing_resource<
37594        T: std::convert::Into<std::boxed::Box<crate::model::action::MissingResource>>,
37595    >(
37596        mut self,
37597        v: T,
37598    ) -> Self {
37599        self.details =
37600            std::option::Option::Some(crate::model::action::Details::MissingResource(v.into()));
37601        self
37602    }
37603
37604    /// The value of [details][crate::model::Action::details]
37605    /// if it holds a `UnauthorizedResource`, `None` if the field is not set or
37606    /// holds a different branch.
37607    pub fn unauthorized_resource(
37608        &self,
37609    ) -> std::option::Option<&std::boxed::Box<crate::model::action::UnauthorizedResource>> {
37610        #[allow(unreachable_patterns)]
37611        self.details.as_ref().and_then(|v| match v {
37612            crate::model::action::Details::UnauthorizedResource(v) => std::option::Option::Some(v),
37613            _ => std::option::Option::None,
37614        })
37615    }
37616
37617    /// Sets the value of [details][crate::model::Action::details]
37618    /// to hold a `UnauthorizedResource`.
37619    ///
37620    /// Note that all the setters affecting `details` are
37621    /// mutually exclusive.
37622    ///
37623    /// # Example
37624    /// ```ignore,no_run
37625    /// # use google_cloud_dataplex_v1::model::Action;
37626    /// use google_cloud_dataplex_v1::model::action::UnauthorizedResource;
37627    /// let x = Action::new().set_unauthorized_resource(UnauthorizedResource::default()/* use setters */);
37628    /// assert!(x.unauthorized_resource().is_some());
37629    /// assert!(x.invalid_data_format().is_none());
37630    /// assert!(x.incompatible_data_schema().is_none());
37631    /// assert!(x.invalid_data_partition().is_none());
37632    /// assert!(x.missing_data().is_none());
37633    /// assert!(x.missing_resource().is_none());
37634    /// assert!(x.failed_security_policy_apply().is_none());
37635    /// assert!(x.invalid_data_organization().is_none());
37636    /// ```
37637    pub fn set_unauthorized_resource<
37638        T: std::convert::Into<std::boxed::Box<crate::model::action::UnauthorizedResource>>,
37639    >(
37640        mut self,
37641        v: T,
37642    ) -> Self {
37643        self.details = std::option::Option::Some(
37644            crate::model::action::Details::UnauthorizedResource(v.into()),
37645        );
37646        self
37647    }
37648
37649    /// The value of [details][crate::model::Action::details]
37650    /// if it holds a `FailedSecurityPolicyApply`, `None` if the field is not set or
37651    /// holds a different branch.
37652    pub fn failed_security_policy_apply(
37653        &self,
37654    ) -> std::option::Option<&std::boxed::Box<crate::model::action::FailedSecurityPolicyApply>>
37655    {
37656        #[allow(unreachable_patterns)]
37657        self.details.as_ref().and_then(|v| match v {
37658            crate::model::action::Details::FailedSecurityPolicyApply(v) => {
37659                std::option::Option::Some(v)
37660            }
37661            _ => std::option::Option::None,
37662        })
37663    }
37664
37665    /// Sets the value of [details][crate::model::Action::details]
37666    /// to hold a `FailedSecurityPolicyApply`.
37667    ///
37668    /// Note that all the setters affecting `details` are
37669    /// mutually exclusive.
37670    ///
37671    /// # Example
37672    /// ```ignore,no_run
37673    /// # use google_cloud_dataplex_v1::model::Action;
37674    /// use google_cloud_dataplex_v1::model::action::FailedSecurityPolicyApply;
37675    /// let x = Action::new().set_failed_security_policy_apply(FailedSecurityPolicyApply::default()/* use setters */);
37676    /// assert!(x.failed_security_policy_apply().is_some());
37677    /// assert!(x.invalid_data_format().is_none());
37678    /// assert!(x.incompatible_data_schema().is_none());
37679    /// assert!(x.invalid_data_partition().is_none());
37680    /// assert!(x.missing_data().is_none());
37681    /// assert!(x.missing_resource().is_none());
37682    /// assert!(x.unauthorized_resource().is_none());
37683    /// assert!(x.invalid_data_organization().is_none());
37684    /// ```
37685    pub fn set_failed_security_policy_apply<
37686        T: std::convert::Into<std::boxed::Box<crate::model::action::FailedSecurityPolicyApply>>,
37687    >(
37688        mut self,
37689        v: T,
37690    ) -> Self {
37691        self.details = std::option::Option::Some(
37692            crate::model::action::Details::FailedSecurityPolicyApply(v.into()),
37693        );
37694        self
37695    }
37696
37697    /// The value of [details][crate::model::Action::details]
37698    /// if it holds a `InvalidDataOrganization`, `None` if the field is not set or
37699    /// holds a different branch.
37700    pub fn invalid_data_organization(
37701        &self,
37702    ) -> std::option::Option<&std::boxed::Box<crate::model::action::InvalidDataOrganization>> {
37703        #[allow(unreachable_patterns)]
37704        self.details.as_ref().and_then(|v| match v {
37705            crate::model::action::Details::InvalidDataOrganization(v) => {
37706                std::option::Option::Some(v)
37707            }
37708            _ => std::option::Option::None,
37709        })
37710    }
37711
37712    /// Sets the value of [details][crate::model::Action::details]
37713    /// to hold a `InvalidDataOrganization`.
37714    ///
37715    /// Note that all the setters affecting `details` are
37716    /// mutually exclusive.
37717    ///
37718    /// # Example
37719    /// ```ignore,no_run
37720    /// # use google_cloud_dataplex_v1::model::Action;
37721    /// use google_cloud_dataplex_v1::model::action::InvalidDataOrganization;
37722    /// let x = Action::new().set_invalid_data_organization(InvalidDataOrganization::default()/* use setters */);
37723    /// assert!(x.invalid_data_organization().is_some());
37724    /// assert!(x.invalid_data_format().is_none());
37725    /// assert!(x.incompatible_data_schema().is_none());
37726    /// assert!(x.invalid_data_partition().is_none());
37727    /// assert!(x.missing_data().is_none());
37728    /// assert!(x.missing_resource().is_none());
37729    /// assert!(x.unauthorized_resource().is_none());
37730    /// assert!(x.failed_security_policy_apply().is_none());
37731    /// ```
37732    pub fn set_invalid_data_organization<
37733        T: std::convert::Into<std::boxed::Box<crate::model::action::InvalidDataOrganization>>,
37734    >(
37735        mut self,
37736        v: T,
37737    ) -> Self {
37738        self.details = std::option::Option::Some(
37739            crate::model::action::Details::InvalidDataOrganization(v.into()),
37740        );
37741        self
37742    }
37743}
37744
37745impl wkt::message::Message for Action {
37746    fn typename() -> &'static str {
37747        "type.googleapis.com/google.cloud.dataplex.v1.Action"
37748    }
37749}
37750
37751/// Defines additional types related to [Action].
37752pub mod action {
37753    #[allow(unused_imports)]
37754    use super::*;
37755
37756    /// Action details for resource references in assets that cannot be located.
37757    #[derive(Clone, Default, PartialEq)]
37758    #[non_exhaustive]
37759    pub struct MissingResource {
37760        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37761    }
37762
37763    impl MissingResource {
37764        pub fn new() -> Self {
37765            std::default::Default::default()
37766        }
37767    }
37768
37769    impl wkt::message::Message for MissingResource {
37770        fn typename() -> &'static str {
37771            "type.googleapis.com/google.cloud.dataplex.v1.Action.MissingResource"
37772        }
37773    }
37774
37775    /// Action details for unauthorized resource issues raised to indicate that the
37776    /// service account associated with the lake instance is not authorized to
37777    /// access or manage the resource associated with an asset.
37778    #[derive(Clone, Default, PartialEq)]
37779    #[non_exhaustive]
37780    pub struct UnauthorizedResource {
37781        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37782    }
37783
37784    impl UnauthorizedResource {
37785        pub fn new() -> Self {
37786            std::default::Default::default()
37787        }
37788    }
37789
37790    impl wkt::message::Message for UnauthorizedResource {
37791        fn typename() -> &'static str {
37792            "type.googleapis.com/google.cloud.dataplex.v1.Action.UnauthorizedResource"
37793        }
37794    }
37795
37796    /// Failed to apply security policy to the managed resource(s) under a
37797    /// lake, zone or an asset. For a lake or zone resource, one or more underlying
37798    /// assets has a failure applying security policy to the associated managed
37799    /// resource.
37800    #[derive(Clone, Default, PartialEq)]
37801    #[non_exhaustive]
37802    pub struct FailedSecurityPolicyApply {
37803        /// Resource name of one of the assets with failing security policy
37804        /// application. Populated for a lake or zone resource only.
37805        pub asset: std::string::String,
37806
37807        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37808    }
37809
37810    impl FailedSecurityPolicyApply {
37811        pub fn new() -> Self {
37812            std::default::Default::default()
37813        }
37814
37815        /// Sets the value of [asset][crate::model::action::FailedSecurityPolicyApply::asset].
37816        ///
37817        /// # Example
37818        /// ```ignore,no_run
37819        /// # use google_cloud_dataplex_v1::model::action::FailedSecurityPolicyApply;
37820        /// let x = FailedSecurityPolicyApply::new().set_asset("example");
37821        /// ```
37822        pub fn set_asset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37823            self.asset = v.into();
37824            self
37825        }
37826    }
37827
37828    impl wkt::message::Message for FailedSecurityPolicyApply {
37829        fn typename() -> &'static str {
37830            "type.googleapis.com/google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply"
37831        }
37832    }
37833
37834    /// Action details for invalid or unsupported data files detected by discovery.
37835    #[derive(Clone, Default, PartialEq)]
37836    #[non_exhaustive]
37837    pub struct InvalidDataFormat {
37838        /// The list of data locations sampled and used for format/schema
37839        /// inference.
37840        pub sampled_data_locations: std::vec::Vec<std::string::String>,
37841
37842        /// The expected data format of the entity.
37843        pub expected_format: std::string::String,
37844
37845        /// The new unexpected data format within the entity.
37846        pub new_format: std::string::String,
37847
37848        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37849    }
37850
37851    impl InvalidDataFormat {
37852        pub fn new() -> Self {
37853            std::default::Default::default()
37854        }
37855
37856        /// Sets the value of [sampled_data_locations][crate::model::action::InvalidDataFormat::sampled_data_locations].
37857        ///
37858        /// # Example
37859        /// ```ignore,no_run
37860        /// # use google_cloud_dataplex_v1::model::action::InvalidDataFormat;
37861        /// let x = InvalidDataFormat::new().set_sampled_data_locations(["a", "b", "c"]);
37862        /// ```
37863        pub fn set_sampled_data_locations<T, V>(mut self, v: T) -> Self
37864        where
37865            T: std::iter::IntoIterator<Item = V>,
37866            V: std::convert::Into<std::string::String>,
37867        {
37868            use std::iter::Iterator;
37869            self.sampled_data_locations = v.into_iter().map(|i| i.into()).collect();
37870            self
37871        }
37872
37873        /// Sets the value of [expected_format][crate::model::action::InvalidDataFormat::expected_format].
37874        ///
37875        /// # Example
37876        /// ```ignore,no_run
37877        /// # use google_cloud_dataplex_v1::model::action::InvalidDataFormat;
37878        /// let x = InvalidDataFormat::new().set_expected_format("example");
37879        /// ```
37880        pub fn set_expected_format<T: std::convert::Into<std::string::String>>(
37881            mut self,
37882            v: T,
37883        ) -> Self {
37884            self.expected_format = v.into();
37885            self
37886        }
37887
37888        /// Sets the value of [new_format][crate::model::action::InvalidDataFormat::new_format].
37889        ///
37890        /// # Example
37891        /// ```ignore,no_run
37892        /// # use google_cloud_dataplex_v1::model::action::InvalidDataFormat;
37893        /// let x = InvalidDataFormat::new().set_new_format("example");
37894        /// ```
37895        pub fn set_new_format<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37896            self.new_format = v.into();
37897            self
37898        }
37899    }
37900
37901    impl wkt::message::Message for InvalidDataFormat {
37902        fn typename() -> &'static str {
37903            "type.googleapis.com/google.cloud.dataplex.v1.Action.InvalidDataFormat"
37904        }
37905    }
37906
37907    /// Action details for incompatible schemas detected by discovery.
37908    #[derive(Clone, Default, PartialEq)]
37909    #[non_exhaustive]
37910    pub struct IncompatibleDataSchema {
37911        /// The name of the table containing invalid data.
37912        pub table: std::string::String,
37913
37914        /// The existing and expected schema of the table. The schema is provided as
37915        /// a JSON formatted structure listing columns and data types.
37916        pub existing_schema: std::string::String,
37917
37918        /// The new and incompatible schema within the table. The schema is provided
37919        /// as a JSON formatted structured listing columns and data types.
37920        pub new_schema: std::string::String,
37921
37922        /// The list of data locations sampled and used for format/schema
37923        /// inference.
37924        pub sampled_data_locations: std::vec::Vec<std::string::String>,
37925
37926        /// Whether the action relates to a schema that is incompatible or modified.
37927        pub schema_change: crate::model::action::incompatible_data_schema::SchemaChange,
37928
37929        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37930    }
37931
37932    impl IncompatibleDataSchema {
37933        pub fn new() -> Self {
37934            std::default::Default::default()
37935        }
37936
37937        /// Sets the value of [table][crate::model::action::IncompatibleDataSchema::table].
37938        ///
37939        /// # Example
37940        /// ```ignore,no_run
37941        /// # use google_cloud_dataplex_v1::model::action::IncompatibleDataSchema;
37942        /// let x = IncompatibleDataSchema::new().set_table("example");
37943        /// ```
37944        pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37945            self.table = v.into();
37946            self
37947        }
37948
37949        /// Sets the value of [existing_schema][crate::model::action::IncompatibleDataSchema::existing_schema].
37950        ///
37951        /// # Example
37952        /// ```ignore,no_run
37953        /// # use google_cloud_dataplex_v1::model::action::IncompatibleDataSchema;
37954        /// let x = IncompatibleDataSchema::new().set_existing_schema("example");
37955        /// ```
37956        pub fn set_existing_schema<T: std::convert::Into<std::string::String>>(
37957            mut self,
37958            v: T,
37959        ) -> Self {
37960            self.existing_schema = v.into();
37961            self
37962        }
37963
37964        /// Sets the value of [new_schema][crate::model::action::IncompatibleDataSchema::new_schema].
37965        ///
37966        /// # Example
37967        /// ```ignore,no_run
37968        /// # use google_cloud_dataplex_v1::model::action::IncompatibleDataSchema;
37969        /// let x = IncompatibleDataSchema::new().set_new_schema("example");
37970        /// ```
37971        pub fn set_new_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37972            self.new_schema = v.into();
37973            self
37974        }
37975
37976        /// Sets the value of [sampled_data_locations][crate::model::action::IncompatibleDataSchema::sampled_data_locations].
37977        ///
37978        /// # Example
37979        /// ```ignore,no_run
37980        /// # use google_cloud_dataplex_v1::model::action::IncompatibleDataSchema;
37981        /// let x = IncompatibleDataSchema::new().set_sampled_data_locations(["a", "b", "c"]);
37982        /// ```
37983        pub fn set_sampled_data_locations<T, V>(mut self, v: T) -> Self
37984        where
37985            T: std::iter::IntoIterator<Item = V>,
37986            V: std::convert::Into<std::string::String>,
37987        {
37988            use std::iter::Iterator;
37989            self.sampled_data_locations = v.into_iter().map(|i| i.into()).collect();
37990            self
37991        }
37992
37993        /// Sets the value of [schema_change][crate::model::action::IncompatibleDataSchema::schema_change].
37994        ///
37995        /// # Example
37996        /// ```ignore,no_run
37997        /// # use google_cloud_dataplex_v1::model::action::IncompatibleDataSchema;
37998        /// use google_cloud_dataplex_v1::model::action::incompatible_data_schema::SchemaChange;
37999        /// let x0 = IncompatibleDataSchema::new().set_schema_change(SchemaChange::Incompatible);
38000        /// let x1 = IncompatibleDataSchema::new().set_schema_change(SchemaChange::Modified);
38001        /// ```
38002        pub fn set_schema_change<
38003            T: std::convert::Into<crate::model::action::incompatible_data_schema::SchemaChange>,
38004        >(
38005            mut self,
38006            v: T,
38007        ) -> Self {
38008            self.schema_change = v.into();
38009            self
38010        }
38011    }
38012
38013    impl wkt::message::Message for IncompatibleDataSchema {
38014        fn typename() -> &'static str {
38015            "type.googleapis.com/google.cloud.dataplex.v1.Action.IncompatibleDataSchema"
38016        }
38017    }
38018
38019    /// Defines additional types related to [IncompatibleDataSchema].
38020    pub mod incompatible_data_schema {
38021        #[allow(unused_imports)]
38022        use super::*;
38023
38024        /// Whether the action relates to a schema that is incompatible or modified.
38025        ///
38026        /// # Working with unknown values
38027        ///
38028        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
38029        /// additional enum variants at any time. Adding new variants is not considered
38030        /// a breaking change. Applications should write their code in anticipation of:
38031        ///
38032        /// - New values appearing in future releases of the client library, **and**
38033        /// - New values received dynamically, without application changes.
38034        ///
38035        /// Please consult the [Working with enums] section in the user guide for some
38036        /// guidelines.
38037        ///
38038        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
38039        #[derive(Clone, Debug, PartialEq)]
38040        #[non_exhaustive]
38041        pub enum SchemaChange {
38042            /// Schema change unspecified.
38043            Unspecified,
38044            /// Newly discovered schema is incompatible with existing schema.
38045            Incompatible,
38046            /// Newly discovered schema has changed from existing schema for data in a
38047            /// curated zone.
38048            Modified,
38049            /// If set, the enum was initialized with an unknown value.
38050            ///
38051            /// Applications can examine the value using [SchemaChange::value] or
38052            /// [SchemaChange::name].
38053            UnknownValue(schema_change::UnknownValue),
38054        }
38055
38056        #[doc(hidden)]
38057        pub mod schema_change {
38058            #[allow(unused_imports)]
38059            use super::*;
38060            #[derive(Clone, Debug, PartialEq)]
38061            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
38062        }
38063
38064        impl SchemaChange {
38065            /// Gets the enum value.
38066            ///
38067            /// Returns `None` if the enum contains an unknown value deserialized from
38068            /// the string representation of enums.
38069            pub fn value(&self) -> std::option::Option<i32> {
38070                match self {
38071                    Self::Unspecified => std::option::Option::Some(0),
38072                    Self::Incompatible => std::option::Option::Some(1),
38073                    Self::Modified => std::option::Option::Some(2),
38074                    Self::UnknownValue(u) => u.0.value(),
38075                }
38076            }
38077
38078            /// Gets the enum value as a string.
38079            ///
38080            /// Returns `None` if the enum contains an unknown value deserialized from
38081            /// the integer representation of enums.
38082            pub fn name(&self) -> std::option::Option<&str> {
38083                match self {
38084                    Self::Unspecified => std::option::Option::Some("SCHEMA_CHANGE_UNSPECIFIED"),
38085                    Self::Incompatible => std::option::Option::Some("INCOMPATIBLE"),
38086                    Self::Modified => std::option::Option::Some("MODIFIED"),
38087                    Self::UnknownValue(u) => u.0.name(),
38088                }
38089            }
38090        }
38091
38092        impl std::default::Default for SchemaChange {
38093            fn default() -> Self {
38094                use std::convert::From;
38095                Self::from(0)
38096            }
38097        }
38098
38099        impl std::fmt::Display for SchemaChange {
38100            fn fmt(
38101                &self,
38102                f: &mut std::fmt::Formatter<'_>,
38103            ) -> std::result::Result<(), std::fmt::Error> {
38104                wkt::internal::display_enum(f, self.name(), self.value())
38105            }
38106        }
38107
38108        impl std::convert::From<i32> for SchemaChange {
38109            fn from(value: i32) -> Self {
38110                match value {
38111                    0 => Self::Unspecified,
38112                    1 => Self::Incompatible,
38113                    2 => Self::Modified,
38114                    _ => Self::UnknownValue(schema_change::UnknownValue(
38115                        wkt::internal::UnknownEnumValue::Integer(value),
38116                    )),
38117                }
38118            }
38119        }
38120
38121        impl std::convert::From<&str> for SchemaChange {
38122            fn from(value: &str) -> Self {
38123                use std::string::ToString;
38124                match value {
38125                    "SCHEMA_CHANGE_UNSPECIFIED" => Self::Unspecified,
38126                    "INCOMPATIBLE" => Self::Incompatible,
38127                    "MODIFIED" => Self::Modified,
38128                    _ => Self::UnknownValue(schema_change::UnknownValue(
38129                        wkt::internal::UnknownEnumValue::String(value.to_string()),
38130                    )),
38131                }
38132            }
38133        }
38134
38135        impl serde::ser::Serialize for SchemaChange {
38136            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
38137            where
38138                S: serde::Serializer,
38139            {
38140                match self {
38141                    Self::Unspecified => serializer.serialize_i32(0),
38142                    Self::Incompatible => serializer.serialize_i32(1),
38143                    Self::Modified => serializer.serialize_i32(2),
38144                    Self::UnknownValue(u) => u.0.serialize(serializer),
38145                }
38146            }
38147        }
38148
38149        impl<'de> serde::de::Deserialize<'de> for SchemaChange {
38150            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
38151            where
38152                D: serde::Deserializer<'de>,
38153            {
38154                deserializer.deserialize_any(wkt::internal::EnumVisitor::<SchemaChange>::new(
38155                    ".google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange",
38156                ))
38157            }
38158        }
38159    }
38160
38161    /// Action details for invalid or unsupported partitions detected by discovery.
38162    #[derive(Clone, Default, PartialEq)]
38163    #[non_exhaustive]
38164    pub struct InvalidDataPartition {
38165        /// The issue type of InvalidDataPartition.
38166        pub expected_structure: crate::model::action::invalid_data_partition::PartitionStructure,
38167
38168        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38169    }
38170
38171    impl InvalidDataPartition {
38172        pub fn new() -> Self {
38173            std::default::Default::default()
38174        }
38175
38176        /// Sets the value of [expected_structure][crate::model::action::InvalidDataPartition::expected_structure].
38177        ///
38178        /// # Example
38179        /// ```ignore,no_run
38180        /// # use google_cloud_dataplex_v1::model::action::InvalidDataPartition;
38181        /// use google_cloud_dataplex_v1::model::action::invalid_data_partition::PartitionStructure;
38182        /// let x0 = InvalidDataPartition::new().set_expected_structure(PartitionStructure::ConsistentKeys);
38183        /// let x1 = InvalidDataPartition::new().set_expected_structure(PartitionStructure::HiveStyleKeys);
38184        /// ```
38185        pub fn set_expected_structure<
38186            T: std::convert::Into<crate::model::action::invalid_data_partition::PartitionStructure>,
38187        >(
38188            mut self,
38189            v: T,
38190        ) -> Self {
38191            self.expected_structure = v.into();
38192            self
38193        }
38194    }
38195
38196    impl wkt::message::Message for InvalidDataPartition {
38197        fn typename() -> &'static str {
38198            "type.googleapis.com/google.cloud.dataplex.v1.Action.InvalidDataPartition"
38199        }
38200    }
38201
38202    /// Defines additional types related to [InvalidDataPartition].
38203    pub mod invalid_data_partition {
38204        #[allow(unused_imports)]
38205        use super::*;
38206
38207        /// The expected partition structure.
38208        ///
38209        /// # Working with unknown values
38210        ///
38211        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
38212        /// additional enum variants at any time. Adding new variants is not considered
38213        /// a breaking change. Applications should write their code in anticipation of:
38214        ///
38215        /// - New values appearing in future releases of the client library, **and**
38216        /// - New values received dynamically, without application changes.
38217        ///
38218        /// Please consult the [Working with enums] section in the user guide for some
38219        /// guidelines.
38220        ///
38221        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
38222        #[derive(Clone, Debug, PartialEq)]
38223        #[non_exhaustive]
38224        pub enum PartitionStructure {
38225            /// PartitionStructure unspecified.
38226            Unspecified,
38227            /// Consistent hive-style partition definition (both raw and curated zone).
38228            ConsistentKeys,
38229            /// Hive style partition definition (curated zone only).
38230            HiveStyleKeys,
38231            /// If set, the enum was initialized with an unknown value.
38232            ///
38233            /// Applications can examine the value using [PartitionStructure::value] or
38234            /// [PartitionStructure::name].
38235            UnknownValue(partition_structure::UnknownValue),
38236        }
38237
38238        #[doc(hidden)]
38239        pub mod partition_structure {
38240            #[allow(unused_imports)]
38241            use super::*;
38242            #[derive(Clone, Debug, PartialEq)]
38243            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
38244        }
38245
38246        impl PartitionStructure {
38247            /// Gets the enum value.
38248            ///
38249            /// Returns `None` if the enum contains an unknown value deserialized from
38250            /// the string representation of enums.
38251            pub fn value(&self) -> std::option::Option<i32> {
38252                match self {
38253                    Self::Unspecified => std::option::Option::Some(0),
38254                    Self::ConsistentKeys => std::option::Option::Some(1),
38255                    Self::HiveStyleKeys => std::option::Option::Some(2),
38256                    Self::UnknownValue(u) => u.0.value(),
38257                }
38258            }
38259
38260            /// Gets the enum value as a string.
38261            ///
38262            /// Returns `None` if the enum contains an unknown value deserialized from
38263            /// the integer representation of enums.
38264            pub fn name(&self) -> std::option::Option<&str> {
38265                match self {
38266                    Self::Unspecified => {
38267                        std::option::Option::Some("PARTITION_STRUCTURE_UNSPECIFIED")
38268                    }
38269                    Self::ConsistentKeys => std::option::Option::Some("CONSISTENT_KEYS"),
38270                    Self::HiveStyleKeys => std::option::Option::Some("HIVE_STYLE_KEYS"),
38271                    Self::UnknownValue(u) => u.0.name(),
38272                }
38273            }
38274        }
38275
38276        impl std::default::Default for PartitionStructure {
38277            fn default() -> Self {
38278                use std::convert::From;
38279                Self::from(0)
38280            }
38281        }
38282
38283        impl std::fmt::Display for PartitionStructure {
38284            fn fmt(
38285                &self,
38286                f: &mut std::fmt::Formatter<'_>,
38287            ) -> std::result::Result<(), std::fmt::Error> {
38288                wkt::internal::display_enum(f, self.name(), self.value())
38289            }
38290        }
38291
38292        impl std::convert::From<i32> for PartitionStructure {
38293            fn from(value: i32) -> Self {
38294                match value {
38295                    0 => Self::Unspecified,
38296                    1 => Self::ConsistentKeys,
38297                    2 => Self::HiveStyleKeys,
38298                    _ => Self::UnknownValue(partition_structure::UnknownValue(
38299                        wkt::internal::UnknownEnumValue::Integer(value),
38300                    )),
38301                }
38302            }
38303        }
38304
38305        impl std::convert::From<&str> for PartitionStructure {
38306            fn from(value: &str) -> Self {
38307                use std::string::ToString;
38308                match value {
38309                    "PARTITION_STRUCTURE_UNSPECIFIED" => Self::Unspecified,
38310                    "CONSISTENT_KEYS" => Self::ConsistentKeys,
38311                    "HIVE_STYLE_KEYS" => Self::HiveStyleKeys,
38312                    _ => Self::UnknownValue(partition_structure::UnknownValue(
38313                        wkt::internal::UnknownEnumValue::String(value.to_string()),
38314                    )),
38315                }
38316            }
38317        }
38318
38319        impl serde::ser::Serialize for PartitionStructure {
38320            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
38321            where
38322                S: serde::Serializer,
38323            {
38324                match self {
38325                    Self::Unspecified => serializer.serialize_i32(0),
38326                    Self::ConsistentKeys => serializer.serialize_i32(1),
38327                    Self::HiveStyleKeys => serializer.serialize_i32(2),
38328                    Self::UnknownValue(u) => u.0.serialize(serializer),
38329                }
38330            }
38331        }
38332
38333        impl<'de> serde::de::Deserialize<'de> for PartitionStructure {
38334            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
38335            where
38336                D: serde::Deserializer<'de>,
38337            {
38338                deserializer.deserialize_any(wkt::internal::EnumVisitor::<PartitionStructure>::new(
38339                    ".google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure",
38340                ))
38341            }
38342        }
38343    }
38344
38345    /// Action details for absence of data detected by discovery.
38346    #[derive(Clone, Default, PartialEq)]
38347    #[non_exhaustive]
38348    pub struct MissingData {
38349        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38350    }
38351
38352    impl MissingData {
38353        pub fn new() -> Self {
38354            std::default::Default::default()
38355        }
38356    }
38357
38358    impl wkt::message::Message for MissingData {
38359        fn typename() -> &'static str {
38360            "type.googleapis.com/google.cloud.dataplex.v1.Action.MissingData"
38361        }
38362    }
38363
38364    /// Action details for invalid data arrangement.
38365    #[derive(Clone, Default, PartialEq)]
38366    #[non_exhaustive]
38367    pub struct InvalidDataOrganization {
38368        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38369    }
38370
38371    impl InvalidDataOrganization {
38372        pub fn new() -> Self {
38373            std::default::Default::default()
38374        }
38375    }
38376
38377    impl wkt::message::Message for InvalidDataOrganization {
38378        fn typename() -> &'static str {
38379            "type.googleapis.com/google.cloud.dataplex.v1.Action.InvalidDataOrganization"
38380        }
38381    }
38382
38383    /// The category of issues.
38384    ///
38385    /// # Working with unknown values
38386    ///
38387    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
38388    /// additional enum variants at any time. Adding new variants is not considered
38389    /// a breaking change. Applications should write their code in anticipation of:
38390    ///
38391    /// - New values appearing in future releases of the client library, **and**
38392    /// - New values received dynamically, without application changes.
38393    ///
38394    /// Please consult the [Working with enums] section in the user guide for some
38395    /// guidelines.
38396    ///
38397    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
38398    #[derive(Clone, Debug, PartialEq)]
38399    #[non_exhaustive]
38400    pub enum Category {
38401        /// Unspecified category.
38402        Unspecified,
38403        /// Resource management related issues.
38404        ResourceManagement,
38405        /// Security policy related issues.
38406        SecurityPolicy,
38407        /// Data and discovery related issues.
38408        DataDiscovery,
38409        /// If set, the enum was initialized with an unknown value.
38410        ///
38411        /// Applications can examine the value using [Category::value] or
38412        /// [Category::name].
38413        UnknownValue(category::UnknownValue),
38414    }
38415
38416    #[doc(hidden)]
38417    pub mod category {
38418        #[allow(unused_imports)]
38419        use super::*;
38420        #[derive(Clone, Debug, PartialEq)]
38421        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
38422    }
38423
38424    impl Category {
38425        /// Gets the enum value.
38426        ///
38427        /// Returns `None` if the enum contains an unknown value deserialized from
38428        /// the string representation of enums.
38429        pub fn value(&self) -> std::option::Option<i32> {
38430            match self {
38431                Self::Unspecified => std::option::Option::Some(0),
38432                Self::ResourceManagement => std::option::Option::Some(1),
38433                Self::SecurityPolicy => std::option::Option::Some(2),
38434                Self::DataDiscovery => std::option::Option::Some(3),
38435                Self::UnknownValue(u) => u.0.value(),
38436            }
38437        }
38438
38439        /// Gets the enum value as a string.
38440        ///
38441        /// Returns `None` if the enum contains an unknown value deserialized from
38442        /// the integer representation of enums.
38443        pub fn name(&self) -> std::option::Option<&str> {
38444            match self {
38445                Self::Unspecified => std::option::Option::Some("CATEGORY_UNSPECIFIED"),
38446                Self::ResourceManagement => std::option::Option::Some("RESOURCE_MANAGEMENT"),
38447                Self::SecurityPolicy => std::option::Option::Some("SECURITY_POLICY"),
38448                Self::DataDiscovery => std::option::Option::Some("DATA_DISCOVERY"),
38449                Self::UnknownValue(u) => u.0.name(),
38450            }
38451        }
38452    }
38453
38454    impl std::default::Default for Category {
38455        fn default() -> Self {
38456            use std::convert::From;
38457            Self::from(0)
38458        }
38459    }
38460
38461    impl std::fmt::Display for Category {
38462        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
38463            wkt::internal::display_enum(f, self.name(), self.value())
38464        }
38465    }
38466
38467    impl std::convert::From<i32> for Category {
38468        fn from(value: i32) -> Self {
38469            match value {
38470                0 => Self::Unspecified,
38471                1 => Self::ResourceManagement,
38472                2 => Self::SecurityPolicy,
38473                3 => Self::DataDiscovery,
38474                _ => Self::UnknownValue(category::UnknownValue(
38475                    wkt::internal::UnknownEnumValue::Integer(value),
38476                )),
38477            }
38478        }
38479    }
38480
38481    impl std::convert::From<&str> for Category {
38482        fn from(value: &str) -> Self {
38483            use std::string::ToString;
38484            match value {
38485                "CATEGORY_UNSPECIFIED" => Self::Unspecified,
38486                "RESOURCE_MANAGEMENT" => Self::ResourceManagement,
38487                "SECURITY_POLICY" => Self::SecurityPolicy,
38488                "DATA_DISCOVERY" => Self::DataDiscovery,
38489                _ => Self::UnknownValue(category::UnknownValue(
38490                    wkt::internal::UnknownEnumValue::String(value.to_string()),
38491                )),
38492            }
38493        }
38494    }
38495
38496    impl serde::ser::Serialize for Category {
38497        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
38498        where
38499            S: serde::Serializer,
38500        {
38501            match self {
38502                Self::Unspecified => serializer.serialize_i32(0),
38503                Self::ResourceManagement => serializer.serialize_i32(1),
38504                Self::SecurityPolicy => serializer.serialize_i32(2),
38505                Self::DataDiscovery => serializer.serialize_i32(3),
38506                Self::UnknownValue(u) => u.0.serialize(serializer),
38507            }
38508        }
38509    }
38510
38511    impl<'de> serde::de::Deserialize<'de> for Category {
38512        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
38513        where
38514            D: serde::Deserializer<'de>,
38515        {
38516            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Category>::new(
38517                ".google.cloud.dataplex.v1.Action.Category",
38518            ))
38519        }
38520    }
38521
38522    /// Additional details about the action based on the action category.
38523    #[derive(Clone, Debug, PartialEq)]
38524    #[non_exhaustive]
38525    pub enum Details {
38526        /// Details for issues related to invalid or unsupported data formats.
38527        InvalidDataFormat(std::boxed::Box<crate::model::action::InvalidDataFormat>),
38528        /// Details for issues related to incompatible schemas detected within data.
38529        IncompatibleDataSchema(std::boxed::Box<crate::model::action::IncompatibleDataSchema>),
38530        /// Details for issues related to invalid or unsupported data partition
38531        /// structure.
38532        InvalidDataPartition(std::boxed::Box<crate::model::action::InvalidDataPartition>),
38533        /// Details for issues related to absence of data within managed resources.
38534        MissingData(std::boxed::Box<crate::model::action::MissingData>),
38535        /// Details for issues related to absence of a managed resource.
38536        MissingResource(std::boxed::Box<crate::model::action::MissingResource>),
38537        /// Details for issues related to lack of permissions to access data
38538        /// resources.
38539        UnauthorizedResource(std::boxed::Box<crate::model::action::UnauthorizedResource>),
38540        /// Details for issues related to applying security policy.
38541        FailedSecurityPolicyApply(std::boxed::Box<crate::model::action::FailedSecurityPolicyApply>),
38542        /// Details for issues related to invalid data arrangement.
38543        InvalidDataOrganization(std::boxed::Box<crate::model::action::InvalidDataOrganization>),
38544    }
38545}
38546
38547/// An asset represents a cloud resource that is being managed within a lake as a
38548/// member of a zone.
38549#[derive(Clone, Default, PartialEq)]
38550#[non_exhaustive]
38551pub struct Asset {
38552    /// Output only. The relative resource name of the asset, of the form:
38553    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
38554    pub name: std::string::String,
38555
38556    /// Optional. User friendly display name.
38557    pub display_name: std::string::String,
38558
38559    /// Output only. System generated globally unique ID for the asset. This ID
38560    /// will be different if the asset is deleted and re-created with the same
38561    /// name.
38562    pub uid: std::string::String,
38563
38564    /// Output only. The time when the asset was created.
38565    pub create_time: std::option::Option<wkt::Timestamp>,
38566
38567    /// Output only. The time when the asset was last updated.
38568    pub update_time: std::option::Option<wkt::Timestamp>,
38569
38570    /// Optional. User defined labels for the asset.
38571    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
38572
38573    /// Optional. Description of the asset.
38574    pub description: std::string::String,
38575
38576    /// Output only. Current state of the asset.
38577    pub state: crate::model::State,
38578
38579    /// Required. Specification of the resource that is referenced by this asset.
38580    pub resource_spec: std::option::Option<crate::model::asset::ResourceSpec>,
38581
38582    /// Output only. Status of the resource referenced by this asset.
38583    pub resource_status: std::option::Option<crate::model::asset::ResourceStatus>,
38584
38585    /// Output only. Status of the security policy applied to resource referenced
38586    /// by this asset.
38587    pub security_status: std::option::Option<crate::model::asset::SecurityStatus>,
38588
38589    /// Optional. Specification of the discovery feature applied to data referenced
38590    /// by this asset. When this spec is left unset, the asset will use the spec
38591    /// set on the parent zone.
38592    pub discovery_spec: std::option::Option<crate::model::asset::DiscoverySpec>,
38593
38594    /// Output only. Status of the discovery feature applied to data referenced by
38595    /// this asset.
38596    pub discovery_status: std::option::Option<crate::model::asset::DiscoveryStatus>,
38597
38598    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38599}
38600
38601impl Asset {
38602    pub fn new() -> Self {
38603        std::default::Default::default()
38604    }
38605
38606    /// Sets the value of [name][crate::model::Asset::name].
38607    ///
38608    /// # Example
38609    /// ```ignore,no_run
38610    /// # use google_cloud_dataplex_v1::model::Asset;
38611    /// let x = Asset::new().set_name("example");
38612    /// ```
38613    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
38614        self.name = v.into();
38615        self
38616    }
38617
38618    /// Sets the value of [display_name][crate::model::Asset::display_name].
38619    ///
38620    /// # Example
38621    /// ```ignore,no_run
38622    /// # use google_cloud_dataplex_v1::model::Asset;
38623    /// let x = Asset::new().set_display_name("example");
38624    /// ```
38625    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
38626        self.display_name = v.into();
38627        self
38628    }
38629
38630    /// Sets the value of [uid][crate::model::Asset::uid].
38631    ///
38632    /// # Example
38633    /// ```ignore,no_run
38634    /// # use google_cloud_dataplex_v1::model::Asset;
38635    /// let x = Asset::new().set_uid("example");
38636    /// ```
38637    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
38638        self.uid = v.into();
38639        self
38640    }
38641
38642    /// Sets the value of [create_time][crate::model::Asset::create_time].
38643    ///
38644    /// # Example
38645    /// ```ignore,no_run
38646    /// # use google_cloud_dataplex_v1::model::Asset;
38647    /// use wkt::Timestamp;
38648    /// let x = Asset::new().set_create_time(Timestamp::default()/* use setters */);
38649    /// ```
38650    pub fn set_create_time<T>(mut self, v: T) -> Self
38651    where
38652        T: std::convert::Into<wkt::Timestamp>,
38653    {
38654        self.create_time = std::option::Option::Some(v.into());
38655        self
38656    }
38657
38658    /// Sets or clears the value of [create_time][crate::model::Asset::create_time].
38659    ///
38660    /// # Example
38661    /// ```ignore,no_run
38662    /// # use google_cloud_dataplex_v1::model::Asset;
38663    /// use wkt::Timestamp;
38664    /// let x = Asset::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
38665    /// let x = Asset::new().set_or_clear_create_time(None::<Timestamp>);
38666    /// ```
38667    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
38668    where
38669        T: std::convert::Into<wkt::Timestamp>,
38670    {
38671        self.create_time = v.map(|x| x.into());
38672        self
38673    }
38674
38675    /// Sets the value of [update_time][crate::model::Asset::update_time].
38676    ///
38677    /// # Example
38678    /// ```ignore,no_run
38679    /// # use google_cloud_dataplex_v1::model::Asset;
38680    /// use wkt::Timestamp;
38681    /// let x = Asset::new().set_update_time(Timestamp::default()/* use setters */);
38682    /// ```
38683    pub fn set_update_time<T>(mut self, v: T) -> Self
38684    where
38685        T: std::convert::Into<wkt::Timestamp>,
38686    {
38687        self.update_time = std::option::Option::Some(v.into());
38688        self
38689    }
38690
38691    /// Sets or clears the value of [update_time][crate::model::Asset::update_time].
38692    ///
38693    /// # Example
38694    /// ```ignore,no_run
38695    /// # use google_cloud_dataplex_v1::model::Asset;
38696    /// use wkt::Timestamp;
38697    /// let x = Asset::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
38698    /// let x = Asset::new().set_or_clear_update_time(None::<Timestamp>);
38699    /// ```
38700    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
38701    where
38702        T: std::convert::Into<wkt::Timestamp>,
38703    {
38704        self.update_time = v.map(|x| x.into());
38705        self
38706    }
38707
38708    /// Sets the value of [labels][crate::model::Asset::labels].
38709    ///
38710    /// # Example
38711    /// ```ignore,no_run
38712    /// # use google_cloud_dataplex_v1::model::Asset;
38713    /// let x = Asset::new().set_labels([
38714    ///     ("key0", "abc"),
38715    ///     ("key1", "xyz"),
38716    /// ]);
38717    /// ```
38718    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
38719    where
38720        T: std::iter::IntoIterator<Item = (K, V)>,
38721        K: std::convert::Into<std::string::String>,
38722        V: std::convert::Into<std::string::String>,
38723    {
38724        use std::iter::Iterator;
38725        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
38726        self
38727    }
38728
38729    /// Sets the value of [description][crate::model::Asset::description].
38730    ///
38731    /// # Example
38732    /// ```ignore,no_run
38733    /// # use google_cloud_dataplex_v1::model::Asset;
38734    /// let x = Asset::new().set_description("example");
38735    /// ```
38736    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
38737        self.description = v.into();
38738        self
38739    }
38740
38741    /// Sets the value of [state][crate::model::Asset::state].
38742    ///
38743    /// # Example
38744    /// ```ignore,no_run
38745    /// # use google_cloud_dataplex_v1::model::Asset;
38746    /// use google_cloud_dataplex_v1::model::State;
38747    /// let x0 = Asset::new().set_state(State::Active);
38748    /// let x1 = Asset::new().set_state(State::Creating);
38749    /// let x2 = Asset::new().set_state(State::Deleting);
38750    /// ```
38751    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
38752        self.state = v.into();
38753        self
38754    }
38755
38756    /// Sets the value of [resource_spec][crate::model::Asset::resource_spec].
38757    ///
38758    /// # Example
38759    /// ```ignore,no_run
38760    /// # use google_cloud_dataplex_v1::model::Asset;
38761    /// use google_cloud_dataplex_v1::model::asset::ResourceSpec;
38762    /// let x = Asset::new().set_resource_spec(ResourceSpec::default()/* use setters */);
38763    /// ```
38764    pub fn set_resource_spec<T>(mut self, v: T) -> Self
38765    where
38766        T: std::convert::Into<crate::model::asset::ResourceSpec>,
38767    {
38768        self.resource_spec = std::option::Option::Some(v.into());
38769        self
38770    }
38771
38772    /// Sets or clears the value of [resource_spec][crate::model::Asset::resource_spec].
38773    ///
38774    /// # Example
38775    /// ```ignore,no_run
38776    /// # use google_cloud_dataplex_v1::model::Asset;
38777    /// use google_cloud_dataplex_v1::model::asset::ResourceSpec;
38778    /// let x = Asset::new().set_or_clear_resource_spec(Some(ResourceSpec::default()/* use setters */));
38779    /// let x = Asset::new().set_or_clear_resource_spec(None::<ResourceSpec>);
38780    /// ```
38781    pub fn set_or_clear_resource_spec<T>(mut self, v: std::option::Option<T>) -> Self
38782    where
38783        T: std::convert::Into<crate::model::asset::ResourceSpec>,
38784    {
38785        self.resource_spec = v.map(|x| x.into());
38786        self
38787    }
38788
38789    /// Sets the value of [resource_status][crate::model::Asset::resource_status].
38790    ///
38791    /// # Example
38792    /// ```ignore,no_run
38793    /// # use google_cloud_dataplex_v1::model::Asset;
38794    /// use google_cloud_dataplex_v1::model::asset::ResourceStatus;
38795    /// let x = Asset::new().set_resource_status(ResourceStatus::default()/* use setters */);
38796    /// ```
38797    pub fn set_resource_status<T>(mut self, v: T) -> Self
38798    where
38799        T: std::convert::Into<crate::model::asset::ResourceStatus>,
38800    {
38801        self.resource_status = std::option::Option::Some(v.into());
38802        self
38803    }
38804
38805    /// Sets or clears the value of [resource_status][crate::model::Asset::resource_status].
38806    ///
38807    /// # Example
38808    /// ```ignore,no_run
38809    /// # use google_cloud_dataplex_v1::model::Asset;
38810    /// use google_cloud_dataplex_v1::model::asset::ResourceStatus;
38811    /// let x = Asset::new().set_or_clear_resource_status(Some(ResourceStatus::default()/* use setters */));
38812    /// let x = Asset::new().set_or_clear_resource_status(None::<ResourceStatus>);
38813    /// ```
38814    pub fn set_or_clear_resource_status<T>(mut self, v: std::option::Option<T>) -> Self
38815    where
38816        T: std::convert::Into<crate::model::asset::ResourceStatus>,
38817    {
38818        self.resource_status = v.map(|x| x.into());
38819        self
38820    }
38821
38822    /// Sets the value of [security_status][crate::model::Asset::security_status].
38823    ///
38824    /// # Example
38825    /// ```ignore,no_run
38826    /// # use google_cloud_dataplex_v1::model::Asset;
38827    /// use google_cloud_dataplex_v1::model::asset::SecurityStatus;
38828    /// let x = Asset::new().set_security_status(SecurityStatus::default()/* use setters */);
38829    /// ```
38830    pub fn set_security_status<T>(mut self, v: T) -> Self
38831    where
38832        T: std::convert::Into<crate::model::asset::SecurityStatus>,
38833    {
38834        self.security_status = std::option::Option::Some(v.into());
38835        self
38836    }
38837
38838    /// Sets or clears the value of [security_status][crate::model::Asset::security_status].
38839    ///
38840    /// # Example
38841    /// ```ignore,no_run
38842    /// # use google_cloud_dataplex_v1::model::Asset;
38843    /// use google_cloud_dataplex_v1::model::asset::SecurityStatus;
38844    /// let x = Asset::new().set_or_clear_security_status(Some(SecurityStatus::default()/* use setters */));
38845    /// let x = Asset::new().set_or_clear_security_status(None::<SecurityStatus>);
38846    /// ```
38847    pub fn set_or_clear_security_status<T>(mut self, v: std::option::Option<T>) -> Self
38848    where
38849        T: std::convert::Into<crate::model::asset::SecurityStatus>,
38850    {
38851        self.security_status = v.map(|x| x.into());
38852        self
38853    }
38854
38855    /// Sets the value of [discovery_spec][crate::model::Asset::discovery_spec].
38856    ///
38857    /// # Example
38858    /// ```ignore,no_run
38859    /// # use google_cloud_dataplex_v1::model::Asset;
38860    /// use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
38861    /// let x = Asset::new().set_discovery_spec(DiscoverySpec::default()/* use setters */);
38862    /// ```
38863    pub fn set_discovery_spec<T>(mut self, v: T) -> Self
38864    where
38865        T: std::convert::Into<crate::model::asset::DiscoverySpec>,
38866    {
38867        self.discovery_spec = std::option::Option::Some(v.into());
38868        self
38869    }
38870
38871    /// Sets or clears the value of [discovery_spec][crate::model::Asset::discovery_spec].
38872    ///
38873    /// # Example
38874    /// ```ignore,no_run
38875    /// # use google_cloud_dataplex_v1::model::Asset;
38876    /// use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
38877    /// let x = Asset::new().set_or_clear_discovery_spec(Some(DiscoverySpec::default()/* use setters */));
38878    /// let x = Asset::new().set_or_clear_discovery_spec(None::<DiscoverySpec>);
38879    /// ```
38880    pub fn set_or_clear_discovery_spec<T>(mut self, v: std::option::Option<T>) -> Self
38881    where
38882        T: std::convert::Into<crate::model::asset::DiscoverySpec>,
38883    {
38884        self.discovery_spec = v.map(|x| x.into());
38885        self
38886    }
38887
38888    /// Sets the value of [discovery_status][crate::model::Asset::discovery_status].
38889    ///
38890    /// # Example
38891    /// ```ignore,no_run
38892    /// # use google_cloud_dataplex_v1::model::Asset;
38893    /// use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
38894    /// let x = Asset::new().set_discovery_status(DiscoveryStatus::default()/* use setters */);
38895    /// ```
38896    pub fn set_discovery_status<T>(mut self, v: T) -> Self
38897    where
38898        T: std::convert::Into<crate::model::asset::DiscoveryStatus>,
38899    {
38900        self.discovery_status = std::option::Option::Some(v.into());
38901        self
38902    }
38903
38904    /// Sets or clears the value of [discovery_status][crate::model::Asset::discovery_status].
38905    ///
38906    /// # Example
38907    /// ```ignore,no_run
38908    /// # use google_cloud_dataplex_v1::model::Asset;
38909    /// use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
38910    /// let x = Asset::new().set_or_clear_discovery_status(Some(DiscoveryStatus::default()/* use setters */));
38911    /// let x = Asset::new().set_or_clear_discovery_status(None::<DiscoveryStatus>);
38912    /// ```
38913    pub fn set_or_clear_discovery_status<T>(mut self, v: std::option::Option<T>) -> Self
38914    where
38915        T: std::convert::Into<crate::model::asset::DiscoveryStatus>,
38916    {
38917        self.discovery_status = v.map(|x| x.into());
38918        self
38919    }
38920}
38921
38922impl wkt::message::Message for Asset {
38923    fn typename() -> &'static str {
38924        "type.googleapis.com/google.cloud.dataplex.v1.Asset"
38925    }
38926}
38927
38928/// Defines additional types related to [Asset].
38929pub mod asset {
38930    #[allow(unused_imports)]
38931    use super::*;
38932
38933    /// Security policy status of the asset. Data security policy, i.e., readers,
38934    /// writers & owners, should be specified in the lake/zone/asset IAM policy.
38935    #[derive(Clone, Default, PartialEq)]
38936    #[non_exhaustive]
38937    pub struct SecurityStatus {
38938        /// The current state of the security policy applied to the attached
38939        /// resource.
38940        pub state: crate::model::asset::security_status::State,
38941
38942        /// Additional information about the current state.
38943        pub message: std::string::String,
38944
38945        /// Last update time of the status.
38946        pub update_time: std::option::Option<wkt::Timestamp>,
38947
38948        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38949    }
38950
38951    impl SecurityStatus {
38952        pub fn new() -> Self {
38953            std::default::Default::default()
38954        }
38955
38956        /// Sets the value of [state][crate::model::asset::SecurityStatus::state].
38957        ///
38958        /// # Example
38959        /// ```ignore,no_run
38960        /// # use google_cloud_dataplex_v1::model::asset::SecurityStatus;
38961        /// use google_cloud_dataplex_v1::model::asset::security_status::State;
38962        /// let x0 = SecurityStatus::new().set_state(State::Ready);
38963        /// let x1 = SecurityStatus::new().set_state(State::Applying);
38964        /// let x2 = SecurityStatus::new().set_state(State::Error);
38965        /// ```
38966        pub fn set_state<T: std::convert::Into<crate::model::asset::security_status::State>>(
38967            mut self,
38968            v: T,
38969        ) -> Self {
38970            self.state = v.into();
38971            self
38972        }
38973
38974        /// Sets the value of [message][crate::model::asset::SecurityStatus::message].
38975        ///
38976        /// # Example
38977        /// ```ignore,no_run
38978        /// # use google_cloud_dataplex_v1::model::asset::SecurityStatus;
38979        /// let x = SecurityStatus::new().set_message("example");
38980        /// ```
38981        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
38982            self.message = v.into();
38983            self
38984        }
38985
38986        /// Sets the value of [update_time][crate::model::asset::SecurityStatus::update_time].
38987        ///
38988        /// # Example
38989        /// ```ignore,no_run
38990        /// # use google_cloud_dataplex_v1::model::asset::SecurityStatus;
38991        /// use wkt::Timestamp;
38992        /// let x = SecurityStatus::new().set_update_time(Timestamp::default()/* use setters */);
38993        /// ```
38994        pub fn set_update_time<T>(mut self, v: T) -> Self
38995        where
38996            T: std::convert::Into<wkt::Timestamp>,
38997        {
38998            self.update_time = std::option::Option::Some(v.into());
38999            self
39000        }
39001
39002        /// Sets or clears the value of [update_time][crate::model::asset::SecurityStatus::update_time].
39003        ///
39004        /// # Example
39005        /// ```ignore,no_run
39006        /// # use google_cloud_dataplex_v1::model::asset::SecurityStatus;
39007        /// use wkt::Timestamp;
39008        /// let x = SecurityStatus::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
39009        /// let x = SecurityStatus::new().set_or_clear_update_time(None::<Timestamp>);
39010        /// ```
39011        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
39012        where
39013            T: std::convert::Into<wkt::Timestamp>,
39014        {
39015            self.update_time = v.map(|x| x.into());
39016            self
39017        }
39018    }
39019
39020    impl wkt::message::Message for SecurityStatus {
39021        fn typename() -> &'static str {
39022            "type.googleapis.com/google.cloud.dataplex.v1.Asset.SecurityStatus"
39023        }
39024    }
39025
39026    /// Defines additional types related to [SecurityStatus].
39027    pub mod security_status {
39028        #[allow(unused_imports)]
39029        use super::*;
39030
39031        /// The state of the security policy.
39032        ///
39033        /// # Working with unknown values
39034        ///
39035        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
39036        /// additional enum variants at any time. Adding new variants is not considered
39037        /// a breaking change. Applications should write their code in anticipation of:
39038        ///
39039        /// - New values appearing in future releases of the client library, **and**
39040        /// - New values received dynamically, without application changes.
39041        ///
39042        /// Please consult the [Working with enums] section in the user guide for some
39043        /// guidelines.
39044        ///
39045        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
39046        #[derive(Clone, Debug, PartialEq)]
39047        #[non_exhaustive]
39048        pub enum State {
39049            /// State unspecified.
39050            Unspecified,
39051            /// Security policy has been successfully applied to the attached resource.
39052            Ready,
39053            /// Security policy is in the process of being applied to the attached
39054            /// resource.
39055            Applying,
39056            /// Security policy could not be applied to the attached resource due to
39057            /// errors.
39058            Error,
39059            /// If set, the enum was initialized with an unknown value.
39060            ///
39061            /// Applications can examine the value using [State::value] or
39062            /// [State::name].
39063            UnknownValue(state::UnknownValue),
39064        }
39065
39066        #[doc(hidden)]
39067        pub mod state {
39068            #[allow(unused_imports)]
39069            use super::*;
39070            #[derive(Clone, Debug, PartialEq)]
39071            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
39072        }
39073
39074        impl State {
39075            /// Gets the enum value.
39076            ///
39077            /// Returns `None` if the enum contains an unknown value deserialized from
39078            /// the string representation of enums.
39079            pub fn value(&self) -> std::option::Option<i32> {
39080                match self {
39081                    Self::Unspecified => std::option::Option::Some(0),
39082                    Self::Ready => std::option::Option::Some(1),
39083                    Self::Applying => std::option::Option::Some(2),
39084                    Self::Error => std::option::Option::Some(3),
39085                    Self::UnknownValue(u) => u.0.value(),
39086                }
39087            }
39088
39089            /// Gets the enum value as a string.
39090            ///
39091            /// Returns `None` if the enum contains an unknown value deserialized from
39092            /// the integer representation of enums.
39093            pub fn name(&self) -> std::option::Option<&str> {
39094                match self {
39095                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
39096                    Self::Ready => std::option::Option::Some("READY"),
39097                    Self::Applying => std::option::Option::Some("APPLYING"),
39098                    Self::Error => std::option::Option::Some("ERROR"),
39099                    Self::UnknownValue(u) => u.0.name(),
39100                }
39101            }
39102        }
39103
39104        impl std::default::Default for State {
39105            fn default() -> Self {
39106                use std::convert::From;
39107                Self::from(0)
39108            }
39109        }
39110
39111        impl std::fmt::Display for State {
39112            fn fmt(
39113                &self,
39114                f: &mut std::fmt::Formatter<'_>,
39115            ) -> std::result::Result<(), std::fmt::Error> {
39116                wkt::internal::display_enum(f, self.name(), self.value())
39117            }
39118        }
39119
39120        impl std::convert::From<i32> for State {
39121            fn from(value: i32) -> Self {
39122                match value {
39123                    0 => Self::Unspecified,
39124                    1 => Self::Ready,
39125                    2 => Self::Applying,
39126                    3 => Self::Error,
39127                    _ => Self::UnknownValue(state::UnknownValue(
39128                        wkt::internal::UnknownEnumValue::Integer(value),
39129                    )),
39130                }
39131            }
39132        }
39133
39134        impl std::convert::From<&str> for State {
39135            fn from(value: &str) -> Self {
39136                use std::string::ToString;
39137                match value {
39138                    "STATE_UNSPECIFIED" => Self::Unspecified,
39139                    "READY" => Self::Ready,
39140                    "APPLYING" => Self::Applying,
39141                    "ERROR" => Self::Error,
39142                    _ => Self::UnknownValue(state::UnknownValue(
39143                        wkt::internal::UnknownEnumValue::String(value.to_string()),
39144                    )),
39145                }
39146            }
39147        }
39148
39149        impl serde::ser::Serialize for State {
39150            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
39151            where
39152                S: serde::Serializer,
39153            {
39154                match self {
39155                    Self::Unspecified => serializer.serialize_i32(0),
39156                    Self::Ready => serializer.serialize_i32(1),
39157                    Self::Applying => serializer.serialize_i32(2),
39158                    Self::Error => serializer.serialize_i32(3),
39159                    Self::UnknownValue(u) => u.0.serialize(serializer),
39160                }
39161            }
39162        }
39163
39164        impl<'de> serde::de::Deserialize<'de> for State {
39165            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
39166            where
39167                D: serde::Deserializer<'de>,
39168            {
39169                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
39170                    ".google.cloud.dataplex.v1.Asset.SecurityStatus.State",
39171                ))
39172            }
39173        }
39174    }
39175
39176    /// Settings to manage the metadata discovery and publishing for an asset.
39177    #[derive(Clone, Default, PartialEq)]
39178    #[non_exhaustive]
39179    pub struct DiscoverySpec {
39180        /// Optional. Whether discovery is enabled.
39181        pub enabled: bool,
39182
39183        /// Optional. The list of patterns to apply for selecting data to include
39184        /// during discovery if only a subset of the data should considered.  For
39185        /// Cloud Storage bucket assets, these are interpreted as glob patterns used
39186        /// to match object names. For BigQuery dataset assets, these are interpreted
39187        /// as patterns to match table names.
39188        pub include_patterns: std::vec::Vec<std::string::String>,
39189
39190        /// Optional. The list of patterns to apply for selecting data to exclude
39191        /// during discovery.  For Cloud Storage bucket assets, these are interpreted
39192        /// as glob patterns used to match object names. For BigQuery dataset assets,
39193        /// these are interpreted as patterns to match table names.
39194        pub exclude_patterns: std::vec::Vec<std::string::String>,
39195
39196        /// Optional. Configuration for CSV data.
39197        pub csv_options: std::option::Option<crate::model::asset::discovery_spec::CsvOptions>,
39198
39199        /// Optional. Configuration for Json data.
39200        pub json_options: std::option::Option<crate::model::asset::discovery_spec::JsonOptions>,
39201
39202        /// Determines when discovery is triggered.
39203        pub trigger: std::option::Option<crate::model::asset::discovery_spec::Trigger>,
39204
39205        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39206    }
39207
39208    impl DiscoverySpec {
39209        pub fn new() -> Self {
39210            std::default::Default::default()
39211        }
39212
39213        /// Sets the value of [enabled][crate::model::asset::DiscoverySpec::enabled].
39214        ///
39215        /// # Example
39216        /// ```ignore,no_run
39217        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39218        /// let x = DiscoverySpec::new().set_enabled(true);
39219        /// ```
39220        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
39221            self.enabled = v.into();
39222            self
39223        }
39224
39225        /// Sets the value of [include_patterns][crate::model::asset::DiscoverySpec::include_patterns].
39226        ///
39227        /// # Example
39228        /// ```ignore,no_run
39229        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39230        /// let x = DiscoverySpec::new().set_include_patterns(["a", "b", "c"]);
39231        /// ```
39232        pub fn set_include_patterns<T, V>(mut self, v: T) -> Self
39233        where
39234            T: std::iter::IntoIterator<Item = V>,
39235            V: std::convert::Into<std::string::String>,
39236        {
39237            use std::iter::Iterator;
39238            self.include_patterns = v.into_iter().map(|i| i.into()).collect();
39239            self
39240        }
39241
39242        /// Sets the value of [exclude_patterns][crate::model::asset::DiscoverySpec::exclude_patterns].
39243        ///
39244        /// # Example
39245        /// ```ignore,no_run
39246        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39247        /// let x = DiscoverySpec::new().set_exclude_patterns(["a", "b", "c"]);
39248        /// ```
39249        pub fn set_exclude_patterns<T, V>(mut self, v: T) -> Self
39250        where
39251            T: std::iter::IntoIterator<Item = V>,
39252            V: std::convert::Into<std::string::String>,
39253        {
39254            use std::iter::Iterator;
39255            self.exclude_patterns = v.into_iter().map(|i| i.into()).collect();
39256            self
39257        }
39258
39259        /// Sets the value of [csv_options][crate::model::asset::DiscoverySpec::csv_options].
39260        ///
39261        /// # Example
39262        /// ```ignore,no_run
39263        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39264        /// use google_cloud_dataplex_v1::model::asset::discovery_spec::CsvOptions;
39265        /// let x = DiscoverySpec::new().set_csv_options(CsvOptions::default()/* use setters */);
39266        /// ```
39267        pub fn set_csv_options<T>(mut self, v: T) -> Self
39268        where
39269            T: std::convert::Into<crate::model::asset::discovery_spec::CsvOptions>,
39270        {
39271            self.csv_options = std::option::Option::Some(v.into());
39272            self
39273        }
39274
39275        /// Sets or clears the value of [csv_options][crate::model::asset::DiscoverySpec::csv_options].
39276        ///
39277        /// # Example
39278        /// ```ignore,no_run
39279        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39280        /// use google_cloud_dataplex_v1::model::asset::discovery_spec::CsvOptions;
39281        /// let x = DiscoverySpec::new().set_or_clear_csv_options(Some(CsvOptions::default()/* use setters */));
39282        /// let x = DiscoverySpec::new().set_or_clear_csv_options(None::<CsvOptions>);
39283        /// ```
39284        pub fn set_or_clear_csv_options<T>(mut self, v: std::option::Option<T>) -> Self
39285        where
39286            T: std::convert::Into<crate::model::asset::discovery_spec::CsvOptions>,
39287        {
39288            self.csv_options = v.map(|x| x.into());
39289            self
39290        }
39291
39292        /// Sets the value of [json_options][crate::model::asset::DiscoverySpec::json_options].
39293        ///
39294        /// # Example
39295        /// ```ignore,no_run
39296        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39297        /// use google_cloud_dataplex_v1::model::asset::discovery_spec::JsonOptions;
39298        /// let x = DiscoverySpec::new().set_json_options(JsonOptions::default()/* use setters */);
39299        /// ```
39300        pub fn set_json_options<T>(mut self, v: T) -> Self
39301        where
39302            T: std::convert::Into<crate::model::asset::discovery_spec::JsonOptions>,
39303        {
39304            self.json_options = std::option::Option::Some(v.into());
39305            self
39306        }
39307
39308        /// Sets or clears the value of [json_options][crate::model::asset::DiscoverySpec::json_options].
39309        ///
39310        /// # Example
39311        /// ```ignore,no_run
39312        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39313        /// use google_cloud_dataplex_v1::model::asset::discovery_spec::JsonOptions;
39314        /// let x = DiscoverySpec::new().set_or_clear_json_options(Some(JsonOptions::default()/* use setters */));
39315        /// let x = DiscoverySpec::new().set_or_clear_json_options(None::<JsonOptions>);
39316        /// ```
39317        pub fn set_or_clear_json_options<T>(mut self, v: std::option::Option<T>) -> Self
39318        where
39319            T: std::convert::Into<crate::model::asset::discovery_spec::JsonOptions>,
39320        {
39321            self.json_options = v.map(|x| x.into());
39322            self
39323        }
39324
39325        /// Sets the value of [trigger][crate::model::asset::DiscoverySpec::trigger].
39326        ///
39327        /// Note that all the setters affecting `trigger` are mutually
39328        /// exclusive.
39329        ///
39330        /// # Example
39331        /// ```ignore,no_run
39332        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39333        /// use google_cloud_dataplex_v1::model::asset::discovery_spec::Trigger;
39334        /// let x = DiscoverySpec::new().set_trigger(Some(Trigger::Schedule("example".to_string())));
39335        /// ```
39336        pub fn set_trigger<
39337            T: std::convert::Into<std::option::Option<crate::model::asset::discovery_spec::Trigger>>,
39338        >(
39339            mut self,
39340            v: T,
39341        ) -> Self {
39342            self.trigger = v.into();
39343            self
39344        }
39345
39346        /// The value of [trigger][crate::model::asset::DiscoverySpec::trigger]
39347        /// if it holds a `Schedule`, `None` if the field is not set or
39348        /// holds a different branch.
39349        pub fn schedule(&self) -> std::option::Option<&std::string::String> {
39350            #[allow(unreachable_patterns)]
39351            self.trigger.as_ref().and_then(|v| match v {
39352                crate::model::asset::discovery_spec::Trigger::Schedule(v) => {
39353                    std::option::Option::Some(v)
39354                }
39355                _ => std::option::Option::None,
39356            })
39357        }
39358
39359        /// Sets the value of [trigger][crate::model::asset::DiscoverySpec::trigger]
39360        /// to hold a `Schedule`.
39361        ///
39362        /// Note that all the setters affecting `trigger` are
39363        /// mutually exclusive.
39364        ///
39365        /// # Example
39366        /// ```ignore,no_run
39367        /// # use google_cloud_dataplex_v1::model::asset::DiscoverySpec;
39368        /// let x = DiscoverySpec::new().set_schedule("example");
39369        /// assert!(x.schedule().is_some());
39370        /// ```
39371        pub fn set_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
39372            self.trigger = std::option::Option::Some(
39373                crate::model::asset::discovery_spec::Trigger::Schedule(v.into()),
39374            );
39375            self
39376        }
39377    }
39378
39379    impl wkt::message::Message for DiscoverySpec {
39380        fn typename() -> &'static str {
39381            "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoverySpec"
39382        }
39383    }
39384
39385    /// Defines additional types related to [DiscoverySpec].
39386    pub mod discovery_spec {
39387        #[allow(unused_imports)]
39388        use super::*;
39389
39390        /// Describe CSV and similar semi-structured data formats.
39391        #[derive(Clone, Default, PartialEq)]
39392        #[non_exhaustive]
39393        pub struct CsvOptions {
39394            /// Optional. The number of rows to interpret as header rows that should be
39395            /// skipped when reading data rows.
39396            pub header_rows: i32,
39397
39398            /// Optional. The delimiter being used to separate values. This defaults to
39399            /// ','.
39400            pub delimiter: std::string::String,
39401
39402            /// Optional. The character encoding of the data. The default is UTF-8.
39403            pub encoding: std::string::String,
39404
39405            /// Optional. Whether to disable the inference of data type for CSV data.
39406            /// If true, all columns will be registered as strings.
39407            pub disable_type_inference: bool,
39408
39409            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39410        }
39411
39412        impl CsvOptions {
39413            pub fn new() -> Self {
39414                std::default::Default::default()
39415            }
39416
39417            /// Sets the value of [header_rows][crate::model::asset::discovery_spec::CsvOptions::header_rows].
39418            ///
39419            /// # Example
39420            /// ```ignore,no_run
39421            /// # use google_cloud_dataplex_v1::model::asset::discovery_spec::CsvOptions;
39422            /// let x = CsvOptions::new().set_header_rows(42);
39423            /// ```
39424            pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
39425                self.header_rows = v.into();
39426                self
39427            }
39428
39429            /// Sets the value of [delimiter][crate::model::asset::discovery_spec::CsvOptions::delimiter].
39430            ///
39431            /// # Example
39432            /// ```ignore,no_run
39433            /// # use google_cloud_dataplex_v1::model::asset::discovery_spec::CsvOptions;
39434            /// let x = CsvOptions::new().set_delimiter("example");
39435            /// ```
39436            pub fn set_delimiter<T: std::convert::Into<std::string::String>>(
39437                mut self,
39438                v: T,
39439            ) -> Self {
39440                self.delimiter = v.into();
39441                self
39442            }
39443
39444            /// Sets the value of [encoding][crate::model::asset::discovery_spec::CsvOptions::encoding].
39445            ///
39446            /// # Example
39447            /// ```ignore,no_run
39448            /// # use google_cloud_dataplex_v1::model::asset::discovery_spec::CsvOptions;
39449            /// let x = CsvOptions::new().set_encoding("example");
39450            /// ```
39451            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
39452                mut self,
39453                v: T,
39454            ) -> Self {
39455                self.encoding = v.into();
39456                self
39457            }
39458
39459            /// Sets the value of [disable_type_inference][crate::model::asset::discovery_spec::CsvOptions::disable_type_inference].
39460            ///
39461            /// # Example
39462            /// ```ignore,no_run
39463            /// # use google_cloud_dataplex_v1::model::asset::discovery_spec::CsvOptions;
39464            /// let x = CsvOptions::new().set_disable_type_inference(true);
39465            /// ```
39466            pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
39467                self.disable_type_inference = v.into();
39468                self
39469            }
39470        }
39471
39472        impl wkt::message::Message for CsvOptions {
39473            fn typename() -> &'static str {
39474                "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions"
39475            }
39476        }
39477
39478        /// Describe JSON data format.
39479        #[derive(Clone, Default, PartialEq)]
39480        #[non_exhaustive]
39481        pub struct JsonOptions {
39482            /// Optional. The character encoding of the data. The default is UTF-8.
39483            pub encoding: std::string::String,
39484
39485            /// Optional. Whether to disable the inference of data type for Json data.
39486            /// If true, all columns will be registered as their primitive types
39487            /// (strings, number or boolean).
39488            pub disable_type_inference: bool,
39489
39490            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39491        }
39492
39493        impl JsonOptions {
39494            pub fn new() -> Self {
39495                std::default::Default::default()
39496            }
39497
39498            /// Sets the value of [encoding][crate::model::asset::discovery_spec::JsonOptions::encoding].
39499            ///
39500            /// # Example
39501            /// ```ignore,no_run
39502            /// # use google_cloud_dataplex_v1::model::asset::discovery_spec::JsonOptions;
39503            /// let x = JsonOptions::new().set_encoding("example");
39504            /// ```
39505            pub fn set_encoding<T: std::convert::Into<std::string::String>>(
39506                mut self,
39507                v: T,
39508            ) -> Self {
39509                self.encoding = v.into();
39510                self
39511            }
39512
39513            /// Sets the value of [disable_type_inference][crate::model::asset::discovery_spec::JsonOptions::disable_type_inference].
39514            ///
39515            /// # Example
39516            /// ```ignore,no_run
39517            /// # use google_cloud_dataplex_v1::model::asset::discovery_spec::JsonOptions;
39518            /// let x = JsonOptions::new().set_disable_type_inference(true);
39519            /// ```
39520            pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
39521                self.disable_type_inference = v.into();
39522                self
39523            }
39524        }
39525
39526        impl wkt::message::Message for JsonOptions {
39527            fn typename() -> &'static str {
39528                "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions"
39529            }
39530        }
39531
39532        /// Determines when discovery is triggered.
39533        #[derive(Clone, Debug, PartialEq)]
39534        #[non_exhaustive]
39535        pub enum Trigger {
39536            /// Optional. Cron schedule (<https://en.wikipedia.org/wiki/Cron>) for
39537            /// running discovery periodically. Successive discovery runs must be
39538            /// scheduled at least 60 minutes apart. The default value is to run
39539            /// discovery every 60 minutes.
39540            ///
39541            /// To explicitly set a timezone to the cron tab, apply a prefix in the
39542            /// cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or TZ=${IANA_TIME_ZONE}".
39543            /// The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
39544            /// database. For example, `CRON_TZ=America/New_York 1 * * * *`, or
39545            /// `TZ=America/New_York 1 * * * *`.
39546            Schedule(std::string::String),
39547        }
39548    }
39549
39550    /// Identifies the cloud resource that is referenced by this asset.
39551    #[derive(Clone, Default, PartialEq)]
39552    #[non_exhaustive]
39553    pub struct ResourceSpec {
39554        /// Immutable. Relative name of the cloud resource that contains the data
39555        /// that is being managed within a lake. For example:
39556        /// `projects/{project_number}/buckets/{bucket_id}`
39557        /// `projects/{project_number}/datasets/{dataset_id}`
39558        pub name: std::string::String,
39559
39560        /// Required. Immutable. Type of resource.
39561        pub r#type: crate::model::asset::resource_spec::Type,
39562
39563        /// Optional. Determines how read permissions are handled for each asset and
39564        /// their associated tables. Only available to storage buckets assets.
39565        pub read_access_mode: crate::model::asset::resource_spec::AccessMode,
39566
39567        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39568    }
39569
39570    impl ResourceSpec {
39571        pub fn new() -> Self {
39572            std::default::Default::default()
39573        }
39574
39575        /// Sets the value of [name][crate::model::asset::ResourceSpec::name].
39576        ///
39577        /// # Example
39578        /// ```ignore,no_run
39579        /// # use google_cloud_dataplex_v1::model::asset::ResourceSpec;
39580        /// let x = ResourceSpec::new().set_name("example");
39581        /// ```
39582        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
39583            self.name = v.into();
39584            self
39585        }
39586
39587        /// Sets the value of [r#type][crate::model::asset::ResourceSpec::type].
39588        ///
39589        /// # Example
39590        /// ```ignore,no_run
39591        /// # use google_cloud_dataplex_v1::model::asset::ResourceSpec;
39592        /// use google_cloud_dataplex_v1::model::asset::resource_spec::Type;
39593        /// let x0 = ResourceSpec::new().set_type(Type::StorageBucket);
39594        /// let x1 = ResourceSpec::new().set_type(Type::BigqueryDataset);
39595        /// ```
39596        pub fn set_type<T: std::convert::Into<crate::model::asset::resource_spec::Type>>(
39597            mut self,
39598            v: T,
39599        ) -> Self {
39600            self.r#type = v.into();
39601            self
39602        }
39603
39604        /// Sets the value of [read_access_mode][crate::model::asset::ResourceSpec::read_access_mode].
39605        ///
39606        /// # Example
39607        /// ```ignore,no_run
39608        /// # use google_cloud_dataplex_v1::model::asset::ResourceSpec;
39609        /// use google_cloud_dataplex_v1::model::asset::resource_spec::AccessMode;
39610        /// let x0 = ResourceSpec::new().set_read_access_mode(AccessMode::Direct);
39611        /// let x1 = ResourceSpec::new().set_read_access_mode(AccessMode::Managed);
39612        /// ```
39613        pub fn set_read_access_mode<
39614            T: std::convert::Into<crate::model::asset::resource_spec::AccessMode>,
39615        >(
39616            mut self,
39617            v: T,
39618        ) -> Self {
39619            self.read_access_mode = v.into();
39620            self
39621        }
39622    }
39623
39624    impl wkt::message::Message for ResourceSpec {
39625        fn typename() -> &'static str {
39626            "type.googleapis.com/google.cloud.dataplex.v1.Asset.ResourceSpec"
39627        }
39628    }
39629
39630    /// Defines additional types related to [ResourceSpec].
39631    pub mod resource_spec {
39632        #[allow(unused_imports)]
39633        use super::*;
39634
39635        /// Type of resource.
39636        ///
39637        /// # Working with unknown values
39638        ///
39639        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
39640        /// additional enum variants at any time. Adding new variants is not considered
39641        /// a breaking change. Applications should write their code in anticipation of:
39642        ///
39643        /// - New values appearing in future releases of the client library, **and**
39644        /// - New values received dynamically, without application changes.
39645        ///
39646        /// Please consult the [Working with enums] section in the user guide for some
39647        /// guidelines.
39648        ///
39649        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
39650        #[derive(Clone, Debug, PartialEq)]
39651        #[non_exhaustive]
39652        pub enum Type {
39653            /// Type not specified.
39654            Unspecified,
39655            /// Cloud Storage bucket.
39656            StorageBucket,
39657            /// BigQuery dataset.
39658            BigqueryDataset,
39659            /// If set, the enum was initialized with an unknown value.
39660            ///
39661            /// Applications can examine the value using [Type::value] or
39662            /// [Type::name].
39663            UnknownValue(r#type::UnknownValue),
39664        }
39665
39666        #[doc(hidden)]
39667        pub mod r#type {
39668            #[allow(unused_imports)]
39669            use super::*;
39670            #[derive(Clone, Debug, PartialEq)]
39671            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
39672        }
39673
39674        impl Type {
39675            /// Gets the enum value.
39676            ///
39677            /// Returns `None` if the enum contains an unknown value deserialized from
39678            /// the string representation of enums.
39679            pub fn value(&self) -> std::option::Option<i32> {
39680                match self {
39681                    Self::Unspecified => std::option::Option::Some(0),
39682                    Self::StorageBucket => std::option::Option::Some(1),
39683                    Self::BigqueryDataset => std::option::Option::Some(2),
39684                    Self::UnknownValue(u) => u.0.value(),
39685                }
39686            }
39687
39688            /// Gets the enum value as a string.
39689            ///
39690            /// Returns `None` if the enum contains an unknown value deserialized from
39691            /// the integer representation of enums.
39692            pub fn name(&self) -> std::option::Option<&str> {
39693                match self {
39694                    Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
39695                    Self::StorageBucket => std::option::Option::Some("STORAGE_BUCKET"),
39696                    Self::BigqueryDataset => std::option::Option::Some("BIGQUERY_DATASET"),
39697                    Self::UnknownValue(u) => u.0.name(),
39698                }
39699            }
39700        }
39701
39702        impl std::default::Default for Type {
39703            fn default() -> Self {
39704                use std::convert::From;
39705                Self::from(0)
39706            }
39707        }
39708
39709        impl std::fmt::Display for Type {
39710            fn fmt(
39711                &self,
39712                f: &mut std::fmt::Formatter<'_>,
39713            ) -> std::result::Result<(), std::fmt::Error> {
39714                wkt::internal::display_enum(f, self.name(), self.value())
39715            }
39716        }
39717
39718        impl std::convert::From<i32> for Type {
39719            fn from(value: i32) -> Self {
39720                match value {
39721                    0 => Self::Unspecified,
39722                    1 => Self::StorageBucket,
39723                    2 => Self::BigqueryDataset,
39724                    _ => Self::UnknownValue(r#type::UnknownValue(
39725                        wkt::internal::UnknownEnumValue::Integer(value),
39726                    )),
39727                }
39728            }
39729        }
39730
39731        impl std::convert::From<&str> for Type {
39732            fn from(value: &str) -> Self {
39733                use std::string::ToString;
39734                match value {
39735                    "TYPE_UNSPECIFIED" => Self::Unspecified,
39736                    "STORAGE_BUCKET" => Self::StorageBucket,
39737                    "BIGQUERY_DATASET" => Self::BigqueryDataset,
39738                    _ => Self::UnknownValue(r#type::UnknownValue(
39739                        wkt::internal::UnknownEnumValue::String(value.to_string()),
39740                    )),
39741                }
39742            }
39743        }
39744
39745        impl serde::ser::Serialize for Type {
39746            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
39747            where
39748                S: serde::Serializer,
39749            {
39750                match self {
39751                    Self::Unspecified => serializer.serialize_i32(0),
39752                    Self::StorageBucket => serializer.serialize_i32(1),
39753                    Self::BigqueryDataset => serializer.serialize_i32(2),
39754                    Self::UnknownValue(u) => u.0.serialize(serializer),
39755                }
39756            }
39757        }
39758
39759        impl<'de> serde::de::Deserialize<'de> for Type {
39760            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
39761            where
39762                D: serde::Deserializer<'de>,
39763            {
39764                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
39765                    ".google.cloud.dataplex.v1.Asset.ResourceSpec.Type",
39766                ))
39767            }
39768        }
39769
39770        /// Access Mode determines how data stored within the resource is read. This
39771        /// is only applicable to storage bucket assets.
39772        ///
39773        /// # Working with unknown values
39774        ///
39775        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
39776        /// additional enum variants at any time. Adding new variants is not considered
39777        /// a breaking change. Applications should write their code in anticipation of:
39778        ///
39779        /// - New values appearing in future releases of the client library, **and**
39780        /// - New values received dynamically, without application changes.
39781        ///
39782        /// Please consult the [Working with enums] section in the user guide for some
39783        /// guidelines.
39784        ///
39785        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
39786        #[derive(Clone, Debug, PartialEq)]
39787        #[non_exhaustive]
39788        pub enum AccessMode {
39789            /// Access mode unspecified.
39790            Unspecified,
39791            /// Default. Data is accessed directly using storage APIs.
39792            Direct,
39793            /// Data is accessed through a managed interface using BigQuery APIs.
39794            Managed,
39795            /// If set, the enum was initialized with an unknown value.
39796            ///
39797            /// Applications can examine the value using [AccessMode::value] or
39798            /// [AccessMode::name].
39799            UnknownValue(access_mode::UnknownValue),
39800        }
39801
39802        #[doc(hidden)]
39803        pub mod access_mode {
39804            #[allow(unused_imports)]
39805            use super::*;
39806            #[derive(Clone, Debug, PartialEq)]
39807            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
39808        }
39809
39810        impl AccessMode {
39811            /// Gets the enum value.
39812            ///
39813            /// Returns `None` if the enum contains an unknown value deserialized from
39814            /// the string representation of enums.
39815            pub fn value(&self) -> std::option::Option<i32> {
39816                match self {
39817                    Self::Unspecified => std::option::Option::Some(0),
39818                    Self::Direct => std::option::Option::Some(1),
39819                    Self::Managed => std::option::Option::Some(2),
39820                    Self::UnknownValue(u) => u.0.value(),
39821                }
39822            }
39823
39824            /// Gets the enum value as a string.
39825            ///
39826            /// Returns `None` if the enum contains an unknown value deserialized from
39827            /// the integer representation of enums.
39828            pub fn name(&self) -> std::option::Option<&str> {
39829                match self {
39830                    Self::Unspecified => std::option::Option::Some("ACCESS_MODE_UNSPECIFIED"),
39831                    Self::Direct => std::option::Option::Some("DIRECT"),
39832                    Self::Managed => std::option::Option::Some("MANAGED"),
39833                    Self::UnknownValue(u) => u.0.name(),
39834                }
39835            }
39836        }
39837
39838        impl std::default::Default for AccessMode {
39839            fn default() -> Self {
39840                use std::convert::From;
39841                Self::from(0)
39842            }
39843        }
39844
39845        impl std::fmt::Display for AccessMode {
39846            fn fmt(
39847                &self,
39848                f: &mut std::fmt::Formatter<'_>,
39849            ) -> std::result::Result<(), std::fmt::Error> {
39850                wkt::internal::display_enum(f, self.name(), self.value())
39851            }
39852        }
39853
39854        impl std::convert::From<i32> for AccessMode {
39855            fn from(value: i32) -> Self {
39856                match value {
39857                    0 => Self::Unspecified,
39858                    1 => Self::Direct,
39859                    2 => Self::Managed,
39860                    _ => Self::UnknownValue(access_mode::UnknownValue(
39861                        wkt::internal::UnknownEnumValue::Integer(value),
39862                    )),
39863                }
39864            }
39865        }
39866
39867        impl std::convert::From<&str> for AccessMode {
39868            fn from(value: &str) -> Self {
39869                use std::string::ToString;
39870                match value {
39871                    "ACCESS_MODE_UNSPECIFIED" => Self::Unspecified,
39872                    "DIRECT" => Self::Direct,
39873                    "MANAGED" => Self::Managed,
39874                    _ => Self::UnknownValue(access_mode::UnknownValue(
39875                        wkt::internal::UnknownEnumValue::String(value.to_string()),
39876                    )),
39877                }
39878            }
39879        }
39880
39881        impl serde::ser::Serialize for AccessMode {
39882            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
39883            where
39884                S: serde::Serializer,
39885            {
39886                match self {
39887                    Self::Unspecified => serializer.serialize_i32(0),
39888                    Self::Direct => serializer.serialize_i32(1),
39889                    Self::Managed => serializer.serialize_i32(2),
39890                    Self::UnknownValue(u) => u.0.serialize(serializer),
39891                }
39892            }
39893        }
39894
39895        impl<'de> serde::de::Deserialize<'de> for AccessMode {
39896            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
39897            where
39898                D: serde::Deserializer<'de>,
39899            {
39900                deserializer.deserialize_any(wkt::internal::EnumVisitor::<AccessMode>::new(
39901                    ".google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode",
39902                ))
39903            }
39904        }
39905    }
39906
39907    /// Status of the resource referenced by an asset.
39908    #[derive(Clone, Default, PartialEq)]
39909    #[non_exhaustive]
39910    pub struct ResourceStatus {
39911        /// The current state of the managed resource.
39912        pub state: crate::model::asset::resource_status::State,
39913
39914        /// Additional information about the current state.
39915        pub message: std::string::String,
39916
39917        /// Last update time of the status.
39918        pub update_time: std::option::Option<wkt::Timestamp>,
39919
39920        /// Output only. Service account associated with the BigQuery Connection.
39921        pub managed_access_identity: std::string::String,
39922
39923        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39924    }
39925
39926    impl ResourceStatus {
39927        pub fn new() -> Self {
39928            std::default::Default::default()
39929        }
39930
39931        /// Sets the value of [state][crate::model::asset::ResourceStatus::state].
39932        ///
39933        /// # Example
39934        /// ```ignore,no_run
39935        /// # use google_cloud_dataplex_v1::model::asset::ResourceStatus;
39936        /// use google_cloud_dataplex_v1::model::asset::resource_status::State;
39937        /// let x0 = ResourceStatus::new().set_state(State::Ready);
39938        /// let x1 = ResourceStatus::new().set_state(State::Error);
39939        /// ```
39940        pub fn set_state<T: std::convert::Into<crate::model::asset::resource_status::State>>(
39941            mut self,
39942            v: T,
39943        ) -> Self {
39944            self.state = v.into();
39945            self
39946        }
39947
39948        /// Sets the value of [message][crate::model::asset::ResourceStatus::message].
39949        ///
39950        /// # Example
39951        /// ```ignore,no_run
39952        /// # use google_cloud_dataplex_v1::model::asset::ResourceStatus;
39953        /// let x = ResourceStatus::new().set_message("example");
39954        /// ```
39955        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
39956            self.message = v.into();
39957            self
39958        }
39959
39960        /// Sets the value of [update_time][crate::model::asset::ResourceStatus::update_time].
39961        ///
39962        /// # Example
39963        /// ```ignore,no_run
39964        /// # use google_cloud_dataplex_v1::model::asset::ResourceStatus;
39965        /// use wkt::Timestamp;
39966        /// let x = ResourceStatus::new().set_update_time(Timestamp::default()/* use setters */);
39967        /// ```
39968        pub fn set_update_time<T>(mut self, v: T) -> Self
39969        where
39970            T: std::convert::Into<wkt::Timestamp>,
39971        {
39972            self.update_time = std::option::Option::Some(v.into());
39973            self
39974        }
39975
39976        /// Sets or clears the value of [update_time][crate::model::asset::ResourceStatus::update_time].
39977        ///
39978        /// # Example
39979        /// ```ignore,no_run
39980        /// # use google_cloud_dataplex_v1::model::asset::ResourceStatus;
39981        /// use wkt::Timestamp;
39982        /// let x = ResourceStatus::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
39983        /// let x = ResourceStatus::new().set_or_clear_update_time(None::<Timestamp>);
39984        /// ```
39985        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
39986        where
39987            T: std::convert::Into<wkt::Timestamp>,
39988        {
39989            self.update_time = v.map(|x| x.into());
39990            self
39991        }
39992
39993        /// Sets the value of [managed_access_identity][crate::model::asset::ResourceStatus::managed_access_identity].
39994        ///
39995        /// # Example
39996        /// ```ignore,no_run
39997        /// # use google_cloud_dataplex_v1::model::asset::ResourceStatus;
39998        /// let x = ResourceStatus::new().set_managed_access_identity("example");
39999        /// ```
40000        pub fn set_managed_access_identity<T: std::convert::Into<std::string::String>>(
40001            mut self,
40002            v: T,
40003        ) -> Self {
40004            self.managed_access_identity = v.into();
40005            self
40006        }
40007    }
40008
40009    impl wkt::message::Message for ResourceStatus {
40010        fn typename() -> &'static str {
40011            "type.googleapis.com/google.cloud.dataplex.v1.Asset.ResourceStatus"
40012        }
40013    }
40014
40015    /// Defines additional types related to [ResourceStatus].
40016    pub mod resource_status {
40017        #[allow(unused_imports)]
40018        use super::*;
40019
40020        /// The state of a resource.
40021        ///
40022        /// # Working with unknown values
40023        ///
40024        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
40025        /// additional enum variants at any time. Adding new variants is not considered
40026        /// a breaking change. Applications should write their code in anticipation of:
40027        ///
40028        /// - New values appearing in future releases of the client library, **and**
40029        /// - New values received dynamically, without application changes.
40030        ///
40031        /// Please consult the [Working with enums] section in the user guide for some
40032        /// guidelines.
40033        ///
40034        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
40035        #[derive(Clone, Debug, PartialEq)]
40036        #[non_exhaustive]
40037        pub enum State {
40038            /// State unspecified.
40039            Unspecified,
40040            /// Resource does not have any errors.
40041            Ready,
40042            /// Resource has errors.
40043            Error,
40044            /// If set, the enum was initialized with an unknown value.
40045            ///
40046            /// Applications can examine the value using [State::value] or
40047            /// [State::name].
40048            UnknownValue(state::UnknownValue),
40049        }
40050
40051        #[doc(hidden)]
40052        pub mod state {
40053            #[allow(unused_imports)]
40054            use super::*;
40055            #[derive(Clone, Debug, PartialEq)]
40056            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
40057        }
40058
40059        impl State {
40060            /// Gets the enum value.
40061            ///
40062            /// Returns `None` if the enum contains an unknown value deserialized from
40063            /// the string representation of enums.
40064            pub fn value(&self) -> std::option::Option<i32> {
40065                match self {
40066                    Self::Unspecified => std::option::Option::Some(0),
40067                    Self::Ready => std::option::Option::Some(1),
40068                    Self::Error => std::option::Option::Some(2),
40069                    Self::UnknownValue(u) => u.0.value(),
40070                }
40071            }
40072
40073            /// Gets the enum value as a string.
40074            ///
40075            /// Returns `None` if the enum contains an unknown value deserialized from
40076            /// the integer representation of enums.
40077            pub fn name(&self) -> std::option::Option<&str> {
40078                match self {
40079                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
40080                    Self::Ready => std::option::Option::Some("READY"),
40081                    Self::Error => std::option::Option::Some("ERROR"),
40082                    Self::UnknownValue(u) => u.0.name(),
40083                }
40084            }
40085        }
40086
40087        impl std::default::Default for State {
40088            fn default() -> Self {
40089                use std::convert::From;
40090                Self::from(0)
40091            }
40092        }
40093
40094        impl std::fmt::Display for State {
40095            fn fmt(
40096                &self,
40097                f: &mut std::fmt::Formatter<'_>,
40098            ) -> std::result::Result<(), std::fmt::Error> {
40099                wkt::internal::display_enum(f, self.name(), self.value())
40100            }
40101        }
40102
40103        impl std::convert::From<i32> for State {
40104            fn from(value: i32) -> Self {
40105                match value {
40106                    0 => Self::Unspecified,
40107                    1 => Self::Ready,
40108                    2 => Self::Error,
40109                    _ => Self::UnknownValue(state::UnknownValue(
40110                        wkt::internal::UnknownEnumValue::Integer(value),
40111                    )),
40112                }
40113            }
40114        }
40115
40116        impl std::convert::From<&str> for State {
40117            fn from(value: &str) -> Self {
40118                use std::string::ToString;
40119                match value {
40120                    "STATE_UNSPECIFIED" => Self::Unspecified,
40121                    "READY" => Self::Ready,
40122                    "ERROR" => Self::Error,
40123                    _ => Self::UnknownValue(state::UnknownValue(
40124                        wkt::internal::UnknownEnumValue::String(value.to_string()),
40125                    )),
40126                }
40127            }
40128        }
40129
40130        impl serde::ser::Serialize for State {
40131            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
40132            where
40133                S: serde::Serializer,
40134            {
40135                match self {
40136                    Self::Unspecified => serializer.serialize_i32(0),
40137                    Self::Ready => serializer.serialize_i32(1),
40138                    Self::Error => serializer.serialize_i32(2),
40139                    Self::UnknownValue(u) => u.0.serialize(serializer),
40140                }
40141            }
40142        }
40143
40144        impl<'de> serde::de::Deserialize<'de> for State {
40145            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
40146            where
40147                D: serde::Deserializer<'de>,
40148            {
40149                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
40150                    ".google.cloud.dataplex.v1.Asset.ResourceStatus.State",
40151                ))
40152            }
40153        }
40154    }
40155
40156    /// Status of discovery for an asset.
40157    #[derive(Clone, Default, PartialEq)]
40158    #[non_exhaustive]
40159    pub struct DiscoveryStatus {
40160        /// The current status of the discovery feature.
40161        pub state: crate::model::asset::discovery_status::State,
40162
40163        /// Additional information about the current state.
40164        pub message: std::string::String,
40165
40166        /// Last update time of the status.
40167        pub update_time: std::option::Option<wkt::Timestamp>,
40168
40169        /// The start time of the last discovery run.
40170        pub last_run_time: std::option::Option<wkt::Timestamp>,
40171
40172        /// Data Stats of the asset reported by discovery.
40173        pub stats: std::option::Option<crate::model::asset::discovery_status::Stats>,
40174
40175        /// The duration of the last discovery run.
40176        pub last_run_duration: std::option::Option<wkt::Duration>,
40177
40178        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40179    }
40180
40181    impl DiscoveryStatus {
40182        pub fn new() -> Self {
40183            std::default::Default::default()
40184        }
40185
40186        /// Sets the value of [state][crate::model::asset::DiscoveryStatus::state].
40187        ///
40188        /// # Example
40189        /// ```ignore,no_run
40190        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40191        /// use google_cloud_dataplex_v1::model::asset::discovery_status::State;
40192        /// let x0 = DiscoveryStatus::new().set_state(State::Scheduled);
40193        /// let x1 = DiscoveryStatus::new().set_state(State::InProgress);
40194        /// let x2 = DiscoveryStatus::new().set_state(State::Paused);
40195        /// ```
40196        pub fn set_state<T: std::convert::Into<crate::model::asset::discovery_status::State>>(
40197            mut self,
40198            v: T,
40199        ) -> Self {
40200            self.state = v.into();
40201            self
40202        }
40203
40204        /// Sets the value of [message][crate::model::asset::DiscoveryStatus::message].
40205        ///
40206        /// # Example
40207        /// ```ignore,no_run
40208        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40209        /// let x = DiscoveryStatus::new().set_message("example");
40210        /// ```
40211        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40212            self.message = v.into();
40213            self
40214        }
40215
40216        /// Sets the value of [update_time][crate::model::asset::DiscoveryStatus::update_time].
40217        ///
40218        /// # Example
40219        /// ```ignore,no_run
40220        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40221        /// use wkt::Timestamp;
40222        /// let x = DiscoveryStatus::new().set_update_time(Timestamp::default()/* use setters */);
40223        /// ```
40224        pub fn set_update_time<T>(mut self, v: T) -> Self
40225        where
40226            T: std::convert::Into<wkt::Timestamp>,
40227        {
40228            self.update_time = std::option::Option::Some(v.into());
40229            self
40230        }
40231
40232        /// Sets or clears the value of [update_time][crate::model::asset::DiscoveryStatus::update_time].
40233        ///
40234        /// # Example
40235        /// ```ignore,no_run
40236        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40237        /// use wkt::Timestamp;
40238        /// let x = DiscoveryStatus::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
40239        /// let x = DiscoveryStatus::new().set_or_clear_update_time(None::<Timestamp>);
40240        /// ```
40241        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
40242        where
40243            T: std::convert::Into<wkt::Timestamp>,
40244        {
40245            self.update_time = v.map(|x| x.into());
40246            self
40247        }
40248
40249        /// Sets the value of [last_run_time][crate::model::asset::DiscoveryStatus::last_run_time].
40250        ///
40251        /// # Example
40252        /// ```ignore,no_run
40253        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40254        /// use wkt::Timestamp;
40255        /// let x = DiscoveryStatus::new().set_last_run_time(Timestamp::default()/* use setters */);
40256        /// ```
40257        pub fn set_last_run_time<T>(mut self, v: T) -> Self
40258        where
40259            T: std::convert::Into<wkt::Timestamp>,
40260        {
40261            self.last_run_time = std::option::Option::Some(v.into());
40262            self
40263        }
40264
40265        /// Sets or clears the value of [last_run_time][crate::model::asset::DiscoveryStatus::last_run_time].
40266        ///
40267        /// # Example
40268        /// ```ignore,no_run
40269        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40270        /// use wkt::Timestamp;
40271        /// let x = DiscoveryStatus::new().set_or_clear_last_run_time(Some(Timestamp::default()/* use setters */));
40272        /// let x = DiscoveryStatus::new().set_or_clear_last_run_time(None::<Timestamp>);
40273        /// ```
40274        pub fn set_or_clear_last_run_time<T>(mut self, v: std::option::Option<T>) -> Self
40275        where
40276            T: std::convert::Into<wkt::Timestamp>,
40277        {
40278            self.last_run_time = v.map(|x| x.into());
40279            self
40280        }
40281
40282        /// Sets the value of [stats][crate::model::asset::DiscoveryStatus::stats].
40283        ///
40284        /// # Example
40285        /// ```ignore,no_run
40286        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40287        /// use google_cloud_dataplex_v1::model::asset::discovery_status::Stats;
40288        /// let x = DiscoveryStatus::new().set_stats(Stats::default()/* use setters */);
40289        /// ```
40290        pub fn set_stats<T>(mut self, v: T) -> Self
40291        where
40292            T: std::convert::Into<crate::model::asset::discovery_status::Stats>,
40293        {
40294            self.stats = std::option::Option::Some(v.into());
40295            self
40296        }
40297
40298        /// Sets or clears the value of [stats][crate::model::asset::DiscoveryStatus::stats].
40299        ///
40300        /// # Example
40301        /// ```ignore,no_run
40302        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40303        /// use google_cloud_dataplex_v1::model::asset::discovery_status::Stats;
40304        /// let x = DiscoveryStatus::new().set_or_clear_stats(Some(Stats::default()/* use setters */));
40305        /// let x = DiscoveryStatus::new().set_or_clear_stats(None::<Stats>);
40306        /// ```
40307        pub fn set_or_clear_stats<T>(mut self, v: std::option::Option<T>) -> Self
40308        where
40309            T: std::convert::Into<crate::model::asset::discovery_status::Stats>,
40310        {
40311            self.stats = v.map(|x| x.into());
40312            self
40313        }
40314
40315        /// Sets the value of [last_run_duration][crate::model::asset::DiscoveryStatus::last_run_duration].
40316        ///
40317        /// # Example
40318        /// ```ignore,no_run
40319        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40320        /// use wkt::Duration;
40321        /// let x = DiscoveryStatus::new().set_last_run_duration(Duration::default()/* use setters */);
40322        /// ```
40323        pub fn set_last_run_duration<T>(mut self, v: T) -> Self
40324        where
40325            T: std::convert::Into<wkt::Duration>,
40326        {
40327            self.last_run_duration = std::option::Option::Some(v.into());
40328            self
40329        }
40330
40331        /// Sets or clears the value of [last_run_duration][crate::model::asset::DiscoveryStatus::last_run_duration].
40332        ///
40333        /// # Example
40334        /// ```ignore,no_run
40335        /// # use google_cloud_dataplex_v1::model::asset::DiscoveryStatus;
40336        /// use wkt::Duration;
40337        /// let x = DiscoveryStatus::new().set_or_clear_last_run_duration(Some(Duration::default()/* use setters */));
40338        /// let x = DiscoveryStatus::new().set_or_clear_last_run_duration(None::<Duration>);
40339        /// ```
40340        pub fn set_or_clear_last_run_duration<T>(mut self, v: std::option::Option<T>) -> Self
40341        where
40342            T: std::convert::Into<wkt::Duration>,
40343        {
40344            self.last_run_duration = v.map(|x| x.into());
40345            self
40346        }
40347    }
40348
40349    impl wkt::message::Message for DiscoveryStatus {
40350        fn typename() -> &'static str {
40351            "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoveryStatus"
40352        }
40353    }
40354
40355    /// Defines additional types related to [DiscoveryStatus].
40356    pub mod discovery_status {
40357        #[allow(unused_imports)]
40358        use super::*;
40359
40360        /// The aggregated data statistics for the asset reported by discovery.
40361        #[derive(Clone, Default, PartialEq)]
40362        #[non_exhaustive]
40363        pub struct Stats {
40364            /// The count of data items within the referenced resource.
40365            pub data_items: i64,
40366
40367            /// The number of stored data bytes within the referenced resource.
40368            pub data_size: i64,
40369
40370            /// The count of table entities within the referenced resource.
40371            pub tables: i64,
40372
40373            /// The count of fileset entities within the referenced resource.
40374            pub filesets: i64,
40375
40376            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40377        }
40378
40379        impl Stats {
40380            pub fn new() -> Self {
40381                std::default::Default::default()
40382            }
40383
40384            /// Sets the value of [data_items][crate::model::asset::discovery_status::Stats::data_items].
40385            ///
40386            /// # Example
40387            /// ```ignore,no_run
40388            /// # use google_cloud_dataplex_v1::model::asset::discovery_status::Stats;
40389            /// let x = Stats::new().set_data_items(42);
40390            /// ```
40391            pub fn set_data_items<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
40392                self.data_items = v.into();
40393                self
40394            }
40395
40396            /// Sets the value of [data_size][crate::model::asset::discovery_status::Stats::data_size].
40397            ///
40398            /// # Example
40399            /// ```ignore,no_run
40400            /// # use google_cloud_dataplex_v1::model::asset::discovery_status::Stats;
40401            /// let x = Stats::new().set_data_size(42);
40402            /// ```
40403            pub fn set_data_size<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
40404                self.data_size = v.into();
40405                self
40406            }
40407
40408            /// Sets the value of [tables][crate::model::asset::discovery_status::Stats::tables].
40409            ///
40410            /// # Example
40411            /// ```ignore,no_run
40412            /// # use google_cloud_dataplex_v1::model::asset::discovery_status::Stats;
40413            /// let x = Stats::new().set_tables(42);
40414            /// ```
40415            pub fn set_tables<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
40416                self.tables = v.into();
40417                self
40418            }
40419
40420            /// Sets the value of [filesets][crate::model::asset::discovery_status::Stats::filesets].
40421            ///
40422            /// # Example
40423            /// ```ignore,no_run
40424            /// # use google_cloud_dataplex_v1::model::asset::discovery_status::Stats;
40425            /// let x = Stats::new().set_filesets(42);
40426            /// ```
40427            pub fn set_filesets<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
40428                self.filesets = v.into();
40429                self
40430            }
40431        }
40432
40433        impl wkt::message::Message for Stats {
40434            fn typename() -> &'static str {
40435                "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats"
40436            }
40437        }
40438
40439        /// Current state of discovery.
40440        ///
40441        /// # Working with unknown values
40442        ///
40443        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
40444        /// additional enum variants at any time. Adding new variants is not considered
40445        /// a breaking change. Applications should write their code in anticipation of:
40446        ///
40447        /// - New values appearing in future releases of the client library, **and**
40448        /// - New values received dynamically, without application changes.
40449        ///
40450        /// Please consult the [Working with enums] section in the user guide for some
40451        /// guidelines.
40452        ///
40453        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
40454        #[derive(Clone, Debug, PartialEq)]
40455        #[non_exhaustive]
40456        pub enum State {
40457            /// State is unspecified.
40458            Unspecified,
40459            /// Discovery for the asset is scheduled.
40460            Scheduled,
40461            /// Discovery for the asset is running.
40462            InProgress,
40463            /// Discovery for the asset is currently paused (e.g. due to a lack
40464            /// of available resources). It will be automatically resumed.
40465            Paused,
40466            /// Discovery for the asset is disabled.
40467            Disabled,
40468            /// If set, the enum was initialized with an unknown value.
40469            ///
40470            /// Applications can examine the value using [State::value] or
40471            /// [State::name].
40472            UnknownValue(state::UnknownValue),
40473        }
40474
40475        #[doc(hidden)]
40476        pub mod state {
40477            #[allow(unused_imports)]
40478            use super::*;
40479            #[derive(Clone, Debug, PartialEq)]
40480            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
40481        }
40482
40483        impl State {
40484            /// Gets the enum value.
40485            ///
40486            /// Returns `None` if the enum contains an unknown value deserialized from
40487            /// the string representation of enums.
40488            pub fn value(&self) -> std::option::Option<i32> {
40489                match self {
40490                    Self::Unspecified => std::option::Option::Some(0),
40491                    Self::Scheduled => std::option::Option::Some(1),
40492                    Self::InProgress => std::option::Option::Some(2),
40493                    Self::Paused => std::option::Option::Some(3),
40494                    Self::Disabled => std::option::Option::Some(5),
40495                    Self::UnknownValue(u) => u.0.value(),
40496                }
40497            }
40498
40499            /// Gets the enum value as a string.
40500            ///
40501            /// Returns `None` if the enum contains an unknown value deserialized from
40502            /// the integer representation of enums.
40503            pub fn name(&self) -> std::option::Option<&str> {
40504                match self {
40505                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
40506                    Self::Scheduled => std::option::Option::Some("SCHEDULED"),
40507                    Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
40508                    Self::Paused => std::option::Option::Some("PAUSED"),
40509                    Self::Disabled => std::option::Option::Some("DISABLED"),
40510                    Self::UnknownValue(u) => u.0.name(),
40511                }
40512            }
40513        }
40514
40515        impl std::default::Default for State {
40516            fn default() -> Self {
40517                use std::convert::From;
40518                Self::from(0)
40519            }
40520        }
40521
40522        impl std::fmt::Display for State {
40523            fn fmt(
40524                &self,
40525                f: &mut std::fmt::Formatter<'_>,
40526            ) -> std::result::Result<(), std::fmt::Error> {
40527                wkt::internal::display_enum(f, self.name(), self.value())
40528            }
40529        }
40530
40531        impl std::convert::From<i32> for State {
40532            fn from(value: i32) -> Self {
40533                match value {
40534                    0 => Self::Unspecified,
40535                    1 => Self::Scheduled,
40536                    2 => Self::InProgress,
40537                    3 => Self::Paused,
40538                    5 => Self::Disabled,
40539                    _ => Self::UnknownValue(state::UnknownValue(
40540                        wkt::internal::UnknownEnumValue::Integer(value),
40541                    )),
40542                }
40543            }
40544        }
40545
40546        impl std::convert::From<&str> for State {
40547            fn from(value: &str) -> Self {
40548                use std::string::ToString;
40549                match value {
40550                    "STATE_UNSPECIFIED" => Self::Unspecified,
40551                    "SCHEDULED" => Self::Scheduled,
40552                    "IN_PROGRESS" => Self::InProgress,
40553                    "PAUSED" => Self::Paused,
40554                    "DISABLED" => Self::Disabled,
40555                    _ => Self::UnknownValue(state::UnknownValue(
40556                        wkt::internal::UnknownEnumValue::String(value.to_string()),
40557                    )),
40558                }
40559            }
40560        }
40561
40562        impl serde::ser::Serialize for State {
40563            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
40564            where
40565                S: serde::Serializer,
40566            {
40567                match self {
40568                    Self::Unspecified => serializer.serialize_i32(0),
40569                    Self::Scheduled => serializer.serialize_i32(1),
40570                    Self::InProgress => serializer.serialize_i32(2),
40571                    Self::Paused => serializer.serialize_i32(3),
40572                    Self::Disabled => serializer.serialize_i32(5),
40573                    Self::UnknownValue(u) => u.0.serialize(serializer),
40574                }
40575            }
40576        }
40577
40578        impl<'de> serde::de::Deserialize<'de> for State {
40579            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
40580            where
40581                D: serde::Deserializer<'de>,
40582            {
40583                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
40584                    ".google.cloud.dataplex.v1.Asset.DiscoveryStatus.State",
40585                ))
40586            }
40587        }
40588    }
40589}
40590
40591/// ResourceAccessSpec holds the access control configuration to be enforced
40592/// on the resources, for example, Cloud Storage bucket, BigQuery dataset,
40593/// BigQuery table.
40594#[derive(Clone, Default, PartialEq)]
40595#[non_exhaustive]
40596pub struct ResourceAccessSpec {
40597    /// Optional. The format of strings follows the pattern followed by IAM in the
40598    /// bindings. user:{email}, serviceAccount:{email} group:{email}.
40599    /// The set of principals to be granted reader role on the resource.
40600    pub readers: std::vec::Vec<std::string::String>,
40601
40602    /// Optional. The set of principals to be granted writer role on the resource.
40603    pub writers: std::vec::Vec<std::string::String>,
40604
40605    /// Optional. The set of principals to be granted owner role on the resource.
40606    pub owners: std::vec::Vec<std::string::String>,
40607
40608    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40609}
40610
40611impl ResourceAccessSpec {
40612    pub fn new() -> Self {
40613        std::default::Default::default()
40614    }
40615
40616    /// Sets the value of [readers][crate::model::ResourceAccessSpec::readers].
40617    ///
40618    /// # Example
40619    /// ```ignore,no_run
40620    /// # use google_cloud_dataplex_v1::model::ResourceAccessSpec;
40621    /// let x = ResourceAccessSpec::new().set_readers(["a", "b", "c"]);
40622    /// ```
40623    pub fn set_readers<T, V>(mut self, v: T) -> Self
40624    where
40625        T: std::iter::IntoIterator<Item = V>,
40626        V: std::convert::Into<std::string::String>,
40627    {
40628        use std::iter::Iterator;
40629        self.readers = v.into_iter().map(|i| i.into()).collect();
40630        self
40631    }
40632
40633    /// Sets the value of [writers][crate::model::ResourceAccessSpec::writers].
40634    ///
40635    /// # Example
40636    /// ```ignore,no_run
40637    /// # use google_cloud_dataplex_v1::model::ResourceAccessSpec;
40638    /// let x = ResourceAccessSpec::new().set_writers(["a", "b", "c"]);
40639    /// ```
40640    pub fn set_writers<T, V>(mut self, v: T) -> Self
40641    where
40642        T: std::iter::IntoIterator<Item = V>,
40643        V: std::convert::Into<std::string::String>,
40644    {
40645        use std::iter::Iterator;
40646        self.writers = v.into_iter().map(|i| i.into()).collect();
40647        self
40648    }
40649
40650    /// Sets the value of [owners][crate::model::ResourceAccessSpec::owners].
40651    ///
40652    /// # Example
40653    /// ```ignore,no_run
40654    /// # use google_cloud_dataplex_v1::model::ResourceAccessSpec;
40655    /// let x = ResourceAccessSpec::new().set_owners(["a", "b", "c"]);
40656    /// ```
40657    pub fn set_owners<T, V>(mut self, v: T) -> Self
40658    where
40659        T: std::iter::IntoIterator<Item = V>,
40660        V: std::convert::Into<std::string::String>,
40661    {
40662        use std::iter::Iterator;
40663        self.owners = v.into_iter().map(|i| i.into()).collect();
40664        self
40665    }
40666}
40667
40668impl wkt::message::Message for ResourceAccessSpec {
40669    fn typename() -> &'static str {
40670        "type.googleapis.com/google.cloud.dataplex.v1.ResourceAccessSpec"
40671    }
40672}
40673
40674/// DataAccessSpec holds the access control configuration to be enforced on data
40675/// stored within resources (eg: rows, columns in BigQuery Tables). When
40676/// associated with data, the data is only accessible to
40677/// principals explicitly granted access through the DataAccessSpec. Principals
40678/// with access to the containing resource are not implicitly granted access.
40679#[derive(Clone, Default, PartialEq)]
40680#[non_exhaustive]
40681pub struct DataAccessSpec {
40682    /// Optional. The format of strings follows the pattern followed by IAM in the
40683    /// bindings. user:{email}, serviceAccount:{email} group:{email}.
40684    /// The set of principals to be granted reader role on data
40685    /// stored within resources.
40686    pub readers: std::vec::Vec<std::string::String>,
40687
40688    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40689}
40690
40691impl DataAccessSpec {
40692    pub fn new() -> Self {
40693        std::default::Default::default()
40694    }
40695
40696    /// Sets the value of [readers][crate::model::DataAccessSpec::readers].
40697    ///
40698    /// # Example
40699    /// ```ignore,no_run
40700    /// # use google_cloud_dataplex_v1::model::DataAccessSpec;
40701    /// let x = DataAccessSpec::new().set_readers(["a", "b", "c"]);
40702    /// ```
40703    pub fn set_readers<T, V>(mut self, v: T) -> Self
40704    where
40705        T: std::iter::IntoIterator<Item = V>,
40706        V: std::convert::Into<std::string::String>,
40707    {
40708        use std::iter::Iterator;
40709        self.readers = v.into_iter().map(|i| i.into()).collect();
40710        self
40711    }
40712}
40713
40714impl wkt::message::Message for DataAccessSpec {
40715    fn typename() -> &'static str {
40716        "type.googleapis.com/google.cloud.dataplex.v1.DataAccessSpec"
40717    }
40718}
40719
40720/// Create lake request.
40721#[derive(Clone, Default, PartialEq)]
40722#[non_exhaustive]
40723pub struct CreateLakeRequest {
40724    /// Required. The resource name of the lake location, of the form:
40725    /// projects/{project_number}/locations/{location_id}
40726    /// where `location_id` refers to a Google Cloud region.
40727    pub parent: std::string::String,
40728
40729    /// Required. Lake identifier.
40730    /// This ID will be used to generate names such as database and dataset names
40731    /// when publishing metadata to Hive Metastore and BigQuery.
40732    ///
40733    /// * Must contain only lowercase letters, numbers and hyphens.
40734    /// * Must start with a letter.
40735    /// * Must end with a number or a letter.
40736    /// * Must be between 1-63 characters.
40737    /// * Must be unique within the customer project / location.
40738    pub lake_id: std::string::String,
40739
40740    /// Required. Lake resource
40741    pub lake: std::option::Option<crate::model::Lake>,
40742
40743    /// Optional. Only validate the request, but do not perform mutations.
40744    /// The default is false.
40745    pub validate_only: bool,
40746
40747    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40748}
40749
40750impl CreateLakeRequest {
40751    pub fn new() -> Self {
40752        std::default::Default::default()
40753    }
40754
40755    /// Sets the value of [parent][crate::model::CreateLakeRequest::parent].
40756    ///
40757    /// # Example
40758    /// ```ignore,no_run
40759    /// # use google_cloud_dataplex_v1::model::CreateLakeRequest;
40760    /// let x = CreateLakeRequest::new().set_parent("example");
40761    /// ```
40762    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40763        self.parent = v.into();
40764        self
40765    }
40766
40767    /// Sets the value of [lake_id][crate::model::CreateLakeRequest::lake_id].
40768    ///
40769    /// # Example
40770    /// ```ignore,no_run
40771    /// # use google_cloud_dataplex_v1::model::CreateLakeRequest;
40772    /// let x = CreateLakeRequest::new().set_lake_id("example");
40773    /// ```
40774    pub fn set_lake_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40775        self.lake_id = v.into();
40776        self
40777    }
40778
40779    /// Sets the value of [lake][crate::model::CreateLakeRequest::lake].
40780    ///
40781    /// # Example
40782    /// ```ignore,no_run
40783    /// # use google_cloud_dataplex_v1::model::CreateLakeRequest;
40784    /// use google_cloud_dataplex_v1::model::Lake;
40785    /// let x = CreateLakeRequest::new().set_lake(Lake::default()/* use setters */);
40786    /// ```
40787    pub fn set_lake<T>(mut self, v: T) -> Self
40788    where
40789        T: std::convert::Into<crate::model::Lake>,
40790    {
40791        self.lake = std::option::Option::Some(v.into());
40792        self
40793    }
40794
40795    /// Sets or clears the value of [lake][crate::model::CreateLakeRequest::lake].
40796    ///
40797    /// # Example
40798    /// ```ignore,no_run
40799    /// # use google_cloud_dataplex_v1::model::CreateLakeRequest;
40800    /// use google_cloud_dataplex_v1::model::Lake;
40801    /// let x = CreateLakeRequest::new().set_or_clear_lake(Some(Lake::default()/* use setters */));
40802    /// let x = CreateLakeRequest::new().set_or_clear_lake(None::<Lake>);
40803    /// ```
40804    pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
40805    where
40806        T: std::convert::Into<crate::model::Lake>,
40807    {
40808        self.lake = v.map(|x| x.into());
40809        self
40810    }
40811
40812    /// Sets the value of [validate_only][crate::model::CreateLakeRequest::validate_only].
40813    ///
40814    /// # Example
40815    /// ```ignore,no_run
40816    /// # use google_cloud_dataplex_v1::model::CreateLakeRequest;
40817    /// let x = CreateLakeRequest::new().set_validate_only(true);
40818    /// ```
40819    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
40820        self.validate_only = v.into();
40821        self
40822    }
40823}
40824
40825impl wkt::message::Message for CreateLakeRequest {
40826    fn typename() -> &'static str {
40827        "type.googleapis.com/google.cloud.dataplex.v1.CreateLakeRequest"
40828    }
40829}
40830
40831/// Update lake request.
40832#[derive(Clone, Default, PartialEq)]
40833#[non_exhaustive]
40834pub struct UpdateLakeRequest {
40835    /// Required. Mask of fields to update.
40836    pub update_mask: std::option::Option<wkt::FieldMask>,
40837
40838    /// Required. Update description.
40839    /// Only fields specified in `update_mask` are updated.
40840    pub lake: std::option::Option<crate::model::Lake>,
40841
40842    /// Optional. Only validate the request, but do not perform mutations.
40843    /// The default is false.
40844    pub validate_only: bool,
40845
40846    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40847}
40848
40849impl UpdateLakeRequest {
40850    pub fn new() -> Self {
40851        std::default::Default::default()
40852    }
40853
40854    /// Sets the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
40855    ///
40856    /// # Example
40857    /// ```ignore,no_run
40858    /// # use google_cloud_dataplex_v1::model::UpdateLakeRequest;
40859    /// use wkt::FieldMask;
40860    /// let x = UpdateLakeRequest::new().set_update_mask(FieldMask::default()/* use setters */);
40861    /// ```
40862    pub fn set_update_mask<T>(mut self, v: T) -> Self
40863    where
40864        T: std::convert::Into<wkt::FieldMask>,
40865    {
40866        self.update_mask = std::option::Option::Some(v.into());
40867        self
40868    }
40869
40870    /// Sets or clears the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
40871    ///
40872    /// # Example
40873    /// ```ignore,no_run
40874    /// # use google_cloud_dataplex_v1::model::UpdateLakeRequest;
40875    /// use wkt::FieldMask;
40876    /// let x = UpdateLakeRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
40877    /// let x = UpdateLakeRequest::new().set_or_clear_update_mask(None::<FieldMask>);
40878    /// ```
40879    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
40880    where
40881        T: std::convert::Into<wkt::FieldMask>,
40882    {
40883        self.update_mask = v.map(|x| x.into());
40884        self
40885    }
40886
40887    /// Sets the value of [lake][crate::model::UpdateLakeRequest::lake].
40888    ///
40889    /// # Example
40890    /// ```ignore,no_run
40891    /// # use google_cloud_dataplex_v1::model::UpdateLakeRequest;
40892    /// use google_cloud_dataplex_v1::model::Lake;
40893    /// let x = UpdateLakeRequest::new().set_lake(Lake::default()/* use setters */);
40894    /// ```
40895    pub fn set_lake<T>(mut self, v: T) -> Self
40896    where
40897        T: std::convert::Into<crate::model::Lake>,
40898    {
40899        self.lake = std::option::Option::Some(v.into());
40900        self
40901    }
40902
40903    /// Sets or clears the value of [lake][crate::model::UpdateLakeRequest::lake].
40904    ///
40905    /// # Example
40906    /// ```ignore,no_run
40907    /// # use google_cloud_dataplex_v1::model::UpdateLakeRequest;
40908    /// use google_cloud_dataplex_v1::model::Lake;
40909    /// let x = UpdateLakeRequest::new().set_or_clear_lake(Some(Lake::default()/* use setters */));
40910    /// let x = UpdateLakeRequest::new().set_or_clear_lake(None::<Lake>);
40911    /// ```
40912    pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
40913    where
40914        T: std::convert::Into<crate::model::Lake>,
40915    {
40916        self.lake = v.map(|x| x.into());
40917        self
40918    }
40919
40920    /// Sets the value of [validate_only][crate::model::UpdateLakeRequest::validate_only].
40921    ///
40922    /// # Example
40923    /// ```ignore,no_run
40924    /// # use google_cloud_dataplex_v1::model::UpdateLakeRequest;
40925    /// let x = UpdateLakeRequest::new().set_validate_only(true);
40926    /// ```
40927    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
40928        self.validate_only = v.into();
40929        self
40930    }
40931}
40932
40933impl wkt::message::Message for UpdateLakeRequest {
40934    fn typename() -> &'static str {
40935        "type.googleapis.com/google.cloud.dataplex.v1.UpdateLakeRequest"
40936    }
40937}
40938
40939/// Delete lake request.
40940#[derive(Clone, Default, PartialEq)]
40941#[non_exhaustive]
40942pub struct DeleteLakeRequest {
40943    /// Required. The resource name of the lake:
40944    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
40945    pub name: std::string::String,
40946
40947    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40948}
40949
40950impl DeleteLakeRequest {
40951    pub fn new() -> Self {
40952        std::default::Default::default()
40953    }
40954
40955    /// Sets the value of [name][crate::model::DeleteLakeRequest::name].
40956    ///
40957    /// # Example
40958    /// ```ignore,no_run
40959    /// # use google_cloud_dataplex_v1::model::DeleteLakeRequest;
40960    /// let x = DeleteLakeRequest::new().set_name("example");
40961    /// ```
40962    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40963        self.name = v.into();
40964        self
40965    }
40966}
40967
40968impl wkt::message::Message for DeleteLakeRequest {
40969    fn typename() -> &'static str {
40970        "type.googleapis.com/google.cloud.dataplex.v1.DeleteLakeRequest"
40971    }
40972}
40973
40974/// List lakes request.
40975#[derive(Clone, Default, PartialEq)]
40976#[non_exhaustive]
40977pub struct ListLakesRequest {
40978    /// Required. The resource name of the lake location, of the form:
40979    /// `projects/{project_number}/locations/{location_id}`
40980    /// where `location_id` refers to a Google Cloud region.
40981    pub parent: std::string::String,
40982
40983    /// Optional. Maximum number of Lakes to return. The service may return fewer
40984    /// than this value. If unspecified, at most 10 lakes will be returned. The
40985    /// maximum value is 1000; values above 1000 will be coerced to 1000.
40986    pub page_size: i32,
40987
40988    /// Optional. Page token received from a previous `ListLakes` call. Provide
40989    /// this to retrieve the subsequent page. When paginating, all other parameters
40990    /// provided to `ListLakes` must match the call that provided the page token.
40991    pub page_token: std::string::String,
40992
40993    /// Optional. Filter request.
40994    pub filter: std::string::String,
40995
40996    /// Optional. Order by fields for the result.
40997    pub order_by: std::string::String,
40998
40999    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41000}
41001
41002impl ListLakesRequest {
41003    pub fn new() -> Self {
41004        std::default::Default::default()
41005    }
41006
41007    /// Sets the value of [parent][crate::model::ListLakesRequest::parent].
41008    ///
41009    /// # Example
41010    /// ```ignore,no_run
41011    /// # use google_cloud_dataplex_v1::model::ListLakesRequest;
41012    /// let x = ListLakesRequest::new().set_parent("example");
41013    /// ```
41014    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41015        self.parent = v.into();
41016        self
41017    }
41018
41019    /// Sets the value of [page_size][crate::model::ListLakesRequest::page_size].
41020    ///
41021    /// # Example
41022    /// ```ignore,no_run
41023    /// # use google_cloud_dataplex_v1::model::ListLakesRequest;
41024    /// let x = ListLakesRequest::new().set_page_size(42);
41025    /// ```
41026    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
41027        self.page_size = v.into();
41028        self
41029    }
41030
41031    /// Sets the value of [page_token][crate::model::ListLakesRequest::page_token].
41032    ///
41033    /// # Example
41034    /// ```ignore,no_run
41035    /// # use google_cloud_dataplex_v1::model::ListLakesRequest;
41036    /// let x = ListLakesRequest::new().set_page_token("example");
41037    /// ```
41038    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41039        self.page_token = v.into();
41040        self
41041    }
41042
41043    /// Sets the value of [filter][crate::model::ListLakesRequest::filter].
41044    ///
41045    /// # Example
41046    /// ```ignore,no_run
41047    /// # use google_cloud_dataplex_v1::model::ListLakesRequest;
41048    /// let x = ListLakesRequest::new().set_filter("example");
41049    /// ```
41050    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41051        self.filter = v.into();
41052        self
41053    }
41054
41055    /// Sets the value of [order_by][crate::model::ListLakesRequest::order_by].
41056    ///
41057    /// # Example
41058    /// ```ignore,no_run
41059    /// # use google_cloud_dataplex_v1::model::ListLakesRequest;
41060    /// let x = ListLakesRequest::new().set_order_by("example");
41061    /// ```
41062    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41063        self.order_by = v.into();
41064        self
41065    }
41066}
41067
41068impl wkt::message::Message for ListLakesRequest {
41069    fn typename() -> &'static str {
41070        "type.googleapis.com/google.cloud.dataplex.v1.ListLakesRequest"
41071    }
41072}
41073
41074/// List lakes response.
41075#[derive(Clone, Default, PartialEq)]
41076#[non_exhaustive]
41077pub struct ListLakesResponse {
41078    /// Lakes under the given parent location.
41079    pub lakes: std::vec::Vec<crate::model::Lake>,
41080
41081    /// Token to retrieve the next page of results, or empty if there are no more
41082    /// results in the list.
41083    pub next_page_token: std::string::String,
41084
41085    /// Locations that could not be reached.
41086    pub unreachable_locations: std::vec::Vec<std::string::String>,
41087
41088    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41089}
41090
41091impl ListLakesResponse {
41092    pub fn new() -> Self {
41093        std::default::Default::default()
41094    }
41095
41096    /// Sets the value of [lakes][crate::model::ListLakesResponse::lakes].
41097    ///
41098    /// # Example
41099    /// ```ignore,no_run
41100    /// # use google_cloud_dataplex_v1::model::ListLakesResponse;
41101    /// use google_cloud_dataplex_v1::model::Lake;
41102    /// let x = ListLakesResponse::new()
41103    ///     .set_lakes([
41104    ///         Lake::default()/* use setters */,
41105    ///         Lake::default()/* use (different) setters */,
41106    ///     ]);
41107    /// ```
41108    pub fn set_lakes<T, V>(mut self, v: T) -> Self
41109    where
41110        T: std::iter::IntoIterator<Item = V>,
41111        V: std::convert::Into<crate::model::Lake>,
41112    {
41113        use std::iter::Iterator;
41114        self.lakes = v.into_iter().map(|i| i.into()).collect();
41115        self
41116    }
41117
41118    /// Sets the value of [next_page_token][crate::model::ListLakesResponse::next_page_token].
41119    ///
41120    /// # Example
41121    /// ```ignore,no_run
41122    /// # use google_cloud_dataplex_v1::model::ListLakesResponse;
41123    /// let x = ListLakesResponse::new().set_next_page_token("example");
41124    /// ```
41125    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41126        self.next_page_token = v.into();
41127        self
41128    }
41129
41130    /// Sets the value of [unreachable_locations][crate::model::ListLakesResponse::unreachable_locations].
41131    ///
41132    /// # Example
41133    /// ```ignore,no_run
41134    /// # use google_cloud_dataplex_v1::model::ListLakesResponse;
41135    /// let x = ListLakesResponse::new().set_unreachable_locations(["a", "b", "c"]);
41136    /// ```
41137    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
41138    where
41139        T: std::iter::IntoIterator<Item = V>,
41140        V: std::convert::Into<std::string::String>,
41141    {
41142        use std::iter::Iterator;
41143        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
41144        self
41145    }
41146}
41147
41148impl wkt::message::Message for ListLakesResponse {
41149    fn typename() -> &'static str {
41150        "type.googleapis.com/google.cloud.dataplex.v1.ListLakesResponse"
41151    }
41152}
41153
41154#[doc(hidden)]
41155impl google_cloud_gax::paginator::internal::PageableResponse for ListLakesResponse {
41156    type PageItem = crate::model::Lake;
41157
41158    fn items(self) -> std::vec::Vec<Self::PageItem> {
41159        self.lakes
41160    }
41161
41162    fn next_page_token(&self) -> std::string::String {
41163        use std::clone::Clone;
41164        self.next_page_token.clone()
41165    }
41166}
41167
41168/// List lake actions request.
41169#[derive(Clone, Default, PartialEq)]
41170#[non_exhaustive]
41171pub struct ListLakeActionsRequest {
41172    /// Required. The resource name of the parent lake:
41173    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
41174    pub parent: std::string::String,
41175
41176    /// Optional. Maximum number of actions to return. The service may return fewer
41177    /// than this value. If unspecified, at most 10 actions will be returned. The
41178    /// maximum value is 1000; values above 1000 will be coerced to 1000.
41179    pub page_size: i32,
41180
41181    /// Optional. Page token received from a previous `ListLakeActions` call.
41182    /// Provide this to retrieve the subsequent page. When paginating, all other
41183    /// parameters provided to `ListLakeActions` must match the call that provided
41184    /// the page token.
41185    pub page_token: std::string::String,
41186
41187    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41188}
41189
41190impl ListLakeActionsRequest {
41191    pub fn new() -> Self {
41192        std::default::Default::default()
41193    }
41194
41195    /// Sets the value of [parent][crate::model::ListLakeActionsRequest::parent].
41196    ///
41197    /// # Example
41198    /// ```ignore,no_run
41199    /// # use google_cloud_dataplex_v1::model::ListLakeActionsRequest;
41200    /// let x = ListLakeActionsRequest::new().set_parent("example");
41201    /// ```
41202    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41203        self.parent = v.into();
41204        self
41205    }
41206
41207    /// Sets the value of [page_size][crate::model::ListLakeActionsRequest::page_size].
41208    ///
41209    /// # Example
41210    /// ```ignore,no_run
41211    /// # use google_cloud_dataplex_v1::model::ListLakeActionsRequest;
41212    /// let x = ListLakeActionsRequest::new().set_page_size(42);
41213    /// ```
41214    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
41215        self.page_size = v.into();
41216        self
41217    }
41218
41219    /// Sets the value of [page_token][crate::model::ListLakeActionsRequest::page_token].
41220    ///
41221    /// # Example
41222    /// ```ignore,no_run
41223    /// # use google_cloud_dataplex_v1::model::ListLakeActionsRequest;
41224    /// let x = ListLakeActionsRequest::new().set_page_token("example");
41225    /// ```
41226    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41227        self.page_token = v.into();
41228        self
41229    }
41230}
41231
41232impl wkt::message::Message for ListLakeActionsRequest {
41233    fn typename() -> &'static str {
41234        "type.googleapis.com/google.cloud.dataplex.v1.ListLakeActionsRequest"
41235    }
41236}
41237
41238/// List actions response.
41239#[derive(Clone, Default, PartialEq)]
41240#[non_exhaustive]
41241pub struct ListActionsResponse {
41242    /// Actions under the given parent lake/zone/asset.
41243    pub actions: std::vec::Vec<crate::model::Action>,
41244
41245    /// Token to retrieve the next page of results, or empty if there are no more
41246    /// results in the list.
41247    pub next_page_token: std::string::String,
41248
41249    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41250}
41251
41252impl ListActionsResponse {
41253    pub fn new() -> Self {
41254        std::default::Default::default()
41255    }
41256
41257    /// Sets the value of [actions][crate::model::ListActionsResponse::actions].
41258    ///
41259    /// # Example
41260    /// ```ignore,no_run
41261    /// # use google_cloud_dataplex_v1::model::ListActionsResponse;
41262    /// use google_cloud_dataplex_v1::model::Action;
41263    /// let x = ListActionsResponse::new()
41264    ///     .set_actions([
41265    ///         Action::default()/* use setters */,
41266    ///         Action::default()/* use (different) setters */,
41267    ///     ]);
41268    /// ```
41269    pub fn set_actions<T, V>(mut self, v: T) -> Self
41270    where
41271        T: std::iter::IntoIterator<Item = V>,
41272        V: std::convert::Into<crate::model::Action>,
41273    {
41274        use std::iter::Iterator;
41275        self.actions = v.into_iter().map(|i| i.into()).collect();
41276        self
41277    }
41278
41279    /// Sets the value of [next_page_token][crate::model::ListActionsResponse::next_page_token].
41280    ///
41281    /// # Example
41282    /// ```ignore,no_run
41283    /// # use google_cloud_dataplex_v1::model::ListActionsResponse;
41284    /// let x = ListActionsResponse::new().set_next_page_token("example");
41285    /// ```
41286    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41287        self.next_page_token = v.into();
41288        self
41289    }
41290}
41291
41292impl wkt::message::Message for ListActionsResponse {
41293    fn typename() -> &'static str {
41294        "type.googleapis.com/google.cloud.dataplex.v1.ListActionsResponse"
41295    }
41296}
41297
41298#[doc(hidden)]
41299impl google_cloud_gax::paginator::internal::PageableResponse for ListActionsResponse {
41300    type PageItem = crate::model::Action;
41301
41302    fn items(self) -> std::vec::Vec<Self::PageItem> {
41303        self.actions
41304    }
41305
41306    fn next_page_token(&self) -> std::string::String {
41307        use std::clone::Clone;
41308        self.next_page_token.clone()
41309    }
41310}
41311
41312/// Get lake request.
41313#[derive(Clone, Default, PartialEq)]
41314#[non_exhaustive]
41315pub struct GetLakeRequest {
41316    /// Required. The resource name of the lake:
41317    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
41318    pub name: std::string::String,
41319
41320    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41321}
41322
41323impl GetLakeRequest {
41324    pub fn new() -> Self {
41325        std::default::Default::default()
41326    }
41327
41328    /// Sets the value of [name][crate::model::GetLakeRequest::name].
41329    ///
41330    /// # Example
41331    /// ```ignore,no_run
41332    /// # use google_cloud_dataplex_v1::model::GetLakeRequest;
41333    /// let x = GetLakeRequest::new().set_name("example");
41334    /// ```
41335    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41336        self.name = v.into();
41337        self
41338    }
41339}
41340
41341impl wkt::message::Message for GetLakeRequest {
41342    fn typename() -> &'static str {
41343        "type.googleapis.com/google.cloud.dataplex.v1.GetLakeRequest"
41344    }
41345}
41346
41347/// Create zone request.
41348#[derive(Clone, Default, PartialEq)]
41349#[non_exhaustive]
41350pub struct CreateZoneRequest {
41351    /// Required. The resource name of the parent lake:
41352    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
41353    pub parent: std::string::String,
41354
41355    /// Required. Zone identifier.
41356    /// This ID will be used to generate names such as database and dataset names
41357    /// when publishing metadata to Hive Metastore and BigQuery.
41358    ///
41359    /// * Must contain only lowercase letters, numbers and hyphens.
41360    /// * Must start with a letter.
41361    /// * Must end with a number or a letter.
41362    /// * Must be between 1-63 characters.
41363    /// * Must be unique across all lakes from all locations in a project.
41364    /// * Must not be one of the reserved IDs (i.e. "default", "global-temp")
41365    pub zone_id: std::string::String,
41366
41367    /// Required. Zone resource.
41368    pub zone: std::option::Option<crate::model::Zone>,
41369
41370    /// Optional. Only validate the request, but do not perform mutations.
41371    /// The default is false.
41372    pub validate_only: bool,
41373
41374    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41375}
41376
41377impl CreateZoneRequest {
41378    pub fn new() -> Self {
41379        std::default::Default::default()
41380    }
41381
41382    /// Sets the value of [parent][crate::model::CreateZoneRequest::parent].
41383    ///
41384    /// # Example
41385    /// ```ignore,no_run
41386    /// # use google_cloud_dataplex_v1::model::CreateZoneRequest;
41387    /// let x = CreateZoneRequest::new().set_parent("example");
41388    /// ```
41389    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41390        self.parent = v.into();
41391        self
41392    }
41393
41394    /// Sets the value of [zone_id][crate::model::CreateZoneRequest::zone_id].
41395    ///
41396    /// # Example
41397    /// ```ignore,no_run
41398    /// # use google_cloud_dataplex_v1::model::CreateZoneRequest;
41399    /// let x = CreateZoneRequest::new().set_zone_id("example");
41400    /// ```
41401    pub fn set_zone_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41402        self.zone_id = v.into();
41403        self
41404    }
41405
41406    /// Sets the value of [zone][crate::model::CreateZoneRequest::zone].
41407    ///
41408    /// # Example
41409    /// ```ignore,no_run
41410    /// # use google_cloud_dataplex_v1::model::CreateZoneRequest;
41411    /// use google_cloud_dataplex_v1::model::Zone;
41412    /// let x = CreateZoneRequest::new().set_zone(Zone::default()/* use setters */);
41413    /// ```
41414    pub fn set_zone<T>(mut self, v: T) -> Self
41415    where
41416        T: std::convert::Into<crate::model::Zone>,
41417    {
41418        self.zone = std::option::Option::Some(v.into());
41419        self
41420    }
41421
41422    /// Sets or clears the value of [zone][crate::model::CreateZoneRequest::zone].
41423    ///
41424    /// # Example
41425    /// ```ignore,no_run
41426    /// # use google_cloud_dataplex_v1::model::CreateZoneRequest;
41427    /// use google_cloud_dataplex_v1::model::Zone;
41428    /// let x = CreateZoneRequest::new().set_or_clear_zone(Some(Zone::default()/* use setters */));
41429    /// let x = CreateZoneRequest::new().set_or_clear_zone(None::<Zone>);
41430    /// ```
41431    pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
41432    where
41433        T: std::convert::Into<crate::model::Zone>,
41434    {
41435        self.zone = v.map(|x| x.into());
41436        self
41437    }
41438
41439    /// Sets the value of [validate_only][crate::model::CreateZoneRequest::validate_only].
41440    ///
41441    /// # Example
41442    /// ```ignore,no_run
41443    /// # use google_cloud_dataplex_v1::model::CreateZoneRequest;
41444    /// let x = CreateZoneRequest::new().set_validate_only(true);
41445    /// ```
41446    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
41447        self.validate_only = v.into();
41448        self
41449    }
41450}
41451
41452impl wkt::message::Message for CreateZoneRequest {
41453    fn typename() -> &'static str {
41454        "type.googleapis.com/google.cloud.dataplex.v1.CreateZoneRequest"
41455    }
41456}
41457
41458/// Update zone request.
41459#[derive(Clone, Default, PartialEq)]
41460#[non_exhaustive]
41461pub struct UpdateZoneRequest {
41462    /// Required. Mask of fields to update.
41463    pub update_mask: std::option::Option<wkt::FieldMask>,
41464
41465    /// Required. Update description.
41466    /// Only fields specified in `update_mask` are updated.
41467    pub zone: std::option::Option<crate::model::Zone>,
41468
41469    /// Optional. Only validate the request, but do not perform mutations.
41470    /// The default is false.
41471    pub validate_only: bool,
41472
41473    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41474}
41475
41476impl UpdateZoneRequest {
41477    pub fn new() -> Self {
41478        std::default::Default::default()
41479    }
41480
41481    /// Sets the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
41482    ///
41483    /// # Example
41484    /// ```ignore,no_run
41485    /// # use google_cloud_dataplex_v1::model::UpdateZoneRequest;
41486    /// use wkt::FieldMask;
41487    /// let x = UpdateZoneRequest::new().set_update_mask(FieldMask::default()/* use setters */);
41488    /// ```
41489    pub fn set_update_mask<T>(mut self, v: T) -> Self
41490    where
41491        T: std::convert::Into<wkt::FieldMask>,
41492    {
41493        self.update_mask = std::option::Option::Some(v.into());
41494        self
41495    }
41496
41497    /// Sets or clears the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
41498    ///
41499    /// # Example
41500    /// ```ignore,no_run
41501    /// # use google_cloud_dataplex_v1::model::UpdateZoneRequest;
41502    /// use wkt::FieldMask;
41503    /// let x = UpdateZoneRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
41504    /// let x = UpdateZoneRequest::new().set_or_clear_update_mask(None::<FieldMask>);
41505    /// ```
41506    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
41507    where
41508        T: std::convert::Into<wkt::FieldMask>,
41509    {
41510        self.update_mask = v.map(|x| x.into());
41511        self
41512    }
41513
41514    /// Sets the value of [zone][crate::model::UpdateZoneRequest::zone].
41515    ///
41516    /// # Example
41517    /// ```ignore,no_run
41518    /// # use google_cloud_dataplex_v1::model::UpdateZoneRequest;
41519    /// use google_cloud_dataplex_v1::model::Zone;
41520    /// let x = UpdateZoneRequest::new().set_zone(Zone::default()/* use setters */);
41521    /// ```
41522    pub fn set_zone<T>(mut self, v: T) -> Self
41523    where
41524        T: std::convert::Into<crate::model::Zone>,
41525    {
41526        self.zone = std::option::Option::Some(v.into());
41527        self
41528    }
41529
41530    /// Sets or clears the value of [zone][crate::model::UpdateZoneRequest::zone].
41531    ///
41532    /// # Example
41533    /// ```ignore,no_run
41534    /// # use google_cloud_dataplex_v1::model::UpdateZoneRequest;
41535    /// use google_cloud_dataplex_v1::model::Zone;
41536    /// let x = UpdateZoneRequest::new().set_or_clear_zone(Some(Zone::default()/* use setters */));
41537    /// let x = UpdateZoneRequest::new().set_or_clear_zone(None::<Zone>);
41538    /// ```
41539    pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
41540    where
41541        T: std::convert::Into<crate::model::Zone>,
41542    {
41543        self.zone = v.map(|x| x.into());
41544        self
41545    }
41546
41547    /// Sets the value of [validate_only][crate::model::UpdateZoneRequest::validate_only].
41548    ///
41549    /// # Example
41550    /// ```ignore,no_run
41551    /// # use google_cloud_dataplex_v1::model::UpdateZoneRequest;
41552    /// let x = UpdateZoneRequest::new().set_validate_only(true);
41553    /// ```
41554    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
41555        self.validate_only = v.into();
41556        self
41557    }
41558}
41559
41560impl wkt::message::Message for UpdateZoneRequest {
41561    fn typename() -> &'static str {
41562        "type.googleapis.com/google.cloud.dataplex.v1.UpdateZoneRequest"
41563    }
41564}
41565
41566/// Delete zone request.
41567#[derive(Clone, Default, PartialEq)]
41568#[non_exhaustive]
41569pub struct DeleteZoneRequest {
41570    /// Required. The resource name of the zone:
41571    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
41572    pub name: std::string::String,
41573
41574    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41575}
41576
41577impl DeleteZoneRequest {
41578    pub fn new() -> Self {
41579        std::default::Default::default()
41580    }
41581
41582    /// Sets the value of [name][crate::model::DeleteZoneRequest::name].
41583    ///
41584    /// # Example
41585    /// ```ignore,no_run
41586    /// # use google_cloud_dataplex_v1::model::DeleteZoneRequest;
41587    /// let x = DeleteZoneRequest::new().set_name("example");
41588    /// ```
41589    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41590        self.name = v.into();
41591        self
41592    }
41593}
41594
41595impl wkt::message::Message for DeleteZoneRequest {
41596    fn typename() -> &'static str {
41597        "type.googleapis.com/google.cloud.dataplex.v1.DeleteZoneRequest"
41598    }
41599}
41600
41601/// List zones request.
41602#[derive(Clone, Default, PartialEq)]
41603#[non_exhaustive]
41604pub struct ListZonesRequest {
41605    /// Required. The resource name of the parent lake:
41606    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
41607    pub parent: std::string::String,
41608
41609    /// Optional. Maximum number of zones to return. The service may return fewer
41610    /// than this value. If unspecified, at most 10 zones will be returned. The
41611    /// maximum value is 1000; values above 1000 will be coerced to 1000.
41612    pub page_size: i32,
41613
41614    /// Optional. Page token received from a previous `ListZones` call. Provide
41615    /// this to retrieve the subsequent page. When paginating, all other parameters
41616    /// provided to `ListZones` must match the call that provided the page token.
41617    pub page_token: std::string::String,
41618
41619    /// Optional. Filter request.
41620    pub filter: std::string::String,
41621
41622    /// Optional. Order by fields for the result.
41623    pub order_by: std::string::String,
41624
41625    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41626}
41627
41628impl ListZonesRequest {
41629    pub fn new() -> Self {
41630        std::default::Default::default()
41631    }
41632
41633    /// Sets the value of [parent][crate::model::ListZonesRequest::parent].
41634    ///
41635    /// # Example
41636    /// ```ignore,no_run
41637    /// # use google_cloud_dataplex_v1::model::ListZonesRequest;
41638    /// let x = ListZonesRequest::new().set_parent("example");
41639    /// ```
41640    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41641        self.parent = v.into();
41642        self
41643    }
41644
41645    /// Sets the value of [page_size][crate::model::ListZonesRequest::page_size].
41646    ///
41647    /// # Example
41648    /// ```ignore,no_run
41649    /// # use google_cloud_dataplex_v1::model::ListZonesRequest;
41650    /// let x = ListZonesRequest::new().set_page_size(42);
41651    /// ```
41652    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
41653        self.page_size = v.into();
41654        self
41655    }
41656
41657    /// Sets the value of [page_token][crate::model::ListZonesRequest::page_token].
41658    ///
41659    /// # Example
41660    /// ```ignore,no_run
41661    /// # use google_cloud_dataplex_v1::model::ListZonesRequest;
41662    /// let x = ListZonesRequest::new().set_page_token("example");
41663    /// ```
41664    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41665        self.page_token = v.into();
41666        self
41667    }
41668
41669    /// Sets the value of [filter][crate::model::ListZonesRequest::filter].
41670    ///
41671    /// # Example
41672    /// ```ignore,no_run
41673    /// # use google_cloud_dataplex_v1::model::ListZonesRequest;
41674    /// let x = ListZonesRequest::new().set_filter("example");
41675    /// ```
41676    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41677        self.filter = v.into();
41678        self
41679    }
41680
41681    /// Sets the value of [order_by][crate::model::ListZonesRequest::order_by].
41682    ///
41683    /// # Example
41684    /// ```ignore,no_run
41685    /// # use google_cloud_dataplex_v1::model::ListZonesRequest;
41686    /// let x = ListZonesRequest::new().set_order_by("example");
41687    /// ```
41688    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41689        self.order_by = v.into();
41690        self
41691    }
41692}
41693
41694impl wkt::message::Message for ListZonesRequest {
41695    fn typename() -> &'static str {
41696        "type.googleapis.com/google.cloud.dataplex.v1.ListZonesRequest"
41697    }
41698}
41699
41700/// List zones response.
41701#[derive(Clone, Default, PartialEq)]
41702#[non_exhaustive]
41703pub struct ListZonesResponse {
41704    /// Zones under the given parent lake.
41705    pub zones: std::vec::Vec<crate::model::Zone>,
41706
41707    /// Token to retrieve the next page of results, or empty if there are no more
41708    /// results in the list.
41709    pub next_page_token: std::string::String,
41710
41711    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41712}
41713
41714impl ListZonesResponse {
41715    pub fn new() -> Self {
41716        std::default::Default::default()
41717    }
41718
41719    /// Sets the value of [zones][crate::model::ListZonesResponse::zones].
41720    ///
41721    /// # Example
41722    /// ```ignore,no_run
41723    /// # use google_cloud_dataplex_v1::model::ListZonesResponse;
41724    /// use google_cloud_dataplex_v1::model::Zone;
41725    /// let x = ListZonesResponse::new()
41726    ///     .set_zones([
41727    ///         Zone::default()/* use setters */,
41728    ///         Zone::default()/* use (different) setters */,
41729    ///     ]);
41730    /// ```
41731    pub fn set_zones<T, V>(mut self, v: T) -> Self
41732    where
41733        T: std::iter::IntoIterator<Item = V>,
41734        V: std::convert::Into<crate::model::Zone>,
41735    {
41736        use std::iter::Iterator;
41737        self.zones = v.into_iter().map(|i| i.into()).collect();
41738        self
41739    }
41740
41741    /// Sets the value of [next_page_token][crate::model::ListZonesResponse::next_page_token].
41742    ///
41743    /// # Example
41744    /// ```ignore,no_run
41745    /// # use google_cloud_dataplex_v1::model::ListZonesResponse;
41746    /// let x = ListZonesResponse::new().set_next_page_token("example");
41747    /// ```
41748    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41749        self.next_page_token = v.into();
41750        self
41751    }
41752}
41753
41754impl wkt::message::Message for ListZonesResponse {
41755    fn typename() -> &'static str {
41756        "type.googleapis.com/google.cloud.dataplex.v1.ListZonesResponse"
41757    }
41758}
41759
41760#[doc(hidden)]
41761impl google_cloud_gax::paginator::internal::PageableResponse for ListZonesResponse {
41762    type PageItem = crate::model::Zone;
41763
41764    fn items(self) -> std::vec::Vec<Self::PageItem> {
41765        self.zones
41766    }
41767
41768    fn next_page_token(&self) -> std::string::String {
41769        use std::clone::Clone;
41770        self.next_page_token.clone()
41771    }
41772}
41773
41774/// List zone actions request.
41775#[derive(Clone, Default, PartialEq)]
41776#[non_exhaustive]
41777pub struct ListZoneActionsRequest {
41778    /// Required. The resource name of the parent zone:
41779    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
41780    pub parent: std::string::String,
41781
41782    /// Optional. Maximum number of actions to return. The service may return fewer
41783    /// than this value. If unspecified, at most 10 actions will be returned. The
41784    /// maximum value is 1000; values above 1000 will be coerced to 1000.
41785    pub page_size: i32,
41786
41787    /// Optional. Page token received from a previous `ListZoneActions` call.
41788    /// Provide this to retrieve the subsequent page. When paginating, all other
41789    /// parameters provided to `ListZoneActions` must match the call that provided
41790    /// the page token.
41791    pub page_token: std::string::String,
41792
41793    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41794}
41795
41796impl ListZoneActionsRequest {
41797    pub fn new() -> Self {
41798        std::default::Default::default()
41799    }
41800
41801    /// Sets the value of [parent][crate::model::ListZoneActionsRequest::parent].
41802    ///
41803    /// # Example
41804    /// ```ignore,no_run
41805    /// # use google_cloud_dataplex_v1::model::ListZoneActionsRequest;
41806    /// let x = ListZoneActionsRequest::new().set_parent("example");
41807    /// ```
41808    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41809        self.parent = v.into();
41810        self
41811    }
41812
41813    /// Sets the value of [page_size][crate::model::ListZoneActionsRequest::page_size].
41814    ///
41815    /// # Example
41816    /// ```ignore,no_run
41817    /// # use google_cloud_dataplex_v1::model::ListZoneActionsRequest;
41818    /// let x = ListZoneActionsRequest::new().set_page_size(42);
41819    /// ```
41820    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
41821        self.page_size = v.into();
41822        self
41823    }
41824
41825    /// Sets the value of [page_token][crate::model::ListZoneActionsRequest::page_token].
41826    ///
41827    /// # Example
41828    /// ```ignore,no_run
41829    /// # use google_cloud_dataplex_v1::model::ListZoneActionsRequest;
41830    /// let x = ListZoneActionsRequest::new().set_page_token("example");
41831    /// ```
41832    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41833        self.page_token = v.into();
41834        self
41835    }
41836}
41837
41838impl wkt::message::Message for ListZoneActionsRequest {
41839    fn typename() -> &'static str {
41840        "type.googleapis.com/google.cloud.dataplex.v1.ListZoneActionsRequest"
41841    }
41842}
41843
41844/// Get zone request.
41845#[derive(Clone, Default, PartialEq)]
41846#[non_exhaustive]
41847pub struct GetZoneRequest {
41848    /// Required. The resource name of the zone:
41849    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
41850    pub name: std::string::String,
41851
41852    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41853}
41854
41855impl GetZoneRequest {
41856    pub fn new() -> Self {
41857        std::default::Default::default()
41858    }
41859
41860    /// Sets the value of [name][crate::model::GetZoneRequest::name].
41861    ///
41862    /// # Example
41863    /// ```ignore,no_run
41864    /// # use google_cloud_dataplex_v1::model::GetZoneRequest;
41865    /// let x = GetZoneRequest::new().set_name("example");
41866    /// ```
41867    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41868        self.name = v.into();
41869        self
41870    }
41871}
41872
41873impl wkt::message::Message for GetZoneRequest {
41874    fn typename() -> &'static str {
41875        "type.googleapis.com/google.cloud.dataplex.v1.GetZoneRequest"
41876    }
41877}
41878
41879/// Create asset request.
41880#[derive(Clone, Default, PartialEq)]
41881#[non_exhaustive]
41882pub struct CreateAssetRequest {
41883    /// Required. The resource name of the parent zone:
41884    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
41885    pub parent: std::string::String,
41886
41887    /// Required. Asset identifier.
41888    /// This ID will be used to generate names such as table names when publishing
41889    /// metadata to Hive Metastore and BigQuery.
41890    ///
41891    /// * Must contain only lowercase letters, numbers and hyphens.
41892    /// * Must start with a letter.
41893    /// * Must end with a number or a letter.
41894    /// * Must be between 1-63 characters.
41895    /// * Must be unique within the zone.
41896    pub asset_id: std::string::String,
41897
41898    /// Required. Asset resource.
41899    pub asset: std::option::Option<crate::model::Asset>,
41900
41901    /// Optional. Only validate the request, but do not perform mutations.
41902    /// The default is false.
41903    pub validate_only: bool,
41904
41905    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41906}
41907
41908impl CreateAssetRequest {
41909    pub fn new() -> Self {
41910        std::default::Default::default()
41911    }
41912
41913    /// Sets the value of [parent][crate::model::CreateAssetRequest::parent].
41914    ///
41915    /// # Example
41916    /// ```ignore,no_run
41917    /// # use google_cloud_dataplex_v1::model::CreateAssetRequest;
41918    /// let x = CreateAssetRequest::new().set_parent("example");
41919    /// ```
41920    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41921        self.parent = v.into();
41922        self
41923    }
41924
41925    /// Sets the value of [asset_id][crate::model::CreateAssetRequest::asset_id].
41926    ///
41927    /// # Example
41928    /// ```ignore,no_run
41929    /// # use google_cloud_dataplex_v1::model::CreateAssetRequest;
41930    /// let x = CreateAssetRequest::new().set_asset_id("example");
41931    /// ```
41932    pub fn set_asset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41933        self.asset_id = v.into();
41934        self
41935    }
41936
41937    /// Sets the value of [asset][crate::model::CreateAssetRequest::asset].
41938    ///
41939    /// # Example
41940    /// ```ignore,no_run
41941    /// # use google_cloud_dataplex_v1::model::CreateAssetRequest;
41942    /// use google_cloud_dataplex_v1::model::Asset;
41943    /// let x = CreateAssetRequest::new().set_asset(Asset::default()/* use setters */);
41944    /// ```
41945    pub fn set_asset<T>(mut self, v: T) -> Self
41946    where
41947        T: std::convert::Into<crate::model::Asset>,
41948    {
41949        self.asset = std::option::Option::Some(v.into());
41950        self
41951    }
41952
41953    /// Sets or clears the value of [asset][crate::model::CreateAssetRequest::asset].
41954    ///
41955    /// # Example
41956    /// ```ignore,no_run
41957    /// # use google_cloud_dataplex_v1::model::CreateAssetRequest;
41958    /// use google_cloud_dataplex_v1::model::Asset;
41959    /// let x = CreateAssetRequest::new().set_or_clear_asset(Some(Asset::default()/* use setters */));
41960    /// let x = CreateAssetRequest::new().set_or_clear_asset(None::<Asset>);
41961    /// ```
41962    pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
41963    where
41964        T: std::convert::Into<crate::model::Asset>,
41965    {
41966        self.asset = v.map(|x| x.into());
41967        self
41968    }
41969
41970    /// Sets the value of [validate_only][crate::model::CreateAssetRequest::validate_only].
41971    ///
41972    /// # Example
41973    /// ```ignore,no_run
41974    /// # use google_cloud_dataplex_v1::model::CreateAssetRequest;
41975    /// let x = CreateAssetRequest::new().set_validate_only(true);
41976    /// ```
41977    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
41978        self.validate_only = v.into();
41979        self
41980    }
41981}
41982
41983impl wkt::message::Message for CreateAssetRequest {
41984    fn typename() -> &'static str {
41985        "type.googleapis.com/google.cloud.dataplex.v1.CreateAssetRequest"
41986    }
41987}
41988
41989/// Update asset request.
41990#[derive(Clone, Default, PartialEq)]
41991#[non_exhaustive]
41992pub struct UpdateAssetRequest {
41993    /// Required. Mask of fields to update.
41994    pub update_mask: std::option::Option<wkt::FieldMask>,
41995
41996    /// Required. Update description.
41997    /// Only fields specified in `update_mask` are updated.
41998    pub asset: std::option::Option<crate::model::Asset>,
41999
42000    /// Optional. Only validate the request, but do not perform mutations.
42001    /// The default is false.
42002    pub validate_only: bool,
42003
42004    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42005}
42006
42007impl UpdateAssetRequest {
42008    pub fn new() -> Self {
42009        std::default::Default::default()
42010    }
42011
42012    /// Sets the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
42013    ///
42014    /// # Example
42015    /// ```ignore,no_run
42016    /// # use google_cloud_dataplex_v1::model::UpdateAssetRequest;
42017    /// use wkt::FieldMask;
42018    /// let x = UpdateAssetRequest::new().set_update_mask(FieldMask::default()/* use setters */);
42019    /// ```
42020    pub fn set_update_mask<T>(mut self, v: T) -> Self
42021    where
42022        T: std::convert::Into<wkt::FieldMask>,
42023    {
42024        self.update_mask = std::option::Option::Some(v.into());
42025        self
42026    }
42027
42028    /// Sets or clears the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
42029    ///
42030    /// # Example
42031    /// ```ignore,no_run
42032    /// # use google_cloud_dataplex_v1::model::UpdateAssetRequest;
42033    /// use wkt::FieldMask;
42034    /// let x = UpdateAssetRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
42035    /// let x = UpdateAssetRequest::new().set_or_clear_update_mask(None::<FieldMask>);
42036    /// ```
42037    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
42038    where
42039        T: std::convert::Into<wkt::FieldMask>,
42040    {
42041        self.update_mask = v.map(|x| x.into());
42042        self
42043    }
42044
42045    /// Sets the value of [asset][crate::model::UpdateAssetRequest::asset].
42046    ///
42047    /// # Example
42048    /// ```ignore,no_run
42049    /// # use google_cloud_dataplex_v1::model::UpdateAssetRequest;
42050    /// use google_cloud_dataplex_v1::model::Asset;
42051    /// let x = UpdateAssetRequest::new().set_asset(Asset::default()/* use setters */);
42052    /// ```
42053    pub fn set_asset<T>(mut self, v: T) -> Self
42054    where
42055        T: std::convert::Into<crate::model::Asset>,
42056    {
42057        self.asset = std::option::Option::Some(v.into());
42058        self
42059    }
42060
42061    /// Sets or clears the value of [asset][crate::model::UpdateAssetRequest::asset].
42062    ///
42063    /// # Example
42064    /// ```ignore,no_run
42065    /// # use google_cloud_dataplex_v1::model::UpdateAssetRequest;
42066    /// use google_cloud_dataplex_v1::model::Asset;
42067    /// let x = UpdateAssetRequest::new().set_or_clear_asset(Some(Asset::default()/* use setters */));
42068    /// let x = UpdateAssetRequest::new().set_or_clear_asset(None::<Asset>);
42069    /// ```
42070    pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
42071    where
42072        T: std::convert::Into<crate::model::Asset>,
42073    {
42074        self.asset = v.map(|x| x.into());
42075        self
42076    }
42077
42078    /// Sets the value of [validate_only][crate::model::UpdateAssetRequest::validate_only].
42079    ///
42080    /// # Example
42081    /// ```ignore,no_run
42082    /// # use google_cloud_dataplex_v1::model::UpdateAssetRequest;
42083    /// let x = UpdateAssetRequest::new().set_validate_only(true);
42084    /// ```
42085    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
42086        self.validate_only = v.into();
42087        self
42088    }
42089}
42090
42091impl wkt::message::Message for UpdateAssetRequest {
42092    fn typename() -> &'static str {
42093        "type.googleapis.com/google.cloud.dataplex.v1.UpdateAssetRequest"
42094    }
42095}
42096
42097/// Delete asset request.
42098#[derive(Clone, Default, PartialEq)]
42099#[non_exhaustive]
42100pub struct DeleteAssetRequest {
42101    /// Required. The resource name of the asset:
42102    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
42103    pub name: std::string::String,
42104
42105    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42106}
42107
42108impl DeleteAssetRequest {
42109    pub fn new() -> Self {
42110        std::default::Default::default()
42111    }
42112
42113    /// Sets the value of [name][crate::model::DeleteAssetRequest::name].
42114    ///
42115    /// # Example
42116    /// ```ignore,no_run
42117    /// # use google_cloud_dataplex_v1::model::DeleteAssetRequest;
42118    /// let x = DeleteAssetRequest::new().set_name("example");
42119    /// ```
42120    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42121        self.name = v.into();
42122        self
42123    }
42124}
42125
42126impl wkt::message::Message for DeleteAssetRequest {
42127    fn typename() -> &'static str {
42128        "type.googleapis.com/google.cloud.dataplex.v1.DeleteAssetRequest"
42129    }
42130}
42131
42132/// List assets request.
42133#[derive(Clone, Default, PartialEq)]
42134#[non_exhaustive]
42135pub struct ListAssetsRequest {
42136    /// Required. The resource name of the parent zone:
42137    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
42138    pub parent: std::string::String,
42139
42140    /// Optional. Maximum number of asset to return. The service may return fewer
42141    /// than this value. If unspecified, at most 10 assets will be returned. The
42142    /// maximum value is 1000; values above 1000 will be coerced to 1000.
42143    pub page_size: i32,
42144
42145    /// Optional. Page token received from a previous `ListAssets` call. Provide
42146    /// this to retrieve the subsequent page. When paginating, all other parameters
42147    /// provided to `ListAssets` must match the call that provided the page
42148    /// token.
42149    pub page_token: std::string::String,
42150
42151    /// Optional. Filter request.
42152    pub filter: std::string::String,
42153
42154    /// Optional. Order by fields for the result.
42155    pub order_by: std::string::String,
42156
42157    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42158}
42159
42160impl ListAssetsRequest {
42161    pub fn new() -> Self {
42162        std::default::Default::default()
42163    }
42164
42165    /// Sets the value of [parent][crate::model::ListAssetsRequest::parent].
42166    ///
42167    /// # Example
42168    /// ```ignore,no_run
42169    /// # use google_cloud_dataplex_v1::model::ListAssetsRequest;
42170    /// let x = ListAssetsRequest::new().set_parent("example");
42171    /// ```
42172    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42173        self.parent = v.into();
42174        self
42175    }
42176
42177    /// Sets the value of [page_size][crate::model::ListAssetsRequest::page_size].
42178    ///
42179    /// # Example
42180    /// ```ignore,no_run
42181    /// # use google_cloud_dataplex_v1::model::ListAssetsRequest;
42182    /// let x = ListAssetsRequest::new().set_page_size(42);
42183    /// ```
42184    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
42185        self.page_size = v.into();
42186        self
42187    }
42188
42189    /// Sets the value of [page_token][crate::model::ListAssetsRequest::page_token].
42190    ///
42191    /// # Example
42192    /// ```ignore,no_run
42193    /// # use google_cloud_dataplex_v1::model::ListAssetsRequest;
42194    /// let x = ListAssetsRequest::new().set_page_token("example");
42195    /// ```
42196    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42197        self.page_token = v.into();
42198        self
42199    }
42200
42201    /// Sets the value of [filter][crate::model::ListAssetsRequest::filter].
42202    ///
42203    /// # Example
42204    /// ```ignore,no_run
42205    /// # use google_cloud_dataplex_v1::model::ListAssetsRequest;
42206    /// let x = ListAssetsRequest::new().set_filter("example");
42207    /// ```
42208    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42209        self.filter = v.into();
42210        self
42211    }
42212
42213    /// Sets the value of [order_by][crate::model::ListAssetsRequest::order_by].
42214    ///
42215    /// # Example
42216    /// ```ignore,no_run
42217    /// # use google_cloud_dataplex_v1::model::ListAssetsRequest;
42218    /// let x = ListAssetsRequest::new().set_order_by("example");
42219    /// ```
42220    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42221        self.order_by = v.into();
42222        self
42223    }
42224}
42225
42226impl wkt::message::Message for ListAssetsRequest {
42227    fn typename() -> &'static str {
42228        "type.googleapis.com/google.cloud.dataplex.v1.ListAssetsRequest"
42229    }
42230}
42231
42232/// List assets response.
42233#[derive(Clone, Default, PartialEq)]
42234#[non_exhaustive]
42235pub struct ListAssetsResponse {
42236    /// Asset under the given parent zone.
42237    pub assets: std::vec::Vec<crate::model::Asset>,
42238
42239    /// Token to retrieve the next page of results, or empty if there are no more
42240    /// results in the list.
42241    pub next_page_token: std::string::String,
42242
42243    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42244}
42245
42246impl ListAssetsResponse {
42247    pub fn new() -> Self {
42248        std::default::Default::default()
42249    }
42250
42251    /// Sets the value of [assets][crate::model::ListAssetsResponse::assets].
42252    ///
42253    /// # Example
42254    /// ```ignore,no_run
42255    /// # use google_cloud_dataplex_v1::model::ListAssetsResponse;
42256    /// use google_cloud_dataplex_v1::model::Asset;
42257    /// let x = ListAssetsResponse::new()
42258    ///     .set_assets([
42259    ///         Asset::default()/* use setters */,
42260    ///         Asset::default()/* use (different) setters */,
42261    ///     ]);
42262    /// ```
42263    pub fn set_assets<T, V>(mut self, v: T) -> Self
42264    where
42265        T: std::iter::IntoIterator<Item = V>,
42266        V: std::convert::Into<crate::model::Asset>,
42267    {
42268        use std::iter::Iterator;
42269        self.assets = v.into_iter().map(|i| i.into()).collect();
42270        self
42271    }
42272
42273    /// Sets the value of [next_page_token][crate::model::ListAssetsResponse::next_page_token].
42274    ///
42275    /// # Example
42276    /// ```ignore,no_run
42277    /// # use google_cloud_dataplex_v1::model::ListAssetsResponse;
42278    /// let x = ListAssetsResponse::new().set_next_page_token("example");
42279    /// ```
42280    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42281        self.next_page_token = v.into();
42282        self
42283    }
42284}
42285
42286impl wkt::message::Message for ListAssetsResponse {
42287    fn typename() -> &'static str {
42288        "type.googleapis.com/google.cloud.dataplex.v1.ListAssetsResponse"
42289    }
42290}
42291
42292#[doc(hidden)]
42293impl google_cloud_gax::paginator::internal::PageableResponse for ListAssetsResponse {
42294    type PageItem = crate::model::Asset;
42295
42296    fn items(self) -> std::vec::Vec<Self::PageItem> {
42297        self.assets
42298    }
42299
42300    fn next_page_token(&self) -> std::string::String {
42301        use std::clone::Clone;
42302        self.next_page_token.clone()
42303    }
42304}
42305
42306/// List asset actions request.
42307#[derive(Clone, Default, PartialEq)]
42308#[non_exhaustive]
42309pub struct ListAssetActionsRequest {
42310    /// Required. The resource name of the parent asset:
42311    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
42312    pub parent: std::string::String,
42313
42314    /// Optional. Maximum number of actions to return. The service may return fewer
42315    /// than this value. If unspecified, at most 10 actions will be returned. The
42316    /// maximum value is 1000; values above 1000 will be coerced to 1000.
42317    pub page_size: i32,
42318
42319    /// Optional. Page token received from a previous `ListAssetActions` call.
42320    /// Provide this to retrieve the subsequent page. When paginating, all other
42321    /// parameters provided to `ListAssetActions` must match the call that provided
42322    /// the page token.
42323    pub page_token: std::string::String,
42324
42325    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42326}
42327
42328impl ListAssetActionsRequest {
42329    pub fn new() -> Self {
42330        std::default::Default::default()
42331    }
42332
42333    /// Sets the value of [parent][crate::model::ListAssetActionsRequest::parent].
42334    ///
42335    /// # Example
42336    /// ```ignore,no_run
42337    /// # use google_cloud_dataplex_v1::model::ListAssetActionsRequest;
42338    /// let x = ListAssetActionsRequest::new().set_parent("example");
42339    /// ```
42340    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42341        self.parent = v.into();
42342        self
42343    }
42344
42345    /// Sets the value of [page_size][crate::model::ListAssetActionsRequest::page_size].
42346    ///
42347    /// # Example
42348    /// ```ignore,no_run
42349    /// # use google_cloud_dataplex_v1::model::ListAssetActionsRequest;
42350    /// let x = ListAssetActionsRequest::new().set_page_size(42);
42351    /// ```
42352    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
42353        self.page_size = v.into();
42354        self
42355    }
42356
42357    /// Sets the value of [page_token][crate::model::ListAssetActionsRequest::page_token].
42358    ///
42359    /// # Example
42360    /// ```ignore,no_run
42361    /// # use google_cloud_dataplex_v1::model::ListAssetActionsRequest;
42362    /// let x = ListAssetActionsRequest::new().set_page_token("example");
42363    /// ```
42364    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42365        self.page_token = v.into();
42366        self
42367    }
42368}
42369
42370impl wkt::message::Message for ListAssetActionsRequest {
42371    fn typename() -> &'static str {
42372        "type.googleapis.com/google.cloud.dataplex.v1.ListAssetActionsRequest"
42373    }
42374}
42375
42376/// Get asset request.
42377#[derive(Clone, Default, PartialEq)]
42378#[non_exhaustive]
42379pub struct GetAssetRequest {
42380    /// Required. The resource name of the asset:
42381    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
42382    pub name: std::string::String,
42383
42384    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42385}
42386
42387impl GetAssetRequest {
42388    pub fn new() -> Self {
42389        std::default::Default::default()
42390    }
42391
42392    /// Sets the value of [name][crate::model::GetAssetRequest::name].
42393    ///
42394    /// # Example
42395    /// ```ignore,no_run
42396    /// # use google_cloud_dataplex_v1::model::GetAssetRequest;
42397    /// let x = GetAssetRequest::new().set_name("example");
42398    /// ```
42399    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42400        self.name = v.into();
42401        self
42402    }
42403}
42404
42405impl wkt::message::Message for GetAssetRequest {
42406    fn typename() -> &'static str {
42407        "type.googleapis.com/google.cloud.dataplex.v1.GetAssetRequest"
42408    }
42409}
42410
42411/// Represents the metadata of a long-running operation.
42412#[derive(Clone, Default, PartialEq)]
42413#[non_exhaustive]
42414pub struct OperationMetadata {
42415    /// Output only. The time the operation was created.
42416    pub create_time: std::option::Option<wkt::Timestamp>,
42417
42418    /// Output only. The time the operation finished running.
42419    pub end_time: std::option::Option<wkt::Timestamp>,
42420
42421    /// Output only. Server-defined resource path for the target of the operation.
42422    pub target: std::string::String,
42423
42424    /// Output only. Name of the verb executed by the operation.
42425    pub verb: std::string::String,
42426
42427    /// Output only. Human-readable status of the operation, if any.
42428    pub status_message: std::string::String,
42429
42430    /// Output only. Identifies whether the user has requested cancellation
42431    /// of the operation. Operations that have successfully been cancelled
42432    /// have [Operation.error][] value with a
42433    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
42434    /// `Code.CANCELLED`.
42435    ///
42436    /// [google.rpc.Status.code]: google_cloud_rpc::model::Status::code
42437    pub requested_cancellation: bool,
42438
42439    /// Output only. API version used to start the operation.
42440    pub api_version: std::string::String,
42441
42442    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42443}
42444
42445impl OperationMetadata {
42446    pub fn new() -> Self {
42447        std::default::Default::default()
42448    }
42449
42450    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
42451    ///
42452    /// # Example
42453    /// ```ignore,no_run
42454    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42455    /// use wkt::Timestamp;
42456    /// let x = OperationMetadata::new().set_create_time(Timestamp::default()/* use setters */);
42457    /// ```
42458    pub fn set_create_time<T>(mut self, v: T) -> Self
42459    where
42460        T: std::convert::Into<wkt::Timestamp>,
42461    {
42462        self.create_time = std::option::Option::Some(v.into());
42463        self
42464    }
42465
42466    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
42467    ///
42468    /// # Example
42469    /// ```ignore,no_run
42470    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42471    /// use wkt::Timestamp;
42472    /// let x = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
42473    /// let x = OperationMetadata::new().set_or_clear_create_time(None::<Timestamp>);
42474    /// ```
42475    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
42476    where
42477        T: std::convert::Into<wkt::Timestamp>,
42478    {
42479        self.create_time = v.map(|x| x.into());
42480        self
42481    }
42482
42483    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
42484    ///
42485    /// # Example
42486    /// ```ignore,no_run
42487    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42488    /// use wkt::Timestamp;
42489    /// let x = OperationMetadata::new().set_end_time(Timestamp::default()/* use setters */);
42490    /// ```
42491    pub fn set_end_time<T>(mut self, v: T) -> Self
42492    where
42493        T: std::convert::Into<wkt::Timestamp>,
42494    {
42495        self.end_time = std::option::Option::Some(v.into());
42496        self
42497    }
42498
42499    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
42500    ///
42501    /// # Example
42502    /// ```ignore,no_run
42503    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42504    /// use wkt::Timestamp;
42505    /// let x = OperationMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
42506    /// let x = OperationMetadata::new().set_or_clear_end_time(None::<Timestamp>);
42507    /// ```
42508    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
42509    where
42510        T: std::convert::Into<wkt::Timestamp>,
42511    {
42512        self.end_time = v.map(|x| x.into());
42513        self
42514    }
42515
42516    /// Sets the value of [target][crate::model::OperationMetadata::target].
42517    ///
42518    /// # Example
42519    /// ```ignore,no_run
42520    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42521    /// let x = OperationMetadata::new().set_target("example");
42522    /// ```
42523    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42524        self.target = v.into();
42525        self
42526    }
42527
42528    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
42529    ///
42530    /// # Example
42531    /// ```ignore,no_run
42532    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42533    /// let x = OperationMetadata::new().set_verb("example");
42534    /// ```
42535    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42536        self.verb = v.into();
42537        self
42538    }
42539
42540    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
42541    ///
42542    /// # Example
42543    /// ```ignore,no_run
42544    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42545    /// let x = OperationMetadata::new().set_status_message("example");
42546    /// ```
42547    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42548        self.status_message = v.into();
42549        self
42550    }
42551
42552    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
42553    ///
42554    /// # Example
42555    /// ```ignore,no_run
42556    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42557    /// let x = OperationMetadata::new().set_requested_cancellation(true);
42558    /// ```
42559    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
42560        self.requested_cancellation = v.into();
42561        self
42562    }
42563
42564    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
42565    ///
42566    /// # Example
42567    /// ```ignore,no_run
42568    /// # use google_cloud_dataplex_v1::model::OperationMetadata;
42569    /// let x = OperationMetadata::new().set_api_version("example");
42570    /// ```
42571    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42572        self.api_version = v.into();
42573        self
42574    }
42575}
42576
42577impl wkt::message::Message for OperationMetadata {
42578    fn typename() -> &'static str {
42579        "type.googleapis.com/google.cloud.dataplex.v1.OperationMetadata"
42580    }
42581}
42582
42583/// Create task request.
42584#[derive(Clone, Default, PartialEq)]
42585#[non_exhaustive]
42586pub struct CreateTaskRequest {
42587    /// Required. The resource name of the parent lake:
42588    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
42589    pub parent: std::string::String,
42590
42591    /// Required. Task identifier.
42592    pub task_id: std::string::String,
42593
42594    /// Required. Task resource.
42595    pub task: std::option::Option<crate::model::Task>,
42596
42597    /// Optional. Only validate the request, but do not perform mutations.
42598    /// The default is false.
42599    pub validate_only: bool,
42600
42601    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42602}
42603
42604impl CreateTaskRequest {
42605    pub fn new() -> Self {
42606        std::default::Default::default()
42607    }
42608
42609    /// Sets the value of [parent][crate::model::CreateTaskRequest::parent].
42610    ///
42611    /// # Example
42612    /// ```ignore,no_run
42613    /// # use google_cloud_dataplex_v1::model::CreateTaskRequest;
42614    /// let x = CreateTaskRequest::new().set_parent("example");
42615    /// ```
42616    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42617        self.parent = v.into();
42618        self
42619    }
42620
42621    /// Sets the value of [task_id][crate::model::CreateTaskRequest::task_id].
42622    ///
42623    /// # Example
42624    /// ```ignore,no_run
42625    /// # use google_cloud_dataplex_v1::model::CreateTaskRequest;
42626    /// let x = CreateTaskRequest::new().set_task_id("example");
42627    /// ```
42628    pub fn set_task_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42629        self.task_id = v.into();
42630        self
42631    }
42632
42633    /// Sets the value of [task][crate::model::CreateTaskRequest::task].
42634    ///
42635    /// # Example
42636    /// ```ignore,no_run
42637    /// # use google_cloud_dataplex_v1::model::CreateTaskRequest;
42638    /// use google_cloud_dataplex_v1::model::Task;
42639    /// let x = CreateTaskRequest::new().set_task(Task::default()/* use setters */);
42640    /// ```
42641    pub fn set_task<T>(mut self, v: T) -> Self
42642    where
42643        T: std::convert::Into<crate::model::Task>,
42644    {
42645        self.task = std::option::Option::Some(v.into());
42646        self
42647    }
42648
42649    /// Sets or clears the value of [task][crate::model::CreateTaskRequest::task].
42650    ///
42651    /// # Example
42652    /// ```ignore,no_run
42653    /// # use google_cloud_dataplex_v1::model::CreateTaskRequest;
42654    /// use google_cloud_dataplex_v1::model::Task;
42655    /// let x = CreateTaskRequest::new().set_or_clear_task(Some(Task::default()/* use setters */));
42656    /// let x = CreateTaskRequest::new().set_or_clear_task(None::<Task>);
42657    /// ```
42658    pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
42659    where
42660        T: std::convert::Into<crate::model::Task>,
42661    {
42662        self.task = v.map(|x| x.into());
42663        self
42664    }
42665
42666    /// Sets the value of [validate_only][crate::model::CreateTaskRequest::validate_only].
42667    ///
42668    /// # Example
42669    /// ```ignore,no_run
42670    /// # use google_cloud_dataplex_v1::model::CreateTaskRequest;
42671    /// let x = CreateTaskRequest::new().set_validate_only(true);
42672    /// ```
42673    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
42674        self.validate_only = v.into();
42675        self
42676    }
42677}
42678
42679impl wkt::message::Message for CreateTaskRequest {
42680    fn typename() -> &'static str {
42681        "type.googleapis.com/google.cloud.dataplex.v1.CreateTaskRequest"
42682    }
42683}
42684
42685/// Update task request.
42686#[derive(Clone, Default, PartialEq)]
42687#[non_exhaustive]
42688pub struct UpdateTaskRequest {
42689    /// Required. Mask of fields to update.
42690    pub update_mask: std::option::Option<wkt::FieldMask>,
42691
42692    /// Required. Update description.
42693    /// Only fields specified in `update_mask` are updated.
42694    pub task: std::option::Option<crate::model::Task>,
42695
42696    /// Optional. Only validate the request, but do not perform mutations.
42697    /// The default is false.
42698    pub validate_only: bool,
42699
42700    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42701}
42702
42703impl UpdateTaskRequest {
42704    pub fn new() -> Self {
42705        std::default::Default::default()
42706    }
42707
42708    /// Sets the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
42709    ///
42710    /// # Example
42711    /// ```ignore,no_run
42712    /// # use google_cloud_dataplex_v1::model::UpdateTaskRequest;
42713    /// use wkt::FieldMask;
42714    /// let x = UpdateTaskRequest::new().set_update_mask(FieldMask::default()/* use setters */);
42715    /// ```
42716    pub fn set_update_mask<T>(mut self, v: T) -> Self
42717    where
42718        T: std::convert::Into<wkt::FieldMask>,
42719    {
42720        self.update_mask = std::option::Option::Some(v.into());
42721        self
42722    }
42723
42724    /// Sets or clears the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
42725    ///
42726    /// # Example
42727    /// ```ignore,no_run
42728    /// # use google_cloud_dataplex_v1::model::UpdateTaskRequest;
42729    /// use wkt::FieldMask;
42730    /// let x = UpdateTaskRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
42731    /// let x = UpdateTaskRequest::new().set_or_clear_update_mask(None::<FieldMask>);
42732    /// ```
42733    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
42734    where
42735        T: std::convert::Into<wkt::FieldMask>,
42736    {
42737        self.update_mask = v.map(|x| x.into());
42738        self
42739    }
42740
42741    /// Sets the value of [task][crate::model::UpdateTaskRequest::task].
42742    ///
42743    /// # Example
42744    /// ```ignore,no_run
42745    /// # use google_cloud_dataplex_v1::model::UpdateTaskRequest;
42746    /// use google_cloud_dataplex_v1::model::Task;
42747    /// let x = UpdateTaskRequest::new().set_task(Task::default()/* use setters */);
42748    /// ```
42749    pub fn set_task<T>(mut self, v: T) -> Self
42750    where
42751        T: std::convert::Into<crate::model::Task>,
42752    {
42753        self.task = std::option::Option::Some(v.into());
42754        self
42755    }
42756
42757    /// Sets or clears the value of [task][crate::model::UpdateTaskRequest::task].
42758    ///
42759    /// # Example
42760    /// ```ignore,no_run
42761    /// # use google_cloud_dataplex_v1::model::UpdateTaskRequest;
42762    /// use google_cloud_dataplex_v1::model::Task;
42763    /// let x = UpdateTaskRequest::new().set_or_clear_task(Some(Task::default()/* use setters */));
42764    /// let x = UpdateTaskRequest::new().set_or_clear_task(None::<Task>);
42765    /// ```
42766    pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
42767    where
42768        T: std::convert::Into<crate::model::Task>,
42769    {
42770        self.task = v.map(|x| x.into());
42771        self
42772    }
42773
42774    /// Sets the value of [validate_only][crate::model::UpdateTaskRequest::validate_only].
42775    ///
42776    /// # Example
42777    /// ```ignore,no_run
42778    /// # use google_cloud_dataplex_v1::model::UpdateTaskRequest;
42779    /// let x = UpdateTaskRequest::new().set_validate_only(true);
42780    /// ```
42781    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
42782        self.validate_only = v.into();
42783        self
42784    }
42785}
42786
42787impl wkt::message::Message for UpdateTaskRequest {
42788    fn typename() -> &'static str {
42789        "type.googleapis.com/google.cloud.dataplex.v1.UpdateTaskRequest"
42790    }
42791}
42792
42793/// Delete task request.
42794#[derive(Clone, Default, PartialEq)]
42795#[non_exhaustive]
42796pub struct DeleteTaskRequest {
42797    /// Required. The resource name of the task:
42798    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`.
42799    pub name: std::string::String,
42800
42801    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42802}
42803
42804impl DeleteTaskRequest {
42805    pub fn new() -> Self {
42806        std::default::Default::default()
42807    }
42808
42809    /// Sets the value of [name][crate::model::DeleteTaskRequest::name].
42810    ///
42811    /// # Example
42812    /// ```ignore,no_run
42813    /// # use google_cloud_dataplex_v1::model::DeleteTaskRequest;
42814    /// let x = DeleteTaskRequest::new().set_name("example");
42815    /// ```
42816    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42817        self.name = v.into();
42818        self
42819    }
42820}
42821
42822impl wkt::message::Message for DeleteTaskRequest {
42823    fn typename() -> &'static str {
42824        "type.googleapis.com/google.cloud.dataplex.v1.DeleteTaskRequest"
42825    }
42826}
42827
42828/// List tasks request.
42829#[derive(Clone, Default, PartialEq)]
42830#[non_exhaustive]
42831pub struct ListTasksRequest {
42832    /// Required. The resource name of the parent lake:
42833    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
42834    pub parent: std::string::String,
42835
42836    /// Optional. Maximum number of tasks to return. The service may return fewer
42837    /// than this value. If unspecified, at most 10 tasks will be returned. The
42838    /// maximum value is 1000; values above 1000 will be coerced to 1000.
42839    pub page_size: i32,
42840
42841    /// Optional. Page token received from a previous `ListZones` call. Provide
42842    /// this to retrieve the subsequent page. When paginating, all other parameters
42843    /// provided to `ListZones` must match the call that provided the page token.
42844    pub page_token: std::string::String,
42845
42846    /// Optional. Filter request.
42847    pub filter: std::string::String,
42848
42849    /// Optional. Order by fields for the result.
42850    pub order_by: std::string::String,
42851
42852    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42853}
42854
42855impl ListTasksRequest {
42856    pub fn new() -> Self {
42857        std::default::Default::default()
42858    }
42859
42860    /// Sets the value of [parent][crate::model::ListTasksRequest::parent].
42861    ///
42862    /// # Example
42863    /// ```ignore,no_run
42864    /// # use google_cloud_dataplex_v1::model::ListTasksRequest;
42865    /// let x = ListTasksRequest::new().set_parent("example");
42866    /// ```
42867    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42868        self.parent = v.into();
42869        self
42870    }
42871
42872    /// Sets the value of [page_size][crate::model::ListTasksRequest::page_size].
42873    ///
42874    /// # Example
42875    /// ```ignore,no_run
42876    /// # use google_cloud_dataplex_v1::model::ListTasksRequest;
42877    /// let x = ListTasksRequest::new().set_page_size(42);
42878    /// ```
42879    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
42880        self.page_size = v.into();
42881        self
42882    }
42883
42884    /// Sets the value of [page_token][crate::model::ListTasksRequest::page_token].
42885    ///
42886    /// # Example
42887    /// ```ignore,no_run
42888    /// # use google_cloud_dataplex_v1::model::ListTasksRequest;
42889    /// let x = ListTasksRequest::new().set_page_token("example");
42890    /// ```
42891    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42892        self.page_token = v.into();
42893        self
42894    }
42895
42896    /// Sets the value of [filter][crate::model::ListTasksRequest::filter].
42897    ///
42898    /// # Example
42899    /// ```ignore,no_run
42900    /// # use google_cloud_dataplex_v1::model::ListTasksRequest;
42901    /// let x = ListTasksRequest::new().set_filter("example");
42902    /// ```
42903    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42904        self.filter = v.into();
42905        self
42906    }
42907
42908    /// Sets the value of [order_by][crate::model::ListTasksRequest::order_by].
42909    ///
42910    /// # Example
42911    /// ```ignore,no_run
42912    /// # use google_cloud_dataplex_v1::model::ListTasksRequest;
42913    /// let x = ListTasksRequest::new().set_order_by("example");
42914    /// ```
42915    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42916        self.order_by = v.into();
42917        self
42918    }
42919}
42920
42921impl wkt::message::Message for ListTasksRequest {
42922    fn typename() -> &'static str {
42923        "type.googleapis.com/google.cloud.dataplex.v1.ListTasksRequest"
42924    }
42925}
42926
42927/// List tasks response.
42928#[derive(Clone, Default, PartialEq)]
42929#[non_exhaustive]
42930pub struct ListTasksResponse {
42931    /// Tasks under the given parent lake.
42932    pub tasks: std::vec::Vec<crate::model::Task>,
42933
42934    /// Token to retrieve the next page of results, or empty if there are no more
42935    /// results in the list.
42936    pub next_page_token: std::string::String,
42937
42938    /// Locations that could not be reached.
42939    pub unreachable_locations: std::vec::Vec<std::string::String>,
42940
42941    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42942}
42943
42944impl ListTasksResponse {
42945    pub fn new() -> Self {
42946        std::default::Default::default()
42947    }
42948
42949    /// Sets the value of [tasks][crate::model::ListTasksResponse::tasks].
42950    ///
42951    /// # Example
42952    /// ```ignore,no_run
42953    /// # use google_cloud_dataplex_v1::model::ListTasksResponse;
42954    /// use google_cloud_dataplex_v1::model::Task;
42955    /// let x = ListTasksResponse::new()
42956    ///     .set_tasks([
42957    ///         Task::default()/* use setters */,
42958    ///         Task::default()/* use (different) setters */,
42959    ///     ]);
42960    /// ```
42961    pub fn set_tasks<T, V>(mut self, v: T) -> Self
42962    where
42963        T: std::iter::IntoIterator<Item = V>,
42964        V: std::convert::Into<crate::model::Task>,
42965    {
42966        use std::iter::Iterator;
42967        self.tasks = v.into_iter().map(|i| i.into()).collect();
42968        self
42969    }
42970
42971    /// Sets the value of [next_page_token][crate::model::ListTasksResponse::next_page_token].
42972    ///
42973    /// # Example
42974    /// ```ignore,no_run
42975    /// # use google_cloud_dataplex_v1::model::ListTasksResponse;
42976    /// let x = ListTasksResponse::new().set_next_page_token("example");
42977    /// ```
42978    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42979        self.next_page_token = v.into();
42980        self
42981    }
42982
42983    /// Sets the value of [unreachable_locations][crate::model::ListTasksResponse::unreachable_locations].
42984    ///
42985    /// # Example
42986    /// ```ignore,no_run
42987    /// # use google_cloud_dataplex_v1::model::ListTasksResponse;
42988    /// let x = ListTasksResponse::new().set_unreachable_locations(["a", "b", "c"]);
42989    /// ```
42990    pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
42991    where
42992        T: std::iter::IntoIterator<Item = V>,
42993        V: std::convert::Into<std::string::String>,
42994    {
42995        use std::iter::Iterator;
42996        self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
42997        self
42998    }
42999}
43000
43001impl wkt::message::Message for ListTasksResponse {
43002    fn typename() -> &'static str {
43003        "type.googleapis.com/google.cloud.dataplex.v1.ListTasksResponse"
43004    }
43005}
43006
43007#[doc(hidden)]
43008impl google_cloud_gax::paginator::internal::PageableResponse for ListTasksResponse {
43009    type PageItem = crate::model::Task;
43010
43011    fn items(self) -> std::vec::Vec<Self::PageItem> {
43012        self.tasks
43013    }
43014
43015    fn next_page_token(&self) -> std::string::String {
43016        use std::clone::Clone;
43017        self.next_page_token.clone()
43018    }
43019}
43020
43021/// Get task request.
43022#[derive(Clone, Default, PartialEq)]
43023#[non_exhaustive]
43024pub struct GetTaskRequest {
43025    /// Required. The resource name of the task:
43026    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`.
43027    pub name: std::string::String,
43028
43029    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43030}
43031
43032impl GetTaskRequest {
43033    pub fn new() -> Self {
43034        std::default::Default::default()
43035    }
43036
43037    /// Sets the value of [name][crate::model::GetTaskRequest::name].
43038    ///
43039    /// # Example
43040    /// ```ignore,no_run
43041    /// # use google_cloud_dataplex_v1::model::GetTaskRequest;
43042    /// let x = GetTaskRequest::new().set_name("example");
43043    /// ```
43044    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43045        self.name = v.into();
43046        self
43047    }
43048}
43049
43050impl wkt::message::Message for GetTaskRequest {
43051    fn typename() -> &'static str {
43052        "type.googleapis.com/google.cloud.dataplex.v1.GetTaskRequest"
43053    }
43054}
43055
43056/// Get job request.
43057#[derive(Clone, Default, PartialEq)]
43058#[non_exhaustive]
43059pub struct GetJobRequest {
43060    /// Required. The resource name of the job:
43061    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`.
43062    pub name: std::string::String,
43063
43064    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43065}
43066
43067impl GetJobRequest {
43068    pub fn new() -> Self {
43069        std::default::Default::default()
43070    }
43071
43072    /// Sets the value of [name][crate::model::GetJobRequest::name].
43073    ///
43074    /// # Example
43075    /// ```ignore,no_run
43076    /// # use google_cloud_dataplex_v1::model::GetJobRequest;
43077    /// let x = GetJobRequest::new().set_name("example");
43078    /// ```
43079    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43080        self.name = v.into();
43081        self
43082    }
43083}
43084
43085impl wkt::message::Message for GetJobRequest {
43086    fn typename() -> &'static str {
43087        "type.googleapis.com/google.cloud.dataplex.v1.GetJobRequest"
43088    }
43089}
43090
43091#[derive(Clone, Default, PartialEq)]
43092#[non_exhaustive]
43093pub struct RunTaskRequest {
43094    /// Required. The resource name of the task:
43095    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.
43096    pub name: std::string::String,
43097
43098    /// Optional. User-defined labels for the task. If the map is left empty, the
43099    /// task will run with existing labels from task definition. If the map
43100    /// contains an entry with a new key, the same will be added to existing set of
43101    /// labels. If the map contains an entry with an existing label key in task
43102    /// definition, the task will run with new label value for that entry. Clearing
43103    /// an existing label will require label value to be explicitly set to a hyphen
43104    /// "-". The label value cannot be empty.
43105    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
43106
43107    /// Optional. Execution spec arguments. If the map is left empty, the task will
43108    /// run with existing execution spec args from task definition. If the map
43109    /// contains an entry with a new key, the same will be added to existing set of
43110    /// args. If the map contains an entry with an existing arg key in task
43111    /// definition, the task will run with new arg value for that entry. Clearing
43112    /// an existing arg will require arg value to be explicitly set to a hyphen
43113    /// "-". The arg value cannot be empty.
43114    pub args: std::collections::HashMap<std::string::String, std::string::String>,
43115
43116    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43117}
43118
43119impl RunTaskRequest {
43120    pub fn new() -> Self {
43121        std::default::Default::default()
43122    }
43123
43124    /// Sets the value of [name][crate::model::RunTaskRequest::name].
43125    ///
43126    /// # Example
43127    /// ```ignore,no_run
43128    /// # use google_cloud_dataplex_v1::model::RunTaskRequest;
43129    /// let x = RunTaskRequest::new().set_name("example");
43130    /// ```
43131    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43132        self.name = v.into();
43133        self
43134    }
43135
43136    /// Sets the value of [labels][crate::model::RunTaskRequest::labels].
43137    ///
43138    /// # Example
43139    /// ```ignore,no_run
43140    /// # use google_cloud_dataplex_v1::model::RunTaskRequest;
43141    /// let x = RunTaskRequest::new().set_labels([
43142    ///     ("key0", "abc"),
43143    ///     ("key1", "xyz"),
43144    /// ]);
43145    /// ```
43146    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
43147    where
43148        T: std::iter::IntoIterator<Item = (K, V)>,
43149        K: std::convert::Into<std::string::String>,
43150        V: std::convert::Into<std::string::String>,
43151    {
43152        use std::iter::Iterator;
43153        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
43154        self
43155    }
43156
43157    /// Sets the value of [args][crate::model::RunTaskRequest::args].
43158    ///
43159    /// # Example
43160    /// ```ignore,no_run
43161    /// # use google_cloud_dataplex_v1::model::RunTaskRequest;
43162    /// let x = RunTaskRequest::new().set_args([
43163    ///     ("key0", "abc"),
43164    ///     ("key1", "xyz"),
43165    /// ]);
43166    /// ```
43167    pub fn set_args<T, K, V>(mut self, v: T) -> Self
43168    where
43169        T: std::iter::IntoIterator<Item = (K, V)>,
43170        K: std::convert::Into<std::string::String>,
43171        V: std::convert::Into<std::string::String>,
43172    {
43173        use std::iter::Iterator;
43174        self.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
43175        self
43176    }
43177}
43178
43179impl wkt::message::Message for RunTaskRequest {
43180    fn typename() -> &'static str {
43181        "type.googleapis.com/google.cloud.dataplex.v1.RunTaskRequest"
43182    }
43183}
43184
43185#[derive(Clone, Default, PartialEq)]
43186#[non_exhaustive]
43187pub struct RunTaskResponse {
43188    /// Jobs created by RunTask API.
43189    pub job: std::option::Option<crate::model::Job>,
43190
43191    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43192}
43193
43194impl RunTaskResponse {
43195    pub fn new() -> Self {
43196        std::default::Default::default()
43197    }
43198
43199    /// Sets the value of [job][crate::model::RunTaskResponse::job].
43200    ///
43201    /// # Example
43202    /// ```ignore,no_run
43203    /// # use google_cloud_dataplex_v1::model::RunTaskResponse;
43204    /// use google_cloud_dataplex_v1::model::Job;
43205    /// let x = RunTaskResponse::new().set_job(Job::default()/* use setters */);
43206    /// ```
43207    pub fn set_job<T>(mut self, v: T) -> Self
43208    where
43209        T: std::convert::Into<crate::model::Job>,
43210    {
43211        self.job = std::option::Option::Some(v.into());
43212        self
43213    }
43214
43215    /// Sets or clears the value of [job][crate::model::RunTaskResponse::job].
43216    ///
43217    /// # Example
43218    /// ```ignore,no_run
43219    /// # use google_cloud_dataplex_v1::model::RunTaskResponse;
43220    /// use google_cloud_dataplex_v1::model::Job;
43221    /// let x = RunTaskResponse::new().set_or_clear_job(Some(Job::default()/* use setters */));
43222    /// let x = RunTaskResponse::new().set_or_clear_job(None::<Job>);
43223    /// ```
43224    pub fn set_or_clear_job<T>(mut self, v: std::option::Option<T>) -> Self
43225    where
43226        T: std::convert::Into<crate::model::Job>,
43227    {
43228        self.job = v.map(|x| x.into());
43229        self
43230    }
43231}
43232
43233impl wkt::message::Message for RunTaskResponse {
43234    fn typename() -> &'static str {
43235        "type.googleapis.com/google.cloud.dataplex.v1.RunTaskResponse"
43236    }
43237}
43238
43239/// List jobs request.
43240#[derive(Clone, Default, PartialEq)]
43241#[non_exhaustive]
43242pub struct ListJobsRequest {
43243    /// Required. The resource name of the parent environment:
43244    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.
43245    pub parent: std::string::String,
43246
43247    /// Optional. Maximum number of jobs to return. The service may return fewer
43248    /// than this value. If unspecified, at most 10 jobs will be returned. The
43249    /// maximum value is 1000; values above 1000 will be coerced to 1000.
43250    pub page_size: i32,
43251
43252    /// Optional. Page token received from a previous `ListJobs` call. Provide this
43253    /// to retrieve the subsequent page. When paginating, all other parameters
43254    /// provided to `ListJobs` must match the call that provided the page
43255    /// token.
43256    pub page_token: std::string::String,
43257
43258    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43259}
43260
43261impl ListJobsRequest {
43262    pub fn new() -> Self {
43263        std::default::Default::default()
43264    }
43265
43266    /// Sets the value of [parent][crate::model::ListJobsRequest::parent].
43267    ///
43268    /// # Example
43269    /// ```ignore,no_run
43270    /// # use google_cloud_dataplex_v1::model::ListJobsRequest;
43271    /// let x = ListJobsRequest::new().set_parent("example");
43272    /// ```
43273    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43274        self.parent = v.into();
43275        self
43276    }
43277
43278    /// Sets the value of [page_size][crate::model::ListJobsRequest::page_size].
43279    ///
43280    /// # Example
43281    /// ```ignore,no_run
43282    /// # use google_cloud_dataplex_v1::model::ListJobsRequest;
43283    /// let x = ListJobsRequest::new().set_page_size(42);
43284    /// ```
43285    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
43286        self.page_size = v.into();
43287        self
43288    }
43289
43290    /// Sets the value of [page_token][crate::model::ListJobsRequest::page_token].
43291    ///
43292    /// # Example
43293    /// ```ignore,no_run
43294    /// # use google_cloud_dataplex_v1::model::ListJobsRequest;
43295    /// let x = ListJobsRequest::new().set_page_token("example");
43296    /// ```
43297    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43298        self.page_token = v.into();
43299        self
43300    }
43301}
43302
43303impl wkt::message::Message for ListJobsRequest {
43304    fn typename() -> &'static str {
43305        "type.googleapis.com/google.cloud.dataplex.v1.ListJobsRequest"
43306    }
43307}
43308
43309/// List jobs response.
43310#[derive(Clone, Default, PartialEq)]
43311#[non_exhaustive]
43312pub struct ListJobsResponse {
43313    /// Jobs under a given task.
43314    pub jobs: std::vec::Vec<crate::model::Job>,
43315
43316    /// Token to retrieve the next page of results, or empty if there are no more
43317    /// results in the list.
43318    pub next_page_token: std::string::String,
43319
43320    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43321}
43322
43323impl ListJobsResponse {
43324    pub fn new() -> Self {
43325        std::default::Default::default()
43326    }
43327
43328    /// Sets the value of [jobs][crate::model::ListJobsResponse::jobs].
43329    ///
43330    /// # Example
43331    /// ```ignore,no_run
43332    /// # use google_cloud_dataplex_v1::model::ListJobsResponse;
43333    /// use google_cloud_dataplex_v1::model::Job;
43334    /// let x = ListJobsResponse::new()
43335    ///     .set_jobs([
43336    ///         Job::default()/* use setters */,
43337    ///         Job::default()/* use (different) setters */,
43338    ///     ]);
43339    /// ```
43340    pub fn set_jobs<T, V>(mut self, v: T) -> Self
43341    where
43342        T: std::iter::IntoIterator<Item = V>,
43343        V: std::convert::Into<crate::model::Job>,
43344    {
43345        use std::iter::Iterator;
43346        self.jobs = v.into_iter().map(|i| i.into()).collect();
43347        self
43348    }
43349
43350    /// Sets the value of [next_page_token][crate::model::ListJobsResponse::next_page_token].
43351    ///
43352    /// # Example
43353    /// ```ignore,no_run
43354    /// # use google_cloud_dataplex_v1::model::ListJobsResponse;
43355    /// let x = ListJobsResponse::new().set_next_page_token("example");
43356    /// ```
43357    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43358        self.next_page_token = v.into();
43359        self
43360    }
43361}
43362
43363impl wkt::message::Message for ListJobsResponse {
43364    fn typename() -> &'static str {
43365        "type.googleapis.com/google.cloud.dataplex.v1.ListJobsResponse"
43366    }
43367}
43368
43369#[doc(hidden)]
43370impl google_cloud_gax::paginator::internal::PageableResponse for ListJobsResponse {
43371    type PageItem = crate::model::Job;
43372
43373    fn items(self) -> std::vec::Vec<Self::PageItem> {
43374        self.jobs
43375    }
43376
43377    fn next_page_token(&self) -> std::string::String {
43378        use std::clone::Clone;
43379        self.next_page_token.clone()
43380    }
43381}
43382
43383/// Cancel task jobs.
43384#[derive(Clone, Default, PartialEq)]
43385#[non_exhaustive]
43386pub struct CancelJobRequest {
43387    /// Required. The resource name of the job:
43388    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`.
43389    pub name: std::string::String,
43390
43391    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43392}
43393
43394impl CancelJobRequest {
43395    pub fn new() -> Self {
43396        std::default::Default::default()
43397    }
43398
43399    /// Sets the value of [name][crate::model::CancelJobRequest::name].
43400    ///
43401    /// # Example
43402    /// ```ignore,no_run
43403    /// # use google_cloud_dataplex_v1::model::CancelJobRequest;
43404    /// let x = CancelJobRequest::new().set_name("example");
43405    /// ```
43406    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43407        self.name = v.into();
43408        self
43409    }
43410}
43411
43412impl wkt::message::Message for CancelJobRequest {
43413    fn typename() -> &'static str {
43414        "type.googleapis.com/google.cloud.dataplex.v1.CancelJobRequest"
43415    }
43416}
43417
43418/// Create environment request.
43419#[derive(Clone, Default, PartialEq)]
43420#[non_exhaustive]
43421pub struct CreateEnvironmentRequest {
43422    /// Required. The resource name of the parent lake:
43423    /// `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.
43424    pub parent: std::string::String,
43425
43426    /// Required. Environment identifier.
43427    ///
43428    /// * Must contain only lowercase letters, numbers and hyphens.
43429    /// * Must start with a letter.
43430    /// * Must be between 1-63 characters.
43431    /// * Must end with a number or a letter.
43432    /// * Must be unique within the lake.
43433    pub environment_id: std::string::String,
43434
43435    /// Required. Environment resource.
43436    pub environment: std::option::Option<crate::model::Environment>,
43437
43438    /// Optional. Only validate the request, but do not perform mutations.
43439    /// The default is false.
43440    pub validate_only: bool,
43441
43442    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43443}
43444
43445impl CreateEnvironmentRequest {
43446    pub fn new() -> Self {
43447        std::default::Default::default()
43448    }
43449
43450    /// Sets the value of [parent][crate::model::CreateEnvironmentRequest::parent].
43451    ///
43452    /// # Example
43453    /// ```ignore,no_run
43454    /// # use google_cloud_dataplex_v1::model::CreateEnvironmentRequest;
43455    /// let x = CreateEnvironmentRequest::new().set_parent("example");
43456    /// ```
43457    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43458        self.parent = v.into();
43459        self
43460    }
43461
43462    /// Sets the value of [environment_id][crate::model::CreateEnvironmentRequest::environment_id].
43463    ///
43464    /// # Example
43465    /// ```ignore,no_run
43466    /// # use google_cloud_dataplex_v1::model::CreateEnvironmentRequest;
43467    /// let x = CreateEnvironmentRequest::new().set_environment_id("example");
43468    /// ```
43469    pub fn set_environment_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43470        self.environment_id = v.into();
43471        self
43472    }
43473
43474    /// Sets the value of [environment][crate::model::CreateEnvironmentRequest::environment].
43475    ///
43476    /// # Example
43477    /// ```ignore,no_run
43478    /// # use google_cloud_dataplex_v1::model::CreateEnvironmentRequest;
43479    /// use google_cloud_dataplex_v1::model::Environment;
43480    /// let x = CreateEnvironmentRequest::new().set_environment(Environment::default()/* use setters */);
43481    /// ```
43482    pub fn set_environment<T>(mut self, v: T) -> Self
43483    where
43484        T: std::convert::Into<crate::model::Environment>,
43485    {
43486        self.environment = std::option::Option::Some(v.into());
43487        self
43488    }
43489
43490    /// Sets or clears the value of [environment][crate::model::CreateEnvironmentRequest::environment].
43491    ///
43492    /// # Example
43493    /// ```ignore,no_run
43494    /// # use google_cloud_dataplex_v1::model::CreateEnvironmentRequest;
43495    /// use google_cloud_dataplex_v1::model::Environment;
43496    /// let x = CreateEnvironmentRequest::new().set_or_clear_environment(Some(Environment::default()/* use setters */));
43497    /// let x = CreateEnvironmentRequest::new().set_or_clear_environment(None::<Environment>);
43498    /// ```
43499    pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
43500    where
43501        T: std::convert::Into<crate::model::Environment>,
43502    {
43503        self.environment = v.map(|x| x.into());
43504        self
43505    }
43506
43507    /// Sets the value of [validate_only][crate::model::CreateEnvironmentRequest::validate_only].
43508    ///
43509    /// # Example
43510    /// ```ignore,no_run
43511    /// # use google_cloud_dataplex_v1::model::CreateEnvironmentRequest;
43512    /// let x = CreateEnvironmentRequest::new().set_validate_only(true);
43513    /// ```
43514    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
43515        self.validate_only = v.into();
43516        self
43517    }
43518}
43519
43520impl wkt::message::Message for CreateEnvironmentRequest {
43521    fn typename() -> &'static str {
43522        "type.googleapis.com/google.cloud.dataplex.v1.CreateEnvironmentRequest"
43523    }
43524}
43525
43526/// Update environment request.
43527#[derive(Clone, Default, PartialEq)]
43528#[non_exhaustive]
43529pub struct UpdateEnvironmentRequest {
43530    /// Required. Mask of fields to update.
43531    pub update_mask: std::option::Option<wkt::FieldMask>,
43532
43533    /// Required. Update description.
43534    /// Only fields specified in `update_mask` are updated.
43535    pub environment: std::option::Option<crate::model::Environment>,
43536
43537    /// Optional. Only validate the request, but do not perform mutations.
43538    /// The default is false.
43539    pub validate_only: bool,
43540
43541    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43542}
43543
43544impl UpdateEnvironmentRequest {
43545    pub fn new() -> Self {
43546        std::default::Default::default()
43547    }
43548
43549    /// Sets the value of [update_mask][crate::model::UpdateEnvironmentRequest::update_mask].
43550    ///
43551    /// # Example
43552    /// ```ignore,no_run
43553    /// # use google_cloud_dataplex_v1::model::UpdateEnvironmentRequest;
43554    /// use wkt::FieldMask;
43555    /// let x = UpdateEnvironmentRequest::new().set_update_mask(FieldMask::default()/* use setters */);
43556    /// ```
43557    pub fn set_update_mask<T>(mut self, v: T) -> Self
43558    where
43559        T: std::convert::Into<wkt::FieldMask>,
43560    {
43561        self.update_mask = std::option::Option::Some(v.into());
43562        self
43563    }
43564
43565    /// Sets or clears the value of [update_mask][crate::model::UpdateEnvironmentRequest::update_mask].
43566    ///
43567    /// # Example
43568    /// ```ignore,no_run
43569    /// # use google_cloud_dataplex_v1::model::UpdateEnvironmentRequest;
43570    /// use wkt::FieldMask;
43571    /// let x = UpdateEnvironmentRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
43572    /// let x = UpdateEnvironmentRequest::new().set_or_clear_update_mask(None::<FieldMask>);
43573    /// ```
43574    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
43575    where
43576        T: std::convert::Into<wkt::FieldMask>,
43577    {
43578        self.update_mask = v.map(|x| x.into());
43579        self
43580    }
43581
43582    /// Sets the value of [environment][crate::model::UpdateEnvironmentRequest::environment].
43583    ///
43584    /// # Example
43585    /// ```ignore,no_run
43586    /// # use google_cloud_dataplex_v1::model::UpdateEnvironmentRequest;
43587    /// use google_cloud_dataplex_v1::model::Environment;
43588    /// let x = UpdateEnvironmentRequest::new().set_environment(Environment::default()/* use setters */);
43589    /// ```
43590    pub fn set_environment<T>(mut self, v: T) -> Self
43591    where
43592        T: std::convert::Into<crate::model::Environment>,
43593    {
43594        self.environment = std::option::Option::Some(v.into());
43595        self
43596    }
43597
43598    /// Sets or clears the value of [environment][crate::model::UpdateEnvironmentRequest::environment].
43599    ///
43600    /// # Example
43601    /// ```ignore,no_run
43602    /// # use google_cloud_dataplex_v1::model::UpdateEnvironmentRequest;
43603    /// use google_cloud_dataplex_v1::model::Environment;
43604    /// let x = UpdateEnvironmentRequest::new().set_or_clear_environment(Some(Environment::default()/* use setters */));
43605    /// let x = UpdateEnvironmentRequest::new().set_or_clear_environment(None::<Environment>);
43606    /// ```
43607    pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
43608    where
43609        T: std::convert::Into<crate::model::Environment>,
43610    {
43611        self.environment = v.map(|x| x.into());
43612        self
43613    }
43614
43615    /// Sets the value of [validate_only][crate::model::UpdateEnvironmentRequest::validate_only].
43616    ///
43617    /// # Example
43618    /// ```ignore,no_run
43619    /// # use google_cloud_dataplex_v1::model::UpdateEnvironmentRequest;
43620    /// let x = UpdateEnvironmentRequest::new().set_validate_only(true);
43621    /// ```
43622    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
43623        self.validate_only = v.into();
43624        self
43625    }
43626}
43627
43628impl wkt::message::Message for UpdateEnvironmentRequest {
43629    fn typename() -> &'static str {
43630        "type.googleapis.com/google.cloud.dataplex.v1.UpdateEnvironmentRequest"
43631    }
43632}
43633
43634/// Delete environment request.
43635#[derive(Clone, Default, PartialEq)]
43636#[non_exhaustive]
43637pub struct DeleteEnvironmentRequest {
43638    /// Required. The resource name of the environment:
43639    /// `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.
43640    pub name: std::string::String,
43641
43642    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43643}
43644
43645impl DeleteEnvironmentRequest {
43646    pub fn new() -> Self {
43647        std::default::Default::default()
43648    }
43649
43650    /// Sets the value of [name][crate::model::DeleteEnvironmentRequest::name].
43651    ///
43652    /// # Example
43653    /// ```ignore,no_run
43654    /// # use google_cloud_dataplex_v1::model::DeleteEnvironmentRequest;
43655    /// let x = DeleteEnvironmentRequest::new().set_name("example");
43656    /// ```
43657    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43658        self.name = v.into();
43659        self
43660    }
43661}
43662
43663impl wkt::message::Message for DeleteEnvironmentRequest {
43664    fn typename() -> &'static str {
43665        "type.googleapis.com/google.cloud.dataplex.v1.DeleteEnvironmentRequest"
43666    }
43667}
43668
43669/// List environments request.
43670#[derive(Clone, Default, PartialEq)]
43671#[non_exhaustive]
43672pub struct ListEnvironmentsRequest {
43673    /// Required. The resource name of the parent lake:
43674    /// `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.
43675    pub parent: std::string::String,
43676
43677    /// Optional. Maximum number of environments to return. The service may return
43678    /// fewer than this value. If unspecified, at most 10 environments will be
43679    /// returned. The maximum value is 1000; values above 1000 will be coerced to
43680    /// 1000.
43681    pub page_size: i32,
43682
43683    /// Optional. Page token received from a previous `ListEnvironments` call.
43684    /// Provide this to retrieve the subsequent page. When paginating, all other
43685    /// parameters provided to `ListEnvironments` must match the call that provided
43686    /// the page token.
43687    pub page_token: std::string::String,
43688
43689    /// Optional. Filter request.
43690    pub filter: std::string::String,
43691
43692    /// Optional. Order by fields for the result.
43693    pub order_by: std::string::String,
43694
43695    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43696}
43697
43698impl ListEnvironmentsRequest {
43699    pub fn new() -> Self {
43700        std::default::Default::default()
43701    }
43702
43703    /// Sets the value of [parent][crate::model::ListEnvironmentsRequest::parent].
43704    ///
43705    /// # Example
43706    /// ```ignore,no_run
43707    /// # use google_cloud_dataplex_v1::model::ListEnvironmentsRequest;
43708    /// let x = ListEnvironmentsRequest::new().set_parent("example");
43709    /// ```
43710    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43711        self.parent = v.into();
43712        self
43713    }
43714
43715    /// Sets the value of [page_size][crate::model::ListEnvironmentsRequest::page_size].
43716    ///
43717    /// # Example
43718    /// ```ignore,no_run
43719    /// # use google_cloud_dataplex_v1::model::ListEnvironmentsRequest;
43720    /// let x = ListEnvironmentsRequest::new().set_page_size(42);
43721    /// ```
43722    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
43723        self.page_size = v.into();
43724        self
43725    }
43726
43727    /// Sets the value of [page_token][crate::model::ListEnvironmentsRequest::page_token].
43728    ///
43729    /// # Example
43730    /// ```ignore,no_run
43731    /// # use google_cloud_dataplex_v1::model::ListEnvironmentsRequest;
43732    /// let x = ListEnvironmentsRequest::new().set_page_token("example");
43733    /// ```
43734    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43735        self.page_token = v.into();
43736        self
43737    }
43738
43739    /// Sets the value of [filter][crate::model::ListEnvironmentsRequest::filter].
43740    ///
43741    /// # Example
43742    /// ```ignore,no_run
43743    /// # use google_cloud_dataplex_v1::model::ListEnvironmentsRequest;
43744    /// let x = ListEnvironmentsRequest::new().set_filter("example");
43745    /// ```
43746    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43747        self.filter = v.into();
43748        self
43749    }
43750
43751    /// Sets the value of [order_by][crate::model::ListEnvironmentsRequest::order_by].
43752    ///
43753    /// # Example
43754    /// ```ignore,no_run
43755    /// # use google_cloud_dataplex_v1::model::ListEnvironmentsRequest;
43756    /// let x = ListEnvironmentsRequest::new().set_order_by("example");
43757    /// ```
43758    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43759        self.order_by = v.into();
43760        self
43761    }
43762}
43763
43764impl wkt::message::Message for ListEnvironmentsRequest {
43765    fn typename() -> &'static str {
43766        "type.googleapis.com/google.cloud.dataplex.v1.ListEnvironmentsRequest"
43767    }
43768}
43769
43770/// List environments response.
43771#[derive(Clone, Default, PartialEq)]
43772#[non_exhaustive]
43773pub struct ListEnvironmentsResponse {
43774    /// Environments under the given parent lake.
43775    pub environments: std::vec::Vec<crate::model::Environment>,
43776
43777    /// Token to retrieve the next page of results, or empty if there are no more
43778    /// results in the list.
43779    pub next_page_token: std::string::String,
43780
43781    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43782}
43783
43784impl ListEnvironmentsResponse {
43785    pub fn new() -> Self {
43786        std::default::Default::default()
43787    }
43788
43789    /// Sets the value of [environments][crate::model::ListEnvironmentsResponse::environments].
43790    ///
43791    /// # Example
43792    /// ```ignore,no_run
43793    /// # use google_cloud_dataplex_v1::model::ListEnvironmentsResponse;
43794    /// use google_cloud_dataplex_v1::model::Environment;
43795    /// let x = ListEnvironmentsResponse::new()
43796    ///     .set_environments([
43797    ///         Environment::default()/* use setters */,
43798    ///         Environment::default()/* use (different) setters */,
43799    ///     ]);
43800    /// ```
43801    pub fn set_environments<T, V>(mut self, v: T) -> Self
43802    where
43803        T: std::iter::IntoIterator<Item = V>,
43804        V: std::convert::Into<crate::model::Environment>,
43805    {
43806        use std::iter::Iterator;
43807        self.environments = v.into_iter().map(|i| i.into()).collect();
43808        self
43809    }
43810
43811    /// Sets the value of [next_page_token][crate::model::ListEnvironmentsResponse::next_page_token].
43812    ///
43813    /// # Example
43814    /// ```ignore,no_run
43815    /// # use google_cloud_dataplex_v1::model::ListEnvironmentsResponse;
43816    /// let x = ListEnvironmentsResponse::new().set_next_page_token("example");
43817    /// ```
43818    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43819        self.next_page_token = v.into();
43820        self
43821    }
43822}
43823
43824impl wkt::message::Message for ListEnvironmentsResponse {
43825    fn typename() -> &'static str {
43826        "type.googleapis.com/google.cloud.dataplex.v1.ListEnvironmentsResponse"
43827    }
43828}
43829
43830#[doc(hidden)]
43831impl google_cloud_gax::paginator::internal::PageableResponse for ListEnvironmentsResponse {
43832    type PageItem = crate::model::Environment;
43833
43834    fn items(self) -> std::vec::Vec<Self::PageItem> {
43835        self.environments
43836    }
43837
43838    fn next_page_token(&self) -> std::string::String {
43839        use std::clone::Clone;
43840        self.next_page_token.clone()
43841    }
43842}
43843
43844/// Get environment request.
43845#[derive(Clone, Default, PartialEq)]
43846#[non_exhaustive]
43847pub struct GetEnvironmentRequest {
43848    /// Required. The resource name of the environment:
43849    /// `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.
43850    pub name: std::string::String,
43851
43852    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43853}
43854
43855impl GetEnvironmentRequest {
43856    pub fn new() -> Self {
43857        std::default::Default::default()
43858    }
43859
43860    /// Sets the value of [name][crate::model::GetEnvironmentRequest::name].
43861    ///
43862    /// # Example
43863    /// ```ignore,no_run
43864    /// # use google_cloud_dataplex_v1::model::GetEnvironmentRequest;
43865    /// let x = GetEnvironmentRequest::new().set_name("example");
43866    /// ```
43867    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43868        self.name = v.into();
43869        self
43870    }
43871}
43872
43873impl wkt::message::Message for GetEnvironmentRequest {
43874    fn typename() -> &'static str {
43875        "type.googleapis.com/google.cloud.dataplex.v1.GetEnvironmentRequest"
43876    }
43877}
43878
43879/// List sessions request.
43880#[derive(Clone, Default, PartialEq)]
43881#[non_exhaustive]
43882pub struct ListSessionsRequest {
43883    /// Required. The resource name of the parent environment:
43884    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`.
43885    pub parent: std::string::String,
43886
43887    /// Optional. Maximum number of sessions to return. The service may return
43888    /// fewer than this value. If unspecified, at most 10 sessions will be
43889    /// returned. The maximum value is 1000; values above 1000 will be coerced to
43890    /// 1000.
43891    pub page_size: i32,
43892
43893    /// Optional. Page token received from a previous `ListSessions` call. Provide
43894    /// this to retrieve the subsequent page. When paginating, all other parameters
43895    /// provided to `ListSessions` must match the call that provided the page
43896    /// token.
43897    pub page_token: std::string::String,
43898
43899    /// Optional. Filter request. The following `mode` filter is supported to
43900    /// return only the sessions belonging to the requester when the mode is USER
43901    /// and return sessions of all the users when the mode is ADMIN. When no filter
43902    /// is sent default to USER mode. NOTE: When the mode is ADMIN, the requester
43903    /// should have `dataplex.environments.listAllSessions` permission to list all
43904    /// sessions, in absence of the permission, the request fails.
43905    ///
43906    /// mode = ADMIN | USER
43907    pub filter: std::string::String,
43908
43909    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43910}
43911
43912impl ListSessionsRequest {
43913    pub fn new() -> Self {
43914        std::default::Default::default()
43915    }
43916
43917    /// Sets the value of [parent][crate::model::ListSessionsRequest::parent].
43918    ///
43919    /// # Example
43920    /// ```ignore,no_run
43921    /// # use google_cloud_dataplex_v1::model::ListSessionsRequest;
43922    /// let x = ListSessionsRequest::new().set_parent("example");
43923    /// ```
43924    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43925        self.parent = v.into();
43926        self
43927    }
43928
43929    /// Sets the value of [page_size][crate::model::ListSessionsRequest::page_size].
43930    ///
43931    /// # Example
43932    /// ```ignore,no_run
43933    /// # use google_cloud_dataplex_v1::model::ListSessionsRequest;
43934    /// let x = ListSessionsRequest::new().set_page_size(42);
43935    /// ```
43936    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
43937        self.page_size = v.into();
43938        self
43939    }
43940
43941    /// Sets the value of [page_token][crate::model::ListSessionsRequest::page_token].
43942    ///
43943    /// # Example
43944    /// ```ignore,no_run
43945    /// # use google_cloud_dataplex_v1::model::ListSessionsRequest;
43946    /// let x = ListSessionsRequest::new().set_page_token("example");
43947    /// ```
43948    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43949        self.page_token = v.into();
43950        self
43951    }
43952
43953    /// Sets the value of [filter][crate::model::ListSessionsRequest::filter].
43954    ///
43955    /// # Example
43956    /// ```ignore,no_run
43957    /// # use google_cloud_dataplex_v1::model::ListSessionsRequest;
43958    /// let x = ListSessionsRequest::new().set_filter("example");
43959    /// ```
43960    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43961        self.filter = v.into();
43962        self
43963    }
43964}
43965
43966impl wkt::message::Message for ListSessionsRequest {
43967    fn typename() -> &'static str {
43968        "type.googleapis.com/google.cloud.dataplex.v1.ListSessionsRequest"
43969    }
43970}
43971
43972/// List sessions response.
43973#[derive(Clone, Default, PartialEq)]
43974#[non_exhaustive]
43975pub struct ListSessionsResponse {
43976    /// Sessions under a given environment.
43977    pub sessions: std::vec::Vec<crate::model::Session>,
43978
43979    /// Token to retrieve the next page of results, or empty if there are no more
43980    /// results in the list.
43981    pub next_page_token: std::string::String,
43982
43983    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43984}
43985
43986impl ListSessionsResponse {
43987    pub fn new() -> Self {
43988        std::default::Default::default()
43989    }
43990
43991    /// Sets the value of [sessions][crate::model::ListSessionsResponse::sessions].
43992    ///
43993    /// # Example
43994    /// ```ignore,no_run
43995    /// # use google_cloud_dataplex_v1::model::ListSessionsResponse;
43996    /// use google_cloud_dataplex_v1::model::Session;
43997    /// let x = ListSessionsResponse::new()
43998    ///     .set_sessions([
43999    ///         Session::default()/* use setters */,
44000    ///         Session::default()/* use (different) setters */,
44001    ///     ]);
44002    /// ```
44003    pub fn set_sessions<T, V>(mut self, v: T) -> Self
44004    where
44005        T: std::iter::IntoIterator<Item = V>,
44006        V: std::convert::Into<crate::model::Session>,
44007    {
44008        use std::iter::Iterator;
44009        self.sessions = v.into_iter().map(|i| i.into()).collect();
44010        self
44011    }
44012
44013    /// Sets the value of [next_page_token][crate::model::ListSessionsResponse::next_page_token].
44014    ///
44015    /// # Example
44016    /// ```ignore,no_run
44017    /// # use google_cloud_dataplex_v1::model::ListSessionsResponse;
44018    /// let x = ListSessionsResponse::new().set_next_page_token("example");
44019    /// ```
44020    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44021        self.next_page_token = v.into();
44022        self
44023    }
44024}
44025
44026impl wkt::message::Message for ListSessionsResponse {
44027    fn typename() -> &'static str {
44028        "type.googleapis.com/google.cloud.dataplex.v1.ListSessionsResponse"
44029    }
44030}
44031
44032#[doc(hidden)]
44033impl google_cloud_gax::paginator::internal::PageableResponse for ListSessionsResponse {
44034    type PageItem = crate::model::Session;
44035
44036    fn items(self) -> std::vec::Vec<Self::PageItem> {
44037        self.sessions
44038    }
44039
44040    fn next_page_token(&self) -> std::string::String {
44041        use std::clone::Clone;
44042        self.next_page_token.clone()
44043    }
44044}
44045
44046/// A task represents a user-visible job.
44047#[derive(Clone, Default, PartialEq)]
44048#[non_exhaustive]
44049pub struct Task {
44050    /// Output only. The relative resource name of the task, of the form:
44051    /// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/
44052    /// tasks/{task_id}.
44053    pub name: std::string::String,
44054
44055    /// Output only. System generated globally unique ID for the task. This ID will
44056    /// be different if the task is deleted and re-created with the same name.
44057    pub uid: std::string::String,
44058
44059    /// Output only. The time when the task was created.
44060    pub create_time: std::option::Option<wkt::Timestamp>,
44061
44062    /// Output only. The time when the task was last updated.
44063    pub update_time: std::option::Option<wkt::Timestamp>,
44064
44065    /// Optional. Description of the task.
44066    pub description: std::string::String,
44067
44068    /// Optional. User friendly display name.
44069    pub display_name: std::string::String,
44070
44071    /// Output only. Current state of the task.
44072    pub state: crate::model::State,
44073
44074    /// Optional. User-defined labels for the task.
44075    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
44076
44077    /// Required. Spec related to how often and when a task should be triggered.
44078    pub trigger_spec: std::option::Option<crate::model::task::TriggerSpec>,
44079
44080    /// Required. Spec related to how a task is executed.
44081    pub execution_spec: std::option::Option<crate::model::task::ExecutionSpec>,
44082
44083    /// Output only. Status of the latest task executions.
44084    pub execution_status: std::option::Option<crate::model::task::ExecutionStatus>,
44085
44086    /// Task template specific user-specified config.
44087    pub config: std::option::Option<crate::model::task::Config>,
44088
44089    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44090}
44091
44092impl Task {
44093    pub fn new() -> Self {
44094        std::default::Default::default()
44095    }
44096
44097    /// Sets the value of [name][crate::model::Task::name].
44098    ///
44099    /// # Example
44100    /// ```ignore,no_run
44101    /// # use google_cloud_dataplex_v1::model::Task;
44102    /// let x = Task::new().set_name("example");
44103    /// ```
44104    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44105        self.name = v.into();
44106        self
44107    }
44108
44109    /// Sets the value of [uid][crate::model::Task::uid].
44110    ///
44111    /// # Example
44112    /// ```ignore,no_run
44113    /// # use google_cloud_dataplex_v1::model::Task;
44114    /// let x = Task::new().set_uid("example");
44115    /// ```
44116    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44117        self.uid = v.into();
44118        self
44119    }
44120
44121    /// Sets the value of [create_time][crate::model::Task::create_time].
44122    ///
44123    /// # Example
44124    /// ```ignore,no_run
44125    /// # use google_cloud_dataplex_v1::model::Task;
44126    /// use wkt::Timestamp;
44127    /// let x = Task::new().set_create_time(Timestamp::default()/* use setters */);
44128    /// ```
44129    pub fn set_create_time<T>(mut self, v: T) -> Self
44130    where
44131        T: std::convert::Into<wkt::Timestamp>,
44132    {
44133        self.create_time = std::option::Option::Some(v.into());
44134        self
44135    }
44136
44137    /// Sets or clears the value of [create_time][crate::model::Task::create_time].
44138    ///
44139    /// # Example
44140    /// ```ignore,no_run
44141    /// # use google_cloud_dataplex_v1::model::Task;
44142    /// use wkt::Timestamp;
44143    /// let x = Task::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
44144    /// let x = Task::new().set_or_clear_create_time(None::<Timestamp>);
44145    /// ```
44146    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
44147    where
44148        T: std::convert::Into<wkt::Timestamp>,
44149    {
44150        self.create_time = v.map(|x| x.into());
44151        self
44152    }
44153
44154    /// Sets the value of [update_time][crate::model::Task::update_time].
44155    ///
44156    /// # Example
44157    /// ```ignore,no_run
44158    /// # use google_cloud_dataplex_v1::model::Task;
44159    /// use wkt::Timestamp;
44160    /// let x = Task::new().set_update_time(Timestamp::default()/* use setters */);
44161    /// ```
44162    pub fn set_update_time<T>(mut self, v: T) -> Self
44163    where
44164        T: std::convert::Into<wkt::Timestamp>,
44165    {
44166        self.update_time = std::option::Option::Some(v.into());
44167        self
44168    }
44169
44170    /// Sets or clears the value of [update_time][crate::model::Task::update_time].
44171    ///
44172    /// # Example
44173    /// ```ignore,no_run
44174    /// # use google_cloud_dataplex_v1::model::Task;
44175    /// use wkt::Timestamp;
44176    /// let x = Task::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
44177    /// let x = Task::new().set_or_clear_update_time(None::<Timestamp>);
44178    /// ```
44179    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
44180    where
44181        T: std::convert::Into<wkt::Timestamp>,
44182    {
44183        self.update_time = v.map(|x| x.into());
44184        self
44185    }
44186
44187    /// Sets the value of [description][crate::model::Task::description].
44188    ///
44189    /// # Example
44190    /// ```ignore,no_run
44191    /// # use google_cloud_dataplex_v1::model::Task;
44192    /// let x = Task::new().set_description("example");
44193    /// ```
44194    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44195        self.description = v.into();
44196        self
44197    }
44198
44199    /// Sets the value of [display_name][crate::model::Task::display_name].
44200    ///
44201    /// # Example
44202    /// ```ignore,no_run
44203    /// # use google_cloud_dataplex_v1::model::Task;
44204    /// let x = Task::new().set_display_name("example");
44205    /// ```
44206    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44207        self.display_name = v.into();
44208        self
44209    }
44210
44211    /// Sets the value of [state][crate::model::Task::state].
44212    ///
44213    /// # Example
44214    /// ```ignore,no_run
44215    /// # use google_cloud_dataplex_v1::model::Task;
44216    /// use google_cloud_dataplex_v1::model::State;
44217    /// let x0 = Task::new().set_state(State::Active);
44218    /// let x1 = Task::new().set_state(State::Creating);
44219    /// let x2 = Task::new().set_state(State::Deleting);
44220    /// ```
44221    pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
44222        self.state = v.into();
44223        self
44224    }
44225
44226    /// Sets the value of [labels][crate::model::Task::labels].
44227    ///
44228    /// # Example
44229    /// ```ignore,no_run
44230    /// # use google_cloud_dataplex_v1::model::Task;
44231    /// let x = Task::new().set_labels([
44232    ///     ("key0", "abc"),
44233    ///     ("key1", "xyz"),
44234    /// ]);
44235    /// ```
44236    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
44237    where
44238        T: std::iter::IntoIterator<Item = (K, V)>,
44239        K: std::convert::Into<std::string::String>,
44240        V: std::convert::Into<std::string::String>,
44241    {
44242        use std::iter::Iterator;
44243        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
44244        self
44245    }
44246
44247    /// Sets the value of [trigger_spec][crate::model::Task::trigger_spec].
44248    ///
44249    /// # Example
44250    /// ```ignore,no_run
44251    /// # use google_cloud_dataplex_v1::model::Task;
44252    /// use google_cloud_dataplex_v1::model::task::TriggerSpec;
44253    /// let x = Task::new().set_trigger_spec(TriggerSpec::default()/* use setters */);
44254    /// ```
44255    pub fn set_trigger_spec<T>(mut self, v: T) -> Self
44256    where
44257        T: std::convert::Into<crate::model::task::TriggerSpec>,
44258    {
44259        self.trigger_spec = std::option::Option::Some(v.into());
44260        self
44261    }
44262
44263    /// Sets or clears the value of [trigger_spec][crate::model::Task::trigger_spec].
44264    ///
44265    /// # Example
44266    /// ```ignore,no_run
44267    /// # use google_cloud_dataplex_v1::model::Task;
44268    /// use google_cloud_dataplex_v1::model::task::TriggerSpec;
44269    /// let x = Task::new().set_or_clear_trigger_spec(Some(TriggerSpec::default()/* use setters */));
44270    /// let x = Task::new().set_or_clear_trigger_spec(None::<TriggerSpec>);
44271    /// ```
44272    pub fn set_or_clear_trigger_spec<T>(mut self, v: std::option::Option<T>) -> Self
44273    where
44274        T: std::convert::Into<crate::model::task::TriggerSpec>,
44275    {
44276        self.trigger_spec = v.map(|x| x.into());
44277        self
44278    }
44279
44280    /// Sets the value of [execution_spec][crate::model::Task::execution_spec].
44281    ///
44282    /// # Example
44283    /// ```ignore,no_run
44284    /// # use google_cloud_dataplex_v1::model::Task;
44285    /// use google_cloud_dataplex_v1::model::task::ExecutionSpec;
44286    /// let x = Task::new().set_execution_spec(ExecutionSpec::default()/* use setters */);
44287    /// ```
44288    pub fn set_execution_spec<T>(mut self, v: T) -> Self
44289    where
44290        T: std::convert::Into<crate::model::task::ExecutionSpec>,
44291    {
44292        self.execution_spec = std::option::Option::Some(v.into());
44293        self
44294    }
44295
44296    /// Sets or clears the value of [execution_spec][crate::model::Task::execution_spec].
44297    ///
44298    /// # Example
44299    /// ```ignore,no_run
44300    /// # use google_cloud_dataplex_v1::model::Task;
44301    /// use google_cloud_dataplex_v1::model::task::ExecutionSpec;
44302    /// let x = Task::new().set_or_clear_execution_spec(Some(ExecutionSpec::default()/* use setters */));
44303    /// let x = Task::new().set_or_clear_execution_spec(None::<ExecutionSpec>);
44304    /// ```
44305    pub fn set_or_clear_execution_spec<T>(mut self, v: std::option::Option<T>) -> Self
44306    where
44307        T: std::convert::Into<crate::model::task::ExecutionSpec>,
44308    {
44309        self.execution_spec = v.map(|x| x.into());
44310        self
44311    }
44312
44313    /// Sets the value of [execution_status][crate::model::Task::execution_status].
44314    ///
44315    /// # Example
44316    /// ```ignore,no_run
44317    /// # use google_cloud_dataplex_v1::model::Task;
44318    /// use google_cloud_dataplex_v1::model::task::ExecutionStatus;
44319    /// let x = Task::new().set_execution_status(ExecutionStatus::default()/* use setters */);
44320    /// ```
44321    pub fn set_execution_status<T>(mut self, v: T) -> Self
44322    where
44323        T: std::convert::Into<crate::model::task::ExecutionStatus>,
44324    {
44325        self.execution_status = std::option::Option::Some(v.into());
44326        self
44327    }
44328
44329    /// Sets or clears the value of [execution_status][crate::model::Task::execution_status].
44330    ///
44331    /// # Example
44332    /// ```ignore,no_run
44333    /// # use google_cloud_dataplex_v1::model::Task;
44334    /// use google_cloud_dataplex_v1::model::task::ExecutionStatus;
44335    /// let x = Task::new().set_or_clear_execution_status(Some(ExecutionStatus::default()/* use setters */));
44336    /// let x = Task::new().set_or_clear_execution_status(None::<ExecutionStatus>);
44337    /// ```
44338    pub fn set_or_clear_execution_status<T>(mut self, v: std::option::Option<T>) -> Self
44339    where
44340        T: std::convert::Into<crate::model::task::ExecutionStatus>,
44341    {
44342        self.execution_status = v.map(|x| x.into());
44343        self
44344    }
44345
44346    /// Sets the value of [config][crate::model::Task::config].
44347    ///
44348    /// Note that all the setters affecting `config` are mutually
44349    /// exclusive.
44350    ///
44351    /// # Example
44352    /// ```ignore,no_run
44353    /// # use google_cloud_dataplex_v1::model::Task;
44354    /// use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
44355    /// let x = Task::new().set_config(Some(
44356    ///     google_cloud_dataplex_v1::model::task::Config::Spark(SparkTaskConfig::default().into())));
44357    /// ```
44358    pub fn set_config<T: std::convert::Into<std::option::Option<crate::model::task::Config>>>(
44359        mut self,
44360        v: T,
44361    ) -> Self {
44362        self.config = v.into();
44363        self
44364    }
44365
44366    /// The value of [config][crate::model::Task::config]
44367    /// if it holds a `Spark`, `None` if the field is not set or
44368    /// holds a different branch.
44369    pub fn spark(
44370        &self,
44371    ) -> std::option::Option<&std::boxed::Box<crate::model::task::SparkTaskConfig>> {
44372        #[allow(unreachable_patterns)]
44373        self.config.as_ref().and_then(|v| match v {
44374            crate::model::task::Config::Spark(v) => std::option::Option::Some(v),
44375            _ => std::option::Option::None,
44376        })
44377    }
44378
44379    /// Sets the value of [config][crate::model::Task::config]
44380    /// to hold a `Spark`.
44381    ///
44382    /// Note that all the setters affecting `config` are
44383    /// mutually exclusive.
44384    ///
44385    /// # Example
44386    /// ```ignore,no_run
44387    /// # use google_cloud_dataplex_v1::model::Task;
44388    /// use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
44389    /// let x = Task::new().set_spark(SparkTaskConfig::default()/* use setters */);
44390    /// assert!(x.spark().is_some());
44391    /// assert!(x.notebook().is_none());
44392    /// ```
44393    pub fn set_spark<
44394        T: std::convert::Into<std::boxed::Box<crate::model::task::SparkTaskConfig>>,
44395    >(
44396        mut self,
44397        v: T,
44398    ) -> Self {
44399        self.config = std::option::Option::Some(crate::model::task::Config::Spark(v.into()));
44400        self
44401    }
44402
44403    /// The value of [config][crate::model::Task::config]
44404    /// if it holds a `Notebook`, `None` if the field is not set or
44405    /// holds a different branch.
44406    pub fn notebook(
44407        &self,
44408    ) -> std::option::Option<&std::boxed::Box<crate::model::task::NotebookTaskConfig>> {
44409        #[allow(unreachable_patterns)]
44410        self.config.as_ref().and_then(|v| match v {
44411            crate::model::task::Config::Notebook(v) => std::option::Option::Some(v),
44412            _ => std::option::Option::None,
44413        })
44414    }
44415
44416    /// Sets the value of [config][crate::model::Task::config]
44417    /// to hold a `Notebook`.
44418    ///
44419    /// Note that all the setters affecting `config` are
44420    /// mutually exclusive.
44421    ///
44422    /// # Example
44423    /// ```ignore,no_run
44424    /// # use google_cloud_dataplex_v1::model::Task;
44425    /// use google_cloud_dataplex_v1::model::task::NotebookTaskConfig;
44426    /// let x = Task::new().set_notebook(NotebookTaskConfig::default()/* use setters */);
44427    /// assert!(x.notebook().is_some());
44428    /// assert!(x.spark().is_none());
44429    /// ```
44430    pub fn set_notebook<
44431        T: std::convert::Into<std::boxed::Box<crate::model::task::NotebookTaskConfig>>,
44432    >(
44433        mut self,
44434        v: T,
44435    ) -> Self {
44436        self.config = std::option::Option::Some(crate::model::task::Config::Notebook(v.into()));
44437        self
44438    }
44439}
44440
44441impl wkt::message::Message for Task {
44442    fn typename() -> &'static str {
44443        "type.googleapis.com/google.cloud.dataplex.v1.Task"
44444    }
44445}
44446
44447/// Defines additional types related to [Task].
44448pub mod task {
44449    #[allow(unused_imports)]
44450    use super::*;
44451
44452    /// Configuration for the underlying infrastructure used to run workloads.
44453    #[derive(Clone, Default, PartialEq)]
44454    #[non_exhaustive]
44455    pub struct InfrastructureSpec {
44456        /// Hardware config.
44457        pub resources: std::option::Option<crate::model::task::infrastructure_spec::Resources>,
44458
44459        /// Software config.
44460        pub runtime: std::option::Option<crate::model::task::infrastructure_spec::Runtime>,
44461
44462        /// Networking config.
44463        pub network: std::option::Option<crate::model::task::infrastructure_spec::Network>,
44464
44465        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44466    }
44467
44468    impl InfrastructureSpec {
44469        pub fn new() -> Self {
44470            std::default::Default::default()
44471        }
44472
44473        /// Sets the value of [resources][crate::model::task::InfrastructureSpec::resources].
44474        ///
44475        /// Note that all the setters affecting `resources` are mutually
44476        /// exclusive.
44477        ///
44478        /// # Example
44479        /// ```ignore,no_run
44480        /// # use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
44481        /// use google_cloud_dataplex_v1::model::task::infrastructure_spec::BatchComputeResources;
44482        /// let x = InfrastructureSpec::new().set_resources(Some(
44483        ///     google_cloud_dataplex_v1::model::task::infrastructure_spec::Resources::Batch(BatchComputeResources::default().into())));
44484        /// ```
44485        pub fn set_resources<
44486            T: std::convert::Into<
44487                    std::option::Option<crate::model::task::infrastructure_spec::Resources>,
44488                >,
44489        >(
44490            mut self,
44491            v: T,
44492        ) -> Self {
44493            self.resources = v.into();
44494            self
44495        }
44496
44497        /// The value of [resources][crate::model::task::InfrastructureSpec::resources]
44498        /// if it holds a `Batch`, `None` if the field is not set or
44499        /// holds a different branch.
44500        pub fn batch(
44501            &self,
44502        ) -> std::option::Option<
44503            &std::boxed::Box<crate::model::task::infrastructure_spec::BatchComputeResources>,
44504        > {
44505            #[allow(unreachable_patterns)]
44506            self.resources.as_ref().and_then(|v| match v {
44507                crate::model::task::infrastructure_spec::Resources::Batch(v) => {
44508                    std::option::Option::Some(v)
44509                }
44510                _ => std::option::Option::None,
44511            })
44512        }
44513
44514        /// Sets the value of [resources][crate::model::task::InfrastructureSpec::resources]
44515        /// to hold a `Batch`.
44516        ///
44517        /// Note that all the setters affecting `resources` are
44518        /// mutually exclusive.
44519        ///
44520        /// # Example
44521        /// ```ignore,no_run
44522        /// # use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
44523        /// use google_cloud_dataplex_v1::model::task::infrastructure_spec::BatchComputeResources;
44524        /// let x = InfrastructureSpec::new().set_batch(BatchComputeResources::default()/* use setters */);
44525        /// assert!(x.batch().is_some());
44526        /// ```
44527        pub fn set_batch<
44528            T: std::convert::Into<
44529                    std::boxed::Box<crate::model::task::infrastructure_spec::BatchComputeResources>,
44530                >,
44531        >(
44532            mut self,
44533            v: T,
44534        ) -> Self {
44535            self.resources = std::option::Option::Some(
44536                crate::model::task::infrastructure_spec::Resources::Batch(v.into()),
44537            );
44538            self
44539        }
44540
44541        /// Sets the value of [runtime][crate::model::task::InfrastructureSpec::runtime].
44542        ///
44543        /// Note that all the setters affecting `runtime` are mutually
44544        /// exclusive.
44545        ///
44546        /// # Example
44547        /// ```ignore,no_run
44548        /// # use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
44549        /// use google_cloud_dataplex_v1::model::task::infrastructure_spec::ContainerImageRuntime;
44550        /// let x = InfrastructureSpec::new().set_runtime(Some(
44551        ///     google_cloud_dataplex_v1::model::task::infrastructure_spec::Runtime::ContainerImage(ContainerImageRuntime::default().into())));
44552        /// ```
44553        pub fn set_runtime<
44554            T: std::convert::Into<
44555                    std::option::Option<crate::model::task::infrastructure_spec::Runtime>,
44556                >,
44557        >(
44558            mut self,
44559            v: T,
44560        ) -> Self {
44561            self.runtime = v.into();
44562            self
44563        }
44564
44565        /// The value of [runtime][crate::model::task::InfrastructureSpec::runtime]
44566        /// if it holds a `ContainerImage`, `None` if the field is not set or
44567        /// holds a different branch.
44568        pub fn container_image(
44569            &self,
44570        ) -> std::option::Option<
44571            &std::boxed::Box<crate::model::task::infrastructure_spec::ContainerImageRuntime>,
44572        > {
44573            #[allow(unreachable_patterns)]
44574            self.runtime.as_ref().and_then(|v| match v {
44575                crate::model::task::infrastructure_spec::Runtime::ContainerImage(v) => {
44576                    std::option::Option::Some(v)
44577                }
44578                _ => std::option::Option::None,
44579            })
44580        }
44581
44582        /// Sets the value of [runtime][crate::model::task::InfrastructureSpec::runtime]
44583        /// to hold a `ContainerImage`.
44584        ///
44585        /// Note that all the setters affecting `runtime` are
44586        /// mutually exclusive.
44587        ///
44588        /// # Example
44589        /// ```ignore,no_run
44590        /// # use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
44591        /// use google_cloud_dataplex_v1::model::task::infrastructure_spec::ContainerImageRuntime;
44592        /// let x = InfrastructureSpec::new().set_container_image(ContainerImageRuntime::default()/* use setters */);
44593        /// assert!(x.container_image().is_some());
44594        /// ```
44595        pub fn set_container_image<
44596            T: std::convert::Into<
44597                    std::boxed::Box<crate::model::task::infrastructure_spec::ContainerImageRuntime>,
44598                >,
44599        >(
44600            mut self,
44601            v: T,
44602        ) -> Self {
44603            self.runtime = std::option::Option::Some(
44604                crate::model::task::infrastructure_spec::Runtime::ContainerImage(v.into()),
44605            );
44606            self
44607        }
44608
44609        /// Sets the value of [network][crate::model::task::InfrastructureSpec::network].
44610        ///
44611        /// Note that all the setters affecting `network` are mutually
44612        /// exclusive.
44613        ///
44614        /// # Example
44615        /// ```ignore,no_run
44616        /// # use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
44617        /// use google_cloud_dataplex_v1::model::task::infrastructure_spec::VpcNetwork;
44618        /// let x = InfrastructureSpec::new().set_network(Some(
44619        ///     google_cloud_dataplex_v1::model::task::infrastructure_spec::Network::VpcNetwork(VpcNetwork::default().into())));
44620        /// ```
44621        pub fn set_network<
44622            T: std::convert::Into<
44623                    std::option::Option<crate::model::task::infrastructure_spec::Network>,
44624                >,
44625        >(
44626            mut self,
44627            v: T,
44628        ) -> Self {
44629            self.network = v.into();
44630            self
44631        }
44632
44633        /// The value of [network][crate::model::task::InfrastructureSpec::network]
44634        /// if it holds a `VpcNetwork`, `None` if the field is not set or
44635        /// holds a different branch.
44636        pub fn vpc_network(
44637            &self,
44638        ) -> std::option::Option<
44639            &std::boxed::Box<crate::model::task::infrastructure_spec::VpcNetwork>,
44640        > {
44641            #[allow(unreachable_patterns)]
44642            self.network.as_ref().and_then(|v| match v {
44643                crate::model::task::infrastructure_spec::Network::VpcNetwork(v) => {
44644                    std::option::Option::Some(v)
44645                }
44646                _ => std::option::Option::None,
44647            })
44648        }
44649
44650        /// Sets the value of [network][crate::model::task::InfrastructureSpec::network]
44651        /// to hold a `VpcNetwork`.
44652        ///
44653        /// Note that all the setters affecting `network` are
44654        /// mutually exclusive.
44655        ///
44656        /// # Example
44657        /// ```ignore,no_run
44658        /// # use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
44659        /// use google_cloud_dataplex_v1::model::task::infrastructure_spec::VpcNetwork;
44660        /// let x = InfrastructureSpec::new().set_vpc_network(VpcNetwork::default()/* use setters */);
44661        /// assert!(x.vpc_network().is_some());
44662        /// ```
44663        pub fn set_vpc_network<
44664            T: std::convert::Into<
44665                    std::boxed::Box<crate::model::task::infrastructure_spec::VpcNetwork>,
44666                >,
44667        >(
44668            mut self,
44669            v: T,
44670        ) -> Self {
44671            self.network = std::option::Option::Some(
44672                crate::model::task::infrastructure_spec::Network::VpcNetwork(v.into()),
44673            );
44674            self
44675        }
44676    }
44677
44678    impl wkt::message::Message for InfrastructureSpec {
44679        fn typename() -> &'static str {
44680            "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec"
44681        }
44682    }
44683
44684    /// Defines additional types related to [InfrastructureSpec].
44685    pub mod infrastructure_spec {
44686        #[allow(unused_imports)]
44687        use super::*;
44688
44689        /// Batch compute resources associated with the task.
44690        #[derive(Clone, Default, PartialEq)]
44691        #[non_exhaustive]
44692        pub struct BatchComputeResources {
44693            /// Optional. Total number of job executors.
44694            /// Executor Count should be between 2 and 100. [Default=2]
44695            pub executors_count: i32,
44696
44697            /// Optional. Max configurable executors.
44698            /// If max_executors_count > executors_count, then auto-scaling is enabled.
44699            /// Max Executor Count should be between 2 and 1000. [Default=1000]
44700            pub max_executors_count: i32,
44701
44702            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44703        }
44704
44705        impl BatchComputeResources {
44706            pub fn new() -> Self {
44707                std::default::Default::default()
44708            }
44709
44710            /// Sets the value of [executors_count][crate::model::task::infrastructure_spec::BatchComputeResources::executors_count].
44711            ///
44712            /// # Example
44713            /// ```ignore,no_run
44714            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::BatchComputeResources;
44715            /// let x = BatchComputeResources::new().set_executors_count(42);
44716            /// ```
44717            pub fn set_executors_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
44718                self.executors_count = v.into();
44719                self
44720            }
44721
44722            /// Sets the value of [max_executors_count][crate::model::task::infrastructure_spec::BatchComputeResources::max_executors_count].
44723            ///
44724            /// # Example
44725            /// ```ignore,no_run
44726            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::BatchComputeResources;
44727            /// let x = BatchComputeResources::new().set_max_executors_count(42);
44728            /// ```
44729            pub fn set_max_executors_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
44730                self.max_executors_count = v.into();
44731                self
44732            }
44733        }
44734
44735        impl wkt::message::Message for BatchComputeResources {
44736            fn typename() -> &'static str {
44737                "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources"
44738            }
44739        }
44740
44741        /// Container Image Runtime Configuration used with Batch execution.
44742        #[derive(Clone, Default, PartialEq)]
44743        #[non_exhaustive]
44744        pub struct ContainerImageRuntime {
44745            /// Optional. Container image to use.
44746            pub image: std::string::String,
44747
44748            /// Optional. A list of Java JARS to add to the classpath.
44749            /// Valid input includes Cloud Storage URIs to Jar binaries.
44750            /// For example, gs://bucket-name/my/path/to/file.jar
44751            pub java_jars: std::vec::Vec<std::string::String>,
44752
44753            /// Optional. A list of python packages to be installed.
44754            /// Valid formats include Cloud Storage URI to a PIP installable library.
44755            /// For example, gs://bucket-name/my/path/to/lib.tar.gz
44756            pub python_packages: std::vec::Vec<std::string::String>,
44757
44758            /// Optional. Override to common configuration of open source components
44759            /// installed on the Dataproc cluster. The properties to set on daemon
44760            /// config files. Property keys are specified in `prefix:property` format,
44761            /// for example `core:hadoop.tmp.dir`. For more information, see [Cluster
44762            /// properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
44763            pub properties: std::collections::HashMap<std::string::String, std::string::String>,
44764
44765            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44766        }
44767
44768        impl ContainerImageRuntime {
44769            pub fn new() -> Self {
44770                std::default::Default::default()
44771            }
44772
44773            /// Sets the value of [image][crate::model::task::infrastructure_spec::ContainerImageRuntime::image].
44774            ///
44775            /// # Example
44776            /// ```ignore,no_run
44777            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::ContainerImageRuntime;
44778            /// let x = ContainerImageRuntime::new().set_image("example");
44779            /// ```
44780            pub fn set_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44781                self.image = v.into();
44782                self
44783            }
44784
44785            /// Sets the value of [java_jars][crate::model::task::infrastructure_spec::ContainerImageRuntime::java_jars].
44786            ///
44787            /// # Example
44788            /// ```ignore,no_run
44789            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::ContainerImageRuntime;
44790            /// let x = ContainerImageRuntime::new().set_java_jars(["a", "b", "c"]);
44791            /// ```
44792            pub fn set_java_jars<T, V>(mut self, v: T) -> Self
44793            where
44794                T: std::iter::IntoIterator<Item = V>,
44795                V: std::convert::Into<std::string::String>,
44796            {
44797                use std::iter::Iterator;
44798                self.java_jars = v.into_iter().map(|i| i.into()).collect();
44799                self
44800            }
44801
44802            /// Sets the value of [python_packages][crate::model::task::infrastructure_spec::ContainerImageRuntime::python_packages].
44803            ///
44804            /// # Example
44805            /// ```ignore,no_run
44806            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::ContainerImageRuntime;
44807            /// let x = ContainerImageRuntime::new().set_python_packages(["a", "b", "c"]);
44808            /// ```
44809            pub fn set_python_packages<T, V>(mut self, v: T) -> Self
44810            where
44811                T: std::iter::IntoIterator<Item = V>,
44812                V: std::convert::Into<std::string::String>,
44813            {
44814                use std::iter::Iterator;
44815                self.python_packages = v.into_iter().map(|i| i.into()).collect();
44816                self
44817            }
44818
44819            /// Sets the value of [properties][crate::model::task::infrastructure_spec::ContainerImageRuntime::properties].
44820            ///
44821            /// # Example
44822            /// ```ignore,no_run
44823            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::ContainerImageRuntime;
44824            /// let x = ContainerImageRuntime::new().set_properties([
44825            ///     ("key0", "abc"),
44826            ///     ("key1", "xyz"),
44827            /// ]);
44828            /// ```
44829            pub fn set_properties<T, K, V>(mut self, v: T) -> Self
44830            where
44831                T: std::iter::IntoIterator<Item = (K, V)>,
44832                K: std::convert::Into<std::string::String>,
44833                V: std::convert::Into<std::string::String>,
44834            {
44835                use std::iter::Iterator;
44836                self.properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
44837                self
44838            }
44839        }
44840
44841        impl wkt::message::Message for ContainerImageRuntime {
44842            fn typename() -> &'static str {
44843                "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime"
44844            }
44845        }
44846
44847        /// Cloud VPC Network used to run the infrastructure.
44848        #[derive(Clone, Default, PartialEq)]
44849        #[non_exhaustive]
44850        pub struct VpcNetwork {
44851            /// Optional. List of network tags to apply to the job.
44852            pub network_tags: std::vec::Vec<std::string::String>,
44853
44854            /// The Cloud VPC network identifier.
44855            pub network_name: std::option::Option<
44856                crate::model::task::infrastructure_spec::vpc_network::NetworkName,
44857            >,
44858
44859            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44860        }
44861
44862        impl VpcNetwork {
44863            pub fn new() -> Self {
44864                std::default::Default::default()
44865            }
44866
44867            /// Sets the value of [network_tags][crate::model::task::infrastructure_spec::VpcNetwork::network_tags].
44868            ///
44869            /// # Example
44870            /// ```ignore,no_run
44871            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::VpcNetwork;
44872            /// let x = VpcNetwork::new().set_network_tags(["a", "b", "c"]);
44873            /// ```
44874            pub fn set_network_tags<T, V>(mut self, v: T) -> Self
44875            where
44876                T: std::iter::IntoIterator<Item = V>,
44877                V: std::convert::Into<std::string::String>,
44878            {
44879                use std::iter::Iterator;
44880                self.network_tags = v.into_iter().map(|i| i.into()).collect();
44881                self
44882            }
44883
44884            /// Sets the value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name].
44885            ///
44886            /// Note that all the setters affecting `network_name` are mutually
44887            /// exclusive.
44888            ///
44889            /// # Example
44890            /// ```ignore,no_run
44891            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::VpcNetwork;
44892            /// use google_cloud_dataplex_v1::model::task::infrastructure_spec::vpc_network::NetworkName;
44893            /// let x = VpcNetwork::new().set_network_name(Some(NetworkName::Network("example".to_string())));
44894            /// ```
44895            pub fn set_network_name<
44896                T: std::convert::Into<
44897                        std::option::Option<
44898                            crate::model::task::infrastructure_spec::vpc_network::NetworkName,
44899                        >,
44900                    >,
44901            >(
44902                mut self,
44903                v: T,
44904            ) -> Self {
44905                self.network_name = v.into();
44906                self
44907            }
44908
44909            /// The value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name]
44910            /// if it holds a `Network`, `None` if the field is not set or
44911            /// holds a different branch.
44912            pub fn network(&self) -> std::option::Option<&std::string::String> {
44913                #[allow(unreachable_patterns)]
44914                self.network_name.as_ref().and_then(|v| match v {
44915                    crate::model::task::infrastructure_spec::vpc_network::NetworkName::Network(
44916                        v,
44917                    ) => std::option::Option::Some(v),
44918                    _ => std::option::Option::None,
44919                })
44920            }
44921
44922            /// Sets the value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name]
44923            /// to hold a `Network`.
44924            ///
44925            /// Note that all the setters affecting `network_name` are
44926            /// mutually exclusive.
44927            ///
44928            /// # Example
44929            /// ```ignore,no_run
44930            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::VpcNetwork;
44931            /// let x = VpcNetwork::new().set_network("example");
44932            /// assert!(x.network().is_some());
44933            /// assert!(x.sub_network().is_none());
44934            /// ```
44935            pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44936                self.network_name = std::option::Option::Some(
44937                    crate::model::task::infrastructure_spec::vpc_network::NetworkName::Network(
44938                        v.into(),
44939                    ),
44940                );
44941                self
44942            }
44943
44944            /// The value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name]
44945            /// if it holds a `SubNetwork`, `None` if the field is not set or
44946            /// holds a different branch.
44947            pub fn sub_network(&self) -> std::option::Option<&std::string::String> {
44948                #[allow(unreachable_patterns)]
44949                self.network_name.as_ref().and_then(|v| match v {
44950                    crate::model::task::infrastructure_spec::vpc_network::NetworkName::SubNetwork(v) => std::option::Option::Some(v),
44951                    _ => std::option::Option::None,
44952                })
44953            }
44954
44955            /// Sets the value of [network_name][crate::model::task::infrastructure_spec::VpcNetwork::network_name]
44956            /// to hold a `SubNetwork`.
44957            ///
44958            /// Note that all the setters affecting `network_name` are
44959            /// mutually exclusive.
44960            ///
44961            /// # Example
44962            /// ```ignore,no_run
44963            /// # use google_cloud_dataplex_v1::model::task::infrastructure_spec::VpcNetwork;
44964            /// let x = VpcNetwork::new().set_sub_network("example");
44965            /// assert!(x.sub_network().is_some());
44966            /// assert!(x.network().is_none());
44967            /// ```
44968            pub fn set_sub_network<T: std::convert::Into<std::string::String>>(
44969                mut self,
44970                v: T,
44971            ) -> Self {
44972                self.network_name = std::option::Option::Some(
44973                    crate::model::task::infrastructure_spec::vpc_network::NetworkName::SubNetwork(
44974                        v.into(),
44975                    ),
44976                );
44977                self
44978            }
44979        }
44980
44981        impl wkt::message::Message for VpcNetwork {
44982            fn typename() -> &'static str {
44983                "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork"
44984            }
44985        }
44986
44987        /// Defines additional types related to [VpcNetwork].
44988        pub mod vpc_network {
44989            #[allow(unused_imports)]
44990            use super::*;
44991
44992            /// The Cloud VPC network identifier.
44993            #[derive(Clone, Debug, PartialEq)]
44994            #[non_exhaustive]
44995            pub enum NetworkName {
44996                /// Optional. The Cloud VPC network in which the job is run. By default,
44997                /// the Cloud VPC network named Default within the project is used.
44998                Network(std::string::String),
44999                /// Optional. The Cloud VPC sub-network in which the job is run.
45000                SubNetwork(std::string::String),
45001            }
45002        }
45003
45004        /// Hardware config.
45005        #[derive(Clone, Debug, PartialEq)]
45006        #[non_exhaustive]
45007        pub enum Resources {
45008            /// Compute resources needed for a Task when using Dataproc Serverless.
45009            Batch(std::boxed::Box<crate::model::task::infrastructure_spec::BatchComputeResources>),
45010        }
45011
45012        /// Software config.
45013        #[derive(Clone, Debug, PartialEq)]
45014        #[non_exhaustive]
45015        pub enum Runtime {
45016            /// Container Image Runtime Configuration.
45017            ContainerImage(
45018                std::boxed::Box<crate::model::task::infrastructure_spec::ContainerImageRuntime>,
45019            ),
45020        }
45021
45022        /// Networking config.
45023        #[derive(Clone, Debug, PartialEq)]
45024        #[non_exhaustive]
45025        pub enum Network {
45026            /// Vpc network.
45027            VpcNetwork(std::boxed::Box<crate::model::task::infrastructure_spec::VpcNetwork>),
45028        }
45029    }
45030
45031    /// Task scheduling and trigger settings.
45032    #[derive(Clone, Default, PartialEq)]
45033    #[non_exhaustive]
45034    pub struct TriggerSpec {
45035        /// Required. Immutable. Trigger type of the user-specified Task.
45036        pub r#type: crate::model::task::trigger_spec::Type,
45037
45038        /// Optional. The first run of the task will be after this time.
45039        /// If not specified, the task will run shortly after being submitted if
45040        /// ON_DEMAND and based on the schedule if RECURRING.
45041        pub start_time: std::option::Option<wkt::Timestamp>,
45042
45043        /// Optional. Prevent the task from executing.
45044        /// This does not cancel already running tasks. It is intended to temporarily
45045        /// disable RECURRING tasks.
45046        pub disabled: bool,
45047
45048        /// Optional. Number of retry attempts before aborting.
45049        /// Set to zero to never attempt to retry a failed task.
45050        pub max_retries: i32,
45051
45052        /// Trigger only applies for RECURRING tasks.
45053        pub trigger: std::option::Option<crate::model::task::trigger_spec::Trigger>,
45054
45055        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45056    }
45057
45058    impl TriggerSpec {
45059        pub fn new() -> Self {
45060            std::default::Default::default()
45061        }
45062
45063        /// Sets the value of [r#type][crate::model::task::TriggerSpec::type].
45064        ///
45065        /// # Example
45066        /// ```ignore,no_run
45067        /// # use google_cloud_dataplex_v1::model::task::TriggerSpec;
45068        /// use google_cloud_dataplex_v1::model::task::trigger_spec::Type;
45069        /// let x0 = TriggerSpec::new().set_type(Type::OnDemand);
45070        /// let x1 = TriggerSpec::new().set_type(Type::Recurring);
45071        /// ```
45072        pub fn set_type<T: std::convert::Into<crate::model::task::trigger_spec::Type>>(
45073            mut self,
45074            v: T,
45075        ) -> Self {
45076            self.r#type = v.into();
45077            self
45078        }
45079
45080        /// Sets the value of [start_time][crate::model::task::TriggerSpec::start_time].
45081        ///
45082        /// # Example
45083        /// ```ignore,no_run
45084        /// # use google_cloud_dataplex_v1::model::task::TriggerSpec;
45085        /// use wkt::Timestamp;
45086        /// let x = TriggerSpec::new().set_start_time(Timestamp::default()/* use setters */);
45087        /// ```
45088        pub fn set_start_time<T>(mut self, v: T) -> Self
45089        where
45090            T: std::convert::Into<wkt::Timestamp>,
45091        {
45092            self.start_time = std::option::Option::Some(v.into());
45093            self
45094        }
45095
45096        /// Sets or clears the value of [start_time][crate::model::task::TriggerSpec::start_time].
45097        ///
45098        /// # Example
45099        /// ```ignore,no_run
45100        /// # use google_cloud_dataplex_v1::model::task::TriggerSpec;
45101        /// use wkt::Timestamp;
45102        /// let x = TriggerSpec::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
45103        /// let x = TriggerSpec::new().set_or_clear_start_time(None::<Timestamp>);
45104        /// ```
45105        pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
45106        where
45107            T: std::convert::Into<wkt::Timestamp>,
45108        {
45109            self.start_time = v.map(|x| x.into());
45110            self
45111        }
45112
45113        /// Sets the value of [disabled][crate::model::task::TriggerSpec::disabled].
45114        ///
45115        /// # Example
45116        /// ```ignore,no_run
45117        /// # use google_cloud_dataplex_v1::model::task::TriggerSpec;
45118        /// let x = TriggerSpec::new().set_disabled(true);
45119        /// ```
45120        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
45121            self.disabled = v.into();
45122            self
45123        }
45124
45125        /// Sets the value of [max_retries][crate::model::task::TriggerSpec::max_retries].
45126        ///
45127        /// # Example
45128        /// ```ignore,no_run
45129        /// # use google_cloud_dataplex_v1::model::task::TriggerSpec;
45130        /// let x = TriggerSpec::new().set_max_retries(42);
45131        /// ```
45132        pub fn set_max_retries<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
45133            self.max_retries = v.into();
45134            self
45135        }
45136
45137        /// Sets the value of [trigger][crate::model::task::TriggerSpec::trigger].
45138        ///
45139        /// Note that all the setters affecting `trigger` are mutually
45140        /// exclusive.
45141        ///
45142        /// # Example
45143        /// ```ignore,no_run
45144        /// # use google_cloud_dataplex_v1::model::task::TriggerSpec;
45145        /// use google_cloud_dataplex_v1::model::task::trigger_spec::Trigger;
45146        /// let x = TriggerSpec::new().set_trigger(Some(Trigger::Schedule("example".to_string())));
45147        /// ```
45148        pub fn set_trigger<
45149            T: std::convert::Into<std::option::Option<crate::model::task::trigger_spec::Trigger>>,
45150        >(
45151            mut self,
45152            v: T,
45153        ) -> Self {
45154            self.trigger = v.into();
45155            self
45156        }
45157
45158        /// The value of [trigger][crate::model::task::TriggerSpec::trigger]
45159        /// if it holds a `Schedule`, `None` if the field is not set or
45160        /// holds a different branch.
45161        pub fn schedule(&self) -> std::option::Option<&std::string::String> {
45162            #[allow(unreachable_patterns)]
45163            self.trigger.as_ref().and_then(|v| match v {
45164                crate::model::task::trigger_spec::Trigger::Schedule(v) => {
45165                    std::option::Option::Some(v)
45166                }
45167                _ => std::option::Option::None,
45168            })
45169        }
45170
45171        /// Sets the value of [trigger][crate::model::task::TriggerSpec::trigger]
45172        /// to hold a `Schedule`.
45173        ///
45174        /// Note that all the setters affecting `trigger` are
45175        /// mutually exclusive.
45176        ///
45177        /// # Example
45178        /// ```ignore,no_run
45179        /// # use google_cloud_dataplex_v1::model::task::TriggerSpec;
45180        /// let x = TriggerSpec::new().set_schedule("example");
45181        /// assert!(x.schedule().is_some());
45182        /// ```
45183        pub fn set_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45184            self.trigger = std::option::Option::Some(
45185                crate::model::task::trigger_spec::Trigger::Schedule(v.into()),
45186            );
45187            self
45188        }
45189    }
45190
45191    impl wkt::message::Message for TriggerSpec {
45192        fn typename() -> &'static str {
45193            "type.googleapis.com/google.cloud.dataplex.v1.Task.TriggerSpec"
45194        }
45195    }
45196
45197    /// Defines additional types related to [TriggerSpec].
45198    pub mod trigger_spec {
45199        #[allow(unused_imports)]
45200        use super::*;
45201
45202        /// Determines how often and when the job will run.
45203        ///
45204        /// # Working with unknown values
45205        ///
45206        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
45207        /// additional enum variants at any time. Adding new variants is not considered
45208        /// a breaking change. Applications should write their code in anticipation of:
45209        ///
45210        /// - New values appearing in future releases of the client library, **and**
45211        /// - New values received dynamically, without application changes.
45212        ///
45213        /// Please consult the [Working with enums] section in the user guide for some
45214        /// guidelines.
45215        ///
45216        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
45217        #[derive(Clone, Debug, PartialEq)]
45218        #[non_exhaustive]
45219        pub enum Type {
45220            /// Unspecified trigger type.
45221            Unspecified,
45222            /// The task runs one-time shortly after Task Creation.
45223            OnDemand,
45224            /// The task is scheduled to run periodically.
45225            Recurring,
45226            /// If set, the enum was initialized with an unknown value.
45227            ///
45228            /// Applications can examine the value using [Type::value] or
45229            /// [Type::name].
45230            UnknownValue(r#type::UnknownValue),
45231        }
45232
45233        #[doc(hidden)]
45234        pub mod r#type {
45235            #[allow(unused_imports)]
45236            use super::*;
45237            #[derive(Clone, Debug, PartialEq)]
45238            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
45239        }
45240
45241        impl Type {
45242            /// Gets the enum value.
45243            ///
45244            /// Returns `None` if the enum contains an unknown value deserialized from
45245            /// the string representation of enums.
45246            pub fn value(&self) -> std::option::Option<i32> {
45247                match self {
45248                    Self::Unspecified => std::option::Option::Some(0),
45249                    Self::OnDemand => std::option::Option::Some(1),
45250                    Self::Recurring => std::option::Option::Some(2),
45251                    Self::UnknownValue(u) => u.0.value(),
45252                }
45253            }
45254
45255            /// Gets the enum value as a string.
45256            ///
45257            /// Returns `None` if the enum contains an unknown value deserialized from
45258            /// the integer representation of enums.
45259            pub fn name(&self) -> std::option::Option<&str> {
45260                match self {
45261                    Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
45262                    Self::OnDemand => std::option::Option::Some("ON_DEMAND"),
45263                    Self::Recurring => std::option::Option::Some("RECURRING"),
45264                    Self::UnknownValue(u) => u.0.name(),
45265                }
45266            }
45267        }
45268
45269        impl std::default::Default for Type {
45270            fn default() -> Self {
45271                use std::convert::From;
45272                Self::from(0)
45273            }
45274        }
45275
45276        impl std::fmt::Display for Type {
45277            fn fmt(
45278                &self,
45279                f: &mut std::fmt::Formatter<'_>,
45280            ) -> std::result::Result<(), std::fmt::Error> {
45281                wkt::internal::display_enum(f, self.name(), self.value())
45282            }
45283        }
45284
45285        impl std::convert::From<i32> for Type {
45286            fn from(value: i32) -> Self {
45287                match value {
45288                    0 => Self::Unspecified,
45289                    1 => Self::OnDemand,
45290                    2 => Self::Recurring,
45291                    _ => Self::UnknownValue(r#type::UnknownValue(
45292                        wkt::internal::UnknownEnumValue::Integer(value),
45293                    )),
45294                }
45295            }
45296        }
45297
45298        impl std::convert::From<&str> for Type {
45299            fn from(value: &str) -> Self {
45300                use std::string::ToString;
45301                match value {
45302                    "TYPE_UNSPECIFIED" => Self::Unspecified,
45303                    "ON_DEMAND" => Self::OnDemand,
45304                    "RECURRING" => Self::Recurring,
45305                    _ => Self::UnknownValue(r#type::UnknownValue(
45306                        wkt::internal::UnknownEnumValue::String(value.to_string()),
45307                    )),
45308                }
45309            }
45310        }
45311
45312        impl serde::ser::Serialize for Type {
45313            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
45314            where
45315                S: serde::Serializer,
45316            {
45317                match self {
45318                    Self::Unspecified => serializer.serialize_i32(0),
45319                    Self::OnDemand => serializer.serialize_i32(1),
45320                    Self::Recurring => serializer.serialize_i32(2),
45321                    Self::UnknownValue(u) => u.0.serialize(serializer),
45322                }
45323            }
45324        }
45325
45326        impl<'de> serde::de::Deserialize<'de> for Type {
45327            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
45328            where
45329                D: serde::Deserializer<'de>,
45330            {
45331                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
45332                    ".google.cloud.dataplex.v1.Task.TriggerSpec.Type",
45333                ))
45334            }
45335        }
45336
45337        /// Trigger only applies for RECURRING tasks.
45338        #[derive(Clone, Debug, PartialEq)]
45339        #[non_exhaustive]
45340        pub enum Trigger {
45341            /// Optional. Cron schedule (<https://en.wikipedia.org/wiki/Cron>) for
45342            /// running tasks periodically. To explicitly set a timezone to the cron
45343            /// tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or
45344            /// "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid
45345            /// string from IANA time zone database. For example,
45346            /// `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * *
45347            /// *`. This field is required for RECURRING tasks.
45348            Schedule(std::string::String),
45349        }
45350    }
45351
45352    /// Execution related settings, like retry and service_account.
45353    #[derive(Clone, Default, PartialEq)]
45354    #[non_exhaustive]
45355    pub struct ExecutionSpec {
45356        /// Optional. The arguments to pass to the task.
45357        /// The args can use placeholders of the format ${placeholder} as
45358        /// part of key/value string. These will be interpolated before passing the
45359        /// args to the driver. Currently supported placeholders:
45360        ///
45361        /// - ${task_id}
45362        /// - ${job_time}
45363        ///   To pass positional args, set the key as TASK_ARGS. The value should be a
45364        ///   comma-separated string of all the positional arguments. To use a
45365        ///   delimiter other than comma, refer to
45366        ///   <https://cloud.google.com/sdk/gcloud/reference/topic/escaping>. In case of
45367        ///   other keys being present in the args, then TASK_ARGS will be passed as
45368        ///   the last argument.
45369        pub args: std::collections::HashMap<std::string::String, std::string::String>,
45370
45371        /// Required. Service account to use to execute a task.
45372        /// If not provided, the default Compute service account for the project is
45373        /// used.
45374        pub service_account: std::string::String,
45375
45376        /// Optional. The project in which jobs are run. By default, the project
45377        /// containing the Lake is used. If a project is provided, the
45378        /// [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account]
45379        /// must belong to this project.
45380        ///
45381        /// [google.cloud.dataplex.v1.Task.ExecutionSpec.service_account]: crate::model::task::ExecutionSpec::service_account
45382        pub project: std::string::String,
45383
45384        /// Optional. The maximum duration after which the job execution is expired.
45385        pub max_job_execution_lifetime: std::option::Option<wkt::Duration>,
45386
45387        /// Optional. The Cloud KMS key to use for encryption, of the form:
45388        /// `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`.
45389        pub kms_key: std::string::String,
45390
45391        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45392    }
45393
45394    impl ExecutionSpec {
45395        pub fn new() -> Self {
45396            std::default::Default::default()
45397        }
45398
45399        /// Sets the value of [args][crate::model::task::ExecutionSpec::args].
45400        ///
45401        /// # Example
45402        /// ```ignore,no_run
45403        /// # use google_cloud_dataplex_v1::model::task::ExecutionSpec;
45404        /// let x = ExecutionSpec::new().set_args([
45405        ///     ("key0", "abc"),
45406        ///     ("key1", "xyz"),
45407        /// ]);
45408        /// ```
45409        pub fn set_args<T, K, V>(mut self, v: T) -> Self
45410        where
45411            T: std::iter::IntoIterator<Item = (K, V)>,
45412            K: std::convert::Into<std::string::String>,
45413            V: std::convert::Into<std::string::String>,
45414        {
45415            use std::iter::Iterator;
45416            self.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
45417            self
45418        }
45419
45420        /// Sets the value of [service_account][crate::model::task::ExecutionSpec::service_account].
45421        ///
45422        /// # Example
45423        /// ```ignore,no_run
45424        /// # use google_cloud_dataplex_v1::model::task::ExecutionSpec;
45425        /// let x = ExecutionSpec::new().set_service_account("example");
45426        /// ```
45427        pub fn set_service_account<T: std::convert::Into<std::string::String>>(
45428            mut self,
45429            v: T,
45430        ) -> Self {
45431            self.service_account = v.into();
45432            self
45433        }
45434
45435        /// Sets the value of [project][crate::model::task::ExecutionSpec::project].
45436        ///
45437        /// # Example
45438        /// ```ignore,no_run
45439        /// # use google_cloud_dataplex_v1::model::task::ExecutionSpec;
45440        /// let x = ExecutionSpec::new().set_project("example");
45441        /// ```
45442        pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45443            self.project = v.into();
45444            self
45445        }
45446
45447        /// Sets the value of [max_job_execution_lifetime][crate::model::task::ExecutionSpec::max_job_execution_lifetime].
45448        ///
45449        /// # Example
45450        /// ```ignore,no_run
45451        /// # use google_cloud_dataplex_v1::model::task::ExecutionSpec;
45452        /// use wkt::Duration;
45453        /// let x = ExecutionSpec::new().set_max_job_execution_lifetime(Duration::default()/* use setters */);
45454        /// ```
45455        pub fn set_max_job_execution_lifetime<T>(mut self, v: T) -> Self
45456        where
45457            T: std::convert::Into<wkt::Duration>,
45458        {
45459            self.max_job_execution_lifetime = std::option::Option::Some(v.into());
45460            self
45461        }
45462
45463        /// Sets or clears the value of [max_job_execution_lifetime][crate::model::task::ExecutionSpec::max_job_execution_lifetime].
45464        ///
45465        /// # Example
45466        /// ```ignore,no_run
45467        /// # use google_cloud_dataplex_v1::model::task::ExecutionSpec;
45468        /// use wkt::Duration;
45469        /// let x = ExecutionSpec::new().set_or_clear_max_job_execution_lifetime(Some(Duration::default()/* use setters */));
45470        /// let x = ExecutionSpec::new().set_or_clear_max_job_execution_lifetime(None::<Duration>);
45471        /// ```
45472        pub fn set_or_clear_max_job_execution_lifetime<T>(
45473            mut self,
45474            v: std::option::Option<T>,
45475        ) -> Self
45476        where
45477            T: std::convert::Into<wkt::Duration>,
45478        {
45479            self.max_job_execution_lifetime = v.map(|x| x.into());
45480            self
45481        }
45482
45483        /// Sets the value of [kms_key][crate::model::task::ExecutionSpec::kms_key].
45484        ///
45485        /// # Example
45486        /// ```ignore,no_run
45487        /// # use google_cloud_dataplex_v1::model::task::ExecutionSpec;
45488        /// let x = ExecutionSpec::new().set_kms_key("example");
45489        /// ```
45490        pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45491            self.kms_key = v.into();
45492            self
45493        }
45494    }
45495
45496    impl wkt::message::Message for ExecutionSpec {
45497        fn typename() -> &'static str {
45498            "type.googleapis.com/google.cloud.dataplex.v1.Task.ExecutionSpec"
45499        }
45500    }
45501
45502    /// User-specified config for running a Spark task.
45503    #[derive(Clone, Default, PartialEq)]
45504    #[non_exhaustive]
45505    pub struct SparkTaskConfig {
45506        /// Optional. Cloud Storage URIs of files to be placed in the working
45507        /// directory of each executor.
45508        pub file_uris: std::vec::Vec<std::string::String>,
45509
45510        /// Optional. Cloud Storage URIs of archives to be extracted into the working
45511        /// directory of each executor. Supported file types: .jar, .tar, .tar.gz,
45512        /// .tgz, and .zip.
45513        pub archive_uris: std::vec::Vec<std::string::String>,
45514
45515        /// Optional. Infrastructure specification for the execution.
45516        pub infrastructure_spec: std::option::Option<crate::model::task::InfrastructureSpec>,
45517
45518        /// Required. The specification of the main method to call to drive the
45519        /// job. Specify either the jar file that contains the main class or the
45520        /// main class name.
45521        pub driver: std::option::Option<crate::model::task::spark_task_config::Driver>,
45522
45523        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45524    }
45525
45526    impl SparkTaskConfig {
45527        pub fn new() -> Self {
45528            std::default::Default::default()
45529        }
45530
45531        /// Sets the value of [file_uris][crate::model::task::SparkTaskConfig::file_uris].
45532        ///
45533        /// # Example
45534        /// ```ignore,no_run
45535        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45536        /// let x = SparkTaskConfig::new().set_file_uris(["a", "b", "c"]);
45537        /// ```
45538        pub fn set_file_uris<T, V>(mut self, v: T) -> Self
45539        where
45540            T: std::iter::IntoIterator<Item = V>,
45541            V: std::convert::Into<std::string::String>,
45542        {
45543            use std::iter::Iterator;
45544            self.file_uris = v.into_iter().map(|i| i.into()).collect();
45545            self
45546        }
45547
45548        /// Sets the value of [archive_uris][crate::model::task::SparkTaskConfig::archive_uris].
45549        ///
45550        /// # Example
45551        /// ```ignore,no_run
45552        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45553        /// let x = SparkTaskConfig::new().set_archive_uris(["a", "b", "c"]);
45554        /// ```
45555        pub fn set_archive_uris<T, V>(mut self, v: T) -> Self
45556        where
45557            T: std::iter::IntoIterator<Item = V>,
45558            V: std::convert::Into<std::string::String>,
45559        {
45560            use std::iter::Iterator;
45561            self.archive_uris = v.into_iter().map(|i| i.into()).collect();
45562            self
45563        }
45564
45565        /// Sets the value of [infrastructure_spec][crate::model::task::SparkTaskConfig::infrastructure_spec].
45566        ///
45567        /// # Example
45568        /// ```ignore,no_run
45569        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45570        /// use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
45571        /// let x = SparkTaskConfig::new().set_infrastructure_spec(InfrastructureSpec::default()/* use setters */);
45572        /// ```
45573        pub fn set_infrastructure_spec<T>(mut self, v: T) -> Self
45574        where
45575            T: std::convert::Into<crate::model::task::InfrastructureSpec>,
45576        {
45577            self.infrastructure_spec = std::option::Option::Some(v.into());
45578            self
45579        }
45580
45581        /// Sets or clears the value of [infrastructure_spec][crate::model::task::SparkTaskConfig::infrastructure_spec].
45582        ///
45583        /// # Example
45584        /// ```ignore,no_run
45585        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45586        /// use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
45587        /// let x = SparkTaskConfig::new().set_or_clear_infrastructure_spec(Some(InfrastructureSpec::default()/* use setters */));
45588        /// let x = SparkTaskConfig::new().set_or_clear_infrastructure_spec(None::<InfrastructureSpec>);
45589        /// ```
45590        pub fn set_or_clear_infrastructure_spec<T>(mut self, v: std::option::Option<T>) -> Self
45591        where
45592            T: std::convert::Into<crate::model::task::InfrastructureSpec>,
45593        {
45594            self.infrastructure_spec = v.map(|x| x.into());
45595            self
45596        }
45597
45598        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver].
45599        ///
45600        /// Note that all the setters affecting `driver` are mutually
45601        /// exclusive.
45602        ///
45603        /// # Example
45604        /// ```ignore,no_run
45605        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45606        /// use google_cloud_dataplex_v1::model::task::spark_task_config::Driver;
45607        /// let x = SparkTaskConfig::new().set_driver(Some(Driver::MainJarFileUri("example".to_string())));
45608        /// ```
45609        pub fn set_driver<
45610            T: std::convert::Into<std::option::Option<crate::model::task::spark_task_config::Driver>>,
45611        >(
45612            mut self,
45613            v: T,
45614        ) -> Self {
45615            self.driver = v.into();
45616            self
45617        }
45618
45619        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
45620        /// if it holds a `MainJarFileUri`, `None` if the field is not set or
45621        /// holds a different branch.
45622        pub fn main_jar_file_uri(&self) -> std::option::Option<&std::string::String> {
45623            #[allow(unreachable_patterns)]
45624            self.driver.as_ref().and_then(|v| match v {
45625                crate::model::task::spark_task_config::Driver::MainJarFileUri(v) => {
45626                    std::option::Option::Some(v)
45627                }
45628                _ => std::option::Option::None,
45629            })
45630        }
45631
45632        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
45633        /// to hold a `MainJarFileUri`.
45634        ///
45635        /// Note that all the setters affecting `driver` are
45636        /// mutually exclusive.
45637        ///
45638        /// # Example
45639        /// ```ignore,no_run
45640        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45641        /// let x = SparkTaskConfig::new().set_main_jar_file_uri("example");
45642        /// assert!(x.main_jar_file_uri().is_some());
45643        /// assert!(x.main_class().is_none());
45644        /// assert!(x.python_script_file().is_none());
45645        /// assert!(x.sql_script_file().is_none());
45646        /// assert!(x.sql_script().is_none());
45647        /// ```
45648        pub fn set_main_jar_file_uri<T: std::convert::Into<std::string::String>>(
45649            mut self,
45650            v: T,
45651        ) -> Self {
45652            self.driver = std::option::Option::Some(
45653                crate::model::task::spark_task_config::Driver::MainJarFileUri(v.into()),
45654            );
45655            self
45656        }
45657
45658        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
45659        /// if it holds a `MainClass`, `None` if the field is not set or
45660        /// holds a different branch.
45661        pub fn main_class(&self) -> std::option::Option<&std::string::String> {
45662            #[allow(unreachable_patterns)]
45663            self.driver.as_ref().and_then(|v| match v {
45664                crate::model::task::spark_task_config::Driver::MainClass(v) => {
45665                    std::option::Option::Some(v)
45666                }
45667                _ => std::option::Option::None,
45668            })
45669        }
45670
45671        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
45672        /// to hold a `MainClass`.
45673        ///
45674        /// Note that all the setters affecting `driver` are
45675        /// mutually exclusive.
45676        ///
45677        /// # Example
45678        /// ```ignore,no_run
45679        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45680        /// let x = SparkTaskConfig::new().set_main_class("example");
45681        /// assert!(x.main_class().is_some());
45682        /// assert!(x.main_jar_file_uri().is_none());
45683        /// assert!(x.python_script_file().is_none());
45684        /// assert!(x.sql_script_file().is_none());
45685        /// assert!(x.sql_script().is_none());
45686        /// ```
45687        pub fn set_main_class<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45688            self.driver = std::option::Option::Some(
45689                crate::model::task::spark_task_config::Driver::MainClass(v.into()),
45690            );
45691            self
45692        }
45693
45694        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
45695        /// if it holds a `PythonScriptFile`, `None` if the field is not set or
45696        /// holds a different branch.
45697        pub fn python_script_file(&self) -> std::option::Option<&std::string::String> {
45698            #[allow(unreachable_patterns)]
45699            self.driver.as_ref().and_then(|v| match v {
45700                crate::model::task::spark_task_config::Driver::PythonScriptFile(v) => {
45701                    std::option::Option::Some(v)
45702                }
45703                _ => std::option::Option::None,
45704            })
45705        }
45706
45707        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
45708        /// to hold a `PythonScriptFile`.
45709        ///
45710        /// Note that all the setters affecting `driver` are
45711        /// mutually exclusive.
45712        ///
45713        /// # Example
45714        /// ```ignore,no_run
45715        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45716        /// let x = SparkTaskConfig::new().set_python_script_file("example");
45717        /// assert!(x.python_script_file().is_some());
45718        /// assert!(x.main_jar_file_uri().is_none());
45719        /// assert!(x.main_class().is_none());
45720        /// assert!(x.sql_script_file().is_none());
45721        /// assert!(x.sql_script().is_none());
45722        /// ```
45723        pub fn set_python_script_file<T: std::convert::Into<std::string::String>>(
45724            mut self,
45725            v: T,
45726        ) -> Self {
45727            self.driver = std::option::Option::Some(
45728                crate::model::task::spark_task_config::Driver::PythonScriptFile(v.into()),
45729            );
45730            self
45731        }
45732
45733        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
45734        /// if it holds a `SqlScriptFile`, `None` if the field is not set or
45735        /// holds a different branch.
45736        pub fn sql_script_file(&self) -> std::option::Option<&std::string::String> {
45737            #[allow(unreachable_patterns)]
45738            self.driver.as_ref().and_then(|v| match v {
45739                crate::model::task::spark_task_config::Driver::SqlScriptFile(v) => {
45740                    std::option::Option::Some(v)
45741                }
45742                _ => std::option::Option::None,
45743            })
45744        }
45745
45746        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
45747        /// to hold a `SqlScriptFile`.
45748        ///
45749        /// Note that all the setters affecting `driver` are
45750        /// mutually exclusive.
45751        ///
45752        /// # Example
45753        /// ```ignore,no_run
45754        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45755        /// let x = SparkTaskConfig::new().set_sql_script_file("example");
45756        /// assert!(x.sql_script_file().is_some());
45757        /// assert!(x.main_jar_file_uri().is_none());
45758        /// assert!(x.main_class().is_none());
45759        /// assert!(x.python_script_file().is_none());
45760        /// assert!(x.sql_script().is_none());
45761        /// ```
45762        pub fn set_sql_script_file<T: std::convert::Into<std::string::String>>(
45763            mut self,
45764            v: T,
45765        ) -> Self {
45766            self.driver = std::option::Option::Some(
45767                crate::model::task::spark_task_config::Driver::SqlScriptFile(v.into()),
45768            );
45769            self
45770        }
45771
45772        /// The value of [driver][crate::model::task::SparkTaskConfig::driver]
45773        /// if it holds a `SqlScript`, `None` if the field is not set or
45774        /// holds a different branch.
45775        pub fn sql_script(&self) -> std::option::Option<&std::string::String> {
45776            #[allow(unreachable_patterns)]
45777            self.driver.as_ref().and_then(|v| match v {
45778                crate::model::task::spark_task_config::Driver::SqlScript(v) => {
45779                    std::option::Option::Some(v)
45780                }
45781                _ => std::option::Option::None,
45782            })
45783        }
45784
45785        /// Sets the value of [driver][crate::model::task::SparkTaskConfig::driver]
45786        /// to hold a `SqlScript`.
45787        ///
45788        /// Note that all the setters affecting `driver` are
45789        /// mutually exclusive.
45790        ///
45791        /// # Example
45792        /// ```ignore,no_run
45793        /// # use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
45794        /// let x = SparkTaskConfig::new().set_sql_script("example");
45795        /// assert!(x.sql_script().is_some());
45796        /// assert!(x.main_jar_file_uri().is_none());
45797        /// assert!(x.main_class().is_none());
45798        /// assert!(x.python_script_file().is_none());
45799        /// assert!(x.sql_script_file().is_none());
45800        /// ```
45801        pub fn set_sql_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45802            self.driver = std::option::Option::Some(
45803                crate::model::task::spark_task_config::Driver::SqlScript(v.into()),
45804            );
45805            self
45806        }
45807    }
45808
45809    impl wkt::message::Message for SparkTaskConfig {
45810        fn typename() -> &'static str {
45811            "type.googleapis.com/google.cloud.dataplex.v1.Task.SparkTaskConfig"
45812        }
45813    }
45814
45815    /// Defines additional types related to [SparkTaskConfig].
45816    pub mod spark_task_config {
45817        #[allow(unused_imports)]
45818        use super::*;
45819
45820        /// Required. The specification of the main method to call to drive the
45821        /// job. Specify either the jar file that contains the main class or the
45822        /// main class name.
45823        #[derive(Clone, Debug, PartialEq)]
45824        #[non_exhaustive]
45825        pub enum Driver {
45826            /// The Cloud Storage URI of the jar file that contains the main class.
45827            /// The execution args are passed in as a sequence of named process
45828            /// arguments (`--key=value`).
45829            MainJarFileUri(std::string::String),
45830            /// The name of the driver's main class. The jar file that contains the
45831            /// class must be in the default CLASSPATH or specified in
45832            /// `jar_file_uris`.
45833            /// The execution args are passed in as a sequence of named process
45834            /// arguments (`--key=value`).
45835            MainClass(std::string::String),
45836            /// The Gcloud Storage URI of the main Python file to use as the driver.
45837            /// Must be a .py file. The execution args are passed in as a sequence of
45838            /// named process arguments (`--key=value`).
45839            PythonScriptFile(std::string::String),
45840            /// A reference to a query file. This should be the Cloud Storage URI of
45841            /// the query file. The execution args are used to declare a set of script
45842            /// variables (`set key="value";`).
45843            SqlScriptFile(std::string::String),
45844            /// The query text.
45845            /// The execution args are used to declare a set of script variables
45846            /// (`set key="value";`).
45847            SqlScript(std::string::String),
45848        }
45849    }
45850
45851    /// Config for running scheduled notebooks.
45852    #[derive(Clone, Default, PartialEq)]
45853    #[non_exhaustive]
45854    pub struct NotebookTaskConfig {
45855        /// Required. Path to input notebook. This can be the Cloud Storage URI of
45856        /// the notebook file or the path to a Notebook Content. The execution args
45857        /// are accessible as environment variables
45858        /// (`TASK_key=value`).
45859        pub notebook: std::string::String,
45860
45861        /// Optional. Infrastructure specification for the execution.
45862        pub infrastructure_spec: std::option::Option<crate::model::task::InfrastructureSpec>,
45863
45864        /// Optional. Cloud Storage URIs of files to be placed in the working
45865        /// directory of each executor.
45866        pub file_uris: std::vec::Vec<std::string::String>,
45867
45868        /// Optional. Cloud Storage URIs of archives to be extracted into the working
45869        /// directory of each executor. Supported file types: .jar, .tar, .tar.gz,
45870        /// .tgz, and .zip.
45871        pub archive_uris: std::vec::Vec<std::string::String>,
45872
45873        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45874    }
45875
45876    impl NotebookTaskConfig {
45877        pub fn new() -> Self {
45878            std::default::Default::default()
45879        }
45880
45881        /// Sets the value of [notebook][crate::model::task::NotebookTaskConfig::notebook].
45882        ///
45883        /// # Example
45884        /// ```ignore,no_run
45885        /// # use google_cloud_dataplex_v1::model::task::NotebookTaskConfig;
45886        /// let x = NotebookTaskConfig::new().set_notebook("example");
45887        /// ```
45888        pub fn set_notebook<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45889            self.notebook = v.into();
45890            self
45891        }
45892
45893        /// Sets the value of [infrastructure_spec][crate::model::task::NotebookTaskConfig::infrastructure_spec].
45894        ///
45895        /// # Example
45896        /// ```ignore,no_run
45897        /// # use google_cloud_dataplex_v1::model::task::NotebookTaskConfig;
45898        /// use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
45899        /// let x = NotebookTaskConfig::new().set_infrastructure_spec(InfrastructureSpec::default()/* use setters */);
45900        /// ```
45901        pub fn set_infrastructure_spec<T>(mut self, v: T) -> Self
45902        where
45903            T: std::convert::Into<crate::model::task::InfrastructureSpec>,
45904        {
45905            self.infrastructure_spec = std::option::Option::Some(v.into());
45906            self
45907        }
45908
45909        /// Sets or clears the value of [infrastructure_spec][crate::model::task::NotebookTaskConfig::infrastructure_spec].
45910        ///
45911        /// # Example
45912        /// ```ignore,no_run
45913        /// # use google_cloud_dataplex_v1::model::task::NotebookTaskConfig;
45914        /// use google_cloud_dataplex_v1::model::task::InfrastructureSpec;
45915        /// let x = NotebookTaskConfig::new().set_or_clear_infrastructure_spec(Some(InfrastructureSpec::default()/* use setters */));
45916        /// let x = NotebookTaskConfig::new().set_or_clear_infrastructure_spec(None::<InfrastructureSpec>);
45917        /// ```
45918        pub fn set_or_clear_infrastructure_spec<T>(mut self, v: std::option::Option<T>) -> Self
45919        where
45920            T: std::convert::Into<crate::model::task::InfrastructureSpec>,
45921        {
45922            self.infrastructure_spec = v.map(|x| x.into());
45923            self
45924        }
45925
45926        /// Sets the value of [file_uris][crate::model::task::NotebookTaskConfig::file_uris].
45927        ///
45928        /// # Example
45929        /// ```ignore,no_run
45930        /// # use google_cloud_dataplex_v1::model::task::NotebookTaskConfig;
45931        /// let x = NotebookTaskConfig::new().set_file_uris(["a", "b", "c"]);
45932        /// ```
45933        pub fn set_file_uris<T, V>(mut self, v: T) -> Self
45934        where
45935            T: std::iter::IntoIterator<Item = V>,
45936            V: std::convert::Into<std::string::String>,
45937        {
45938            use std::iter::Iterator;
45939            self.file_uris = v.into_iter().map(|i| i.into()).collect();
45940            self
45941        }
45942
45943        /// Sets the value of [archive_uris][crate::model::task::NotebookTaskConfig::archive_uris].
45944        ///
45945        /// # Example
45946        /// ```ignore,no_run
45947        /// # use google_cloud_dataplex_v1::model::task::NotebookTaskConfig;
45948        /// let x = NotebookTaskConfig::new().set_archive_uris(["a", "b", "c"]);
45949        /// ```
45950        pub fn set_archive_uris<T, V>(mut self, v: T) -> Self
45951        where
45952            T: std::iter::IntoIterator<Item = V>,
45953            V: std::convert::Into<std::string::String>,
45954        {
45955            use std::iter::Iterator;
45956            self.archive_uris = v.into_iter().map(|i| i.into()).collect();
45957            self
45958        }
45959    }
45960
45961    impl wkt::message::Message for NotebookTaskConfig {
45962        fn typename() -> &'static str {
45963            "type.googleapis.com/google.cloud.dataplex.v1.Task.NotebookTaskConfig"
45964        }
45965    }
45966
45967    /// Status of the task execution (e.g. Jobs).
45968    #[derive(Clone, Default, PartialEq)]
45969    #[non_exhaustive]
45970    pub struct ExecutionStatus {
45971        /// Output only. Last update time of the status.
45972        pub update_time: std::option::Option<wkt::Timestamp>,
45973
45974        /// Output only. latest job execution
45975        pub latest_job: std::option::Option<crate::model::Job>,
45976
45977        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45978    }
45979
45980    impl ExecutionStatus {
45981        pub fn new() -> Self {
45982            std::default::Default::default()
45983        }
45984
45985        /// Sets the value of [update_time][crate::model::task::ExecutionStatus::update_time].
45986        ///
45987        /// # Example
45988        /// ```ignore,no_run
45989        /// # use google_cloud_dataplex_v1::model::task::ExecutionStatus;
45990        /// use wkt::Timestamp;
45991        /// let x = ExecutionStatus::new().set_update_time(Timestamp::default()/* use setters */);
45992        /// ```
45993        pub fn set_update_time<T>(mut self, v: T) -> Self
45994        where
45995            T: std::convert::Into<wkt::Timestamp>,
45996        {
45997            self.update_time = std::option::Option::Some(v.into());
45998            self
45999        }
46000
46001        /// Sets or clears the value of [update_time][crate::model::task::ExecutionStatus::update_time].
46002        ///
46003        /// # Example
46004        /// ```ignore,no_run
46005        /// # use google_cloud_dataplex_v1::model::task::ExecutionStatus;
46006        /// use wkt::Timestamp;
46007        /// let x = ExecutionStatus::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
46008        /// let x = ExecutionStatus::new().set_or_clear_update_time(None::<Timestamp>);
46009        /// ```
46010        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
46011        where
46012            T: std::convert::Into<wkt::Timestamp>,
46013        {
46014            self.update_time = v.map(|x| x.into());
46015            self
46016        }
46017
46018        /// Sets the value of [latest_job][crate::model::task::ExecutionStatus::latest_job].
46019        ///
46020        /// # Example
46021        /// ```ignore,no_run
46022        /// # use google_cloud_dataplex_v1::model::task::ExecutionStatus;
46023        /// use google_cloud_dataplex_v1::model::Job;
46024        /// let x = ExecutionStatus::new().set_latest_job(Job::default()/* use setters */);
46025        /// ```
46026        pub fn set_latest_job<T>(mut self, v: T) -> Self
46027        where
46028            T: std::convert::Into<crate::model::Job>,
46029        {
46030            self.latest_job = std::option::Option::Some(v.into());
46031            self
46032        }
46033
46034        /// Sets or clears the value of [latest_job][crate::model::task::ExecutionStatus::latest_job].
46035        ///
46036        /// # Example
46037        /// ```ignore,no_run
46038        /// # use google_cloud_dataplex_v1::model::task::ExecutionStatus;
46039        /// use google_cloud_dataplex_v1::model::Job;
46040        /// let x = ExecutionStatus::new().set_or_clear_latest_job(Some(Job::default()/* use setters */));
46041        /// let x = ExecutionStatus::new().set_or_clear_latest_job(None::<Job>);
46042        /// ```
46043        pub fn set_or_clear_latest_job<T>(mut self, v: std::option::Option<T>) -> Self
46044        where
46045            T: std::convert::Into<crate::model::Job>,
46046        {
46047            self.latest_job = v.map(|x| x.into());
46048            self
46049        }
46050    }
46051
46052    impl wkt::message::Message for ExecutionStatus {
46053        fn typename() -> &'static str {
46054            "type.googleapis.com/google.cloud.dataplex.v1.Task.ExecutionStatus"
46055        }
46056    }
46057
46058    /// Task template specific user-specified config.
46059    #[derive(Clone, Debug, PartialEq)]
46060    #[non_exhaustive]
46061    pub enum Config {
46062        /// Config related to running custom Spark tasks.
46063        Spark(std::boxed::Box<crate::model::task::SparkTaskConfig>),
46064        /// Config related to running scheduled Notebooks.
46065        Notebook(std::boxed::Box<crate::model::task::NotebookTaskConfig>),
46066    }
46067}
46068
46069/// A job represents an instance of a task.
46070#[derive(Clone, Default, PartialEq)]
46071#[non_exhaustive]
46072pub struct Job {
46073    /// Output only. The relative resource name of the job, of the form:
46074    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`.
46075    pub name: std::string::String,
46076
46077    /// Output only. System generated globally unique ID for the job.
46078    pub uid: std::string::String,
46079
46080    /// Output only. The time when the job was started.
46081    pub start_time: std::option::Option<wkt::Timestamp>,
46082
46083    /// Output only. The time when the job ended.
46084    pub end_time: std::option::Option<wkt::Timestamp>,
46085
46086    /// Output only. Execution state for the job.
46087    pub state: crate::model::job::State,
46088
46089    /// Output only. The number of times the job has been retried (excluding the
46090    /// initial attempt).
46091    pub retry_count: u32,
46092
46093    /// Output only. The underlying service running a job.
46094    pub service: crate::model::job::Service,
46095
46096    /// Output only. The full resource name for the job run under a particular
46097    /// service.
46098    pub service_job: std::string::String,
46099
46100    /// Output only. Additional information about the current state.
46101    pub message: std::string::String,
46102
46103    /// Output only. User-defined labels for the task.
46104    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
46105
46106    /// Output only. Job execution trigger.
46107    pub trigger: crate::model::job::Trigger,
46108
46109    /// Output only. Spec related to how a task is executed.
46110    pub execution_spec: std::option::Option<crate::model::task::ExecutionSpec>,
46111
46112    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
46113}
46114
46115impl Job {
46116    pub fn new() -> Self {
46117        std::default::Default::default()
46118    }
46119
46120    /// Sets the value of [name][crate::model::Job::name].
46121    ///
46122    /// # Example
46123    /// ```ignore,no_run
46124    /// # use google_cloud_dataplex_v1::model::Job;
46125    /// let x = Job::new().set_name("example");
46126    /// ```
46127    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46128        self.name = v.into();
46129        self
46130    }
46131
46132    /// Sets the value of [uid][crate::model::Job::uid].
46133    ///
46134    /// # Example
46135    /// ```ignore,no_run
46136    /// # use google_cloud_dataplex_v1::model::Job;
46137    /// let x = Job::new().set_uid("example");
46138    /// ```
46139    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46140        self.uid = v.into();
46141        self
46142    }
46143
46144    /// Sets the value of [start_time][crate::model::Job::start_time].
46145    ///
46146    /// # Example
46147    /// ```ignore,no_run
46148    /// # use google_cloud_dataplex_v1::model::Job;
46149    /// use wkt::Timestamp;
46150    /// let x = Job::new().set_start_time(Timestamp::default()/* use setters */);
46151    /// ```
46152    pub fn set_start_time<T>(mut self, v: T) -> Self
46153    where
46154        T: std::convert::Into<wkt::Timestamp>,
46155    {
46156        self.start_time = std::option::Option::Some(v.into());
46157        self
46158    }
46159
46160    /// Sets or clears the value of [start_time][crate::model::Job::start_time].
46161    ///
46162    /// # Example
46163    /// ```ignore,no_run
46164    /// # use google_cloud_dataplex_v1::model::Job;
46165    /// use wkt::Timestamp;
46166    /// let x = Job::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
46167    /// let x = Job::new().set_or_clear_start_time(None::<Timestamp>);
46168    /// ```
46169    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
46170    where
46171        T: std::convert::Into<wkt::Timestamp>,
46172    {
46173        self.start_time = v.map(|x| x.into());
46174        self
46175    }
46176
46177    /// Sets the value of [end_time][crate::model::Job::end_time].
46178    ///
46179    /// # Example
46180    /// ```ignore,no_run
46181    /// # use google_cloud_dataplex_v1::model::Job;
46182    /// use wkt::Timestamp;
46183    /// let x = Job::new().set_end_time(Timestamp::default()/* use setters */);
46184    /// ```
46185    pub fn set_end_time<T>(mut self, v: T) -> Self
46186    where
46187        T: std::convert::Into<wkt::Timestamp>,
46188    {
46189        self.end_time = std::option::Option::Some(v.into());
46190        self
46191    }
46192
46193    /// Sets or clears the value of [end_time][crate::model::Job::end_time].
46194    ///
46195    /// # Example
46196    /// ```ignore,no_run
46197    /// # use google_cloud_dataplex_v1::model::Job;
46198    /// use wkt::Timestamp;
46199    /// let x = Job::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
46200    /// let x = Job::new().set_or_clear_end_time(None::<Timestamp>);
46201    /// ```
46202    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
46203    where
46204        T: std::convert::Into<wkt::Timestamp>,
46205    {
46206        self.end_time = v.map(|x| x.into());
46207        self
46208    }
46209
46210    /// Sets the value of [state][crate::model::Job::state].
46211    ///
46212    /// # Example
46213    /// ```ignore,no_run
46214    /// # use google_cloud_dataplex_v1::model::Job;
46215    /// use google_cloud_dataplex_v1::model::job::State;
46216    /// let x0 = Job::new().set_state(State::Running);
46217    /// let x1 = Job::new().set_state(State::Cancelling);
46218    /// let x2 = Job::new().set_state(State::Cancelled);
46219    /// ```
46220    pub fn set_state<T: std::convert::Into<crate::model::job::State>>(mut self, v: T) -> Self {
46221        self.state = v.into();
46222        self
46223    }
46224
46225    /// Sets the value of [retry_count][crate::model::Job::retry_count].
46226    ///
46227    /// # Example
46228    /// ```ignore,no_run
46229    /// # use google_cloud_dataplex_v1::model::Job;
46230    /// let x = Job::new().set_retry_count(42_u32);
46231    /// ```
46232    pub fn set_retry_count<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
46233        self.retry_count = v.into();
46234        self
46235    }
46236
46237    /// Sets the value of [service][crate::model::Job::service].
46238    ///
46239    /// # Example
46240    /// ```ignore,no_run
46241    /// # use google_cloud_dataplex_v1::model::Job;
46242    /// use google_cloud_dataplex_v1::model::job::Service;
46243    /// let x0 = Job::new().set_service(Service::Dataproc);
46244    /// ```
46245    pub fn set_service<T: std::convert::Into<crate::model::job::Service>>(mut self, v: T) -> Self {
46246        self.service = v.into();
46247        self
46248    }
46249
46250    /// Sets the value of [service_job][crate::model::Job::service_job].
46251    ///
46252    /// # Example
46253    /// ```ignore,no_run
46254    /// # use google_cloud_dataplex_v1::model::Job;
46255    /// let x = Job::new().set_service_job("example");
46256    /// ```
46257    pub fn set_service_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46258        self.service_job = v.into();
46259        self
46260    }
46261
46262    /// Sets the value of [message][crate::model::Job::message].
46263    ///
46264    /// # Example
46265    /// ```ignore,no_run
46266    /// # use google_cloud_dataplex_v1::model::Job;
46267    /// let x = Job::new().set_message("example");
46268    /// ```
46269    pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46270        self.message = v.into();
46271        self
46272    }
46273
46274    /// Sets the value of [labels][crate::model::Job::labels].
46275    ///
46276    /// # Example
46277    /// ```ignore,no_run
46278    /// # use google_cloud_dataplex_v1::model::Job;
46279    /// let x = Job::new().set_labels([
46280    ///     ("key0", "abc"),
46281    ///     ("key1", "xyz"),
46282    /// ]);
46283    /// ```
46284    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
46285    where
46286        T: std::iter::IntoIterator<Item = (K, V)>,
46287        K: std::convert::Into<std::string::String>,
46288        V: std::convert::Into<std::string::String>,
46289    {
46290        use std::iter::Iterator;
46291        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
46292        self
46293    }
46294
46295    /// Sets the value of [trigger][crate::model::Job::trigger].
46296    ///
46297    /// # Example
46298    /// ```ignore,no_run
46299    /// # use google_cloud_dataplex_v1::model::Job;
46300    /// use google_cloud_dataplex_v1::model::job::Trigger;
46301    /// let x0 = Job::new().set_trigger(Trigger::TaskConfig);
46302    /// let x1 = Job::new().set_trigger(Trigger::RunRequest);
46303    /// ```
46304    pub fn set_trigger<T: std::convert::Into<crate::model::job::Trigger>>(mut self, v: T) -> Self {
46305        self.trigger = v.into();
46306        self
46307    }
46308
46309    /// Sets the value of [execution_spec][crate::model::Job::execution_spec].
46310    ///
46311    /// # Example
46312    /// ```ignore,no_run
46313    /// # use google_cloud_dataplex_v1::model::Job;
46314    /// use google_cloud_dataplex_v1::model::task::ExecutionSpec;
46315    /// let x = Job::new().set_execution_spec(ExecutionSpec::default()/* use setters */);
46316    /// ```
46317    pub fn set_execution_spec<T>(mut self, v: T) -> Self
46318    where
46319        T: std::convert::Into<crate::model::task::ExecutionSpec>,
46320    {
46321        self.execution_spec = std::option::Option::Some(v.into());
46322        self
46323    }
46324
46325    /// Sets or clears the value of [execution_spec][crate::model::Job::execution_spec].
46326    ///
46327    /// # Example
46328    /// ```ignore,no_run
46329    /// # use google_cloud_dataplex_v1::model::Job;
46330    /// use google_cloud_dataplex_v1::model::task::ExecutionSpec;
46331    /// let x = Job::new().set_or_clear_execution_spec(Some(ExecutionSpec::default()/* use setters */));
46332    /// let x = Job::new().set_or_clear_execution_spec(None::<ExecutionSpec>);
46333    /// ```
46334    pub fn set_or_clear_execution_spec<T>(mut self, v: std::option::Option<T>) -> Self
46335    where
46336        T: std::convert::Into<crate::model::task::ExecutionSpec>,
46337    {
46338        self.execution_spec = v.map(|x| x.into());
46339        self
46340    }
46341}
46342
46343impl wkt::message::Message for Job {
46344    fn typename() -> &'static str {
46345        "type.googleapis.com/google.cloud.dataplex.v1.Job"
46346    }
46347}
46348
46349/// Defines additional types related to [Job].
46350pub mod job {
46351    #[allow(unused_imports)]
46352    use super::*;
46353
46354    ///
46355    /// # Working with unknown values
46356    ///
46357    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
46358    /// additional enum variants at any time. Adding new variants is not considered
46359    /// a breaking change. Applications should write their code in anticipation of:
46360    ///
46361    /// - New values appearing in future releases of the client library, **and**
46362    /// - New values received dynamically, without application changes.
46363    ///
46364    /// Please consult the [Working with enums] section in the user guide for some
46365    /// guidelines.
46366    ///
46367    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
46368    #[derive(Clone, Debug, PartialEq)]
46369    #[non_exhaustive]
46370    pub enum Service {
46371        /// Service used to run the job is unspecified.
46372        Unspecified,
46373        /// Dataproc service is used to run this job.
46374        Dataproc,
46375        /// If set, the enum was initialized with an unknown value.
46376        ///
46377        /// Applications can examine the value using [Service::value] or
46378        /// [Service::name].
46379        UnknownValue(service::UnknownValue),
46380    }
46381
46382    #[doc(hidden)]
46383    pub mod service {
46384        #[allow(unused_imports)]
46385        use super::*;
46386        #[derive(Clone, Debug, PartialEq)]
46387        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
46388    }
46389
46390    impl Service {
46391        /// Gets the enum value.
46392        ///
46393        /// Returns `None` if the enum contains an unknown value deserialized from
46394        /// the string representation of enums.
46395        pub fn value(&self) -> std::option::Option<i32> {
46396            match self {
46397                Self::Unspecified => std::option::Option::Some(0),
46398                Self::Dataproc => std::option::Option::Some(1),
46399                Self::UnknownValue(u) => u.0.value(),
46400            }
46401        }
46402
46403        /// Gets the enum value as a string.
46404        ///
46405        /// Returns `None` if the enum contains an unknown value deserialized from
46406        /// the integer representation of enums.
46407        pub fn name(&self) -> std::option::Option<&str> {
46408            match self {
46409                Self::Unspecified => std::option::Option::Some("SERVICE_UNSPECIFIED"),
46410                Self::Dataproc => std::option::Option::Some("DATAPROC"),
46411                Self::UnknownValue(u) => u.0.name(),
46412            }
46413        }
46414    }
46415
46416    impl std::default::Default for Service {
46417        fn default() -> Self {
46418            use std::convert::From;
46419            Self::from(0)
46420        }
46421    }
46422
46423    impl std::fmt::Display for Service {
46424        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
46425            wkt::internal::display_enum(f, self.name(), self.value())
46426        }
46427    }
46428
46429    impl std::convert::From<i32> for Service {
46430        fn from(value: i32) -> Self {
46431            match value {
46432                0 => Self::Unspecified,
46433                1 => Self::Dataproc,
46434                _ => Self::UnknownValue(service::UnknownValue(
46435                    wkt::internal::UnknownEnumValue::Integer(value),
46436                )),
46437            }
46438        }
46439    }
46440
46441    impl std::convert::From<&str> for Service {
46442        fn from(value: &str) -> Self {
46443            use std::string::ToString;
46444            match value {
46445                "SERVICE_UNSPECIFIED" => Self::Unspecified,
46446                "DATAPROC" => Self::Dataproc,
46447                _ => Self::UnknownValue(service::UnknownValue(
46448                    wkt::internal::UnknownEnumValue::String(value.to_string()),
46449                )),
46450            }
46451        }
46452    }
46453
46454    impl serde::ser::Serialize for Service {
46455        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
46456        where
46457            S: serde::Serializer,
46458        {
46459            match self {
46460                Self::Unspecified => serializer.serialize_i32(0),
46461                Self::Dataproc => serializer.serialize_i32(1),
46462                Self::UnknownValue(u) => u.0.serialize(serializer),
46463            }
46464        }
46465    }
46466
46467    impl<'de> serde::de::Deserialize<'de> for Service {
46468        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
46469        where
46470            D: serde::Deserializer<'de>,
46471        {
46472            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Service>::new(
46473                ".google.cloud.dataplex.v1.Job.Service",
46474            ))
46475        }
46476    }
46477
46478    ///
46479    /// # Working with unknown values
46480    ///
46481    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
46482    /// additional enum variants at any time. Adding new variants is not considered
46483    /// a breaking change. Applications should write their code in anticipation of:
46484    ///
46485    /// - New values appearing in future releases of the client library, **and**
46486    /// - New values received dynamically, without application changes.
46487    ///
46488    /// Please consult the [Working with enums] section in the user guide for some
46489    /// guidelines.
46490    ///
46491    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
46492    #[derive(Clone, Debug, PartialEq)]
46493    #[non_exhaustive]
46494    pub enum State {
46495        /// The job state is unknown.
46496        Unspecified,
46497        /// The job is running.
46498        Running,
46499        /// The job is cancelling.
46500        Cancelling,
46501        /// The job cancellation was successful.
46502        Cancelled,
46503        /// The job completed successfully.
46504        Succeeded,
46505        /// The job is no longer running due to an error.
46506        Failed,
46507        /// The job was cancelled outside of Dataplex Universal Catalog.
46508        Aborted,
46509        /// If set, the enum was initialized with an unknown value.
46510        ///
46511        /// Applications can examine the value using [State::value] or
46512        /// [State::name].
46513        UnknownValue(state::UnknownValue),
46514    }
46515
46516    #[doc(hidden)]
46517    pub mod state {
46518        #[allow(unused_imports)]
46519        use super::*;
46520        #[derive(Clone, Debug, PartialEq)]
46521        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
46522    }
46523
46524    impl State {
46525        /// Gets the enum value.
46526        ///
46527        /// Returns `None` if the enum contains an unknown value deserialized from
46528        /// the string representation of enums.
46529        pub fn value(&self) -> std::option::Option<i32> {
46530            match self {
46531                Self::Unspecified => std::option::Option::Some(0),
46532                Self::Running => std::option::Option::Some(1),
46533                Self::Cancelling => std::option::Option::Some(2),
46534                Self::Cancelled => std::option::Option::Some(3),
46535                Self::Succeeded => std::option::Option::Some(4),
46536                Self::Failed => std::option::Option::Some(5),
46537                Self::Aborted => std::option::Option::Some(6),
46538                Self::UnknownValue(u) => u.0.value(),
46539            }
46540        }
46541
46542        /// Gets the enum value as a string.
46543        ///
46544        /// Returns `None` if the enum contains an unknown value deserialized from
46545        /// the integer representation of enums.
46546        pub fn name(&self) -> std::option::Option<&str> {
46547            match self {
46548                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
46549                Self::Running => std::option::Option::Some("RUNNING"),
46550                Self::Cancelling => std::option::Option::Some("CANCELLING"),
46551                Self::Cancelled => std::option::Option::Some("CANCELLED"),
46552                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
46553                Self::Failed => std::option::Option::Some("FAILED"),
46554                Self::Aborted => std::option::Option::Some("ABORTED"),
46555                Self::UnknownValue(u) => u.0.name(),
46556            }
46557        }
46558    }
46559
46560    impl std::default::Default for State {
46561        fn default() -> Self {
46562            use std::convert::From;
46563            Self::from(0)
46564        }
46565    }
46566
46567    impl std::fmt::Display for State {
46568        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
46569            wkt::internal::display_enum(f, self.name(), self.value())
46570        }
46571    }
46572
46573    impl std::convert::From<i32> for State {
46574        fn from(value: i32) -> Self {
46575            match value {
46576                0 => Self::Unspecified,
46577                1 => Self::Running,
46578                2 => Self::Cancelling,
46579                3 => Self::Cancelled,
46580                4 => Self::Succeeded,
46581                5 => Self::Failed,
46582                6 => Self::Aborted,
46583                _ => Self::UnknownValue(state::UnknownValue(
46584                    wkt::internal::UnknownEnumValue::Integer(value),
46585                )),
46586            }
46587        }
46588    }
46589
46590    impl std::convert::From<&str> for State {
46591        fn from(value: &str) -> Self {
46592            use std::string::ToString;
46593            match value {
46594                "STATE_UNSPECIFIED" => Self::Unspecified,
46595                "RUNNING" => Self::Running,
46596                "CANCELLING" => Self::Cancelling,
46597                "CANCELLED" => Self::Cancelled,
46598                "SUCCEEDED" => Self::Succeeded,
46599                "FAILED" => Self::Failed,
46600                "ABORTED" => Self::Aborted,
46601                _ => Self::UnknownValue(state::UnknownValue(
46602                    wkt::internal::UnknownEnumValue::String(value.to_string()),
46603                )),
46604            }
46605        }
46606    }
46607
46608    impl serde::ser::Serialize for State {
46609        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
46610        where
46611            S: serde::Serializer,
46612        {
46613            match self {
46614                Self::Unspecified => serializer.serialize_i32(0),
46615                Self::Running => serializer.serialize_i32(1),
46616                Self::Cancelling => serializer.serialize_i32(2),
46617                Self::Cancelled => serializer.serialize_i32(3),
46618                Self::Succeeded => serializer.serialize_i32(4),
46619                Self::Failed => serializer.serialize_i32(5),
46620                Self::Aborted => serializer.serialize_i32(6),
46621                Self::UnknownValue(u) => u.0.serialize(serializer),
46622            }
46623        }
46624    }
46625
46626    impl<'de> serde::de::Deserialize<'de> for State {
46627        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
46628        where
46629            D: serde::Deserializer<'de>,
46630        {
46631            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
46632                ".google.cloud.dataplex.v1.Job.State",
46633            ))
46634        }
46635    }
46636
46637    /// Job execution trigger.
46638    ///
46639    /// # Working with unknown values
46640    ///
46641    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
46642    /// additional enum variants at any time. Adding new variants is not considered
46643    /// a breaking change. Applications should write their code in anticipation of:
46644    ///
46645    /// - New values appearing in future releases of the client library, **and**
46646    /// - New values received dynamically, without application changes.
46647    ///
46648    /// Please consult the [Working with enums] section in the user guide for some
46649    /// guidelines.
46650    ///
46651    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
46652    #[derive(Clone, Debug, PartialEq)]
46653    #[non_exhaustive]
46654    pub enum Trigger {
46655        /// The trigger is unspecified.
46656        Unspecified,
46657        /// The job was triggered by Dataplex Universal Catalog based on trigger spec
46658        /// from task definition.
46659        TaskConfig,
46660        /// The job was triggered by the explicit call of Task API.
46661        RunRequest,
46662        /// If set, the enum was initialized with an unknown value.
46663        ///
46664        /// Applications can examine the value using [Trigger::value] or
46665        /// [Trigger::name].
46666        UnknownValue(trigger::UnknownValue),
46667    }
46668
46669    #[doc(hidden)]
46670    pub mod trigger {
46671        #[allow(unused_imports)]
46672        use super::*;
46673        #[derive(Clone, Debug, PartialEq)]
46674        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
46675    }
46676
46677    impl Trigger {
46678        /// Gets the enum value.
46679        ///
46680        /// Returns `None` if the enum contains an unknown value deserialized from
46681        /// the string representation of enums.
46682        pub fn value(&self) -> std::option::Option<i32> {
46683            match self {
46684                Self::Unspecified => std::option::Option::Some(0),
46685                Self::TaskConfig => std::option::Option::Some(1),
46686                Self::RunRequest => std::option::Option::Some(2),
46687                Self::UnknownValue(u) => u.0.value(),
46688            }
46689        }
46690
46691        /// Gets the enum value as a string.
46692        ///
46693        /// Returns `None` if the enum contains an unknown value deserialized from
46694        /// the integer representation of enums.
46695        pub fn name(&self) -> std::option::Option<&str> {
46696            match self {
46697                Self::Unspecified => std::option::Option::Some("TRIGGER_UNSPECIFIED"),
46698                Self::TaskConfig => std::option::Option::Some("TASK_CONFIG"),
46699                Self::RunRequest => std::option::Option::Some("RUN_REQUEST"),
46700                Self::UnknownValue(u) => u.0.name(),
46701            }
46702        }
46703    }
46704
46705    impl std::default::Default for Trigger {
46706        fn default() -> Self {
46707            use std::convert::From;
46708            Self::from(0)
46709        }
46710    }
46711
46712    impl std::fmt::Display for Trigger {
46713        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
46714            wkt::internal::display_enum(f, self.name(), self.value())
46715        }
46716    }
46717
46718    impl std::convert::From<i32> for Trigger {
46719        fn from(value: i32) -> Self {
46720            match value {
46721                0 => Self::Unspecified,
46722                1 => Self::TaskConfig,
46723                2 => Self::RunRequest,
46724                _ => Self::UnknownValue(trigger::UnknownValue(
46725                    wkt::internal::UnknownEnumValue::Integer(value),
46726                )),
46727            }
46728        }
46729    }
46730
46731    impl std::convert::From<&str> for Trigger {
46732        fn from(value: &str) -> Self {
46733            use std::string::ToString;
46734            match value {
46735                "TRIGGER_UNSPECIFIED" => Self::Unspecified,
46736                "TASK_CONFIG" => Self::TaskConfig,
46737                "RUN_REQUEST" => Self::RunRequest,
46738                _ => Self::UnknownValue(trigger::UnknownValue(
46739                    wkt::internal::UnknownEnumValue::String(value.to_string()),
46740                )),
46741            }
46742        }
46743    }
46744
46745    impl serde::ser::Serialize for Trigger {
46746        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
46747        where
46748            S: serde::Serializer,
46749        {
46750            match self {
46751                Self::Unspecified => serializer.serialize_i32(0),
46752                Self::TaskConfig => serializer.serialize_i32(1),
46753                Self::RunRequest => serializer.serialize_i32(2),
46754                Self::UnknownValue(u) => u.0.serialize(serializer),
46755            }
46756        }
46757    }
46758
46759    impl<'de> serde::de::Deserialize<'de> for Trigger {
46760        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
46761        where
46762            D: serde::Deserializer<'de>,
46763        {
46764            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Trigger>::new(
46765                ".google.cloud.dataplex.v1.Job.Trigger",
46766            ))
46767        }
46768    }
46769}
46770
46771/// View for controlling which parts of an entry are to be returned.
46772///
46773/// # Working with unknown values
46774///
46775/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
46776/// additional enum variants at any time. Adding new variants is not considered
46777/// a breaking change. Applications should write their code in anticipation of:
46778///
46779/// - New values appearing in future releases of the client library, **and**
46780/// - New values received dynamically, without application changes.
46781///
46782/// Please consult the [Working with enums] section in the user guide for some
46783/// guidelines.
46784///
46785/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
46786#[derive(Clone, Debug, PartialEq)]
46787#[non_exhaustive]
46788pub enum EntryView {
46789    /// Unspecified EntryView. Defaults to FULL.
46790    Unspecified,
46791    /// Returns entry only, without aspects.
46792    Basic,
46793    /// Returns all required aspects as well as the keys of all non-required
46794    /// aspects.
46795    Full,
46796    /// Returns aspects matching custom fields in GetEntryRequest. If the number of
46797    /// aspects exceeds 100, the first 100 will be returned.
46798    Custom,
46799    All,
46800    /// If set, the enum was initialized with an unknown value.
46801    ///
46802    /// Applications can examine the value using [EntryView::value] or
46803    /// [EntryView::name].
46804    UnknownValue(entry_view::UnknownValue),
46805}
46806
46807#[doc(hidden)]
46808pub mod entry_view {
46809    #[allow(unused_imports)]
46810    use super::*;
46811    #[derive(Clone, Debug, PartialEq)]
46812    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
46813}
46814
46815impl EntryView {
46816    /// Gets the enum value.
46817    ///
46818    /// Returns `None` if the enum contains an unknown value deserialized from
46819    /// the string representation of enums.
46820    pub fn value(&self) -> std::option::Option<i32> {
46821        match self {
46822            Self::Unspecified => std::option::Option::Some(0),
46823            Self::Basic => std::option::Option::Some(1),
46824            Self::Full => std::option::Option::Some(2),
46825            Self::Custom => std::option::Option::Some(3),
46826            Self::All => std::option::Option::Some(4),
46827            Self::UnknownValue(u) => u.0.value(),
46828        }
46829    }
46830
46831    /// Gets the enum value as a string.
46832    ///
46833    /// Returns `None` if the enum contains an unknown value deserialized from
46834    /// the integer representation of enums.
46835    pub fn name(&self) -> std::option::Option<&str> {
46836        match self {
46837            Self::Unspecified => std::option::Option::Some("ENTRY_VIEW_UNSPECIFIED"),
46838            Self::Basic => std::option::Option::Some("BASIC"),
46839            Self::Full => std::option::Option::Some("FULL"),
46840            Self::Custom => std::option::Option::Some("CUSTOM"),
46841            Self::All => std::option::Option::Some("ALL"),
46842            Self::UnknownValue(u) => u.0.name(),
46843        }
46844    }
46845}
46846
46847impl std::default::Default for EntryView {
46848    fn default() -> Self {
46849        use std::convert::From;
46850        Self::from(0)
46851    }
46852}
46853
46854impl std::fmt::Display for EntryView {
46855    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
46856        wkt::internal::display_enum(f, self.name(), self.value())
46857    }
46858}
46859
46860impl std::convert::From<i32> for EntryView {
46861    fn from(value: i32) -> Self {
46862        match value {
46863            0 => Self::Unspecified,
46864            1 => Self::Basic,
46865            2 => Self::Full,
46866            3 => Self::Custom,
46867            4 => Self::All,
46868            _ => Self::UnknownValue(entry_view::UnknownValue(
46869                wkt::internal::UnknownEnumValue::Integer(value),
46870            )),
46871        }
46872    }
46873}
46874
46875impl std::convert::From<&str> for EntryView {
46876    fn from(value: &str) -> Self {
46877        use std::string::ToString;
46878        match value {
46879            "ENTRY_VIEW_UNSPECIFIED" => Self::Unspecified,
46880            "BASIC" => Self::Basic,
46881            "FULL" => Self::Full,
46882            "CUSTOM" => Self::Custom,
46883            "ALL" => Self::All,
46884            _ => Self::UnknownValue(entry_view::UnknownValue(
46885                wkt::internal::UnknownEnumValue::String(value.to_string()),
46886            )),
46887        }
46888    }
46889}
46890
46891impl serde::ser::Serialize for EntryView {
46892    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
46893    where
46894        S: serde::Serializer,
46895    {
46896        match self {
46897            Self::Unspecified => serializer.serialize_i32(0),
46898            Self::Basic => serializer.serialize_i32(1),
46899            Self::Full => serializer.serialize_i32(2),
46900            Self::Custom => serializer.serialize_i32(3),
46901            Self::All => serializer.serialize_i32(4),
46902            Self::UnknownValue(u) => u.0.serialize(serializer),
46903        }
46904    }
46905}
46906
46907impl<'de> serde::de::Deserialize<'de> for EntryView {
46908    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
46909    where
46910        D: serde::Deserializer<'de>,
46911    {
46912        deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntryView>::new(
46913            ".google.cloud.dataplex.v1.EntryView",
46914        ))
46915    }
46916}
46917
46918/// Denotes the transfer status of a resource. It is unspecified for resources
46919/// created from Dataplex API.
46920///
46921/// # Working with unknown values
46922///
46923/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
46924/// additional enum variants at any time. Adding new variants is not considered
46925/// a breaking change. Applications should write their code in anticipation of:
46926///
46927/// - New values appearing in future releases of the client library, **and**
46928/// - New values received dynamically, without application changes.
46929///
46930/// Please consult the [Working with enums] section in the user guide for some
46931/// guidelines.
46932///
46933/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
46934#[derive(Clone, Debug, PartialEq)]
46935#[non_exhaustive]
46936pub enum TransferStatus {
46937    /// The default value. It is set for resources that were not subject for
46938    /// migration from Data Catalog service.
46939    Unspecified,
46940    /// Indicates that a resource was migrated from Data Catalog service but it
46941    /// hasn't been transferred yet. In particular the resource cannot be updated
46942    /// from Dataplex API.
46943    Migrated,
46944    /// Indicates that a resource was transferred from Data Catalog service. The
46945    /// resource can only be updated from Dataplex API.
46946    Transferred,
46947    /// If set, the enum was initialized with an unknown value.
46948    ///
46949    /// Applications can examine the value using [TransferStatus::value] or
46950    /// [TransferStatus::name].
46951    UnknownValue(transfer_status::UnknownValue),
46952}
46953
46954#[doc(hidden)]
46955pub mod transfer_status {
46956    #[allow(unused_imports)]
46957    use super::*;
46958    #[derive(Clone, Debug, PartialEq)]
46959    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
46960}
46961
46962impl TransferStatus {
46963    /// Gets the enum value.
46964    ///
46965    /// Returns `None` if the enum contains an unknown value deserialized from
46966    /// the string representation of enums.
46967    pub fn value(&self) -> std::option::Option<i32> {
46968        match self {
46969            Self::Unspecified => std::option::Option::Some(0),
46970            Self::Migrated => std::option::Option::Some(1),
46971            Self::Transferred => std::option::Option::Some(2),
46972            Self::UnknownValue(u) => u.0.value(),
46973        }
46974    }
46975
46976    /// Gets the enum value as a string.
46977    ///
46978    /// Returns `None` if the enum contains an unknown value deserialized from
46979    /// the integer representation of enums.
46980    pub fn name(&self) -> std::option::Option<&str> {
46981        match self {
46982            Self::Unspecified => std::option::Option::Some("TRANSFER_STATUS_UNSPECIFIED"),
46983            Self::Migrated => std::option::Option::Some("TRANSFER_STATUS_MIGRATED"),
46984            Self::Transferred => std::option::Option::Some("TRANSFER_STATUS_TRANSFERRED"),
46985            Self::UnknownValue(u) => u.0.name(),
46986        }
46987    }
46988}
46989
46990impl std::default::Default for TransferStatus {
46991    fn default() -> Self {
46992        use std::convert::From;
46993        Self::from(0)
46994    }
46995}
46996
46997impl std::fmt::Display for TransferStatus {
46998    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
46999        wkt::internal::display_enum(f, self.name(), self.value())
47000    }
47001}
47002
47003impl std::convert::From<i32> for TransferStatus {
47004    fn from(value: i32) -> Self {
47005        match value {
47006            0 => Self::Unspecified,
47007            1 => Self::Migrated,
47008            2 => Self::Transferred,
47009            _ => Self::UnknownValue(transfer_status::UnknownValue(
47010                wkt::internal::UnknownEnumValue::Integer(value),
47011            )),
47012        }
47013    }
47014}
47015
47016impl std::convert::From<&str> for TransferStatus {
47017    fn from(value: &str) -> Self {
47018        use std::string::ToString;
47019        match value {
47020            "TRANSFER_STATUS_UNSPECIFIED" => Self::Unspecified,
47021            "TRANSFER_STATUS_MIGRATED" => Self::Migrated,
47022            "TRANSFER_STATUS_TRANSFERRED" => Self::Transferred,
47023            _ => Self::UnknownValue(transfer_status::UnknownValue(
47024                wkt::internal::UnknownEnumValue::String(value.to_string()),
47025            )),
47026        }
47027    }
47028}
47029
47030impl serde::ser::Serialize for TransferStatus {
47031    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
47032    where
47033        S: serde::Serializer,
47034    {
47035        match self {
47036            Self::Unspecified => serializer.serialize_i32(0),
47037            Self::Migrated => serializer.serialize_i32(1),
47038            Self::Transferred => serializer.serialize_i32(2),
47039            Self::UnknownValue(u) => u.0.serialize(serializer),
47040        }
47041    }
47042}
47043
47044impl<'de> serde::de::Deserialize<'de> for TransferStatus {
47045    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
47046    where
47047        D: serde::Deserializer<'de>,
47048    {
47049        deserializer.deserialize_any(wkt::internal::EnumVisitor::<TransferStatus>::new(
47050            ".google.cloud.dataplex.v1.TransferStatus",
47051        ))
47052    }
47053}
47054
47055/// The type of data scan.
47056///
47057/// # Working with unknown values
47058///
47059/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
47060/// additional enum variants at any time. Adding new variants is not considered
47061/// a breaking change. Applications should write their code in anticipation of:
47062///
47063/// - New values appearing in future releases of the client library, **and**
47064/// - New values received dynamically, without application changes.
47065///
47066/// Please consult the [Working with enums] section in the user guide for some
47067/// guidelines.
47068///
47069/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
47070#[derive(Clone, Debug, PartialEq)]
47071#[non_exhaustive]
47072pub enum DataScanType {
47073    /// The data scan type is unspecified.
47074    Unspecified,
47075    /// Data quality scan.
47076    DataQuality,
47077    /// Data profile scan.
47078    DataProfile,
47079    /// Data discovery scan.
47080    DataDiscovery,
47081    /// Data documentation scan.
47082    DataDocumentation,
47083    /// If set, the enum was initialized with an unknown value.
47084    ///
47085    /// Applications can examine the value using [DataScanType::value] or
47086    /// [DataScanType::name].
47087    UnknownValue(data_scan_type::UnknownValue),
47088}
47089
47090#[doc(hidden)]
47091pub mod data_scan_type {
47092    #[allow(unused_imports)]
47093    use super::*;
47094    #[derive(Clone, Debug, PartialEq)]
47095    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
47096}
47097
47098impl DataScanType {
47099    /// Gets the enum value.
47100    ///
47101    /// Returns `None` if the enum contains an unknown value deserialized from
47102    /// the string representation of enums.
47103    pub fn value(&self) -> std::option::Option<i32> {
47104        match self {
47105            Self::Unspecified => std::option::Option::Some(0),
47106            Self::DataQuality => std::option::Option::Some(1),
47107            Self::DataProfile => std::option::Option::Some(2),
47108            Self::DataDiscovery => std::option::Option::Some(3),
47109            Self::DataDocumentation => std::option::Option::Some(4),
47110            Self::UnknownValue(u) => u.0.value(),
47111        }
47112    }
47113
47114    /// Gets the enum value as a string.
47115    ///
47116    /// Returns `None` if the enum contains an unknown value deserialized from
47117    /// the integer representation of enums.
47118    pub fn name(&self) -> std::option::Option<&str> {
47119        match self {
47120            Self::Unspecified => std::option::Option::Some("DATA_SCAN_TYPE_UNSPECIFIED"),
47121            Self::DataQuality => std::option::Option::Some("DATA_QUALITY"),
47122            Self::DataProfile => std::option::Option::Some("DATA_PROFILE"),
47123            Self::DataDiscovery => std::option::Option::Some("DATA_DISCOVERY"),
47124            Self::DataDocumentation => std::option::Option::Some("DATA_DOCUMENTATION"),
47125            Self::UnknownValue(u) => u.0.name(),
47126        }
47127    }
47128}
47129
47130impl std::default::Default for DataScanType {
47131    fn default() -> Self {
47132        use std::convert::From;
47133        Self::from(0)
47134    }
47135}
47136
47137impl std::fmt::Display for DataScanType {
47138    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
47139        wkt::internal::display_enum(f, self.name(), self.value())
47140    }
47141}
47142
47143impl std::convert::From<i32> for DataScanType {
47144    fn from(value: i32) -> Self {
47145        match value {
47146            0 => Self::Unspecified,
47147            1 => Self::DataQuality,
47148            2 => Self::DataProfile,
47149            3 => Self::DataDiscovery,
47150            4 => Self::DataDocumentation,
47151            _ => Self::UnknownValue(data_scan_type::UnknownValue(
47152                wkt::internal::UnknownEnumValue::Integer(value),
47153            )),
47154        }
47155    }
47156}
47157
47158impl std::convert::From<&str> for DataScanType {
47159    fn from(value: &str) -> Self {
47160        use std::string::ToString;
47161        match value {
47162            "DATA_SCAN_TYPE_UNSPECIFIED" => Self::Unspecified,
47163            "DATA_QUALITY" => Self::DataQuality,
47164            "DATA_PROFILE" => Self::DataProfile,
47165            "DATA_DISCOVERY" => Self::DataDiscovery,
47166            "DATA_DOCUMENTATION" => Self::DataDocumentation,
47167            _ => Self::UnknownValue(data_scan_type::UnknownValue(
47168                wkt::internal::UnknownEnumValue::String(value.to_string()),
47169            )),
47170        }
47171    }
47172}
47173
47174impl serde::ser::Serialize for DataScanType {
47175    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
47176    where
47177        S: serde::Serializer,
47178    {
47179        match self {
47180            Self::Unspecified => serializer.serialize_i32(0),
47181            Self::DataQuality => serializer.serialize_i32(1),
47182            Self::DataProfile => serializer.serialize_i32(2),
47183            Self::DataDiscovery => serializer.serialize_i32(3),
47184            Self::DataDocumentation => serializer.serialize_i32(4),
47185            Self::UnknownValue(u) => u.0.serialize(serializer),
47186        }
47187    }
47188}
47189
47190impl<'de> serde::de::Deserialize<'de> for DataScanType {
47191    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
47192    where
47193        D: serde::Deserializer<'de>,
47194    {
47195        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataScanType>::new(
47196            ".google.cloud.dataplex.v1.DataScanType",
47197        ))
47198    }
47199}
47200
47201/// Identifies the cloud system that manages the data storage.
47202///
47203/// # Working with unknown values
47204///
47205/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
47206/// additional enum variants at any time. Adding new variants is not considered
47207/// a breaking change. Applications should write their code in anticipation of:
47208///
47209/// - New values appearing in future releases of the client library, **and**
47210/// - New values received dynamically, without application changes.
47211///
47212/// Please consult the [Working with enums] section in the user guide for some
47213/// guidelines.
47214///
47215/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
47216#[derive(Clone, Debug, PartialEq)]
47217#[non_exhaustive]
47218pub enum StorageSystem {
47219    /// Storage system unspecified.
47220    Unspecified,
47221    /// The entity data is contained within a Cloud Storage bucket.
47222    CloudStorage,
47223    /// The entity data is contained within a BigQuery dataset.
47224    Bigquery,
47225    /// If set, the enum was initialized with an unknown value.
47226    ///
47227    /// Applications can examine the value using [StorageSystem::value] or
47228    /// [StorageSystem::name].
47229    UnknownValue(storage_system::UnknownValue),
47230}
47231
47232#[doc(hidden)]
47233pub mod storage_system {
47234    #[allow(unused_imports)]
47235    use super::*;
47236    #[derive(Clone, Debug, PartialEq)]
47237    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
47238}
47239
47240impl StorageSystem {
47241    /// Gets the enum value.
47242    ///
47243    /// Returns `None` if the enum contains an unknown value deserialized from
47244    /// the string representation of enums.
47245    pub fn value(&self) -> std::option::Option<i32> {
47246        match self {
47247            Self::Unspecified => std::option::Option::Some(0),
47248            Self::CloudStorage => std::option::Option::Some(1),
47249            Self::Bigquery => std::option::Option::Some(2),
47250            Self::UnknownValue(u) => u.0.value(),
47251        }
47252    }
47253
47254    /// Gets the enum value as a string.
47255    ///
47256    /// Returns `None` if the enum contains an unknown value deserialized from
47257    /// the integer representation of enums.
47258    pub fn name(&self) -> std::option::Option<&str> {
47259        match self {
47260            Self::Unspecified => std::option::Option::Some("STORAGE_SYSTEM_UNSPECIFIED"),
47261            Self::CloudStorage => std::option::Option::Some("CLOUD_STORAGE"),
47262            Self::Bigquery => std::option::Option::Some("BIGQUERY"),
47263            Self::UnknownValue(u) => u.0.name(),
47264        }
47265    }
47266}
47267
47268impl std::default::Default for StorageSystem {
47269    fn default() -> Self {
47270        use std::convert::From;
47271        Self::from(0)
47272    }
47273}
47274
47275impl std::fmt::Display for StorageSystem {
47276    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
47277        wkt::internal::display_enum(f, self.name(), self.value())
47278    }
47279}
47280
47281impl std::convert::From<i32> for StorageSystem {
47282    fn from(value: i32) -> Self {
47283        match value {
47284            0 => Self::Unspecified,
47285            1 => Self::CloudStorage,
47286            2 => Self::Bigquery,
47287            _ => Self::UnknownValue(storage_system::UnknownValue(
47288                wkt::internal::UnknownEnumValue::Integer(value),
47289            )),
47290        }
47291    }
47292}
47293
47294impl std::convert::From<&str> for StorageSystem {
47295    fn from(value: &str) -> Self {
47296        use std::string::ToString;
47297        match value {
47298            "STORAGE_SYSTEM_UNSPECIFIED" => Self::Unspecified,
47299            "CLOUD_STORAGE" => Self::CloudStorage,
47300            "BIGQUERY" => Self::Bigquery,
47301            _ => Self::UnknownValue(storage_system::UnknownValue(
47302                wkt::internal::UnknownEnumValue::String(value.to_string()),
47303            )),
47304        }
47305    }
47306}
47307
47308impl serde::ser::Serialize for StorageSystem {
47309    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
47310    where
47311        S: serde::Serializer,
47312    {
47313        match self {
47314            Self::Unspecified => serializer.serialize_i32(0),
47315            Self::CloudStorage => serializer.serialize_i32(1),
47316            Self::Bigquery => serializer.serialize_i32(2),
47317            Self::UnknownValue(u) => u.0.serialize(serializer),
47318        }
47319    }
47320}
47321
47322impl<'de> serde::de::Deserialize<'de> for StorageSystem {
47323    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
47324    where
47325        D: serde::Deserializer<'de>,
47326    {
47327        deserializer.deserialize_any(wkt::internal::EnumVisitor::<StorageSystem>::new(
47328            ".google.cloud.dataplex.v1.StorageSystem",
47329        ))
47330    }
47331}
47332
47333/// State of a resource.
47334///
47335/// # Working with unknown values
47336///
47337/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
47338/// additional enum variants at any time. Adding new variants is not considered
47339/// a breaking change. Applications should write their code in anticipation of:
47340///
47341/// - New values appearing in future releases of the client library, **and**
47342/// - New values received dynamically, without application changes.
47343///
47344/// Please consult the [Working with enums] section in the user guide for some
47345/// guidelines.
47346///
47347/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
47348#[derive(Clone, Debug, PartialEq)]
47349#[non_exhaustive]
47350pub enum State {
47351    /// State is not specified.
47352    Unspecified,
47353    /// Resource is active, i.e., ready to use.
47354    Active,
47355    /// Resource is under creation.
47356    Creating,
47357    /// Resource is under deletion.
47358    Deleting,
47359    /// Resource is active but has unresolved actions.
47360    ActionRequired,
47361    /// If set, the enum was initialized with an unknown value.
47362    ///
47363    /// Applications can examine the value using [State::value] or
47364    /// [State::name].
47365    UnknownValue(state::UnknownValue),
47366}
47367
47368#[doc(hidden)]
47369pub mod state {
47370    #[allow(unused_imports)]
47371    use super::*;
47372    #[derive(Clone, Debug, PartialEq)]
47373    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
47374}
47375
47376impl State {
47377    /// Gets the enum value.
47378    ///
47379    /// Returns `None` if the enum contains an unknown value deserialized from
47380    /// the string representation of enums.
47381    pub fn value(&self) -> std::option::Option<i32> {
47382        match self {
47383            Self::Unspecified => std::option::Option::Some(0),
47384            Self::Active => std::option::Option::Some(1),
47385            Self::Creating => std::option::Option::Some(2),
47386            Self::Deleting => std::option::Option::Some(3),
47387            Self::ActionRequired => std::option::Option::Some(4),
47388            Self::UnknownValue(u) => u.0.value(),
47389        }
47390    }
47391
47392    /// Gets the enum value as a string.
47393    ///
47394    /// Returns `None` if the enum contains an unknown value deserialized from
47395    /// the integer representation of enums.
47396    pub fn name(&self) -> std::option::Option<&str> {
47397        match self {
47398            Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
47399            Self::Active => std::option::Option::Some("ACTIVE"),
47400            Self::Creating => std::option::Option::Some("CREATING"),
47401            Self::Deleting => std::option::Option::Some("DELETING"),
47402            Self::ActionRequired => std::option::Option::Some("ACTION_REQUIRED"),
47403            Self::UnknownValue(u) => u.0.name(),
47404        }
47405    }
47406}
47407
47408impl std::default::Default for State {
47409    fn default() -> Self {
47410        use std::convert::From;
47411        Self::from(0)
47412    }
47413}
47414
47415impl std::fmt::Display for State {
47416    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
47417        wkt::internal::display_enum(f, self.name(), self.value())
47418    }
47419}
47420
47421impl std::convert::From<i32> for State {
47422    fn from(value: i32) -> Self {
47423        match value {
47424            0 => Self::Unspecified,
47425            1 => Self::Active,
47426            2 => Self::Creating,
47427            3 => Self::Deleting,
47428            4 => Self::ActionRequired,
47429            _ => Self::UnknownValue(state::UnknownValue(
47430                wkt::internal::UnknownEnumValue::Integer(value),
47431            )),
47432        }
47433    }
47434}
47435
47436impl std::convert::From<&str> for State {
47437    fn from(value: &str) -> Self {
47438        use std::string::ToString;
47439        match value {
47440            "STATE_UNSPECIFIED" => Self::Unspecified,
47441            "ACTIVE" => Self::Active,
47442            "CREATING" => Self::Creating,
47443            "DELETING" => Self::Deleting,
47444            "ACTION_REQUIRED" => Self::ActionRequired,
47445            _ => Self::UnknownValue(state::UnknownValue(
47446                wkt::internal::UnknownEnumValue::String(value.to_string()),
47447            )),
47448        }
47449    }
47450}
47451
47452impl serde::ser::Serialize for State {
47453    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
47454    where
47455        S: serde::Serializer,
47456    {
47457        match self {
47458            Self::Unspecified => serializer.serialize_i32(0),
47459            Self::Active => serializer.serialize_i32(1),
47460            Self::Creating => serializer.serialize_i32(2),
47461            Self::Deleting => serializer.serialize_i32(3),
47462            Self::ActionRequired => serializer.serialize_i32(4),
47463            Self::UnknownValue(u) => u.0.serialize(serializer),
47464        }
47465    }
47466}
47467
47468impl<'de> serde::de::Deserialize<'de> for State {
47469    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
47470    where
47471        D: serde::Deserializer<'de>,
47472    {
47473        deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
47474            ".google.cloud.dataplex.v1.State",
47475        ))
47476    }
47477}