Skip to main content

google_cloud_financialservices_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_location;
25extern crate google_cloud_longrunning;
26extern crate google_cloud_lro;
27extern crate google_cloud_type;
28extern crate serde;
29extern crate serde_json;
30extern crate serde_with;
31extern crate std;
32extern crate tracing;
33extern crate wkt;
34
35mod debug;
36mod deserialize;
37mod serialize;
38
39/// BacktestResult is created to test the performance of a model on a dataset.
40#[derive(Clone, Default, PartialEq)]
41#[non_exhaustive]
42pub struct BacktestResult {
43    /// Output only. The resource name of the BacktestResult.
44    /// format:
45    /// `/projects/{project_num}/locations/{location}/instances/{instance}/backtestResults/{backtest_result}`
46    pub name: std::string::String,
47
48    /// Output only. The timestamp of creation of this resource.
49    pub create_time: std::option::Option<wkt::Timestamp>,
50
51    /// Output only. The timestamp of the most recent update of this resource.
52    pub update_time: std::option::Option<wkt::Timestamp>,
53
54    /// Labels
55    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
56
57    /// Output only. State of the BacktestResult (creating, active, deleting, etc.)
58    pub state: crate::model::backtest_result::State,
59
60    /// Required. The resource name of the Dataset to backtest on
61    /// Format:
62    /// `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}`
63    pub dataset: std::string::String,
64
65    /// Required. The resource name of the Model to use or to backtest.
66    /// Format:
67    /// `/projects/{project_num}/locations/{location}/instances/{instance}/models/{model}`
68    pub model: std::string::String,
69
70    /// Required. End_time specifies the latest time from which labels are used and
71    /// from which data is used to generate features for backtesting.  End_time
72    /// should be no later than the end of the date_range of the primary dataset.
73    pub end_time: std::option::Option<wkt::Timestamp>,
74
75    /// The number of consecutive months to conduct backtesting for, ending with
76    /// the last full month prior to the end_time according to the dataset's
77    /// timezone.
78    pub backtest_periods: i32,
79
80    /// Required. PerformanceTarget gives information on how the test will be
81    /// evaluated.
82    pub performance_target: std::option::Option<crate::model::backtest_result::PerformanceTarget>,
83
84    /// Output only. The line of business (Retail/Commercial) this backtest is for.
85    /// Determined by Model, cannot be set by user.
86    pub line_of_business: crate::model::LineOfBusiness,
87
88    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
89}
90
91impl BacktestResult {
92    /// Creates a new default instance.
93    pub fn new() -> Self {
94        std::default::Default::default()
95    }
96
97    /// Sets the value of [name][crate::model::BacktestResult::name].
98    ///
99    /// # Example
100    /// ```ignore,no_run
101    /// # use google_cloud_financialservices_v1::model::BacktestResult;
102    /// # let project_num_id = "project_num_id";
103    /// # let location_id = "location_id";
104    /// # let instance_id = "instance_id";
105    /// # let backtest_result_id = "backtest_result_id";
106    /// let x = BacktestResult::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/backtestResults/{backtest_result_id}"));
107    /// ```
108    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
109        self.name = v.into();
110        self
111    }
112
113    /// Sets the value of [create_time][crate::model::BacktestResult::create_time].
114    ///
115    /// # Example
116    /// ```ignore,no_run
117    /// # use google_cloud_financialservices_v1::model::BacktestResult;
118    /// use wkt::Timestamp;
119    /// let x = BacktestResult::new().set_create_time(Timestamp::default()/* use setters */);
120    /// ```
121    pub fn set_create_time<T>(mut self, v: T) -> Self
122    where
123        T: std::convert::Into<wkt::Timestamp>,
124    {
125        self.create_time = std::option::Option::Some(v.into());
126        self
127    }
128
129    /// Sets or clears the value of [create_time][crate::model::BacktestResult::create_time].
130    ///
131    /// # Example
132    /// ```ignore,no_run
133    /// # use google_cloud_financialservices_v1::model::BacktestResult;
134    /// use wkt::Timestamp;
135    /// let x = BacktestResult::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
136    /// let x = BacktestResult::new().set_or_clear_create_time(None::<Timestamp>);
137    /// ```
138    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
139    where
140        T: std::convert::Into<wkt::Timestamp>,
141    {
142        self.create_time = v.map(|x| x.into());
143        self
144    }
145
146    /// Sets the value of [update_time][crate::model::BacktestResult::update_time].
147    ///
148    /// # Example
149    /// ```ignore,no_run
150    /// # use google_cloud_financialservices_v1::model::BacktestResult;
151    /// use wkt::Timestamp;
152    /// let x = BacktestResult::new().set_update_time(Timestamp::default()/* use setters */);
153    /// ```
154    pub fn set_update_time<T>(mut self, v: T) -> Self
155    where
156        T: std::convert::Into<wkt::Timestamp>,
157    {
158        self.update_time = std::option::Option::Some(v.into());
159        self
160    }
161
162    /// Sets or clears the value of [update_time][crate::model::BacktestResult::update_time].
163    ///
164    /// # Example
165    /// ```ignore,no_run
166    /// # use google_cloud_financialservices_v1::model::BacktestResult;
167    /// use wkt::Timestamp;
168    /// let x = BacktestResult::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
169    /// let x = BacktestResult::new().set_or_clear_update_time(None::<Timestamp>);
170    /// ```
171    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
172    where
173        T: std::convert::Into<wkt::Timestamp>,
174    {
175        self.update_time = v.map(|x| x.into());
176        self
177    }
178
179    /// Sets the value of [labels][crate::model::BacktestResult::labels].
180    ///
181    /// # Example
182    /// ```ignore,no_run
183    /// # use google_cloud_financialservices_v1::model::BacktestResult;
184    /// let x = BacktestResult::new().set_labels([
185    ///     ("key0", "abc"),
186    ///     ("key1", "xyz"),
187    /// ]);
188    /// ```
189    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
190    where
191        T: std::iter::IntoIterator<Item = (K, V)>,
192        K: std::convert::Into<std::string::String>,
193        V: std::convert::Into<std::string::String>,
194    {
195        use std::iter::Iterator;
196        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
197        self
198    }
199
200    /// Sets the value of [state][crate::model::BacktestResult::state].
201    ///
202    /// # Example
203    /// ```ignore,no_run
204    /// # use google_cloud_financialservices_v1::model::BacktestResult;
205    /// use google_cloud_financialservices_v1::model::backtest_result::State;
206    /// let x0 = BacktestResult::new().set_state(State::Creating);
207    /// let x1 = BacktestResult::new().set_state(State::Active);
208    /// let x2 = BacktestResult::new().set_state(State::Updating);
209    /// ```
210    pub fn set_state<T: std::convert::Into<crate::model::backtest_result::State>>(
211        mut self,
212        v: T,
213    ) -> Self {
214        self.state = v.into();
215        self
216    }
217
218    /// Sets the value of [dataset][crate::model::BacktestResult::dataset].
219    ///
220    /// # Example
221    /// ```ignore,no_run
222    /// # use google_cloud_financialservices_v1::model::BacktestResult;
223    /// # let project_num_id = "project_num_id";
224    /// # let location_id = "location_id";
225    /// # let instance_id = "instance_id";
226    /// # let dataset_id = "dataset_id";
227    /// let x = BacktestResult::new().set_dataset(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/datasets/{dataset_id}"));
228    /// ```
229    pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
230        self.dataset = v.into();
231        self
232    }
233
234    /// Sets the value of [model][crate::model::BacktestResult::model].
235    ///
236    /// # Example
237    /// ```ignore,no_run
238    /// # use google_cloud_financialservices_v1::model::BacktestResult;
239    /// # let project_num_id = "project_num_id";
240    /// # let location_id = "location_id";
241    /// # let instance_id = "instance_id";
242    /// # let model_id = "model_id";
243    /// let x = BacktestResult::new().set_model(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/models/{model_id}"));
244    /// ```
245    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
246        self.model = v.into();
247        self
248    }
249
250    /// Sets the value of [end_time][crate::model::BacktestResult::end_time].
251    ///
252    /// # Example
253    /// ```ignore,no_run
254    /// # use google_cloud_financialservices_v1::model::BacktestResult;
255    /// use wkt::Timestamp;
256    /// let x = BacktestResult::new().set_end_time(Timestamp::default()/* use setters */);
257    /// ```
258    pub fn set_end_time<T>(mut self, v: T) -> Self
259    where
260        T: std::convert::Into<wkt::Timestamp>,
261    {
262        self.end_time = std::option::Option::Some(v.into());
263        self
264    }
265
266    /// Sets or clears the value of [end_time][crate::model::BacktestResult::end_time].
267    ///
268    /// # Example
269    /// ```ignore,no_run
270    /// # use google_cloud_financialservices_v1::model::BacktestResult;
271    /// use wkt::Timestamp;
272    /// let x = BacktestResult::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
273    /// let x = BacktestResult::new().set_or_clear_end_time(None::<Timestamp>);
274    /// ```
275    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
276    where
277        T: std::convert::Into<wkt::Timestamp>,
278    {
279        self.end_time = v.map(|x| x.into());
280        self
281    }
282
283    /// Sets the value of [backtest_periods][crate::model::BacktestResult::backtest_periods].
284    ///
285    /// # Example
286    /// ```ignore,no_run
287    /// # use google_cloud_financialservices_v1::model::BacktestResult;
288    /// let x = BacktestResult::new().set_backtest_periods(42);
289    /// ```
290    pub fn set_backtest_periods<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
291        self.backtest_periods = v.into();
292        self
293    }
294
295    /// Sets the value of [performance_target][crate::model::BacktestResult::performance_target].
296    ///
297    /// # Example
298    /// ```ignore,no_run
299    /// # use google_cloud_financialservices_v1::model::BacktestResult;
300    /// use google_cloud_financialservices_v1::model::backtest_result::PerformanceTarget;
301    /// let x = BacktestResult::new().set_performance_target(PerformanceTarget::default()/* use setters */);
302    /// ```
303    pub fn set_performance_target<T>(mut self, v: T) -> Self
304    where
305        T: std::convert::Into<crate::model::backtest_result::PerformanceTarget>,
306    {
307        self.performance_target = std::option::Option::Some(v.into());
308        self
309    }
310
311    /// Sets or clears the value of [performance_target][crate::model::BacktestResult::performance_target].
312    ///
313    /// # Example
314    /// ```ignore,no_run
315    /// # use google_cloud_financialservices_v1::model::BacktestResult;
316    /// use google_cloud_financialservices_v1::model::backtest_result::PerformanceTarget;
317    /// let x = BacktestResult::new().set_or_clear_performance_target(Some(PerformanceTarget::default()/* use setters */));
318    /// let x = BacktestResult::new().set_or_clear_performance_target(None::<PerformanceTarget>);
319    /// ```
320    pub fn set_or_clear_performance_target<T>(mut self, v: std::option::Option<T>) -> Self
321    where
322        T: std::convert::Into<crate::model::backtest_result::PerformanceTarget>,
323    {
324        self.performance_target = v.map(|x| x.into());
325        self
326    }
327
328    /// Sets the value of [line_of_business][crate::model::BacktestResult::line_of_business].
329    ///
330    /// # Example
331    /// ```ignore,no_run
332    /// # use google_cloud_financialservices_v1::model::BacktestResult;
333    /// use google_cloud_financialservices_v1::model::LineOfBusiness;
334    /// let x0 = BacktestResult::new().set_line_of_business(LineOfBusiness::Commercial);
335    /// let x1 = BacktestResult::new().set_line_of_business(LineOfBusiness::Retail);
336    /// ```
337    pub fn set_line_of_business<T: std::convert::Into<crate::model::LineOfBusiness>>(
338        mut self,
339        v: T,
340    ) -> Self {
341        self.line_of_business = v.into();
342        self
343    }
344}
345
346impl wkt::message::Message for BacktestResult {
347    fn typename() -> &'static str {
348        "type.googleapis.com/google.cloud.financialservices.v1.BacktestResult"
349    }
350}
351
352/// Defines additional types related to [BacktestResult].
353pub mod backtest_result {
354    #[allow(unused_imports)]
355    use super::*;
356
357    /// PerformanceTarget gives hints on how to evaluate the performance of a
358    /// model.
359    #[derive(Clone, Default, PartialEq)]
360    #[non_exhaustive]
361    pub struct PerformanceTarget {
362        /// Required. A number that gives the tuner a hint on the number of parties
363        /// from this data that will be investigated per period (monthly). This is
364        /// used to control how the model is evaluated. For example, when trying AML
365        /// AI for the first time, we recommend setting this to the number of parties
366        /// investigated in an average month, based on alerts from your existing
367        /// automated alerting system.
368        pub party_investigations_per_period_hint: i64,
369
370        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
371    }
372
373    impl PerformanceTarget {
374        /// Creates a new default instance.
375        pub fn new() -> Self {
376            std::default::Default::default()
377        }
378
379        /// Sets the value of [party_investigations_per_period_hint][crate::model::backtest_result::PerformanceTarget::party_investigations_per_period_hint].
380        ///
381        /// # Example
382        /// ```ignore,no_run
383        /// # use google_cloud_financialservices_v1::model::backtest_result::PerformanceTarget;
384        /// let x = PerformanceTarget::new().set_party_investigations_per_period_hint(42);
385        /// ```
386        pub fn set_party_investigations_per_period_hint<T: std::convert::Into<i64>>(
387            mut self,
388            v: T,
389        ) -> Self {
390            self.party_investigations_per_period_hint = v.into();
391            self
392        }
393    }
394
395    impl wkt::message::Message for PerformanceTarget {
396        fn typename() -> &'static str {
397            "type.googleapis.com/google.cloud.financialservices.v1.BacktestResult.PerformanceTarget"
398        }
399    }
400
401    /// The possible states of a resource.
402    ///
403    /// # Working with unknown values
404    ///
405    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
406    /// additional enum variants at any time. Adding new variants is not considered
407    /// a breaking change. Applications should write their code in anticipation of:
408    ///
409    /// - New values appearing in future releases of the client library, **and**
410    /// - New values received dynamically, without application changes.
411    ///
412    /// Please consult the [Working with enums] section in the user guide for some
413    /// guidelines.
414    ///
415    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
416    #[derive(Clone, Debug, PartialEq)]
417    #[non_exhaustive]
418    pub enum State {
419        /// State is unspecified, should not occur.
420        Unspecified,
421        /// The resource has not finished being created.
422        Creating,
423        /// The resource is active/ready to be used.
424        Active,
425        /// The resource is in the process of being updated.
426        Updating,
427        /// The resource is in the process of being deleted.
428        Deleting,
429        /// If set, the enum was initialized with an unknown value.
430        ///
431        /// Applications can examine the value using [State::value] or
432        /// [State::name].
433        UnknownValue(state::UnknownValue),
434    }
435
436    #[doc(hidden)]
437    pub mod state {
438        #[allow(unused_imports)]
439        use super::*;
440        #[derive(Clone, Debug, PartialEq)]
441        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
442    }
443
444    impl State {
445        /// Gets the enum value.
446        ///
447        /// Returns `None` if the enum contains an unknown value deserialized from
448        /// the string representation of enums.
449        pub fn value(&self) -> std::option::Option<i32> {
450            match self {
451                Self::Unspecified => std::option::Option::Some(0),
452                Self::Creating => std::option::Option::Some(1),
453                Self::Active => std::option::Option::Some(2),
454                Self::Updating => std::option::Option::Some(3),
455                Self::Deleting => std::option::Option::Some(4),
456                Self::UnknownValue(u) => u.0.value(),
457            }
458        }
459
460        /// Gets the enum value as a string.
461        ///
462        /// Returns `None` if the enum contains an unknown value deserialized from
463        /// the integer representation of enums.
464        pub fn name(&self) -> std::option::Option<&str> {
465            match self {
466                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
467                Self::Creating => std::option::Option::Some("CREATING"),
468                Self::Active => std::option::Option::Some("ACTIVE"),
469                Self::Updating => std::option::Option::Some("UPDATING"),
470                Self::Deleting => std::option::Option::Some("DELETING"),
471                Self::UnknownValue(u) => u.0.name(),
472            }
473        }
474    }
475
476    impl std::default::Default for State {
477        fn default() -> Self {
478            use std::convert::From;
479            Self::from(0)
480        }
481    }
482
483    impl std::fmt::Display for State {
484        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
485            wkt::internal::display_enum(f, self.name(), self.value())
486        }
487    }
488
489    impl std::convert::From<i32> for State {
490        fn from(value: i32) -> Self {
491            match value {
492                0 => Self::Unspecified,
493                1 => Self::Creating,
494                2 => Self::Active,
495                3 => Self::Updating,
496                4 => Self::Deleting,
497                _ => Self::UnknownValue(state::UnknownValue(
498                    wkt::internal::UnknownEnumValue::Integer(value),
499                )),
500            }
501        }
502    }
503
504    impl std::convert::From<&str> for State {
505        fn from(value: &str) -> Self {
506            use std::string::ToString;
507            match value {
508                "STATE_UNSPECIFIED" => Self::Unspecified,
509                "CREATING" => Self::Creating,
510                "ACTIVE" => Self::Active,
511                "UPDATING" => Self::Updating,
512                "DELETING" => Self::Deleting,
513                _ => Self::UnknownValue(state::UnknownValue(
514                    wkt::internal::UnknownEnumValue::String(value.to_string()),
515                )),
516            }
517        }
518    }
519
520    impl serde::ser::Serialize for State {
521        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
522        where
523            S: serde::Serializer,
524        {
525            match self {
526                Self::Unspecified => serializer.serialize_i32(0),
527                Self::Creating => serializer.serialize_i32(1),
528                Self::Active => serializer.serialize_i32(2),
529                Self::Updating => serializer.serialize_i32(3),
530                Self::Deleting => serializer.serialize_i32(4),
531                Self::UnknownValue(u) => u.0.serialize(serializer),
532            }
533        }
534    }
535
536    impl<'de> serde::de::Deserialize<'de> for State {
537        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
538        where
539            D: serde::Deserializer<'de>,
540        {
541            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
542                ".google.cloud.financialservices.v1.BacktestResult.State",
543            ))
544        }
545    }
546}
547
548/// Request for retrieving a paginated list of BacktestResult resources that
549/// meet the specified criteria.
550#[derive(Clone, Default, PartialEq)]
551#[non_exhaustive]
552pub struct ListBacktestResultsRequest {
553    /// Required. The parent of the BacktestResult is the Instance.
554    pub parent: std::string::String,
555
556    /// The number of resources to be included in the response. The response
557    /// contains a next_page_token, which can be used to retrieve the next page of
558    /// resources.
559    pub page_size: i32,
560
561    /// In case of paginated results, this is the token that was returned in the
562    /// previous ListBacktestResultsResponse. It should be copied here to
563    /// retrieve the next page of resources. Empty will give the first page of
564    /// ListBacktestResultsRequest, and the last page will return an empty
565    /// page_token.
566    pub page_token: std::string::String,
567
568    /// Specify a filter to narrow search results.
569    pub filter: std::string::String,
570
571    /// Specify a field to use for ordering.
572    pub order_by: std::string::String,
573
574    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
575}
576
577impl ListBacktestResultsRequest {
578    /// Creates a new default instance.
579    pub fn new() -> Self {
580        std::default::Default::default()
581    }
582
583    /// Sets the value of [parent][crate::model::ListBacktestResultsRequest::parent].
584    ///
585    /// # Example
586    /// ```ignore,no_run
587    /// # use google_cloud_financialservices_v1::model::ListBacktestResultsRequest;
588    /// # let project_id = "project_id";
589    /// # let location_id = "location_id";
590    /// # let instance_id = "instance_id";
591    /// let x = ListBacktestResultsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
592    /// ```
593    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
594        self.parent = v.into();
595        self
596    }
597
598    /// Sets the value of [page_size][crate::model::ListBacktestResultsRequest::page_size].
599    ///
600    /// # Example
601    /// ```ignore,no_run
602    /// # use google_cloud_financialservices_v1::model::ListBacktestResultsRequest;
603    /// let x = ListBacktestResultsRequest::new().set_page_size(42);
604    /// ```
605    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
606        self.page_size = v.into();
607        self
608    }
609
610    /// Sets the value of [page_token][crate::model::ListBacktestResultsRequest::page_token].
611    ///
612    /// # Example
613    /// ```ignore,no_run
614    /// # use google_cloud_financialservices_v1::model::ListBacktestResultsRequest;
615    /// let x = ListBacktestResultsRequest::new().set_page_token("example");
616    /// ```
617    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
618        self.page_token = v.into();
619        self
620    }
621
622    /// Sets the value of [filter][crate::model::ListBacktestResultsRequest::filter].
623    ///
624    /// # Example
625    /// ```ignore,no_run
626    /// # use google_cloud_financialservices_v1::model::ListBacktestResultsRequest;
627    /// let x = ListBacktestResultsRequest::new().set_filter("example");
628    /// ```
629    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
630        self.filter = v.into();
631        self
632    }
633
634    /// Sets the value of [order_by][crate::model::ListBacktestResultsRequest::order_by].
635    ///
636    /// # Example
637    /// ```ignore,no_run
638    /// # use google_cloud_financialservices_v1::model::ListBacktestResultsRequest;
639    /// let x = ListBacktestResultsRequest::new().set_order_by("example");
640    /// ```
641    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
642        self.order_by = v.into();
643        self
644    }
645}
646
647impl wkt::message::Message for ListBacktestResultsRequest {
648    fn typename() -> &'static str {
649        "type.googleapis.com/google.cloud.financialservices.v1.ListBacktestResultsRequest"
650    }
651}
652
653/// Response for retrieving a list of BacktestResults
654#[derive(Clone, Default, PartialEq)]
655#[non_exhaustive]
656pub struct ListBacktestResultsResponse {
657    /// List of BacktestResult resources
658    pub backtest_results: std::vec::Vec<crate::model::BacktestResult>,
659
660    /// This token should be passed to the next ListBacktestResultsRequest to
661    /// retrieve the next page of BacktestResults (empty indicates we are
662    /// done).
663    pub next_page_token: std::string::String,
664
665    /// Locations that could not be reached.
666    pub unreachable: std::vec::Vec<std::string::String>,
667
668    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
669}
670
671impl ListBacktestResultsResponse {
672    /// Creates a new default instance.
673    pub fn new() -> Self {
674        std::default::Default::default()
675    }
676
677    /// Sets the value of [backtest_results][crate::model::ListBacktestResultsResponse::backtest_results].
678    ///
679    /// # Example
680    /// ```ignore,no_run
681    /// # use google_cloud_financialservices_v1::model::ListBacktestResultsResponse;
682    /// use google_cloud_financialservices_v1::model::BacktestResult;
683    /// let x = ListBacktestResultsResponse::new()
684    ///     .set_backtest_results([
685    ///         BacktestResult::default()/* use setters */,
686    ///         BacktestResult::default()/* use (different) setters */,
687    ///     ]);
688    /// ```
689    pub fn set_backtest_results<T, V>(mut self, v: T) -> Self
690    where
691        T: std::iter::IntoIterator<Item = V>,
692        V: std::convert::Into<crate::model::BacktestResult>,
693    {
694        use std::iter::Iterator;
695        self.backtest_results = v.into_iter().map(|i| i.into()).collect();
696        self
697    }
698
699    /// Sets the value of [next_page_token][crate::model::ListBacktestResultsResponse::next_page_token].
700    ///
701    /// # Example
702    /// ```ignore,no_run
703    /// # use google_cloud_financialservices_v1::model::ListBacktestResultsResponse;
704    /// let x = ListBacktestResultsResponse::new().set_next_page_token("example");
705    /// ```
706    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
707        self.next_page_token = v.into();
708        self
709    }
710
711    /// Sets the value of [unreachable][crate::model::ListBacktestResultsResponse::unreachable].
712    ///
713    /// # Example
714    /// ```ignore,no_run
715    /// # use google_cloud_financialservices_v1::model::ListBacktestResultsResponse;
716    /// let x = ListBacktestResultsResponse::new().set_unreachable(["a", "b", "c"]);
717    /// ```
718    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
719    where
720        T: std::iter::IntoIterator<Item = V>,
721        V: std::convert::Into<std::string::String>,
722    {
723        use std::iter::Iterator;
724        self.unreachable = v.into_iter().map(|i| i.into()).collect();
725        self
726    }
727}
728
729impl wkt::message::Message for ListBacktestResultsResponse {
730    fn typename() -> &'static str {
731        "type.googleapis.com/google.cloud.financialservices.v1.ListBacktestResultsResponse"
732    }
733}
734
735#[doc(hidden)]
736impl google_cloud_gax::paginator::internal::PageableResponse for ListBacktestResultsResponse {
737    type PageItem = crate::model::BacktestResult;
738
739    fn items(self) -> std::vec::Vec<Self::PageItem> {
740        self.backtest_results
741    }
742
743    fn next_page_token(&self) -> std::string::String {
744        use std::clone::Clone;
745        self.next_page_token.clone()
746    }
747}
748
749/// Request for retrieving a specific BacktestResult resource.
750#[derive(Clone, Default, PartialEq)]
751#[non_exhaustive]
752pub struct GetBacktestResultRequest {
753    /// Required. The resource name of the BacktestResult
754    pub name: std::string::String,
755
756    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
757}
758
759impl GetBacktestResultRequest {
760    /// Creates a new default instance.
761    pub fn new() -> Self {
762        std::default::Default::default()
763    }
764
765    /// Sets the value of [name][crate::model::GetBacktestResultRequest::name].
766    ///
767    /// # Example
768    /// ```ignore,no_run
769    /// # use google_cloud_financialservices_v1::model::GetBacktestResultRequest;
770    /// # let project_num_id = "project_num_id";
771    /// # let location_id = "location_id";
772    /// # let instance_id = "instance_id";
773    /// # let backtest_result_id = "backtest_result_id";
774    /// let x = GetBacktestResultRequest::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/backtestResults/{backtest_result_id}"));
775    /// ```
776    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
777        self.name = v.into();
778        self
779    }
780}
781
782impl wkt::message::Message for GetBacktestResultRequest {
783    fn typename() -> &'static str {
784        "type.googleapis.com/google.cloud.financialservices.v1.GetBacktestResultRequest"
785    }
786}
787
788/// Request for creating a BacktestResult resource.
789#[derive(Clone, Default, PartialEq)]
790#[non_exhaustive]
791pub struct CreateBacktestResultRequest {
792    /// Required. The parent of the BacktestResult is the Instance.
793    pub parent: std::string::String,
794
795    /// Required. The resource id of the BacktestResult
796    pub backtest_result_id: std::string::String,
797
798    /// Required. The BacktestResult that will be created.
799    pub backtest_result: std::option::Option<crate::model::BacktestResult>,
800
801    /// Optional. An optional request ID to identify requests. Specify a unique
802    /// request ID so that if you must retry your request, the server will know to
803    /// ignore the request if it has already been completed. The server will
804    /// guarantee that for at least 60 minutes since the first request.
805    ///
806    /// For example, consider a situation where you make an initial request and the
807    /// request times out. If you make the request again with the same request
808    /// ID, the server can check if original operation with the same request ID
809    /// was received, and if so, will ignore the second request. This prevents
810    /// clients from accidentally creating duplicate commitments.
811    ///
812    /// The request ID must be a valid UUID with the exception that zero UUID is
813    /// not supported (00000000-0000-0000-0000-000000000000).
814    pub request_id: std::string::String,
815
816    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
817}
818
819impl CreateBacktestResultRequest {
820    /// Creates a new default instance.
821    pub fn new() -> Self {
822        std::default::Default::default()
823    }
824
825    /// Sets the value of [parent][crate::model::CreateBacktestResultRequest::parent].
826    ///
827    /// # Example
828    /// ```ignore,no_run
829    /// # use google_cloud_financialservices_v1::model::CreateBacktestResultRequest;
830    /// # let project_id = "project_id";
831    /// # let location_id = "location_id";
832    /// # let instance_id = "instance_id";
833    /// let x = CreateBacktestResultRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
834    /// ```
835    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
836        self.parent = v.into();
837        self
838    }
839
840    /// Sets the value of [backtest_result_id][crate::model::CreateBacktestResultRequest::backtest_result_id].
841    ///
842    /// # Example
843    /// ```ignore,no_run
844    /// # use google_cloud_financialservices_v1::model::CreateBacktestResultRequest;
845    /// let x = CreateBacktestResultRequest::new().set_backtest_result_id("example");
846    /// ```
847    pub fn set_backtest_result_id<T: std::convert::Into<std::string::String>>(
848        mut self,
849        v: T,
850    ) -> Self {
851        self.backtest_result_id = v.into();
852        self
853    }
854
855    /// Sets the value of [backtest_result][crate::model::CreateBacktestResultRequest::backtest_result].
856    ///
857    /// # Example
858    /// ```ignore,no_run
859    /// # use google_cloud_financialservices_v1::model::CreateBacktestResultRequest;
860    /// use google_cloud_financialservices_v1::model::BacktestResult;
861    /// let x = CreateBacktestResultRequest::new().set_backtest_result(BacktestResult::default()/* use setters */);
862    /// ```
863    pub fn set_backtest_result<T>(mut self, v: T) -> Self
864    where
865        T: std::convert::Into<crate::model::BacktestResult>,
866    {
867        self.backtest_result = std::option::Option::Some(v.into());
868        self
869    }
870
871    /// Sets or clears the value of [backtest_result][crate::model::CreateBacktestResultRequest::backtest_result].
872    ///
873    /// # Example
874    /// ```ignore,no_run
875    /// # use google_cloud_financialservices_v1::model::CreateBacktestResultRequest;
876    /// use google_cloud_financialservices_v1::model::BacktestResult;
877    /// let x = CreateBacktestResultRequest::new().set_or_clear_backtest_result(Some(BacktestResult::default()/* use setters */));
878    /// let x = CreateBacktestResultRequest::new().set_or_clear_backtest_result(None::<BacktestResult>);
879    /// ```
880    pub fn set_or_clear_backtest_result<T>(mut self, v: std::option::Option<T>) -> Self
881    where
882        T: std::convert::Into<crate::model::BacktestResult>,
883    {
884        self.backtest_result = v.map(|x| x.into());
885        self
886    }
887
888    /// Sets the value of [request_id][crate::model::CreateBacktestResultRequest::request_id].
889    ///
890    /// # Example
891    /// ```ignore,no_run
892    /// # use google_cloud_financialservices_v1::model::CreateBacktestResultRequest;
893    /// let x = CreateBacktestResultRequest::new().set_request_id("example");
894    /// ```
895    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
896        self.request_id = v.into();
897        self
898    }
899}
900
901impl wkt::message::Message for CreateBacktestResultRequest {
902    fn typename() -> &'static str {
903        "type.googleapis.com/google.cloud.financialservices.v1.CreateBacktestResultRequest"
904    }
905}
906
907/// Request for updating a BacktestResult
908#[derive(Clone, Default, PartialEq)]
909#[non_exhaustive]
910pub struct UpdateBacktestResultRequest {
911    /// Optional. Field mask is used to specify the fields to be overwritten in the
912    /// BacktestResult resource by the update.
913    /// The fields specified in the update_mask are relative to the resource, not
914    /// the full request. A field will be overwritten if it is in the mask. If the
915    /// user does not provide a mask then all fields will be overwritten.
916    pub update_mask: std::option::Option<wkt::FieldMask>,
917
918    /// Required. The new value of the BacktestResult fields that will be updated
919    /// according to the update_mask.
920    pub backtest_result: std::option::Option<crate::model::BacktestResult>,
921
922    /// Optional. An optional request ID to identify requests. Specify a unique
923    /// request ID so that if you must retry your request, the server will know to
924    /// ignore the request if it has already been completed. The server will
925    /// guarantee that for at least 60 minutes since the first request.
926    ///
927    /// For example, consider a situation where you make an initial request and the
928    /// request times out. If you make the request again with the same request
929    /// ID, the server can check if original operation with the same request ID
930    /// was received, and if so, will ignore the second request. This prevents
931    /// clients from accidentally creating duplicate commitments.
932    ///
933    /// The request ID must be a valid UUID with the exception that zero UUID is
934    /// not supported (00000000-0000-0000-0000-000000000000).
935    pub request_id: std::string::String,
936
937    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
938}
939
940impl UpdateBacktestResultRequest {
941    /// Creates a new default instance.
942    pub fn new() -> Self {
943        std::default::Default::default()
944    }
945
946    /// Sets the value of [update_mask][crate::model::UpdateBacktestResultRequest::update_mask].
947    ///
948    /// # Example
949    /// ```ignore,no_run
950    /// # use google_cloud_financialservices_v1::model::UpdateBacktestResultRequest;
951    /// use wkt::FieldMask;
952    /// let x = UpdateBacktestResultRequest::new().set_update_mask(FieldMask::default()/* use setters */);
953    /// ```
954    pub fn set_update_mask<T>(mut self, v: T) -> Self
955    where
956        T: std::convert::Into<wkt::FieldMask>,
957    {
958        self.update_mask = std::option::Option::Some(v.into());
959        self
960    }
961
962    /// Sets or clears the value of [update_mask][crate::model::UpdateBacktestResultRequest::update_mask].
963    ///
964    /// # Example
965    /// ```ignore,no_run
966    /// # use google_cloud_financialservices_v1::model::UpdateBacktestResultRequest;
967    /// use wkt::FieldMask;
968    /// let x = UpdateBacktestResultRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
969    /// let x = UpdateBacktestResultRequest::new().set_or_clear_update_mask(None::<FieldMask>);
970    /// ```
971    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
972    where
973        T: std::convert::Into<wkt::FieldMask>,
974    {
975        self.update_mask = v.map(|x| x.into());
976        self
977    }
978
979    /// Sets the value of [backtest_result][crate::model::UpdateBacktestResultRequest::backtest_result].
980    ///
981    /// # Example
982    /// ```ignore,no_run
983    /// # use google_cloud_financialservices_v1::model::UpdateBacktestResultRequest;
984    /// use google_cloud_financialservices_v1::model::BacktestResult;
985    /// let x = UpdateBacktestResultRequest::new().set_backtest_result(BacktestResult::default()/* use setters */);
986    /// ```
987    pub fn set_backtest_result<T>(mut self, v: T) -> Self
988    where
989        T: std::convert::Into<crate::model::BacktestResult>,
990    {
991        self.backtest_result = std::option::Option::Some(v.into());
992        self
993    }
994
995    /// Sets or clears the value of [backtest_result][crate::model::UpdateBacktestResultRequest::backtest_result].
996    ///
997    /// # Example
998    /// ```ignore,no_run
999    /// # use google_cloud_financialservices_v1::model::UpdateBacktestResultRequest;
1000    /// use google_cloud_financialservices_v1::model::BacktestResult;
1001    /// let x = UpdateBacktestResultRequest::new().set_or_clear_backtest_result(Some(BacktestResult::default()/* use setters */));
1002    /// let x = UpdateBacktestResultRequest::new().set_or_clear_backtest_result(None::<BacktestResult>);
1003    /// ```
1004    pub fn set_or_clear_backtest_result<T>(mut self, v: std::option::Option<T>) -> Self
1005    where
1006        T: std::convert::Into<crate::model::BacktestResult>,
1007    {
1008        self.backtest_result = v.map(|x| x.into());
1009        self
1010    }
1011
1012    /// Sets the value of [request_id][crate::model::UpdateBacktestResultRequest::request_id].
1013    ///
1014    /// # Example
1015    /// ```ignore,no_run
1016    /// # use google_cloud_financialservices_v1::model::UpdateBacktestResultRequest;
1017    /// let x = UpdateBacktestResultRequest::new().set_request_id("example");
1018    /// ```
1019    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1020        self.request_id = v.into();
1021        self
1022    }
1023}
1024
1025impl wkt::message::Message for UpdateBacktestResultRequest {
1026    fn typename() -> &'static str {
1027        "type.googleapis.com/google.cloud.financialservices.v1.UpdateBacktestResultRequest"
1028    }
1029}
1030
1031/// Request for deleting a BacktestResult.
1032#[derive(Clone, Default, PartialEq)]
1033#[non_exhaustive]
1034pub struct DeleteBacktestResultRequest {
1035    /// Required. The resource name of the BacktestResult.
1036    pub name: std::string::String,
1037
1038    /// Optional. An optional request ID to identify requests. Specify a unique
1039    /// request ID so that if you must retry your request, the server will know to
1040    /// ignore the request if it has already been completed. The server will
1041    /// guarantee that for at least 60 minutes after the first request.
1042    ///
1043    /// For example, consider a situation where you make an initial request and the
1044    /// request times out. If you make the request again with the same request
1045    /// ID, the server can check if original operation with the same request ID
1046    /// was received, and if so, will ignore the second request. This prevents
1047    /// clients from accidentally creating duplicate commitments.
1048    ///
1049    /// The request ID must be a valid UUID with the exception that zero UUID is
1050    /// not supported (00000000-0000-0000-0000-000000000000).
1051    pub request_id: std::string::String,
1052
1053    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1054}
1055
1056impl DeleteBacktestResultRequest {
1057    /// Creates a new default instance.
1058    pub fn new() -> Self {
1059        std::default::Default::default()
1060    }
1061
1062    /// Sets the value of [name][crate::model::DeleteBacktestResultRequest::name].
1063    ///
1064    /// # Example
1065    /// ```ignore,no_run
1066    /// # use google_cloud_financialservices_v1::model::DeleteBacktestResultRequest;
1067    /// # let project_num_id = "project_num_id";
1068    /// # let location_id = "location_id";
1069    /// # let instance_id = "instance_id";
1070    /// # let backtest_result_id = "backtest_result_id";
1071    /// let x = DeleteBacktestResultRequest::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/backtestResults/{backtest_result_id}"));
1072    /// ```
1073    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1074        self.name = v.into();
1075        self
1076    }
1077
1078    /// Sets the value of [request_id][crate::model::DeleteBacktestResultRequest::request_id].
1079    ///
1080    /// # Example
1081    /// ```ignore,no_run
1082    /// # use google_cloud_financialservices_v1::model::DeleteBacktestResultRequest;
1083    /// let x = DeleteBacktestResultRequest::new().set_request_id("example");
1084    /// ```
1085    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1086        self.request_id = v.into();
1087        self
1088    }
1089}
1090
1091impl wkt::message::Message for DeleteBacktestResultRequest {
1092    fn typename() -> &'static str {
1093        "type.googleapis.com/google.cloud.financialservices.v1.DeleteBacktestResultRequest"
1094    }
1095}
1096
1097/// Request for exporting BacktestResult metadata.
1098#[derive(Clone, Default, PartialEq)]
1099#[non_exhaustive]
1100pub struct ExportBacktestResultMetadataRequest {
1101    /// Required. The resource name of the BacktestResult.
1102    pub backtest_result: std::string::String,
1103
1104    /// Required. BigQuery output where the metadata will be written.
1105    pub structured_metadata_destination: std::option::Option<crate::model::BigQueryDestination>,
1106
1107    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1108}
1109
1110impl ExportBacktestResultMetadataRequest {
1111    /// Creates a new default instance.
1112    pub fn new() -> Self {
1113        std::default::Default::default()
1114    }
1115
1116    /// Sets the value of [backtest_result][crate::model::ExportBacktestResultMetadataRequest::backtest_result].
1117    ///
1118    /// # Example
1119    /// ```ignore,no_run
1120    /// # use google_cloud_financialservices_v1::model::ExportBacktestResultMetadataRequest;
1121    /// # let project_num_id = "project_num_id";
1122    /// # let location_id = "location_id";
1123    /// # let instance_id = "instance_id";
1124    /// # let backtest_result_id = "backtest_result_id";
1125    /// let x = ExportBacktestResultMetadataRequest::new().set_backtest_result(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/backtestResults/{backtest_result_id}"));
1126    /// ```
1127    pub fn set_backtest_result<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1128        self.backtest_result = v.into();
1129        self
1130    }
1131
1132    /// Sets the value of [structured_metadata_destination][crate::model::ExportBacktestResultMetadataRequest::structured_metadata_destination].
1133    ///
1134    /// # Example
1135    /// ```ignore,no_run
1136    /// # use google_cloud_financialservices_v1::model::ExportBacktestResultMetadataRequest;
1137    /// use google_cloud_financialservices_v1::model::BigQueryDestination;
1138    /// let x = ExportBacktestResultMetadataRequest::new().set_structured_metadata_destination(BigQueryDestination::default()/* use setters */);
1139    /// ```
1140    pub fn set_structured_metadata_destination<T>(mut self, v: T) -> Self
1141    where
1142        T: std::convert::Into<crate::model::BigQueryDestination>,
1143    {
1144        self.structured_metadata_destination = std::option::Option::Some(v.into());
1145        self
1146    }
1147
1148    /// Sets or clears the value of [structured_metadata_destination][crate::model::ExportBacktestResultMetadataRequest::structured_metadata_destination].
1149    ///
1150    /// # Example
1151    /// ```ignore,no_run
1152    /// # use google_cloud_financialservices_v1::model::ExportBacktestResultMetadataRequest;
1153    /// use google_cloud_financialservices_v1::model::BigQueryDestination;
1154    /// let x = ExportBacktestResultMetadataRequest::new().set_or_clear_structured_metadata_destination(Some(BigQueryDestination::default()/* use setters */));
1155    /// let x = ExportBacktestResultMetadataRequest::new().set_or_clear_structured_metadata_destination(None::<BigQueryDestination>);
1156    /// ```
1157    pub fn set_or_clear_structured_metadata_destination<T>(
1158        mut self,
1159        v: std::option::Option<T>,
1160    ) -> Self
1161    where
1162        T: std::convert::Into<crate::model::BigQueryDestination>,
1163    {
1164        self.structured_metadata_destination = v.map(|x| x.into());
1165        self
1166    }
1167}
1168
1169impl wkt::message::Message for ExportBacktestResultMetadataRequest {
1170    fn typename() -> &'static str {
1171        "type.googleapis.com/google.cloud.financialservices.v1.ExportBacktestResultMetadataRequest"
1172    }
1173}
1174
1175/// Response for exporting BacktestResult metadata.
1176#[derive(Clone, Default, PartialEq)]
1177#[non_exhaustive]
1178pub struct ExportBacktestResultMetadataResponse {
1179    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1180}
1181
1182impl ExportBacktestResultMetadataResponse {
1183    /// Creates a new default instance.
1184    pub fn new() -> Self {
1185        std::default::Default::default()
1186    }
1187}
1188
1189impl wkt::message::Message for ExportBacktestResultMetadataResponse {
1190    fn typename() -> &'static str {
1191        "type.googleapis.com/google.cloud.financialservices.v1.ExportBacktestResultMetadataResponse"
1192    }
1193}
1194
1195/// BigQueryDestination is a wrapper for BigQuery output information.
1196#[derive(Clone, Default, PartialEq)]
1197#[non_exhaustive]
1198pub struct BigQueryDestination {
1199    /// Optional. BigQuery URI to a table, must be of the form
1200    /// bq://projectId.bqDatasetId.tableId.
1201    /// Note that the BigQuery dataset must already exist.
1202    /// VPC-SC restrictions apply.
1203    pub table_uri: std::string::String,
1204
1205    /// Required. Whether or not to overwrite the destination table. By default the
1206    /// table won't be overwritten and an error will be returned if the table
1207    /// exists and contains data.
1208    pub write_disposition: crate::model::big_query_destination::WriteDisposition,
1209
1210    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1211}
1212
1213impl BigQueryDestination {
1214    /// Creates a new default instance.
1215    pub fn new() -> Self {
1216        std::default::Default::default()
1217    }
1218
1219    /// Sets the value of [table_uri][crate::model::BigQueryDestination::table_uri].
1220    ///
1221    /// # Example
1222    /// ```ignore,no_run
1223    /// # use google_cloud_financialservices_v1::model::BigQueryDestination;
1224    /// let x = BigQueryDestination::new().set_table_uri("example");
1225    /// ```
1226    pub fn set_table_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1227        self.table_uri = v.into();
1228        self
1229    }
1230
1231    /// Sets the value of [write_disposition][crate::model::BigQueryDestination::write_disposition].
1232    ///
1233    /// # Example
1234    /// ```ignore,no_run
1235    /// # use google_cloud_financialservices_v1::model::BigQueryDestination;
1236    /// use google_cloud_financialservices_v1::model::big_query_destination::WriteDisposition;
1237    /// let x0 = BigQueryDestination::new().set_write_disposition(WriteDisposition::WriteEmpty);
1238    /// let x1 = BigQueryDestination::new().set_write_disposition(WriteDisposition::WriteTruncate);
1239    /// ```
1240    pub fn set_write_disposition<
1241        T: std::convert::Into<crate::model::big_query_destination::WriteDisposition>,
1242    >(
1243        mut self,
1244        v: T,
1245    ) -> Self {
1246        self.write_disposition = v.into();
1247        self
1248    }
1249}
1250
1251impl wkt::message::Message for BigQueryDestination {
1252    fn typename() -> &'static str {
1253        "type.googleapis.com/google.cloud.financialservices.v1.BigQueryDestination"
1254    }
1255}
1256
1257/// Defines additional types related to [BigQueryDestination].
1258pub mod big_query_destination {
1259    #[allow(unused_imports)]
1260    use super::*;
1261
1262    /// WriteDisposition controls the behavior when the destination table already
1263    /// exists.
1264    ///
1265    /// # Working with unknown values
1266    ///
1267    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1268    /// additional enum variants at any time. Adding new variants is not considered
1269    /// a breaking change. Applications should write their code in anticipation of:
1270    ///
1271    /// - New values appearing in future releases of the client library, **and**
1272    /// - New values received dynamically, without application changes.
1273    ///
1274    /// Please consult the [Working with enums] section in the user guide for some
1275    /// guidelines.
1276    ///
1277    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1278    #[derive(Clone, Debug, PartialEq)]
1279    #[non_exhaustive]
1280    pub enum WriteDisposition {
1281        /// Default behavior is the same as WRITE_EMPTY.
1282        Unspecified,
1283        /// If the table already exists and contains data, an error is returned.
1284        WriteEmpty,
1285        /// If the table already exists, the data will be overwritten.
1286        WriteTruncate,
1287        /// If set, the enum was initialized with an unknown value.
1288        ///
1289        /// Applications can examine the value using [WriteDisposition::value] or
1290        /// [WriteDisposition::name].
1291        UnknownValue(write_disposition::UnknownValue),
1292    }
1293
1294    #[doc(hidden)]
1295    pub mod write_disposition {
1296        #[allow(unused_imports)]
1297        use super::*;
1298        #[derive(Clone, Debug, PartialEq)]
1299        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1300    }
1301
1302    impl WriteDisposition {
1303        /// Gets the enum value.
1304        ///
1305        /// Returns `None` if the enum contains an unknown value deserialized from
1306        /// the string representation of enums.
1307        pub fn value(&self) -> std::option::Option<i32> {
1308            match self {
1309                Self::Unspecified => std::option::Option::Some(0),
1310                Self::WriteEmpty => std::option::Option::Some(1),
1311                Self::WriteTruncate => std::option::Option::Some(2),
1312                Self::UnknownValue(u) => u.0.value(),
1313            }
1314        }
1315
1316        /// Gets the enum value as a string.
1317        ///
1318        /// Returns `None` if the enum contains an unknown value deserialized from
1319        /// the integer representation of enums.
1320        pub fn name(&self) -> std::option::Option<&str> {
1321            match self {
1322                Self::Unspecified => std::option::Option::Some("WRITE_DISPOSITION_UNSPECIFIED"),
1323                Self::WriteEmpty => std::option::Option::Some("WRITE_EMPTY"),
1324                Self::WriteTruncate => std::option::Option::Some("WRITE_TRUNCATE"),
1325                Self::UnknownValue(u) => u.0.name(),
1326            }
1327        }
1328    }
1329
1330    impl std::default::Default for WriteDisposition {
1331        fn default() -> Self {
1332            use std::convert::From;
1333            Self::from(0)
1334        }
1335    }
1336
1337    impl std::fmt::Display for WriteDisposition {
1338        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1339            wkt::internal::display_enum(f, self.name(), self.value())
1340        }
1341    }
1342
1343    impl std::convert::From<i32> for WriteDisposition {
1344        fn from(value: i32) -> Self {
1345            match value {
1346                0 => Self::Unspecified,
1347                1 => Self::WriteEmpty,
1348                2 => Self::WriteTruncate,
1349                _ => Self::UnknownValue(write_disposition::UnknownValue(
1350                    wkt::internal::UnknownEnumValue::Integer(value),
1351                )),
1352            }
1353        }
1354    }
1355
1356    impl std::convert::From<&str> for WriteDisposition {
1357        fn from(value: &str) -> Self {
1358            use std::string::ToString;
1359            match value {
1360                "WRITE_DISPOSITION_UNSPECIFIED" => Self::Unspecified,
1361                "WRITE_EMPTY" => Self::WriteEmpty,
1362                "WRITE_TRUNCATE" => Self::WriteTruncate,
1363                _ => Self::UnknownValue(write_disposition::UnknownValue(
1364                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1365                )),
1366            }
1367        }
1368    }
1369
1370    impl serde::ser::Serialize for WriteDisposition {
1371        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1372        where
1373            S: serde::Serializer,
1374        {
1375            match self {
1376                Self::Unspecified => serializer.serialize_i32(0),
1377                Self::WriteEmpty => serializer.serialize_i32(1),
1378                Self::WriteTruncate => serializer.serialize_i32(2),
1379                Self::UnknownValue(u) => u.0.serialize(serializer),
1380            }
1381        }
1382    }
1383
1384    impl<'de> serde::de::Deserialize<'de> for WriteDisposition {
1385        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1386        where
1387            D: serde::Deserializer<'de>,
1388        {
1389            deserializer.deserialize_any(wkt::internal::EnumVisitor::<WriteDisposition>::new(
1390                ".google.cloud.financialservices.v1.BigQueryDestination.WriteDisposition",
1391            ))
1392        }
1393    }
1394}
1395
1396/// The Dataset resource contains summary information about a dataset.
1397#[derive(Clone, Default, PartialEq)]
1398#[non_exhaustive]
1399pub struct Dataset {
1400    /// Output only. The resource name of the Dataset.
1401    /// format:
1402    /// `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}`
1403    pub name: std::string::String,
1404
1405    /// Output only. The timestamp of creation of this resource.
1406    pub create_time: std::option::Option<wkt::Timestamp>,
1407
1408    /// Output only. The timestamp of the most recent update of this resource.
1409    pub update_time: std::option::Option<wkt::Timestamp>,
1410
1411    /// Labels
1412    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1413
1414    /// Required. The set of BigQuery tables in the dataset.  The key should be the
1415    /// table type and the value should be the BigQuery tables in the format
1416    /// `bq://{project}.{dataset}.{table}`.
1417    /// Current table types are:
1418    ///
1419    /// * `party`
1420    /// * `account_party_link`
1421    /// * `transaction`
1422    /// * `risk_case_event`
1423    /// * `party_supplementary_data`
1424    pub table_specs: std::collections::HashMap<std::string::String, std::string::String>,
1425
1426    /// Output only. State of the dataset (creating, active, deleting, etc.)
1427    pub state: crate::model::dataset::State,
1428
1429    /// Required. Core time window of the dataset. All tables should have complete
1430    /// data covering this period.
1431    pub date_range: std::option::Option<google_cloud_type::model::Interval>,
1432
1433    /// The timezone of the data, default will act as UTC.
1434    pub time_zone: std::option::Option<google_cloud_type::model::TimeZone>,
1435
1436    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1437}
1438
1439impl Dataset {
1440    /// Creates a new default instance.
1441    pub fn new() -> Self {
1442        std::default::Default::default()
1443    }
1444
1445    /// Sets the value of [name][crate::model::Dataset::name].
1446    ///
1447    /// # Example
1448    /// ```ignore,no_run
1449    /// # use google_cloud_financialservices_v1::model::Dataset;
1450    /// # let project_num_id = "project_num_id";
1451    /// # let location_id = "location_id";
1452    /// # let instance_id = "instance_id";
1453    /// # let dataset_id = "dataset_id";
1454    /// let x = Dataset::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/datasets/{dataset_id}"));
1455    /// ```
1456    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1457        self.name = v.into();
1458        self
1459    }
1460
1461    /// Sets the value of [create_time][crate::model::Dataset::create_time].
1462    ///
1463    /// # Example
1464    /// ```ignore,no_run
1465    /// # use google_cloud_financialservices_v1::model::Dataset;
1466    /// use wkt::Timestamp;
1467    /// let x = Dataset::new().set_create_time(Timestamp::default()/* use setters */);
1468    /// ```
1469    pub fn set_create_time<T>(mut self, v: T) -> Self
1470    where
1471        T: std::convert::Into<wkt::Timestamp>,
1472    {
1473        self.create_time = std::option::Option::Some(v.into());
1474        self
1475    }
1476
1477    /// Sets or clears the value of [create_time][crate::model::Dataset::create_time].
1478    ///
1479    /// # Example
1480    /// ```ignore,no_run
1481    /// # use google_cloud_financialservices_v1::model::Dataset;
1482    /// use wkt::Timestamp;
1483    /// let x = Dataset::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
1484    /// let x = Dataset::new().set_or_clear_create_time(None::<Timestamp>);
1485    /// ```
1486    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1487    where
1488        T: std::convert::Into<wkt::Timestamp>,
1489    {
1490        self.create_time = v.map(|x| x.into());
1491        self
1492    }
1493
1494    /// Sets the value of [update_time][crate::model::Dataset::update_time].
1495    ///
1496    /// # Example
1497    /// ```ignore,no_run
1498    /// # use google_cloud_financialservices_v1::model::Dataset;
1499    /// use wkt::Timestamp;
1500    /// let x = Dataset::new().set_update_time(Timestamp::default()/* use setters */);
1501    /// ```
1502    pub fn set_update_time<T>(mut self, v: T) -> Self
1503    where
1504        T: std::convert::Into<wkt::Timestamp>,
1505    {
1506        self.update_time = std::option::Option::Some(v.into());
1507        self
1508    }
1509
1510    /// Sets or clears the value of [update_time][crate::model::Dataset::update_time].
1511    ///
1512    /// # Example
1513    /// ```ignore,no_run
1514    /// # use google_cloud_financialservices_v1::model::Dataset;
1515    /// use wkt::Timestamp;
1516    /// let x = Dataset::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
1517    /// let x = Dataset::new().set_or_clear_update_time(None::<Timestamp>);
1518    /// ```
1519    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1520    where
1521        T: std::convert::Into<wkt::Timestamp>,
1522    {
1523        self.update_time = v.map(|x| x.into());
1524        self
1525    }
1526
1527    /// Sets the value of [labels][crate::model::Dataset::labels].
1528    ///
1529    /// # Example
1530    /// ```ignore,no_run
1531    /// # use google_cloud_financialservices_v1::model::Dataset;
1532    /// let x = Dataset::new().set_labels([
1533    ///     ("key0", "abc"),
1534    ///     ("key1", "xyz"),
1535    /// ]);
1536    /// ```
1537    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1538    where
1539        T: std::iter::IntoIterator<Item = (K, V)>,
1540        K: std::convert::Into<std::string::String>,
1541        V: std::convert::Into<std::string::String>,
1542    {
1543        use std::iter::Iterator;
1544        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1545        self
1546    }
1547
1548    /// Sets the value of [table_specs][crate::model::Dataset::table_specs].
1549    ///
1550    /// # Example
1551    /// ```ignore,no_run
1552    /// # use google_cloud_financialservices_v1::model::Dataset;
1553    /// let x = Dataset::new().set_table_specs([
1554    ///     ("key0", "abc"),
1555    ///     ("key1", "xyz"),
1556    /// ]);
1557    /// ```
1558    pub fn set_table_specs<T, K, V>(mut self, v: T) -> Self
1559    where
1560        T: std::iter::IntoIterator<Item = (K, V)>,
1561        K: std::convert::Into<std::string::String>,
1562        V: std::convert::Into<std::string::String>,
1563    {
1564        use std::iter::Iterator;
1565        self.table_specs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1566        self
1567    }
1568
1569    /// Sets the value of [state][crate::model::Dataset::state].
1570    ///
1571    /// # Example
1572    /// ```ignore,no_run
1573    /// # use google_cloud_financialservices_v1::model::Dataset;
1574    /// use google_cloud_financialservices_v1::model::dataset::State;
1575    /// let x0 = Dataset::new().set_state(State::Creating);
1576    /// let x1 = Dataset::new().set_state(State::Active);
1577    /// let x2 = Dataset::new().set_state(State::Updating);
1578    /// ```
1579    pub fn set_state<T: std::convert::Into<crate::model::dataset::State>>(mut self, v: T) -> Self {
1580        self.state = v.into();
1581        self
1582    }
1583
1584    /// Sets the value of [date_range][crate::model::Dataset::date_range].
1585    ///
1586    /// # Example
1587    /// ```ignore,no_run
1588    /// # use google_cloud_financialservices_v1::model::Dataset;
1589    /// use google_cloud_type::model::Interval;
1590    /// let x = Dataset::new().set_date_range(Interval::default()/* use setters */);
1591    /// ```
1592    pub fn set_date_range<T>(mut self, v: T) -> Self
1593    where
1594        T: std::convert::Into<google_cloud_type::model::Interval>,
1595    {
1596        self.date_range = std::option::Option::Some(v.into());
1597        self
1598    }
1599
1600    /// Sets or clears the value of [date_range][crate::model::Dataset::date_range].
1601    ///
1602    /// # Example
1603    /// ```ignore,no_run
1604    /// # use google_cloud_financialservices_v1::model::Dataset;
1605    /// use google_cloud_type::model::Interval;
1606    /// let x = Dataset::new().set_or_clear_date_range(Some(Interval::default()/* use setters */));
1607    /// let x = Dataset::new().set_or_clear_date_range(None::<Interval>);
1608    /// ```
1609    pub fn set_or_clear_date_range<T>(mut self, v: std::option::Option<T>) -> Self
1610    where
1611        T: std::convert::Into<google_cloud_type::model::Interval>,
1612    {
1613        self.date_range = v.map(|x| x.into());
1614        self
1615    }
1616
1617    /// Sets the value of [time_zone][crate::model::Dataset::time_zone].
1618    ///
1619    /// # Example
1620    /// ```ignore,no_run
1621    /// # use google_cloud_financialservices_v1::model::Dataset;
1622    /// use google_cloud_type::model::TimeZone;
1623    /// let x = Dataset::new().set_time_zone(TimeZone::default()/* use setters */);
1624    /// ```
1625    pub fn set_time_zone<T>(mut self, v: T) -> Self
1626    where
1627        T: std::convert::Into<google_cloud_type::model::TimeZone>,
1628    {
1629        self.time_zone = std::option::Option::Some(v.into());
1630        self
1631    }
1632
1633    /// Sets or clears the value of [time_zone][crate::model::Dataset::time_zone].
1634    ///
1635    /// # Example
1636    /// ```ignore,no_run
1637    /// # use google_cloud_financialservices_v1::model::Dataset;
1638    /// use google_cloud_type::model::TimeZone;
1639    /// let x = Dataset::new().set_or_clear_time_zone(Some(TimeZone::default()/* use setters */));
1640    /// let x = Dataset::new().set_or_clear_time_zone(None::<TimeZone>);
1641    /// ```
1642    pub fn set_or_clear_time_zone<T>(mut self, v: std::option::Option<T>) -> Self
1643    where
1644        T: std::convert::Into<google_cloud_type::model::TimeZone>,
1645    {
1646        self.time_zone = v.map(|x| x.into());
1647        self
1648    }
1649}
1650
1651impl wkt::message::Message for Dataset {
1652    fn typename() -> &'static str {
1653        "type.googleapis.com/google.cloud.financialservices.v1.Dataset"
1654    }
1655}
1656
1657/// Defines additional types related to [Dataset].
1658pub mod dataset {
1659    #[allow(unused_imports)]
1660    use super::*;
1661
1662    /// The possible states of a resource.
1663    ///
1664    /// # Working with unknown values
1665    ///
1666    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1667    /// additional enum variants at any time. Adding new variants is not considered
1668    /// a breaking change. Applications should write their code in anticipation of:
1669    ///
1670    /// - New values appearing in future releases of the client library, **and**
1671    /// - New values received dynamically, without application changes.
1672    ///
1673    /// Please consult the [Working with enums] section in the user guide for some
1674    /// guidelines.
1675    ///
1676    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1677    #[derive(Clone, Debug, PartialEq)]
1678    #[non_exhaustive]
1679    pub enum State {
1680        /// State is unspecified, should not occur.
1681        Unspecified,
1682        /// The resource has not finished being created.
1683        Creating,
1684        /// The resource is active/ready to be used.
1685        Active,
1686        /// The resource is in the process of being updated.
1687        Updating,
1688        /// The resource is in the process of being deleted.
1689        Deleting,
1690        /// If set, the enum was initialized with an unknown value.
1691        ///
1692        /// Applications can examine the value using [State::value] or
1693        /// [State::name].
1694        UnknownValue(state::UnknownValue),
1695    }
1696
1697    #[doc(hidden)]
1698    pub mod state {
1699        #[allow(unused_imports)]
1700        use super::*;
1701        #[derive(Clone, Debug, PartialEq)]
1702        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1703    }
1704
1705    impl State {
1706        /// Gets the enum value.
1707        ///
1708        /// Returns `None` if the enum contains an unknown value deserialized from
1709        /// the string representation of enums.
1710        pub fn value(&self) -> std::option::Option<i32> {
1711            match self {
1712                Self::Unspecified => std::option::Option::Some(0),
1713                Self::Creating => std::option::Option::Some(1),
1714                Self::Active => std::option::Option::Some(2),
1715                Self::Updating => std::option::Option::Some(3),
1716                Self::Deleting => std::option::Option::Some(4),
1717                Self::UnknownValue(u) => u.0.value(),
1718            }
1719        }
1720
1721        /// Gets the enum value as a string.
1722        ///
1723        /// Returns `None` if the enum contains an unknown value deserialized from
1724        /// the integer representation of enums.
1725        pub fn name(&self) -> std::option::Option<&str> {
1726            match self {
1727                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
1728                Self::Creating => std::option::Option::Some("CREATING"),
1729                Self::Active => std::option::Option::Some("ACTIVE"),
1730                Self::Updating => std::option::Option::Some("UPDATING"),
1731                Self::Deleting => std::option::Option::Some("DELETING"),
1732                Self::UnknownValue(u) => u.0.name(),
1733            }
1734        }
1735    }
1736
1737    impl std::default::Default for State {
1738        fn default() -> Self {
1739            use std::convert::From;
1740            Self::from(0)
1741        }
1742    }
1743
1744    impl std::fmt::Display for State {
1745        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1746            wkt::internal::display_enum(f, self.name(), self.value())
1747        }
1748    }
1749
1750    impl std::convert::From<i32> for State {
1751        fn from(value: i32) -> Self {
1752            match value {
1753                0 => Self::Unspecified,
1754                1 => Self::Creating,
1755                2 => Self::Active,
1756                3 => Self::Updating,
1757                4 => Self::Deleting,
1758                _ => Self::UnknownValue(state::UnknownValue(
1759                    wkt::internal::UnknownEnumValue::Integer(value),
1760                )),
1761            }
1762        }
1763    }
1764
1765    impl std::convert::From<&str> for State {
1766        fn from(value: &str) -> Self {
1767            use std::string::ToString;
1768            match value {
1769                "STATE_UNSPECIFIED" => Self::Unspecified,
1770                "CREATING" => Self::Creating,
1771                "ACTIVE" => Self::Active,
1772                "UPDATING" => Self::Updating,
1773                "DELETING" => Self::Deleting,
1774                _ => Self::UnknownValue(state::UnknownValue(
1775                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1776                )),
1777            }
1778        }
1779    }
1780
1781    impl serde::ser::Serialize for State {
1782        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1783        where
1784            S: serde::Serializer,
1785        {
1786            match self {
1787                Self::Unspecified => serializer.serialize_i32(0),
1788                Self::Creating => serializer.serialize_i32(1),
1789                Self::Active => serializer.serialize_i32(2),
1790                Self::Updating => serializer.serialize_i32(3),
1791                Self::Deleting => serializer.serialize_i32(4),
1792                Self::UnknownValue(u) => u.0.serialize(serializer),
1793            }
1794        }
1795    }
1796
1797    impl<'de> serde::de::Deserialize<'de> for State {
1798        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1799        where
1800            D: serde::Deserializer<'de>,
1801        {
1802            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1803                ".google.cloud.financialservices.v1.Dataset.State",
1804            ))
1805        }
1806    }
1807}
1808
1809/// Request for retrieving a paginated list of Dataset resources that meet the
1810/// specified criteria.
1811#[derive(Clone, Default, PartialEq)]
1812#[non_exhaustive]
1813pub struct ListDatasetsRequest {
1814    /// Required. The parent of the Dataset is the Instance.
1815    pub parent: std::string::String,
1816
1817    /// The number of resources to be included in the response. The response
1818    /// contains a next_page_token, which can be used to retrieve the next page of
1819    /// resources.
1820    pub page_size: i32,
1821
1822    /// In case of paginated results, this is the token that was returned in the
1823    /// previous ListDatasetResponse. It should be copied here to retrieve the
1824    /// next page of resources. Empty will give the first page of
1825    /// ListDatasetRequest, and the last page will return an empty page_token.
1826    pub page_token: std::string::String,
1827
1828    /// Specify a filter to narrow search results.
1829    pub filter: std::string::String,
1830
1831    /// Specify a field to use for ordering.
1832    pub order_by: std::string::String,
1833
1834    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1835}
1836
1837impl ListDatasetsRequest {
1838    /// Creates a new default instance.
1839    pub fn new() -> Self {
1840        std::default::Default::default()
1841    }
1842
1843    /// Sets the value of [parent][crate::model::ListDatasetsRequest::parent].
1844    ///
1845    /// # Example
1846    /// ```ignore,no_run
1847    /// # use google_cloud_financialservices_v1::model::ListDatasetsRequest;
1848    /// # let project_id = "project_id";
1849    /// # let location_id = "location_id";
1850    /// # let instance_id = "instance_id";
1851    /// let x = ListDatasetsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
1852    /// ```
1853    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1854        self.parent = v.into();
1855        self
1856    }
1857
1858    /// Sets the value of [page_size][crate::model::ListDatasetsRequest::page_size].
1859    ///
1860    /// # Example
1861    /// ```ignore,no_run
1862    /// # use google_cloud_financialservices_v1::model::ListDatasetsRequest;
1863    /// let x = ListDatasetsRequest::new().set_page_size(42);
1864    /// ```
1865    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1866        self.page_size = v.into();
1867        self
1868    }
1869
1870    /// Sets the value of [page_token][crate::model::ListDatasetsRequest::page_token].
1871    ///
1872    /// # Example
1873    /// ```ignore,no_run
1874    /// # use google_cloud_financialservices_v1::model::ListDatasetsRequest;
1875    /// let x = ListDatasetsRequest::new().set_page_token("example");
1876    /// ```
1877    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1878        self.page_token = v.into();
1879        self
1880    }
1881
1882    /// Sets the value of [filter][crate::model::ListDatasetsRequest::filter].
1883    ///
1884    /// # Example
1885    /// ```ignore,no_run
1886    /// # use google_cloud_financialservices_v1::model::ListDatasetsRequest;
1887    /// let x = ListDatasetsRequest::new().set_filter("example");
1888    /// ```
1889    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1890        self.filter = v.into();
1891        self
1892    }
1893
1894    /// Sets the value of [order_by][crate::model::ListDatasetsRequest::order_by].
1895    ///
1896    /// # Example
1897    /// ```ignore,no_run
1898    /// # use google_cloud_financialservices_v1::model::ListDatasetsRequest;
1899    /// let x = ListDatasetsRequest::new().set_order_by("example");
1900    /// ```
1901    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1902        self.order_by = v.into();
1903        self
1904    }
1905}
1906
1907impl wkt::message::Message for ListDatasetsRequest {
1908    fn typename() -> &'static str {
1909        "type.googleapis.com/google.cloud.financialservices.v1.ListDatasetsRequest"
1910    }
1911}
1912
1913/// Response for retrieving a list of Datasets
1914#[derive(Clone, Default, PartialEq)]
1915#[non_exhaustive]
1916pub struct ListDatasetsResponse {
1917    /// List of Dataset resources
1918    pub datasets: std::vec::Vec<crate::model::Dataset>,
1919
1920    /// This token should be passed to the next ListDatasetsRequest to retrieve
1921    /// the next page of Datasets (empty indicates we are done).
1922    pub next_page_token: std::string::String,
1923
1924    /// Locations that could not be reached.
1925    pub unreachable: std::vec::Vec<std::string::String>,
1926
1927    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1928}
1929
1930impl ListDatasetsResponse {
1931    /// Creates a new default instance.
1932    pub fn new() -> Self {
1933        std::default::Default::default()
1934    }
1935
1936    /// Sets the value of [datasets][crate::model::ListDatasetsResponse::datasets].
1937    ///
1938    /// # Example
1939    /// ```ignore,no_run
1940    /// # use google_cloud_financialservices_v1::model::ListDatasetsResponse;
1941    /// use google_cloud_financialservices_v1::model::Dataset;
1942    /// let x = ListDatasetsResponse::new()
1943    ///     .set_datasets([
1944    ///         Dataset::default()/* use setters */,
1945    ///         Dataset::default()/* use (different) setters */,
1946    ///     ]);
1947    /// ```
1948    pub fn set_datasets<T, V>(mut self, v: T) -> Self
1949    where
1950        T: std::iter::IntoIterator<Item = V>,
1951        V: std::convert::Into<crate::model::Dataset>,
1952    {
1953        use std::iter::Iterator;
1954        self.datasets = v.into_iter().map(|i| i.into()).collect();
1955        self
1956    }
1957
1958    /// Sets the value of [next_page_token][crate::model::ListDatasetsResponse::next_page_token].
1959    ///
1960    /// # Example
1961    /// ```ignore,no_run
1962    /// # use google_cloud_financialservices_v1::model::ListDatasetsResponse;
1963    /// let x = ListDatasetsResponse::new().set_next_page_token("example");
1964    /// ```
1965    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1966        self.next_page_token = v.into();
1967        self
1968    }
1969
1970    /// Sets the value of [unreachable][crate::model::ListDatasetsResponse::unreachable].
1971    ///
1972    /// # Example
1973    /// ```ignore,no_run
1974    /// # use google_cloud_financialservices_v1::model::ListDatasetsResponse;
1975    /// let x = ListDatasetsResponse::new().set_unreachable(["a", "b", "c"]);
1976    /// ```
1977    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1978    where
1979        T: std::iter::IntoIterator<Item = V>,
1980        V: std::convert::Into<std::string::String>,
1981    {
1982        use std::iter::Iterator;
1983        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1984        self
1985    }
1986}
1987
1988impl wkt::message::Message for ListDatasetsResponse {
1989    fn typename() -> &'static str {
1990        "type.googleapis.com/google.cloud.financialservices.v1.ListDatasetsResponse"
1991    }
1992}
1993
1994#[doc(hidden)]
1995impl google_cloud_gax::paginator::internal::PageableResponse for ListDatasetsResponse {
1996    type PageItem = crate::model::Dataset;
1997
1998    fn items(self) -> std::vec::Vec<Self::PageItem> {
1999        self.datasets
2000    }
2001
2002    fn next_page_token(&self) -> std::string::String {
2003        use std::clone::Clone;
2004        self.next_page_token.clone()
2005    }
2006}
2007
2008/// Request for retrieving a specific Dataset resource.
2009#[derive(Clone, Default, PartialEq)]
2010#[non_exhaustive]
2011pub struct GetDatasetRequest {
2012    /// Required. The resource name of the Dataset
2013    pub name: std::string::String,
2014
2015    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2016}
2017
2018impl GetDatasetRequest {
2019    /// Creates a new default instance.
2020    pub fn new() -> Self {
2021        std::default::Default::default()
2022    }
2023
2024    /// Sets the value of [name][crate::model::GetDatasetRequest::name].
2025    ///
2026    /// # Example
2027    /// ```ignore,no_run
2028    /// # use google_cloud_financialservices_v1::model::GetDatasetRequest;
2029    /// # let project_num_id = "project_num_id";
2030    /// # let location_id = "location_id";
2031    /// # let instance_id = "instance_id";
2032    /// # let dataset_id = "dataset_id";
2033    /// let x = GetDatasetRequest::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/datasets/{dataset_id}"));
2034    /// ```
2035    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2036        self.name = v.into();
2037        self
2038    }
2039}
2040
2041impl wkt::message::Message for GetDatasetRequest {
2042    fn typename() -> &'static str {
2043        "type.googleapis.com/google.cloud.financialservices.v1.GetDatasetRequest"
2044    }
2045}
2046
2047/// Request for creating a Dataset resource.
2048#[derive(Clone, Default, PartialEq)]
2049#[non_exhaustive]
2050pub struct CreateDatasetRequest {
2051    /// Required. The parent of the Dataset is the Instance.
2052    pub parent: std::string::String,
2053
2054    /// Required. The resource id of the dataset
2055    pub dataset_id: std::string::String,
2056
2057    /// Required. The dataset that will be created.
2058    pub dataset: std::option::Option<crate::model::Dataset>,
2059
2060    /// Optional. An optional request ID to identify requests. Specify a unique
2061    /// request ID so that if you must retry your request, the server will know to
2062    /// ignore the request if it has already been completed. The server will
2063    /// guarantee that for at least 60 minutes since the first request.
2064    ///
2065    /// For example, consider a situation where you make an initial request and the
2066    /// request times out. If you make the request again with the same request
2067    /// ID, the server can check if original operation with the same request ID
2068    /// was received, and if so, will ignore the second request. This prevents
2069    /// clients from accidentally creating duplicate commitments.
2070    ///
2071    /// The request ID must be a valid UUID with the exception that zero UUID is
2072    /// not supported (00000000-0000-0000-0000-000000000000).
2073    pub request_id: std::string::String,
2074
2075    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2076}
2077
2078impl CreateDatasetRequest {
2079    /// Creates a new default instance.
2080    pub fn new() -> Self {
2081        std::default::Default::default()
2082    }
2083
2084    /// Sets the value of [parent][crate::model::CreateDatasetRequest::parent].
2085    ///
2086    /// # Example
2087    /// ```ignore,no_run
2088    /// # use google_cloud_financialservices_v1::model::CreateDatasetRequest;
2089    /// # let project_id = "project_id";
2090    /// # let location_id = "location_id";
2091    /// # let instance_id = "instance_id";
2092    /// let x = CreateDatasetRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
2093    /// ```
2094    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2095        self.parent = v.into();
2096        self
2097    }
2098
2099    /// Sets the value of [dataset_id][crate::model::CreateDatasetRequest::dataset_id].
2100    ///
2101    /// # Example
2102    /// ```ignore,no_run
2103    /// # use google_cloud_financialservices_v1::model::CreateDatasetRequest;
2104    /// let x = CreateDatasetRequest::new().set_dataset_id("example");
2105    /// ```
2106    pub fn set_dataset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2107        self.dataset_id = v.into();
2108        self
2109    }
2110
2111    /// Sets the value of [dataset][crate::model::CreateDatasetRequest::dataset].
2112    ///
2113    /// # Example
2114    /// ```ignore,no_run
2115    /// # use google_cloud_financialservices_v1::model::CreateDatasetRequest;
2116    /// use google_cloud_financialservices_v1::model::Dataset;
2117    /// let x = CreateDatasetRequest::new().set_dataset(Dataset::default()/* use setters */);
2118    /// ```
2119    pub fn set_dataset<T>(mut self, v: T) -> Self
2120    where
2121        T: std::convert::Into<crate::model::Dataset>,
2122    {
2123        self.dataset = std::option::Option::Some(v.into());
2124        self
2125    }
2126
2127    /// Sets or clears the value of [dataset][crate::model::CreateDatasetRequest::dataset].
2128    ///
2129    /// # Example
2130    /// ```ignore,no_run
2131    /// # use google_cloud_financialservices_v1::model::CreateDatasetRequest;
2132    /// use google_cloud_financialservices_v1::model::Dataset;
2133    /// let x = CreateDatasetRequest::new().set_or_clear_dataset(Some(Dataset::default()/* use setters */));
2134    /// let x = CreateDatasetRequest::new().set_or_clear_dataset(None::<Dataset>);
2135    /// ```
2136    pub fn set_or_clear_dataset<T>(mut self, v: std::option::Option<T>) -> Self
2137    where
2138        T: std::convert::Into<crate::model::Dataset>,
2139    {
2140        self.dataset = v.map(|x| x.into());
2141        self
2142    }
2143
2144    /// Sets the value of [request_id][crate::model::CreateDatasetRequest::request_id].
2145    ///
2146    /// # Example
2147    /// ```ignore,no_run
2148    /// # use google_cloud_financialservices_v1::model::CreateDatasetRequest;
2149    /// let x = CreateDatasetRequest::new().set_request_id("example");
2150    /// ```
2151    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2152        self.request_id = v.into();
2153        self
2154    }
2155}
2156
2157impl wkt::message::Message for CreateDatasetRequest {
2158    fn typename() -> &'static str {
2159        "type.googleapis.com/google.cloud.financialservices.v1.CreateDatasetRequest"
2160    }
2161}
2162
2163/// Request for updating a Dataset
2164#[derive(Clone, Default, PartialEq)]
2165#[non_exhaustive]
2166pub struct UpdateDatasetRequest {
2167    /// Optional. Field mask is used to specify the fields to be overwritten in the
2168    /// Dataset resource by the update.
2169    /// The fields specified in the update_mask are relative to the resource, not
2170    /// the full request. A field will be overwritten if it is in the mask. If the
2171    /// user does not provide a mask then all fields will be overwritten.
2172    pub update_mask: std::option::Option<wkt::FieldMask>,
2173
2174    /// Required. The new value of the dataset fields that will be updated
2175    /// according to the update_mask.
2176    pub dataset: std::option::Option<crate::model::Dataset>,
2177
2178    /// Optional. An optional request ID to identify requests. Specify a unique
2179    /// request ID so that if you must retry your request, the server will know to
2180    /// ignore the request if it has already been completed. The server will
2181    /// guarantee that for at least 60 minutes since the first request.
2182    ///
2183    /// For example, consider a situation where you make an initial request and the
2184    /// request times out. If you make the request again with the same request
2185    /// ID, the server can check if original operation with the same request ID
2186    /// was received, and if so, will ignore the second request. This prevents
2187    /// clients from accidentally creating duplicate commitments.
2188    ///
2189    /// The request ID must be a valid UUID with the exception that zero UUID is
2190    /// not supported (00000000-0000-0000-0000-000000000000).
2191    pub request_id: std::string::String,
2192
2193    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2194}
2195
2196impl UpdateDatasetRequest {
2197    /// Creates a new default instance.
2198    pub fn new() -> Self {
2199        std::default::Default::default()
2200    }
2201
2202    /// Sets the value of [update_mask][crate::model::UpdateDatasetRequest::update_mask].
2203    ///
2204    /// # Example
2205    /// ```ignore,no_run
2206    /// # use google_cloud_financialservices_v1::model::UpdateDatasetRequest;
2207    /// use wkt::FieldMask;
2208    /// let x = UpdateDatasetRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2209    /// ```
2210    pub fn set_update_mask<T>(mut self, v: T) -> Self
2211    where
2212        T: std::convert::Into<wkt::FieldMask>,
2213    {
2214        self.update_mask = std::option::Option::Some(v.into());
2215        self
2216    }
2217
2218    /// Sets or clears the value of [update_mask][crate::model::UpdateDatasetRequest::update_mask].
2219    ///
2220    /// # Example
2221    /// ```ignore,no_run
2222    /// # use google_cloud_financialservices_v1::model::UpdateDatasetRequest;
2223    /// use wkt::FieldMask;
2224    /// let x = UpdateDatasetRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2225    /// let x = UpdateDatasetRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2226    /// ```
2227    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2228    where
2229        T: std::convert::Into<wkt::FieldMask>,
2230    {
2231        self.update_mask = v.map(|x| x.into());
2232        self
2233    }
2234
2235    /// Sets the value of [dataset][crate::model::UpdateDatasetRequest::dataset].
2236    ///
2237    /// # Example
2238    /// ```ignore,no_run
2239    /// # use google_cloud_financialservices_v1::model::UpdateDatasetRequest;
2240    /// use google_cloud_financialservices_v1::model::Dataset;
2241    /// let x = UpdateDatasetRequest::new().set_dataset(Dataset::default()/* use setters */);
2242    /// ```
2243    pub fn set_dataset<T>(mut self, v: T) -> Self
2244    where
2245        T: std::convert::Into<crate::model::Dataset>,
2246    {
2247        self.dataset = std::option::Option::Some(v.into());
2248        self
2249    }
2250
2251    /// Sets or clears the value of [dataset][crate::model::UpdateDatasetRequest::dataset].
2252    ///
2253    /// # Example
2254    /// ```ignore,no_run
2255    /// # use google_cloud_financialservices_v1::model::UpdateDatasetRequest;
2256    /// use google_cloud_financialservices_v1::model::Dataset;
2257    /// let x = UpdateDatasetRequest::new().set_or_clear_dataset(Some(Dataset::default()/* use setters */));
2258    /// let x = UpdateDatasetRequest::new().set_or_clear_dataset(None::<Dataset>);
2259    /// ```
2260    pub fn set_or_clear_dataset<T>(mut self, v: std::option::Option<T>) -> Self
2261    where
2262        T: std::convert::Into<crate::model::Dataset>,
2263    {
2264        self.dataset = v.map(|x| x.into());
2265        self
2266    }
2267
2268    /// Sets the value of [request_id][crate::model::UpdateDatasetRequest::request_id].
2269    ///
2270    /// # Example
2271    /// ```ignore,no_run
2272    /// # use google_cloud_financialservices_v1::model::UpdateDatasetRequest;
2273    /// let x = UpdateDatasetRequest::new().set_request_id("example");
2274    /// ```
2275    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2276        self.request_id = v.into();
2277        self
2278    }
2279}
2280
2281impl wkt::message::Message for UpdateDatasetRequest {
2282    fn typename() -> &'static str {
2283        "type.googleapis.com/google.cloud.financialservices.v1.UpdateDatasetRequest"
2284    }
2285}
2286
2287/// Request for deleting a Dataset.
2288#[derive(Clone, Default, PartialEq)]
2289#[non_exhaustive]
2290pub struct DeleteDatasetRequest {
2291    /// Required. The resource name of the Dataset.
2292    pub name: std::string::String,
2293
2294    /// Optional. An optional request ID to identify requests. Specify a unique
2295    /// request ID so that if you must retry your request, the server will know to
2296    /// ignore the request if it has already been completed. The server will
2297    /// guarantee that for at least 60 minutes after the first request.
2298    ///
2299    /// For example, consider a situation where you make an initial request and the
2300    /// request times out. If you make the request again with the same request
2301    /// ID, the server can check if original operation with the same request ID
2302    /// was received, and if so, will ignore the second request. This prevents
2303    /// clients from accidentally creating duplicate commitments.
2304    ///
2305    /// The request ID must be a valid UUID with the exception that zero UUID is
2306    /// not supported (00000000-0000-0000-0000-000000000000).
2307    pub request_id: std::string::String,
2308
2309    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2310}
2311
2312impl DeleteDatasetRequest {
2313    /// Creates a new default instance.
2314    pub fn new() -> Self {
2315        std::default::Default::default()
2316    }
2317
2318    /// Sets the value of [name][crate::model::DeleteDatasetRequest::name].
2319    ///
2320    /// # Example
2321    /// ```ignore,no_run
2322    /// # use google_cloud_financialservices_v1::model::DeleteDatasetRequest;
2323    /// # let project_num_id = "project_num_id";
2324    /// # let location_id = "location_id";
2325    /// # let instance_id = "instance_id";
2326    /// # let dataset_id = "dataset_id";
2327    /// let x = DeleteDatasetRequest::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/datasets/{dataset_id}"));
2328    /// ```
2329    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2330        self.name = v.into();
2331        self
2332    }
2333
2334    /// Sets the value of [request_id][crate::model::DeleteDatasetRequest::request_id].
2335    ///
2336    /// # Example
2337    /// ```ignore,no_run
2338    /// # use google_cloud_financialservices_v1::model::DeleteDatasetRequest;
2339    /// let x = DeleteDatasetRequest::new().set_request_id("example");
2340    /// ```
2341    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2342        self.request_id = v.into();
2343        self
2344    }
2345}
2346
2347impl wkt::message::Message for DeleteDatasetRequest {
2348    fn typename() -> &'static str {
2349        "type.googleapis.com/google.cloud.financialservices.v1.DeleteDatasetRequest"
2350    }
2351}
2352
2353/// The EngineConfig resource creates the configuration for training a model.
2354#[derive(Clone, Default, PartialEq)]
2355#[non_exhaustive]
2356pub struct EngineConfig {
2357    /// Output only. The resource name of the EngineConfig.
2358    /// format:
2359    /// `/projects/{project_num}/locations/{location}/instances/{instance}/engineConfigs/{engine_config}`
2360    pub name: std::string::String,
2361
2362    /// Output only. The timestamp of creation of this resource.
2363    pub create_time: std::option::Option<wkt::Timestamp>,
2364
2365    /// Output only. The timestamp of the most recent update of this resource.
2366    pub update_time: std::option::Option<wkt::Timestamp>,
2367
2368    /// Labels
2369    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2370
2371    /// Output only. State of the EngineConfig (creating, active, deleting, etc.)
2372    pub state: crate::model::engine_config::State,
2373
2374    /// Required. The resource name of the EngineVersion used in this model tuning.
2375    /// format:
2376    /// `/projects/{project_num}/locations/{location}/instances/{instance}/engineVersions/{engine_version}`
2377    pub engine_version: std::string::String,
2378
2379    /// Optional. Configuration for tuning in creation of the EngineConfig.
2380    /// This field is required if `hyperparameter_source.type` is not `INHERITED`,
2381    /// and output-only otherwise.
2382    pub tuning: std::option::Option<crate::model::engine_config::Tuning>,
2383
2384    /// Optional. PerformanceTarget gives information on how the tuning and
2385    /// training will be evaluated. This field is required if
2386    /// `hyperparameter_source.type` is not `INHERITED`, and output-only otherwise.
2387    pub performance_target: std::option::Option<crate::model::engine_config::PerformanceTarget>,
2388
2389    /// Output only. The line of business (Retail/Commercial) this engine config is
2390    /// used for. Determined by EngineVersion, cannot be set by user.
2391    pub line_of_business: crate::model::LineOfBusiness,
2392
2393    /// Optional. The origin of hyperparameters for the created EngineConfig. The
2394    /// default is `TUNING`. In this case, the hyperparameters are selected as a
2395    /// result of a
2396    /// tuning run.
2397    pub hyperparameter_source_type: crate::model::engine_config::HyperparameterSourceType,
2398
2399    /// Optional. Configuration of hyperparameters source EngineConfig.
2400    pub hyperparameter_source:
2401        std::option::Option<crate::model::engine_config::HyperparameterSource>,
2402
2403    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2404}
2405
2406impl EngineConfig {
2407    /// Creates a new default instance.
2408    pub fn new() -> Self {
2409        std::default::Default::default()
2410    }
2411
2412    /// Sets the value of [name][crate::model::EngineConfig::name].
2413    ///
2414    /// # Example
2415    /// ```ignore,no_run
2416    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2417    /// # let project_num_id = "project_num_id";
2418    /// # let location_id = "location_id";
2419    /// # let instance_id = "instance_id";
2420    /// # let engine_config_id = "engine_config_id";
2421    /// let x = EngineConfig::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/engineConfigs/{engine_config_id}"));
2422    /// ```
2423    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2424        self.name = v.into();
2425        self
2426    }
2427
2428    /// Sets the value of [create_time][crate::model::EngineConfig::create_time].
2429    ///
2430    /// # Example
2431    /// ```ignore,no_run
2432    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2433    /// use wkt::Timestamp;
2434    /// let x = EngineConfig::new().set_create_time(Timestamp::default()/* use setters */);
2435    /// ```
2436    pub fn set_create_time<T>(mut self, v: T) -> Self
2437    where
2438        T: std::convert::Into<wkt::Timestamp>,
2439    {
2440        self.create_time = std::option::Option::Some(v.into());
2441        self
2442    }
2443
2444    /// Sets or clears the value of [create_time][crate::model::EngineConfig::create_time].
2445    ///
2446    /// # Example
2447    /// ```ignore,no_run
2448    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2449    /// use wkt::Timestamp;
2450    /// let x = EngineConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2451    /// let x = EngineConfig::new().set_or_clear_create_time(None::<Timestamp>);
2452    /// ```
2453    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2454    where
2455        T: std::convert::Into<wkt::Timestamp>,
2456    {
2457        self.create_time = v.map(|x| x.into());
2458        self
2459    }
2460
2461    /// Sets the value of [update_time][crate::model::EngineConfig::update_time].
2462    ///
2463    /// # Example
2464    /// ```ignore,no_run
2465    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2466    /// use wkt::Timestamp;
2467    /// let x = EngineConfig::new().set_update_time(Timestamp::default()/* use setters */);
2468    /// ```
2469    pub fn set_update_time<T>(mut self, v: T) -> Self
2470    where
2471        T: std::convert::Into<wkt::Timestamp>,
2472    {
2473        self.update_time = std::option::Option::Some(v.into());
2474        self
2475    }
2476
2477    /// Sets or clears the value of [update_time][crate::model::EngineConfig::update_time].
2478    ///
2479    /// # Example
2480    /// ```ignore,no_run
2481    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2482    /// use wkt::Timestamp;
2483    /// let x = EngineConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
2484    /// let x = EngineConfig::new().set_or_clear_update_time(None::<Timestamp>);
2485    /// ```
2486    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2487    where
2488        T: std::convert::Into<wkt::Timestamp>,
2489    {
2490        self.update_time = v.map(|x| x.into());
2491        self
2492    }
2493
2494    /// Sets the value of [labels][crate::model::EngineConfig::labels].
2495    ///
2496    /// # Example
2497    /// ```ignore,no_run
2498    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2499    /// let x = EngineConfig::new().set_labels([
2500    ///     ("key0", "abc"),
2501    ///     ("key1", "xyz"),
2502    /// ]);
2503    /// ```
2504    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2505    where
2506        T: std::iter::IntoIterator<Item = (K, V)>,
2507        K: std::convert::Into<std::string::String>,
2508        V: std::convert::Into<std::string::String>,
2509    {
2510        use std::iter::Iterator;
2511        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2512        self
2513    }
2514
2515    /// Sets the value of [state][crate::model::EngineConfig::state].
2516    ///
2517    /// # Example
2518    /// ```ignore,no_run
2519    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2520    /// use google_cloud_financialservices_v1::model::engine_config::State;
2521    /// let x0 = EngineConfig::new().set_state(State::Creating);
2522    /// let x1 = EngineConfig::new().set_state(State::Active);
2523    /// let x2 = EngineConfig::new().set_state(State::Updating);
2524    /// ```
2525    pub fn set_state<T: std::convert::Into<crate::model::engine_config::State>>(
2526        mut self,
2527        v: T,
2528    ) -> Self {
2529        self.state = v.into();
2530        self
2531    }
2532
2533    /// Sets the value of [engine_version][crate::model::EngineConfig::engine_version].
2534    ///
2535    /// # Example
2536    /// ```ignore,no_run
2537    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2538    /// # let project_num_id = "project_num_id";
2539    /// # let location_id = "location_id";
2540    /// # let instance_id = "instance_id";
2541    /// # let engine_version_id = "engine_version_id";
2542    /// let x = EngineConfig::new().set_engine_version(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/engineVersions/{engine_version_id}"));
2543    /// ```
2544    pub fn set_engine_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2545        self.engine_version = v.into();
2546        self
2547    }
2548
2549    /// Sets the value of [tuning][crate::model::EngineConfig::tuning].
2550    ///
2551    /// # Example
2552    /// ```ignore,no_run
2553    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2554    /// use google_cloud_financialservices_v1::model::engine_config::Tuning;
2555    /// let x = EngineConfig::new().set_tuning(Tuning::default()/* use setters */);
2556    /// ```
2557    pub fn set_tuning<T>(mut self, v: T) -> Self
2558    where
2559        T: std::convert::Into<crate::model::engine_config::Tuning>,
2560    {
2561        self.tuning = std::option::Option::Some(v.into());
2562        self
2563    }
2564
2565    /// Sets or clears the value of [tuning][crate::model::EngineConfig::tuning].
2566    ///
2567    /// # Example
2568    /// ```ignore,no_run
2569    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2570    /// use google_cloud_financialservices_v1::model::engine_config::Tuning;
2571    /// let x = EngineConfig::new().set_or_clear_tuning(Some(Tuning::default()/* use setters */));
2572    /// let x = EngineConfig::new().set_or_clear_tuning(None::<Tuning>);
2573    /// ```
2574    pub fn set_or_clear_tuning<T>(mut self, v: std::option::Option<T>) -> Self
2575    where
2576        T: std::convert::Into<crate::model::engine_config::Tuning>,
2577    {
2578        self.tuning = v.map(|x| x.into());
2579        self
2580    }
2581
2582    /// Sets the value of [performance_target][crate::model::EngineConfig::performance_target].
2583    ///
2584    /// # Example
2585    /// ```ignore,no_run
2586    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2587    /// use google_cloud_financialservices_v1::model::engine_config::PerformanceTarget;
2588    /// let x = EngineConfig::new().set_performance_target(PerformanceTarget::default()/* use setters */);
2589    /// ```
2590    pub fn set_performance_target<T>(mut self, v: T) -> Self
2591    where
2592        T: std::convert::Into<crate::model::engine_config::PerformanceTarget>,
2593    {
2594        self.performance_target = std::option::Option::Some(v.into());
2595        self
2596    }
2597
2598    /// Sets or clears the value of [performance_target][crate::model::EngineConfig::performance_target].
2599    ///
2600    /// # Example
2601    /// ```ignore,no_run
2602    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2603    /// use google_cloud_financialservices_v1::model::engine_config::PerformanceTarget;
2604    /// let x = EngineConfig::new().set_or_clear_performance_target(Some(PerformanceTarget::default()/* use setters */));
2605    /// let x = EngineConfig::new().set_or_clear_performance_target(None::<PerformanceTarget>);
2606    /// ```
2607    pub fn set_or_clear_performance_target<T>(mut self, v: std::option::Option<T>) -> Self
2608    where
2609        T: std::convert::Into<crate::model::engine_config::PerformanceTarget>,
2610    {
2611        self.performance_target = v.map(|x| x.into());
2612        self
2613    }
2614
2615    /// Sets the value of [line_of_business][crate::model::EngineConfig::line_of_business].
2616    ///
2617    /// # Example
2618    /// ```ignore,no_run
2619    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2620    /// use google_cloud_financialservices_v1::model::LineOfBusiness;
2621    /// let x0 = EngineConfig::new().set_line_of_business(LineOfBusiness::Commercial);
2622    /// let x1 = EngineConfig::new().set_line_of_business(LineOfBusiness::Retail);
2623    /// ```
2624    pub fn set_line_of_business<T: std::convert::Into<crate::model::LineOfBusiness>>(
2625        mut self,
2626        v: T,
2627    ) -> Self {
2628        self.line_of_business = v.into();
2629        self
2630    }
2631
2632    /// Sets the value of [hyperparameter_source_type][crate::model::EngineConfig::hyperparameter_source_type].
2633    ///
2634    /// # Example
2635    /// ```ignore,no_run
2636    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2637    /// use google_cloud_financialservices_v1::model::engine_config::HyperparameterSourceType;
2638    /// let x0 = EngineConfig::new().set_hyperparameter_source_type(HyperparameterSourceType::Tuning);
2639    /// let x1 = EngineConfig::new().set_hyperparameter_source_type(HyperparameterSourceType::Inherited);
2640    /// ```
2641    pub fn set_hyperparameter_source_type<
2642        T: std::convert::Into<crate::model::engine_config::HyperparameterSourceType>,
2643    >(
2644        mut self,
2645        v: T,
2646    ) -> Self {
2647        self.hyperparameter_source_type = v.into();
2648        self
2649    }
2650
2651    /// Sets the value of [hyperparameter_source][crate::model::EngineConfig::hyperparameter_source].
2652    ///
2653    /// # Example
2654    /// ```ignore,no_run
2655    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2656    /// use google_cloud_financialservices_v1::model::engine_config::HyperparameterSource;
2657    /// let x = EngineConfig::new().set_hyperparameter_source(HyperparameterSource::default()/* use setters */);
2658    /// ```
2659    pub fn set_hyperparameter_source<T>(mut self, v: T) -> Self
2660    where
2661        T: std::convert::Into<crate::model::engine_config::HyperparameterSource>,
2662    {
2663        self.hyperparameter_source = std::option::Option::Some(v.into());
2664        self
2665    }
2666
2667    /// Sets or clears the value of [hyperparameter_source][crate::model::EngineConfig::hyperparameter_source].
2668    ///
2669    /// # Example
2670    /// ```ignore,no_run
2671    /// # use google_cloud_financialservices_v1::model::EngineConfig;
2672    /// use google_cloud_financialservices_v1::model::engine_config::HyperparameterSource;
2673    /// let x = EngineConfig::new().set_or_clear_hyperparameter_source(Some(HyperparameterSource::default()/* use setters */));
2674    /// let x = EngineConfig::new().set_or_clear_hyperparameter_source(None::<HyperparameterSource>);
2675    /// ```
2676    pub fn set_or_clear_hyperparameter_source<T>(mut self, v: std::option::Option<T>) -> Self
2677    where
2678        T: std::convert::Into<crate::model::engine_config::HyperparameterSource>,
2679    {
2680        self.hyperparameter_source = v.map(|x| x.into());
2681        self
2682    }
2683}
2684
2685impl wkt::message::Message for EngineConfig {
2686    fn typename() -> &'static str {
2687        "type.googleapis.com/google.cloud.financialservices.v1.EngineConfig"
2688    }
2689}
2690
2691/// Defines additional types related to [EngineConfig].
2692pub mod engine_config {
2693    #[allow(unused_imports)]
2694    use super::*;
2695
2696    /// The parameters needed for the tuning operation, these are used only in
2697    /// tuning and not passed on to training.
2698    #[derive(Clone, Default, PartialEq)]
2699    #[non_exhaustive]
2700    pub struct Tuning {
2701        /// Required. The resource name of the Primary Dataset used in this model
2702        /// tuning. For information about how primary and auxiliary datasets are
2703        /// used, refer to the engine version's documentation.  Format:
2704        /// `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}`
2705        pub primary_dataset: std::string::String,
2706
2707        /// Required. End_time specifies the latest time from which labels are used
2708        /// and from which data is used to generate features for tuning.  End_time
2709        /// should be no later than the end of the date_range of the dataset.
2710        pub end_time: std::option::Option<wkt::Timestamp>,
2711
2712        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2713    }
2714
2715    impl Tuning {
2716        /// Creates a new default instance.
2717        pub fn new() -> Self {
2718            std::default::Default::default()
2719        }
2720
2721        /// Sets the value of [primary_dataset][crate::model::engine_config::Tuning::primary_dataset].
2722        ///
2723        /// # Example
2724        /// ```ignore,no_run
2725        /// # use google_cloud_financialservices_v1::model::engine_config::Tuning;
2726        /// # let project_num_id = "project_num_id";
2727        /// # let location_id = "location_id";
2728        /// # let instance_id = "instance_id";
2729        /// # let dataset_id = "dataset_id";
2730        /// let x = Tuning::new().set_primary_dataset(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/datasets/{dataset_id}"));
2731        /// ```
2732        pub fn set_primary_dataset<T: std::convert::Into<std::string::String>>(
2733            mut self,
2734            v: T,
2735        ) -> Self {
2736            self.primary_dataset = v.into();
2737            self
2738        }
2739
2740        /// Sets the value of [end_time][crate::model::engine_config::Tuning::end_time].
2741        ///
2742        /// # Example
2743        /// ```ignore,no_run
2744        /// # use google_cloud_financialservices_v1::model::engine_config::Tuning;
2745        /// use wkt::Timestamp;
2746        /// let x = Tuning::new().set_end_time(Timestamp::default()/* use setters */);
2747        /// ```
2748        pub fn set_end_time<T>(mut self, v: T) -> Self
2749        where
2750            T: std::convert::Into<wkt::Timestamp>,
2751        {
2752            self.end_time = std::option::Option::Some(v.into());
2753            self
2754        }
2755
2756        /// Sets or clears the value of [end_time][crate::model::engine_config::Tuning::end_time].
2757        ///
2758        /// # Example
2759        /// ```ignore,no_run
2760        /// # use google_cloud_financialservices_v1::model::engine_config::Tuning;
2761        /// use wkt::Timestamp;
2762        /// let x = Tuning::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
2763        /// let x = Tuning::new().set_or_clear_end_time(None::<Timestamp>);
2764        /// ```
2765        pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2766        where
2767            T: std::convert::Into<wkt::Timestamp>,
2768        {
2769            self.end_time = v.map(|x| x.into());
2770            self
2771        }
2772    }
2773
2774    impl wkt::message::Message for Tuning {
2775        fn typename() -> &'static str {
2776            "type.googleapis.com/google.cloud.financialservices.v1.EngineConfig.Tuning"
2777        }
2778    }
2779
2780    /// PerformanceTarget gives hints on how to evaluate the performance of a
2781    /// model.
2782    #[derive(Clone, Default, PartialEq)]
2783    #[non_exhaustive]
2784    pub struct PerformanceTarget {
2785        /// Required. A number that gives the tuner a hint on the number of parties
2786        /// from this data that will be investigated per period (monthly). This is
2787        /// used to control how the model is evaluated. For example, when trying AML
2788        /// AI for the first time, we recommend setting this to the number of parties
2789        /// investigated in an average month, based on alerts from your existing
2790        /// automated alerting system.
2791        pub party_investigations_per_period_hint: i64,
2792
2793        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2794    }
2795
2796    impl PerformanceTarget {
2797        /// Creates a new default instance.
2798        pub fn new() -> Self {
2799            std::default::Default::default()
2800        }
2801
2802        /// Sets the value of [party_investigations_per_period_hint][crate::model::engine_config::PerformanceTarget::party_investigations_per_period_hint].
2803        ///
2804        /// # Example
2805        /// ```ignore,no_run
2806        /// # use google_cloud_financialservices_v1::model::engine_config::PerformanceTarget;
2807        /// let x = PerformanceTarget::new().set_party_investigations_per_period_hint(42);
2808        /// ```
2809        pub fn set_party_investigations_per_period_hint<T: std::convert::Into<i64>>(
2810            mut self,
2811            v: T,
2812        ) -> Self {
2813            self.party_investigations_per_period_hint = v.into();
2814            self
2815        }
2816    }
2817
2818    impl wkt::message::Message for PerformanceTarget {
2819        fn typename() -> &'static str {
2820            "type.googleapis.com/google.cloud.financialservices.v1.EngineConfig.PerformanceTarget"
2821        }
2822    }
2823
2824    /// Parameters for bootstrapping an Engine Config with the results of another
2825    /// one.
2826    #[derive(Clone, Default, PartialEq)]
2827    #[non_exhaustive]
2828    pub struct HyperparameterSource {
2829        /// Required. The resource name of the source EngineConfig whose outputs are
2830        /// used. Format:
2831        /// `/projects/{project_num}/locations/{location}/instances/{instance}/engineConfigs/{engine_config}`
2832        pub source_engine_config: std::string::String,
2833
2834        /// Output only. The resource name of the EngineVersion that was used in the
2835        /// tuning run. Format:
2836        /// `/projects/{project_num}/locations/{location}/instances/{instance}/engineVersions/{engine_version}`
2837        pub source_engine_version: std::string::String,
2838
2839        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2840    }
2841
2842    impl HyperparameterSource {
2843        /// Creates a new default instance.
2844        pub fn new() -> Self {
2845            std::default::Default::default()
2846        }
2847
2848        /// Sets the value of [source_engine_config][crate::model::engine_config::HyperparameterSource::source_engine_config].
2849        ///
2850        /// # Example
2851        /// ```ignore,no_run
2852        /// # use google_cloud_financialservices_v1::model::engine_config::HyperparameterSource;
2853        /// let x = HyperparameterSource::new().set_source_engine_config("example");
2854        /// ```
2855        pub fn set_source_engine_config<T: std::convert::Into<std::string::String>>(
2856            mut self,
2857            v: T,
2858        ) -> Self {
2859            self.source_engine_config = v.into();
2860            self
2861        }
2862
2863        /// Sets the value of [source_engine_version][crate::model::engine_config::HyperparameterSource::source_engine_version].
2864        ///
2865        /// # Example
2866        /// ```ignore,no_run
2867        /// # use google_cloud_financialservices_v1::model::engine_config::HyperparameterSource;
2868        /// let x = HyperparameterSource::new().set_source_engine_version("example");
2869        /// ```
2870        pub fn set_source_engine_version<T: std::convert::Into<std::string::String>>(
2871            mut self,
2872            v: T,
2873        ) -> Self {
2874            self.source_engine_version = v.into();
2875            self
2876        }
2877    }
2878
2879    impl wkt::message::Message for HyperparameterSource {
2880        fn typename() -> &'static str {
2881            "type.googleapis.com/google.cloud.financialservices.v1.EngineConfig.HyperparameterSource"
2882        }
2883    }
2884
2885    /// The possible states of a resource.
2886    ///
2887    /// # Working with unknown values
2888    ///
2889    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2890    /// additional enum variants at any time. Adding new variants is not considered
2891    /// a breaking change. Applications should write their code in anticipation of:
2892    ///
2893    /// - New values appearing in future releases of the client library, **and**
2894    /// - New values received dynamically, without application changes.
2895    ///
2896    /// Please consult the [Working with enums] section in the user guide for some
2897    /// guidelines.
2898    ///
2899    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
2900    #[derive(Clone, Debug, PartialEq)]
2901    #[non_exhaustive]
2902    pub enum State {
2903        /// State is unspecified, should not occur.
2904        Unspecified,
2905        /// The resource has not finished being created.
2906        Creating,
2907        /// The resource is active/ready to be used.
2908        Active,
2909        /// The resource is in the process of being updated.
2910        Updating,
2911        /// The resource is in the process of being deleted.
2912        Deleting,
2913        /// If set, the enum was initialized with an unknown value.
2914        ///
2915        /// Applications can examine the value using [State::value] or
2916        /// [State::name].
2917        UnknownValue(state::UnknownValue),
2918    }
2919
2920    #[doc(hidden)]
2921    pub mod state {
2922        #[allow(unused_imports)]
2923        use super::*;
2924        #[derive(Clone, Debug, PartialEq)]
2925        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2926    }
2927
2928    impl State {
2929        /// Gets the enum value.
2930        ///
2931        /// Returns `None` if the enum contains an unknown value deserialized from
2932        /// the string representation of enums.
2933        pub fn value(&self) -> std::option::Option<i32> {
2934            match self {
2935                Self::Unspecified => std::option::Option::Some(0),
2936                Self::Creating => std::option::Option::Some(1),
2937                Self::Active => std::option::Option::Some(2),
2938                Self::Updating => std::option::Option::Some(3),
2939                Self::Deleting => std::option::Option::Some(4),
2940                Self::UnknownValue(u) => u.0.value(),
2941            }
2942        }
2943
2944        /// Gets the enum value as a string.
2945        ///
2946        /// Returns `None` if the enum contains an unknown value deserialized from
2947        /// the integer representation of enums.
2948        pub fn name(&self) -> std::option::Option<&str> {
2949            match self {
2950                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
2951                Self::Creating => std::option::Option::Some("CREATING"),
2952                Self::Active => std::option::Option::Some("ACTIVE"),
2953                Self::Updating => std::option::Option::Some("UPDATING"),
2954                Self::Deleting => std::option::Option::Some("DELETING"),
2955                Self::UnknownValue(u) => u.0.name(),
2956            }
2957        }
2958    }
2959
2960    impl std::default::Default for State {
2961        fn default() -> Self {
2962            use std::convert::From;
2963            Self::from(0)
2964        }
2965    }
2966
2967    impl std::fmt::Display for State {
2968        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2969            wkt::internal::display_enum(f, self.name(), self.value())
2970        }
2971    }
2972
2973    impl std::convert::From<i32> for State {
2974        fn from(value: i32) -> Self {
2975            match value {
2976                0 => Self::Unspecified,
2977                1 => Self::Creating,
2978                2 => Self::Active,
2979                3 => Self::Updating,
2980                4 => Self::Deleting,
2981                _ => Self::UnknownValue(state::UnknownValue(
2982                    wkt::internal::UnknownEnumValue::Integer(value),
2983                )),
2984            }
2985        }
2986    }
2987
2988    impl std::convert::From<&str> for State {
2989        fn from(value: &str) -> Self {
2990            use std::string::ToString;
2991            match value {
2992                "STATE_UNSPECIFIED" => Self::Unspecified,
2993                "CREATING" => Self::Creating,
2994                "ACTIVE" => Self::Active,
2995                "UPDATING" => Self::Updating,
2996                "DELETING" => Self::Deleting,
2997                _ => Self::UnknownValue(state::UnknownValue(
2998                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2999                )),
3000            }
3001        }
3002    }
3003
3004    impl serde::ser::Serialize for State {
3005        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3006        where
3007            S: serde::Serializer,
3008        {
3009            match self {
3010                Self::Unspecified => serializer.serialize_i32(0),
3011                Self::Creating => serializer.serialize_i32(1),
3012                Self::Active => serializer.serialize_i32(2),
3013                Self::Updating => serializer.serialize_i32(3),
3014                Self::Deleting => serializer.serialize_i32(4),
3015                Self::UnknownValue(u) => u.0.serialize(serializer),
3016            }
3017        }
3018    }
3019
3020    impl<'de> serde::de::Deserialize<'de> for State {
3021        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3022        where
3023            D: serde::Deserializer<'de>,
3024        {
3025            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
3026                ".google.cloud.financialservices.v1.EngineConfig.State",
3027            ))
3028        }
3029    }
3030
3031    /// The type of the hyperparameter source.
3032    ///
3033    /// # Working with unknown values
3034    ///
3035    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3036    /// additional enum variants at any time. Adding new variants is not considered
3037    /// a breaking change. Applications should write their code in anticipation of:
3038    ///
3039    /// - New values appearing in future releases of the client library, **and**
3040    /// - New values received dynamically, without application changes.
3041    ///
3042    /// Please consult the [Working with enums] section in the user guide for some
3043    /// guidelines.
3044    ///
3045    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3046    #[derive(Clone, Debug, PartialEq)]
3047    #[non_exhaustive]
3048    pub enum HyperparameterSourceType {
3049        /// Hyperparameter source type is unspecified, defaults to TUNING.
3050        Unspecified,
3051        /// The EngineConfig creation starts a tuning job which selects the best
3052        /// hyperparameters.
3053        Tuning,
3054        /// The hyperparameters are inherited from another EngineConfig.
3055        Inherited,
3056        /// If set, the enum was initialized with an unknown value.
3057        ///
3058        /// Applications can examine the value using [HyperparameterSourceType::value] or
3059        /// [HyperparameterSourceType::name].
3060        UnknownValue(hyperparameter_source_type::UnknownValue),
3061    }
3062
3063    #[doc(hidden)]
3064    pub mod hyperparameter_source_type {
3065        #[allow(unused_imports)]
3066        use super::*;
3067        #[derive(Clone, Debug, PartialEq)]
3068        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3069    }
3070
3071    impl HyperparameterSourceType {
3072        /// Gets the enum value.
3073        ///
3074        /// Returns `None` if the enum contains an unknown value deserialized from
3075        /// the string representation of enums.
3076        pub fn value(&self) -> std::option::Option<i32> {
3077            match self {
3078                Self::Unspecified => std::option::Option::Some(0),
3079                Self::Tuning => std::option::Option::Some(1),
3080                Self::Inherited => std::option::Option::Some(2),
3081                Self::UnknownValue(u) => u.0.value(),
3082            }
3083        }
3084
3085        /// Gets the enum value as a string.
3086        ///
3087        /// Returns `None` if the enum contains an unknown value deserialized from
3088        /// the integer representation of enums.
3089        pub fn name(&self) -> std::option::Option<&str> {
3090            match self {
3091                Self::Unspecified => {
3092                    std::option::Option::Some("HYPERPARAMETER_SOURCE_TYPE_UNSPECIFIED")
3093                }
3094                Self::Tuning => std::option::Option::Some("TUNING"),
3095                Self::Inherited => std::option::Option::Some("INHERITED"),
3096                Self::UnknownValue(u) => u.0.name(),
3097            }
3098        }
3099    }
3100
3101    impl std::default::Default for HyperparameterSourceType {
3102        fn default() -> Self {
3103            use std::convert::From;
3104            Self::from(0)
3105        }
3106    }
3107
3108    impl std::fmt::Display for HyperparameterSourceType {
3109        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3110            wkt::internal::display_enum(f, self.name(), self.value())
3111        }
3112    }
3113
3114    impl std::convert::From<i32> for HyperparameterSourceType {
3115        fn from(value: i32) -> Self {
3116            match value {
3117                0 => Self::Unspecified,
3118                1 => Self::Tuning,
3119                2 => Self::Inherited,
3120                _ => Self::UnknownValue(hyperparameter_source_type::UnknownValue(
3121                    wkt::internal::UnknownEnumValue::Integer(value),
3122                )),
3123            }
3124        }
3125    }
3126
3127    impl std::convert::From<&str> for HyperparameterSourceType {
3128        fn from(value: &str) -> Self {
3129            use std::string::ToString;
3130            match value {
3131                "HYPERPARAMETER_SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
3132                "TUNING" => Self::Tuning,
3133                "INHERITED" => Self::Inherited,
3134                _ => Self::UnknownValue(hyperparameter_source_type::UnknownValue(
3135                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3136                )),
3137            }
3138        }
3139    }
3140
3141    impl serde::ser::Serialize for HyperparameterSourceType {
3142        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3143        where
3144            S: serde::Serializer,
3145        {
3146            match self {
3147                Self::Unspecified => serializer.serialize_i32(0),
3148                Self::Tuning => serializer.serialize_i32(1),
3149                Self::Inherited => serializer.serialize_i32(2),
3150                Self::UnknownValue(u) => u.0.serialize(serializer),
3151            }
3152        }
3153    }
3154
3155    impl<'de> serde::de::Deserialize<'de> for HyperparameterSourceType {
3156        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3157        where
3158            D: serde::Deserializer<'de>,
3159        {
3160            deserializer.deserialize_any(
3161                wkt::internal::EnumVisitor::<HyperparameterSourceType>::new(
3162                    ".google.cloud.financialservices.v1.EngineConfig.HyperparameterSourceType",
3163                ),
3164            )
3165        }
3166    }
3167}
3168
3169/// Request for retrieving a paginated list of EngineConfig resources that
3170/// meet the specified criteria.
3171#[derive(Clone, Default, PartialEq)]
3172#[non_exhaustive]
3173pub struct ListEngineConfigsRequest {
3174    /// Required. The parent of the EngineConfig is the Instance.
3175    pub parent: std::string::String,
3176
3177    /// The number of resources to be included in the response. The response
3178    /// contains a next_page_token, which can be used to retrieve the next page of
3179    /// resources.
3180    pub page_size: i32,
3181
3182    /// In case of paginated results, this is the token that was returned in the
3183    /// previous ListEngineConfigsResponse. It should be copied here to retrieve
3184    /// the next page of resources. Empty will give the first page of
3185    /// ListEngineConfigsRequest, and the last page will return an empty
3186    /// page_token.
3187    pub page_token: std::string::String,
3188
3189    /// Specify a filter to narrow search results.
3190    pub filter: std::string::String,
3191
3192    /// Specify a field to use for ordering.
3193    pub order_by: std::string::String,
3194
3195    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3196}
3197
3198impl ListEngineConfigsRequest {
3199    /// Creates a new default instance.
3200    pub fn new() -> Self {
3201        std::default::Default::default()
3202    }
3203
3204    /// Sets the value of [parent][crate::model::ListEngineConfigsRequest::parent].
3205    ///
3206    /// # Example
3207    /// ```ignore,no_run
3208    /// # use google_cloud_financialservices_v1::model::ListEngineConfigsRequest;
3209    /// # let project_id = "project_id";
3210    /// # let location_id = "location_id";
3211    /// # let instance_id = "instance_id";
3212    /// let x = ListEngineConfigsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
3213    /// ```
3214    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3215        self.parent = v.into();
3216        self
3217    }
3218
3219    /// Sets the value of [page_size][crate::model::ListEngineConfigsRequest::page_size].
3220    ///
3221    /// # Example
3222    /// ```ignore,no_run
3223    /// # use google_cloud_financialservices_v1::model::ListEngineConfigsRequest;
3224    /// let x = ListEngineConfigsRequest::new().set_page_size(42);
3225    /// ```
3226    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3227        self.page_size = v.into();
3228        self
3229    }
3230
3231    /// Sets the value of [page_token][crate::model::ListEngineConfigsRequest::page_token].
3232    ///
3233    /// # Example
3234    /// ```ignore,no_run
3235    /// # use google_cloud_financialservices_v1::model::ListEngineConfigsRequest;
3236    /// let x = ListEngineConfigsRequest::new().set_page_token("example");
3237    /// ```
3238    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3239        self.page_token = v.into();
3240        self
3241    }
3242
3243    /// Sets the value of [filter][crate::model::ListEngineConfigsRequest::filter].
3244    ///
3245    /// # Example
3246    /// ```ignore,no_run
3247    /// # use google_cloud_financialservices_v1::model::ListEngineConfigsRequest;
3248    /// let x = ListEngineConfigsRequest::new().set_filter("example");
3249    /// ```
3250    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3251        self.filter = v.into();
3252        self
3253    }
3254
3255    /// Sets the value of [order_by][crate::model::ListEngineConfigsRequest::order_by].
3256    ///
3257    /// # Example
3258    /// ```ignore,no_run
3259    /// # use google_cloud_financialservices_v1::model::ListEngineConfigsRequest;
3260    /// let x = ListEngineConfigsRequest::new().set_order_by("example");
3261    /// ```
3262    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3263        self.order_by = v.into();
3264        self
3265    }
3266}
3267
3268impl wkt::message::Message for ListEngineConfigsRequest {
3269    fn typename() -> &'static str {
3270        "type.googleapis.com/google.cloud.financialservices.v1.ListEngineConfigsRequest"
3271    }
3272}
3273
3274/// Response for retrieving a list of EngineConfigs
3275#[derive(Clone, Default, PartialEq)]
3276#[non_exhaustive]
3277pub struct ListEngineConfigsResponse {
3278    /// List of EngineConfig resources
3279    pub engine_configs: std::vec::Vec<crate::model::EngineConfig>,
3280
3281    /// This token should be passed to the next ListEngineConfigsRequest to
3282    /// retrieve the next page of EngineConfigs (empty indicates we are done).
3283    pub next_page_token: std::string::String,
3284
3285    /// Locations that could not be reached.
3286    pub unreachable: std::vec::Vec<std::string::String>,
3287
3288    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3289}
3290
3291impl ListEngineConfigsResponse {
3292    /// Creates a new default instance.
3293    pub fn new() -> Self {
3294        std::default::Default::default()
3295    }
3296
3297    /// Sets the value of [engine_configs][crate::model::ListEngineConfigsResponse::engine_configs].
3298    ///
3299    /// # Example
3300    /// ```ignore,no_run
3301    /// # use google_cloud_financialservices_v1::model::ListEngineConfigsResponse;
3302    /// use google_cloud_financialservices_v1::model::EngineConfig;
3303    /// let x = ListEngineConfigsResponse::new()
3304    ///     .set_engine_configs([
3305    ///         EngineConfig::default()/* use setters */,
3306    ///         EngineConfig::default()/* use (different) setters */,
3307    ///     ]);
3308    /// ```
3309    pub fn set_engine_configs<T, V>(mut self, v: T) -> Self
3310    where
3311        T: std::iter::IntoIterator<Item = V>,
3312        V: std::convert::Into<crate::model::EngineConfig>,
3313    {
3314        use std::iter::Iterator;
3315        self.engine_configs = v.into_iter().map(|i| i.into()).collect();
3316        self
3317    }
3318
3319    /// Sets the value of [next_page_token][crate::model::ListEngineConfigsResponse::next_page_token].
3320    ///
3321    /// # Example
3322    /// ```ignore,no_run
3323    /// # use google_cloud_financialservices_v1::model::ListEngineConfigsResponse;
3324    /// let x = ListEngineConfigsResponse::new().set_next_page_token("example");
3325    /// ```
3326    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3327        self.next_page_token = v.into();
3328        self
3329    }
3330
3331    /// Sets the value of [unreachable][crate::model::ListEngineConfigsResponse::unreachable].
3332    ///
3333    /// # Example
3334    /// ```ignore,no_run
3335    /// # use google_cloud_financialservices_v1::model::ListEngineConfigsResponse;
3336    /// let x = ListEngineConfigsResponse::new().set_unreachable(["a", "b", "c"]);
3337    /// ```
3338    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3339    where
3340        T: std::iter::IntoIterator<Item = V>,
3341        V: std::convert::Into<std::string::String>,
3342    {
3343        use std::iter::Iterator;
3344        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3345        self
3346    }
3347}
3348
3349impl wkt::message::Message for ListEngineConfigsResponse {
3350    fn typename() -> &'static str {
3351        "type.googleapis.com/google.cloud.financialservices.v1.ListEngineConfigsResponse"
3352    }
3353}
3354
3355#[doc(hidden)]
3356impl google_cloud_gax::paginator::internal::PageableResponse for ListEngineConfigsResponse {
3357    type PageItem = crate::model::EngineConfig;
3358
3359    fn items(self) -> std::vec::Vec<Self::PageItem> {
3360        self.engine_configs
3361    }
3362
3363    fn next_page_token(&self) -> std::string::String {
3364        use std::clone::Clone;
3365        self.next_page_token.clone()
3366    }
3367}
3368
3369/// Request for retrieving a specific EngineConfig resource.
3370#[derive(Clone, Default, PartialEq)]
3371#[non_exhaustive]
3372pub struct GetEngineConfigRequest {
3373    /// Required. The resource name of the EngineConfig
3374    pub name: std::string::String,
3375
3376    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3377}
3378
3379impl GetEngineConfigRequest {
3380    /// Creates a new default instance.
3381    pub fn new() -> Self {
3382        std::default::Default::default()
3383    }
3384
3385    /// Sets the value of [name][crate::model::GetEngineConfigRequest::name].
3386    ///
3387    /// # Example
3388    /// ```ignore,no_run
3389    /// # use google_cloud_financialservices_v1::model::GetEngineConfigRequest;
3390    /// # let project_num_id = "project_num_id";
3391    /// # let location_id = "location_id";
3392    /// # let instance_id = "instance_id";
3393    /// # let engine_config_id = "engine_config_id";
3394    /// let x = GetEngineConfigRequest::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/engineConfigs/{engine_config_id}"));
3395    /// ```
3396    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3397        self.name = v.into();
3398        self
3399    }
3400}
3401
3402impl wkt::message::Message for GetEngineConfigRequest {
3403    fn typename() -> &'static str {
3404        "type.googleapis.com/google.cloud.financialservices.v1.GetEngineConfigRequest"
3405    }
3406}
3407
3408/// Request for creating an EngineConfig resource.
3409#[derive(Clone, Default, PartialEq)]
3410#[non_exhaustive]
3411pub struct CreateEngineConfigRequest {
3412    /// Required. The parent of the EngineConfig is the Instance.
3413    pub parent: std::string::String,
3414
3415    /// Required. The resource id of the EngineConfig
3416    pub engine_config_id: std::string::String,
3417
3418    /// Required. The EngineConfig that will be created.
3419    pub engine_config: std::option::Option<crate::model::EngineConfig>,
3420
3421    /// Optional. An optional request ID to identify requests. Specify a unique
3422    /// request ID so that if you must retry your request, the server will know to
3423    /// ignore the request if it has already been completed. The server will
3424    /// guarantee that for at least 60 minutes since the first request.
3425    ///
3426    /// For example, consider a situation where you make an initial request and the
3427    /// request times out. If you make the request again with the same request
3428    /// ID, the server can check if original operation with the same request ID
3429    /// was received, and if so, will ignore the second request. This prevents
3430    /// clients from accidentally creating duplicate commitments.
3431    ///
3432    /// The request ID must be a valid UUID with the exception that zero UUID is
3433    /// not supported (00000000-0000-0000-0000-000000000000).
3434    pub request_id: std::string::String,
3435
3436    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3437}
3438
3439impl CreateEngineConfigRequest {
3440    /// Creates a new default instance.
3441    pub fn new() -> Self {
3442        std::default::Default::default()
3443    }
3444
3445    /// Sets the value of [parent][crate::model::CreateEngineConfigRequest::parent].
3446    ///
3447    /// # Example
3448    /// ```ignore,no_run
3449    /// # use google_cloud_financialservices_v1::model::CreateEngineConfigRequest;
3450    /// # let project_id = "project_id";
3451    /// # let location_id = "location_id";
3452    /// # let instance_id = "instance_id";
3453    /// let x = CreateEngineConfigRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
3454    /// ```
3455    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3456        self.parent = v.into();
3457        self
3458    }
3459
3460    /// Sets the value of [engine_config_id][crate::model::CreateEngineConfigRequest::engine_config_id].
3461    ///
3462    /// # Example
3463    /// ```ignore,no_run
3464    /// # use google_cloud_financialservices_v1::model::CreateEngineConfigRequest;
3465    /// let x = CreateEngineConfigRequest::new().set_engine_config_id("example");
3466    /// ```
3467    pub fn set_engine_config_id<T: std::convert::Into<std::string::String>>(
3468        mut self,
3469        v: T,
3470    ) -> Self {
3471        self.engine_config_id = v.into();
3472        self
3473    }
3474
3475    /// Sets the value of [engine_config][crate::model::CreateEngineConfigRequest::engine_config].
3476    ///
3477    /// # Example
3478    /// ```ignore,no_run
3479    /// # use google_cloud_financialservices_v1::model::CreateEngineConfigRequest;
3480    /// use google_cloud_financialservices_v1::model::EngineConfig;
3481    /// let x = CreateEngineConfigRequest::new().set_engine_config(EngineConfig::default()/* use setters */);
3482    /// ```
3483    pub fn set_engine_config<T>(mut self, v: T) -> Self
3484    where
3485        T: std::convert::Into<crate::model::EngineConfig>,
3486    {
3487        self.engine_config = std::option::Option::Some(v.into());
3488        self
3489    }
3490
3491    /// Sets or clears the value of [engine_config][crate::model::CreateEngineConfigRequest::engine_config].
3492    ///
3493    /// # Example
3494    /// ```ignore,no_run
3495    /// # use google_cloud_financialservices_v1::model::CreateEngineConfigRequest;
3496    /// use google_cloud_financialservices_v1::model::EngineConfig;
3497    /// let x = CreateEngineConfigRequest::new().set_or_clear_engine_config(Some(EngineConfig::default()/* use setters */));
3498    /// let x = CreateEngineConfigRequest::new().set_or_clear_engine_config(None::<EngineConfig>);
3499    /// ```
3500    pub fn set_or_clear_engine_config<T>(mut self, v: std::option::Option<T>) -> Self
3501    where
3502        T: std::convert::Into<crate::model::EngineConfig>,
3503    {
3504        self.engine_config = v.map(|x| x.into());
3505        self
3506    }
3507
3508    /// Sets the value of [request_id][crate::model::CreateEngineConfigRequest::request_id].
3509    ///
3510    /// # Example
3511    /// ```ignore,no_run
3512    /// # use google_cloud_financialservices_v1::model::CreateEngineConfigRequest;
3513    /// let x = CreateEngineConfigRequest::new().set_request_id("example");
3514    /// ```
3515    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3516        self.request_id = v.into();
3517        self
3518    }
3519}
3520
3521impl wkt::message::Message for CreateEngineConfigRequest {
3522    fn typename() -> &'static str {
3523        "type.googleapis.com/google.cloud.financialservices.v1.CreateEngineConfigRequest"
3524    }
3525}
3526
3527/// Request for updating an EngineConfig
3528#[derive(Clone, Default, PartialEq)]
3529#[non_exhaustive]
3530pub struct UpdateEngineConfigRequest {
3531    /// Optional. Field mask is used to specify the fields to be overwritten in the
3532    /// EngineConfig resource by the update.
3533    /// The fields specified in the update_mask are relative to the resource, not
3534    /// the full request. A field will be overwritten if it is in the mask. If the
3535    /// user does not provide a mask then all fields will be overwritten.
3536    pub update_mask: std::option::Option<wkt::FieldMask>,
3537
3538    /// Required. The new value of the EngineConfig fields that will be updated
3539    /// according to the update_mask.
3540    pub engine_config: std::option::Option<crate::model::EngineConfig>,
3541
3542    /// Optional. An optional request ID to identify requests. Specify a unique
3543    /// request ID so that if you must retry your request, the server will know to
3544    /// ignore the request if it has already been completed. The server will
3545    /// guarantee that for at least 60 minutes since the first request.
3546    ///
3547    /// For example, consider a situation where you make an initial request and the
3548    /// request times out. If you make the request again with the same request
3549    /// ID, the server can check if original operation with the same request ID
3550    /// was received, and if so, will ignore the second request. This prevents
3551    /// clients from accidentally creating duplicate commitments.
3552    ///
3553    /// The request ID must be a valid UUID with the exception that zero UUID is
3554    /// not supported (00000000-0000-0000-0000-000000000000).
3555    pub request_id: std::string::String,
3556
3557    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3558}
3559
3560impl UpdateEngineConfigRequest {
3561    /// Creates a new default instance.
3562    pub fn new() -> Self {
3563        std::default::Default::default()
3564    }
3565
3566    /// Sets the value of [update_mask][crate::model::UpdateEngineConfigRequest::update_mask].
3567    ///
3568    /// # Example
3569    /// ```ignore,no_run
3570    /// # use google_cloud_financialservices_v1::model::UpdateEngineConfigRequest;
3571    /// use wkt::FieldMask;
3572    /// let x = UpdateEngineConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3573    /// ```
3574    pub fn set_update_mask<T>(mut self, v: T) -> Self
3575    where
3576        T: std::convert::Into<wkt::FieldMask>,
3577    {
3578        self.update_mask = std::option::Option::Some(v.into());
3579        self
3580    }
3581
3582    /// Sets or clears the value of [update_mask][crate::model::UpdateEngineConfigRequest::update_mask].
3583    ///
3584    /// # Example
3585    /// ```ignore,no_run
3586    /// # use google_cloud_financialservices_v1::model::UpdateEngineConfigRequest;
3587    /// use wkt::FieldMask;
3588    /// let x = UpdateEngineConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3589    /// let x = UpdateEngineConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3590    /// ```
3591    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3592    where
3593        T: std::convert::Into<wkt::FieldMask>,
3594    {
3595        self.update_mask = v.map(|x| x.into());
3596        self
3597    }
3598
3599    /// Sets the value of [engine_config][crate::model::UpdateEngineConfigRequest::engine_config].
3600    ///
3601    /// # Example
3602    /// ```ignore,no_run
3603    /// # use google_cloud_financialservices_v1::model::UpdateEngineConfigRequest;
3604    /// use google_cloud_financialservices_v1::model::EngineConfig;
3605    /// let x = UpdateEngineConfigRequest::new().set_engine_config(EngineConfig::default()/* use setters */);
3606    /// ```
3607    pub fn set_engine_config<T>(mut self, v: T) -> Self
3608    where
3609        T: std::convert::Into<crate::model::EngineConfig>,
3610    {
3611        self.engine_config = std::option::Option::Some(v.into());
3612        self
3613    }
3614
3615    /// Sets or clears the value of [engine_config][crate::model::UpdateEngineConfigRequest::engine_config].
3616    ///
3617    /// # Example
3618    /// ```ignore,no_run
3619    /// # use google_cloud_financialservices_v1::model::UpdateEngineConfigRequest;
3620    /// use google_cloud_financialservices_v1::model::EngineConfig;
3621    /// let x = UpdateEngineConfigRequest::new().set_or_clear_engine_config(Some(EngineConfig::default()/* use setters */));
3622    /// let x = UpdateEngineConfigRequest::new().set_or_clear_engine_config(None::<EngineConfig>);
3623    /// ```
3624    pub fn set_or_clear_engine_config<T>(mut self, v: std::option::Option<T>) -> Self
3625    where
3626        T: std::convert::Into<crate::model::EngineConfig>,
3627    {
3628        self.engine_config = v.map(|x| x.into());
3629        self
3630    }
3631
3632    /// Sets the value of [request_id][crate::model::UpdateEngineConfigRequest::request_id].
3633    ///
3634    /// # Example
3635    /// ```ignore,no_run
3636    /// # use google_cloud_financialservices_v1::model::UpdateEngineConfigRequest;
3637    /// let x = UpdateEngineConfigRequest::new().set_request_id("example");
3638    /// ```
3639    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3640        self.request_id = v.into();
3641        self
3642    }
3643}
3644
3645impl wkt::message::Message for UpdateEngineConfigRequest {
3646    fn typename() -> &'static str {
3647        "type.googleapis.com/google.cloud.financialservices.v1.UpdateEngineConfigRequest"
3648    }
3649}
3650
3651/// Request for deleting an EngineConfig.
3652#[derive(Clone, Default, PartialEq)]
3653#[non_exhaustive]
3654pub struct DeleteEngineConfigRequest {
3655    /// Required. The resource name of the EngineConfig.
3656    pub name: std::string::String,
3657
3658    /// Optional. An optional request ID to identify requests. Specify a unique
3659    /// request ID so that if you must retry your request, the server will know to
3660    /// ignore the request if it has already been completed. The server will
3661    /// guarantee that for at least 60 minutes after the first request.
3662    ///
3663    /// For example, consider a situation where you make an initial request and the
3664    /// request times out. If you make the request again with the same request
3665    /// ID, the server can check if original operation with the same request ID
3666    /// was received, and if so, will ignore the second request. This prevents
3667    /// clients from accidentally creating duplicate commitments.
3668    ///
3669    /// The request ID must be a valid UUID with the exception that zero UUID is
3670    /// not supported (00000000-0000-0000-0000-000000000000).
3671    pub request_id: std::string::String,
3672
3673    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3674}
3675
3676impl DeleteEngineConfigRequest {
3677    /// Creates a new default instance.
3678    pub fn new() -> Self {
3679        std::default::Default::default()
3680    }
3681
3682    /// Sets the value of [name][crate::model::DeleteEngineConfigRequest::name].
3683    ///
3684    /// # Example
3685    /// ```ignore,no_run
3686    /// # use google_cloud_financialservices_v1::model::DeleteEngineConfigRequest;
3687    /// # let project_num_id = "project_num_id";
3688    /// # let location_id = "location_id";
3689    /// # let instance_id = "instance_id";
3690    /// # let engine_config_id = "engine_config_id";
3691    /// let x = DeleteEngineConfigRequest::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/engineConfigs/{engine_config_id}"));
3692    /// ```
3693    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3694        self.name = v.into();
3695        self
3696    }
3697
3698    /// Sets the value of [request_id][crate::model::DeleteEngineConfigRequest::request_id].
3699    ///
3700    /// # Example
3701    /// ```ignore,no_run
3702    /// # use google_cloud_financialservices_v1::model::DeleteEngineConfigRequest;
3703    /// let x = DeleteEngineConfigRequest::new().set_request_id("example");
3704    /// ```
3705    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3706        self.request_id = v.into();
3707        self
3708    }
3709}
3710
3711impl wkt::message::Message for DeleteEngineConfigRequest {
3712    fn typename() -> &'static str {
3713        "type.googleapis.com/google.cloud.financialservices.v1.DeleteEngineConfigRequest"
3714    }
3715}
3716
3717/// Request for exporting EngineConfig metadata.
3718#[derive(Clone, Default, PartialEq)]
3719#[non_exhaustive]
3720pub struct ExportEngineConfigMetadataRequest {
3721    /// Required. The resource name of the EngineConfig.
3722    pub engine_config: std::string::String,
3723
3724    /// Required. BigQuery output where the metadata will be written.
3725    pub structured_metadata_destination: std::option::Option<crate::model::BigQueryDestination>,
3726
3727    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3728}
3729
3730impl ExportEngineConfigMetadataRequest {
3731    /// Creates a new default instance.
3732    pub fn new() -> Self {
3733        std::default::Default::default()
3734    }
3735
3736    /// Sets the value of [engine_config][crate::model::ExportEngineConfigMetadataRequest::engine_config].
3737    ///
3738    /// # Example
3739    /// ```ignore,no_run
3740    /// # use google_cloud_financialservices_v1::model::ExportEngineConfigMetadataRequest;
3741    /// # let project_num_id = "project_num_id";
3742    /// # let location_id = "location_id";
3743    /// # let instance_id = "instance_id";
3744    /// # let engine_config_id = "engine_config_id";
3745    /// let x = ExportEngineConfigMetadataRequest::new().set_engine_config(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/engineConfigs/{engine_config_id}"));
3746    /// ```
3747    pub fn set_engine_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3748        self.engine_config = v.into();
3749        self
3750    }
3751
3752    /// Sets the value of [structured_metadata_destination][crate::model::ExportEngineConfigMetadataRequest::structured_metadata_destination].
3753    ///
3754    /// # Example
3755    /// ```ignore,no_run
3756    /// # use google_cloud_financialservices_v1::model::ExportEngineConfigMetadataRequest;
3757    /// use google_cloud_financialservices_v1::model::BigQueryDestination;
3758    /// let x = ExportEngineConfigMetadataRequest::new().set_structured_metadata_destination(BigQueryDestination::default()/* use setters */);
3759    /// ```
3760    pub fn set_structured_metadata_destination<T>(mut self, v: T) -> Self
3761    where
3762        T: std::convert::Into<crate::model::BigQueryDestination>,
3763    {
3764        self.structured_metadata_destination = std::option::Option::Some(v.into());
3765        self
3766    }
3767
3768    /// Sets or clears the value of [structured_metadata_destination][crate::model::ExportEngineConfigMetadataRequest::structured_metadata_destination].
3769    ///
3770    /// # Example
3771    /// ```ignore,no_run
3772    /// # use google_cloud_financialservices_v1::model::ExportEngineConfigMetadataRequest;
3773    /// use google_cloud_financialservices_v1::model::BigQueryDestination;
3774    /// let x = ExportEngineConfigMetadataRequest::new().set_or_clear_structured_metadata_destination(Some(BigQueryDestination::default()/* use setters */));
3775    /// let x = ExportEngineConfigMetadataRequest::new().set_or_clear_structured_metadata_destination(None::<BigQueryDestination>);
3776    /// ```
3777    pub fn set_or_clear_structured_metadata_destination<T>(
3778        mut self,
3779        v: std::option::Option<T>,
3780    ) -> Self
3781    where
3782        T: std::convert::Into<crate::model::BigQueryDestination>,
3783    {
3784        self.structured_metadata_destination = v.map(|x| x.into());
3785        self
3786    }
3787}
3788
3789impl wkt::message::Message for ExportEngineConfigMetadataRequest {
3790    fn typename() -> &'static str {
3791        "type.googleapis.com/google.cloud.financialservices.v1.ExportEngineConfigMetadataRequest"
3792    }
3793}
3794
3795/// Response for exporting EngineConfig metadata.
3796#[derive(Clone, Default, PartialEq)]
3797#[non_exhaustive]
3798pub struct ExportEngineConfigMetadataResponse {
3799    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3800}
3801
3802impl ExportEngineConfigMetadataResponse {
3803    /// Creates a new default instance.
3804    pub fn new() -> Self {
3805        std::default::Default::default()
3806    }
3807}
3808
3809impl wkt::message::Message for ExportEngineConfigMetadataResponse {
3810    fn typename() -> &'static str {
3811        "type.googleapis.com/google.cloud.financialservices.v1.ExportEngineConfigMetadataResponse"
3812    }
3813}
3814
3815/// EngineVersion controls which version of the engine is used to tune, train,
3816/// and run the model.
3817#[derive(Clone, Default, PartialEq)]
3818#[non_exhaustive]
3819pub struct EngineVersion {
3820    /// Output only. Identifier. The resource name of the EngineVersion
3821    /// format:
3822    /// `/projects/{project_num}/locations/{location}/instances/{instance}/engineVersions/{engine_version}`
3823    pub name: std::string::String,
3824
3825    /// Output only. The state of the version.
3826    pub state: crate::model::engine_version::State,
3827
3828    /// Output only. Planned time to stop allowing training/tuning using this
3829    /// version. Existing trained models can still be used for prediction/backtest.
3830    pub expected_limitation_start_time: std::option::Option<wkt::Timestamp>,
3831
3832    /// Output only. Planned time to stop supporting the version, in addition
3833    /// to no training or tuning, models trained on this version
3834    /// can no longer be used for prediction/backtest.
3835    pub expected_decommission_time: std::option::Option<wkt::Timestamp>,
3836
3837    /// Output only. The line of business (Retail/Commercial) this engine version
3838    /// is used for.
3839    pub line_of_business: crate::model::LineOfBusiness,
3840
3841    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3842}
3843
3844impl EngineVersion {
3845    /// Creates a new default instance.
3846    pub fn new() -> Self {
3847        std::default::Default::default()
3848    }
3849
3850    /// Sets the value of [name][crate::model::EngineVersion::name].
3851    ///
3852    /// # Example
3853    /// ```ignore,no_run
3854    /// # use google_cloud_financialservices_v1::model::EngineVersion;
3855    /// # let project_num_id = "project_num_id";
3856    /// # let location_id = "location_id";
3857    /// # let instance_id = "instance_id";
3858    /// # let engine_version_id = "engine_version_id";
3859    /// let x = EngineVersion::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/engineVersions/{engine_version_id}"));
3860    /// ```
3861    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3862        self.name = v.into();
3863        self
3864    }
3865
3866    /// Sets the value of [state][crate::model::EngineVersion::state].
3867    ///
3868    /// # Example
3869    /// ```ignore,no_run
3870    /// # use google_cloud_financialservices_v1::model::EngineVersion;
3871    /// use google_cloud_financialservices_v1::model::engine_version::State;
3872    /// let x0 = EngineVersion::new().set_state(State::Active);
3873    /// let x1 = EngineVersion::new().set_state(State::Limited);
3874    /// let x2 = EngineVersion::new().set_state(State::Decommissioned);
3875    /// ```
3876    pub fn set_state<T: std::convert::Into<crate::model::engine_version::State>>(
3877        mut self,
3878        v: T,
3879    ) -> Self {
3880        self.state = v.into();
3881        self
3882    }
3883
3884    /// Sets the value of [expected_limitation_start_time][crate::model::EngineVersion::expected_limitation_start_time].
3885    ///
3886    /// # Example
3887    /// ```ignore,no_run
3888    /// # use google_cloud_financialservices_v1::model::EngineVersion;
3889    /// use wkt::Timestamp;
3890    /// let x = EngineVersion::new().set_expected_limitation_start_time(Timestamp::default()/* use setters */);
3891    /// ```
3892    pub fn set_expected_limitation_start_time<T>(mut self, v: T) -> Self
3893    where
3894        T: std::convert::Into<wkt::Timestamp>,
3895    {
3896        self.expected_limitation_start_time = std::option::Option::Some(v.into());
3897        self
3898    }
3899
3900    /// Sets or clears the value of [expected_limitation_start_time][crate::model::EngineVersion::expected_limitation_start_time].
3901    ///
3902    /// # Example
3903    /// ```ignore,no_run
3904    /// # use google_cloud_financialservices_v1::model::EngineVersion;
3905    /// use wkt::Timestamp;
3906    /// let x = EngineVersion::new().set_or_clear_expected_limitation_start_time(Some(Timestamp::default()/* use setters */));
3907    /// let x = EngineVersion::new().set_or_clear_expected_limitation_start_time(None::<Timestamp>);
3908    /// ```
3909    pub fn set_or_clear_expected_limitation_start_time<T>(
3910        mut self,
3911        v: std::option::Option<T>,
3912    ) -> Self
3913    where
3914        T: std::convert::Into<wkt::Timestamp>,
3915    {
3916        self.expected_limitation_start_time = v.map(|x| x.into());
3917        self
3918    }
3919
3920    /// Sets the value of [expected_decommission_time][crate::model::EngineVersion::expected_decommission_time].
3921    ///
3922    /// # Example
3923    /// ```ignore,no_run
3924    /// # use google_cloud_financialservices_v1::model::EngineVersion;
3925    /// use wkt::Timestamp;
3926    /// let x = EngineVersion::new().set_expected_decommission_time(Timestamp::default()/* use setters */);
3927    /// ```
3928    pub fn set_expected_decommission_time<T>(mut self, v: T) -> Self
3929    where
3930        T: std::convert::Into<wkt::Timestamp>,
3931    {
3932        self.expected_decommission_time = std::option::Option::Some(v.into());
3933        self
3934    }
3935
3936    /// Sets or clears the value of [expected_decommission_time][crate::model::EngineVersion::expected_decommission_time].
3937    ///
3938    /// # Example
3939    /// ```ignore,no_run
3940    /// # use google_cloud_financialservices_v1::model::EngineVersion;
3941    /// use wkt::Timestamp;
3942    /// let x = EngineVersion::new().set_or_clear_expected_decommission_time(Some(Timestamp::default()/* use setters */));
3943    /// let x = EngineVersion::new().set_or_clear_expected_decommission_time(None::<Timestamp>);
3944    /// ```
3945    pub fn set_or_clear_expected_decommission_time<T>(mut self, v: std::option::Option<T>) -> Self
3946    where
3947        T: std::convert::Into<wkt::Timestamp>,
3948    {
3949        self.expected_decommission_time = v.map(|x| x.into());
3950        self
3951    }
3952
3953    /// Sets the value of [line_of_business][crate::model::EngineVersion::line_of_business].
3954    ///
3955    /// # Example
3956    /// ```ignore,no_run
3957    /// # use google_cloud_financialservices_v1::model::EngineVersion;
3958    /// use google_cloud_financialservices_v1::model::LineOfBusiness;
3959    /// let x0 = EngineVersion::new().set_line_of_business(LineOfBusiness::Commercial);
3960    /// let x1 = EngineVersion::new().set_line_of_business(LineOfBusiness::Retail);
3961    /// ```
3962    pub fn set_line_of_business<T: std::convert::Into<crate::model::LineOfBusiness>>(
3963        mut self,
3964        v: T,
3965    ) -> Self {
3966        self.line_of_business = v.into();
3967        self
3968    }
3969}
3970
3971impl wkt::message::Message for EngineVersion {
3972    fn typename() -> &'static str {
3973        "type.googleapis.com/google.cloud.financialservices.v1.EngineVersion"
3974    }
3975}
3976
3977/// Defines additional types related to [EngineVersion].
3978pub mod engine_version {
3979    #[allow(unused_imports)]
3980    use super::*;
3981
3982    /// State determines the lifecycle of a version and the models/engine configs
3983    /// trained with it.
3984    ///
3985    /// # Working with unknown values
3986    ///
3987    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3988    /// additional enum variants at any time. Adding new variants is not considered
3989    /// a breaking change. Applications should write their code in anticipation of:
3990    ///
3991    /// - New values appearing in future releases of the client library, **and**
3992    /// - New values received dynamically, without application changes.
3993    ///
3994    /// Please consult the [Working with enums] section in the user guide for some
3995    /// guidelines.
3996    ///
3997    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3998    #[derive(Clone, Debug, PartialEq)]
3999    #[non_exhaustive]
4000    pub enum State {
4001        /// Default state, should never be used.
4002        Unspecified,
4003        /// Version is available for training and inference.
4004        Active,
4005        /// Models using this version can still be run, but new ones cannot be
4006        /// trained.
4007        Limited,
4008        /// Version is deprecated, listed for informational purposes only.
4009        Decommissioned,
4010        /// If set, the enum was initialized with an unknown value.
4011        ///
4012        /// Applications can examine the value using [State::value] or
4013        /// [State::name].
4014        UnknownValue(state::UnknownValue),
4015    }
4016
4017    #[doc(hidden)]
4018    pub mod state {
4019        #[allow(unused_imports)]
4020        use super::*;
4021        #[derive(Clone, Debug, PartialEq)]
4022        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4023    }
4024
4025    impl State {
4026        /// Gets the enum value.
4027        ///
4028        /// Returns `None` if the enum contains an unknown value deserialized from
4029        /// the string representation of enums.
4030        pub fn value(&self) -> std::option::Option<i32> {
4031            match self {
4032                Self::Unspecified => std::option::Option::Some(0),
4033                Self::Active => std::option::Option::Some(1),
4034                Self::Limited => std::option::Option::Some(2),
4035                Self::Decommissioned => std::option::Option::Some(3),
4036                Self::UnknownValue(u) => u.0.value(),
4037            }
4038        }
4039
4040        /// Gets the enum value as a string.
4041        ///
4042        /// Returns `None` if the enum contains an unknown value deserialized from
4043        /// the integer representation of enums.
4044        pub fn name(&self) -> std::option::Option<&str> {
4045            match self {
4046                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
4047                Self::Active => std::option::Option::Some("ACTIVE"),
4048                Self::Limited => std::option::Option::Some("LIMITED"),
4049                Self::Decommissioned => std::option::Option::Some("DECOMMISSIONED"),
4050                Self::UnknownValue(u) => u.0.name(),
4051            }
4052        }
4053    }
4054
4055    impl std::default::Default for State {
4056        fn default() -> Self {
4057            use std::convert::From;
4058            Self::from(0)
4059        }
4060    }
4061
4062    impl std::fmt::Display for State {
4063        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4064            wkt::internal::display_enum(f, self.name(), self.value())
4065        }
4066    }
4067
4068    impl std::convert::From<i32> for State {
4069        fn from(value: i32) -> Self {
4070            match value {
4071                0 => Self::Unspecified,
4072                1 => Self::Active,
4073                2 => Self::Limited,
4074                3 => Self::Decommissioned,
4075                _ => Self::UnknownValue(state::UnknownValue(
4076                    wkt::internal::UnknownEnumValue::Integer(value),
4077                )),
4078            }
4079        }
4080    }
4081
4082    impl std::convert::From<&str> for State {
4083        fn from(value: &str) -> Self {
4084            use std::string::ToString;
4085            match value {
4086                "STATE_UNSPECIFIED" => Self::Unspecified,
4087                "ACTIVE" => Self::Active,
4088                "LIMITED" => Self::Limited,
4089                "DECOMMISSIONED" => Self::Decommissioned,
4090                _ => Self::UnknownValue(state::UnknownValue(
4091                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4092                )),
4093            }
4094        }
4095    }
4096
4097    impl serde::ser::Serialize for State {
4098        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4099        where
4100            S: serde::Serializer,
4101        {
4102            match self {
4103                Self::Unspecified => serializer.serialize_i32(0),
4104                Self::Active => serializer.serialize_i32(1),
4105                Self::Limited => serializer.serialize_i32(2),
4106                Self::Decommissioned => serializer.serialize_i32(3),
4107                Self::UnknownValue(u) => u.0.serialize(serializer),
4108            }
4109        }
4110    }
4111
4112    impl<'de> serde::de::Deserialize<'de> for State {
4113        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4114        where
4115            D: serde::Deserializer<'de>,
4116        {
4117            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
4118                ".google.cloud.financialservices.v1.EngineVersion.State",
4119            ))
4120        }
4121    }
4122}
4123
4124/// Request for retrieving a paginated list of EngineVersion resources that meet
4125/// the specified criteria.
4126#[derive(Clone, Default, PartialEq)]
4127#[non_exhaustive]
4128pub struct ListEngineVersionsRequest {
4129    /// Required. The parent of the EngineVersion is the Instance.
4130    pub parent: std::string::String,
4131
4132    /// Optional. The number of resources to be included in the response. The
4133    /// response contains a next_page_token, which can be used to retrieve the next
4134    /// page of resources.
4135    pub page_size: i32,
4136
4137    /// Optional. In case of paginated results, this is the token that was returned
4138    /// in the previous ListEngineVersionsResponse. It should be copied here to
4139    /// retrieve the next page of resources. Empty will give the first page of
4140    /// ListEngineVersionsRequest, and the last page will return an empty
4141    /// page_token.
4142    pub page_token: std::string::String,
4143
4144    /// Optional. Specify a filter to narrow search results.
4145    /// If empty or unset will default to "state!=DEPRECATED",
4146    /// to view deprecated versions use "state:*" or any other filter.
4147    pub filter: std::string::String,
4148
4149    /// Optional. Specify a field to use for ordering.
4150    pub order_by: std::string::String,
4151
4152    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4153}
4154
4155impl ListEngineVersionsRequest {
4156    /// Creates a new default instance.
4157    pub fn new() -> Self {
4158        std::default::Default::default()
4159    }
4160
4161    /// Sets the value of [parent][crate::model::ListEngineVersionsRequest::parent].
4162    ///
4163    /// # Example
4164    /// ```ignore,no_run
4165    /// # use google_cloud_financialservices_v1::model::ListEngineVersionsRequest;
4166    /// # let project_id = "project_id";
4167    /// # let location_id = "location_id";
4168    /// # let instance_id = "instance_id";
4169    /// let x = ListEngineVersionsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
4170    /// ```
4171    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4172        self.parent = v.into();
4173        self
4174    }
4175
4176    /// Sets the value of [page_size][crate::model::ListEngineVersionsRequest::page_size].
4177    ///
4178    /// # Example
4179    /// ```ignore,no_run
4180    /// # use google_cloud_financialservices_v1::model::ListEngineVersionsRequest;
4181    /// let x = ListEngineVersionsRequest::new().set_page_size(42);
4182    /// ```
4183    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4184        self.page_size = v.into();
4185        self
4186    }
4187
4188    /// Sets the value of [page_token][crate::model::ListEngineVersionsRequest::page_token].
4189    ///
4190    /// # Example
4191    /// ```ignore,no_run
4192    /// # use google_cloud_financialservices_v1::model::ListEngineVersionsRequest;
4193    /// let x = ListEngineVersionsRequest::new().set_page_token("example");
4194    /// ```
4195    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4196        self.page_token = v.into();
4197        self
4198    }
4199
4200    /// Sets the value of [filter][crate::model::ListEngineVersionsRequest::filter].
4201    ///
4202    /// # Example
4203    /// ```ignore,no_run
4204    /// # use google_cloud_financialservices_v1::model::ListEngineVersionsRequest;
4205    /// let x = ListEngineVersionsRequest::new().set_filter("example");
4206    /// ```
4207    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4208        self.filter = v.into();
4209        self
4210    }
4211
4212    /// Sets the value of [order_by][crate::model::ListEngineVersionsRequest::order_by].
4213    ///
4214    /// # Example
4215    /// ```ignore,no_run
4216    /// # use google_cloud_financialservices_v1::model::ListEngineVersionsRequest;
4217    /// let x = ListEngineVersionsRequest::new().set_order_by("example");
4218    /// ```
4219    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4220        self.order_by = v.into();
4221        self
4222    }
4223}
4224
4225impl wkt::message::Message for ListEngineVersionsRequest {
4226    fn typename() -> &'static str {
4227        "type.googleapis.com/google.cloud.financialservices.v1.ListEngineVersionsRequest"
4228    }
4229}
4230
4231/// The response to a list call containing the list of engine versions.
4232#[derive(Clone, Default, PartialEq)]
4233#[non_exhaustive]
4234pub struct ListEngineVersionsResponse {
4235    /// List of EngineVersion resources
4236    pub engine_versions: std::vec::Vec<crate::model::EngineVersion>,
4237
4238    /// This token should be passed to the next EngineVersionsRequest to retrieve
4239    /// the next page of EngineVersions (empty indicates we are done).
4240    pub next_page_token: std::string::String,
4241
4242    /// Locations that could not be reached.
4243    pub unreachable: std::vec::Vec<std::string::String>,
4244
4245    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4246}
4247
4248impl ListEngineVersionsResponse {
4249    /// Creates a new default instance.
4250    pub fn new() -> Self {
4251        std::default::Default::default()
4252    }
4253
4254    /// Sets the value of [engine_versions][crate::model::ListEngineVersionsResponse::engine_versions].
4255    ///
4256    /// # Example
4257    /// ```ignore,no_run
4258    /// # use google_cloud_financialservices_v1::model::ListEngineVersionsResponse;
4259    /// use google_cloud_financialservices_v1::model::EngineVersion;
4260    /// let x = ListEngineVersionsResponse::new()
4261    ///     .set_engine_versions([
4262    ///         EngineVersion::default()/* use setters */,
4263    ///         EngineVersion::default()/* use (different) setters */,
4264    ///     ]);
4265    /// ```
4266    pub fn set_engine_versions<T, V>(mut self, v: T) -> Self
4267    where
4268        T: std::iter::IntoIterator<Item = V>,
4269        V: std::convert::Into<crate::model::EngineVersion>,
4270    {
4271        use std::iter::Iterator;
4272        self.engine_versions = v.into_iter().map(|i| i.into()).collect();
4273        self
4274    }
4275
4276    /// Sets the value of [next_page_token][crate::model::ListEngineVersionsResponse::next_page_token].
4277    ///
4278    /// # Example
4279    /// ```ignore,no_run
4280    /// # use google_cloud_financialservices_v1::model::ListEngineVersionsResponse;
4281    /// let x = ListEngineVersionsResponse::new().set_next_page_token("example");
4282    /// ```
4283    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4284        self.next_page_token = v.into();
4285        self
4286    }
4287
4288    /// Sets the value of [unreachable][crate::model::ListEngineVersionsResponse::unreachable].
4289    ///
4290    /// # Example
4291    /// ```ignore,no_run
4292    /// # use google_cloud_financialservices_v1::model::ListEngineVersionsResponse;
4293    /// let x = ListEngineVersionsResponse::new().set_unreachable(["a", "b", "c"]);
4294    /// ```
4295    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4296    where
4297        T: std::iter::IntoIterator<Item = V>,
4298        V: std::convert::Into<std::string::String>,
4299    {
4300        use std::iter::Iterator;
4301        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4302        self
4303    }
4304}
4305
4306impl wkt::message::Message for ListEngineVersionsResponse {
4307    fn typename() -> &'static str {
4308        "type.googleapis.com/google.cloud.financialservices.v1.ListEngineVersionsResponse"
4309    }
4310}
4311
4312#[doc(hidden)]
4313impl google_cloud_gax::paginator::internal::PageableResponse for ListEngineVersionsResponse {
4314    type PageItem = crate::model::EngineVersion;
4315
4316    fn items(self) -> std::vec::Vec<Self::PageItem> {
4317        self.engine_versions
4318    }
4319
4320    fn next_page_token(&self) -> std::string::String {
4321        use std::clone::Clone;
4322        self.next_page_token.clone()
4323    }
4324}
4325
4326/// Request for retrieving a specific EngineVersion resource.
4327#[derive(Clone, Default, PartialEq)]
4328#[non_exhaustive]
4329pub struct GetEngineVersionRequest {
4330    /// Required. The resource name of the EngineVersion
4331    pub name: std::string::String,
4332
4333    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4334}
4335
4336impl GetEngineVersionRequest {
4337    /// Creates a new default instance.
4338    pub fn new() -> Self {
4339        std::default::Default::default()
4340    }
4341
4342    /// Sets the value of [name][crate::model::GetEngineVersionRequest::name].
4343    ///
4344    /// # Example
4345    /// ```ignore,no_run
4346    /// # use google_cloud_financialservices_v1::model::GetEngineVersionRequest;
4347    /// # let project_num_id = "project_num_id";
4348    /// # let location_id = "location_id";
4349    /// # let instance_id = "instance_id";
4350    /// # let engine_version_id = "engine_version_id";
4351    /// let x = GetEngineVersionRequest::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/engineVersions/{engine_version_id}"));
4352    /// ```
4353    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4354        self.name = v.into();
4355        self
4356    }
4357}
4358
4359impl wkt::message::Message for GetEngineVersionRequest {
4360    fn typename() -> &'static str {
4361        "type.googleapis.com/google.cloud.financialservices.v1.GetEngineVersionRequest"
4362    }
4363}
4364
4365/// Instance is a container for the rest of API resources.
4366/// Only resources in the same instance can interact with each other.
4367/// Child resources inherit the location (data residency) and encryption (CMEK).
4368/// The location of the provided input and output in requests must match the
4369/// location of the instance.
4370#[derive(Clone, Default, PartialEq)]
4371#[non_exhaustive]
4372pub struct Instance {
4373    /// Output only. The full path to the Instance resource in this API.
4374    /// format: `projects/{project}/locations/{location}/instances/{instance}`
4375    pub name: std::string::String,
4376
4377    /// Output only. Timestamp when the Instance was created.
4378    /// Assigned by the server.
4379    pub create_time: std::option::Option<wkt::Timestamp>,
4380
4381    /// Output only. Timestamp when the Instance was last updated.
4382    /// Assigned by the server.
4383    pub update_time: std::option::Option<wkt::Timestamp>,
4384
4385    /// Output only. State of the instance.
4386    /// Assigned by the server.
4387    pub state: crate::model::instance::State,
4388
4389    /// Labels
4390    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4391
4392    /// Required. The KMS key name used for CMEK (encryption-at-rest).
4393    /// format:
4394    /// `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}`
4395    /// VPC-SC restrictions apply.
4396    pub kms_key: std::string::String,
4397
4398    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4399}
4400
4401impl Instance {
4402    /// Creates a new default instance.
4403    pub fn new() -> Self {
4404        std::default::Default::default()
4405    }
4406
4407    /// Sets the value of [name][crate::model::Instance::name].
4408    ///
4409    /// # Example
4410    /// ```ignore,no_run
4411    /// # use google_cloud_financialservices_v1::model::Instance;
4412    /// # let project_id = "project_id";
4413    /// # let location_id = "location_id";
4414    /// # let instance_id = "instance_id";
4415    /// let x = Instance::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
4416    /// ```
4417    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4418        self.name = v.into();
4419        self
4420    }
4421
4422    /// Sets the value of [create_time][crate::model::Instance::create_time].
4423    ///
4424    /// # Example
4425    /// ```ignore,no_run
4426    /// # use google_cloud_financialservices_v1::model::Instance;
4427    /// use wkt::Timestamp;
4428    /// let x = Instance::new().set_create_time(Timestamp::default()/* use setters */);
4429    /// ```
4430    pub fn set_create_time<T>(mut self, v: T) -> Self
4431    where
4432        T: std::convert::Into<wkt::Timestamp>,
4433    {
4434        self.create_time = std::option::Option::Some(v.into());
4435        self
4436    }
4437
4438    /// Sets or clears the value of [create_time][crate::model::Instance::create_time].
4439    ///
4440    /// # Example
4441    /// ```ignore,no_run
4442    /// # use google_cloud_financialservices_v1::model::Instance;
4443    /// use wkt::Timestamp;
4444    /// let x = Instance::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
4445    /// let x = Instance::new().set_or_clear_create_time(None::<Timestamp>);
4446    /// ```
4447    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4448    where
4449        T: std::convert::Into<wkt::Timestamp>,
4450    {
4451        self.create_time = v.map(|x| x.into());
4452        self
4453    }
4454
4455    /// Sets the value of [update_time][crate::model::Instance::update_time].
4456    ///
4457    /// # Example
4458    /// ```ignore,no_run
4459    /// # use google_cloud_financialservices_v1::model::Instance;
4460    /// use wkt::Timestamp;
4461    /// let x = Instance::new().set_update_time(Timestamp::default()/* use setters */);
4462    /// ```
4463    pub fn set_update_time<T>(mut self, v: T) -> Self
4464    where
4465        T: std::convert::Into<wkt::Timestamp>,
4466    {
4467        self.update_time = std::option::Option::Some(v.into());
4468        self
4469    }
4470
4471    /// Sets or clears the value of [update_time][crate::model::Instance::update_time].
4472    ///
4473    /// # Example
4474    /// ```ignore,no_run
4475    /// # use google_cloud_financialservices_v1::model::Instance;
4476    /// use wkt::Timestamp;
4477    /// let x = Instance::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
4478    /// let x = Instance::new().set_or_clear_update_time(None::<Timestamp>);
4479    /// ```
4480    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4481    where
4482        T: std::convert::Into<wkt::Timestamp>,
4483    {
4484        self.update_time = v.map(|x| x.into());
4485        self
4486    }
4487
4488    /// Sets the value of [state][crate::model::Instance::state].
4489    ///
4490    /// # Example
4491    /// ```ignore,no_run
4492    /// # use google_cloud_financialservices_v1::model::Instance;
4493    /// use google_cloud_financialservices_v1::model::instance::State;
4494    /// let x0 = Instance::new().set_state(State::Creating);
4495    /// let x1 = Instance::new().set_state(State::Active);
4496    /// let x2 = Instance::new().set_state(State::Updating);
4497    /// ```
4498    pub fn set_state<T: std::convert::Into<crate::model::instance::State>>(mut self, v: T) -> Self {
4499        self.state = v.into();
4500        self
4501    }
4502
4503    /// Sets the value of [labels][crate::model::Instance::labels].
4504    ///
4505    /// # Example
4506    /// ```ignore,no_run
4507    /// # use google_cloud_financialservices_v1::model::Instance;
4508    /// let x = Instance::new().set_labels([
4509    ///     ("key0", "abc"),
4510    ///     ("key1", "xyz"),
4511    /// ]);
4512    /// ```
4513    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4514    where
4515        T: std::iter::IntoIterator<Item = (K, V)>,
4516        K: std::convert::Into<std::string::String>,
4517        V: std::convert::Into<std::string::String>,
4518    {
4519        use std::iter::Iterator;
4520        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4521        self
4522    }
4523
4524    /// Sets the value of [kms_key][crate::model::Instance::kms_key].
4525    ///
4526    /// # Example
4527    /// ```ignore,no_run
4528    /// # use google_cloud_financialservices_v1::model::Instance;
4529    /// let x = Instance::new().set_kms_key("example");
4530    /// ```
4531    pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4532        self.kms_key = v.into();
4533        self
4534    }
4535}
4536
4537impl wkt::message::Message for Instance {
4538    fn typename() -> &'static str {
4539        "type.googleapis.com/google.cloud.financialservices.v1.Instance"
4540    }
4541}
4542
4543/// Defines additional types related to [Instance].
4544pub mod instance {
4545    #[allow(unused_imports)]
4546    use super::*;
4547
4548    /// The Resource State
4549    ///
4550    /// # Working with unknown values
4551    ///
4552    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4553    /// additional enum variants at any time. Adding new variants is not considered
4554    /// a breaking change. Applications should write their code in anticipation of:
4555    ///
4556    /// - New values appearing in future releases of the client library, **and**
4557    /// - New values received dynamically, without application changes.
4558    ///
4559    /// Please consult the [Working with enums] section in the user guide for some
4560    /// guidelines.
4561    ///
4562    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
4563    #[derive(Clone, Debug, PartialEq)]
4564    #[non_exhaustive]
4565    pub enum State {
4566        /// State is unspecified, should not occur.
4567        Unspecified,
4568        /// The resource has not finished being created.
4569        Creating,
4570        /// The resource is active/ready to be used.
4571        Active,
4572        /// The resource is in the process of being updated.
4573        Updating,
4574        /// The resource is in the process of being deleted.
4575        Deleting,
4576        /// If set, the enum was initialized with an unknown value.
4577        ///
4578        /// Applications can examine the value using [State::value] or
4579        /// [State::name].
4580        UnknownValue(state::UnknownValue),
4581    }
4582
4583    #[doc(hidden)]
4584    pub mod state {
4585        #[allow(unused_imports)]
4586        use super::*;
4587        #[derive(Clone, Debug, PartialEq)]
4588        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4589    }
4590
4591    impl State {
4592        /// Gets the enum value.
4593        ///
4594        /// Returns `None` if the enum contains an unknown value deserialized from
4595        /// the string representation of enums.
4596        pub fn value(&self) -> std::option::Option<i32> {
4597            match self {
4598                Self::Unspecified => std::option::Option::Some(0),
4599                Self::Creating => std::option::Option::Some(1),
4600                Self::Active => std::option::Option::Some(2),
4601                Self::Updating => std::option::Option::Some(3),
4602                Self::Deleting => std::option::Option::Some(4),
4603                Self::UnknownValue(u) => u.0.value(),
4604            }
4605        }
4606
4607        /// Gets the enum value as a string.
4608        ///
4609        /// Returns `None` if the enum contains an unknown value deserialized from
4610        /// the integer representation of enums.
4611        pub fn name(&self) -> std::option::Option<&str> {
4612            match self {
4613                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
4614                Self::Creating => std::option::Option::Some("CREATING"),
4615                Self::Active => std::option::Option::Some("ACTIVE"),
4616                Self::Updating => std::option::Option::Some("UPDATING"),
4617                Self::Deleting => std::option::Option::Some("DELETING"),
4618                Self::UnknownValue(u) => u.0.name(),
4619            }
4620        }
4621    }
4622
4623    impl std::default::Default for State {
4624        fn default() -> Self {
4625            use std::convert::From;
4626            Self::from(0)
4627        }
4628    }
4629
4630    impl std::fmt::Display for State {
4631        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4632            wkt::internal::display_enum(f, self.name(), self.value())
4633        }
4634    }
4635
4636    impl std::convert::From<i32> for State {
4637        fn from(value: i32) -> Self {
4638            match value {
4639                0 => Self::Unspecified,
4640                1 => Self::Creating,
4641                2 => Self::Active,
4642                3 => Self::Updating,
4643                4 => Self::Deleting,
4644                _ => Self::UnknownValue(state::UnknownValue(
4645                    wkt::internal::UnknownEnumValue::Integer(value),
4646                )),
4647            }
4648        }
4649    }
4650
4651    impl std::convert::From<&str> for State {
4652        fn from(value: &str) -> Self {
4653            use std::string::ToString;
4654            match value {
4655                "STATE_UNSPECIFIED" => Self::Unspecified,
4656                "CREATING" => Self::Creating,
4657                "ACTIVE" => Self::Active,
4658                "UPDATING" => Self::Updating,
4659                "DELETING" => Self::Deleting,
4660                _ => Self::UnknownValue(state::UnknownValue(
4661                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4662                )),
4663            }
4664        }
4665    }
4666
4667    impl serde::ser::Serialize for State {
4668        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4669        where
4670            S: serde::Serializer,
4671        {
4672            match self {
4673                Self::Unspecified => serializer.serialize_i32(0),
4674                Self::Creating => serializer.serialize_i32(1),
4675                Self::Active => serializer.serialize_i32(2),
4676                Self::Updating => serializer.serialize_i32(3),
4677                Self::Deleting => serializer.serialize_i32(4),
4678                Self::UnknownValue(u) => u.0.serialize(serializer),
4679            }
4680        }
4681    }
4682
4683    impl<'de> serde::de::Deserialize<'de> for State {
4684        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4685        where
4686            D: serde::Deserializer<'de>,
4687        {
4688            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
4689                ".google.cloud.financialservices.v1.Instance.State",
4690            ))
4691        }
4692    }
4693}
4694
4695/// Request for retrieving a paginated list of Instance resources that meet the
4696/// specified criteria.
4697#[derive(Clone, Default, PartialEq)]
4698#[non_exhaustive]
4699pub struct ListInstancesRequest {
4700    /// Required. The parent of the Instance is the location for that Instance.
4701    /// Every location has exactly one instance.
4702    pub parent: std::string::String,
4703
4704    /// The number of resources to be included in the response. The response
4705    /// contains a next_page_token, which can be used to retrieve the next page of
4706    /// resources.
4707    pub page_size: i32,
4708
4709    /// In case of paginated results, this is the token that was returned in the
4710    /// previous ListInstancesResponse. It should be copied here to retrieve the
4711    /// next page of resources. This will be empty for the first instance of
4712    /// ListInstancesRequest.
4713    pub page_token: std::string::String,
4714
4715    /// Specify a filter to narrow search results.
4716    pub filter: std::string::String,
4717
4718    /// Specify a field to use for ordering.
4719    pub order_by: std::string::String,
4720
4721    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4722}
4723
4724impl ListInstancesRequest {
4725    /// Creates a new default instance.
4726    pub fn new() -> Self {
4727        std::default::Default::default()
4728    }
4729
4730    /// Sets the value of [parent][crate::model::ListInstancesRequest::parent].
4731    ///
4732    /// # Example
4733    /// ```ignore,no_run
4734    /// # use google_cloud_financialservices_v1::model::ListInstancesRequest;
4735    /// let x = ListInstancesRequest::new().set_parent("example");
4736    /// ```
4737    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4738        self.parent = v.into();
4739        self
4740    }
4741
4742    /// Sets the value of [page_size][crate::model::ListInstancesRequest::page_size].
4743    ///
4744    /// # Example
4745    /// ```ignore,no_run
4746    /// # use google_cloud_financialservices_v1::model::ListInstancesRequest;
4747    /// let x = ListInstancesRequest::new().set_page_size(42);
4748    /// ```
4749    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4750        self.page_size = v.into();
4751        self
4752    }
4753
4754    /// Sets the value of [page_token][crate::model::ListInstancesRequest::page_token].
4755    ///
4756    /// # Example
4757    /// ```ignore,no_run
4758    /// # use google_cloud_financialservices_v1::model::ListInstancesRequest;
4759    /// let x = ListInstancesRequest::new().set_page_token("example");
4760    /// ```
4761    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4762        self.page_token = v.into();
4763        self
4764    }
4765
4766    /// Sets the value of [filter][crate::model::ListInstancesRequest::filter].
4767    ///
4768    /// # Example
4769    /// ```ignore,no_run
4770    /// # use google_cloud_financialservices_v1::model::ListInstancesRequest;
4771    /// let x = ListInstancesRequest::new().set_filter("example");
4772    /// ```
4773    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4774        self.filter = v.into();
4775        self
4776    }
4777
4778    /// Sets the value of [order_by][crate::model::ListInstancesRequest::order_by].
4779    ///
4780    /// # Example
4781    /// ```ignore,no_run
4782    /// # use google_cloud_financialservices_v1::model::ListInstancesRequest;
4783    /// let x = ListInstancesRequest::new().set_order_by("example");
4784    /// ```
4785    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4786        self.order_by = v.into();
4787        self
4788    }
4789}
4790
4791impl wkt::message::Message for ListInstancesRequest {
4792    fn typename() -> &'static str {
4793        "type.googleapis.com/google.cloud.financialservices.v1.ListInstancesRequest"
4794    }
4795}
4796
4797/// Response for retrieving a list of Instances
4798#[derive(Clone, Default, PartialEq)]
4799#[non_exhaustive]
4800pub struct ListInstancesResponse {
4801    /// List of Instance resources
4802    pub instances: std::vec::Vec<crate::model::Instance>,
4803
4804    /// This token should be passed to the next ListInstancesRequest to retrieve
4805    /// the next page of Instances.
4806    pub next_page_token: std::string::String,
4807
4808    /// Locations that could not be reached.
4809    pub unreachable: std::vec::Vec<std::string::String>,
4810
4811    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4812}
4813
4814impl ListInstancesResponse {
4815    /// Creates a new default instance.
4816    pub fn new() -> Self {
4817        std::default::Default::default()
4818    }
4819
4820    /// Sets the value of [instances][crate::model::ListInstancesResponse::instances].
4821    ///
4822    /// # Example
4823    /// ```ignore,no_run
4824    /// # use google_cloud_financialservices_v1::model::ListInstancesResponse;
4825    /// use google_cloud_financialservices_v1::model::Instance;
4826    /// let x = ListInstancesResponse::new()
4827    ///     .set_instances([
4828    ///         Instance::default()/* use setters */,
4829    ///         Instance::default()/* use (different) setters */,
4830    ///     ]);
4831    /// ```
4832    pub fn set_instances<T, V>(mut self, v: T) -> Self
4833    where
4834        T: std::iter::IntoIterator<Item = V>,
4835        V: std::convert::Into<crate::model::Instance>,
4836    {
4837        use std::iter::Iterator;
4838        self.instances = v.into_iter().map(|i| i.into()).collect();
4839        self
4840    }
4841
4842    /// Sets the value of [next_page_token][crate::model::ListInstancesResponse::next_page_token].
4843    ///
4844    /// # Example
4845    /// ```ignore,no_run
4846    /// # use google_cloud_financialservices_v1::model::ListInstancesResponse;
4847    /// let x = ListInstancesResponse::new().set_next_page_token("example");
4848    /// ```
4849    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4850        self.next_page_token = v.into();
4851        self
4852    }
4853
4854    /// Sets the value of [unreachable][crate::model::ListInstancesResponse::unreachable].
4855    ///
4856    /// # Example
4857    /// ```ignore,no_run
4858    /// # use google_cloud_financialservices_v1::model::ListInstancesResponse;
4859    /// let x = ListInstancesResponse::new().set_unreachable(["a", "b", "c"]);
4860    /// ```
4861    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4862    where
4863        T: std::iter::IntoIterator<Item = V>,
4864        V: std::convert::Into<std::string::String>,
4865    {
4866        use std::iter::Iterator;
4867        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4868        self
4869    }
4870}
4871
4872impl wkt::message::Message for ListInstancesResponse {
4873    fn typename() -> &'static str {
4874        "type.googleapis.com/google.cloud.financialservices.v1.ListInstancesResponse"
4875    }
4876}
4877
4878#[doc(hidden)]
4879impl google_cloud_gax::paginator::internal::PageableResponse for ListInstancesResponse {
4880    type PageItem = crate::model::Instance;
4881
4882    fn items(self) -> std::vec::Vec<Self::PageItem> {
4883        self.instances
4884    }
4885
4886    fn next_page_token(&self) -> std::string::String {
4887        use std::clone::Clone;
4888        self.next_page_token.clone()
4889    }
4890}
4891
4892/// Request for retrieving a specific Instance resource.
4893#[derive(Clone, Default, PartialEq)]
4894#[non_exhaustive]
4895pub struct GetInstanceRequest {
4896    /// Required. The resource name of the Instance.
4897    pub name: std::string::String,
4898
4899    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4900}
4901
4902impl GetInstanceRequest {
4903    /// Creates a new default instance.
4904    pub fn new() -> Self {
4905        std::default::Default::default()
4906    }
4907
4908    /// Sets the value of [name][crate::model::GetInstanceRequest::name].
4909    ///
4910    /// # Example
4911    /// ```ignore,no_run
4912    /// # use google_cloud_financialservices_v1::model::GetInstanceRequest;
4913    /// # let project_id = "project_id";
4914    /// # let location_id = "location_id";
4915    /// # let instance_id = "instance_id";
4916    /// let x = GetInstanceRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
4917    /// ```
4918    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4919        self.name = v.into();
4920        self
4921    }
4922}
4923
4924impl wkt::message::Message for GetInstanceRequest {
4925    fn typename() -> &'static str {
4926        "type.googleapis.com/google.cloud.financialservices.v1.GetInstanceRequest"
4927    }
4928}
4929
4930/// Request for creating a Instance resource.
4931#[derive(Clone, Default, PartialEq)]
4932#[non_exhaustive]
4933pub struct CreateInstanceRequest {
4934    /// Required. The parent of the Instance is the location for that Instance.
4935    /// Every location has exactly one instance.
4936    pub parent: std::string::String,
4937
4938    /// Required. The resource id of the instance.
4939    pub instance_id: std::string::String,
4940
4941    /// Required. The instance that will be created.
4942    pub instance: std::option::Option<crate::model::Instance>,
4943
4944    /// Optional. An optional request ID to identify requests. Specify a unique
4945    /// request ID so that if you must retry your request, the server will know to
4946    /// ignore the request if it has already been completed. The server will
4947    /// guarantee that for at least 60 minutes since the first request.
4948    ///
4949    /// For example, consider a situation where you make an initial request and the
4950    /// request times out. If you make the request again with the same request
4951    /// ID, the server can check if original operation with the same request ID
4952    /// was received, and if so, will ignore the second request. This prevents
4953    /// clients from accidentally creating duplicate commitments.
4954    ///
4955    /// The request ID must be a valid UUID with the exception that zero UUID is
4956    /// not supported (00000000-0000-0000-0000-000000000000).
4957    pub request_id: std::string::String,
4958
4959    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4960}
4961
4962impl CreateInstanceRequest {
4963    /// Creates a new default instance.
4964    pub fn new() -> Self {
4965        std::default::Default::default()
4966    }
4967
4968    /// Sets the value of [parent][crate::model::CreateInstanceRequest::parent].
4969    ///
4970    /// # Example
4971    /// ```ignore,no_run
4972    /// # use google_cloud_financialservices_v1::model::CreateInstanceRequest;
4973    /// let x = CreateInstanceRequest::new().set_parent("example");
4974    /// ```
4975    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4976        self.parent = v.into();
4977        self
4978    }
4979
4980    /// Sets the value of [instance_id][crate::model::CreateInstanceRequest::instance_id].
4981    ///
4982    /// # Example
4983    /// ```ignore,no_run
4984    /// # use google_cloud_financialservices_v1::model::CreateInstanceRequest;
4985    /// let x = CreateInstanceRequest::new().set_instance_id("example");
4986    /// ```
4987    pub fn set_instance_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4988        self.instance_id = v.into();
4989        self
4990    }
4991
4992    /// Sets the value of [instance][crate::model::CreateInstanceRequest::instance].
4993    ///
4994    /// # Example
4995    /// ```ignore,no_run
4996    /// # use google_cloud_financialservices_v1::model::CreateInstanceRequest;
4997    /// use google_cloud_financialservices_v1::model::Instance;
4998    /// let x = CreateInstanceRequest::new().set_instance(Instance::default()/* use setters */);
4999    /// ```
5000    pub fn set_instance<T>(mut self, v: T) -> Self
5001    where
5002        T: std::convert::Into<crate::model::Instance>,
5003    {
5004        self.instance = std::option::Option::Some(v.into());
5005        self
5006    }
5007
5008    /// Sets or clears the value of [instance][crate::model::CreateInstanceRequest::instance].
5009    ///
5010    /// # Example
5011    /// ```ignore,no_run
5012    /// # use google_cloud_financialservices_v1::model::CreateInstanceRequest;
5013    /// use google_cloud_financialservices_v1::model::Instance;
5014    /// let x = CreateInstanceRequest::new().set_or_clear_instance(Some(Instance::default()/* use setters */));
5015    /// let x = CreateInstanceRequest::new().set_or_clear_instance(None::<Instance>);
5016    /// ```
5017    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
5018    where
5019        T: std::convert::Into<crate::model::Instance>,
5020    {
5021        self.instance = v.map(|x| x.into());
5022        self
5023    }
5024
5025    /// Sets the value of [request_id][crate::model::CreateInstanceRequest::request_id].
5026    ///
5027    /// # Example
5028    /// ```ignore,no_run
5029    /// # use google_cloud_financialservices_v1::model::CreateInstanceRequest;
5030    /// let x = CreateInstanceRequest::new().set_request_id("example");
5031    /// ```
5032    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5033        self.request_id = v.into();
5034        self
5035    }
5036}
5037
5038impl wkt::message::Message for CreateInstanceRequest {
5039    fn typename() -> &'static str {
5040        "type.googleapis.com/google.cloud.financialservices.v1.CreateInstanceRequest"
5041    }
5042}
5043
5044/// Request for updating a Instance
5045#[derive(Clone, Default, PartialEq)]
5046#[non_exhaustive]
5047pub struct UpdateInstanceRequest {
5048    /// Optional. Field mask is used to specify the fields to be overwritten in the
5049    /// Instance resource by the update.
5050    /// The fields specified in the update_mask are relative to the resource, not
5051    /// the full request. A field will be overwritten if it is in the mask. If the
5052    /// user does not provide a mask then all fields will be overwritten.
5053    pub update_mask: std::option::Option<wkt::FieldMask>,
5054
5055    /// Required. The new value of the instance fields that will be updated
5056    /// according to the update_mask
5057    pub instance: std::option::Option<crate::model::Instance>,
5058
5059    /// Optional. An optional request ID to identify requests. Specify a unique
5060    /// request ID so that if you must retry your request, the server will know to
5061    /// ignore the request if it has already been completed. The server will
5062    /// guarantee that for at least 60 minutes since the first request.
5063    ///
5064    /// For example, consider a situation where you make an initial request and the
5065    /// request times out. If you make the request again with the same request
5066    /// ID, the server can check if original operation with the same request ID
5067    /// was received, and if so, will ignore the second request. This prevents
5068    /// clients from accidentally creating duplicate commitments.
5069    ///
5070    /// The request ID must be a valid UUID with the exception that zero UUID is
5071    /// not supported (00000000-0000-0000-0000-000000000000).
5072    pub request_id: std::string::String,
5073
5074    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5075}
5076
5077impl UpdateInstanceRequest {
5078    /// Creates a new default instance.
5079    pub fn new() -> Self {
5080        std::default::Default::default()
5081    }
5082
5083    /// Sets the value of [update_mask][crate::model::UpdateInstanceRequest::update_mask].
5084    ///
5085    /// # Example
5086    /// ```ignore,no_run
5087    /// # use google_cloud_financialservices_v1::model::UpdateInstanceRequest;
5088    /// use wkt::FieldMask;
5089    /// let x = UpdateInstanceRequest::new().set_update_mask(FieldMask::default()/* use setters */);
5090    /// ```
5091    pub fn set_update_mask<T>(mut self, v: T) -> Self
5092    where
5093        T: std::convert::Into<wkt::FieldMask>,
5094    {
5095        self.update_mask = std::option::Option::Some(v.into());
5096        self
5097    }
5098
5099    /// Sets or clears the value of [update_mask][crate::model::UpdateInstanceRequest::update_mask].
5100    ///
5101    /// # Example
5102    /// ```ignore,no_run
5103    /// # use google_cloud_financialservices_v1::model::UpdateInstanceRequest;
5104    /// use wkt::FieldMask;
5105    /// let x = UpdateInstanceRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5106    /// let x = UpdateInstanceRequest::new().set_or_clear_update_mask(None::<FieldMask>);
5107    /// ```
5108    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5109    where
5110        T: std::convert::Into<wkt::FieldMask>,
5111    {
5112        self.update_mask = v.map(|x| x.into());
5113        self
5114    }
5115
5116    /// Sets the value of [instance][crate::model::UpdateInstanceRequest::instance].
5117    ///
5118    /// # Example
5119    /// ```ignore,no_run
5120    /// # use google_cloud_financialservices_v1::model::UpdateInstanceRequest;
5121    /// use google_cloud_financialservices_v1::model::Instance;
5122    /// let x = UpdateInstanceRequest::new().set_instance(Instance::default()/* use setters */);
5123    /// ```
5124    pub fn set_instance<T>(mut self, v: T) -> Self
5125    where
5126        T: std::convert::Into<crate::model::Instance>,
5127    {
5128        self.instance = std::option::Option::Some(v.into());
5129        self
5130    }
5131
5132    /// Sets or clears the value of [instance][crate::model::UpdateInstanceRequest::instance].
5133    ///
5134    /// # Example
5135    /// ```ignore,no_run
5136    /// # use google_cloud_financialservices_v1::model::UpdateInstanceRequest;
5137    /// use google_cloud_financialservices_v1::model::Instance;
5138    /// let x = UpdateInstanceRequest::new().set_or_clear_instance(Some(Instance::default()/* use setters */));
5139    /// let x = UpdateInstanceRequest::new().set_or_clear_instance(None::<Instance>);
5140    /// ```
5141    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
5142    where
5143        T: std::convert::Into<crate::model::Instance>,
5144    {
5145        self.instance = v.map(|x| x.into());
5146        self
5147    }
5148
5149    /// Sets the value of [request_id][crate::model::UpdateInstanceRequest::request_id].
5150    ///
5151    /// # Example
5152    /// ```ignore,no_run
5153    /// # use google_cloud_financialservices_v1::model::UpdateInstanceRequest;
5154    /// let x = UpdateInstanceRequest::new().set_request_id("example");
5155    /// ```
5156    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5157        self.request_id = v.into();
5158        self
5159    }
5160}
5161
5162impl wkt::message::Message for UpdateInstanceRequest {
5163    fn typename() -> &'static str {
5164        "type.googleapis.com/google.cloud.financialservices.v1.UpdateInstanceRequest"
5165    }
5166}
5167
5168/// Request for deleting a Instance.
5169#[derive(Clone, Default, PartialEq)]
5170#[non_exhaustive]
5171pub struct DeleteInstanceRequest {
5172    /// Required. The resource name of the Instance.
5173    pub name: std::string::String,
5174
5175    /// Optional. An optional request ID to identify requests. Specify a unique
5176    /// request ID so that if you must retry your request, the server will know to
5177    /// ignore the request if it has already been completed. The server will
5178    /// guarantee that for at least 60 minutes after the first request.
5179    ///
5180    /// For example, consider a situation where you make an initial request and the
5181    /// request times out. If you make the request again with the same request
5182    /// ID, the server can check if original operation with the same request ID
5183    /// was received, and if so, will ignore the second request. This prevents
5184    /// clients from accidentally creating duplicate commitments.
5185    ///
5186    /// The request ID must be a valid UUID with the exception that zero UUID is
5187    /// not supported (00000000-0000-0000-0000-000000000000).
5188    pub request_id: std::string::String,
5189
5190    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5191}
5192
5193impl DeleteInstanceRequest {
5194    /// Creates a new default instance.
5195    pub fn new() -> Self {
5196        std::default::Default::default()
5197    }
5198
5199    /// Sets the value of [name][crate::model::DeleteInstanceRequest::name].
5200    ///
5201    /// # Example
5202    /// ```ignore,no_run
5203    /// # use google_cloud_financialservices_v1::model::DeleteInstanceRequest;
5204    /// # let project_id = "project_id";
5205    /// # let location_id = "location_id";
5206    /// # let instance_id = "instance_id";
5207    /// let x = DeleteInstanceRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
5208    /// ```
5209    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5210        self.name = v.into();
5211        self
5212    }
5213
5214    /// Sets the value of [request_id][crate::model::DeleteInstanceRequest::request_id].
5215    ///
5216    /// # Example
5217    /// ```ignore,no_run
5218    /// # use google_cloud_financialservices_v1::model::DeleteInstanceRequest;
5219    /// let x = DeleteInstanceRequest::new().set_request_id("example");
5220    /// ```
5221    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5222        self.request_id = v.into();
5223        self
5224    }
5225}
5226
5227impl wkt::message::Message for DeleteInstanceRequest {
5228    fn typename() -> &'static str {
5229        "type.googleapis.com/google.cloud.financialservices.v1.DeleteInstanceRequest"
5230    }
5231}
5232
5233/// Request for adding/removing registered parties from BigQuery tables
5234/// specified by the customer.
5235#[derive(Clone, Default, PartialEq)]
5236#[non_exhaustive]
5237pub struct ImportRegisteredPartiesRequest {
5238    /// Required. The full path to the Instance resource in this API.
5239    /// format: `projects/{project}/locations/{location}/instances/{instance}`
5240    pub name: std::string::String,
5241
5242    /// Optional. List of BigQuery tables. Union of tables will be taken if there
5243    /// is more than one table. VPC-SC restrictions apply. format:
5244    /// `bq://{project}.{bqDatasetID}.{bqTableID}` Use of `datasets` is preferred
5245    /// over the latter due to its simplicity and the reduced risk of errors
5246    /// `party_tables` and `datasets` must not be provided at the
5247    /// same time
5248    pub party_tables: std::vec::Vec<std::string::String>,
5249
5250    /// Required. Mode of the request.
5251    pub mode: crate::model::import_registered_parties_request::UpdateMode,
5252
5253    /// Optional. If the request will not register the parties, just determine what
5254    /// would happen.
5255    pub validate_only: bool,
5256
5257    /// Required. LineOfBusiness for the specified registered parties.
5258    pub line_of_business: crate::model::LineOfBusiness,
5259
5260    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5261}
5262
5263impl ImportRegisteredPartiesRequest {
5264    /// Creates a new default instance.
5265    pub fn new() -> Self {
5266        std::default::Default::default()
5267    }
5268
5269    /// Sets the value of [name][crate::model::ImportRegisteredPartiesRequest::name].
5270    ///
5271    /// # Example
5272    /// ```ignore,no_run
5273    /// # use google_cloud_financialservices_v1::model::ImportRegisteredPartiesRequest;
5274    /// # let project_id = "project_id";
5275    /// # let location_id = "location_id";
5276    /// # let instance_id = "instance_id";
5277    /// let x = ImportRegisteredPartiesRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
5278    /// ```
5279    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5280        self.name = v.into();
5281        self
5282    }
5283
5284    /// Sets the value of [party_tables][crate::model::ImportRegisteredPartiesRequest::party_tables].
5285    ///
5286    /// # Example
5287    /// ```ignore,no_run
5288    /// # use google_cloud_financialservices_v1::model::ImportRegisteredPartiesRequest;
5289    /// let x = ImportRegisteredPartiesRequest::new().set_party_tables(["a", "b", "c"]);
5290    /// ```
5291    pub fn set_party_tables<T, V>(mut self, v: T) -> Self
5292    where
5293        T: std::iter::IntoIterator<Item = V>,
5294        V: std::convert::Into<std::string::String>,
5295    {
5296        use std::iter::Iterator;
5297        self.party_tables = v.into_iter().map(|i| i.into()).collect();
5298        self
5299    }
5300
5301    /// Sets the value of [mode][crate::model::ImportRegisteredPartiesRequest::mode].
5302    ///
5303    /// # Example
5304    /// ```ignore,no_run
5305    /// # use google_cloud_financialservices_v1::model::ImportRegisteredPartiesRequest;
5306    /// use google_cloud_financialservices_v1::model::import_registered_parties_request::UpdateMode;
5307    /// let x0 = ImportRegisteredPartiesRequest::new().set_mode(UpdateMode::Replace);
5308    /// let x1 = ImportRegisteredPartiesRequest::new().set_mode(UpdateMode::Append);
5309    /// ```
5310    pub fn set_mode<
5311        T: std::convert::Into<crate::model::import_registered_parties_request::UpdateMode>,
5312    >(
5313        mut self,
5314        v: T,
5315    ) -> Self {
5316        self.mode = v.into();
5317        self
5318    }
5319
5320    /// Sets the value of [validate_only][crate::model::ImportRegisteredPartiesRequest::validate_only].
5321    ///
5322    /// # Example
5323    /// ```ignore,no_run
5324    /// # use google_cloud_financialservices_v1::model::ImportRegisteredPartiesRequest;
5325    /// let x = ImportRegisteredPartiesRequest::new().set_validate_only(true);
5326    /// ```
5327    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5328        self.validate_only = v.into();
5329        self
5330    }
5331
5332    /// Sets the value of [line_of_business][crate::model::ImportRegisteredPartiesRequest::line_of_business].
5333    ///
5334    /// # Example
5335    /// ```ignore,no_run
5336    /// # use google_cloud_financialservices_v1::model::ImportRegisteredPartiesRequest;
5337    /// use google_cloud_financialservices_v1::model::LineOfBusiness;
5338    /// let x0 = ImportRegisteredPartiesRequest::new().set_line_of_business(LineOfBusiness::Commercial);
5339    /// let x1 = ImportRegisteredPartiesRequest::new().set_line_of_business(LineOfBusiness::Retail);
5340    /// ```
5341    pub fn set_line_of_business<T: std::convert::Into<crate::model::LineOfBusiness>>(
5342        mut self,
5343        v: T,
5344    ) -> Self {
5345        self.line_of_business = v.into();
5346        self
5347    }
5348}
5349
5350impl wkt::message::Message for ImportRegisteredPartiesRequest {
5351    fn typename() -> &'static str {
5352        "type.googleapis.com/google.cloud.financialservices.v1.ImportRegisteredPartiesRequest"
5353    }
5354}
5355
5356/// Defines additional types related to [ImportRegisteredPartiesRequest].
5357pub mod import_registered_parties_request {
5358    #[allow(unused_imports)]
5359    use super::*;
5360
5361    /// UpdateMode controls the behavior for ImportRegisteredParties.
5362    ///
5363    /// # Working with unknown values
5364    ///
5365    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5366    /// additional enum variants at any time. Adding new variants is not considered
5367    /// a breaking change. Applications should write their code in anticipation of:
5368    ///
5369    /// - New values appearing in future releases of the client library, **and**
5370    /// - New values received dynamically, without application changes.
5371    ///
5372    /// Please consult the [Working with enums] section in the user guide for some
5373    /// guidelines.
5374    ///
5375    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
5376    #[derive(Clone, Debug, PartialEq)]
5377    #[non_exhaustive]
5378    pub enum UpdateMode {
5379        /// Default mode.
5380        Unspecified,
5381        /// Replace parties that are removable in Parties Table with new parties.
5382        Replace,
5383        /// Add new parties to Parties Table.
5384        Append,
5385        /// If set, the enum was initialized with an unknown value.
5386        ///
5387        /// Applications can examine the value using [UpdateMode::value] or
5388        /// [UpdateMode::name].
5389        UnknownValue(update_mode::UnknownValue),
5390    }
5391
5392    #[doc(hidden)]
5393    pub mod update_mode {
5394        #[allow(unused_imports)]
5395        use super::*;
5396        #[derive(Clone, Debug, PartialEq)]
5397        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5398    }
5399
5400    impl UpdateMode {
5401        /// Gets the enum value.
5402        ///
5403        /// Returns `None` if the enum contains an unknown value deserialized from
5404        /// the string representation of enums.
5405        pub fn value(&self) -> std::option::Option<i32> {
5406            match self {
5407                Self::Unspecified => std::option::Option::Some(0),
5408                Self::Replace => std::option::Option::Some(1),
5409                Self::Append => std::option::Option::Some(2),
5410                Self::UnknownValue(u) => u.0.value(),
5411            }
5412        }
5413
5414        /// Gets the enum value as a string.
5415        ///
5416        /// Returns `None` if the enum contains an unknown value deserialized from
5417        /// the integer representation of enums.
5418        pub fn name(&self) -> std::option::Option<&str> {
5419            match self {
5420                Self::Unspecified => std::option::Option::Some("UPDATE_MODE_UNSPECIFIED"),
5421                Self::Replace => std::option::Option::Some("REPLACE"),
5422                Self::Append => std::option::Option::Some("APPEND"),
5423                Self::UnknownValue(u) => u.0.name(),
5424            }
5425        }
5426    }
5427
5428    impl std::default::Default for UpdateMode {
5429        fn default() -> Self {
5430            use std::convert::From;
5431            Self::from(0)
5432        }
5433    }
5434
5435    impl std::fmt::Display for UpdateMode {
5436        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5437            wkt::internal::display_enum(f, self.name(), self.value())
5438        }
5439    }
5440
5441    impl std::convert::From<i32> for UpdateMode {
5442        fn from(value: i32) -> Self {
5443            match value {
5444                0 => Self::Unspecified,
5445                1 => Self::Replace,
5446                2 => Self::Append,
5447                _ => Self::UnknownValue(update_mode::UnknownValue(
5448                    wkt::internal::UnknownEnumValue::Integer(value),
5449                )),
5450            }
5451        }
5452    }
5453
5454    impl std::convert::From<&str> for UpdateMode {
5455        fn from(value: &str) -> Self {
5456            use std::string::ToString;
5457            match value {
5458                "UPDATE_MODE_UNSPECIFIED" => Self::Unspecified,
5459                "REPLACE" => Self::Replace,
5460                "APPEND" => Self::Append,
5461                _ => Self::UnknownValue(update_mode::UnknownValue(
5462                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5463                )),
5464            }
5465        }
5466    }
5467
5468    impl serde::ser::Serialize for UpdateMode {
5469        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5470        where
5471            S: serde::Serializer,
5472        {
5473            match self {
5474                Self::Unspecified => serializer.serialize_i32(0),
5475                Self::Replace => serializer.serialize_i32(1),
5476                Self::Append => serializer.serialize_i32(2),
5477                Self::UnknownValue(u) => u.0.serialize(serializer),
5478            }
5479        }
5480    }
5481
5482    impl<'de> serde::de::Deserialize<'de> for UpdateMode {
5483        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5484        where
5485            D: serde::Deserializer<'de>,
5486        {
5487            deserializer.deserialize_any(wkt::internal::EnumVisitor::<UpdateMode>::new(
5488                ".google.cloud.financialservices.v1.ImportRegisteredPartiesRequest.UpdateMode",
5489            ))
5490        }
5491    }
5492}
5493
5494/// Response for adding/removing registered parties from BigQuery tables.
5495#[derive(Clone, Default, PartialEq)]
5496#[non_exhaustive]
5497pub struct ImportRegisteredPartiesResponse {
5498    /// Number of parties added by this operation.
5499    pub parties_added: i64,
5500
5501    /// Number of parties removed by this operation.
5502    pub parties_removed: i64,
5503
5504    /// Total number of parties that are registered in this instance, after the
5505    /// update operation was completed.
5506    pub parties_total: i64,
5507
5508    /// Number of parties that failed to be removed by this operation.
5509    pub parties_failed_to_remove: i64,
5510
5511    #[allow(missing_docs)]
5512    pub parties_uptiered: i64,
5513
5514    /// Total number of parties that are downtiered in this instance
5515    pub parties_downtiered: i64,
5516
5517    /// Number of parties that failed to be downtiered
5518    pub parties_failed_to_downtier: i64,
5519
5520    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5521}
5522
5523impl ImportRegisteredPartiesResponse {
5524    /// Creates a new default instance.
5525    pub fn new() -> Self {
5526        std::default::Default::default()
5527    }
5528
5529    /// Sets the value of [parties_added][crate::model::ImportRegisteredPartiesResponse::parties_added].
5530    ///
5531    /// # Example
5532    /// ```ignore,no_run
5533    /// # use google_cloud_financialservices_v1::model::ImportRegisteredPartiesResponse;
5534    /// let x = ImportRegisteredPartiesResponse::new().set_parties_added(42);
5535    /// ```
5536    pub fn set_parties_added<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5537        self.parties_added = v.into();
5538        self
5539    }
5540
5541    /// Sets the value of [parties_removed][crate::model::ImportRegisteredPartiesResponse::parties_removed].
5542    ///
5543    /// # Example
5544    /// ```ignore,no_run
5545    /// # use google_cloud_financialservices_v1::model::ImportRegisteredPartiesResponse;
5546    /// let x = ImportRegisteredPartiesResponse::new().set_parties_removed(42);
5547    /// ```
5548    pub fn set_parties_removed<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5549        self.parties_removed = v.into();
5550        self
5551    }
5552
5553    /// Sets the value of [parties_total][crate::model::ImportRegisteredPartiesResponse::parties_total].
5554    ///
5555    /// # Example
5556    /// ```ignore,no_run
5557    /// # use google_cloud_financialservices_v1::model::ImportRegisteredPartiesResponse;
5558    /// let x = ImportRegisteredPartiesResponse::new().set_parties_total(42);
5559    /// ```
5560    pub fn set_parties_total<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5561        self.parties_total = v.into();
5562        self
5563    }
5564
5565    /// Sets the value of [parties_failed_to_remove][crate::model::ImportRegisteredPartiesResponse::parties_failed_to_remove].
5566    ///
5567    /// # Example
5568    /// ```ignore,no_run
5569    /// # use google_cloud_financialservices_v1::model::ImportRegisteredPartiesResponse;
5570    /// let x = ImportRegisteredPartiesResponse::new().set_parties_failed_to_remove(42);
5571    /// ```
5572    pub fn set_parties_failed_to_remove<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5573        self.parties_failed_to_remove = v.into();
5574        self
5575    }
5576
5577    /// Sets the value of [parties_uptiered][crate::model::ImportRegisteredPartiesResponse::parties_uptiered].
5578    ///
5579    /// # Example
5580    /// ```ignore,no_run
5581    /// # use google_cloud_financialservices_v1::model::ImportRegisteredPartiesResponse;
5582    /// let x = ImportRegisteredPartiesResponse::new().set_parties_uptiered(42);
5583    /// ```
5584    pub fn set_parties_uptiered<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5585        self.parties_uptiered = v.into();
5586        self
5587    }
5588
5589    /// Sets the value of [parties_downtiered][crate::model::ImportRegisteredPartiesResponse::parties_downtiered].
5590    ///
5591    /// # Example
5592    /// ```ignore,no_run
5593    /// # use google_cloud_financialservices_v1::model::ImportRegisteredPartiesResponse;
5594    /// let x = ImportRegisteredPartiesResponse::new().set_parties_downtiered(42);
5595    /// ```
5596    pub fn set_parties_downtiered<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5597        self.parties_downtiered = v.into();
5598        self
5599    }
5600
5601    /// Sets the value of [parties_failed_to_downtier][crate::model::ImportRegisteredPartiesResponse::parties_failed_to_downtier].
5602    ///
5603    /// # Example
5604    /// ```ignore,no_run
5605    /// # use google_cloud_financialservices_v1::model::ImportRegisteredPartiesResponse;
5606    /// let x = ImportRegisteredPartiesResponse::new().set_parties_failed_to_downtier(42);
5607    /// ```
5608    pub fn set_parties_failed_to_downtier<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
5609        self.parties_failed_to_downtier = v.into();
5610        self
5611    }
5612}
5613
5614impl wkt::message::Message for ImportRegisteredPartiesResponse {
5615    fn typename() -> &'static str {
5616        "type.googleapis.com/google.cloud.financialservices.v1.ImportRegisteredPartiesResponse"
5617    }
5618}
5619
5620/// Request to export a list of currently registered parties.
5621#[derive(Clone, Default, PartialEq)]
5622#[non_exhaustive]
5623pub struct ExportRegisteredPartiesRequest {
5624    /// Required. The full path to the Instance resource in this API.
5625    /// format: `projects/{project}/locations/{location}/instances/{instance}`
5626    pub name: std::string::String,
5627
5628    /// Required. The location to output the RegisteredParties.
5629    pub dataset: std::option::Option<crate::model::BigQueryDestination>,
5630
5631    /// Required. LineOfBusiness to get RegisteredParties from.
5632    pub line_of_business: crate::model::LineOfBusiness,
5633
5634    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5635}
5636
5637impl ExportRegisteredPartiesRequest {
5638    /// Creates a new default instance.
5639    pub fn new() -> Self {
5640        std::default::Default::default()
5641    }
5642
5643    /// Sets the value of [name][crate::model::ExportRegisteredPartiesRequest::name].
5644    ///
5645    /// # Example
5646    /// ```ignore,no_run
5647    /// # use google_cloud_financialservices_v1::model::ExportRegisteredPartiesRequest;
5648    /// # let project_id = "project_id";
5649    /// # let location_id = "location_id";
5650    /// # let instance_id = "instance_id";
5651    /// let x = ExportRegisteredPartiesRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
5652    /// ```
5653    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5654        self.name = v.into();
5655        self
5656    }
5657
5658    /// Sets the value of [dataset][crate::model::ExportRegisteredPartiesRequest::dataset].
5659    ///
5660    /// # Example
5661    /// ```ignore,no_run
5662    /// # use google_cloud_financialservices_v1::model::ExportRegisteredPartiesRequest;
5663    /// use google_cloud_financialservices_v1::model::BigQueryDestination;
5664    /// let x = ExportRegisteredPartiesRequest::new().set_dataset(BigQueryDestination::default()/* use setters */);
5665    /// ```
5666    pub fn set_dataset<T>(mut self, v: T) -> Self
5667    where
5668        T: std::convert::Into<crate::model::BigQueryDestination>,
5669    {
5670        self.dataset = std::option::Option::Some(v.into());
5671        self
5672    }
5673
5674    /// Sets or clears the value of [dataset][crate::model::ExportRegisteredPartiesRequest::dataset].
5675    ///
5676    /// # Example
5677    /// ```ignore,no_run
5678    /// # use google_cloud_financialservices_v1::model::ExportRegisteredPartiesRequest;
5679    /// use google_cloud_financialservices_v1::model::BigQueryDestination;
5680    /// let x = ExportRegisteredPartiesRequest::new().set_or_clear_dataset(Some(BigQueryDestination::default()/* use setters */));
5681    /// let x = ExportRegisteredPartiesRequest::new().set_or_clear_dataset(None::<BigQueryDestination>);
5682    /// ```
5683    pub fn set_or_clear_dataset<T>(mut self, v: std::option::Option<T>) -> Self
5684    where
5685        T: std::convert::Into<crate::model::BigQueryDestination>,
5686    {
5687        self.dataset = v.map(|x| x.into());
5688        self
5689    }
5690
5691    /// Sets the value of [line_of_business][crate::model::ExportRegisteredPartiesRequest::line_of_business].
5692    ///
5693    /// # Example
5694    /// ```ignore,no_run
5695    /// # use google_cloud_financialservices_v1::model::ExportRegisteredPartiesRequest;
5696    /// use google_cloud_financialservices_v1::model::LineOfBusiness;
5697    /// let x0 = ExportRegisteredPartiesRequest::new().set_line_of_business(LineOfBusiness::Commercial);
5698    /// let x1 = ExportRegisteredPartiesRequest::new().set_line_of_business(LineOfBusiness::Retail);
5699    /// ```
5700    pub fn set_line_of_business<T: std::convert::Into<crate::model::LineOfBusiness>>(
5701        mut self,
5702        v: T,
5703    ) -> Self {
5704        self.line_of_business = v.into();
5705        self
5706    }
5707}
5708
5709impl wkt::message::Message for ExportRegisteredPartiesRequest {
5710    fn typename() -> &'static str {
5711        "type.googleapis.com/google.cloud.financialservices.v1.ExportRegisteredPartiesRequest"
5712    }
5713}
5714
5715/// Response to export registered parties request.
5716#[derive(Clone, Default, PartialEq)]
5717#[non_exhaustive]
5718pub struct ExportRegisteredPartiesResponse {
5719    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5720}
5721
5722impl ExportRegisteredPartiesResponse {
5723    /// Creates a new default instance.
5724    pub fn new() -> Self {
5725        std::default::Default::default()
5726    }
5727}
5728
5729impl wkt::message::Message for ExportRegisteredPartiesResponse {
5730    fn typename() -> &'static str {
5731        "type.googleapis.com/google.cloud.financialservices.v1.ExportRegisteredPartiesResponse"
5732    }
5733}
5734
5735/// Model represents a trained model.
5736#[derive(Clone, Default, PartialEq)]
5737#[non_exhaustive]
5738pub struct Model {
5739    /// Output only. The resource name of the Model.
5740    /// format:
5741    /// `/projects/{project_num}/locations/{location}/instances/{instance}/models/{model}`
5742    pub name: std::string::String,
5743
5744    /// Output only. The timestamp of creation of this resource.
5745    pub create_time: std::option::Option<wkt::Timestamp>,
5746
5747    /// Output only. The timestamp of the most recent update of this resource.
5748    pub update_time: std::option::Option<wkt::Timestamp>,
5749
5750    /// Labels
5751    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5752
5753    /// Output only. State of the model (creating, active, deleting, etc.)
5754    pub state: crate::model::model::State,
5755
5756    /// Output only. The EngineVersion used in training this model.  This is output
5757    /// only, and is determined from the EngineConfig used.
5758    pub engine_version: std::string::String,
5759
5760    /// Required. The resource name of the EngineConfig the model training will be
5761    /// based on. Format:
5762    /// `/projects/{project_num}/locations/{location}/instances/{instance}/engineConfigs/{engineConfig}`
5763    pub engine_config: std::string::String,
5764
5765    /// Required. The resource name of the Primary Dataset used in this model
5766    /// training. For information about how primary and auxiliary datasets are
5767    /// used, refer to the engine version's documentation.  Format:
5768    /// `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}`
5769    pub primary_dataset: std::string::String,
5770
5771    /// Required. End_time specifies the latest time from which labels are used and
5772    /// from which data is used to generate features for training.  End_time should
5773    /// be no later than the end of the date_range of the dataset.
5774    pub end_time: std::option::Option<wkt::Timestamp>,
5775
5776    /// Output only. The line of business (Retail/Commercial) this model is used
5777    /// for. Determined by EngineConfig, cannot be set by user.
5778    pub line_of_business: crate::model::LineOfBusiness,
5779
5780    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5781}
5782
5783impl Model {
5784    /// Creates a new default instance.
5785    pub fn new() -> Self {
5786        std::default::Default::default()
5787    }
5788
5789    /// Sets the value of [name][crate::model::Model::name].
5790    ///
5791    /// # Example
5792    /// ```ignore,no_run
5793    /// # use google_cloud_financialservices_v1::model::Model;
5794    /// # let project_num_id = "project_num_id";
5795    /// # let location_id = "location_id";
5796    /// # let instance_id = "instance_id";
5797    /// # let model_id = "model_id";
5798    /// let x = Model::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/models/{model_id}"));
5799    /// ```
5800    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5801        self.name = v.into();
5802        self
5803    }
5804
5805    /// Sets the value of [create_time][crate::model::Model::create_time].
5806    ///
5807    /// # Example
5808    /// ```ignore,no_run
5809    /// # use google_cloud_financialservices_v1::model::Model;
5810    /// use wkt::Timestamp;
5811    /// let x = Model::new().set_create_time(Timestamp::default()/* use setters */);
5812    /// ```
5813    pub fn set_create_time<T>(mut self, v: T) -> Self
5814    where
5815        T: std::convert::Into<wkt::Timestamp>,
5816    {
5817        self.create_time = std::option::Option::Some(v.into());
5818        self
5819    }
5820
5821    /// Sets or clears the value of [create_time][crate::model::Model::create_time].
5822    ///
5823    /// # Example
5824    /// ```ignore,no_run
5825    /// # use google_cloud_financialservices_v1::model::Model;
5826    /// use wkt::Timestamp;
5827    /// let x = Model::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
5828    /// let x = Model::new().set_or_clear_create_time(None::<Timestamp>);
5829    /// ```
5830    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5831    where
5832        T: std::convert::Into<wkt::Timestamp>,
5833    {
5834        self.create_time = v.map(|x| x.into());
5835        self
5836    }
5837
5838    /// Sets the value of [update_time][crate::model::Model::update_time].
5839    ///
5840    /// # Example
5841    /// ```ignore,no_run
5842    /// # use google_cloud_financialservices_v1::model::Model;
5843    /// use wkt::Timestamp;
5844    /// let x = Model::new().set_update_time(Timestamp::default()/* use setters */);
5845    /// ```
5846    pub fn set_update_time<T>(mut self, v: T) -> Self
5847    where
5848        T: std::convert::Into<wkt::Timestamp>,
5849    {
5850        self.update_time = std::option::Option::Some(v.into());
5851        self
5852    }
5853
5854    /// Sets or clears the value of [update_time][crate::model::Model::update_time].
5855    ///
5856    /// # Example
5857    /// ```ignore,no_run
5858    /// # use google_cloud_financialservices_v1::model::Model;
5859    /// use wkt::Timestamp;
5860    /// let x = Model::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
5861    /// let x = Model::new().set_or_clear_update_time(None::<Timestamp>);
5862    /// ```
5863    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5864    where
5865        T: std::convert::Into<wkt::Timestamp>,
5866    {
5867        self.update_time = v.map(|x| x.into());
5868        self
5869    }
5870
5871    /// Sets the value of [labels][crate::model::Model::labels].
5872    ///
5873    /// # Example
5874    /// ```ignore,no_run
5875    /// # use google_cloud_financialservices_v1::model::Model;
5876    /// let x = Model::new().set_labels([
5877    ///     ("key0", "abc"),
5878    ///     ("key1", "xyz"),
5879    /// ]);
5880    /// ```
5881    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5882    where
5883        T: std::iter::IntoIterator<Item = (K, V)>,
5884        K: std::convert::Into<std::string::String>,
5885        V: std::convert::Into<std::string::String>,
5886    {
5887        use std::iter::Iterator;
5888        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5889        self
5890    }
5891
5892    /// Sets the value of [state][crate::model::Model::state].
5893    ///
5894    /// # Example
5895    /// ```ignore,no_run
5896    /// # use google_cloud_financialservices_v1::model::Model;
5897    /// use google_cloud_financialservices_v1::model::model::State;
5898    /// let x0 = Model::new().set_state(State::Creating);
5899    /// let x1 = Model::new().set_state(State::Active);
5900    /// let x2 = Model::new().set_state(State::Updating);
5901    /// ```
5902    pub fn set_state<T: std::convert::Into<crate::model::model::State>>(mut self, v: T) -> Self {
5903        self.state = v.into();
5904        self
5905    }
5906
5907    /// Sets the value of [engine_version][crate::model::Model::engine_version].
5908    ///
5909    /// # Example
5910    /// ```ignore,no_run
5911    /// # use google_cloud_financialservices_v1::model::Model;
5912    /// # let project_num_id = "project_num_id";
5913    /// # let location_id = "location_id";
5914    /// # let instance_id = "instance_id";
5915    /// # let engine_version_id = "engine_version_id";
5916    /// let x = Model::new().set_engine_version(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/engineVersions/{engine_version_id}"));
5917    /// ```
5918    pub fn set_engine_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5919        self.engine_version = v.into();
5920        self
5921    }
5922
5923    /// Sets the value of [engine_config][crate::model::Model::engine_config].
5924    ///
5925    /// # Example
5926    /// ```ignore,no_run
5927    /// # use google_cloud_financialservices_v1::model::Model;
5928    /// # let project_num_id = "project_num_id";
5929    /// # let location_id = "location_id";
5930    /// # let instance_id = "instance_id";
5931    /// # let engine_config_id = "engine_config_id";
5932    /// let x = Model::new().set_engine_config(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/engineConfigs/{engine_config_id}"));
5933    /// ```
5934    pub fn set_engine_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5935        self.engine_config = v.into();
5936        self
5937    }
5938
5939    /// Sets the value of [primary_dataset][crate::model::Model::primary_dataset].
5940    ///
5941    /// # Example
5942    /// ```ignore,no_run
5943    /// # use google_cloud_financialservices_v1::model::Model;
5944    /// # let project_num_id = "project_num_id";
5945    /// # let location_id = "location_id";
5946    /// # let instance_id = "instance_id";
5947    /// # let dataset_id = "dataset_id";
5948    /// let x = Model::new().set_primary_dataset(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/datasets/{dataset_id}"));
5949    /// ```
5950    pub fn set_primary_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5951        self.primary_dataset = v.into();
5952        self
5953    }
5954
5955    /// Sets the value of [end_time][crate::model::Model::end_time].
5956    ///
5957    /// # Example
5958    /// ```ignore,no_run
5959    /// # use google_cloud_financialservices_v1::model::Model;
5960    /// use wkt::Timestamp;
5961    /// let x = Model::new().set_end_time(Timestamp::default()/* use setters */);
5962    /// ```
5963    pub fn set_end_time<T>(mut self, v: T) -> Self
5964    where
5965        T: std::convert::Into<wkt::Timestamp>,
5966    {
5967        self.end_time = std::option::Option::Some(v.into());
5968        self
5969    }
5970
5971    /// Sets or clears the value of [end_time][crate::model::Model::end_time].
5972    ///
5973    /// # Example
5974    /// ```ignore,no_run
5975    /// # use google_cloud_financialservices_v1::model::Model;
5976    /// use wkt::Timestamp;
5977    /// let x = Model::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5978    /// let x = Model::new().set_or_clear_end_time(None::<Timestamp>);
5979    /// ```
5980    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5981    where
5982        T: std::convert::Into<wkt::Timestamp>,
5983    {
5984        self.end_time = v.map(|x| x.into());
5985        self
5986    }
5987
5988    /// Sets the value of [line_of_business][crate::model::Model::line_of_business].
5989    ///
5990    /// # Example
5991    /// ```ignore,no_run
5992    /// # use google_cloud_financialservices_v1::model::Model;
5993    /// use google_cloud_financialservices_v1::model::LineOfBusiness;
5994    /// let x0 = Model::new().set_line_of_business(LineOfBusiness::Commercial);
5995    /// let x1 = Model::new().set_line_of_business(LineOfBusiness::Retail);
5996    /// ```
5997    pub fn set_line_of_business<T: std::convert::Into<crate::model::LineOfBusiness>>(
5998        mut self,
5999        v: T,
6000    ) -> Self {
6001        self.line_of_business = v.into();
6002        self
6003    }
6004}
6005
6006impl wkt::message::Message for Model {
6007    fn typename() -> &'static str {
6008        "type.googleapis.com/google.cloud.financialservices.v1.Model"
6009    }
6010}
6011
6012/// Defines additional types related to [Model].
6013pub mod model {
6014    #[allow(unused_imports)]
6015    use super::*;
6016
6017    /// The possible states of a resource.
6018    ///
6019    /// # Working with unknown values
6020    ///
6021    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6022    /// additional enum variants at any time. Adding new variants is not considered
6023    /// a breaking change. Applications should write their code in anticipation of:
6024    ///
6025    /// - New values appearing in future releases of the client library, **and**
6026    /// - New values received dynamically, without application changes.
6027    ///
6028    /// Please consult the [Working with enums] section in the user guide for some
6029    /// guidelines.
6030    ///
6031    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
6032    #[derive(Clone, Debug, PartialEq)]
6033    #[non_exhaustive]
6034    pub enum State {
6035        /// State is unspecified, should not occur.
6036        Unspecified,
6037        /// The resource has not finished being created.
6038        Creating,
6039        /// The resource is active/ready to be used.
6040        Active,
6041        /// The resource is in the process of being updated.
6042        Updating,
6043        /// The resource is in the process of being deleted.
6044        Deleting,
6045        /// If set, the enum was initialized with an unknown value.
6046        ///
6047        /// Applications can examine the value using [State::value] or
6048        /// [State::name].
6049        UnknownValue(state::UnknownValue),
6050    }
6051
6052    #[doc(hidden)]
6053    pub mod state {
6054        #[allow(unused_imports)]
6055        use super::*;
6056        #[derive(Clone, Debug, PartialEq)]
6057        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6058    }
6059
6060    impl State {
6061        /// Gets the enum value.
6062        ///
6063        /// Returns `None` if the enum contains an unknown value deserialized from
6064        /// the string representation of enums.
6065        pub fn value(&self) -> std::option::Option<i32> {
6066            match self {
6067                Self::Unspecified => std::option::Option::Some(0),
6068                Self::Creating => std::option::Option::Some(1),
6069                Self::Active => std::option::Option::Some(2),
6070                Self::Updating => std::option::Option::Some(3),
6071                Self::Deleting => std::option::Option::Some(4),
6072                Self::UnknownValue(u) => u.0.value(),
6073            }
6074        }
6075
6076        /// Gets the enum value as a string.
6077        ///
6078        /// Returns `None` if the enum contains an unknown value deserialized from
6079        /// the integer representation of enums.
6080        pub fn name(&self) -> std::option::Option<&str> {
6081            match self {
6082                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
6083                Self::Creating => std::option::Option::Some("CREATING"),
6084                Self::Active => std::option::Option::Some("ACTIVE"),
6085                Self::Updating => std::option::Option::Some("UPDATING"),
6086                Self::Deleting => std::option::Option::Some("DELETING"),
6087                Self::UnknownValue(u) => u.0.name(),
6088            }
6089        }
6090    }
6091
6092    impl std::default::Default for State {
6093        fn default() -> Self {
6094            use std::convert::From;
6095            Self::from(0)
6096        }
6097    }
6098
6099    impl std::fmt::Display for State {
6100        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6101            wkt::internal::display_enum(f, self.name(), self.value())
6102        }
6103    }
6104
6105    impl std::convert::From<i32> for State {
6106        fn from(value: i32) -> Self {
6107            match value {
6108                0 => Self::Unspecified,
6109                1 => Self::Creating,
6110                2 => Self::Active,
6111                3 => Self::Updating,
6112                4 => Self::Deleting,
6113                _ => Self::UnknownValue(state::UnknownValue(
6114                    wkt::internal::UnknownEnumValue::Integer(value),
6115                )),
6116            }
6117        }
6118    }
6119
6120    impl std::convert::From<&str> for State {
6121        fn from(value: &str) -> Self {
6122            use std::string::ToString;
6123            match value {
6124                "STATE_UNSPECIFIED" => Self::Unspecified,
6125                "CREATING" => Self::Creating,
6126                "ACTIVE" => Self::Active,
6127                "UPDATING" => Self::Updating,
6128                "DELETING" => Self::Deleting,
6129                _ => Self::UnknownValue(state::UnknownValue(
6130                    wkt::internal::UnknownEnumValue::String(value.to_string()),
6131                )),
6132            }
6133        }
6134    }
6135
6136    impl serde::ser::Serialize for State {
6137        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6138        where
6139            S: serde::Serializer,
6140        {
6141            match self {
6142                Self::Unspecified => serializer.serialize_i32(0),
6143                Self::Creating => serializer.serialize_i32(1),
6144                Self::Active => serializer.serialize_i32(2),
6145                Self::Updating => serializer.serialize_i32(3),
6146                Self::Deleting => serializer.serialize_i32(4),
6147                Self::UnknownValue(u) => u.0.serialize(serializer),
6148            }
6149        }
6150    }
6151
6152    impl<'de> serde::de::Deserialize<'de> for State {
6153        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6154        where
6155            D: serde::Deserializer<'de>,
6156        {
6157            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
6158                ".google.cloud.financialservices.v1.Model.State",
6159            ))
6160        }
6161    }
6162}
6163
6164/// Request for retrieving a paginated list of Model resources that meet the
6165/// specified criteria.
6166#[derive(Clone, Default, PartialEq)]
6167#[non_exhaustive]
6168pub struct ListModelsRequest {
6169    /// Required. The parent of the Model is the Instance.
6170    pub parent: std::string::String,
6171
6172    /// The number of resources to be included in the response. The response
6173    /// contains a next_page_token, which can be used to retrieve the next page of
6174    /// resources.
6175    pub page_size: i32,
6176
6177    /// In case of paginated results, this is the token that was returned in the
6178    /// previous ListModelsResponse. It should be copied here to retrieve the next
6179    /// page of resources. Empty will give the first page of ListModelsRequest, and
6180    /// the last page will return an empty page_token.
6181    pub page_token: std::string::String,
6182
6183    /// Specify a filter to narrow search results.
6184    pub filter: std::string::String,
6185
6186    /// Specify a field to use for ordering.
6187    pub order_by: std::string::String,
6188
6189    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6190}
6191
6192impl ListModelsRequest {
6193    /// Creates a new default instance.
6194    pub fn new() -> Self {
6195        std::default::Default::default()
6196    }
6197
6198    /// Sets the value of [parent][crate::model::ListModelsRequest::parent].
6199    ///
6200    /// # Example
6201    /// ```ignore,no_run
6202    /// # use google_cloud_financialservices_v1::model::ListModelsRequest;
6203    /// # let project_id = "project_id";
6204    /// # let location_id = "location_id";
6205    /// # let instance_id = "instance_id";
6206    /// let x = ListModelsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
6207    /// ```
6208    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6209        self.parent = v.into();
6210        self
6211    }
6212
6213    /// Sets the value of [page_size][crate::model::ListModelsRequest::page_size].
6214    ///
6215    /// # Example
6216    /// ```ignore,no_run
6217    /// # use google_cloud_financialservices_v1::model::ListModelsRequest;
6218    /// let x = ListModelsRequest::new().set_page_size(42);
6219    /// ```
6220    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6221        self.page_size = v.into();
6222        self
6223    }
6224
6225    /// Sets the value of [page_token][crate::model::ListModelsRequest::page_token].
6226    ///
6227    /// # Example
6228    /// ```ignore,no_run
6229    /// # use google_cloud_financialservices_v1::model::ListModelsRequest;
6230    /// let x = ListModelsRequest::new().set_page_token("example");
6231    /// ```
6232    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6233        self.page_token = v.into();
6234        self
6235    }
6236
6237    /// Sets the value of [filter][crate::model::ListModelsRequest::filter].
6238    ///
6239    /// # Example
6240    /// ```ignore,no_run
6241    /// # use google_cloud_financialservices_v1::model::ListModelsRequest;
6242    /// let x = ListModelsRequest::new().set_filter("example");
6243    /// ```
6244    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6245        self.filter = v.into();
6246        self
6247    }
6248
6249    /// Sets the value of [order_by][crate::model::ListModelsRequest::order_by].
6250    ///
6251    /// # Example
6252    /// ```ignore,no_run
6253    /// # use google_cloud_financialservices_v1::model::ListModelsRequest;
6254    /// let x = ListModelsRequest::new().set_order_by("example");
6255    /// ```
6256    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6257        self.order_by = v.into();
6258        self
6259    }
6260}
6261
6262impl wkt::message::Message for ListModelsRequest {
6263    fn typename() -> &'static str {
6264        "type.googleapis.com/google.cloud.financialservices.v1.ListModelsRequest"
6265    }
6266}
6267
6268/// Response for retrieving a list of Models
6269#[derive(Clone, Default, PartialEq)]
6270#[non_exhaustive]
6271pub struct ListModelsResponse {
6272    /// List of Model resources
6273    pub models: std::vec::Vec<crate::model::Model>,
6274
6275    /// This token should be passed to the next ListModelsRequest to
6276    /// retrieve the next page of Models (empty indicicates we are done).
6277    pub next_page_token: std::string::String,
6278
6279    /// Locations that could not be reached.
6280    pub unreachable: std::vec::Vec<std::string::String>,
6281
6282    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6283}
6284
6285impl ListModelsResponse {
6286    /// Creates a new default instance.
6287    pub fn new() -> Self {
6288        std::default::Default::default()
6289    }
6290
6291    /// Sets the value of [models][crate::model::ListModelsResponse::models].
6292    ///
6293    /// # Example
6294    /// ```ignore,no_run
6295    /// # use google_cloud_financialservices_v1::model::ListModelsResponse;
6296    /// use google_cloud_financialservices_v1::model::Model;
6297    /// let x = ListModelsResponse::new()
6298    ///     .set_models([
6299    ///         Model::default()/* use setters */,
6300    ///         Model::default()/* use (different) setters */,
6301    ///     ]);
6302    /// ```
6303    pub fn set_models<T, V>(mut self, v: T) -> Self
6304    where
6305        T: std::iter::IntoIterator<Item = V>,
6306        V: std::convert::Into<crate::model::Model>,
6307    {
6308        use std::iter::Iterator;
6309        self.models = v.into_iter().map(|i| i.into()).collect();
6310        self
6311    }
6312
6313    /// Sets the value of [next_page_token][crate::model::ListModelsResponse::next_page_token].
6314    ///
6315    /// # Example
6316    /// ```ignore,no_run
6317    /// # use google_cloud_financialservices_v1::model::ListModelsResponse;
6318    /// let x = ListModelsResponse::new().set_next_page_token("example");
6319    /// ```
6320    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6321        self.next_page_token = v.into();
6322        self
6323    }
6324
6325    /// Sets the value of [unreachable][crate::model::ListModelsResponse::unreachable].
6326    ///
6327    /// # Example
6328    /// ```ignore,no_run
6329    /// # use google_cloud_financialservices_v1::model::ListModelsResponse;
6330    /// let x = ListModelsResponse::new().set_unreachable(["a", "b", "c"]);
6331    /// ```
6332    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6333    where
6334        T: std::iter::IntoIterator<Item = V>,
6335        V: std::convert::Into<std::string::String>,
6336    {
6337        use std::iter::Iterator;
6338        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6339        self
6340    }
6341}
6342
6343impl wkt::message::Message for ListModelsResponse {
6344    fn typename() -> &'static str {
6345        "type.googleapis.com/google.cloud.financialservices.v1.ListModelsResponse"
6346    }
6347}
6348
6349#[doc(hidden)]
6350impl google_cloud_gax::paginator::internal::PageableResponse for ListModelsResponse {
6351    type PageItem = crate::model::Model;
6352
6353    fn items(self) -> std::vec::Vec<Self::PageItem> {
6354        self.models
6355    }
6356
6357    fn next_page_token(&self) -> std::string::String {
6358        use std::clone::Clone;
6359        self.next_page_token.clone()
6360    }
6361}
6362
6363/// Request for retrieving a specific Model resource.
6364#[derive(Clone, Default, PartialEq)]
6365#[non_exhaustive]
6366pub struct GetModelRequest {
6367    /// Required. The resource name of the Model
6368    pub name: std::string::String,
6369
6370    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6371}
6372
6373impl GetModelRequest {
6374    /// Creates a new default instance.
6375    pub fn new() -> Self {
6376        std::default::Default::default()
6377    }
6378
6379    /// Sets the value of [name][crate::model::GetModelRequest::name].
6380    ///
6381    /// # Example
6382    /// ```ignore,no_run
6383    /// # use google_cloud_financialservices_v1::model::GetModelRequest;
6384    /// # let project_num_id = "project_num_id";
6385    /// # let location_id = "location_id";
6386    /// # let instance_id = "instance_id";
6387    /// # let model_id = "model_id";
6388    /// let x = GetModelRequest::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/models/{model_id}"));
6389    /// ```
6390    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6391        self.name = v.into();
6392        self
6393    }
6394}
6395
6396impl wkt::message::Message for GetModelRequest {
6397    fn typename() -> &'static str {
6398        "type.googleapis.com/google.cloud.financialservices.v1.GetModelRequest"
6399    }
6400}
6401
6402/// Request for creating a Model resource.
6403#[derive(Clone, Default, PartialEq)]
6404#[non_exhaustive]
6405pub struct CreateModelRequest {
6406    /// Required. The parent of the Model is the Instance.
6407    pub parent: std::string::String,
6408
6409    /// Required. The resource id of the Model
6410    pub model_id: std::string::String,
6411
6412    /// Required. The Model that will be created.
6413    pub model: std::option::Option<crate::model::Model>,
6414
6415    /// Optional. An optional request ID to identify requests. Specify a unique
6416    /// request ID so that if you must retry your request, the server will know to
6417    /// ignore the request if it has already been completed. The server will
6418    /// guarantee that for at least 60 minutes since the first request.
6419    ///
6420    /// For example, consider a situation where you make an initial request and the
6421    /// request times out. If you make the request again with the same request
6422    /// ID, the server can check if original operation with the same request ID
6423    /// was received, and if so, will ignore the second request. This prevents
6424    /// clients from accidentally creating duplicate commitments.
6425    ///
6426    /// The request ID must be a valid UUID with the exception that zero UUID is
6427    /// not supported (00000000-0000-0000-0000-000000000000).
6428    pub request_id: std::string::String,
6429
6430    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6431}
6432
6433impl CreateModelRequest {
6434    /// Creates a new default instance.
6435    pub fn new() -> Self {
6436        std::default::Default::default()
6437    }
6438
6439    /// Sets the value of [parent][crate::model::CreateModelRequest::parent].
6440    ///
6441    /// # Example
6442    /// ```ignore,no_run
6443    /// # use google_cloud_financialservices_v1::model::CreateModelRequest;
6444    /// # let project_id = "project_id";
6445    /// # let location_id = "location_id";
6446    /// # let instance_id = "instance_id";
6447    /// let x = CreateModelRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
6448    /// ```
6449    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6450        self.parent = v.into();
6451        self
6452    }
6453
6454    /// Sets the value of [model_id][crate::model::CreateModelRequest::model_id].
6455    ///
6456    /// # Example
6457    /// ```ignore,no_run
6458    /// # use google_cloud_financialservices_v1::model::CreateModelRequest;
6459    /// let x = CreateModelRequest::new().set_model_id("example");
6460    /// ```
6461    pub fn set_model_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6462        self.model_id = v.into();
6463        self
6464    }
6465
6466    /// Sets the value of [model][crate::model::CreateModelRequest::model].
6467    ///
6468    /// # Example
6469    /// ```ignore,no_run
6470    /// # use google_cloud_financialservices_v1::model::CreateModelRequest;
6471    /// use google_cloud_financialservices_v1::model::Model;
6472    /// let x = CreateModelRequest::new().set_model(Model::default()/* use setters */);
6473    /// ```
6474    pub fn set_model<T>(mut self, v: T) -> Self
6475    where
6476        T: std::convert::Into<crate::model::Model>,
6477    {
6478        self.model = std::option::Option::Some(v.into());
6479        self
6480    }
6481
6482    /// Sets or clears the value of [model][crate::model::CreateModelRequest::model].
6483    ///
6484    /// # Example
6485    /// ```ignore,no_run
6486    /// # use google_cloud_financialservices_v1::model::CreateModelRequest;
6487    /// use google_cloud_financialservices_v1::model::Model;
6488    /// let x = CreateModelRequest::new().set_or_clear_model(Some(Model::default()/* use setters */));
6489    /// let x = CreateModelRequest::new().set_or_clear_model(None::<Model>);
6490    /// ```
6491    pub fn set_or_clear_model<T>(mut self, v: std::option::Option<T>) -> Self
6492    where
6493        T: std::convert::Into<crate::model::Model>,
6494    {
6495        self.model = v.map(|x| x.into());
6496        self
6497    }
6498
6499    /// Sets the value of [request_id][crate::model::CreateModelRequest::request_id].
6500    ///
6501    /// # Example
6502    /// ```ignore,no_run
6503    /// # use google_cloud_financialservices_v1::model::CreateModelRequest;
6504    /// let x = CreateModelRequest::new().set_request_id("example");
6505    /// ```
6506    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6507        self.request_id = v.into();
6508        self
6509    }
6510}
6511
6512impl wkt::message::Message for CreateModelRequest {
6513    fn typename() -> &'static str {
6514        "type.googleapis.com/google.cloud.financialservices.v1.CreateModelRequest"
6515    }
6516}
6517
6518/// Request for updating a Model
6519#[derive(Clone, Default, PartialEq)]
6520#[non_exhaustive]
6521pub struct UpdateModelRequest {
6522    /// Optional. Field mask is used to specify the fields to be overwritten in the
6523    /// Model resource by the update.
6524    /// The fields specified in the update_mask are relative to the resource, not
6525    /// the full request. A field will be overwritten if it is in the mask. If the
6526    /// user does not provide a mask then all fields will be overwritten.
6527    pub update_mask: std::option::Option<wkt::FieldMask>,
6528
6529    /// Required. The new value of the Model fields that will be updated according
6530    /// to the update_mask.
6531    pub model: std::option::Option<crate::model::Model>,
6532
6533    /// Optional. An optional request ID to identify requests. Specify a unique
6534    /// request ID so that if you must retry your request, the server will know to
6535    /// ignore the request if it has already been completed. The server will
6536    /// guarantee that for at least 60 minutes since the first request.
6537    ///
6538    /// For example, consider a situation where you make an initial request and the
6539    /// request times out. If you make the request again with the same request
6540    /// ID, the server can check if original operation with the same request ID
6541    /// was received, and if so, will ignore the second request. This prevents
6542    /// clients from accidentally creating duplicate commitments.
6543    ///
6544    /// The request ID must be a valid UUID with the exception that zero UUID is
6545    /// not supported (00000000-0000-0000-0000-000000000000).
6546    pub request_id: std::string::String,
6547
6548    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6549}
6550
6551impl UpdateModelRequest {
6552    /// Creates a new default instance.
6553    pub fn new() -> Self {
6554        std::default::Default::default()
6555    }
6556
6557    /// Sets the value of [update_mask][crate::model::UpdateModelRequest::update_mask].
6558    ///
6559    /// # Example
6560    /// ```ignore,no_run
6561    /// # use google_cloud_financialservices_v1::model::UpdateModelRequest;
6562    /// use wkt::FieldMask;
6563    /// let x = UpdateModelRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6564    /// ```
6565    pub fn set_update_mask<T>(mut self, v: T) -> Self
6566    where
6567        T: std::convert::Into<wkt::FieldMask>,
6568    {
6569        self.update_mask = std::option::Option::Some(v.into());
6570        self
6571    }
6572
6573    /// Sets or clears the value of [update_mask][crate::model::UpdateModelRequest::update_mask].
6574    ///
6575    /// # Example
6576    /// ```ignore,no_run
6577    /// # use google_cloud_financialservices_v1::model::UpdateModelRequest;
6578    /// use wkt::FieldMask;
6579    /// let x = UpdateModelRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6580    /// let x = UpdateModelRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6581    /// ```
6582    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6583    where
6584        T: std::convert::Into<wkt::FieldMask>,
6585    {
6586        self.update_mask = v.map(|x| x.into());
6587        self
6588    }
6589
6590    /// Sets the value of [model][crate::model::UpdateModelRequest::model].
6591    ///
6592    /// # Example
6593    /// ```ignore,no_run
6594    /// # use google_cloud_financialservices_v1::model::UpdateModelRequest;
6595    /// use google_cloud_financialservices_v1::model::Model;
6596    /// let x = UpdateModelRequest::new().set_model(Model::default()/* use setters */);
6597    /// ```
6598    pub fn set_model<T>(mut self, v: T) -> Self
6599    where
6600        T: std::convert::Into<crate::model::Model>,
6601    {
6602        self.model = std::option::Option::Some(v.into());
6603        self
6604    }
6605
6606    /// Sets or clears the value of [model][crate::model::UpdateModelRequest::model].
6607    ///
6608    /// # Example
6609    /// ```ignore,no_run
6610    /// # use google_cloud_financialservices_v1::model::UpdateModelRequest;
6611    /// use google_cloud_financialservices_v1::model::Model;
6612    /// let x = UpdateModelRequest::new().set_or_clear_model(Some(Model::default()/* use setters */));
6613    /// let x = UpdateModelRequest::new().set_or_clear_model(None::<Model>);
6614    /// ```
6615    pub fn set_or_clear_model<T>(mut self, v: std::option::Option<T>) -> Self
6616    where
6617        T: std::convert::Into<crate::model::Model>,
6618    {
6619        self.model = v.map(|x| x.into());
6620        self
6621    }
6622
6623    /// Sets the value of [request_id][crate::model::UpdateModelRequest::request_id].
6624    ///
6625    /// # Example
6626    /// ```ignore,no_run
6627    /// # use google_cloud_financialservices_v1::model::UpdateModelRequest;
6628    /// let x = UpdateModelRequest::new().set_request_id("example");
6629    /// ```
6630    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6631        self.request_id = v.into();
6632        self
6633    }
6634}
6635
6636impl wkt::message::Message for UpdateModelRequest {
6637    fn typename() -> &'static str {
6638        "type.googleapis.com/google.cloud.financialservices.v1.UpdateModelRequest"
6639    }
6640}
6641
6642/// Request for deleting a Model.
6643#[derive(Clone, Default, PartialEq)]
6644#[non_exhaustive]
6645pub struct DeleteModelRequest {
6646    /// Required. The resource name of the Model.
6647    pub name: std::string::String,
6648
6649    /// Optional. An optional request ID to identify requests. Specify a unique
6650    /// request ID so that if you must retry your request, the server will know to
6651    /// ignore the request if it has already been completed. The server will
6652    /// guarantee that for at least 60 minutes after the first request.
6653    ///
6654    /// For example, consider a situation where you make an initial request and the
6655    /// request times out. If you make the request again with the same request
6656    /// ID, the server can check if original operation with the same request ID
6657    /// was received, and if so, will ignore the second request. This prevents
6658    /// clients from accidentally creating duplicate commitments.
6659    ///
6660    /// The request ID must be a valid UUID with the exception that zero UUID is
6661    /// not supported (00000000-0000-0000-0000-000000000000).
6662    pub request_id: std::string::String,
6663
6664    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6665}
6666
6667impl DeleteModelRequest {
6668    /// Creates a new default instance.
6669    pub fn new() -> Self {
6670        std::default::Default::default()
6671    }
6672
6673    /// Sets the value of [name][crate::model::DeleteModelRequest::name].
6674    ///
6675    /// # Example
6676    /// ```ignore,no_run
6677    /// # use google_cloud_financialservices_v1::model::DeleteModelRequest;
6678    /// # let project_num_id = "project_num_id";
6679    /// # let location_id = "location_id";
6680    /// # let instance_id = "instance_id";
6681    /// # let model_id = "model_id";
6682    /// let x = DeleteModelRequest::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/models/{model_id}"));
6683    /// ```
6684    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6685        self.name = v.into();
6686        self
6687    }
6688
6689    /// Sets the value of [request_id][crate::model::DeleteModelRequest::request_id].
6690    ///
6691    /// # Example
6692    /// ```ignore,no_run
6693    /// # use google_cloud_financialservices_v1::model::DeleteModelRequest;
6694    /// let x = DeleteModelRequest::new().set_request_id("example");
6695    /// ```
6696    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6697        self.request_id = v.into();
6698        self
6699    }
6700}
6701
6702impl wkt::message::Message for DeleteModelRequest {
6703    fn typename() -> &'static str {
6704        "type.googleapis.com/google.cloud.financialservices.v1.DeleteModelRequest"
6705    }
6706}
6707
6708/// Request for exporting Model metadata.
6709#[derive(Clone, Default, PartialEq)]
6710#[non_exhaustive]
6711pub struct ExportModelMetadataRequest {
6712    /// Required. The resource name of the Model.
6713    pub model: std::string::String,
6714
6715    /// Required. BigQuery output where the metadata will be written.
6716    pub structured_metadata_destination: std::option::Option<crate::model::BigQueryDestination>,
6717
6718    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6719}
6720
6721impl ExportModelMetadataRequest {
6722    /// Creates a new default instance.
6723    pub fn new() -> Self {
6724        std::default::Default::default()
6725    }
6726
6727    /// Sets the value of [model][crate::model::ExportModelMetadataRequest::model].
6728    ///
6729    /// # Example
6730    /// ```ignore,no_run
6731    /// # use google_cloud_financialservices_v1::model::ExportModelMetadataRequest;
6732    /// # let project_num_id = "project_num_id";
6733    /// # let location_id = "location_id";
6734    /// # let instance_id = "instance_id";
6735    /// # let model_id = "model_id";
6736    /// let x = ExportModelMetadataRequest::new().set_model(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/models/{model_id}"));
6737    /// ```
6738    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6739        self.model = v.into();
6740        self
6741    }
6742
6743    /// Sets the value of [structured_metadata_destination][crate::model::ExportModelMetadataRequest::structured_metadata_destination].
6744    ///
6745    /// # Example
6746    /// ```ignore,no_run
6747    /// # use google_cloud_financialservices_v1::model::ExportModelMetadataRequest;
6748    /// use google_cloud_financialservices_v1::model::BigQueryDestination;
6749    /// let x = ExportModelMetadataRequest::new().set_structured_metadata_destination(BigQueryDestination::default()/* use setters */);
6750    /// ```
6751    pub fn set_structured_metadata_destination<T>(mut self, v: T) -> Self
6752    where
6753        T: std::convert::Into<crate::model::BigQueryDestination>,
6754    {
6755        self.structured_metadata_destination = std::option::Option::Some(v.into());
6756        self
6757    }
6758
6759    /// Sets or clears the value of [structured_metadata_destination][crate::model::ExportModelMetadataRequest::structured_metadata_destination].
6760    ///
6761    /// # Example
6762    /// ```ignore,no_run
6763    /// # use google_cloud_financialservices_v1::model::ExportModelMetadataRequest;
6764    /// use google_cloud_financialservices_v1::model::BigQueryDestination;
6765    /// let x = ExportModelMetadataRequest::new().set_or_clear_structured_metadata_destination(Some(BigQueryDestination::default()/* use setters */));
6766    /// let x = ExportModelMetadataRequest::new().set_or_clear_structured_metadata_destination(None::<BigQueryDestination>);
6767    /// ```
6768    pub fn set_or_clear_structured_metadata_destination<T>(
6769        mut self,
6770        v: std::option::Option<T>,
6771    ) -> Self
6772    where
6773        T: std::convert::Into<crate::model::BigQueryDestination>,
6774    {
6775        self.structured_metadata_destination = v.map(|x| x.into());
6776        self
6777    }
6778}
6779
6780impl wkt::message::Message for ExportModelMetadataRequest {
6781    fn typename() -> &'static str {
6782        "type.googleapis.com/google.cloud.financialservices.v1.ExportModelMetadataRequest"
6783    }
6784}
6785
6786/// Response for exporting Model metadata.
6787#[derive(Clone, Default, PartialEq)]
6788#[non_exhaustive]
6789pub struct ExportModelMetadataResponse {
6790    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6791}
6792
6793impl ExportModelMetadataResponse {
6794    /// Creates a new default instance.
6795    pub fn new() -> Self {
6796        std::default::Default::default()
6797    }
6798}
6799
6800impl wkt::message::Message for ExportModelMetadataResponse {
6801    fn typename() -> &'static str {
6802        "type.googleapis.com/google.cloud.financialservices.v1.ExportModelMetadataResponse"
6803    }
6804}
6805
6806/// PredictionResult is the result of using a model to create predictions.
6807#[derive(Clone, Default, PartialEq)]
6808#[non_exhaustive]
6809pub struct PredictionResult {
6810    /// Output only. The resource name of the PredictionResult.
6811    /// format:
6812    /// `/projects/{project_num}/locations/{location}/instances/{instance}/predictionResults/{prediction_result}`
6813    pub name: std::string::String,
6814
6815    /// Output only. The timestamp of creation of this resource.
6816    pub create_time: std::option::Option<wkt::Timestamp>,
6817
6818    /// Output only. The timestamp of the most recent update of this resource.
6819    pub update_time: std::option::Option<wkt::Timestamp>,
6820
6821    /// Labels
6822    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
6823
6824    /// Output only. State of the PredictionResult (creating, active, deleting,
6825    /// etc.)
6826    pub state: crate::model::prediction_result::State,
6827
6828    /// Required. The resource name of the Dataset to do predictions on
6829    /// Format:
6830    /// `/projects/{project_num}/locations/{location}/instances/{instance}/dataset/{dataset_id}`
6831    pub dataset: std::string::String,
6832
6833    /// Required. The resource name of the Model to use to use to make predictions
6834    /// Format:
6835    /// `/projects/{project_num}/locations/{location}/instances/{instance}/models/{model}`
6836    pub model: std::string::String,
6837
6838    /// Required. Specifies the latest time from which data is used to generate
6839    /// features for predictions.  This time should be no later than the end of the
6840    /// [date_range][google.cloud.financialservices.v1.Dataset.date_range] of the
6841    /// dataset.
6842    ///
6843    /// [google.cloud.financialservices.v1.Dataset.date_range]: crate::model::Dataset::date_range
6844    pub end_time: std::option::Option<wkt::Timestamp>,
6845
6846    /// The number of consecutive months to produce predictions for, ending with
6847    /// the last full month prior to
6848    /// [end_time][google.cloud.financialservices.v1.PredictionResult.end_time]
6849    /// according to the dataset's timezone.
6850    ///
6851    /// [google.cloud.financialservices.v1.PredictionResult.end_time]: crate::model::PredictionResult::end_time
6852    pub prediction_periods: i32,
6853
6854    /// Required. Where to write the output of the predictions.
6855    pub outputs: std::option::Option<crate::model::prediction_result::Outputs>,
6856
6857    /// Output only. The line of business (Retail/Commercial) this prediction is
6858    /// for. Determined by Model, cannot be set by user.
6859    pub line_of_business: crate::model::LineOfBusiness,
6860
6861    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6862}
6863
6864impl PredictionResult {
6865    /// Creates a new default instance.
6866    pub fn new() -> Self {
6867        std::default::Default::default()
6868    }
6869
6870    /// Sets the value of [name][crate::model::PredictionResult::name].
6871    ///
6872    /// # Example
6873    /// ```ignore,no_run
6874    /// # use google_cloud_financialservices_v1::model::PredictionResult;
6875    /// # let project_num_id = "project_num_id";
6876    /// # let location_id = "location_id";
6877    /// # let instance_id = "instance_id";
6878    /// # let prediction_result_id = "prediction_result_id";
6879    /// let x = PredictionResult::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/predictionResults/{prediction_result_id}"));
6880    /// ```
6881    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6882        self.name = v.into();
6883        self
6884    }
6885
6886    /// Sets the value of [create_time][crate::model::PredictionResult::create_time].
6887    ///
6888    /// # Example
6889    /// ```ignore,no_run
6890    /// # use google_cloud_financialservices_v1::model::PredictionResult;
6891    /// use wkt::Timestamp;
6892    /// let x = PredictionResult::new().set_create_time(Timestamp::default()/* use setters */);
6893    /// ```
6894    pub fn set_create_time<T>(mut self, v: T) -> Self
6895    where
6896        T: std::convert::Into<wkt::Timestamp>,
6897    {
6898        self.create_time = std::option::Option::Some(v.into());
6899        self
6900    }
6901
6902    /// Sets or clears the value of [create_time][crate::model::PredictionResult::create_time].
6903    ///
6904    /// # Example
6905    /// ```ignore,no_run
6906    /// # use google_cloud_financialservices_v1::model::PredictionResult;
6907    /// use wkt::Timestamp;
6908    /// let x = PredictionResult::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
6909    /// let x = PredictionResult::new().set_or_clear_create_time(None::<Timestamp>);
6910    /// ```
6911    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6912    where
6913        T: std::convert::Into<wkt::Timestamp>,
6914    {
6915        self.create_time = v.map(|x| x.into());
6916        self
6917    }
6918
6919    /// Sets the value of [update_time][crate::model::PredictionResult::update_time].
6920    ///
6921    /// # Example
6922    /// ```ignore,no_run
6923    /// # use google_cloud_financialservices_v1::model::PredictionResult;
6924    /// use wkt::Timestamp;
6925    /// let x = PredictionResult::new().set_update_time(Timestamp::default()/* use setters */);
6926    /// ```
6927    pub fn set_update_time<T>(mut self, v: T) -> Self
6928    where
6929        T: std::convert::Into<wkt::Timestamp>,
6930    {
6931        self.update_time = std::option::Option::Some(v.into());
6932        self
6933    }
6934
6935    /// Sets or clears the value of [update_time][crate::model::PredictionResult::update_time].
6936    ///
6937    /// # Example
6938    /// ```ignore,no_run
6939    /// # use google_cloud_financialservices_v1::model::PredictionResult;
6940    /// use wkt::Timestamp;
6941    /// let x = PredictionResult::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
6942    /// let x = PredictionResult::new().set_or_clear_update_time(None::<Timestamp>);
6943    /// ```
6944    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6945    where
6946        T: std::convert::Into<wkt::Timestamp>,
6947    {
6948        self.update_time = v.map(|x| x.into());
6949        self
6950    }
6951
6952    /// Sets the value of [labels][crate::model::PredictionResult::labels].
6953    ///
6954    /// # Example
6955    /// ```ignore,no_run
6956    /// # use google_cloud_financialservices_v1::model::PredictionResult;
6957    /// let x = PredictionResult::new().set_labels([
6958    ///     ("key0", "abc"),
6959    ///     ("key1", "xyz"),
6960    /// ]);
6961    /// ```
6962    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
6963    where
6964        T: std::iter::IntoIterator<Item = (K, V)>,
6965        K: std::convert::Into<std::string::String>,
6966        V: std::convert::Into<std::string::String>,
6967    {
6968        use std::iter::Iterator;
6969        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6970        self
6971    }
6972
6973    /// Sets the value of [state][crate::model::PredictionResult::state].
6974    ///
6975    /// # Example
6976    /// ```ignore,no_run
6977    /// # use google_cloud_financialservices_v1::model::PredictionResult;
6978    /// use google_cloud_financialservices_v1::model::prediction_result::State;
6979    /// let x0 = PredictionResult::new().set_state(State::Creating);
6980    /// let x1 = PredictionResult::new().set_state(State::Active);
6981    /// let x2 = PredictionResult::new().set_state(State::Updating);
6982    /// ```
6983    pub fn set_state<T: std::convert::Into<crate::model::prediction_result::State>>(
6984        mut self,
6985        v: T,
6986    ) -> Self {
6987        self.state = v.into();
6988        self
6989    }
6990
6991    /// Sets the value of [dataset][crate::model::PredictionResult::dataset].
6992    ///
6993    /// # Example
6994    /// ```ignore,no_run
6995    /// # use google_cloud_financialservices_v1::model::PredictionResult;
6996    /// # let project_num_id = "project_num_id";
6997    /// # let location_id = "location_id";
6998    /// # let instance_id = "instance_id";
6999    /// # let dataset_id = "dataset_id";
7000    /// let x = PredictionResult::new().set_dataset(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/datasets/{dataset_id}"));
7001    /// ```
7002    pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7003        self.dataset = v.into();
7004        self
7005    }
7006
7007    /// Sets the value of [model][crate::model::PredictionResult::model].
7008    ///
7009    /// # Example
7010    /// ```ignore,no_run
7011    /// # use google_cloud_financialservices_v1::model::PredictionResult;
7012    /// # let project_num_id = "project_num_id";
7013    /// # let location_id = "location_id";
7014    /// # let instance_id = "instance_id";
7015    /// # let model_id = "model_id";
7016    /// let x = PredictionResult::new().set_model(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/models/{model_id}"));
7017    /// ```
7018    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7019        self.model = v.into();
7020        self
7021    }
7022
7023    /// Sets the value of [end_time][crate::model::PredictionResult::end_time].
7024    ///
7025    /// # Example
7026    /// ```ignore,no_run
7027    /// # use google_cloud_financialservices_v1::model::PredictionResult;
7028    /// use wkt::Timestamp;
7029    /// let x = PredictionResult::new().set_end_time(Timestamp::default()/* use setters */);
7030    /// ```
7031    pub fn set_end_time<T>(mut self, v: T) -> Self
7032    where
7033        T: std::convert::Into<wkt::Timestamp>,
7034    {
7035        self.end_time = std::option::Option::Some(v.into());
7036        self
7037    }
7038
7039    /// Sets or clears the value of [end_time][crate::model::PredictionResult::end_time].
7040    ///
7041    /// # Example
7042    /// ```ignore,no_run
7043    /// # use google_cloud_financialservices_v1::model::PredictionResult;
7044    /// use wkt::Timestamp;
7045    /// let x = PredictionResult::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
7046    /// let x = PredictionResult::new().set_or_clear_end_time(None::<Timestamp>);
7047    /// ```
7048    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
7049    where
7050        T: std::convert::Into<wkt::Timestamp>,
7051    {
7052        self.end_time = v.map(|x| x.into());
7053        self
7054    }
7055
7056    /// Sets the value of [prediction_periods][crate::model::PredictionResult::prediction_periods].
7057    ///
7058    /// # Example
7059    /// ```ignore,no_run
7060    /// # use google_cloud_financialservices_v1::model::PredictionResult;
7061    /// let x = PredictionResult::new().set_prediction_periods(42);
7062    /// ```
7063    pub fn set_prediction_periods<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7064        self.prediction_periods = v.into();
7065        self
7066    }
7067
7068    /// Sets the value of [outputs][crate::model::PredictionResult::outputs].
7069    ///
7070    /// # Example
7071    /// ```ignore,no_run
7072    /// # use google_cloud_financialservices_v1::model::PredictionResult;
7073    /// use google_cloud_financialservices_v1::model::prediction_result::Outputs;
7074    /// let x = PredictionResult::new().set_outputs(Outputs::default()/* use setters */);
7075    /// ```
7076    pub fn set_outputs<T>(mut self, v: T) -> Self
7077    where
7078        T: std::convert::Into<crate::model::prediction_result::Outputs>,
7079    {
7080        self.outputs = std::option::Option::Some(v.into());
7081        self
7082    }
7083
7084    /// Sets or clears the value of [outputs][crate::model::PredictionResult::outputs].
7085    ///
7086    /// # Example
7087    /// ```ignore,no_run
7088    /// # use google_cloud_financialservices_v1::model::PredictionResult;
7089    /// use google_cloud_financialservices_v1::model::prediction_result::Outputs;
7090    /// let x = PredictionResult::new().set_or_clear_outputs(Some(Outputs::default()/* use setters */));
7091    /// let x = PredictionResult::new().set_or_clear_outputs(None::<Outputs>);
7092    /// ```
7093    pub fn set_or_clear_outputs<T>(mut self, v: std::option::Option<T>) -> Self
7094    where
7095        T: std::convert::Into<crate::model::prediction_result::Outputs>,
7096    {
7097        self.outputs = v.map(|x| x.into());
7098        self
7099    }
7100
7101    /// Sets the value of [line_of_business][crate::model::PredictionResult::line_of_business].
7102    ///
7103    /// # Example
7104    /// ```ignore,no_run
7105    /// # use google_cloud_financialservices_v1::model::PredictionResult;
7106    /// use google_cloud_financialservices_v1::model::LineOfBusiness;
7107    /// let x0 = PredictionResult::new().set_line_of_business(LineOfBusiness::Commercial);
7108    /// let x1 = PredictionResult::new().set_line_of_business(LineOfBusiness::Retail);
7109    /// ```
7110    pub fn set_line_of_business<T: std::convert::Into<crate::model::LineOfBusiness>>(
7111        mut self,
7112        v: T,
7113    ) -> Self {
7114        self.line_of_business = v.into();
7115        self
7116    }
7117}
7118
7119impl wkt::message::Message for PredictionResult {
7120    fn typename() -> &'static str {
7121        "type.googleapis.com/google.cloud.financialservices.v1.PredictionResult"
7122    }
7123}
7124
7125/// Defines additional types related to [PredictionResult].
7126pub mod prediction_result {
7127    #[allow(unused_imports)]
7128    use super::*;
7129
7130    /// Outputs is a list of places where the operation will write results.
7131    #[derive(Clone, Default, PartialEq)]
7132    #[non_exhaustive]
7133    pub struct Outputs {
7134        /// Required. The location to output the predictions.
7135        pub prediction_destination: std::option::Option<crate::model::BigQueryDestination>,
7136
7137        /// The location to output explainability information.  If not specified
7138        /// no explainability data will be output.
7139        pub explainability_destination: std::option::Option<crate::model::BigQueryDestination>,
7140
7141        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7142    }
7143
7144    impl Outputs {
7145        /// Creates a new default instance.
7146        pub fn new() -> Self {
7147            std::default::Default::default()
7148        }
7149
7150        /// Sets the value of [prediction_destination][crate::model::prediction_result::Outputs::prediction_destination].
7151        ///
7152        /// # Example
7153        /// ```ignore,no_run
7154        /// # use google_cloud_financialservices_v1::model::prediction_result::Outputs;
7155        /// use google_cloud_financialservices_v1::model::BigQueryDestination;
7156        /// let x = Outputs::new().set_prediction_destination(BigQueryDestination::default()/* use setters */);
7157        /// ```
7158        pub fn set_prediction_destination<T>(mut self, v: T) -> Self
7159        where
7160            T: std::convert::Into<crate::model::BigQueryDestination>,
7161        {
7162            self.prediction_destination = std::option::Option::Some(v.into());
7163            self
7164        }
7165
7166        /// Sets or clears the value of [prediction_destination][crate::model::prediction_result::Outputs::prediction_destination].
7167        ///
7168        /// # Example
7169        /// ```ignore,no_run
7170        /// # use google_cloud_financialservices_v1::model::prediction_result::Outputs;
7171        /// use google_cloud_financialservices_v1::model::BigQueryDestination;
7172        /// let x = Outputs::new().set_or_clear_prediction_destination(Some(BigQueryDestination::default()/* use setters */));
7173        /// let x = Outputs::new().set_or_clear_prediction_destination(None::<BigQueryDestination>);
7174        /// ```
7175        pub fn set_or_clear_prediction_destination<T>(mut self, v: std::option::Option<T>) -> Self
7176        where
7177            T: std::convert::Into<crate::model::BigQueryDestination>,
7178        {
7179            self.prediction_destination = v.map(|x| x.into());
7180            self
7181        }
7182
7183        /// Sets the value of [explainability_destination][crate::model::prediction_result::Outputs::explainability_destination].
7184        ///
7185        /// # Example
7186        /// ```ignore,no_run
7187        /// # use google_cloud_financialservices_v1::model::prediction_result::Outputs;
7188        /// use google_cloud_financialservices_v1::model::BigQueryDestination;
7189        /// let x = Outputs::new().set_explainability_destination(BigQueryDestination::default()/* use setters */);
7190        /// ```
7191        pub fn set_explainability_destination<T>(mut self, v: T) -> Self
7192        where
7193            T: std::convert::Into<crate::model::BigQueryDestination>,
7194        {
7195            self.explainability_destination = std::option::Option::Some(v.into());
7196            self
7197        }
7198
7199        /// Sets or clears the value of [explainability_destination][crate::model::prediction_result::Outputs::explainability_destination].
7200        ///
7201        /// # Example
7202        /// ```ignore,no_run
7203        /// # use google_cloud_financialservices_v1::model::prediction_result::Outputs;
7204        /// use google_cloud_financialservices_v1::model::BigQueryDestination;
7205        /// let x = Outputs::new().set_or_clear_explainability_destination(Some(BigQueryDestination::default()/* use setters */));
7206        /// let x = Outputs::new().set_or_clear_explainability_destination(None::<BigQueryDestination>);
7207        /// ```
7208        pub fn set_or_clear_explainability_destination<T>(
7209            mut self,
7210            v: std::option::Option<T>,
7211        ) -> Self
7212        where
7213            T: std::convert::Into<crate::model::BigQueryDestination>,
7214        {
7215            self.explainability_destination = v.map(|x| x.into());
7216            self
7217        }
7218    }
7219
7220    impl wkt::message::Message for Outputs {
7221        fn typename() -> &'static str {
7222            "type.googleapis.com/google.cloud.financialservices.v1.PredictionResult.Outputs"
7223        }
7224    }
7225
7226    /// The possible states of a resource.
7227    ///
7228    /// # Working with unknown values
7229    ///
7230    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7231    /// additional enum variants at any time. Adding new variants is not considered
7232    /// a breaking change. Applications should write their code in anticipation of:
7233    ///
7234    /// - New values appearing in future releases of the client library, **and**
7235    /// - New values received dynamically, without application changes.
7236    ///
7237    /// Please consult the [Working with enums] section in the user guide for some
7238    /// guidelines.
7239    ///
7240    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
7241    #[derive(Clone, Debug, PartialEq)]
7242    #[non_exhaustive]
7243    pub enum State {
7244        /// State is unspecified, should not occur.
7245        Unspecified,
7246        /// The resource has not finished being created.
7247        Creating,
7248        /// The resource is active/ready to be used.
7249        Active,
7250        /// The resource is in the process of being updated.
7251        Updating,
7252        /// The resource is in the process of being deleted.
7253        Deleting,
7254        /// If set, the enum was initialized with an unknown value.
7255        ///
7256        /// Applications can examine the value using [State::value] or
7257        /// [State::name].
7258        UnknownValue(state::UnknownValue),
7259    }
7260
7261    #[doc(hidden)]
7262    pub mod state {
7263        #[allow(unused_imports)]
7264        use super::*;
7265        #[derive(Clone, Debug, PartialEq)]
7266        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7267    }
7268
7269    impl State {
7270        /// Gets the enum value.
7271        ///
7272        /// Returns `None` if the enum contains an unknown value deserialized from
7273        /// the string representation of enums.
7274        pub fn value(&self) -> std::option::Option<i32> {
7275            match self {
7276                Self::Unspecified => std::option::Option::Some(0),
7277                Self::Creating => std::option::Option::Some(1),
7278                Self::Active => std::option::Option::Some(2),
7279                Self::Updating => std::option::Option::Some(3),
7280                Self::Deleting => std::option::Option::Some(4),
7281                Self::UnknownValue(u) => u.0.value(),
7282            }
7283        }
7284
7285        /// Gets the enum value as a string.
7286        ///
7287        /// Returns `None` if the enum contains an unknown value deserialized from
7288        /// the integer representation of enums.
7289        pub fn name(&self) -> std::option::Option<&str> {
7290            match self {
7291                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
7292                Self::Creating => std::option::Option::Some("CREATING"),
7293                Self::Active => std::option::Option::Some("ACTIVE"),
7294                Self::Updating => std::option::Option::Some("UPDATING"),
7295                Self::Deleting => std::option::Option::Some("DELETING"),
7296                Self::UnknownValue(u) => u.0.name(),
7297            }
7298        }
7299    }
7300
7301    impl std::default::Default for State {
7302        fn default() -> Self {
7303            use std::convert::From;
7304            Self::from(0)
7305        }
7306    }
7307
7308    impl std::fmt::Display for State {
7309        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7310            wkt::internal::display_enum(f, self.name(), self.value())
7311        }
7312    }
7313
7314    impl std::convert::From<i32> for State {
7315        fn from(value: i32) -> Self {
7316            match value {
7317                0 => Self::Unspecified,
7318                1 => Self::Creating,
7319                2 => Self::Active,
7320                3 => Self::Updating,
7321                4 => Self::Deleting,
7322                _ => Self::UnknownValue(state::UnknownValue(
7323                    wkt::internal::UnknownEnumValue::Integer(value),
7324                )),
7325            }
7326        }
7327    }
7328
7329    impl std::convert::From<&str> for State {
7330        fn from(value: &str) -> Self {
7331            use std::string::ToString;
7332            match value {
7333                "STATE_UNSPECIFIED" => Self::Unspecified,
7334                "CREATING" => Self::Creating,
7335                "ACTIVE" => Self::Active,
7336                "UPDATING" => Self::Updating,
7337                "DELETING" => Self::Deleting,
7338                _ => Self::UnknownValue(state::UnknownValue(
7339                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7340                )),
7341            }
7342        }
7343    }
7344
7345    impl serde::ser::Serialize for State {
7346        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7347        where
7348            S: serde::Serializer,
7349        {
7350            match self {
7351                Self::Unspecified => serializer.serialize_i32(0),
7352                Self::Creating => serializer.serialize_i32(1),
7353                Self::Active => serializer.serialize_i32(2),
7354                Self::Updating => serializer.serialize_i32(3),
7355                Self::Deleting => serializer.serialize_i32(4),
7356                Self::UnknownValue(u) => u.0.serialize(serializer),
7357            }
7358        }
7359    }
7360
7361    impl<'de> serde::de::Deserialize<'de> for State {
7362        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7363        where
7364            D: serde::Deserializer<'de>,
7365        {
7366            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
7367                ".google.cloud.financialservices.v1.PredictionResult.State",
7368            ))
7369        }
7370    }
7371}
7372
7373/// Request for retrieving a paginated list of PredictionResult resources that
7374/// meet the specified criteria.
7375#[derive(Clone, Default, PartialEq)]
7376#[non_exhaustive]
7377pub struct ListPredictionResultsRequest {
7378    /// Required. The parent of the PredictionResult is the Instance.
7379    pub parent: std::string::String,
7380
7381    /// The number of resources to be included in the response. The response
7382    /// contains a next_page_token, which can be used to retrieve the next page of
7383    /// resources.
7384    pub page_size: i32,
7385
7386    /// In case of paginated results, this is the token that was returned in the
7387    /// previous ListPredictionResultsResponse. It should be copied here to
7388    /// retrieve the next page of resources. Empty will give the first page of
7389    /// ListPredictionResultsRequest, and the last page will return an empty
7390    /// page_token.
7391    pub page_token: std::string::String,
7392
7393    /// Specify a filter to narrow search results.
7394    pub filter: std::string::String,
7395
7396    /// Specify a field to use for ordering.
7397    pub order_by: std::string::String,
7398
7399    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7400}
7401
7402impl ListPredictionResultsRequest {
7403    /// Creates a new default instance.
7404    pub fn new() -> Self {
7405        std::default::Default::default()
7406    }
7407
7408    /// Sets the value of [parent][crate::model::ListPredictionResultsRequest::parent].
7409    ///
7410    /// # Example
7411    /// ```ignore,no_run
7412    /// # use google_cloud_financialservices_v1::model::ListPredictionResultsRequest;
7413    /// # let project_id = "project_id";
7414    /// # let location_id = "location_id";
7415    /// # let instance_id = "instance_id";
7416    /// let x = ListPredictionResultsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
7417    /// ```
7418    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7419        self.parent = v.into();
7420        self
7421    }
7422
7423    /// Sets the value of [page_size][crate::model::ListPredictionResultsRequest::page_size].
7424    ///
7425    /// # Example
7426    /// ```ignore,no_run
7427    /// # use google_cloud_financialservices_v1::model::ListPredictionResultsRequest;
7428    /// let x = ListPredictionResultsRequest::new().set_page_size(42);
7429    /// ```
7430    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7431        self.page_size = v.into();
7432        self
7433    }
7434
7435    /// Sets the value of [page_token][crate::model::ListPredictionResultsRequest::page_token].
7436    ///
7437    /// # Example
7438    /// ```ignore,no_run
7439    /// # use google_cloud_financialservices_v1::model::ListPredictionResultsRequest;
7440    /// let x = ListPredictionResultsRequest::new().set_page_token("example");
7441    /// ```
7442    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7443        self.page_token = v.into();
7444        self
7445    }
7446
7447    /// Sets the value of [filter][crate::model::ListPredictionResultsRequest::filter].
7448    ///
7449    /// # Example
7450    /// ```ignore,no_run
7451    /// # use google_cloud_financialservices_v1::model::ListPredictionResultsRequest;
7452    /// let x = ListPredictionResultsRequest::new().set_filter("example");
7453    /// ```
7454    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7455        self.filter = v.into();
7456        self
7457    }
7458
7459    /// Sets the value of [order_by][crate::model::ListPredictionResultsRequest::order_by].
7460    ///
7461    /// # Example
7462    /// ```ignore,no_run
7463    /// # use google_cloud_financialservices_v1::model::ListPredictionResultsRequest;
7464    /// let x = ListPredictionResultsRequest::new().set_order_by("example");
7465    /// ```
7466    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7467        self.order_by = v.into();
7468        self
7469    }
7470}
7471
7472impl wkt::message::Message for ListPredictionResultsRequest {
7473    fn typename() -> &'static str {
7474        "type.googleapis.com/google.cloud.financialservices.v1.ListPredictionResultsRequest"
7475    }
7476}
7477
7478/// Response for retrieving a list of PredictionResults
7479#[derive(Clone, Default, PartialEq)]
7480#[non_exhaustive]
7481pub struct ListPredictionResultsResponse {
7482    /// List of PredictionResult resources
7483    pub prediction_results: std::vec::Vec<crate::model::PredictionResult>,
7484
7485    /// This token should be passed to the next ListPredictionResultsRequest to
7486    /// retrieve the next page of PredictionResults (empty indicicates we are
7487    /// done).
7488    pub next_page_token: std::string::String,
7489
7490    /// Locations that could not be reached.
7491    pub unreachable: std::vec::Vec<std::string::String>,
7492
7493    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7494}
7495
7496impl ListPredictionResultsResponse {
7497    /// Creates a new default instance.
7498    pub fn new() -> Self {
7499        std::default::Default::default()
7500    }
7501
7502    /// Sets the value of [prediction_results][crate::model::ListPredictionResultsResponse::prediction_results].
7503    ///
7504    /// # Example
7505    /// ```ignore,no_run
7506    /// # use google_cloud_financialservices_v1::model::ListPredictionResultsResponse;
7507    /// use google_cloud_financialservices_v1::model::PredictionResult;
7508    /// let x = ListPredictionResultsResponse::new()
7509    ///     .set_prediction_results([
7510    ///         PredictionResult::default()/* use setters */,
7511    ///         PredictionResult::default()/* use (different) setters */,
7512    ///     ]);
7513    /// ```
7514    pub fn set_prediction_results<T, V>(mut self, v: T) -> Self
7515    where
7516        T: std::iter::IntoIterator<Item = V>,
7517        V: std::convert::Into<crate::model::PredictionResult>,
7518    {
7519        use std::iter::Iterator;
7520        self.prediction_results = v.into_iter().map(|i| i.into()).collect();
7521        self
7522    }
7523
7524    /// Sets the value of [next_page_token][crate::model::ListPredictionResultsResponse::next_page_token].
7525    ///
7526    /// # Example
7527    /// ```ignore,no_run
7528    /// # use google_cloud_financialservices_v1::model::ListPredictionResultsResponse;
7529    /// let x = ListPredictionResultsResponse::new().set_next_page_token("example");
7530    /// ```
7531    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7532        self.next_page_token = v.into();
7533        self
7534    }
7535
7536    /// Sets the value of [unreachable][crate::model::ListPredictionResultsResponse::unreachable].
7537    ///
7538    /// # Example
7539    /// ```ignore,no_run
7540    /// # use google_cloud_financialservices_v1::model::ListPredictionResultsResponse;
7541    /// let x = ListPredictionResultsResponse::new().set_unreachable(["a", "b", "c"]);
7542    /// ```
7543    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
7544    where
7545        T: std::iter::IntoIterator<Item = V>,
7546        V: std::convert::Into<std::string::String>,
7547    {
7548        use std::iter::Iterator;
7549        self.unreachable = v.into_iter().map(|i| i.into()).collect();
7550        self
7551    }
7552}
7553
7554impl wkt::message::Message for ListPredictionResultsResponse {
7555    fn typename() -> &'static str {
7556        "type.googleapis.com/google.cloud.financialservices.v1.ListPredictionResultsResponse"
7557    }
7558}
7559
7560#[doc(hidden)]
7561impl google_cloud_gax::paginator::internal::PageableResponse for ListPredictionResultsResponse {
7562    type PageItem = crate::model::PredictionResult;
7563
7564    fn items(self) -> std::vec::Vec<Self::PageItem> {
7565        self.prediction_results
7566    }
7567
7568    fn next_page_token(&self) -> std::string::String {
7569        use std::clone::Clone;
7570        self.next_page_token.clone()
7571    }
7572}
7573
7574/// Request for retrieving a specific PredictionResult resource.
7575#[derive(Clone, Default, PartialEq)]
7576#[non_exhaustive]
7577pub struct GetPredictionResultRequest {
7578    /// Required. The resource name of the PredictionResult
7579    pub name: std::string::String,
7580
7581    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7582}
7583
7584impl GetPredictionResultRequest {
7585    /// Creates a new default instance.
7586    pub fn new() -> Self {
7587        std::default::Default::default()
7588    }
7589
7590    /// Sets the value of [name][crate::model::GetPredictionResultRequest::name].
7591    ///
7592    /// # Example
7593    /// ```ignore,no_run
7594    /// # use google_cloud_financialservices_v1::model::GetPredictionResultRequest;
7595    /// # let project_num_id = "project_num_id";
7596    /// # let location_id = "location_id";
7597    /// # let instance_id = "instance_id";
7598    /// # let prediction_result_id = "prediction_result_id";
7599    /// let x = GetPredictionResultRequest::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/predictionResults/{prediction_result_id}"));
7600    /// ```
7601    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7602        self.name = v.into();
7603        self
7604    }
7605}
7606
7607impl wkt::message::Message for GetPredictionResultRequest {
7608    fn typename() -> &'static str {
7609        "type.googleapis.com/google.cloud.financialservices.v1.GetPredictionResultRequest"
7610    }
7611}
7612
7613/// Request for creating a PredictionResult resource.
7614#[derive(Clone, Default, PartialEq)]
7615#[non_exhaustive]
7616pub struct CreatePredictionResultRequest {
7617    /// Required. The parent of the PredictionResult is the Instance.
7618    pub parent: std::string::String,
7619
7620    /// Required. The resource id of the PredictionResult
7621    pub prediction_result_id: std::string::String,
7622
7623    /// Required. The PredictionResult that will be created.
7624    pub prediction_result: std::option::Option<crate::model::PredictionResult>,
7625
7626    /// Optional. An optional request ID to identify requests. Specify a unique
7627    /// request ID so that if you must retry your request, the server will know to
7628    /// ignore the request if it has already been completed. The server will
7629    /// guarantee that for at least 60 minutes since the first request.
7630    ///
7631    /// For example, consider a situation where you make an initial request and the
7632    /// request times out. If you make the request again with the same request
7633    /// ID, the server can check if original operation with the same request ID
7634    /// was received, and if so, will ignore the second request. This prevents
7635    /// clients from accidentally creating duplicate commitments.
7636    ///
7637    /// The request ID must be a valid UUID with the exception that zero UUID is
7638    /// not supported (00000000-0000-0000-0000-000000000000).
7639    pub request_id: std::string::String,
7640
7641    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7642}
7643
7644impl CreatePredictionResultRequest {
7645    /// Creates a new default instance.
7646    pub fn new() -> Self {
7647        std::default::Default::default()
7648    }
7649
7650    /// Sets the value of [parent][crate::model::CreatePredictionResultRequest::parent].
7651    ///
7652    /// # Example
7653    /// ```ignore,no_run
7654    /// # use google_cloud_financialservices_v1::model::CreatePredictionResultRequest;
7655    /// # let project_id = "project_id";
7656    /// # let location_id = "location_id";
7657    /// # let instance_id = "instance_id";
7658    /// let x = CreatePredictionResultRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"));
7659    /// ```
7660    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7661        self.parent = v.into();
7662        self
7663    }
7664
7665    /// Sets the value of [prediction_result_id][crate::model::CreatePredictionResultRequest::prediction_result_id].
7666    ///
7667    /// # Example
7668    /// ```ignore,no_run
7669    /// # use google_cloud_financialservices_v1::model::CreatePredictionResultRequest;
7670    /// let x = CreatePredictionResultRequest::new().set_prediction_result_id("example");
7671    /// ```
7672    pub fn set_prediction_result_id<T: std::convert::Into<std::string::String>>(
7673        mut self,
7674        v: T,
7675    ) -> Self {
7676        self.prediction_result_id = v.into();
7677        self
7678    }
7679
7680    /// Sets the value of [prediction_result][crate::model::CreatePredictionResultRequest::prediction_result].
7681    ///
7682    /// # Example
7683    /// ```ignore,no_run
7684    /// # use google_cloud_financialservices_v1::model::CreatePredictionResultRequest;
7685    /// use google_cloud_financialservices_v1::model::PredictionResult;
7686    /// let x = CreatePredictionResultRequest::new().set_prediction_result(PredictionResult::default()/* use setters */);
7687    /// ```
7688    pub fn set_prediction_result<T>(mut self, v: T) -> Self
7689    where
7690        T: std::convert::Into<crate::model::PredictionResult>,
7691    {
7692        self.prediction_result = std::option::Option::Some(v.into());
7693        self
7694    }
7695
7696    /// Sets or clears the value of [prediction_result][crate::model::CreatePredictionResultRequest::prediction_result].
7697    ///
7698    /// # Example
7699    /// ```ignore,no_run
7700    /// # use google_cloud_financialservices_v1::model::CreatePredictionResultRequest;
7701    /// use google_cloud_financialservices_v1::model::PredictionResult;
7702    /// let x = CreatePredictionResultRequest::new().set_or_clear_prediction_result(Some(PredictionResult::default()/* use setters */));
7703    /// let x = CreatePredictionResultRequest::new().set_or_clear_prediction_result(None::<PredictionResult>);
7704    /// ```
7705    pub fn set_or_clear_prediction_result<T>(mut self, v: std::option::Option<T>) -> Self
7706    where
7707        T: std::convert::Into<crate::model::PredictionResult>,
7708    {
7709        self.prediction_result = v.map(|x| x.into());
7710        self
7711    }
7712
7713    /// Sets the value of [request_id][crate::model::CreatePredictionResultRequest::request_id].
7714    ///
7715    /// # Example
7716    /// ```ignore,no_run
7717    /// # use google_cloud_financialservices_v1::model::CreatePredictionResultRequest;
7718    /// let x = CreatePredictionResultRequest::new().set_request_id("example");
7719    /// ```
7720    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7721        self.request_id = v.into();
7722        self
7723    }
7724}
7725
7726impl wkt::message::Message for CreatePredictionResultRequest {
7727    fn typename() -> &'static str {
7728        "type.googleapis.com/google.cloud.financialservices.v1.CreatePredictionResultRequest"
7729    }
7730}
7731
7732/// Request for updating a PredictionResult
7733#[derive(Clone, Default, PartialEq)]
7734#[non_exhaustive]
7735pub struct UpdatePredictionResultRequest {
7736    /// Optional. Field mask is used to specify the fields to be overwritten in the
7737    /// PredictionResult resource by the update.
7738    /// The fields specified in the update_mask are relative to the resource, not
7739    /// the full request. A field will be overwritten if it is in the mask. If the
7740    /// user does not provide a mask then all fields will be overwritten.
7741    pub update_mask: std::option::Option<wkt::FieldMask>,
7742
7743    /// Required. The new value of the PredictionResult fields that will be updated
7744    /// according to the update_mask.
7745    pub prediction_result: std::option::Option<crate::model::PredictionResult>,
7746
7747    /// Optional. An optional request ID to identify requests. Specify a unique
7748    /// request ID so that if you must retry your request, the server will know to
7749    /// ignore the request if it has already been completed. The server will
7750    /// guarantee that for at least 60 minutes since the first request.
7751    ///
7752    /// For example, consider a situation where you make an initial request and the
7753    /// request times out. If you make the request again with the same request
7754    /// ID, the server can check if original operation with the same request ID
7755    /// was received, and if so, will ignore the second request. This prevents
7756    /// clients from accidentally creating duplicate commitments.
7757    ///
7758    /// The request ID must be a valid UUID with the exception that zero UUID is
7759    /// not supported (00000000-0000-0000-0000-000000000000).
7760    pub request_id: std::string::String,
7761
7762    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7763}
7764
7765impl UpdatePredictionResultRequest {
7766    /// Creates a new default instance.
7767    pub fn new() -> Self {
7768        std::default::Default::default()
7769    }
7770
7771    /// Sets the value of [update_mask][crate::model::UpdatePredictionResultRequest::update_mask].
7772    ///
7773    /// # Example
7774    /// ```ignore,no_run
7775    /// # use google_cloud_financialservices_v1::model::UpdatePredictionResultRequest;
7776    /// use wkt::FieldMask;
7777    /// let x = UpdatePredictionResultRequest::new().set_update_mask(FieldMask::default()/* use setters */);
7778    /// ```
7779    pub fn set_update_mask<T>(mut self, v: T) -> Self
7780    where
7781        T: std::convert::Into<wkt::FieldMask>,
7782    {
7783        self.update_mask = std::option::Option::Some(v.into());
7784        self
7785    }
7786
7787    /// Sets or clears the value of [update_mask][crate::model::UpdatePredictionResultRequest::update_mask].
7788    ///
7789    /// # Example
7790    /// ```ignore,no_run
7791    /// # use google_cloud_financialservices_v1::model::UpdatePredictionResultRequest;
7792    /// use wkt::FieldMask;
7793    /// let x = UpdatePredictionResultRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
7794    /// let x = UpdatePredictionResultRequest::new().set_or_clear_update_mask(None::<FieldMask>);
7795    /// ```
7796    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7797    where
7798        T: std::convert::Into<wkt::FieldMask>,
7799    {
7800        self.update_mask = v.map(|x| x.into());
7801        self
7802    }
7803
7804    /// Sets the value of [prediction_result][crate::model::UpdatePredictionResultRequest::prediction_result].
7805    ///
7806    /// # Example
7807    /// ```ignore,no_run
7808    /// # use google_cloud_financialservices_v1::model::UpdatePredictionResultRequest;
7809    /// use google_cloud_financialservices_v1::model::PredictionResult;
7810    /// let x = UpdatePredictionResultRequest::new().set_prediction_result(PredictionResult::default()/* use setters */);
7811    /// ```
7812    pub fn set_prediction_result<T>(mut self, v: T) -> Self
7813    where
7814        T: std::convert::Into<crate::model::PredictionResult>,
7815    {
7816        self.prediction_result = std::option::Option::Some(v.into());
7817        self
7818    }
7819
7820    /// Sets or clears the value of [prediction_result][crate::model::UpdatePredictionResultRequest::prediction_result].
7821    ///
7822    /// # Example
7823    /// ```ignore,no_run
7824    /// # use google_cloud_financialservices_v1::model::UpdatePredictionResultRequest;
7825    /// use google_cloud_financialservices_v1::model::PredictionResult;
7826    /// let x = UpdatePredictionResultRequest::new().set_or_clear_prediction_result(Some(PredictionResult::default()/* use setters */));
7827    /// let x = UpdatePredictionResultRequest::new().set_or_clear_prediction_result(None::<PredictionResult>);
7828    /// ```
7829    pub fn set_or_clear_prediction_result<T>(mut self, v: std::option::Option<T>) -> Self
7830    where
7831        T: std::convert::Into<crate::model::PredictionResult>,
7832    {
7833        self.prediction_result = v.map(|x| x.into());
7834        self
7835    }
7836
7837    /// Sets the value of [request_id][crate::model::UpdatePredictionResultRequest::request_id].
7838    ///
7839    /// # Example
7840    /// ```ignore,no_run
7841    /// # use google_cloud_financialservices_v1::model::UpdatePredictionResultRequest;
7842    /// let x = UpdatePredictionResultRequest::new().set_request_id("example");
7843    /// ```
7844    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7845        self.request_id = v.into();
7846        self
7847    }
7848}
7849
7850impl wkt::message::Message for UpdatePredictionResultRequest {
7851    fn typename() -> &'static str {
7852        "type.googleapis.com/google.cloud.financialservices.v1.UpdatePredictionResultRequest"
7853    }
7854}
7855
7856/// Request for deleting a PredictionResult.
7857#[derive(Clone, Default, PartialEq)]
7858#[non_exhaustive]
7859pub struct DeletePredictionResultRequest {
7860    /// Required. The resource name of the PredictionResult.
7861    pub name: std::string::String,
7862
7863    /// Optional. An optional request ID to identify requests. Specify a unique
7864    /// request ID so that if you must retry your request, the server will know to
7865    /// ignore the request if it has already been completed. The server will
7866    /// guarantee that for at least 60 minutes after the first request.
7867    ///
7868    /// For example, consider a situation where you make an initial request and the
7869    /// request times out. If you make the request again with the same request
7870    /// ID, the server can check if original operation with the same request ID
7871    /// was received, and if so, will ignore the second request. This prevents
7872    /// clients from accidentally creating duplicate commitments.
7873    ///
7874    /// The request ID must be a valid UUID with the exception that zero UUID is
7875    /// not supported (00000000-0000-0000-0000-000000000000).
7876    pub request_id: std::string::String,
7877
7878    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7879}
7880
7881impl DeletePredictionResultRequest {
7882    /// Creates a new default instance.
7883    pub fn new() -> Self {
7884        std::default::Default::default()
7885    }
7886
7887    /// Sets the value of [name][crate::model::DeletePredictionResultRequest::name].
7888    ///
7889    /// # Example
7890    /// ```ignore,no_run
7891    /// # use google_cloud_financialservices_v1::model::DeletePredictionResultRequest;
7892    /// # let project_num_id = "project_num_id";
7893    /// # let location_id = "location_id";
7894    /// # let instance_id = "instance_id";
7895    /// # let prediction_result_id = "prediction_result_id";
7896    /// let x = DeletePredictionResultRequest::new().set_name(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/predictionResults/{prediction_result_id}"));
7897    /// ```
7898    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7899        self.name = v.into();
7900        self
7901    }
7902
7903    /// Sets the value of [request_id][crate::model::DeletePredictionResultRequest::request_id].
7904    ///
7905    /// # Example
7906    /// ```ignore,no_run
7907    /// # use google_cloud_financialservices_v1::model::DeletePredictionResultRequest;
7908    /// let x = DeletePredictionResultRequest::new().set_request_id("example");
7909    /// ```
7910    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7911        self.request_id = v.into();
7912        self
7913    }
7914}
7915
7916impl wkt::message::Message for DeletePredictionResultRequest {
7917    fn typename() -> &'static str {
7918        "type.googleapis.com/google.cloud.financialservices.v1.DeletePredictionResultRequest"
7919    }
7920}
7921
7922/// Request for exporting PredictionResult metadata.
7923#[derive(Clone, Default, PartialEq)]
7924#[non_exhaustive]
7925pub struct ExportPredictionResultMetadataRequest {
7926    /// Required. The resource name of the PredictionResult.
7927    pub prediction_result: std::string::String,
7928
7929    /// Required. BigQuery output where the metadata will be written.
7930    pub structured_metadata_destination: std::option::Option<crate::model::BigQueryDestination>,
7931
7932    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7933}
7934
7935impl ExportPredictionResultMetadataRequest {
7936    /// Creates a new default instance.
7937    pub fn new() -> Self {
7938        std::default::Default::default()
7939    }
7940
7941    /// Sets the value of [prediction_result][crate::model::ExportPredictionResultMetadataRequest::prediction_result].
7942    ///
7943    /// # Example
7944    /// ```ignore,no_run
7945    /// # use google_cloud_financialservices_v1::model::ExportPredictionResultMetadataRequest;
7946    /// # let project_num_id = "project_num_id";
7947    /// # let location_id = "location_id";
7948    /// # let instance_id = "instance_id";
7949    /// # let prediction_result_id = "prediction_result_id";
7950    /// let x = ExportPredictionResultMetadataRequest::new().set_prediction_result(format!("projects/{project_num_id}/locations/{location_id}/instances/{instance_id}/predictionResults/{prediction_result_id}"));
7951    /// ```
7952    pub fn set_prediction_result<T: std::convert::Into<std::string::String>>(
7953        mut self,
7954        v: T,
7955    ) -> Self {
7956        self.prediction_result = v.into();
7957        self
7958    }
7959
7960    /// Sets the value of [structured_metadata_destination][crate::model::ExportPredictionResultMetadataRequest::structured_metadata_destination].
7961    ///
7962    /// # Example
7963    /// ```ignore,no_run
7964    /// # use google_cloud_financialservices_v1::model::ExportPredictionResultMetadataRequest;
7965    /// use google_cloud_financialservices_v1::model::BigQueryDestination;
7966    /// let x = ExportPredictionResultMetadataRequest::new().set_structured_metadata_destination(BigQueryDestination::default()/* use setters */);
7967    /// ```
7968    pub fn set_structured_metadata_destination<T>(mut self, v: T) -> Self
7969    where
7970        T: std::convert::Into<crate::model::BigQueryDestination>,
7971    {
7972        self.structured_metadata_destination = std::option::Option::Some(v.into());
7973        self
7974    }
7975
7976    /// Sets or clears the value of [structured_metadata_destination][crate::model::ExportPredictionResultMetadataRequest::structured_metadata_destination].
7977    ///
7978    /// # Example
7979    /// ```ignore,no_run
7980    /// # use google_cloud_financialservices_v1::model::ExportPredictionResultMetadataRequest;
7981    /// use google_cloud_financialservices_v1::model::BigQueryDestination;
7982    /// let x = ExportPredictionResultMetadataRequest::new().set_or_clear_structured_metadata_destination(Some(BigQueryDestination::default()/* use setters */));
7983    /// let x = ExportPredictionResultMetadataRequest::new().set_or_clear_structured_metadata_destination(None::<BigQueryDestination>);
7984    /// ```
7985    pub fn set_or_clear_structured_metadata_destination<T>(
7986        mut self,
7987        v: std::option::Option<T>,
7988    ) -> Self
7989    where
7990        T: std::convert::Into<crate::model::BigQueryDestination>,
7991    {
7992        self.structured_metadata_destination = v.map(|x| x.into());
7993        self
7994    }
7995}
7996
7997impl wkt::message::Message for ExportPredictionResultMetadataRequest {
7998    fn typename() -> &'static str {
7999        "type.googleapis.com/google.cloud.financialservices.v1.ExportPredictionResultMetadataRequest"
8000    }
8001}
8002
8003/// Response for exporting PredictionResult metadata.
8004#[derive(Clone, Default, PartialEq)]
8005#[non_exhaustive]
8006pub struct ExportPredictionResultMetadataResponse {
8007    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8008}
8009
8010impl ExportPredictionResultMetadataResponse {
8011    /// Creates a new default instance.
8012    pub fn new() -> Self {
8013        std::default::Default::default()
8014    }
8015}
8016
8017impl wkt::message::Message for ExportPredictionResultMetadataResponse {
8018    fn typename() -> &'static str {
8019        "type.googleapis.com/google.cloud.financialservices.v1.ExportPredictionResultMetadataResponse"
8020    }
8021}
8022
8023/// Represents the metadata of the long-running operation.
8024#[derive(Clone, Default, PartialEq)]
8025#[non_exhaustive]
8026pub struct OperationMetadata {
8027    /// Output only. The time the operation was created.
8028    pub create_time: std::option::Option<wkt::Timestamp>,
8029
8030    /// Output only. The time the operation finished running.
8031    pub end_time: std::option::Option<wkt::Timestamp>,
8032
8033    /// Output only. Server-defined resource path for the target of the operation.
8034    /// format: "/projects/{project}/..."
8035    /// VPC-SC restrictions apply.
8036    pub target: std::string::String,
8037
8038    /// Output only. Name of the verb executed by the operation.
8039    pub verb: std::string::String,
8040
8041    /// Output only. Human-readable status of the operation, if any.
8042    pub status_message: std::string::String,
8043
8044    /// Output only. Identifies whether the user has requested cancellation of the
8045    /// operation.
8046    ///
8047    /// Successfully cancelled operations have a [Operation.error][] value
8048    /// with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding
8049    /// to `Code.CANCELLED`.
8050    pub requested_cancellation: bool,
8051
8052    /// Output only. API version used to start the operation.
8053    pub api_version: std::string::String,
8054
8055    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8056}
8057
8058impl OperationMetadata {
8059    /// Creates a new default instance.
8060    pub fn new() -> Self {
8061        std::default::Default::default()
8062    }
8063
8064    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
8065    ///
8066    /// # Example
8067    /// ```ignore,no_run
8068    /// # use google_cloud_financialservices_v1::model::OperationMetadata;
8069    /// use wkt::Timestamp;
8070    /// let x = OperationMetadata::new().set_create_time(Timestamp::default()/* use setters */);
8071    /// ```
8072    pub fn set_create_time<T>(mut self, v: T) -> Self
8073    where
8074        T: std::convert::Into<wkt::Timestamp>,
8075    {
8076        self.create_time = std::option::Option::Some(v.into());
8077        self
8078    }
8079
8080    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
8081    ///
8082    /// # Example
8083    /// ```ignore,no_run
8084    /// # use google_cloud_financialservices_v1::model::OperationMetadata;
8085    /// use wkt::Timestamp;
8086    /// let x = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
8087    /// let x = OperationMetadata::new().set_or_clear_create_time(None::<Timestamp>);
8088    /// ```
8089    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
8090    where
8091        T: std::convert::Into<wkt::Timestamp>,
8092    {
8093        self.create_time = v.map(|x| x.into());
8094        self
8095    }
8096
8097    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
8098    ///
8099    /// # Example
8100    /// ```ignore,no_run
8101    /// # use google_cloud_financialservices_v1::model::OperationMetadata;
8102    /// use wkt::Timestamp;
8103    /// let x = OperationMetadata::new().set_end_time(Timestamp::default()/* use setters */);
8104    /// ```
8105    pub fn set_end_time<T>(mut self, v: T) -> Self
8106    where
8107        T: std::convert::Into<wkt::Timestamp>,
8108    {
8109        self.end_time = std::option::Option::Some(v.into());
8110        self
8111    }
8112
8113    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
8114    ///
8115    /// # Example
8116    /// ```ignore,no_run
8117    /// # use google_cloud_financialservices_v1::model::OperationMetadata;
8118    /// use wkt::Timestamp;
8119    /// let x = OperationMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8120    /// let x = OperationMetadata::new().set_or_clear_end_time(None::<Timestamp>);
8121    /// ```
8122    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8123    where
8124        T: std::convert::Into<wkt::Timestamp>,
8125    {
8126        self.end_time = v.map(|x| x.into());
8127        self
8128    }
8129
8130    /// Sets the value of [target][crate::model::OperationMetadata::target].
8131    ///
8132    /// # Example
8133    /// ```ignore,no_run
8134    /// # use google_cloud_financialservices_v1::model::OperationMetadata;
8135    /// let x = OperationMetadata::new().set_target("example");
8136    /// ```
8137    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8138        self.target = v.into();
8139        self
8140    }
8141
8142    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
8143    ///
8144    /// # Example
8145    /// ```ignore,no_run
8146    /// # use google_cloud_financialservices_v1::model::OperationMetadata;
8147    /// let x = OperationMetadata::new().set_verb("example");
8148    /// ```
8149    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8150        self.verb = v.into();
8151        self
8152    }
8153
8154    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
8155    ///
8156    /// # Example
8157    /// ```ignore,no_run
8158    /// # use google_cloud_financialservices_v1::model::OperationMetadata;
8159    /// let x = OperationMetadata::new().set_status_message("example");
8160    /// ```
8161    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8162        self.status_message = v.into();
8163        self
8164    }
8165
8166    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
8167    ///
8168    /// # Example
8169    /// ```ignore,no_run
8170    /// # use google_cloud_financialservices_v1::model::OperationMetadata;
8171    /// let x = OperationMetadata::new().set_requested_cancellation(true);
8172    /// ```
8173    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8174        self.requested_cancellation = v.into();
8175        self
8176    }
8177
8178    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
8179    ///
8180    /// # Example
8181    /// ```ignore,no_run
8182    /// # use google_cloud_financialservices_v1::model::OperationMetadata;
8183    /// let x = OperationMetadata::new().set_api_version("example");
8184    /// ```
8185    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8186        self.api_version = v.into();
8187        self
8188    }
8189}
8190
8191impl wkt::message::Message for OperationMetadata {
8192    fn typename() -> &'static str {
8193        "type.googleapis.com/google.cloud.financialservices.v1.OperationMetadata"
8194    }
8195}
8196
8197/// Indicate which LineOfBusiness a party belongs to.
8198///
8199/// # Working with unknown values
8200///
8201/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8202/// additional enum variants at any time. Adding new variants is not considered
8203/// a breaking change. Applications should write their code in anticipation of:
8204///
8205/// - New values appearing in future releases of the client library, **and**
8206/// - New values received dynamically, without application changes.
8207///
8208/// Please consult the [Working with enums] section in the user guide for some
8209/// guidelines.
8210///
8211/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
8212#[derive(Clone, Debug, PartialEq)]
8213#[non_exhaustive]
8214pub enum LineOfBusiness {
8215    /// An unspecified LineOfBusiness. Do not use.
8216    Unspecified,
8217    /// Commercial LineOfBusiness.
8218    Commercial,
8219    /// Retail LineOfBusiness.
8220    Retail,
8221    /// If set, the enum was initialized with an unknown value.
8222    ///
8223    /// Applications can examine the value using [LineOfBusiness::value] or
8224    /// [LineOfBusiness::name].
8225    UnknownValue(line_of_business::UnknownValue),
8226}
8227
8228#[doc(hidden)]
8229pub mod line_of_business {
8230    #[allow(unused_imports)]
8231    use super::*;
8232    #[derive(Clone, Debug, PartialEq)]
8233    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8234}
8235
8236impl LineOfBusiness {
8237    /// Gets the enum value.
8238    ///
8239    /// Returns `None` if the enum contains an unknown value deserialized from
8240    /// the string representation of enums.
8241    pub fn value(&self) -> std::option::Option<i32> {
8242        match self {
8243            Self::Unspecified => std::option::Option::Some(0),
8244            Self::Commercial => std::option::Option::Some(1),
8245            Self::Retail => std::option::Option::Some(2),
8246            Self::UnknownValue(u) => u.0.value(),
8247        }
8248    }
8249
8250    /// Gets the enum value as a string.
8251    ///
8252    /// Returns `None` if the enum contains an unknown value deserialized from
8253    /// the integer representation of enums.
8254    pub fn name(&self) -> std::option::Option<&str> {
8255        match self {
8256            Self::Unspecified => std::option::Option::Some("LINE_OF_BUSINESS_UNSPECIFIED"),
8257            Self::Commercial => std::option::Option::Some("COMMERCIAL"),
8258            Self::Retail => std::option::Option::Some("RETAIL"),
8259            Self::UnknownValue(u) => u.0.name(),
8260        }
8261    }
8262}
8263
8264impl std::default::Default for LineOfBusiness {
8265    fn default() -> Self {
8266        use std::convert::From;
8267        Self::from(0)
8268    }
8269}
8270
8271impl std::fmt::Display for LineOfBusiness {
8272    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8273        wkt::internal::display_enum(f, self.name(), self.value())
8274    }
8275}
8276
8277impl std::convert::From<i32> for LineOfBusiness {
8278    fn from(value: i32) -> Self {
8279        match value {
8280            0 => Self::Unspecified,
8281            1 => Self::Commercial,
8282            2 => Self::Retail,
8283            _ => Self::UnknownValue(line_of_business::UnknownValue(
8284                wkt::internal::UnknownEnumValue::Integer(value),
8285            )),
8286        }
8287    }
8288}
8289
8290impl std::convert::From<&str> for LineOfBusiness {
8291    fn from(value: &str) -> Self {
8292        use std::string::ToString;
8293        match value {
8294            "LINE_OF_BUSINESS_UNSPECIFIED" => Self::Unspecified,
8295            "COMMERCIAL" => Self::Commercial,
8296            "RETAIL" => Self::Retail,
8297            _ => Self::UnknownValue(line_of_business::UnknownValue(
8298                wkt::internal::UnknownEnumValue::String(value.to_string()),
8299            )),
8300        }
8301    }
8302}
8303
8304impl serde::ser::Serialize for LineOfBusiness {
8305    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8306    where
8307        S: serde::Serializer,
8308    {
8309        match self {
8310            Self::Unspecified => serializer.serialize_i32(0),
8311            Self::Commercial => serializer.serialize_i32(1),
8312            Self::Retail => serializer.serialize_i32(2),
8313            Self::UnknownValue(u) => u.0.serialize(serializer),
8314        }
8315    }
8316}
8317
8318impl<'de> serde::de::Deserialize<'de> for LineOfBusiness {
8319    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8320    where
8321        D: serde::Deserializer<'de>,
8322    {
8323        deserializer.deserialize_any(wkt::internal::EnumVisitor::<LineOfBusiness>::new(
8324            ".google.cloud.financialservices.v1.LineOfBusiness",
8325        ))
8326    }
8327}