google_cloud_aiplatform_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#![allow(rustdoc::invalid_html_tags)]
20#![no_implicit_prelude]
21extern crate api;
22extern crate async_trait;
23extern crate bytes;
24extern crate gax;
25extern crate gaxi;
26extern crate gtype;
27extern crate iam_v1;
28extern crate lazy_static;
29extern crate location;
30extern crate longrunning;
31extern crate lro;
32extern crate reqwest;
33extern crate rpc;
34extern crate serde;
35extern crate serde_json;
36extern crate serde_with;
37extern crate std;
38extern crate tracing;
39extern crate wkt;
40
41mod debug;
42mod deserialize;
43mod serialize;
44
45/// Used to assign specific AnnotationSpec to a particular area of a DataItem or
46/// the whole part of the DataItem.
47#[cfg(feature = "dataset-service")]
48#[derive(Clone, Default, PartialEq)]
49#[non_exhaustive]
50pub struct Annotation {
51    /// Output only. Resource name of the Annotation.
52    pub name: std::string::String,
53
54    /// Required. Google Cloud Storage URI points to a YAML file describing
55    /// [payload][google.cloud.aiplatform.v1.Annotation.payload]. The schema is
56    /// defined as an [OpenAPI 3.0.2 Schema
57    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
58    /// The schema files that can be used here are found in
59    /// gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the
60    /// chosen schema must be consistent with the parent Dataset's
61    /// [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri].
62    ///
63    /// [google.cloud.aiplatform.v1.Annotation.payload]: crate::model::Annotation::payload
64    /// [google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]: crate::model::Dataset::metadata_schema_uri
65    pub payload_schema_uri: std::string::String,
66
67    /// Required. The schema of the payload can be found in
68    /// [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri].
69    ///
70    /// [google.cloud.aiplatform.v1.Annotation.payload_schema_uri]: crate::model::Annotation::payload_schema_uri
71    pub payload: std::option::Option<wkt::Value>,
72
73    /// Output only. Timestamp when this Annotation was created.
74    pub create_time: std::option::Option<wkt::Timestamp>,
75
76    /// Output only. Timestamp when this Annotation was last updated.
77    pub update_time: std::option::Option<wkt::Timestamp>,
78
79    /// Optional. Used to perform consistent read-modify-write updates. If not set,
80    /// a blind "overwrite" update happens.
81    pub etag: std::string::String,
82
83    /// Output only. The source of the Annotation.
84    pub annotation_source: std::option::Option<crate::model::UserActionReference>,
85
86    /// Optional. The labels with user-defined metadata to organize your
87    /// Annotations.
88    ///
89    /// Label keys and values can be no longer than 64 characters
90    /// (Unicode codepoints), can only contain lowercase letters, numeric
91    /// characters, underscores and dashes. International characters are allowed.
92    /// No more than 64 user labels can be associated with one Annotation(System
93    /// labels are excluded).
94    ///
95    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
96    /// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
97    /// and are immutable. Following system labels exist for each Annotation:
98    ///
99    /// * "aiplatform.googleapis.com/annotation_set_name":
100    ///   optional, name of the UI's annotation set this Annotation belongs to.
101    ///   If not set, the Annotation is not visible in the UI.
102    ///
103    /// * "aiplatform.googleapis.com/payload_schema":
104    ///   output only, its value is the
105    ///   [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
106    ///   title.
107    ///
108    ///
109    /// [google.cloud.aiplatform.v1.Annotation.payload_schema_uri]: crate::model::Annotation::payload_schema_uri
110    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
111
112    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
113}
114
115#[cfg(feature = "dataset-service")]
116impl Annotation {
117    pub fn new() -> Self {
118        std::default::Default::default()
119    }
120
121    /// Sets the value of [name][crate::model::Annotation::name].
122    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
123        self.name = v.into();
124        self
125    }
126
127    /// Sets the value of [payload_schema_uri][crate::model::Annotation::payload_schema_uri].
128    pub fn set_payload_schema_uri<T: std::convert::Into<std::string::String>>(
129        mut self,
130        v: T,
131    ) -> Self {
132        self.payload_schema_uri = v.into();
133        self
134    }
135
136    /// Sets the value of [payload][crate::model::Annotation::payload].
137    pub fn set_payload<T>(mut self, v: T) -> Self
138    where
139        T: std::convert::Into<wkt::Value>,
140    {
141        self.payload = std::option::Option::Some(v.into());
142        self
143    }
144
145    /// Sets or clears the value of [payload][crate::model::Annotation::payload].
146    pub fn set_or_clear_payload<T>(mut self, v: std::option::Option<T>) -> Self
147    where
148        T: std::convert::Into<wkt::Value>,
149    {
150        self.payload = v.map(|x| x.into());
151        self
152    }
153
154    /// Sets the value of [create_time][crate::model::Annotation::create_time].
155    pub fn set_create_time<T>(mut self, v: T) -> Self
156    where
157        T: std::convert::Into<wkt::Timestamp>,
158    {
159        self.create_time = std::option::Option::Some(v.into());
160        self
161    }
162
163    /// Sets or clears the value of [create_time][crate::model::Annotation::create_time].
164    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
165    where
166        T: std::convert::Into<wkt::Timestamp>,
167    {
168        self.create_time = v.map(|x| x.into());
169        self
170    }
171
172    /// Sets the value of [update_time][crate::model::Annotation::update_time].
173    pub fn set_update_time<T>(mut self, v: T) -> Self
174    where
175        T: std::convert::Into<wkt::Timestamp>,
176    {
177        self.update_time = std::option::Option::Some(v.into());
178        self
179    }
180
181    /// Sets or clears the value of [update_time][crate::model::Annotation::update_time].
182    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
183    where
184        T: std::convert::Into<wkt::Timestamp>,
185    {
186        self.update_time = v.map(|x| x.into());
187        self
188    }
189
190    /// Sets the value of [etag][crate::model::Annotation::etag].
191    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
192        self.etag = v.into();
193        self
194    }
195
196    /// Sets the value of [annotation_source][crate::model::Annotation::annotation_source].
197    pub fn set_annotation_source<T>(mut self, v: T) -> Self
198    where
199        T: std::convert::Into<crate::model::UserActionReference>,
200    {
201        self.annotation_source = std::option::Option::Some(v.into());
202        self
203    }
204
205    /// Sets or clears the value of [annotation_source][crate::model::Annotation::annotation_source].
206    pub fn set_or_clear_annotation_source<T>(mut self, v: std::option::Option<T>) -> Self
207    where
208        T: std::convert::Into<crate::model::UserActionReference>,
209    {
210        self.annotation_source = v.map(|x| x.into());
211        self
212    }
213
214    /// Sets the value of [labels][crate::model::Annotation::labels].
215    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
216    where
217        T: std::iter::IntoIterator<Item = (K, V)>,
218        K: std::convert::Into<std::string::String>,
219        V: std::convert::Into<std::string::String>,
220    {
221        use std::iter::Iterator;
222        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
223        self
224    }
225}
226
227#[cfg(feature = "dataset-service")]
228impl wkt::message::Message for Annotation {
229    fn typename() -> &'static str {
230        "type.googleapis.com/google.cloud.aiplatform.v1.Annotation"
231    }
232}
233
234/// Identifies a concept with which DataItems may be annotated with.
235#[cfg(feature = "dataset-service")]
236#[derive(Clone, Default, PartialEq)]
237#[non_exhaustive]
238pub struct AnnotationSpec {
239    /// Output only. Resource name of the AnnotationSpec.
240    pub name: std::string::String,
241
242    /// Required. The user-defined name of the AnnotationSpec.
243    /// The name can be up to 128 characters long and can consist of any UTF-8
244    /// characters.
245    pub display_name: std::string::String,
246
247    /// Output only. Timestamp when this AnnotationSpec was created.
248    pub create_time: std::option::Option<wkt::Timestamp>,
249
250    /// Output only. Timestamp when AnnotationSpec was last updated.
251    pub update_time: std::option::Option<wkt::Timestamp>,
252
253    /// Optional. Used to perform consistent read-modify-write updates. If not set,
254    /// a blind "overwrite" update happens.
255    pub etag: std::string::String,
256
257    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
258}
259
260#[cfg(feature = "dataset-service")]
261impl AnnotationSpec {
262    pub fn new() -> Self {
263        std::default::Default::default()
264    }
265
266    /// Sets the value of [name][crate::model::AnnotationSpec::name].
267    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
268        self.name = v.into();
269        self
270    }
271
272    /// Sets the value of [display_name][crate::model::AnnotationSpec::display_name].
273    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
274        self.display_name = v.into();
275        self
276    }
277
278    /// Sets the value of [create_time][crate::model::AnnotationSpec::create_time].
279    pub fn set_create_time<T>(mut self, v: T) -> Self
280    where
281        T: std::convert::Into<wkt::Timestamp>,
282    {
283        self.create_time = std::option::Option::Some(v.into());
284        self
285    }
286
287    /// Sets or clears the value of [create_time][crate::model::AnnotationSpec::create_time].
288    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
289    where
290        T: std::convert::Into<wkt::Timestamp>,
291    {
292        self.create_time = v.map(|x| x.into());
293        self
294    }
295
296    /// Sets the value of [update_time][crate::model::AnnotationSpec::update_time].
297    pub fn set_update_time<T>(mut self, v: T) -> Self
298    where
299        T: std::convert::Into<wkt::Timestamp>,
300    {
301        self.update_time = std::option::Option::Some(v.into());
302        self
303    }
304
305    /// Sets or clears the value of [update_time][crate::model::AnnotationSpec::update_time].
306    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
307    where
308        T: std::convert::Into<wkt::Timestamp>,
309    {
310        self.update_time = v.map(|x| x.into());
311        self
312    }
313
314    /// Sets the value of [etag][crate::model::AnnotationSpec::etag].
315    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
316        self.etag = v.into();
317        self
318    }
319}
320
321#[cfg(feature = "dataset-service")]
322impl wkt::message::Message for AnnotationSpec {
323    fn typename() -> &'static str {
324        "type.googleapis.com/google.cloud.aiplatform.v1.AnnotationSpec"
325    }
326}
327
328/// The generic reusable api auth config.
329#[cfg(feature = "vertex-rag-data-service")]
330#[derive(Clone, Default, PartialEq)]
331#[non_exhaustive]
332pub struct ApiAuth {
333    /// The auth config.
334    pub auth_config: std::option::Option<crate::model::api_auth::AuthConfig>,
335
336    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
337}
338
339#[cfg(feature = "vertex-rag-data-service")]
340impl ApiAuth {
341    pub fn new() -> Self {
342        std::default::Default::default()
343    }
344
345    /// Sets the value of [auth_config][crate::model::ApiAuth::auth_config].
346    ///
347    /// Note that all the setters affecting `auth_config` are mutually
348    /// exclusive.
349    pub fn set_auth_config<
350        T: std::convert::Into<std::option::Option<crate::model::api_auth::AuthConfig>>,
351    >(
352        mut self,
353        v: T,
354    ) -> Self {
355        self.auth_config = v.into();
356        self
357    }
358
359    /// The value of [auth_config][crate::model::ApiAuth::auth_config]
360    /// if it holds a `ApiKeyConfig`, `None` if the field is not set or
361    /// holds a different branch.
362    pub fn api_key_config(
363        &self,
364    ) -> std::option::Option<&std::boxed::Box<crate::model::api_auth::ApiKeyConfig>> {
365        #[allow(unreachable_patterns)]
366        self.auth_config.as_ref().and_then(|v| match v {
367            crate::model::api_auth::AuthConfig::ApiKeyConfig(v) => std::option::Option::Some(v),
368            _ => std::option::Option::None,
369        })
370    }
371
372    /// Sets the value of [auth_config][crate::model::ApiAuth::auth_config]
373    /// to hold a `ApiKeyConfig`.
374    ///
375    /// Note that all the setters affecting `auth_config` are
376    /// mutually exclusive.
377    pub fn set_api_key_config<
378        T: std::convert::Into<std::boxed::Box<crate::model::api_auth::ApiKeyConfig>>,
379    >(
380        mut self,
381        v: T,
382    ) -> Self {
383        self.auth_config =
384            std::option::Option::Some(crate::model::api_auth::AuthConfig::ApiKeyConfig(v.into()));
385        self
386    }
387}
388
389#[cfg(feature = "vertex-rag-data-service")]
390impl wkt::message::Message for ApiAuth {
391    fn typename() -> &'static str {
392        "type.googleapis.com/google.cloud.aiplatform.v1.ApiAuth"
393    }
394}
395
396/// Defines additional types related to [ApiAuth].
397#[cfg(feature = "vertex-rag-data-service")]
398pub mod api_auth {
399    #[allow(unused_imports)]
400    use super::*;
401
402    /// The API secret.
403    #[cfg(feature = "vertex-rag-data-service")]
404    #[derive(Clone, Default, PartialEq)]
405    #[non_exhaustive]
406    pub struct ApiKeyConfig {
407        /// Required. The SecretManager secret version resource name storing API key.
408        /// e.g. projects/{project}/secrets/{secret}/versions/{version}
409        pub api_key_secret_version: std::string::String,
410
411        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
412    }
413
414    #[cfg(feature = "vertex-rag-data-service")]
415    impl ApiKeyConfig {
416        pub fn new() -> Self {
417            std::default::Default::default()
418        }
419
420        /// Sets the value of [api_key_secret_version][crate::model::api_auth::ApiKeyConfig::api_key_secret_version].
421        pub fn set_api_key_secret_version<T: std::convert::Into<std::string::String>>(
422            mut self,
423            v: T,
424        ) -> Self {
425            self.api_key_secret_version = v.into();
426            self
427        }
428    }
429
430    #[cfg(feature = "vertex-rag-data-service")]
431    impl wkt::message::Message for ApiKeyConfig {
432        fn typename() -> &'static str {
433            "type.googleapis.com/google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig"
434        }
435    }
436
437    /// The auth config.
438    #[cfg(feature = "vertex-rag-data-service")]
439    #[derive(Clone, Debug, PartialEq)]
440    #[non_exhaustive]
441    pub enum AuthConfig {
442        /// The API secret.
443        ApiKeyConfig(std::boxed::Box<crate::model::api_auth::ApiKeyConfig>),
444    }
445}
446
447/// Instance of a general artifact.
448#[cfg(any(
449    feature = "metadata-service",
450    feature = "pipeline-service",
451    feature = "schedule-service",
452))]
453#[derive(Clone, Default, PartialEq)]
454#[non_exhaustive]
455pub struct Artifact {
456    /// Output only. The resource name of the Artifact.
457    pub name: std::string::String,
458
459    /// User provided display name of the Artifact.
460    /// May be up to 128 Unicode characters.
461    pub display_name: std::string::String,
462
463    /// The uniform resource identifier of the artifact file.
464    /// May be empty if there is no actual artifact file.
465    pub uri: std::string::String,
466
467    /// An eTag used to perform consistent read-modify-write updates. If not set, a
468    /// blind "overwrite" update happens.
469    pub etag: std::string::String,
470
471    /// The labels with user-defined metadata to organize your Artifacts.
472    ///
473    /// Label keys and values can be no longer than 64 characters
474    /// (Unicode codepoints), can only contain lowercase letters, numeric
475    /// characters, underscores and dashes. International characters are allowed.
476    /// No more than 64 user labels can be associated with one Artifact (System
477    /// labels are excluded).
478    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
479
480    /// Output only. Timestamp when this Artifact was created.
481    pub create_time: std::option::Option<wkt::Timestamp>,
482
483    /// Output only. Timestamp when this Artifact was last updated.
484    pub update_time: std::option::Option<wkt::Timestamp>,
485
486    /// The state of this Artifact. This is a property of the Artifact, and does
487    /// not imply or capture any ongoing process. This property is managed by
488    /// clients (such as Vertex AI Pipelines), and the system does not prescribe
489    /// or check the validity of state transitions.
490    pub state: crate::model::artifact::State,
491
492    /// The title of the schema describing the metadata.
493    ///
494    /// Schema title and version is expected to be registered in earlier Create
495    /// Schema calls. And both are used together as unique identifiers to identify
496    /// schemas within the local metadata store.
497    pub schema_title: std::string::String,
498
499    /// The version of the schema in schema_name to use.
500    ///
501    /// Schema title and version is expected to be registered in earlier Create
502    /// Schema calls. And both are used together as unique identifiers to identify
503    /// schemas within the local metadata store.
504    pub schema_version: std::string::String,
505
506    /// Properties of the Artifact.
507    /// Top level metadata keys' heading and trailing spaces will be trimmed.
508    /// The size of this field should not exceed 200KB.
509    pub metadata: std::option::Option<wkt::Struct>,
510
511    /// Description of the Artifact
512    pub description: std::string::String,
513
514    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
515}
516
517#[cfg(any(
518    feature = "metadata-service",
519    feature = "pipeline-service",
520    feature = "schedule-service",
521))]
522impl Artifact {
523    pub fn new() -> Self {
524        std::default::Default::default()
525    }
526
527    /// Sets the value of [name][crate::model::Artifact::name].
528    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
529        self.name = v.into();
530        self
531    }
532
533    /// Sets the value of [display_name][crate::model::Artifact::display_name].
534    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
535        self.display_name = v.into();
536        self
537    }
538
539    /// Sets the value of [uri][crate::model::Artifact::uri].
540    pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
541        self.uri = v.into();
542        self
543    }
544
545    /// Sets the value of [etag][crate::model::Artifact::etag].
546    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
547        self.etag = v.into();
548        self
549    }
550
551    /// Sets the value of [labels][crate::model::Artifact::labels].
552    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
553    where
554        T: std::iter::IntoIterator<Item = (K, V)>,
555        K: std::convert::Into<std::string::String>,
556        V: std::convert::Into<std::string::String>,
557    {
558        use std::iter::Iterator;
559        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
560        self
561    }
562
563    /// Sets the value of [create_time][crate::model::Artifact::create_time].
564    pub fn set_create_time<T>(mut self, v: T) -> Self
565    where
566        T: std::convert::Into<wkt::Timestamp>,
567    {
568        self.create_time = std::option::Option::Some(v.into());
569        self
570    }
571
572    /// Sets or clears the value of [create_time][crate::model::Artifact::create_time].
573    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
574    where
575        T: std::convert::Into<wkt::Timestamp>,
576    {
577        self.create_time = v.map(|x| x.into());
578        self
579    }
580
581    /// Sets the value of [update_time][crate::model::Artifact::update_time].
582    pub fn set_update_time<T>(mut self, v: T) -> Self
583    where
584        T: std::convert::Into<wkt::Timestamp>,
585    {
586        self.update_time = std::option::Option::Some(v.into());
587        self
588    }
589
590    /// Sets or clears the value of [update_time][crate::model::Artifact::update_time].
591    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
592    where
593        T: std::convert::Into<wkt::Timestamp>,
594    {
595        self.update_time = v.map(|x| x.into());
596        self
597    }
598
599    /// Sets the value of [state][crate::model::Artifact::state].
600    pub fn set_state<T: std::convert::Into<crate::model::artifact::State>>(mut self, v: T) -> Self {
601        self.state = v.into();
602        self
603    }
604
605    /// Sets the value of [schema_title][crate::model::Artifact::schema_title].
606    pub fn set_schema_title<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
607        self.schema_title = v.into();
608        self
609    }
610
611    /// Sets the value of [schema_version][crate::model::Artifact::schema_version].
612    pub fn set_schema_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
613        self.schema_version = v.into();
614        self
615    }
616
617    /// Sets the value of [metadata][crate::model::Artifact::metadata].
618    pub fn set_metadata<T>(mut self, v: T) -> Self
619    where
620        T: std::convert::Into<wkt::Struct>,
621    {
622        self.metadata = std::option::Option::Some(v.into());
623        self
624    }
625
626    /// Sets or clears the value of [metadata][crate::model::Artifact::metadata].
627    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
628    where
629        T: std::convert::Into<wkt::Struct>,
630    {
631        self.metadata = v.map(|x| x.into());
632        self
633    }
634
635    /// Sets the value of [description][crate::model::Artifact::description].
636    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
637        self.description = v.into();
638        self
639    }
640}
641
642#[cfg(any(
643    feature = "metadata-service",
644    feature = "pipeline-service",
645    feature = "schedule-service",
646))]
647impl wkt::message::Message for Artifact {
648    fn typename() -> &'static str {
649        "type.googleapis.com/google.cloud.aiplatform.v1.Artifact"
650    }
651}
652
653/// Defines additional types related to [Artifact].
654#[cfg(any(
655    feature = "metadata-service",
656    feature = "pipeline-service",
657    feature = "schedule-service",
658))]
659pub mod artifact {
660    #[allow(unused_imports)]
661    use super::*;
662
663    /// Describes the state of the Artifact.
664    ///
665    /// # Working with unknown values
666    ///
667    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
668    /// additional enum variants at any time. Adding new variants is not considered
669    /// a breaking change. Applications should write their code in anticipation of:
670    ///
671    /// - New values appearing in future releases of the client library, **and**
672    /// - New values received dynamically, without application changes.
673    ///
674    /// Please consult the [Working with enums] section in the user guide for some
675    /// guidelines.
676    ///
677    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
678    #[cfg(any(
679        feature = "metadata-service",
680        feature = "pipeline-service",
681        feature = "schedule-service",
682    ))]
683    #[derive(Clone, Debug, PartialEq)]
684    #[non_exhaustive]
685    pub enum State {
686        /// Unspecified state for the Artifact.
687        Unspecified,
688        /// A state used by systems like Vertex AI Pipelines to indicate that the
689        /// underlying data item represented by this Artifact is being created.
690        Pending,
691        /// A state indicating that the Artifact should exist, unless something
692        /// external to the system deletes it.
693        Live,
694        /// If set, the enum was initialized with an unknown value.
695        ///
696        /// Applications can examine the value using [State::value] or
697        /// [State::name].
698        UnknownValue(state::UnknownValue),
699    }
700
701    #[doc(hidden)]
702    #[cfg(any(
703        feature = "metadata-service",
704        feature = "pipeline-service",
705        feature = "schedule-service",
706    ))]
707    pub mod state {
708        #[allow(unused_imports)]
709        use super::*;
710        #[derive(Clone, Debug, PartialEq)]
711        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
712    }
713
714    #[cfg(any(
715        feature = "metadata-service",
716        feature = "pipeline-service",
717        feature = "schedule-service",
718    ))]
719    impl State {
720        /// Gets the enum value.
721        ///
722        /// Returns `None` if the enum contains an unknown value deserialized from
723        /// the string representation of enums.
724        pub fn value(&self) -> std::option::Option<i32> {
725            match self {
726                Self::Unspecified => std::option::Option::Some(0),
727                Self::Pending => std::option::Option::Some(1),
728                Self::Live => std::option::Option::Some(2),
729                Self::UnknownValue(u) => u.0.value(),
730            }
731        }
732
733        /// Gets the enum value as a string.
734        ///
735        /// Returns `None` if the enum contains an unknown value deserialized from
736        /// the integer representation of enums.
737        pub fn name(&self) -> std::option::Option<&str> {
738            match self {
739                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
740                Self::Pending => std::option::Option::Some("PENDING"),
741                Self::Live => std::option::Option::Some("LIVE"),
742                Self::UnknownValue(u) => u.0.name(),
743            }
744        }
745    }
746
747    #[cfg(any(
748        feature = "metadata-service",
749        feature = "pipeline-service",
750        feature = "schedule-service",
751    ))]
752    impl std::default::Default for State {
753        fn default() -> Self {
754            use std::convert::From;
755            Self::from(0)
756        }
757    }
758
759    #[cfg(any(
760        feature = "metadata-service",
761        feature = "pipeline-service",
762        feature = "schedule-service",
763    ))]
764    impl std::fmt::Display for State {
765        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
766            wkt::internal::display_enum(f, self.name(), self.value())
767        }
768    }
769
770    #[cfg(any(
771        feature = "metadata-service",
772        feature = "pipeline-service",
773        feature = "schedule-service",
774    ))]
775    impl std::convert::From<i32> for State {
776        fn from(value: i32) -> Self {
777            match value {
778                0 => Self::Unspecified,
779                1 => Self::Pending,
780                2 => Self::Live,
781                _ => Self::UnknownValue(state::UnknownValue(
782                    wkt::internal::UnknownEnumValue::Integer(value),
783                )),
784            }
785        }
786    }
787
788    #[cfg(any(
789        feature = "metadata-service",
790        feature = "pipeline-service",
791        feature = "schedule-service",
792    ))]
793    impl std::convert::From<&str> for State {
794        fn from(value: &str) -> Self {
795            use std::string::ToString;
796            match value {
797                "STATE_UNSPECIFIED" => Self::Unspecified,
798                "PENDING" => Self::Pending,
799                "LIVE" => Self::Live,
800                _ => Self::UnknownValue(state::UnknownValue(
801                    wkt::internal::UnknownEnumValue::String(value.to_string()),
802                )),
803            }
804        }
805    }
806
807    #[cfg(any(
808        feature = "metadata-service",
809        feature = "pipeline-service",
810        feature = "schedule-service",
811    ))]
812    impl serde::ser::Serialize for State {
813        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
814        where
815            S: serde::Serializer,
816        {
817            match self {
818                Self::Unspecified => serializer.serialize_i32(0),
819                Self::Pending => serializer.serialize_i32(1),
820                Self::Live => serializer.serialize_i32(2),
821                Self::UnknownValue(u) => u.0.serialize(serializer),
822            }
823        }
824    }
825
826    #[cfg(any(
827        feature = "metadata-service",
828        feature = "pipeline-service",
829        feature = "schedule-service",
830    ))]
831    impl<'de> serde::de::Deserialize<'de> for State {
832        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
833        where
834            D: serde::Deserializer<'de>,
835        {
836            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
837                ".google.cloud.aiplatform.v1.Artifact.State",
838            ))
839        }
840    }
841}
842
843/// A job that uses a
844/// [Model][google.cloud.aiplatform.v1.BatchPredictionJob.model] to produce
845/// predictions on multiple [input
846/// instances][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If
847/// predictions for significant portion of the instances fail, the job may finish
848/// without attempting predictions for all remaining instances.
849///
850/// [google.cloud.aiplatform.v1.BatchPredictionJob.input_config]: crate::model::BatchPredictionJob::input_config
851/// [google.cloud.aiplatform.v1.BatchPredictionJob.model]: crate::model::BatchPredictionJob::model
852#[cfg(feature = "job-service")]
853#[derive(Clone, Default, PartialEq)]
854#[non_exhaustive]
855pub struct BatchPredictionJob {
856    /// Output only. Resource name of the BatchPredictionJob.
857    pub name: std::string::String,
858
859    /// Required. The user-defined name of this BatchPredictionJob.
860    pub display_name: std::string::String,
861
862    /// The name of the Model resource that produces the predictions via this job,
863    /// must share the same ancestor Location.
864    /// Starting this job has no impact on any existing deployments of the Model
865    /// and their resources.
866    /// Exactly one of model and unmanaged_container_model must be set.
867    ///
868    /// The model resource name may contain version id or version alias to specify
869    /// the version.
870    /// Example: `projects/{project}/locations/{location}/models/{model}@2`
871    /// or
872    /// `projects/{project}/locations/{location}/models/{model}@golden`
873    /// if no version is specified, the default version will be deployed.
874    ///
875    /// The model resource could also be a publisher model.
876    /// Example: `publishers/{publisher}/models/{model}`
877    /// or
878    /// `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`
879    pub model: std::string::String,
880
881    /// Output only. The version ID of the Model that produces the predictions via
882    /// this job.
883    pub model_version_id: std::string::String,
884
885    /// Contains model information necessary to perform batch prediction without
886    /// requiring uploading to model registry.
887    /// Exactly one of model and unmanaged_container_model must be set.
888    pub unmanaged_container_model: std::option::Option<crate::model::UnmanagedContainerModel>,
889
890    /// Required. Input configuration of the instances on which predictions are
891    /// performed. The schema of any single instance may be specified via the
892    /// [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
893    /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
894    /// [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
895    ///
896    /// [google.cloud.aiplatform.v1.BatchPredictionJob.model]: crate::model::BatchPredictionJob::model
897    /// [google.cloud.aiplatform.v1.Model.predict_schemata]: crate::model::Model::predict_schemata
898    /// [google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]: crate::model::PredictSchemata::instance_schema_uri
899    pub input_config: std::option::Option<crate::model::batch_prediction_job::InputConfig>,
900
901    /// Configuration for how to convert batch prediction input instances to the
902    /// prediction instances that are sent to the Model.
903    pub instance_config: std::option::Option<crate::model::batch_prediction_job::InstanceConfig>,
904
905    /// The parameters that govern the predictions. The schema of the parameters
906    /// may be specified via the
907    /// [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
908    /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
909    /// [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
910    ///
911    /// [google.cloud.aiplatform.v1.BatchPredictionJob.model]: crate::model::BatchPredictionJob::model
912    /// [google.cloud.aiplatform.v1.Model.predict_schemata]: crate::model::Model::predict_schemata
913    /// [google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]: crate::model::PredictSchemata::parameters_schema_uri
914    pub model_parameters: std::option::Option<wkt::Value>,
915
916    /// Required. The Configuration specifying where output predictions should
917    /// be written.
918    /// The schema of any single prediction may be specified as a concatenation
919    /// of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
920    /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
921    /// [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
922    /// and
923    /// [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
924    ///
925    /// [google.cloud.aiplatform.v1.BatchPredictionJob.model]: crate::model::BatchPredictionJob::model
926    /// [google.cloud.aiplatform.v1.Model.predict_schemata]: crate::model::Model::predict_schemata
927    /// [google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]: crate::model::PredictSchemata::instance_schema_uri
928    /// [google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri]: crate::model::PredictSchemata::prediction_schema_uri
929    pub output_config: std::option::Option<crate::model::batch_prediction_job::OutputConfig>,
930
931    /// The config of resources used by the Model during the batch prediction. If
932    /// the Model
933    /// [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]
934    /// DEDICATED_RESOURCES this config may be provided (and the job will use these
935    /// resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
936    /// must be provided.
937    ///
938    /// [google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]: crate::model::Model::supported_deployment_resources_types
939    pub dedicated_resources: std::option::Option<crate::model::BatchDedicatedResources>,
940
941    /// The service account that the DeployedModel's container runs as. If not
942    /// specified, a system generated one will be used, which
943    /// has minimal permissions and the custom container, if used, may not have
944    /// enough permission to access other Google Cloud resources.
945    ///
946    /// Users deploying the Model must have the `iam.serviceAccounts.actAs`
947    /// permission on this service account.
948    pub service_account: std::string::String,
949
950    /// Immutable. Parameters configuring the batch behavior. Currently only
951    /// applicable when
952    /// [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources]
953    /// are used (in other cases Vertex AI does the tuning itself).
954    ///
955    /// [google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources]: crate::model::BatchPredictionJob::dedicated_resources
956    pub manual_batch_tuning_parameters:
957        std::option::Option<crate::model::ManualBatchTuningParameters>,
958
959    /// Generate explanation with the batch prediction results.
960    ///
961    /// When set to `true`, the batch prediction output changes based on the
962    /// `predictions_format` field of the
963    /// [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]
964    /// object:
965    ///
966    /// * `bigquery`: output includes a column named `explanation`. The value
967    ///   is a struct that conforms to the
968    ///   [Explanation][google.cloud.aiplatform.v1.Explanation] object.
969    /// * `jsonl`: The JSON objects on each line include an additional entry
970    ///   keyed `explanation`. The value of the entry is a JSON object that
971    ///   conforms to the [Explanation][google.cloud.aiplatform.v1.Explanation]
972    ///   object.
973    /// * `csv`: Generating explanations for CSV format is not supported.
974    ///
975    /// If this field is set to true, either the
976    /// [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
977    /// or
978    /// [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec]
979    /// must be populated.
980    ///
981    /// [google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec]: crate::model::BatchPredictionJob::explanation_spec
982    /// [google.cloud.aiplatform.v1.BatchPredictionJob.output_config]: crate::model::BatchPredictionJob::output_config
983    /// [google.cloud.aiplatform.v1.Explanation]: crate::model::Explanation
984    /// [google.cloud.aiplatform.v1.Model.explanation_spec]: crate::model::Model::explanation_spec
985    pub generate_explanation: bool,
986
987    /// Explanation configuration for this BatchPredictionJob. Can be
988    /// specified only if
989    /// [generate_explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation]
990    /// is set to `true`.
991    ///
992    /// This value overrides the value of
993    /// [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
994    /// All fields of
995    /// [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec]
996    /// are optional in the request. If a field of the
997    /// [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec]
998    /// object is not populated, the corresponding field of the
999    /// [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
1000    /// object is inherited.
1001    ///
1002    /// [google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec]: crate::model::BatchPredictionJob::explanation_spec
1003    /// [google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation]: crate::model::BatchPredictionJob::generate_explanation
1004    /// [google.cloud.aiplatform.v1.Model.explanation_spec]: crate::model::Model::explanation_spec
1005    pub explanation_spec: std::option::Option<crate::model::ExplanationSpec>,
1006
1007    /// Output only. Information further describing the output of this job.
1008    pub output_info: std::option::Option<crate::model::batch_prediction_job::OutputInfo>,
1009
1010    /// Output only. The detailed state of the job.
1011    pub state: crate::model::JobState,
1012
1013    /// Output only. Only populated when the job's state is JOB_STATE_FAILED or
1014    /// JOB_STATE_CANCELLED.
1015    pub error: std::option::Option<rpc::model::Status>,
1016
1017    /// Output only. Partial failures encountered.
1018    /// For example, single files that can't be read.
1019    /// This field never exceeds 20 entries.
1020    /// Status details fields contain standard Google Cloud error details.
1021    pub partial_failures: std::vec::Vec<rpc::model::Status>,
1022
1023    /// Output only. Information about resources that had been consumed by this
1024    /// job. Provided in real time at best effort basis, as well as a final value
1025    /// once the job completes.
1026    ///
1027    /// Note: This field currently may be not populated for batch predictions that
1028    /// use AutoML Models.
1029    pub resources_consumed: std::option::Option<crate::model::ResourcesConsumed>,
1030
1031    /// Output only. Statistics on completed and failed prediction instances.
1032    pub completion_stats: std::option::Option<crate::model::CompletionStats>,
1033
1034    /// Output only. Time when the BatchPredictionJob was created.
1035    pub create_time: std::option::Option<wkt::Timestamp>,
1036
1037    /// Output only. Time when the BatchPredictionJob for the first time entered
1038    /// the `JOB_STATE_RUNNING` state.
1039    pub start_time: std::option::Option<wkt::Timestamp>,
1040
1041    /// Output only. Time when the BatchPredictionJob entered any of the following
1042    /// states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
1043    pub end_time: std::option::Option<wkt::Timestamp>,
1044
1045    /// Output only. Time when the BatchPredictionJob was most recently updated.
1046    pub update_time: std::option::Option<wkt::Timestamp>,
1047
1048    /// The labels with user-defined metadata to organize BatchPredictionJobs.
1049    ///
1050    /// Label keys and values can be no longer than 64 characters
1051    /// (Unicode codepoints), can only contain lowercase letters, numeric
1052    /// characters, underscores and dashes. International characters are allowed.
1053    ///
1054    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
1055    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1056
1057    /// Customer-managed encryption key options for a BatchPredictionJob. If this
1058    /// is set, then all resources created by the BatchPredictionJob will be
1059    /// encrypted with the provided encryption key.
1060    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
1061
1062    /// For custom-trained Models and AutoML Tabular Models, the container of the
1063    /// DeployedModel instances will send `stderr` and `stdout` streams to
1064    /// Cloud Logging by default. Please note that the logs incur cost,
1065    /// which are subject to [Cloud Logging
1066    /// pricing](https://cloud.google.com/logging/pricing).
1067    ///
1068    /// User can disable container logging by setting this flag to true.
1069    pub disable_container_logging: bool,
1070
1071    /// Output only. Reserved for future use.
1072    pub satisfies_pzs: bool,
1073
1074    /// Output only. Reserved for future use.
1075    pub satisfies_pzi: bool,
1076
1077    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1078}
1079
1080#[cfg(feature = "job-service")]
1081impl BatchPredictionJob {
1082    pub fn new() -> Self {
1083        std::default::Default::default()
1084    }
1085
1086    /// Sets the value of [name][crate::model::BatchPredictionJob::name].
1087    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1088        self.name = v.into();
1089        self
1090    }
1091
1092    /// Sets the value of [display_name][crate::model::BatchPredictionJob::display_name].
1093    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1094        self.display_name = v.into();
1095        self
1096    }
1097
1098    /// Sets the value of [model][crate::model::BatchPredictionJob::model].
1099    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1100        self.model = v.into();
1101        self
1102    }
1103
1104    /// Sets the value of [model_version_id][crate::model::BatchPredictionJob::model_version_id].
1105    pub fn set_model_version_id<T: std::convert::Into<std::string::String>>(
1106        mut self,
1107        v: T,
1108    ) -> Self {
1109        self.model_version_id = v.into();
1110        self
1111    }
1112
1113    /// Sets the value of [unmanaged_container_model][crate::model::BatchPredictionJob::unmanaged_container_model].
1114    pub fn set_unmanaged_container_model<T>(mut self, v: T) -> Self
1115    where
1116        T: std::convert::Into<crate::model::UnmanagedContainerModel>,
1117    {
1118        self.unmanaged_container_model = std::option::Option::Some(v.into());
1119        self
1120    }
1121
1122    /// Sets or clears the value of [unmanaged_container_model][crate::model::BatchPredictionJob::unmanaged_container_model].
1123    pub fn set_or_clear_unmanaged_container_model<T>(mut self, v: std::option::Option<T>) -> Self
1124    where
1125        T: std::convert::Into<crate::model::UnmanagedContainerModel>,
1126    {
1127        self.unmanaged_container_model = v.map(|x| x.into());
1128        self
1129    }
1130
1131    /// Sets the value of [input_config][crate::model::BatchPredictionJob::input_config].
1132    pub fn set_input_config<T>(mut self, v: T) -> Self
1133    where
1134        T: std::convert::Into<crate::model::batch_prediction_job::InputConfig>,
1135    {
1136        self.input_config = std::option::Option::Some(v.into());
1137        self
1138    }
1139
1140    /// Sets or clears the value of [input_config][crate::model::BatchPredictionJob::input_config].
1141    pub fn set_or_clear_input_config<T>(mut self, v: std::option::Option<T>) -> Self
1142    where
1143        T: std::convert::Into<crate::model::batch_prediction_job::InputConfig>,
1144    {
1145        self.input_config = v.map(|x| x.into());
1146        self
1147    }
1148
1149    /// Sets the value of [instance_config][crate::model::BatchPredictionJob::instance_config].
1150    pub fn set_instance_config<T>(mut self, v: T) -> Self
1151    where
1152        T: std::convert::Into<crate::model::batch_prediction_job::InstanceConfig>,
1153    {
1154        self.instance_config = std::option::Option::Some(v.into());
1155        self
1156    }
1157
1158    /// Sets or clears the value of [instance_config][crate::model::BatchPredictionJob::instance_config].
1159    pub fn set_or_clear_instance_config<T>(mut self, v: std::option::Option<T>) -> Self
1160    where
1161        T: std::convert::Into<crate::model::batch_prediction_job::InstanceConfig>,
1162    {
1163        self.instance_config = v.map(|x| x.into());
1164        self
1165    }
1166
1167    /// Sets the value of [model_parameters][crate::model::BatchPredictionJob::model_parameters].
1168    pub fn set_model_parameters<T>(mut self, v: T) -> Self
1169    where
1170        T: std::convert::Into<wkt::Value>,
1171    {
1172        self.model_parameters = std::option::Option::Some(v.into());
1173        self
1174    }
1175
1176    /// Sets or clears the value of [model_parameters][crate::model::BatchPredictionJob::model_parameters].
1177    pub fn set_or_clear_model_parameters<T>(mut self, v: std::option::Option<T>) -> Self
1178    where
1179        T: std::convert::Into<wkt::Value>,
1180    {
1181        self.model_parameters = v.map(|x| x.into());
1182        self
1183    }
1184
1185    /// Sets the value of [output_config][crate::model::BatchPredictionJob::output_config].
1186    pub fn set_output_config<T>(mut self, v: T) -> Self
1187    where
1188        T: std::convert::Into<crate::model::batch_prediction_job::OutputConfig>,
1189    {
1190        self.output_config = std::option::Option::Some(v.into());
1191        self
1192    }
1193
1194    /// Sets or clears the value of [output_config][crate::model::BatchPredictionJob::output_config].
1195    pub fn set_or_clear_output_config<T>(mut self, v: std::option::Option<T>) -> Self
1196    where
1197        T: std::convert::Into<crate::model::batch_prediction_job::OutputConfig>,
1198    {
1199        self.output_config = v.map(|x| x.into());
1200        self
1201    }
1202
1203    /// Sets the value of [dedicated_resources][crate::model::BatchPredictionJob::dedicated_resources].
1204    pub fn set_dedicated_resources<T>(mut self, v: T) -> Self
1205    where
1206        T: std::convert::Into<crate::model::BatchDedicatedResources>,
1207    {
1208        self.dedicated_resources = std::option::Option::Some(v.into());
1209        self
1210    }
1211
1212    /// Sets or clears the value of [dedicated_resources][crate::model::BatchPredictionJob::dedicated_resources].
1213    pub fn set_or_clear_dedicated_resources<T>(mut self, v: std::option::Option<T>) -> Self
1214    where
1215        T: std::convert::Into<crate::model::BatchDedicatedResources>,
1216    {
1217        self.dedicated_resources = v.map(|x| x.into());
1218        self
1219    }
1220
1221    /// Sets the value of [service_account][crate::model::BatchPredictionJob::service_account].
1222    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1223        self.service_account = v.into();
1224        self
1225    }
1226
1227    /// Sets the value of [manual_batch_tuning_parameters][crate::model::BatchPredictionJob::manual_batch_tuning_parameters].
1228    pub fn set_manual_batch_tuning_parameters<T>(mut self, v: T) -> Self
1229    where
1230        T: std::convert::Into<crate::model::ManualBatchTuningParameters>,
1231    {
1232        self.manual_batch_tuning_parameters = std::option::Option::Some(v.into());
1233        self
1234    }
1235
1236    /// Sets or clears the value of [manual_batch_tuning_parameters][crate::model::BatchPredictionJob::manual_batch_tuning_parameters].
1237    pub fn set_or_clear_manual_batch_tuning_parameters<T>(
1238        mut self,
1239        v: std::option::Option<T>,
1240    ) -> Self
1241    where
1242        T: std::convert::Into<crate::model::ManualBatchTuningParameters>,
1243    {
1244        self.manual_batch_tuning_parameters = v.map(|x| x.into());
1245        self
1246    }
1247
1248    /// Sets the value of [generate_explanation][crate::model::BatchPredictionJob::generate_explanation].
1249    pub fn set_generate_explanation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1250        self.generate_explanation = v.into();
1251        self
1252    }
1253
1254    /// Sets the value of [explanation_spec][crate::model::BatchPredictionJob::explanation_spec].
1255    pub fn set_explanation_spec<T>(mut self, v: T) -> Self
1256    where
1257        T: std::convert::Into<crate::model::ExplanationSpec>,
1258    {
1259        self.explanation_spec = std::option::Option::Some(v.into());
1260        self
1261    }
1262
1263    /// Sets or clears the value of [explanation_spec][crate::model::BatchPredictionJob::explanation_spec].
1264    pub fn set_or_clear_explanation_spec<T>(mut self, v: std::option::Option<T>) -> Self
1265    where
1266        T: std::convert::Into<crate::model::ExplanationSpec>,
1267    {
1268        self.explanation_spec = v.map(|x| x.into());
1269        self
1270    }
1271
1272    /// Sets the value of [output_info][crate::model::BatchPredictionJob::output_info].
1273    pub fn set_output_info<T>(mut self, v: T) -> Self
1274    where
1275        T: std::convert::Into<crate::model::batch_prediction_job::OutputInfo>,
1276    {
1277        self.output_info = std::option::Option::Some(v.into());
1278        self
1279    }
1280
1281    /// Sets or clears the value of [output_info][crate::model::BatchPredictionJob::output_info].
1282    pub fn set_or_clear_output_info<T>(mut self, v: std::option::Option<T>) -> Self
1283    where
1284        T: std::convert::Into<crate::model::batch_prediction_job::OutputInfo>,
1285    {
1286        self.output_info = v.map(|x| x.into());
1287        self
1288    }
1289
1290    /// Sets the value of [state][crate::model::BatchPredictionJob::state].
1291    pub fn set_state<T: std::convert::Into<crate::model::JobState>>(mut self, v: T) -> Self {
1292        self.state = v.into();
1293        self
1294    }
1295
1296    /// Sets the value of [error][crate::model::BatchPredictionJob::error].
1297    pub fn set_error<T>(mut self, v: T) -> Self
1298    where
1299        T: std::convert::Into<rpc::model::Status>,
1300    {
1301        self.error = std::option::Option::Some(v.into());
1302        self
1303    }
1304
1305    /// Sets or clears the value of [error][crate::model::BatchPredictionJob::error].
1306    pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
1307    where
1308        T: std::convert::Into<rpc::model::Status>,
1309    {
1310        self.error = v.map(|x| x.into());
1311        self
1312    }
1313
1314    /// Sets the value of [partial_failures][crate::model::BatchPredictionJob::partial_failures].
1315    pub fn set_partial_failures<T, V>(mut self, v: T) -> Self
1316    where
1317        T: std::iter::IntoIterator<Item = V>,
1318        V: std::convert::Into<rpc::model::Status>,
1319    {
1320        use std::iter::Iterator;
1321        self.partial_failures = v.into_iter().map(|i| i.into()).collect();
1322        self
1323    }
1324
1325    /// Sets the value of [resources_consumed][crate::model::BatchPredictionJob::resources_consumed].
1326    pub fn set_resources_consumed<T>(mut self, v: T) -> Self
1327    where
1328        T: std::convert::Into<crate::model::ResourcesConsumed>,
1329    {
1330        self.resources_consumed = std::option::Option::Some(v.into());
1331        self
1332    }
1333
1334    /// Sets or clears the value of [resources_consumed][crate::model::BatchPredictionJob::resources_consumed].
1335    pub fn set_or_clear_resources_consumed<T>(mut self, v: std::option::Option<T>) -> Self
1336    where
1337        T: std::convert::Into<crate::model::ResourcesConsumed>,
1338    {
1339        self.resources_consumed = v.map(|x| x.into());
1340        self
1341    }
1342
1343    /// Sets the value of [completion_stats][crate::model::BatchPredictionJob::completion_stats].
1344    pub fn set_completion_stats<T>(mut self, v: T) -> Self
1345    where
1346        T: std::convert::Into<crate::model::CompletionStats>,
1347    {
1348        self.completion_stats = std::option::Option::Some(v.into());
1349        self
1350    }
1351
1352    /// Sets or clears the value of [completion_stats][crate::model::BatchPredictionJob::completion_stats].
1353    pub fn set_or_clear_completion_stats<T>(mut self, v: std::option::Option<T>) -> Self
1354    where
1355        T: std::convert::Into<crate::model::CompletionStats>,
1356    {
1357        self.completion_stats = v.map(|x| x.into());
1358        self
1359    }
1360
1361    /// Sets the value of [create_time][crate::model::BatchPredictionJob::create_time].
1362    pub fn set_create_time<T>(mut self, v: T) -> Self
1363    where
1364        T: std::convert::Into<wkt::Timestamp>,
1365    {
1366        self.create_time = std::option::Option::Some(v.into());
1367        self
1368    }
1369
1370    /// Sets or clears the value of [create_time][crate::model::BatchPredictionJob::create_time].
1371    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1372    where
1373        T: std::convert::Into<wkt::Timestamp>,
1374    {
1375        self.create_time = v.map(|x| x.into());
1376        self
1377    }
1378
1379    /// Sets the value of [start_time][crate::model::BatchPredictionJob::start_time].
1380    pub fn set_start_time<T>(mut self, v: T) -> Self
1381    where
1382        T: std::convert::Into<wkt::Timestamp>,
1383    {
1384        self.start_time = std::option::Option::Some(v.into());
1385        self
1386    }
1387
1388    /// Sets or clears the value of [start_time][crate::model::BatchPredictionJob::start_time].
1389    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
1390    where
1391        T: std::convert::Into<wkt::Timestamp>,
1392    {
1393        self.start_time = v.map(|x| x.into());
1394        self
1395    }
1396
1397    /// Sets the value of [end_time][crate::model::BatchPredictionJob::end_time].
1398    pub fn set_end_time<T>(mut self, v: T) -> Self
1399    where
1400        T: std::convert::Into<wkt::Timestamp>,
1401    {
1402        self.end_time = std::option::Option::Some(v.into());
1403        self
1404    }
1405
1406    /// Sets or clears the value of [end_time][crate::model::BatchPredictionJob::end_time].
1407    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
1408    where
1409        T: std::convert::Into<wkt::Timestamp>,
1410    {
1411        self.end_time = v.map(|x| x.into());
1412        self
1413    }
1414
1415    /// Sets the value of [update_time][crate::model::BatchPredictionJob::update_time].
1416    pub fn set_update_time<T>(mut self, v: T) -> Self
1417    where
1418        T: std::convert::Into<wkt::Timestamp>,
1419    {
1420        self.update_time = std::option::Option::Some(v.into());
1421        self
1422    }
1423
1424    /// Sets or clears the value of [update_time][crate::model::BatchPredictionJob::update_time].
1425    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1426    where
1427        T: std::convert::Into<wkt::Timestamp>,
1428    {
1429        self.update_time = v.map(|x| x.into());
1430        self
1431    }
1432
1433    /// Sets the value of [labels][crate::model::BatchPredictionJob::labels].
1434    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1435    where
1436        T: std::iter::IntoIterator<Item = (K, V)>,
1437        K: std::convert::Into<std::string::String>,
1438        V: std::convert::Into<std::string::String>,
1439    {
1440        use std::iter::Iterator;
1441        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1442        self
1443    }
1444
1445    /// Sets the value of [encryption_spec][crate::model::BatchPredictionJob::encryption_spec].
1446    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
1447    where
1448        T: std::convert::Into<crate::model::EncryptionSpec>,
1449    {
1450        self.encryption_spec = std::option::Option::Some(v.into());
1451        self
1452    }
1453
1454    /// Sets or clears the value of [encryption_spec][crate::model::BatchPredictionJob::encryption_spec].
1455    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
1456    where
1457        T: std::convert::Into<crate::model::EncryptionSpec>,
1458    {
1459        self.encryption_spec = v.map(|x| x.into());
1460        self
1461    }
1462
1463    /// Sets the value of [disable_container_logging][crate::model::BatchPredictionJob::disable_container_logging].
1464    pub fn set_disable_container_logging<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1465        self.disable_container_logging = v.into();
1466        self
1467    }
1468
1469    /// Sets the value of [satisfies_pzs][crate::model::BatchPredictionJob::satisfies_pzs].
1470    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1471        self.satisfies_pzs = v.into();
1472        self
1473    }
1474
1475    /// Sets the value of [satisfies_pzi][crate::model::BatchPredictionJob::satisfies_pzi].
1476    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1477        self.satisfies_pzi = v.into();
1478        self
1479    }
1480}
1481
1482#[cfg(feature = "job-service")]
1483impl wkt::message::Message for BatchPredictionJob {
1484    fn typename() -> &'static str {
1485        "type.googleapis.com/google.cloud.aiplatform.v1.BatchPredictionJob"
1486    }
1487}
1488
1489/// Defines additional types related to [BatchPredictionJob].
1490#[cfg(feature = "job-service")]
1491pub mod batch_prediction_job {
1492    #[allow(unused_imports)]
1493    use super::*;
1494
1495    /// Configures the input to
1496    /// [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. See
1497    /// [Model.supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats]
1498    /// for Model's supported input formats, and how instances should be expressed
1499    /// via any of them.
1500    ///
1501    /// [google.cloud.aiplatform.v1.BatchPredictionJob]: crate::model::BatchPredictionJob
1502    /// [google.cloud.aiplatform.v1.Model.supported_input_storage_formats]: crate::model::Model::supported_input_storage_formats
1503    #[cfg(feature = "job-service")]
1504    #[derive(Clone, Default, PartialEq)]
1505    #[non_exhaustive]
1506    pub struct InputConfig {
1507        /// Required. The format in which instances are given, must be one of the
1508        /// [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
1509        /// [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats].
1510        ///
1511        /// [google.cloud.aiplatform.v1.BatchPredictionJob.model]: crate::model::BatchPredictionJob::model
1512        /// [google.cloud.aiplatform.v1.Model.supported_input_storage_formats]: crate::model::Model::supported_input_storage_formats
1513        pub instances_format: std::string::String,
1514
1515        /// Required. The source of the input.
1516        pub source: std::option::Option<crate::model::batch_prediction_job::input_config::Source>,
1517
1518        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1519    }
1520
1521    #[cfg(feature = "job-service")]
1522    impl InputConfig {
1523        pub fn new() -> Self {
1524            std::default::Default::default()
1525        }
1526
1527        /// Sets the value of [instances_format][crate::model::batch_prediction_job::InputConfig::instances_format].
1528        pub fn set_instances_format<T: std::convert::Into<std::string::String>>(
1529            mut self,
1530            v: T,
1531        ) -> Self {
1532            self.instances_format = v.into();
1533            self
1534        }
1535
1536        /// Sets the value of [source][crate::model::batch_prediction_job::InputConfig::source].
1537        ///
1538        /// Note that all the setters affecting `source` are mutually
1539        /// exclusive.
1540        pub fn set_source<
1541            T: std::convert::Into<
1542                    std::option::Option<crate::model::batch_prediction_job::input_config::Source>,
1543                >,
1544        >(
1545            mut self,
1546            v: T,
1547        ) -> Self {
1548            self.source = v.into();
1549            self
1550        }
1551
1552        /// The value of [source][crate::model::batch_prediction_job::InputConfig::source]
1553        /// if it holds a `GcsSource`, `None` if the field is not set or
1554        /// holds a different branch.
1555        pub fn gcs_source(&self) -> std::option::Option<&std::boxed::Box<crate::model::GcsSource>> {
1556            #[allow(unreachable_patterns)]
1557            self.source.as_ref().and_then(|v| match v {
1558                crate::model::batch_prediction_job::input_config::Source::GcsSource(v) => {
1559                    std::option::Option::Some(v)
1560                }
1561                _ => std::option::Option::None,
1562            })
1563        }
1564
1565        /// Sets the value of [source][crate::model::batch_prediction_job::InputConfig::source]
1566        /// to hold a `GcsSource`.
1567        ///
1568        /// Note that all the setters affecting `source` are
1569        /// mutually exclusive.
1570        pub fn set_gcs_source<T: std::convert::Into<std::boxed::Box<crate::model::GcsSource>>>(
1571            mut self,
1572            v: T,
1573        ) -> Self {
1574            self.source = std::option::Option::Some(
1575                crate::model::batch_prediction_job::input_config::Source::GcsSource(v.into()),
1576            );
1577            self
1578        }
1579
1580        /// The value of [source][crate::model::batch_prediction_job::InputConfig::source]
1581        /// if it holds a `BigquerySource`, `None` if the field is not set or
1582        /// holds a different branch.
1583        pub fn bigquery_source(
1584            &self,
1585        ) -> std::option::Option<&std::boxed::Box<crate::model::BigQuerySource>> {
1586            #[allow(unreachable_patterns)]
1587            self.source.as_ref().and_then(|v| match v {
1588                crate::model::batch_prediction_job::input_config::Source::BigquerySource(v) => {
1589                    std::option::Option::Some(v)
1590                }
1591                _ => std::option::Option::None,
1592            })
1593        }
1594
1595        /// Sets the value of [source][crate::model::batch_prediction_job::InputConfig::source]
1596        /// to hold a `BigquerySource`.
1597        ///
1598        /// Note that all the setters affecting `source` are
1599        /// mutually exclusive.
1600        pub fn set_bigquery_source<
1601            T: std::convert::Into<std::boxed::Box<crate::model::BigQuerySource>>,
1602        >(
1603            mut self,
1604            v: T,
1605        ) -> Self {
1606            self.source = std::option::Option::Some(
1607                crate::model::batch_prediction_job::input_config::Source::BigquerySource(v.into()),
1608            );
1609            self
1610        }
1611    }
1612
1613    #[cfg(feature = "job-service")]
1614    impl wkt::message::Message for InputConfig {
1615        fn typename() -> &'static str {
1616            "type.googleapis.com/google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig"
1617        }
1618    }
1619
1620    /// Defines additional types related to [InputConfig].
1621    #[cfg(feature = "job-service")]
1622    pub mod input_config {
1623        #[allow(unused_imports)]
1624        use super::*;
1625
1626        /// Required. The source of the input.
1627        #[cfg(feature = "job-service")]
1628        #[derive(Clone, Debug, PartialEq)]
1629        #[non_exhaustive]
1630        pub enum Source {
1631            /// The Cloud Storage location for the input instances.
1632            GcsSource(std::boxed::Box<crate::model::GcsSource>),
1633            /// The BigQuery location of the input table.
1634            /// The schema of the table should be in the format described by the given
1635            /// context OpenAPI Schema, if one is provided. The table may contain
1636            /// additional columns that are not described by the schema, and they will
1637            /// be ignored.
1638            BigquerySource(std::boxed::Box<crate::model::BigQuerySource>),
1639        }
1640    }
1641
1642    /// Configuration defining how to transform batch prediction input instances to
1643    /// the instances that the Model accepts.
1644    #[cfg(feature = "job-service")]
1645    #[derive(Clone, Default, PartialEq)]
1646    #[non_exhaustive]
1647    pub struct InstanceConfig {
1648        /// The format of the instance that the Model accepts. Vertex AI will
1649        /// convert compatible
1650        /// [batch prediction input instance
1651        /// formats][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.instances_format]
1652        /// to the specified format.
1653        ///
1654        /// Supported values are:
1655        ///
1656        /// * `object`: Each input is converted to JSON object format.
1657        ///
1658        ///   * For `bigquery`, each row is converted to an object.
1659        ///   * For `jsonl`, each line of the JSONL input must be an object.
1660        ///   * Does not apply to `csv`, `file-list`, `tf-record`, or
1661        ///     `tf-record-gzip`.
1662        /// * `array`: Each input is converted to JSON array format.
1663        ///
1664        ///   * For `bigquery`, each row is converted to an array. The order
1665        ///     of columns is determined by the BigQuery column order, unless
1666        ///     [included_fields][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.included_fields]
1667        ///     is populated.
1668        ///     [included_fields][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.included_fields]
1669        ///     must be populated for specifying field orders.
1670        ///   * For `jsonl`, if each line of the JSONL input is an object,
1671        ///     [included_fields][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.included_fields]
1672        ///     must be populated for specifying field orders.
1673        ///   * Does not apply to `csv`, `file-list`, `tf-record`, or
1674        ///     `tf-record-gzip`.
1675        ///
1676        /// If not specified, Vertex AI converts the batch prediction input as
1677        /// follows:
1678        ///
1679        /// * For `bigquery` and `csv`, the behavior is the same as `array`. The
1680        ///   order of columns is the same as defined in the file or table, unless
1681        ///   [included_fields][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.included_fields]
1682        ///   is populated.
1683        /// * For `jsonl`, the prediction instance format is determined by
1684        ///   each line of the input.
1685        /// * For `tf-record`/`tf-record-gzip`, each record will be converted to
1686        ///   an object in the format of `{"b64": <value>}`, where `<value>` is
1687        ///   the Base64-encoded string of the content of the record.
1688        /// * For `file-list`, each file in the list will be converted to an
1689        ///   object in the format of `{"b64": <value>}`, where `<value>` is
1690        ///   the Base64-encoded string of the content of the file.
1691        ///
1692        /// [google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.instances_format]: crate::model::batch_prediction_job::InputConfig::instances_format
1693        /// [google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.included_fields]: crate::model::batch_prediction_job::InstanceConfig::included_fields
1694        pub instance_type: std::string::String,
1695
1696        /// The name of the field that is considered as a key.
1697        ///
1698        /// The values identified by the key field is not included in the transformed
1699        /// instances that is sent to the Model. This is similar to
1700        /// specifying this name of the field in
1701        /// [excluded_fields][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.excluded_fields].
1702        /// In addition, the batch prediction output will not include the instances.
1703        /// Instead the output will only include the value of the key field, in a
1704        /// field named `key` in the output:
1705        ///
1706        /// * For `jsonl` output format, the output will have a `key` field
1707        ///   instead of the `instance` field.
1708        /// * For `csv`/`bigquery` output format, the output will have have a `key`
1709        ///   column instead of the instance feature columns.
1710        ///
1711        /// The input must be JSONL with objects at each line, CSV, BigQuery
1712        /// or TfRecord.
1713        ///
1714        /// [google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.excluded_fields]: crate::model::batch_prediction_job::InstanceConfig::excluded_fields
1715        pub key_field: std::string::String,
1716
1717        /// Fields that will be included in the prediction instance that is
1718        /// sent to the Model.
1719        ///
1720        /// If
1721        /// [instance_type][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.instance_type]
1722        /// is `array`, the order of field names in included_fields also determines
1723        /// the order of the values in the array.
1724        ///
1725        /// When included_fields is populated,
1726        /// [excluded_fields][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.excluded_fields]
1727        /// must be empty.
1728        ///
1729        /// The input must be JSONL with objects at each line, BigQuery
1730        /// or TfRecord.
1731        ///
1732        /// [google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.excluded_fields]: crate::model::batch_prediction_job::InstanceConfig::excluded_fields
1733        /// [google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.instance_type]: crate::model::batch_prediction_job::InstanceConfig::instance_type
1734        pub included_fields: std::vec::Vec<std::string::String>,
1735
1736        /// Fields that will be excluded in the prediction instance that is
1737        /// sent to the Model.
1738        ///
1739        /// Excluded will be attached to the batch prediction output if
1740        /// [key_field][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.key_field]
1741        /// is not specified.
1742        ///
1743        /// When excluded_fields is populated,
1744        /// [included_fields][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.included_fields]
1745        /// must be empty.
1746        ///
1747        /// The input must be JSONL with objects at each line, BigQuery
1748        /// or TfRecord.
1749        ///
1750        /// [google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.included_fields]: crate::model::batch_prediction_job::InstanceConfig::included_fields
1751        /// [google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.key_field]: crate::model::batch_prediction_job::InstanceConfig::key_field
1752        pub excluded_fields: std::vec::Vec<std::string::String>,
1753
1754        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1755    }
1756
1757    #[cfg(feature = "job-service")]
1758    impl InstanceConfig {
1759        pub fn new() -> Self {
1760            std::default::Default::default()
1761        }
1762
1763        /// Sets the value of [instance_type][crate::model::batch_prediction_job::InstanceConfig::instance_type].
1764        pub fn set_instance_type<T: std::convert::Into<std::string::String>>(
1765            mut self,
1766            v: T,
1767        ) -> Self {
1768            self.instance_type = v.into();
1769            self
1770        }
1771
1772        /// Sets the value of [key_field][crate::model::batch_prediction_job::InstanceConfig::key_field].
1773        pub fn set_key_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1774            self.key_field = v.into();
1775            self
1776        }
1777
1778        /// Sets the value of [included_fields][crate::model::batch_prediction_job::InstanceConfig::included_fields].
1779        pub fn set_included_fields<T, V>(mut self, v: T) -> Self
1780        where
1781            T: std::iter::IntoIterator<Item = V>,
1782            V: std::convert::Into<std::string::String>,
1783        {
1784            use std::iter::Iterator;
1785            self.included_fields = v.into_iter().map(|i| i.into()).collect();
1786            self
1787        }
1788
1789        /// Sets the value of [excluded_fields][crate::model::batch_prediction_job::InstanceConfig::excluded_fields].
1790        pub fn set_excluded_fields<T, V>(mut self, v: T) -> Self
1791        where
1792            T: std::iter::IntoIterator<Item = V>,
1793            V: std::convert::Into<std::string::String>,
1794        {
1795            use std::iter::Iterator;
1796            self.excluded_fields = v.into_iter().map(|i| i.into()).collect();
1797            self
1798        }
1799    }
1800
1801    #[cfg(feature = "job-service")]
1802    impl wkt::message::Message for InstanceConfig {
1803        fn typename() -> &'static str {
1804            "type.googleapis.com/google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig"
1805        }
1806    }
1807
1808    /// Configures the output of
1809    /// [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. See
1810    /// [Model.supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats]
1811    /// for supported output formats, and how predictions are expressed via any of
1812    /// them.
1813    ///
1814    /// [google.cloud.aiplatform.v1.BatchPredictionJob]: crate::model::BatchPredictionJob
1815    /// [google.cloud.aiplatform.v1.Model.supported_output_storage_formats]: crate::model::Model::supported_output_storage_formats
1816    #[cfg(feature = "job-service")]
1817    #[derive(Clone, Default, PartialEq)]
1818    #[non_exhaustive]
1819    pub struct OutputConfig {
1820        /// Required. The format in which Vertex AI gives the predictions, must be
1821        /// one of the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model]
1822        /// [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
1823        ///
1824        /// [google.cloud.aiplatform.v1.BatchPredictionJob.model]: crate::model::BatchPredictionJob::model
1825        /// [google.cloud.aiplatform.v1.Model.supported_output_storage_formats]: crate::model::Model::supported_output_storage_formats
1826        pub predictions_format: std::string::String,
1827
1828        /// Required. The destination of the output.
1829        pub destination:
1830            std::option::Option<crate::model::batch_prediction_job::output_config::Destination>,
1831
1832        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1833    }
1834
1835    #[cfg(feature = "job-service")]
1836    impl OutputConfig {
1837        pub fn new() -> Self {
1838            std::default::Default::default()
1839        }
1840
1841        /// Sets the value of [predictions_format][crate::model::batch_prediction_job::OutputConfig::predictions_format].
1842        pub fn set_predictions_format<T: std::convert::Into<std::string::String>>(
1843            mut self,
1844            v: T,
1845        ) -> Self {
1846            self.predictions_format = v.into();
1847            self
1848        }
1849
1850        /// Sets the value of [destination][crate::model::batch_prediction_job::OutputConfig::destination].
1851        ///
1852        /// Note that all the setters affecting `destination` are mutually
1853        /// exclusive.
1854        pub fn set_destination<
1855            T: std::convert::Into<
1856                    std::option::Option<
1857                        crate::model::batch_prediction_job::output_config::Destination,
1858                    >,
1859                >,
1860        >(
1861            mut self,
1862            v: T,
1863        ) -> Self {
1864            self.destination = v.into();
1865            self
1866        }
1867
1868        /// The value of [destination][crate::model::batch_prediction_job::OutputConfig::destination]
1869        /// if it holds a `GcsDestination`, `None` if the field is not set or
1870        /// holds a different branch.
1871        pub fn gcs_destination(
1872            &self,
1873        ) -> std::option::Option<&std::boxed::Box<crate::model::GcsDestination>> {
1874            #[allow(unreachable_patterns)]
1875            self.destination.as_ref().and_then(|v| match v {
1876                crate::model::batch_prediction_job::output_config::Destination::GcsDestination(
1877                    v,
1878                ) => std::option::Option::Some(v),
1879                _ => std::option::Option::None,
1880            })
1881        }
1882
1883        /// Sets the value of [destination][crate::model::batch_prediction_job::OutputConfig::destination]
1884        /// to hold a `GcsDestination`.
1885        ///
1886        /// Note that all the setters affecting `destination` are
1887        /// mutually exclusive.
1888        pub fn set_gcs_destination<
1889            T: std::convert::Into<std::boxed::Box<crate::model::GcsDestination>>,
1890        >(
1891            mut self,
1892            v: T,
1893        ) -> Self {
1894            self.destination = std::option::Option::Some(
1895                crate::model::batch_prediction_job::output_config::Destination::GcsDestination(
1896                    v.into(),
1897                ),
1898            );
1899            self
1900        }
1901
1902        /// The value of [destination][crate::model::batch_prediction_job::OutputConfig::destination]
1903        /// if it holds a `BigqueryDestination`, `None` if the field is not set or
1904        /// holds a different branch.
1905        pub fn bigquery_destination(
1906            &self,
1907        ) -> std::option::Option<&std::boxed::Box<crate::model::BigQueryDestination>> {
1908            #[allow(unreachable_patterns)]
1909            self.destination.as_ref().and_then(|v| match v {
1910                crate::model::batch_prediction_job::output_config::Destination::BigqueryDestination(v) => std::option::Option::Some(v),
1911                _ => std::option::Option::None,
1912            })
1913        }
1914
1915        /// Sets the value of [destination][crate::model::batch_prediction_job::OutputConfig::destination]
1916        /// to hold a `BigqueryDestination`.
1917        ///
1918        /// Note that all the setters affecting `destination` are
1919        /// mutually exclusive.
1920        pub fn set_bigquery_destination<
1921            T: std::convert::Into<std::boxed::Box<crate::model::BigQueryDestination>>,
1922        >(
1923            mut self,
1924            v: T,
1925        ) -> Self {
1926            self.destination = std::option::Option::Some(
1927                crate::model::batch_prediction_job::output_config::Destination::BigqueryDestination(
1928                    v.into(),
1929                ),
1930            );
1931            self
1932        }
1933    }
1934
1935    #[cfg(feature = "job-service")]
1936    impl wkt::message::Message for OutputConfig {
1937        fn typename() -> &'static str {
1938            "type.googleapis.com/google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig"
1939        }
1940    }
1941
1942    /// Defines additional types related to [OutputConfig].
1943    #[cfg(feature = "job-service")]
1944    pub mod output_config {
1945        #[allow(unused_imports)]
1946        use super::*;
1947
1948        /// Required. The destination of the output.
1949        #[cfg(feature = "job-service")]
1950        #[derive(Clone, Debug, PartialEq)]
1951        #[non_exhaustive]
1952        pub enum Destination {
1953            /// The Cloud Storage location of the directory where the output is
1954            /// to be written to. In the given directory a new directory is created.
1955            /// Its name is `prediction-<model-display-name>-<job-create-time>`,
1956            /// where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
1957            /// Inside of it files `predictions_0001.<extension>`,
1958            /// `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
1959            /// are created where `<extension>` depends on chosen
1960            /// [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format],
1961            /// and N may equal 0001 and depends on the total number of successfully
1962            /// predicted instances. If the Model has both
1963            /// [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
1964            /// and
1965            /// [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]
1966            /// schemata defined then each such file contains predictions as per the
1967            /// [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format].
1968            /// If prediction for any instance failed (partially or completely), then
1969            /// an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
1970            /// `errors_N.<extension>` files are created (N depends on total number
1971            /// of failed predictions). These files contain the failed instances,
1972            /// as per their schema, followed by an additional `error` field which as
1973            /// value has [google.rpc.Status][google.rpc.Status]
1974            /// containing only `code` and `message` fields.
1975            ///
1976            /// [google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format]: crate::model::batch_prediction_job::OutputConfig::predictions_format
1977            /// [google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]: crate::model::PredictSchemata::instance_schema_uri
1978            /// [google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]: crate::model::PredictSchemata::parameters_schema_uri
1979            /// [google.rpc.Status]: rpc::model::Status
1980            GcsDestination(std::boxed::Box<crate::model::GcsDestination>),
1981            /// The BigQuery project or dataset location where the output is to be
1982            /// written to. If project is provided, a new dataset is created with name
1983            /// `prediction_<model-display-name>_<job-create-time>`
1984            /// where \<model-display-name\> is made
1985            /// BigQuery-dataset-name compatible (for example, most special characters
1986            /// become underscores), and timestamp is in
1987            /// YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
1988            /// two tables will be created, `predictions`, and `errors`.
1989            /// If the Model has both
1990            /// [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
1991            /// and
1992            /// [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]
1993            /// schemata defined then the tables have columns as follows: The
1994            /// `predictions` table contains instances for which the prediction
1995            /// succeeded, it has columns as per a concatenation of the Model's
1996            /// instance and prediction schemata. The `errors` table contains rows for
1997            /// which the prediction has failed, it has instance columns, as per the
1998            /// instance schema, followed by a single "errors" column, which as values
1999            /// has [google.rpc.Status][google.rpc.Status]
2000            /// represented as a STRUCT, and containing only `code` and `message`.
2001            ///
2002            /// [google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]: crate::model::PredictSchemata::instance_schema_uri
2003            /// [google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]: crate::model::PredictSchemata::parameters_schema_uri
2004            /// [google.rpc.Status]: rpc::model::Status
2005            BigqueryDestination(std::boxed::Box<crate::model::BigQueryDestination>),
2006        }
2007    }
2008
2009    /// Further describes this job's output.
2010    /// Supplements
2011    /// [output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
2012    ///
2013    /// [google.cloud.aiplatform.v1.BatchPredictionJob.output_config]: crate::model::BatchPredictionJob::output_config
2014    #[cfg(feature = "job-service")]
2015    #[derive(Clone, Default, PartialEq)]
2016    #[non_exhaustive]
2017    pub struct OutputInfo {
2018        /// Output only. The name of the BigQuery table created, in
2019        /// `predictions_<timestamp>`
2020        /// format, into which the prediction output is written.
2021        /// Can be used by UI to generate the BigQuery output path, for example.
2022        pub bigquery_output_table: std::string::String,
2023
2024        /// The output location into which prediction output is written.
2025        pub output_location:
2026            std::option::Option<crate::model::batch_prediction_job::output_info::OutputLocation>,
2027
2028        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2029    }
2030
2031    #[cfg(feature = "job-service")]
2032    impl OutputInfo {
2033        pub fn new() -> Self {
2034            std::default::Default::default()
2035        }
2036
2037        /// Sets the value of [bigquery_output_table][crate::model::batch_prediction_job::OutputInfo::bigquery_output_table].
2038        pub fn set_bigquery_output_table<T: std::convert::Into<std::string::String>>(
2039            mut self,
2040            v: T,
2041        ) -> Self {
2042            self.bigquery_output_table = v.into();
2043            self
2044        }
2045
2046        /// Sets the value of [output_location][crate::model::batch_prediction_job::OutputInfo::output_location].
2047        ///
2048        /// Note that all the setters affecting `output_location` are mutually
2049        /// exclusive.
2050        pub fn set_output_location<
2051            T: std::convert::Into<
2052                    std::option::Option<
2053                        crate::model::batch_prediction_job::output_info::OutputLocation,
2054                    >,
2055                >,
2056        >(
2057            mut self,
2058            v: T,
2059        ) -> Self {
2060            self.output_location = v.into();
2061            self
2062        }
2063
2064        /// The value of [output_location][crate::model::batch_prediction_job::OutputInfo::output_location]
2065        /// if it holds a `GcsOutputDirectory`, `None` if the field is not set or
2066        /// holds a different branch.
2067        pub fn gcs_output_directory(&self) -> std::option::Option<&std::string::String> {
2068            #[allow(unreachable_patterns)]
2069            self.output_location.as_ref().and_then(|v| match v {
2070                crate::model::batch_prediction_job::output_info::OutputLocation::GcsOutputDirectory(v) => std::option::Option::Some(v),
2071                _ => std::option::Option::None,
2072            })
2073        }
2074
2075        /// Sets the value of [output_location][crate::model::batch_prediction_job::OutputInfo::output_location]
2076        /// to hold a `GcsOutputDirectory`.
2077        ///
2078        /// Note that all the setters affecting `output_location` are
2079        /// mutually exclusive.
2080        pub fn set_gcs_output_directory<T: std::convert::Into<std::string::String>>(
2081            mut self,
2082            v: T,
2083        ) -> Self {
2084            self.output_location = std::option::Option::Some(
2085                crate::model::batch_prediction_job::output_info::OutputLocation::GcsOutputDirectory(
2086                    v.into(),
2087                ),
2088            );
2089            self
2090        }
2091
2092        /// The value of [output_location][crate::model::batch_prediction_job::OutputInfo::output_location]
2093        /// if it holds a `BigqueryOutputDataset`, `None` if the field is not set or
2094        /// holds a different branch.
2095        pub fn bigquery_output_dataset(&self) -> std::option::Option<&std::string::String> {
2096            #[allow(unreachable_patterns)]
2097            self.output_location.as_ref().and_then(|v| match v {
2098                crate::model::batch_prediction_job::output_info::OutputLocation::BigqueryOutputDataset(v) => std::option::Option::Some(v),
2099                _ => std::option::Option::None,
2100            })
2101        }
2102
2103        /// Sets the value of [output_location][crate::model::batch_prediction_job::OutputInfo::output_location]
2104        /// to hold a `BigqueryOutputDataset`.
2105        ///
2106        /// Note that all the setters affecting `output_location` are
2107        /// mutually exclusive.
2108        pub fn set_bigquery_output_dataset<T: std::convert::Into<std::string::String>>(
2109            mut self,
2110            v: T,
2111        ) -> Self {
2112            self.output_location = std::option::Option::Some(
2113                crate::model::batch_prediction_job::output_info::OutputLocation::BigqueryOutputDataset(
2114                    v.into()
2115                )
2116            );
2117            self
2118        }
2119    }
2120
2121    #[cfg(feature = "job-service")]
2122    impl wkt::message::Message for OutputInfo {
2123        fn typename() -> &'static str {
2124            "type.googleapis.com/google.cloud.aiplatform.v1.BatchPredictionJob.OutputInfo"
2125        }
2126    }
2127
2128    /// Defines additional types related to [OutputInfo].
2129    #[cfg(feature = "job-service")]
2130    pub mod output_info {
2131        #[allow(unused_imports)]
2132        use super::*;
2133
2134        /// The output location into which prediction output is written.
2135        #[cfg(feature = "job-service")]
2136        #[derive(Clone, Debug, PartialEq)]
2137        #[non_exhaustive]
2138        pub enum OutputLocation {
2139            /// Output only. The full path of the Cloud Storage directory created, into
2140            /// which the prediction output is written.
2141            GcsOutputDirectory(std::string::String),
2142            /// Output only. The path of the BigQuery dataset created, in
2143            /// `bq://projectId.bqDatasetId`
2144            /// format, into which the prediction output is written.
2145            BigqueryOutputDataset(std::string::String),
2146        }
2147    }
2148}
2149
2150/// A resource used in LLM queries for users to explicitly specify what to cache
2151/// and how to cache.
2152#[cfg(feature = "gen-ai-cache-service")]
2153#[derive(Clone, Default, PartialEq)]
2154#[non_exhaustive]
2155pub struct CachedContent {
2156    /// Immutable. Identifier. The server-generated resource name of the cached
2157    /// content Format:
2158    /// projects/{project}/locations/{location}/cachedContents/{cached_content}
2159    pub name: std::string::String,
2160
2161    /// Optional. Immutable. The user-generated meaningful display name of the
2162    /// cached content.
2163    pub display_name: std::string::String,
2164
2165    /// Immutable. The name of the `Model` to use for cached content. Currently,
2166    /// only the published Gemini base models are supported, in form of
2167    /// projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
2168    pub model: std::string::String,
2169
2170    /// Optional. Input only. Immutable. Developer set system instruction.
2171    /// Currently, text only
2172    pub system_instruction: std::option::Option<crate::model::Content>,
2173
2174    /// Optional. Input only. Immutable. The content to cache
2175    pub contents: std::vec::Vec<crate::model::Content>,
2176
2177    /// Optional. Input only. Immutable. A list of `Tools` the model may use to
2178    /// generate the next response
2179    pub tools: std::vec::Vec<crate::model::Tool>,
2180
2181    /// Optional. Input only. Immutable. Tool config. This config is shared for all
2182    /// tools
2183    pub tool_config: std::option::Option<crate::model::ToolConfig>,
2184
2185    /// Output only. Creation time of the cache entry.
2186    pub create_time: std::option::Option<wkt::Timestamp>,
2187
2188    /// Output only. When the cache entry was last updated in UTC time.
2189    pub update_time: std::option::Option<wkt::Timestamp>,
2190
2191    /// Output only. Metadata on the usage of the cached content.
2192    pub usage_metadata: std::option::Option<crate::model::cached_content::UsageMetadata>,
2193
2194    /// Input only. Immutable. Customer-managed encryption key spec for a
2195    /// `CachedContent`. If set, this `CachedContent` and all its sub-resources
2196    /// will be secured by this key.
2197    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
2198
2199    /// Expiration time of the cached content.
2200    pub expiration: std::option::Option<crate::model::cached_content::Expiration>,
2201
2202    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2203}
2204
2205#[cfg(feature = "gen-ai-cache-service")]
2206impl CachedContent {
2207    pub fn new() -> Self {
2208        std::default::Default::default()
2209    }
2210
2211    /// Sets the value of [name][crate::model::CachedContent::name].
2212    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2213        self.name = v.into();
2214        self
2215    }
2216
2217    /// Sets the value of [display_name][crate::model::CachedContent::display_name].
2218    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2219        self.display_name = v.into();
2220        self
2221    }
2222
2223    /// Sets the value of [model][crate::model::CachedContent::model].
2224    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2225        self.model = v.into();
2226        self
2227    }
2228
2229    /// Sets the value of [system_instruction][crate::model::CachedContent::system_instruction].
2230    pub fn set_system_instruction<T>(mut self, v: T) -> Self
2231    where
2232        T: std::convert::Into<crate::model::Content>,
2233    {
2234        self.system_instruction = std::option::Option::Some(v.into());
2235        self
2236    }
2237
2238    /// Sets or clears the value of [system_instruction][crate::model::CachedContent::system_instruction].
2239    pub fn set_or_clear_system_instruction<T>(mut self, v: std::option::Option<T>) -> Self
2240    where
2241        T: std::convert::Into<crate::model::Content>,
2242    {
2243        self.system_instruction = v.map(|x| x.into());
2244        self
2245    }
2246
2247    /// Sets the value of [contents][crate::model::CachedContent::contents].
2248    pub fn set_contents<T, V>(mut self, v: T) -> Self
2249    where
2250        T: std::iter::IntoIterator<Item = V>,
2251        V: std::convert::Into<crate::model::Content>,
2252    {
2253        use std::iter::Iterator;
2254        self.contents = v.into_iter().map(|i| i.into()).collect();
2255        self
2256    }
2257
2258    /// Sets the value of [tools][crate::model::CachedContent::tools].
2259    pub fn set_tools<T, V>(mut self, v: T) -> Self
2260    where
2261        T: std::iter::IntoIterator<Item = V>,
2262        V: std::convert::Into<crate::model::Tool>,
2263    {
2264        use std::iter::Iterator;
2265        self.tools = v.into_iter().map(|i| i.into()).collect();
2266        self
2267    }
2268
2269    /// Sets the value of [tool_config][crate::model::CachedContent::tool_config].
2270    pub fn set_tool_config<T>(mut self, v: T) -> Self
2271    where
2272        T: std::convert::Into<crate::model::ToolConfig>,
2273    {
2274        self.tool_config = std::option::Option::Some(v.into());
2275        self
2276    }
2277
2278    /// Sets or clears the value of [tool_config][crate::model::CachedContent::tool_config].
2279    pub fn set_or_clear_tool_config<T>(mut self, v: std::option::Option<T>) -> Self
2280    where
2281        T: std::convert::Into<crate::model::ToolConfig>,
2282    {
2283        self.tool_config = v.map(|x| x.into());
2284        self
2285    }
2286
2287    /// Sets the value of [create_time][crate::model::CachedContent::create_time].
2288    pub fn set_create_time<T>(mut self, v: T) -> Self
2289    where
2290        T: std::convert::Into<wkt::Timestamp>,
2291    {
2292        self.create_time = std::option::Option::Some(v.into());
2293        self
2294    }
2295
2296    /// Sets or clears the value of [create_time][crate::model::CachedContent::create_time].
2297    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2298    where
2299        T: std::convert::Into<wkt::Timestamp>,
2300    {
2301        self.create_time = v.map(|x| x.into());
2302        self
2303    }
2304
2305    /// Sets the value of [update_time][crate::model::CachedContent::update_time].
2306    pub fn set_update_time<T>(mut self, v: T) -> Self
2307    where
2308        T: std::convert::Into<wkt::Timestamp>,
2309    {
2310        self.update_time = std::option::Option::Some(v.into());
2311        self
2312    }
2313
2314    /// Sets or clears the value of [update_time][crate::model::CachedContent::update_time].
2315    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2316    where
2317        T: std::convert::Into<wkt::Timestamp>,
2318    {
2319        self.update_time = v.map(|x| x.into());
2320        self
2321    }
2322
2323    /// Sets the value of [usage_metadata][crate::model::CachedContent::usage_metadata].
2324    pub fn set_usage_metadata<T>(mut self, v: T) -> Self
2325    where
2326        T: std::convert::Into<crate::model::cached_content::UsageMetadata>,
2327    {
2328        self.usage_metadata = std::option::Option::Some(v.into());
2329        self
2330    }
2331
2332    /// Sets or clears the value of [usage_metadata][crate::model::CachedContent::usage_metadata].
2333    pub fn set_or_clear_usage_metadata<T>(mut self, v: std::option::Option<T>) -> Self
2334    where
2335        T: std::convert::Into<crate::model::cached_content::UsageMetadata>,
2336    {
2337        self.usage_metadata = v.map(|x| x.into());
2338        self
2339    }
2340
2341    /// Sets the value of [encryption_spec][crate::model::CachedContent::encryption_spec].
2342    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
2343    where
2344        T: std::convert::Into<crate::model::EncryptionSpec>,
2345    {
2346        self.encryption_spec = std::option::Option::Some(v.into());
2347        self
2348    }
2349
2350    /// Sets or clears the value of [encryption_spec][crate::model::CachedContent::encryption_spec].
2351    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
2352    where
2353        T: std::convert::Into<crate::model::EncryptionSpec>,
2354    {
2355        self.encryption_spec = v.map(|x| x.into());
2356        self
2357    }
2358
2359    /// Sets the value of [expiration][crate::model::CachedContent::expiration].
2360    ///
2361    /// Note that all the setters affecting `expiration` are mutually
2362    /// exclusive.
2363    pub fn set_expiration<
2364        T: std::convert::Into<std::option::Option<crate::model::cached_content::Expiration>>,
2365    >(
2366        mut self,
2367        v: T,
2368    ) -> Self {
2369        self.expiration = v.into();
2370        self
2371    }
2372
2373    /// The value of [expiration][crate::model::CachedContent::expiration]
2374    /// if it holds a `ExpireTime`, `None` if the field is not set or
2375    /// holds a different branch.
2376    pub fn expire_time(&self) -> std::option::Option<&std::boxed::Box<wkt::Timestamp>> {
2377        #[allow(unreachable_patterns)]
2378        self.expiration.as_ref().and_then(|v| match v {
2379            crate::model::cached_content::Expiration::ExpireTime(v) => std::option::Option::Some(v),
2380            _ => std::option::Option::None,
2381        })
2382    }
2383
2384    /// Sets the value of [expiration][crate::model::CachedContent::expiration]
2385    /// to hold a `ExpireTime`.
2386    ///
2387    /// Note that all the setters affecting `expiration` are
2388    /// mutually exclusive.
2389    pub fn set_expire_time<T: std::convert::Into<std::boxed::Box<wkt::Timestamp>>>(
2390        mut self,
2391        v: T,
2392    ) -> Self {
2393        self.expiration = std::option::Option::Some(
2394            crate::model::cached_content::Expiration::ExpireTime(v.into()),
2395        );
2396        self
2397    }
2398
2399    /// The value of [expiration][crate::model::CachedContent::expiration]
2400    /// if it holds a `Ttl`, `None` if the field is not set or
2401    /// holds a different branch.
2402    pub fn ttl(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
2403        #[allow(unreachable_patterns)]
2404        self.expiration.as_ref().and_then(|v| match v {
2405            crate::model::cached_content::Expiration::Ttl(v) => std::option::Option::Some(v),
2406            _ => std::option::Option::None,
2407        })
2408    }
2409
2410    /// Sets the value of [expiration][crate::model::CachedContent::expiration]
2411    /// to hold a `Ttl`.
2412    ///
2413    /// Note that all the setters affecting `expiration` are
2414    /// mutually exclusive.
2415    pub fn set_ttl<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(mut self, v: T) -> Self {
2416        self.expiration =
2417            std::option::Option::Some(crate::model::cached_content::Expiration::Ttl(v.into()));
2418        self
2419    }
2420}
2421
2422#[cfg(feature = "gen-ai-cache-service")]
2423impl wkt::message::Message for CachedContent {
2424    fn typename() -> &'static str {
2425        "type.googleapis.com/google.cloud.aiplatform.v1.CachedContent"
2426    }
2427}
2428
2429/// Defines additional types related to [CachedContent].
2430#[cfg(feature = "gen-ai-cache-service")]
2431pub mod cached_content {
2432    #[allow(unused_imports)]
2433    use super::*;
2434
2435    /// Metadata on the usage of the cached content.
2436    #[cfg(feature = "gen-ai-cache-service")]
2437    #[derive(Clone, Default, PartialEq)]
2438    #[non_exhaustive]
2439    pub struct UsageMetadata {
2440        /// Total number of tokens that the cached content consumes.
2441        pub total_token_count: i32,
2442
2443        /// Number of text characters.
2444        pub text_count: i32,
2445
2446        /// Number of images.
2447        pub image_count: i32,
2448
2449        /// Duration of video in seconds.
2450        pub video_duration_seconds: i32,
2451
2452        /// Duration of audio in seconds.
2453        pub audio_duration_seconds: i32,
2454
2455        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2456    }
2457
2458    #[cfg(feature = "gen-ai-cache-service")]
2459    impl UsageMetadata {
2460        pub fn new() -> Self {
2461            std::default::Default::default()
2462        }
2463
2464        /// Sets the value of [total_token_count][crate::model::cached_content::UsageMetadata::total_token_count].
2465        pub fn set_total_token_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2466            self.total_token_count = v.into();
2467            self
2468        }
2469
2470        /// Sets the value of [text_count][crate::model::cached_content::UsageMetadata::text_count].
2471        pub fn set_text_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2472            self.text_count = v.into();
2473            self
2474        }
2475
2476        /// Sets the value of [image_count][crate::model::cached_content::UsageMetadata::image_count].
2477        pub fn set_image_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2478            self.image_count = v.into();
2479            self
2480        }
2481
2482        /// Sets the value of [video_duration_seconds][crate::model::cached_content::UsageMetadata::video_duration_seconds].
2483        pub fn set_video_duration_seconds<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2484            self.video_duration_seconds = v.into();
2485            self
2486        }
2487
2488        /// Sets the value of [audio_duration_seconds][crate::model::cached_content::UsageMetadata::audio_duration_seconds].
2489        pub fn set_audio_duration_seconds<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2490            self.audio_duration_seconds = v.into();
2491            self
2492        }
2493    }
2494
2495    #[cfg(feature = "gen-ai-cache-service")]
2496    impl wkt::message::Message for UsageMetadata {
2497        fn typename() -> &'static str {
2498            "type.googleapis.com/google.cloud.aiplatform.v1.CachedContent.UsageMetadata"
2499        }
2500    }
2501
2502    /// Expiration time of the cached content.
2503    #[cfg(feature = "gen-ai-cache-service")]
2504    #[derive(Clone, Debug, PartialEq)]
2505    #[non_exhaustive]
2506    pub enum Expiration {
2507        /// Timestamp of when this resource is considered expired.
2508        /// This is *always* provided on output, regardless of what was sent
2509        /// on input.
2510        ExpireTime(std::boxed::Box<wkt::Timestamp>),
2511        /// Input only. The TTL for this resource. The expiration time is computed:
2512        /// now + TTL.
2513        Ttl(std::boxed::Box<wkt::Duration>),
2514    }
2515}
2516
2517/// Success and error statistics of processing multiple entities
2518/// (for example, DataItems or structured data rows) in batch.
2519#[cfg(feature = "job-service")]
2520#[derive(Clone, Default, PartialEq)]
2521#[non_exhaustive]
2522pub struct CompletionStats {
2523    /// Output only. The number of entities that had been processed successfully.
2524    pub successful_count: i64,
2525
2526    /// Output only. The number of entities for which any error was encountered.
2527    pub failed_count: i64,
2528
2529    /// Output only. In cases when enough errors are encountered a job, pipeline,
2530    /// or operation may be failed as a whole. Below is the number of entities for
2531    /// which the processing had not been finished (either in successful or failed
2532    /// state). Set to -1 if the number is unknown (for example, the operation
2533    /// failed before the total entity number could be collected).
2534    pub incomplete_count: i64,
2535
2536    /// Output only. The number of the successful forecast points that are
2537    /// generated by the forecasting model. This is ONLY used by the forecasting
2538    /// batch prediction.
2539    pub successful_forecast_point_count: i64,
2540
2541    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2542}
2543
2544#[cfg(feature = "job-service")]
2545impl CompletionStats {
2546    pub fn new() -> Self {
2547        std::default::Default::default()
2548    }
2549
2550    /// Sets the value of [successful_count][crate::model::CompletionStats::successful_count].
2551    pub fn set_successful_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2552        self.successful_count = v.into();
2553        self
2554    }
2555
2556    /// Sets the value of [failed_count][crate::model::CompletionStats::failed_count].
2557    pub fn set_failed_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2558        self.failed_count = v.into();
2559        self
2560    }
2561
2562    /// Sets the value of [incomplete_count][crate::model::CompletionStats::incomplete_count].
2563    pub fn set_incomplete_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2564        self.incomplete_count = v.into();
2565        self
2566    }
2567
2568    /// Sets the value of [successful_forecast_point_count][crate::model::CompletionStats::successful_forecast_point_count].
2569    pub fn set_successful_forecast_point_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2570        self.successful_forecast_point_count = v.into();
2571        self
2572    }
2573}
2574
2575#[cfg(feature = "job-service")]
2576impl wkt::message::Message for CompletionStats {
2577    fn typename() -> &'static str {
2578        "type.googleapis.com/google.cloud.aiplatform.v1.CompletionStats"
2579    }
2580}
2581
2582/// The base structured datatype containing multi-part content of a message.
2583///
2584/// A `Content` includes a `role` field designating the producer of the `Content`
2585/// and a `parts` field containing multi-part data that contains the content of
2586/// the message turn.
2587#[cfg(any(
2588    feature = "data-foundry-service",
2589    feature = "gen-ai-cache-service",
2590    feature = "gen-ai-tuning-service",
2591    feature = "llm-utility-service",
2592    feature = "prediction-service",
2593    feature = "vertex-rag-service",
2594))]
2595#[derive(Clone, Default, PartialEq)]
2596#[non_exhaustive]
2597pub struct Content {
2598    /// Optional. The producer of the content. Must be either 'user' or 'model'.
2599    ///
2600    /// Useful to set for multi-turn conversations, otherwise can be left blank
2601    /// or unset.
2602    pub role: std::string::String,
2603
2604    /// Required. Ordered `Parts` that constitute a single message. Parts may have
2605    /// different IANA MIME types.
2606    pub parts: std::vec::Vec<crate::model::Part>,
2607
2608    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2609}
2610
2611#[cfg(any(
2612    feature = "data-foundry-service",
2613    feature = "gen-ai-cache-service",
2614    feature = "gen-ai-tuning-service",
2615    feature = "llm-utility-service",
2616    feature = "prediction-service",
2617    feature = "vertex-rag-service",
2618))]
2619impl Content {
2620    pub fn new() -> Self {
2621        std::default::Default::default()
2622    }
2623
2624    /// Sets the value of [role][crate::model::Content::role].
2625    pub fn set_role<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2626        self.role = v.into();
2627        self
2628    }
2629
2630    /// Sets the value of [parts][crate::model::Content::parts].
2631    pub fn set_parts<T, V>(mut self, v: T) -> Self
2632    where
2633        T: std::iter::IntoIterator<Item = V>,
2634        V: std::convert::Into<crate::model::Part>,
2635    {
2636        use std::iter::Iterator;
2637        self.parts = v.into_iter().map(|i| i.into()).collect();
2638        self
2639    }
2640}
2641
2642#[cfg(any(
2643    feature = "data-foundry-service",
2644    feature = "gen-ai-cache-service",
2645    feature = "gen-ai-tuning-service",
2646    feature = "llm-utility-service",
2647    feature = "prediction-service",
2648    feature = "vertex-rag-service",
2649))]
2650impl wkt::message::Message for Content {
2651    fn typename() -> &'static str {
2652        "type.googleapis.com/google.cloud.aiplatform.v1.Content"
2653    }
2654}
2655
2656/// A datatype containing media that is part of a multi-part `Content` message.
2657///
2658/// A `Part` consists of data which has an associated datatype. A `Part` can only
2659/// contain one of the accepted types in `Part.data`.
2660///
2661/// A `Part` must have a fixed IANA MIME type identifying the type and subtype
2662/// of the media if `inline_data` or `file_data` field is filled with raw bytes.
2663#[cfg(any(
2664    feature = "data-foundry-service",
2665    feature = "gen-ai-cache-service",
2666    feature = "gen-ai-tuning-service",
2667    feature = "llm-utility-service",
2668    feature = "prediction-service",
2669    feature = "vertex-rag-service",
2670))]
2671#[derive(Clone, Default, PartialEq)]
2672#[non_exhaustive]
2673pub struct Part {
2674    /// Indicates if the part is thought from the model.
2675    pub thought: bool,
2676
2677    /// An opaque signature for the thought so it can be reused in subsequent
2678    /// requests.
2679    pub thought_signature: ::bytes::Bytes,
2680
2681    pub data: std::option::Option<crate::model::part::Data>,
2682
2683    pub metadata: std::option::Option<crate::model::part::Metadata>,
2684
2685    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2686}
2687
2688#[cfg(any(
2689    feature = "data-foundry-service",
2690    feature = "gen-ai-cache-service",
2691    feature = "gen-ai-tuning-service",
2692    feature = "llm-utility-service",
2693    feature = "prediction-service",
2694    feature = "vertex-rag-service",
2695))]
2696impl Part {
2697    pub fn new() -> Self {
2698        std::default::Default::default()
2699    }
2700
2701    /// Sets the value of [thought][crate::model::Part::thought].
2702    pub fn set_thought<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2703        self.thought = v.into();
2704        self
2705    }
2706
2707    /// Sets the value of [thought_signature][crate::model::Part::thought_signature].
2708    pub fn set_thought_signature<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
2709        self.thought_signature = v.into();
2710        self
2711    }
2712
2713    /// Sets the value of [data][crate::model::Part::data].
2714    ///
2715    /// Note that all the setters affecting `data` are mutually
2716    /// exclusive.
2717    pub fn set_data<T: std::convert::Into<std::option::Option<crate::model::part::Data>>>(
2718        mut self,
2719        v: T,
2720    ) -> Self {
2721        self.data = v.into();
2722        self
2723    }
2724
2725    /// The value of [data][crate::model::Part::data]
2726    /// if it holds a `Text`, `None` if the field is not set or
2727    /// holds a different branch.
2728    pub fn text(&self) -> std::option::Option<&std::string::String> {
2729        #[allow(unreachable_patterns)]
2730        self.data.as_ref().and_then(|v| match v {
2731            crate::model::part::Data::Text(v) => std::option::Option::Some(v),
2732            _ => std::option::Option::None,
2733        })
2734    }
2735
2736    /// Sets the value of [data][crate::model::Part::data]
2737    /// to hold a `Text`.
2738    ///
2739    /// Note that all the setters affecting `data` are
2740    /// mutually exclusive.
2741    pub fn set_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2742        self.data = std::option::Option::Some(crate::model::part::Data::Text(v.into()));
2743        self
2744    }
2745
2746    /// The value of [data][crate::model::Part::data]
2747    /// if it holds a `InlineData`, `None` if the field is not set or
2748    /// holds a different branch.
2749    pub fn inline_data(&self) -> std::option::Option<&std::boxed::Box<crate::model::Blob>> {
2750        #[allow(unreachable_patterns)]
2751        self.data.as_ref().and_then(|v| match v {
2752            crate::model::part::Data::InlineData(v) => std::option::Option::Some(v),
2753            _ => std::option::Option::None,
2754        })
2755    }
2756
2757    /// Sets the value of [data][crate::model::Part::data]
2758    /// to hold a `InlineData`.
2759    ///
2760    /// Note that all the setters affecting `data` are
2761    /// mutually exclusive.
2762    pub fn set_inline_data<T: std::convert::Into<std::boxed::Box<crate::model::Blob>>>(
2763        mut self,
2764        v: T,
2765    ) -> Self {
2766        self.data = std::option::Option::Some(crate::model::part::Data::InlineData(v.into()));
2767        self
2768    }
2769
2770    /// The value of [data][crate::model::Part::data]
2771    /// if it holds a `FileData`, `None` if the field is not set or
2772    /// holds a different branch.
2773    pub fn file_data(&self) -> std::option::Option<&std::boxed::Box<crate::model::FileData>> {
2774        #[allow(unreachable_patterns)]
2775        self.data.as_ref().and_then(|v| match v {
2776            crate::model::part::Data::FileData(v) => std::option::Option::Some(v),
2777            _ => std::option::Option::None,
2778        })
2779    }
2780
2781    /// Sets the value of [data][crate::model::Part::data]
2782    /// to hold a `FileData`.
2783    ///
2784    /// Note that all the setters affecting `data` are
2785    /// mutually exclusive.
2786    pub fn set_file_data<T: std::convert::Into<std::boxed::Box<crate::model::FileData>>>(
2787        mut self,
2788        v: T,
2789    ) -> Self {
2790        self.data = std::option::Option::Some(crate::model::part::Data::FileData(v.into()));
2791        self
2792    }
2793
2794    /// The value of [data][crate::model::Part::data]
2795    /// if it holds a `FunctionCall`, `None` if the field is not set or
2796    /// holds a different branch.
2797    pub fn function_call(
2798        &self,
2799    ) -> std::option::Option<&std::boxed::Box<crate::model::FunctionCall>> {
2800        #[allow(unreachable_patterns)]
2801        self.data.as_ref().and_then(|v| match v {
2802            crate::model::part::Data::FunctionCall(v) => std::option::Option::Some(v),
2803            _ => std::option::Option::None,
2804        })
2805    }
2806
2807    /// Sets the value of [data][crate::model::Part::data]
2808    /// to hold a `FunctionCall`.
2809    ///
2810    /// Note that all the setters affecting `data` are
2811    /// mutually exclusive.
2812    pub fn set_function_call<T: std::convert::Into<std::boxed::Box<crate::model::FunctionCall>>>(
2813        mut self,
2814        v: T,
2815    ) -> Self {
2816        self.data = std::option::Option::Some(crate::model::part::Data::FunctionCall(v.into()));
2817        self
2818    }
2819
2820    /// The value of [data][crate::model::Part::data]
2821    /// if it holds a `FunctionResponse`, `None` if the field is not set or
2822    /// holds a different branch.
2823    pub fn function_response(
2824        &self,
2825    ) -> std::option::Option<&std::boxed::Box<crate::model::FunctionResponse>> {
2826        #[allow(unreachable_patterns)]
2827        self.data.as_ref().and_then(|v| match v {
2828            crate::model::part::Data::FunctionResponse(v) => std::option::Option::Some(v),
2829            _ => std::option::Option::None,
2830        })
2831    }
2832
2833    /// Sets the value of [data][crate::model::Part::data]
2834    /// to hold a `FunctionResponse`.
2835    ///
2836    /// Note that all the setters affecting `data` are
2837    /// mutually exclusive.
2838    pub fn set_function_response<
2839        T: std::convert::Into<std::boxed::Box<crate::model::FunctionResponse>>,
2840    >(
2841        mut self,
2842        v: T,
2843    ) -> Self {
2844        self.data = std::option::Option::Some(crate::model::part::Data::FunctionResponse(v.into()));
2845        self
2846    }
2847
2848    /// The value of [data][crate::model::Part::data]
2849    /// if it holds a `ExecutableCode`, `None` if the field is not set or
2850    /// holds a different branch.
2851    pub fn executable_code(
2852        &self,
2853    ) -> std::option::Option<&std::boxed::Box<crate::model::ExecutableCode>> {
2854        #[allow(unreachable_patterns)]
2855        self.data.as_ref().and_then(|v| match v {
2856            crate::model::part::Data::ExecutableCode(v) => std::option::Option::Some(v),
2857            _ => std::option::Option::None,
2858        })
2859    }
2860
2861    /// Sets the value of [data][crate::model::Part::data]
2862    /// to hold a `ExecutableCode`.
2863    ///
2864    /// Note that all the setters affecting `data` are
2865    /// mutually exclusive.
2866    pub fn set_executable_code<
2867        T: std::convert::Into<std::boxed::Box<crate::model::ExecutableCode>>,
2868    >(
2869        mut self,
2870        v: T,
2871    ) -> Self {
2872        self.data = std::option::Option::Some(crate::model::part::Data::ExecutableCode(v.into()));
2873        self
2874    }
2875
2876    /// The value of [data][crate::model::Part::data]
2877    /// if it holds a `CodeExecutionResult`, `None` if the field is not set or
2878    /// holds a different branch.
2879    pub fn code_execution_result(
2880        &self,
2881    ) -> std::option::Option<&std::boxed::Box<crate::model::CodeExecutionResult>> {
2882        #[allow(unreachable_patterns)]
2883        self.data.as_ref().and_then(|v| match v {
2884            crate::model::part::Data::CodeExecutionResult(v) => std::option::Option::Some(v),
2885            _ => std::option::Option::None,
2886        })
2887    }
2888
2889    /// Sets the value of [data][crate::model::Part::data]
2890    /// to hold a `CodeExecutionResult`.
2891    ///
2892    /// Note that all the setters affecting `data` are
2893    /// mutually exclusive.
2894    pub fn set_code_execution_result<
2895        T: std::convert::Into<std::boxed::Box<crate::model::CodeExecutionResult>>,
2896    >(
2897        mut self,
2898        v: T,
2899    ) -> Self {
2900        self.data =
2901            std::option::Option::Some(crate::model::part::Data::CodeExecutionResult(v.into()));
2902        self
2903    }
2904
2905    /// Sets the value of [metadata][crate::model::Part::metadata].
2906    ///
2907    /// Note that all the setters affecting `metadata` are mutually
2908    /// exclusive.
2909    pub fn set_metadata<
2910        T: std::convert::Into<std::option::Option<crate::model::part::Metadata>>,
2911    >(
2912        mut self,
2913        v: T,
2914    ) -> Self {
2915        self.metadata = v.into();
2916        self
2917    }
2918
2919    /// The value of [metadata][crate::model::Part::metadata]
2920    /// if it holds a `VideoMetadata`, `None` if the field is not set or
2921    /// holds a different branch.
2922    pub fn video_metadata(
2923        &self,
2924    ) -> std::option::Option<&std::boxed::Box<crate::model::VideoMetadata>> {
2925        #[allow(unreachable_patterns)]
2926        self.metadata.as_ref().and_then(|v| match v {
2927            crate::model::part::Metadata::VideoMetadata(v) => std::option::Option::Some(v),
2928            _ => std::option::Option::None,
2929        })
2930    }
2931
2932    /// Sets the value of [metadata][crate::model::Part::metadata]
2933    /// to hold a `VideoMetadata`.
2934    ///
2935    /// Note that all the setters affecting `metadata` are
2936    /// mutually exclusive.
2937    pub fn set_video_metadata<
2938        T: std::convert::Into<std::boxed::Box<crate::model::VideoMetadata>>,
2939    >(
2940        mut self,
2941        v: T,
2942    ) -> Self {
2943        self.metadata =
2944            std::option::Option::Some(crate::model::part::Metadata::VideoMetadata(v.into()));
2945        self
2946    }
2947}
2948
2949#[cfg(any(
2950    feature = "data-foundry-service",
2951    feature = "gen-ai-cache-service",
2952    feature = "gen-ai-tuning-service",
2953    feature = "llm-utility-service",
2954    feature = "prediction-service",
2955    feature = "vertex-rag-service",
2956))]
2957impl wkt::message::Message for Part {
2958    fn typename() -> &'static str {
2959        "type.googleapis.com/google.cloud.aiplatform.v1.Part"
2960    }
2961}
2962
2963/// Defines additional types related to [Part].
2964#[cfg(any(
2965    feature = "data-foundry-service",
2966    feature = "gen-ai-cache-service",
2967    feature = "gen-ai-tuning-service",
2968    feature = "llm-utility-service",
2969    feature = "prediction-service",
2970    feature = "vertex-rag-service",
2971))]
2972pub mod part {
2973    #[allow(unused_imports)]
2974    use super::*;
2975
2976    #[cfg(any(
2977        feature = "data-foundry-service",
2978        feature = "gen-ai-cache-service",
2979        feature = "gen-ai-tuning-service",
2980        feature = "llm-utility-service",
2981        feature = "prediction-service",
2982        feature = "vertex-rag-service",
2983    ))]
2984    #[derive(Clone, Debug, PartialEq)]
2985    #[non_exhaustive]
2986    pub enum Data {
2987        /// Optional. Text part (can be code).
2988        Text(std::string::String),
2989        /// Optional. Inlined bytes data.
2990        InlineData(std::boxed::Box<crate::model::Blob>),
2991        /// Optional. URI based data.
2992        FileData(std::boxed::Box<crate::model::FileData>),
2993        /// Optional. A predicted [FunctionCall] returned from the model that
2994        /// contains a string representing the [FunctionDeclaration.name] with the
2995        /// parameters and their values.
2996        FunctionCall(std::boxed::Box<crate::model::FunctionCall>),
2997        /// Optional. The result output of a [FunctionCall] that contains a string
2998        /// representing the [FunctionDeclaration.name] and a structured JSON object
2999        /// containing any output from the function call. It is used as context to
3000        /// the model.
3001        FunctionResponse(std::boxed::Box<crate::model::FunctionResponse>),
3002        /// Optional. Code generated by the model that is meant to be executed.
3003        ExecutableCode(std::boxed::Box<crate::model::ExecutableCode>),
3004        /// Optional. Result of executing the [ExecutableCode].
3005        CodeExecutionResult(std::boxed::Box<crate::model::CodeExecutionResult>),
3006    }
3007
3008    #[cfg(any(
3009        feature = "data-foundry-service",
3010        feature = "gen-ai-cache-service",
3011        feature = "gen-ai-tuning-service",
3012        feature = "llm-utility-service",
3013        feature = "prediction-service",
3014        feature = "vertex-rag-service",
3015    ))]
3016    #[derive(Clone, Debug, PartialEq)]
3017    #[non_exhaustive]
3018    pub enum Metadata {
3019        /// Optional. Video metadata. The metadata should only be specified while the
3020        /// video data is presented in inline_data or file_data.
3021        VideoMetadata(std::boxed::Box<crate::model::VideoMetadata>),
3022    }
3023}
3024
3025/// Content blob.
3026///
3027/// It's preferred to send as [text][google.cloud.aiplatform.v1.Part.text]
3028/// directly rather than raw bytes.
3029///
3030/// [google.cloud.aiplatform.v1.Part.text]: crate::model::Part::data
3031#[cfg(any(
3032    feature = "data-foundry-service",
3033    feature = "gen-ai-cache-service",
3034    feature = "gen-ai-tuning-service",
3035    feature = "llm-utility-service",
3036    feature = "prediction-service",
3037    feature = "vertex-rag-service",
3038))]
3039#[derive(Clone, Default, PartialEq)]
3040#[non_exhaustive]
3041pub struct Blob {
3042    /// Required. The IANA standard MIME type of the source data.
3043    pub mime_type: std::string::String,
3044
3045    /// Required. Raw bytes.
3046    pub data: ::bytes::Bytes,
3047
3048    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3049}
3050
3051#[cfg(any(
3052    feature = "data-foundry-service",
3053    feature = "gen-ai-cache-service",
3054    feature = "gen-ai-tuning-service",
3055    feature = "llm-utility-service",
3056    feature = "prediction-service",
3057    feature = "vertex-rag-service",
3058))]
3059impl Blob {
3060    pub fn new() -> Self {
3061        std::default::Default::default()
3062    }
3063
3064    /// Sets the value of [mime_type][crate::model::Blob::mime_type].
3065    pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3066        self.mime_type = v.into();
3067        self
3068    }
3069
3070    /// Sets the value of [data][crate::model::Blob::data].
3071    pub fn set_data<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
3072        self.data = v.into();
3073        self
3074    }
3075}
3076
3077#[cfg(any(
3078    feature = "data-foundry-service",
3079    feature = "gen-ai-cache-service",
3080    feature = "gen-ai-tuning-service",
3081    feature = "llm-utility-service",
3082    feature = "prediction-service",
3083    feature = "vertex-rag-service",
3084))]
3085impl wkt::message::Message for Blob {
3086    fn typename() -> &'static str {
3087        "type.googleapis.com/google.cloud.aiplatform.v1.Blob"
3088    }
3089}
3090
3091/// URI based data.
3092#[cfg(any(
3093    feature = "data-foundry-service",
3094    feature = "gen-ai-cache-service",
3095    feature = "gen-ai-tuning-service",
3096    feature = "llm-utility-service",
3097    feature = "prediction-service",
3098    feature = "vertex-rag-service",
3099))]
3100#[derive(Clone, Default, PartialEq)]
3101#[non_exhaustive]
3102pub struct FileData {
3103    /// Required. The IANA standard MIME type of the source data.
3104    pub mime_type: std::string::String,
3105
3106    /// Required. URI.
3107    pub file_uri: std::string::String,
3108
3109    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3110}
3111
3112#[cfg(any(
3113    feature = "data-foundry-service",
3114    feature = "gen-ai-cache-service",
3115    feature = "gen-ai-tuning-service",
3116    feature = "llm-utility-service",
3117    feature = "prediction-service",
3118    feature = "vertex-rag-service",
3119))]
3120impl FileData {
3121    pub fn new() -> Self {
3122        std::default::Default::default()
3123    }
3124
3125    /// Sets the value of [mime_type][crate::model::FileData::mime_type].
3126    pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3127        self.mime_type = v.into();
3128        self
3129    }
3130
3131    /// Sets the value of [file_uri][crate::model::FileData::file_uri].
3132    pub fn set_file_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3133        self.file_uri = v.into();
3134        self
3135    }
3136}
3137
3138#[cfg(any(
3139    feature = "data-foundry-service",
3140    feature = "gen-ai-cache-service",
3141    feature = "gen-ai-tuning-service",
3142    feature = "llm-utility-service",
3143    feature = "prediction-service",
3144    feature = "vertex-rag-service",
3145))]
3146impl wkt::message::Message for FileData {
3147    fn typename() -> &'static str {
3148        "type.googleapis.com/google.cloud.aiplatform.v1.FileData"
3149    }
3150}
3151
3152/// Metadata describes the input video content.
3153#[cfg(any(
3154    feature = "data-foundry-service",
3155    feature = "gen-ai-cache-service",
3156    feature = "gen-ai-tuning-service",
3157    feature = "llm-utility-service",
3158    feature = "prediction-service",
3159    feature = "vertex-rag-service",
3160))]
3161#[derive(Clone, Default, PartialEq)]
3162#[non_exhaustive]
3163pub struct VideoMetadata {
3164    /// Optional. The start offset of the video.
3165    pub start_offset: std::option::Option<wkt::Duration>,
3166
3167    /// Optional. The end offset of the video.
3168    pub end_offset: std::option::Option<wkt::Duration>,
3169
3170    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3171}
3172
3173#[cfg(any(
3174    feature = "data-foundry-service",
3175    feature = "gen-ai-cache-service",
3176    feature = "gen-ai-tuning-service",
3177    feature = "llm-utility-service",
3178    feature = "prediction-service",
3179    feature = "vertex-rag-service",
3180))]
3181impl VideoMetadata {
3182    pub fn new() -> Self {
3183        std::default::Default::default()
3184    }
3185
3186    /// Sets the value of [start_offset][crate::model::VideoMetadata::start_offset].
3187    pub fn set_start_offset<T>(mut self, v: T) -> Self
3188    where
3189        T: std::convert::Into<wkt::Duration>,
3190    {
3191        self.start_offset = std::option::Option::Some(v.into());
3192        self
3193    }
3194
3195    /// Sets or clears the value of [start_offset][crate::model::VideoMetadata::start_offset].
3196    pub fn set_or_clear_start_offset<T>(mut self, v: std::option::Option<T>) -> Self
3197    where
3198        T: std::convert::Into<wkt::Duration>,
3199    {
3200        self.start_offset = v.map(|x| x.into());
3201        self
3202    }
3203
3204    /// Sets the value of [end_offset][crate::model::VideoMetadata::end_offset].
3205    pub fn set_end_offset<T>(mut self, v: T) -> Self
3206    where
3207        T: std::convert::Into<wkt::Duration>,
3208    {
3209        self.end_offset = std::option::Option::Some(v.into());
3210        self
3211    }
3212
3213    /// Sets or clears the value of [end_offset][crate::model::VideoMetadata::end_offset].
3214    pub fn set_or_clear_end_offset<T>(mut self, v: std::option::Option<T>) -> Self
3215    where
3216        T: std::convert::Into<wkt::Duration>,
3217    {
3218        self.end_offset = v.map(|x| x.into());
3219        self
3220    }
3221}
3222
3223#[cfg(any(
3224    feature = "data-foundry-service",
3225    feature = "gen-ai-cache-service",
3226    feature = "gen-ai-tuning-service",
3227    feature = "llm-utility-service",
3228    feature = "prediction-service",
3229    feature = "vertex-rag-service",
3230))]
3231impl wkt::message::Message for VideoMetadata {
3232    fn typename() -> &'static str {
3233        "type.googleapis.com/google.cloud.aiplatform.v1.VideoMetadata"
3234    }
3235}
3236
3237/// Generation config.
3238#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3239#[derive(Clone, Default, PartialEq)]
3240#[non_exhaustive]
3241pub struct GenerationConfig {
3242    /// Optional. Controls the randomness of predictions.
3243    pub temperature: std::option::Option<f32>,
3244
3245    /// Optional. If specified, nucleus sampling will be used.
3246    pub top_p: std::option::Option<f32>,
3247
3248    /// Optional. If specified, top-k sampling will be used.
3249    pub top_k: std::option::Option<f32>,
3250
3251    /// Optional. Number of candidates to generate.
3252    pub candidate_count: std::option::Option<i32>,
3253
3254    /// Optional. The maximum number of output tokens to generate per message.
3255    pub max_output_tokens: std::option::Option<i32>,
3256
3257    /// Optional. Stop sequences.
3258    pub stop_sequences: std::vec::Vec<std::string::String>,
3259
3260    /// Optional. If true, export the logprobs results in response.
3261    pub response_logprobs: std::option::Option<bool>,
3262
3263    /// Optional. Logit probabilities.
3264    pub logprobs: std::option::Option<i32>,
3265
3266    /// Optional. Positive penalties.
3267    pub presence_penalty: std::option::Option<f32>,
3268
3269    /// Optional. Frequency penalties.
3270    pub frequency_penalty: std::option::Option<f32>,
3271
3272    /// Optional. Seed.
3273    pub seed: std::option::Option<i32>,
3274
3275    /// Optional. Output response mimetype of the generated candidate text.
3276    /// Supported mimetype:
3277    ///
3278    /// - `text/plain`: (default) Text output.
3279    /// - `application/json`: JSON response in the candidates.
3280    ///   The model needs to be prompted to output the appropriate response type,
3281    ///   otherwise the behavior is undefined.
3282    ///   This is a preview feature.
3283    pub response_mime_type: std::string::String,
3284
3285    /// Optional. The `Schema` object allows the definition of input and output
3286    /// data types. These types can be objects, but also primitives and arrays.
3287    /// Represents a select subset of an [OpenAPI 3.0 schema
3288    /// object](https://spec.openapis.org/oas/v3.0.3#schema).
3289    /// If set, a compatible response_mime_type must also be set.
3290    /// Compatible mimetypes:
3291    /// `application/json`: Schema for JSON response.
3292    pub response_schema: std::option::Option<crate::model::Schema>,
3293
3294    /// Optional. Output schema of the generated response. This is an alternative
3295    /// to `response_schema` that accepts [JSON Schema](https://json-schema.org/).
3296    ///
3297    /// If set, `response_schema` must be omitted, but `response_mime_type` is
3298    /// required.
3299    ///
3300    /// While the full JSON Schema may be sent, not all features are supported.
3301    /// Specifically, only the following properties are supported:
3302    ///
3303    /// - `$id`
3304    /// - `$defs`
3305    /// - `$ref`
3306    /// - `$anchor`
3307    /// - `type`
3308    /// - `format`
3309    /// - `title`
3310    /// - `description`
3311    /// - `enum` (for strings and numbers)
3312    /// - `items`
3313    /// - `prefixItems`
3314    /// - `minItems`
3315    /// - `maxItems`
3316    /// - `minimum`
3317    /// - `maximum`
3318    /// - `anyOf`
3319    /// - `oneOf` (interpreted the same as `anyOf`)
3320    /// - `properties`
3321    /// - `additionalProperties`
3322    /// - `required`
3323    ///
3324    /// The non-standard `propertyOrdering` property may also be set.
3325    ///
3326    /// Cyclic references are unrolled to a limited degree and, as such, may only
3327    /// be used within non-required properties. (Nullable properties are not
3328    /// sufficient.) If `$ref` is set on a sub-schema, no other properties, except
3329    /// for than those starting as a `$`, may be set.
3330    pub response_json_schema: std::option::Option<wkt::Value>,
3331
3332    /// Optional. Routing configuration.
3333    pub routing_config: std::option::Option<crate::model::generation_config::RoutingConfig>,
3334
3335    /// Optional. Config for thinking features.
3336    /// An error will be returned if this field is set for models that don't
3337    /// support thinking.
3338    pub thinking_config: std::option::Option<crate::model::generation_config::ThinkingConfig>,
3339
3340    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3341}
3342
3343#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3344impl GenerationConfig {
3345    pub fn new() -> Self {
3346        std::default::Default::default()
3347    }
3348
3349    /// Sets the value of [temperature][crate::model::GenerationConfig::temperature].
3350    pub fn set_temperature<T>(mut self, v: T) -> Self
3351    where
3352        T: std::convert::Into<f32>,
3353    {
3354        self.temperature = std::option::Option::Some(v.into());
3355        self
3356    }
3357
3358    /// Sets or clears the value of [temperature][crate::model::GenerationConfig::temperature].
3359    pub fn set_or_clear_temperature<T>(mut self, v: std::option::Option<T>) -> Self
3360    where
3361        T: std::convert::Into<f32>,
3362    {
3363        self.temperature = v.map(|x| x.into());
3364        self
3365    }
3366
3367    /// Sets the value of [top_p][crate::model::GenerationConfig::top_p].
3368    pub fn set_top_p<T>(mut self, v: T) -> Self
3369    where
3370        T: std::convert::Into<f32>,
3371    {
3372        self.top_p = std::option::Option::Some(v.into());
3373        self
3374    }
3375
3376    /// Sets or clears the value of [top_p][crate::model::GenerationConfig::top_p].
3377    pub fn set_or_clear_top_p<T>(mut self, v: std::option::Option<T>) -> Self
3378    where
3379        T: std::convert::Into<f32>,
3380    {
3381        self.top_p = v.map(|x| x.into());
3382        self
3383    }
3384
3385    /// Sets the value of [top_k][crate::model::GenerationConfig::top_k].
3386    pub fn set_top_k<T>(mut self, v: T) -> Self
3387    where
3388        T: std::convert::Into<f32>,
3389    {
3390        self.top_k = std::option::Option::Some(v.into());
3391        self
3392    }
3393
3394    /// Sets or clears the value of [top_k][crate::model::GenerationConfig::top_k].
3395    pub fn set_or_clear_top_k<T>(mut self, v: std::option::Option<T>) -> Self
3396    where
3397        T: std::convert::Into<f32>,
3398    {
3399        self.top_k = v.map(|x| x.into());
3400        self
3401    }
3402
3403    /// Sets the value of [candidate_count][crate::model::GenerationConfig::candidate_count].
3404    pub fn set_candidate_count<T>(mut self, v: T) -> Self
3405    where
3406        T: std::convert::Into<i32>,
3407    {
3408        self.candidate_count = std::option::Option::Some(v.into());
3409        self
3410    }
3411
3412    /// Sets or clears the value of [candidate_count][crate::model::GenerationConfig::candidate_count].
3413    pub fn set_or_clear_candidate_count<T>(mut self, v: std::option::Option<T>) -> Self
3414    where
3415        T: std::convert::Into<i32>,
3416    {
3417        self.candidate_count = v.map(|x| x.into());
3418        self
3419    }
3420
3421    /// Sets the value of [max_output_tokens][crate::model::GenerationConfig::max_output_tokens].
3422    pub fn set_max_output_tokens<T>(mut self, v: T) -> Self
3423    where
3424        T: std::convert::Into<i32>,
3425    {
3426        self.max_output_tokens = std::option::Option::Some(v.into());
3427        self
3428    }
3429
3430    /// Sets or clears the value of [max_output_tokens][crate::model::GenerationConfig::max_output_tokens].
3431    pub fn set_or_clear_max_output_tokens<T>(mut self, v: std::option::Option<T>) -> Self
3432    where
3433        T: std::convert::Into<i32>,
3434    {
3435        self.max_output_tokens = v.map(|x| x.into());
3436        self
3437    }
3438
3439    /// Sets the value of [stop_sequences][crate::model::GenerationConfig::stop_sequences].
3440    pub fn set_stop_sequences<T, V>(mut self, v: T) -> Self
3441    where
3442        T: std::iter::IntoIterator<Item = V>,
3443        V: std::convert::Into<std::string::String>,
3444    {
3445        use std::iter::Iterator;
3446        self.stop_sequences = v.into_iter().map(|i| i.into()).collect();
3447        self
3448    }
3449
3450    /// Sets the value of [response_logprobs][crate::model::GenerationConfig::response_logprobs].
3451    pub fn set_response_logprobs<T>(mut self, v: T) -> Self
3452    where
3453        T: std::convert::Into<bool>,
3454    {
3455        self.response_logprobs = std::option::Option::Some(v.into());
3456        self
3457    }
3458
3459    /// Sets or clears the value of [response_logprobs][crate::model::GenerationConfig::response_logprobs].
3460    pub fn set_or_clear_response_logprobs<T>(mut self, v: std::option::Option<T>) -> Self
3461    where
3462        T: std::convert::Into<bool>,
3463    {
3464        self.response_logprobs = v.map(|x| x.into());
3465        self
3466    }
3467
3468    /// Sets the value of [logprobs][crate::model::GenerationConfig::logprobs].
3469    pub fn set_logprobs<T>(mut self, v: T) -> Self
3470    where
3471        T: std::convert::Into<i32>,
3472    {
3473        self.logprobs = std::option::Option::Some(v.into());
3474        self
3475    }
3476
3477    /// Sets or clears the value of [logprobs][crate::model::GenerationConfig::logprobs].
3478    pub fn set_or_clear_logprobs<T>(mut self, v: std::option::Option<T>) -> Self
3479    where
3480        T: std::convert::Into<i32>,
3481    {
3482        self.logprobs = v.map(|x| x.into());
3483        self
3484    }
3485
3486    /// Sets the value of [presence_penalty][crate::model::GenerationConfig::presence_penalty].
3487    pub fn set_presence_penalty<T>(mut self, v: T) -> Self
3488    where
3489        T: std::convert::Into<f32>,
3490    {
3491        self.presence_penalty = std::option::Option::Some(v.into());
3492        self
3493    }
3494
3495    /// Sets or clears the value of [presence_penalty][crate::model::GenerationConfig::presence_penalty].
3496    pub fn set_or_clear_presence_penalty<T>(mut self, v: std::option::Option<T>) -> Self
3497    where
3498        T: std::convert::Into<f32>,
3499    {
3500        self.presence_penalty = v.map(|x| x.into());
3501        self
3502    }
3503
3504    /// Sets the value of [frequency_penalty][crate::model::GenerationConfig::frequency_penalty].
3505    pub fn set_frequency_penalty<T>(mut self, v: T) -> Self
3506    where
3507        T: std::convert::Into<f32>,
3508    {
3509        self.frequency_penalty = std::option::Option::Some(v.into());
3510        self
3511    }
3512
3513    /// Sets or clears the value of [frequency_penalty][crate::model::GenerationConfig::frequency_penalty].
3514    pub fn set_or_clear_frequency_penalty<T>(mut self, v: std::option::Option<T>) -> Self
3515    where
3516        T: std::convert::Into<f32>,
3517    {
3518        self.frequency_penalty = v.map(|x| x.into());
3519        self
3520    }
3521
3522    /// Sets the value of [seed][crate::model::GenerationConfig::seed].
3523    pub fn set_seed<T>(mut self, v: T) -> Self
3524    where
3525        T: std::convert::Into<i32>,
3526    {
3527        self.seed = std::option::Option::Some(v.into());
3528        self
3529    }
3530
3531    /// Sets or clears the value of [seed][crate::model::GenerationConfig::seed].
3532    pub fn set_or_clear_seed<T>(mut self, v: std::option::Option<T>) -> Self
3533    where
3534        T: std::convert::Into<i32>,
3535    {
3536        self.seed = v.map(|x| x.into());
3537        self
3538    }
3539
3540    /// Sets the value of [response_mime_type][crate::model::GenerationConfig::response_mime_type].
3541    pub fn set_response_mime_type<T: std::convert::Into<std::string::String>>(
3542        mut self,
3543        v: T,
3544    ) -> Self {
3545        self.response_mime_type = v.into();
3546        self
3547    }
3548
3549    /// Sets the value of [response_schema][crate::model::GenerationConfig::response_schema].
3550    pub fn set_response_schema<T>(mut self, v: T) -> Self
3551    where
3552        T: std::convert::Into<crate::model::Schema>,
3553    {
3554        self.response_schema = std::option::Option::Some(v.into());
3555        self
3556    }
3557
3558    /// Sets or clears the value of [response_schema][crate::model::GenerationConfig::response_schema].
3559    pub fn set_or_clear_response_schema<T>(mut self, v: std::option::Option<T>) -> Self
3560    where
3561        T: std::convert::Into<crate::model::Schema>,
3562    {
3563        self.response_schema = v.map(|x| x.into());
3564        self
3565    }
3566
3567    /// Sets the value of [response_json_schema][crate::model::GenerationConfig::response_json_schema].
3568    pub fn set_response_json_schema<T>(mut self, v: T) -> Self
3569    where
3570        T: std::convert::Into<wkt::Value>,
3571    {
3572        self.response_json_schema = std::option::Option::Some(v.into());
3573        self
3574    }
3575
3576    /// Sets or clears the value of [response_json_schema][crate::model::GenerationConfig::response_json_schema].
3577    pub fn set_or_clear_response_json_schema<T>(mut self, v: std::option::Option<T>) -> Self
3578    where
3579        T: std::convert::Into<wkt::Value>,
3580    {
3581        self.response_json_schema = v.map(|x| x.into());
3582        self
3583    }
3584
3585    /// Sets the value of [routing_config][crate::model::GenerationConfig::routing_config].
3586    pub fn set_routing_config<T>(mut self, v: T) -> Self
3587    where
3588        T: std::convert::Into<crate::model::generation_config::RoutingConfig>,
3589    {
3590        self.routing_config = std::option::Option::Some(v.into());
3591        self
3592    }
3593
3594    /// Sets or clears the value of [routing_config][crate::model::GenerationConfig::routing_config].
3595    pub fn set_or_clear_routing_config<T>(mut self, v: std::option::Option<T>) -> Self
3596    where
3597        T: std::convert::Into<crate::model::generation_config::RoutingConfig>,
3598    {
3599        self.routing_config = v.map(|x| x.into());
3600        self
3601    }
3602
3603    /// Sets the value of [thinking_config][crate::model::GenerationConfig::thinking_config].
3604    pub fn set_thinking_config<T>(mut self, v: T) -> Self
3605    where
3606        T: std::convert::Into<crate::model::generation_config::ThinkingConfig>,
3607    {
3608        self.thinking_config = std::option::Option::Some(v.into());
3609        self
3610    }
3611
3612    /// Sets or clears the value of [thinking_config][crate::model::GenerationConfig::thinking_config].
3613    pub fn set_or_clear_thinking_config<T>(mut self, v: std::option::Option<T>) -> Self
3614    where
3615        T: std::convert::Into<crate::model::generation_config::ThinkingConfig>,
3616    {
3617        self.thinking_config = v.map(|x| x.into());
3618        self
3619    }
3620}
3621
3622#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3623impl wkt::message::Message for GenerationConfig {
3624    fn typename() -> &'static str {
3625        "type.googleapis.com/google.cloud.aiplatform.v1.GenerationConfig"
3626    }
3627}
3628
3629/// Defines additional types related to [GenerationConfig].
3630#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3631pub mod generation_config {
3632    #[allow(unused_imports)]
3633    use super::*;
3634
3635    /// The configuration for routing the request to a specific model.
3636    #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3637    #[derive(Clone, Default, PartialEq)]
3638    #[non_exhaustive]
3639    pub struct RoutingConfig {
3640        /// Routing mode.
3641        pub routing_config:
3642            std::option::Option<crate::model::generation_config::routing_config::RoutingConfig>,
3643
3644        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3645    }
3646
3647    #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3648    impl RoutingConfig {
3649        pub fn new() -> Self {
3650            std::default::Default::default()
3651        }
3652
3653        /// Sets the value of [routing_config][crate::model::generation_config::RoutingConfig::routing_config].
3654        ///
3655        /// Note that all the setters affecting `routing_config` are mutually
3656        /// exclusive.
3657        pub fn set_routing_config<
3658            T: std::convert::Into<
3659                    std::option::Option<
3660                        crate::model::generation_config::routing_config::RoutingConfig,
3661                    >,
3662                >,
3663        >(
3664            mut self,
3665            v: T,
3666        ) -> Self {
3667            self.routing_config = v.into();
3668            self
3669        }
3670
3671        /// The value of [routing_config][crate::model::generation_config::RoutingConfig::routing_config]
3672        /// if it holds a `AutoMode`, `None` if the field is not set or
3673        /// holds a different branch.
3674        pub fn auto_mode(
3675            &self,
3676        ) -> std::option::Option<
3677            &std::boxed::Box<crate::model::generation_config::routing_config::AutoRoutingMode>,
3678        > {
3679            #[allow(unreachable_patterns)]
3680            self.routing_config.as_ref().and_then(|v| match v {
3681                crate::model::generation_config::routing_config::RoutingConfig::AutoMode(v) => {
3682                    std::option::Option::Some(v)
3683                }
3684                _ => std::option::Option::None,
3685            })
3686        }
3687
3688        /// Sets the value of [routing_config][crate::model::generation_config::RoutingConfig::routing_config]
3689        /// to hold a `AutoMode`.
3690        ///
3691        /// Note that all the setters affecting `routing_config` are
3692        /// mutually exclusive.
3693        pub fn set_auto_mode<
3694            T: std::convert::Into<
3695                    std::boxed::Box<
3696                        crate::model::generation_config::routing_config::AutoRoutingMode,
3697                    >,
3698                >,
3699        >(
3700            mut self,
3701            v: T,
3702        ) -> Self {
3703            self.routing_config = std::option::Option::Some(
3704                crate::model::generation_config::routing_config::RoutingConfig::AutoMode(v.into()),
3705            );
3706            self
3707        }
3708
3709        /// The value of [routing_config][crate::model::generation_config::RoutingConfig::routing_config]
3710        /// if it holds a `ManualMode`, `None` if the field is not set or
3711        /// holds a different branch.
3712        pub fn manual_mode(
3713            &self,
3714        ) -> std::option::Option<
3715            &std::boxed::Box<crate::model::generation_config::routing_config::ManualRoutingMode>,
3716        > {
3717            #[allow(unreachable_patterns)]
3718            self.routing_config.as_ref().and_then(|v| match v {
3719                crate::model::generation_config::routing_config::RoutingConfig::ManualMode(v) => {
3720                    std::option::Option::Some(v)
3721                }
3722                _ => std::option::Option::None,
3723            })
3724        }
3725
3726        /// Sets the value of [routing_config][crate::model::generation_config::RoutingConfig::routing_config]
3727        /// to hold a `ManualMode`.
3728        ///
3729        /// Note that all the setters affecting `routing_config` are
3730        /// mutually exclusive.
3731        pub fn set_manual_mode<
3732            T: std::convert::Into<
3733                    std::boxed::Box<
3734                        crate::model::generation_config::routing_config::ManualRoutingMode,
3735                    >,
3736                >,
3737        >(
3738            mut self,
3739            v: T,
3740        ) -> Self {
3741            self.routing_config = std::option::Option::Some(
3742                crate::model::generation_config::routing_config::RoutingConfig::ManualMode(
3743                    v.into(),
3744                ),
3745            );
3746            self
3747        }
3748    }
3749
3750    #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3751    impl wkt::message::Message for RoutingConfig {
3752        fn typename() -> &'static str {
3753            "type.googleapis.com/google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig"
3754        }
3755    }
3756
3757    /// Defines additional types related to [RoutingConfig].
3758    #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3759    pub mod routing_config {
3760        #[allow(unused_imports)]
3761        use super::*;
3762
3763        /// When automated routing is specified, the routing will be determined by
3764        /// the pretrained routing model and customer provided model routing
3765        /// preference.
3766        #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3767        #[derive(Clone, Default, PartialEq)]
3768        #[non_exhaustive]
3769        pub struct AutoRoutingMode {
3770
3771            /// The model routing preference.
3772            pub model_routing_preference: std::option::Option<crate::model::generation_config::routing_config::auto_routing_mode::ModelRoutingPreference>,
3773
3774            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3775        }
3776
3777        #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3778        impl AutoRoutingMode {
3779            pub fn new() -> Self {
3780                std::default::Default::default()
3781            }
3782
3783            /// Sets the value of [model_routing_preference][crate::model::generation_config::routing_config::AutoRoutingMode::model_routing_preference].
3784            pub fn set_model_routing_preference<T>(mut self, v: T) -> Self
3785            where T: std::convert::Into<crate::model::generation_config::routing_config::auto_routing_mode::ModelRoutingPreference>
3786            {
3787                self.model_routing_preference = std::option::Option::Some(v.into());
3788                self
3789            }
3790
3791            /// Sets or clears the value of [model_routing_preference][crate::model::generation_config::routing_config::AutoRoutingMode::model_routing_preference].
3792            pub fn set_or_clear_model_routing_preference<T>(mut self, v: std::option::Option<T>) -> Self
3793            where T: std::convert::Into<crate::model::generation_config::routing_config::auto_routing_mode::ModelRoutingPreference>
3794            {
3795                self.model_routing_preference = v.map(|x| x.into());
3796                self
3797            }
3798        }
3799
3800        #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3801        impl wkt::message::Message for AutoRoutingMode {
3802            fn typename() -> &'static str {
3803                "type.googleapis.com/google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingMode"
3804            }
3805        }
3806
3807        /// Defines additional types related to [AutoRoutingMode].
3808        #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3809        pub mod auto_routing_mode {
3810            #[allow(unused_imports)]
3811            use super::*;
3812
3813            /// The model routing preference.
3814            ///
3815            /// # Working with unknown values
3816            ///
3817            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3818            /// additional enum variants at any time. Adding new variants is not considered
3819            /// a breaking change. Applications should write their code in anticipation of:
3820            ///
3821            /// - New values appearing in future releases of the client library, **and**
3822            /// - New values received dynamically, without application changes.
3823            ///
3824            /// Please consult the [Working with enums] section in the user guide for some
3825            /// guidelines.
3826            ///
3827            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3828            #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3829            #[derive(Clone, Debug, PartialEq)]
3830            #[non_exhaustive]
3831            pub enum ModelRoutingPreference {
3832                /// Unspecified model routing preference.
3833                Unknown,
3834                /// Prefer higher quality over low cost.
3835                PrioritizeQuality,
3836                /// Balanced model routing preference.
3837                Balanced,
3838                /// Prefer lower cost over higher quality.
3839                PrioritizeCost,
3840                /// If set, the enum was initialized with an unknown value.
3841                ///
3842                /// Applications can examine the value using [ModelRoutingPreference::value] or
3843                /// [ModelRoutingPreference::name].
3844                UnknownValue(model_routing_preference::UnknownValue),
3845            }
3846
3847            #[doc(hidden)]
3848            #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3849            pub mod model_routing_preference {
3850                #[allow(unused_imports)]
3851                use super::*;
3852                #[derive(Clone, Debug, PartialEq)]
3853                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3854            }
3855
3856            #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3857            impl ModelRoutingPreference {
3858                /// Gets the enum value.
3859                ///
3860                /// Returns `None` if the enum contains an unknown value deserialized from
3861                /// the string representation of enums.
3862                pub fn value(&self) -> std::option::Option<i32> {
3863                    match self {
3864                        Self::Unknown => std::option::Option::Some(0),
3865                        Self::PrioritizeQuality => std::option::Option::Some(1),
3866                        Self::Balanced => std::option::Option::Some(2),
3867                        Self::PrioritizeCost => std::option::Option::Some(3),
3868                        Self::UnknownValue(u) => u.0.value(),
3869                    }
3870                }
3871
3872                /// Gets the enum value as a string.
3873                ///
3874                /// Returns `None` if the enum contains an unknown value deserialized from
3875                /// the integer representation of enums.
3876                pub fn name(&self) -> std::option::Option<&str> {
3877                    match self {
3878                        Self::Unknown => std::option::Option::Some("UNKNOWN"),
3879                        Self::PrioritizeQuality => std::option::Option::Some("PRIORITIZE_QUALITY"),
3880                        Self::Balanced => std::option::Option::Some("BALANCED"),
3881                        Self::PrioritizeCost => std::option::Option::Some("PRIORITIZE_COST"),
3882                        Self::UnknownValue(u) => u.0.name(),
3883                    }
3884                }
3885            }
3886
3887            #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3888            impl std::default::Default for ModelRoutingPreference {
3889                fn default() -> Self {
3890                    use std::convert::From;
3891                    Self::from(0)
3892                }
3893            }
3894
3895            #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3896            impl std::fmt::Display for ModelRoutingPreference {
3897                fn fmt(
3898                    &self,
3899                    f: &mut std::fmt::Formatter<'_>,
3900                ) -> std::result::Result<(), std::fmt::Error> {
3901                    wkt::internal::display_enum(f, self.name(), self.value())
3902                }
3903            }
3904
3905            #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3906            impl std::convert::From<i32> for ModelRoutingPreference {
3907                fn from(value: i32) -> Self {
3908                    match value {
3909                        0 => Self::Unknown,
3910                        1 => Self::PrioritizeQuality,
3911                        2 => Self::Balanced,
3912                        3 => Self::PrioritizeCost,
3913                        _ => Self::UnknownValue(model_routing_preference::UnknownValue(
3914                            wkt::internal::UnknownEnumValue::Integer(value),
3915                        )),
3916                    }
3917                }
3918            }
3919
3920            #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3921            impl std::convert::From<&str> for ModelRoutingPreference {
3922                fn from(value: &str) -> Self {
3923                    use std::string::ToString;
3924                    match value {
3925                        "UNKNOWN" => Self::Unknown,
3926                        "PRIORITIZE_QUALITY" => Self::PrioritizeQuality,
3927                        "BALANCED" => Self::Balanced,
3928                        "PRIORITIZE_COST" => Self::PrioritizeCost,
3929                        _ => Self::UnknownValue(model_routing_preference::UnknownValue(
3930                            wkt::internal::UnknownEnumValue::String(value.to_string()),
3931                        )),
3932                    }
3933                }
3934            }
3935
3936            #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3937            impl serde::ser::Serialize for ModelRoutingPreference {
3938                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3939                where
3940                    S: serde::Serializer,
3941                {
3942                    match self {
3943                        Self::Unknown => serializer.serialize_i32(0),
3944                        Self::PrioritizeQuality => serializer.serialize_i32(1),
3945                        Self::Balanced => serializer.serialize_i32(2),
3946                        Self::PrioritizeCost => serializer.serialize_i32(3),
3947                        Self::UnknownValue(u) => u.0.serialize(serializer),
3948                    }
3949                }
3950            }
3951
3952            #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3953            impl<'de> serde::de::Deserialize<'de> for ModelRoutingPreference {
3954                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3955                where
3956                    D: serde::Deserializer<'de>,
3957                {
3958                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<ModelRoutingPreference>::new(
3959                        ".google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference"))
3960                }
3961            }
3962        }
3963
3964        /// When manual routing is set, the specified model will be used directly.
3965        #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3966        #[derive(Clone, Default, PartialEq)]
3967        #[non_exhaustive]
3968        pub struct ManualRoutingMode {
3969            /// The model name to use. Only the public LLM models are accepted. e.g.
3970            /// 'gemini-1.5-pro-001'.
3971            pub model_name: std::option::Option<std::string::String>,
3972
3973            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3974        }
3975
3976        #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
3977        impl ManualRoutingMode {
3978            pub fn new() -> Self {
3979                std::default::Default::default()
3980            }
3981
3982            /// Sets the value of [model_name][crate::model::generation_config::routing_config::ManualRoutingMode::model_name].
3983            pub fn set_model_name<T>(mut self, v: T) -> Self
3984            where
3985                T: std::convert::Into<std::string::String>,
3986            {
3987                self.model_name = std::option::Option::Some(v.into());
3988                self
3989            }
3990
3991            /// Sets or clears the value of [model_name][crate::model::generation_config::routing_config::ManualRoutingMode::model_name].
3992            pub fn set_or_clear_model_name<T>(mut self, v: std::option::Option<T>) -> Self
3993            where
3994                T: std::convert::Into<std::string::String>,
3995            {
3996                self.model_name = v.map(|x| x.into());
3997                self
3998            }
3999        }
4000
4001        #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
4002        impl wkt::message::Message for ManualRoutingMode {
4003            fn typename() -> &'static str {
4004                "type.googleapis.com/google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.ManualRoutingMode"
4005            }
4006        }
4007
4008        /// Routing mode.
4009        #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
4010        #[derive(Clone, Debug, PartialEq)]
4011        #[non_exhaustive]
4012        pub enum RoutingConfig {
4013            /// Automated routing.
4014            AutoMode(
4015                std::boxed::Box<crate::model::generation_config::routing_config::AutoRoutingMode>,
4016            ),
4017            /// Manual routing.
4018            ManualMode(
4019                std::boxed::Box<crate::model::generation_config::routing_config::ManualRoutingMode>,
4020            ),
4021        }
4022    }
4023
4024    /// Config for thinking features.
4025    #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
4026    #[derive(Clone, Default, PartialEq)]
4027    #[non_exhaustive]
4028    pub struct ThinkingConfig {
4029        /// Indicates whether to include thoughts in the response.
4030        /// If true, thoughts are returned only when available.
4031        pub include_thoughts: std::option::Option<bool>,
4032
4033        /// Optional. Indicates the thinking budget in tokens.
4034        /// This is only applied when enable_thinking is true.
4035        pub thinking_budget: std::option::Option<i32>,
4036
4037        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4038    }
4039
4040    #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
4041    impl ThinkingConfig {
4042        pub fn new() -> Self {
4043            std::default::Default::default()
4044        }
4045
4046        /// Sets the value of [include_thoughts][crate::model::generation_config::ThinkingConfig::include_thoughts].
4047        pub fn set_include_thoughts<T>(mut self, v: T) -> Self
4048        where
4049            T: std::convert::Into<bool>,
4050        {
4051            self.include_thoughts = std::option::Option::Some(v.into());
4052            self
4053        }
4054
4055        /// Sets or clears the value of [include_thoughts][crate::model::generation_config::ThinkingConfig::include_thoughts].
4056        pub fn set_or_clear_include_thoughts<T>(mut self, v: std::option::Option<T>) -> Self
4057        where
4058            T: std::convert::Into<bool>,
4059        {
4060            self.include_thoughts = v.map(|x| x.into());
4061            self
4062        }
4063
4064        /// Sets the value of [thinking_budget][crate::model::generation_config::ThinkingConfig::thinking_budget].
4065        pub fn set_thinking_budget<T>(mut self, v: T) -> Self
4066        where
4067            T: std::convert::Into<i32>,
4068        {
4069            self.thinking_budget = std::option::Option::Some(v.into());
4070            self
4071        }
4072
4073        /// Sets or clears the value of [thinking_budget][crate::model::generation_config::ThinkingConfig::thinking_budget].
4074        pub fn set_or_clear_thinking_budget<T>(mut self, v: std::option::Option<T>) -> Self
4075        where
4076            T: std::convert::Into<i32>,
4077        {
4078            self.thinking_budget = v.map(|x| x.into());
4079            self
4080        }
4081    }
4082
4083    #[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
4084    impl wkt::message::Message for ThinkingConfig {
4085        fn typename() -> &'static str {
4086            "type.googleapis.com/google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig"
4087        }
4088    }
4089}
4090
4091/// Safety settings.
4092#[cfg(feature = "prediction-service")]
4093#[derive(Clone, Default, PartialEq)]
4094#[non_exhaustive]
4095pub struct SafetySetting {
4096    /// Required. Harm category.
4097    pub category: crate::model::HarmCategory,
4098
4099    /// Required. The harm block threshold.
4100    pub threshold: crate::model::safety_setting::HarmBlockThreshold,
4101
4102    /// Optional. Specify if the threshold is used for probability or severity
4103    /// score. If not specified, the threshold is used for probability score.
4104    pub method: crate::model::safety_setting::HarmBlockMethod,
4105
4106    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4107}
4108
4109#[cfg(feature = "prediction-service")]
4110impl SafetySetting {
4111    pub fn new() -> Self {
4112        std::default::Default::default()
4113    }
4114
4115    /// Sets the value of [category][crate::model::SafetySetting::category].
4116    pub fn set_category<T: std::convert::Into<crate::model::HarmCategory>>(mut self, v: T) -> Self {
4117        self.category = v.into();
4118        self
4119    }
4120
4121    /// Sets the value of [threshold][crate::model::SafetySetting::threshold].
4122    pub fn set_threshold<
4123        T: std::convert::Into<crate::model::safety_setting::HarmBlockThreshold>,
4124    >(
4125        mut self,
4126        v: T,
4127    ) -> Self {
4128        self.threshold = v.into();
4129        self
4130    }
4131
4132    /// Sets the value of [method][crate::model::SafetySetting::method].
4133    pub fn set_method<T: std::convert::Into<crate::model::safety_setting::HarmBlockMethod>>(
4134        mut self,
4135        v: T,
4136    ) -> Self {
4137        self.method = v.into();
4138        self
4139    }
4140}
4141
4142#[cfg(feature = "prediction-service")]
4143impl wkt::message::Message for SafetySetting {
4144    fn typename() -> &'static str {
4145        "type.googleapis.com/google.cloud.aiplatform.v1.SafetySetting"
4146    }
4147}
4148
4149/// Defines additional types related to [SafetySetting].
4150#[cfg(feature = "prediction-service")]
4151pub mod safety_setting {
4152    #[allow(unused_imports)]
4153    use super::*;
4154
4155    /// Probability based thresholds levels for blocking.
4156    ///
4157    /// # Working with unknown values
4158    ///
4159    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4160    /// additional enum variants at any time. Adding new variants is not considered
4161    /// a breaking change. Applications should write their code in anticipation of:
4162    ///
4163    /// - New values appearing in future releases of the client library, **and**
4164    /// - New values received dynamically, without application changes.
4165    ///
4166    /// Please consult the [Working with enums] section in the user guide for some
4167    /// guidelines.
4168    ///
4169    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4170    #[cfg(feature = "prediction-service")]
4171    #[derive(Clone, Debug, PartialEq)]
4172    #[non_exhaustive]
4173    pub enum HarmBlockThreshold {
4174        /// Unspecified harm block threshold.
4175        Unspecified,
4176        /// Block low threshold and above (i.e. block more).
4177        BlockLowAndAbove,
4178        /// Block medium threshold and above.
4179        BlockMediumAndAbove,
4180        /// Block only high threshold (i.e. block less).
4181        BlockOnlyHigh,
4182        /// Block none.
4183        BlockNone,
4184        /// Turn off the safety filter.
4185        Off,
4186        /// If set, the enum was initialized with an unknown value.
4187        ///
4188        /// Applications can examine the value using [HarmBlockThreshold::value] or
4189        /// [HarmBlockThreshold::name].
4190        UnknownValue(harm_block_threshold::UnknownValue),
4191    }
4192
4193    #[doc(hidden)]
4194    #[cfg(feature = "prediction-service")]
4195    pub mod harm_block_threshold {
4196        #[allow(unused_imports)]
4197        use super::*;
4198        #[derive(Clone, Debug, PartialEq)]
4199        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4200    }
4201
4202    #[cfg(feature = "prediction-service")]
4203    impl HarmBlockThreshold {
4204        /// Gets the enum value.
4205        ///
4206        /// Returns `None` if the enum contains an unknown value deserialized from
4207        /// the string representation of enums.
4208        pub fn value(&self) -> std::option::Option<i32> {
4209            match self {
4210                Self::Unspecified => std::option::Option::Some(0),
4211                Self::BlockLowAndAbove => std::option::Option::Some(1),
4212                Self::BlockMediumAndAbove => std::option::Option::Some(2),
4213                Self::BlockOnlyHigh => std::option::Option::Some(3),
4214                Self::BlockNone => std::option::Option::Some(4),
4215                Self::Off => std::option::Option::Some(5),
4216                Self::UnknownValue(u) => u.0.value(),
4217            }
4218        }
4219
4220        /// Gets the enum value as a string.
4221        ///
4222        /// Returns `None` if the enum contains an unknown value deserialized from
4223        /// the integer representation of enums.
4224        pub fn name(&self) -> std::option::Option<&str> {
4225            match self {
4226                Self::Unspecified => std::option::Option::Some("HARM_BLOCK_THRESHOLD_UNSPECIFIED"),
4227                Self::BlockLowAndAbove => std::option::Option::Some("BLOCK_LOW_AND_ABOVE"),
4228                Self::BlockMediumAndAbove => std::option::Option::Some("BLOCK_MEDIUM_AND_ABOVE"),
4229                Self::BlockOnlyHigh => std::option::Option::Some("BLOCK_ONLY_HIGH"),
4230                Self::BlockNone => std::option::Option::Some("BLOCK_NONE"),
4231                Self::Off => std::option::Option::Some("OFF"),
4232                Self::UnknownValue(u) => u.0.name(),
4233            }
4234        }
4235    }
4236
4237    #[cfg(feature = "prediction-service")]
4238    impl std::default::Default for HarmBlockThreshold {
4239        fn default() -> Self {
4240            use std::convert::From;
4241            Self::from(0)
4242        }
4243    }
4244
4245    #[cfg(feature = "prediction-service")]
4246    impl std::fmt::Display for HarmBlockThreshold {
4247        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4248            wkt::internal::display_enum(f, self.name(), self.value())
4249        }
4250    }
4251
4252    #[cfg(feature = "prediction-service")]
4253    impl std::convert::From<i32> for HarmBlockThreshold {
4254        fn from(value: i32) -> Self {
4255            match value {
4256                0 => Self::Unspecified,
4257                1 => Self::BlockLowAndAbove,
4258                2 => Self::BlockMediumAndAbove,
4259                3 => Self::BlockOnlyHigh,
4260                4 => Self::BlockNone,
4261                5 => Self::Off,
4262                _ => Self::UnknownValue(harm_block_threshold::UnknownValue(
4263                    wkt::internal::UnknownEnumValue::Integer(value),
4264                )),
4265            }
4266        }
4267    }
4268
4269    #[cfg(feature = "prediction-service")]
4270    impl std::convert::From<&str> for HarmBlockThreshold {
4271        fn from(value: &str) -> Self {
4272            use std::string::ToString;
4273            match value {
4274                "HARM_BLOCK_THRESHOLD_UNSPECIFIED" => Self::Unspecified,
4275                "BLOCK_LOW_AND_ABOVE" => Self::BlockLowAndAbove,
4276                "BLOCK_MEDIUM_AND_ABOVE" => Self::BlockMediumAndAbove,
4277                "BLOCK_ONLY_HIGH" => Self::BlockOnlyHigh,
4278                "BLOCK_NONE" => Self::BlockNone,
4279                "OFF" => Self::Off,
4280                _ => Self::UnknownValue(harm_block_threshold::UnknownValue(
4281                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4282                )),
4283            }
4284        }
4285    }
4286
4287    #[cfg(feature = "prediction-service")]
4288    impl serde::ser::Serialize for HarmBlockThreshold {
4289        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4290        where
4291            S: serde::Serializer,
4292        {
4293            match self {
4294                Self::Unspecified => serializer.serialize_i32(0),
4295                Self::BlockLowAndAbove => serializer.serialize_i32(1),
4296                Self::BlockMediumAndAbove => serializer.serialize_i32(2),
4297                Self::BlockOnlyHigh => serializer.serialize_i32(3),
4298                Self::BlockNone => serializer.serialize_i32(4),
4299                Self::Off => serializer.serialize_i32(5),
4300                Self::UnknownValue(u) => u.0.serialize(serializer),
4301            }
4302        }
4303    }
4304
4305    #[cfg(feature = "prediction-service")]
4306    impl<'de> serde::de::Deserialize<'de> for HarmBlockThreshold {
4307        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4308        where
4309            D: serde::Deserializer<'de>,
4310        {
4311            deserializer.deserialize_any(wkt::internal::EnumVisitor::<HarmBlockThreshold>::new(
4312                ".google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold",
4313            ))
4314        }
4315    }
4316
4317    /// Probability vs severity.
4318    ///
4319    /// # Working with unknown values
4320    ///
4321    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4322    /// additional enum variants at any time. Adding new variants is not considered
4323    /// a breaking change. Applications should write their code in anticipation of:
4324    ///
4325    /// - New values appearing in future releases of the client library, **and**
4326    /// - New values received dynamically, without application changes.
4327    ///
4328    /// Please consult the [Working with enums] section in the user guide for some
4329    /// guidelines.
4330    ///
4331    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4332    #[cfg(feature = "prediction-service")]
4333    #[derive(Clone, Debug, PartialEq)]
4334    #[non_exhaustive]
4335    pub enum HarmBlockMethod {
4336        /// The harm block method is unspecified.
4337        Unspecified,
4338        /// The harm block method uses both probability and severity scores.
4339        Severity,
4340        /// The harm block method uses the probability score.
4341        Probability,
4342        /// If set, the enum was initialized with an unknown value.
4343        ///
4344        /// Applications can examine the value using [HarmBlockMethod::value] or
4345        /// [HarmBlockMethod::name].
4346        UnknownValue(harm_block_method::UnknownValue),
4347    }
4348
4349    #[doc(hidden)]
4350    #[cfg(feature = "prediction-service")]
4351    pub mod harm_block_method {
4352        #[allow(unused_imports)]
4353        use super::*;
4354        #[derive(Clone, Debug, PartialEq)]
4355        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4356    }
4357
4358    #[cfg(feature = "prediction-service")]
4359    impl HarmBlockMethod {
4360        /// Gets the enum value.
4361        ///
4362        /// Returns `None` if the enum contains an unknown value deserialized from
4363        /// the string representation of enums.
4364        pub fn value(&self) -> std::option::Option<i32> {
4365            match self {
4366                Self::Unspecified => std::option::Option::Some(0),
4367                Self::Severity => std::option::Option::Some(1),
4368                Self::Probability => std::option::Option::Some(2),
4369                Self::UnknownValue(u) => u.0.value(),
4370            }
4371        }
4372
4373        /// Gets the enum value as a string.
4374        ///
4375        /// Returns `None` if the enum contains an unknown value deserialized from
4376        /// the integer representation of enums.
4377        pub fn name(&self) -> std::option::Option<&str> {
4378            match self {
4379                Self::Unspecified => std::option::Option::Some("HARM_BLOCK_METHOD_UNSPECIFIED"),
4380                Self::Severity => std::option::Option::Some("SEVERITY"),
4381                Self::Probability => std::option::Option::Some("PROBABILITY"),
4382                Self::UnknownValue(u) => u.0.name(),
4383            }
4384        }
4385    }
4386
4387    #[cfg(feature = "prediction-service")]
4388    impl std::default::Default for HarmBlockMethod {
4389        fn default() -> Self {
4390            use std::convert::From;
4391            Self::from(0)
4392        }
4393    }
4394
4395    #[cfg(feature = "prediction-service")]
4396    impl std::fmt::Display for HarmBlockMethod {
4397        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4398            wkt::internal::display_enum(f, self.name(), self.value())
4399        }
4400    }
4401
4402    #[cfg(feature = "prediction-service")]
4403    impl std::convert::From<i32> for HarmBlockMethod {
4404        fn from(value: i32) -> Self {
4405            match value {
4406                0 => Self::Unspecified,
4407                1 => Self::Severity,
4408                2 => Self::Probability,
4409                _ => Self::UnknownValue(harm_block_method::UnknownValue(
4410                    wkt::internal::UnknownEnumValue::Integer(value),
4411                )),
4412            }
4413        }
4414    }
4415
4416    #[cfg(feature = "prediction-service")]
4417    impl std::convert::From<&str> for HarmBlockMethod {
4418        fn from(value: &str) -> Self {
4419            use std::string::ToString;
4420            match value {
4421                "HARM_BLOCK_METHOD_UNSPECIFIED" => Self::Unspecified,
4422                "SEVERITY" => Self::Severity,
4423                "PROBABILITY" => Self::Probability,
4424                _ => Self::UnknownValue(harm_block_method::UnknownValue(
4425                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4426                )),
4427            }
4428        }
4429    }
4430
4431    #[cfg(feature = "prediction-service")]
4432    impl serde::ser::Serialize for HarmBlockMethod {
4433        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4434        where
4435            S: serde::Serializer,
4436        {
4437            match self {
4438                Self::Unspecified => serializer.serialize_i32(0),
4439                Self::Severity => serializer.serialize_i32(1),
4440                Self::Probability => serializer.serialize_i32(2),
4441                Self::UnknownValue(u) => u.0.serialize(serializer),
4442            }
4443        }
4444    }
4445
4446    #[cfg(feature = "prediction-service")]
4447    impl<'de> serde::de::Deserialize<'de> for HarmBlockMethod {
4448        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4449        where
4450            D: serde::Deserializer<'de>,
4451        {
4452            deserializer.deserialize_any(wkt::internal::EnumVisitor::<HarmBlockMethod>::new(
4453                ".google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod",
4454            ))
4455        }
4456    }
4457}
4458
4459/// Safety rating corresponding to the generated content.
4460#[cfg(feature = "prediction-service")]
4461#[derive(Clone, Default, PartialEq)]
4462#[non_exhaustive]
4463pub struct SafetyRating {
4464    /// Output only. Harm category.
4465    pub category: crate::model::HarmCategory,
4466
4467    /// Output only. Harm probability levels in the content.
4468    pub probability: crate::model::safety_rating::HarmProbability,
4469
4470    /// Output only. Harm probability score.
4471    pub probability_score: f32,
4472
4473    /// Output only. Harm severity levels in the content.
4474    pub severity: crate::model::safety_rating::HarmSeverity,
4475
4476    /// Output only. Harm severity score.
4477    pub severity_score: f32,
4478
4479    /// Output only. Indicates whether the content was filtered out because of this
4480    /// rating.
4481    pub blocked: bool,
4482
4483    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4484}
4485
4486#[cfg(feature = "prediction-service")]
4487impl SafetyRating {
4488    pub fn new() -> Self {
4489        std::default::Default::default()
4490    }
4491
4492    /// Sets the value of [category][crate::model::SafetyRating::category].
4493    pub fn set_category<T: std::convert::Into<crate::model::HarmCategory>>(mut self, v: T) -> Self {
4494        self.category = v.into();
4495        self
4496    }
4497
4498    /// Sets the value of [probability][crate::model::SafetyRating::probability].
4499    pub fn set_probability<T: std::convert::Into<crate::model::safety_rating::HarmProbability>>(
4500        mut self,
4501        v: T,
4502    ) -> Self {
4503        self.probability = v.into();
4504        self
4505    }
4506
4507    /// Sets the value of [probability_score][crate::model::SafetyRating::probability_score].
4508    pub fn set_probability_score<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
4509        self.probability_score = v.into();
4510        self
4511    }
4512
4513    /// Sets the value of [severity][crate::model::SafetyRating::severity].
4514    pub fn set_severity<T: std::convert::Into<crate::model::safety_rating::HarmSeverity>>(
4515        mut self,
4516        v: T,
4517    ) -> Self {
4518        self.severity = v.into();
4519        self
4520    }
4521
4522    /// Sets the value of [severity_score][crate::model::SafetyRating::severity_score].
4523    pub fn set_severity_score<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
4524        self.severity_score = v.into();
4525        self
4526    }
4527
4528    /// Sets the value of [blocked][crate::model::SafetyRating::blocked].
4529    pub fn set_blocked<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4530        self.blocked = v.into();
4531        self
4532    }
4533}
4534
4535#[cfg(feature = "prediction-service")]
4536impl wkt::message::Message for SafetyRating {
4537    fn typename() -> &'static str {
4538        "type.googleapis.com/google.cloud.aiplatform.v1.SafetyRating"
4539    }
4540}
4541
4542/// Defines additional types related to [SafetyRating].
4543#[cfg(feature = "prediction-service")]
4544pub mod safety_rating {
4545    #[allow(unused_imports)]
4546    use super::*;
4547
4548    /// Harm probability levels in the content.
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://google-cloud-rust.github.io/working_with_enums.html
4563    #[cfg(feature = "prediction-service")]
4564    #[derive(Clone, Debug, PartialEq)]
4565    #[non_exhaustive]
4566    pub enum HarmProbability {
4567        /// Harm probability unspecified.
4568        Unspecified,
4569        /// Negligible level of harm.
4570        Negligible,
4571        /// Low level of harm.
4572        Low,
4573        /// Medium level of harm.
4574        Medium,
4575        /// High level of harm.
4576        High,
4577        /// If set, the enum was initialized with an unknown value.
4578        ///
4579        /// Applications can examine the value using [HarmProbability::value] or
4580        /// [HarmProbability::name].
4581        UnknownValue(harm_probability::UnknownValue),
4582    }
4583
4584    #[doc(hidden)]
4585    #[cfg(feature = "prediction-service")]
4586    pub mod harm_probability {
4587        #[allow(unused_imports)]
4588        use super::*;
4589        #[derive(Clone, Debug, PartialEq)]
4590        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4591    }
4592
4593    #[cfg(feature = "prediction-service")]
4594    impl HarmProbability {
4595        /// Gets the enum value.
4596        ///
4597        /// Returns `None` if the enum contains an unknown value deserialized from
4598        /// the string representation of enums.
4599        pub fn value(&self) -> std::option::Option<i32> {
4600            match self {
4601                Self::Unspecified => std::option::Option::Some(0),
4602                Self::Negligible => std::option::Option::Some(1),
4603                Self::Low => std::option::Option::Some(2),
4604                Self::Medium => std::option::Option::Some(3),
4605                Self::High => std::option::Option::Some(4),
4606                Self::UnknownValue(u) => u.0.value(),
4607            }
4608        }
4609
4610        /// Gets the enum value as a string.
4611        ///
4612        /// Returns `None` if the enum contains an unknown value deserialized from
4613        /// the integer representation of enums.
4614        pub fn name(&self) -> std::option::Option<&str> {
4615            match self {
4616                Self::Unspecified => std::option::Option::Some("HARM_PROBABILITY_UNSPECIFIED"),
4617                Self::Negligible => std::option::Option::Some("NEGLIGIBLE"),
4618                Self::Low => std::option::Option::Some("LOW"),
4619                Self::Medium => std::option::Option::Some("MEDIUM"),
4620                Self::High => std::option::Option::Some("HIGH"),
4621                Self::UnknownValue(u) => u.0.name(),
4622            }
4623        }
4624    }
4625
4626    #[cfg(feature = "prediction-service")]
4627    impl std::default::Default for HarmProbability {
4628        fn default() -> Self {
4629            use std::convert::From;
4630            Self::from(0)
4631        }
4632    }
4633
4634    #[cfg(feature = "prediction-service")]
4635    impl std::fmt::Display for HarmProbability {
4636        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4637            wkt::internal::display_enum(f, self.name(), self.value())
4638        }
4639    }
4640
4641    #[cfg(feature = "prediction-service")]
4642    impl std::convert::From<i32> for HarmProbability {
4643        fn from(value: i32) -> Self {
4644            match value {
4645                0 => Self::Unspecified,
4646                1 => Self::Negligible,
4647                2 => Self::Low,
4648                3 => Self::Medium,
4649                4 => Self::High,
4650                _ => Self::UnknownValue(harm_probability::UnknownValue(
4651                    wkt::internal::UnknownEnumValue::Integer(value),
4652                )),
4653            }
4654        }
4655    }
4656
4657    #[cfg(feature = "prediction-service")]
4658    impl std::convert::From<&str> for HarmProbability {
4659        fn from(value: &str) -> Self {
4660            use std::string::ToString;
4661            match value {
4662                "HARM_PROBABILITY_UNSPECIFIED" => Self::Unspecified,
4663                "NEGLIGIBLE" => Self::Negligible,
4664                "LOW" => Self::Low,
4665                "MEDIUM" => Self::Medium,
4666                "HIGH" => Self::High,
4667                _ => Self::UnknownValue(harm_probability::UnknownValue(
4668                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4669                )),
4670            }
4671        }
4672    }
4673
4674    #[cfg(feature = "prediction-service")]
4675    impl serde::ser::Serialize for HarmProbability {
4676        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4677        where
4678            S: serde::Serializer,
4679        {
4680            match self {
4681                Self::Unspecified => serializer.serialize_i32(0),
4682                Self::Negligible => serializer.serialize_i32(1),
4683                Self::Low => serializer.serialize_i32(2),
4684                Self::Medium => serializer.serialize_i32(3),
4685                Self::High => serializer.serialize_i32(4),
4686                Self::UnknownValue(u) => u.0.serialize(serializer),
4687            }
4688        }
4689    }
4690
4691    #[cfg(feature = "prediction-service")]
4692    impl<'de> serde::de::Deserialize<'de> for HarmProbability {
4693        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4694        where
4695            D: serde::Deserializer<'de>,
4696        {
4697            deserializer.deserialize_any(wkt::internal::EnumVisitor::<HarmProbability>::new(
4698                ".google.cloud.aiplatform.v1.SafetyRating.HarmProbability",
4699            ))
4700        }
4701    }
4702
4703    /// Harm severity levels.
4704    ///
4705    /// # Working with unknown values
4706    ///
4707    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4708    /// additional enum variants at any time. Adding new variants is not considered
4709    /// a breaking change. Applications should write their code in anticipation of:
4710    ///
4711    /// - New values appearing in future releases of the client library, **and**
4712    /// - New values received dynamically, without application changes.
4713    ///
4714    /// Please consult the [Working with enums] section in the user guide for some
4715    /// guidelines.
4716    ///
4717    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4718    #[cfg(feature = "prediction-service")]
4719    #[derive(Clone, Debug, PartialEq)]
4720    #[non_exhaustive]
4721    pub enum HarmSeverity {
4722        /// Harm severity unspecified.
4723        Unspecified,
4724        /// Negligible level of harm severity.
4725        Negligible,
4726        /// Low level of harm severity.
4727        Low,
4728        /// Medium level of harm severity.
4729        Medium,
4730        /// High level of harm severity.
4731        High,
4732        /// If set, the enum was initialized with an unknown value.
4733        ///
4734        /// Applications can examine the value using [HarmSeverity::value] or
4735        /// [HarmSeverity::name].
4736        UnknownValue(harm_severity::UnknownValue),
4737    }
4738
4739    #[doc(hidden)]
4740    #[cfg(feature = "prediction-service")]
4741    pub mod harm_severity {
4742        #[allow(unused_imports)]
4743        use super::*;
4744        #[derive(Clone, Debug, PartialEq)]
4745        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4746    }
4747
4748    #[cfg(feature = "prediction-service")]
4749    impl HarmSeverity {
4750        /// Gets the enum value.
4751        ///
4752        /// Returns `None` if the enum contains an unknown value deserialized from
4753        /// the string representation of enums.
4754        pub fn value(&self) -> std::option::Option<i32> {
4755            match self {
4756                Self::Unspecified => std::option::Option::Some(0),
4757                Self::Negligible => std::option::Option::Some(1),
4758                Self::Low => std::option::Option::Some(2),
4759                Self::Medium => std::option::Option::Some(3),
4760                Self::High => std::option::Option::Some(4),
4761                Self::UnknownValue(u) => u.0.value(),
4762            }
4763        }
4764
4765        /// Gets the enum value as a string.
4766        ///
4767        /// Returns `None` if the enum contains an unknown value deserialized from
4768        /// the integer representation of enums.
4769        pub fn name(&self) -> std::option::Option<&str> {
4770            match self {
4771                Self::Unspecified => std::option::Option::Some("HARM_SEVERITY_UNSPECIFIED"),
4772                Self::Negligible => std::option::Option::Some("HARM_SEVERITY_NEGLIGIBLE"),
4773                Self::Low => std::option::Option::Some("HARM_SEVERITY_LOW"),
4774                Self::Medium => std::option::Option::Some("HARM_SEVERITY_MEDIUM"),
4775                Self::High => std::option::Option::Some("HARM_SEVERITY_HIGH"),
4776                Self::UnknownValue(u) => u.0.name(),
4777            }
4778        }
4779    }
4780
4781    #[cfg(feature = "prediction-service")]
4782    impl std::default::Default for HarmSeverity {
4783        fn default() -> Self {
4784            use std::convert::From;
4785            Self::from(0)
4786        }
4787    }
4788
4789    #[cfg(feature = "prediction-service")]
4790    impl std::fmt::Display for HarmSeverity {
4791        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4792            wkt::internal::display_enum(f, self.name(), self.value())
4793        }
4794    }
4795
4796    #[cfg(feature = "prediction-service")]
4797    impl std::convert::From<i32> for HarmSeverity {
4798        fn from(value: i32) -> Self {
4799            match value {
4800                0 => Self::Unspecified,
4801                1 => Self::Negligible,
4802                2 => Self::Low,
4803                3 => Self::Medium,
4804                4 => Self::High,
4805                _ => Self::UnknownValue(harm_severity::UnknownValue(
4806                    wkt::internal::UnknownEnumValue::Integer(value),
4807                )),
4808            }
4809        }
4810    }
4811
4812    #[cfg(feature = "prediction-service")]
4813    impl std::convert::From<&str> for HarmSeverity {
4814        fn from(value: &str) -> Self {
4815            use std::string::ToString;
4816            match value {
4817                "HARM_SEVERITY_UNSPECIFIED" => Self::Unspecified,
4818                "HARM_SEVERITY_NEGLIGIBLE" => Self::Negligible,
4819                "HARM_SEVERITY_LOW" => Self::Low,
4820                "HARM_SEVERITY_MEDIUM" => Self::Medium,
4821                "HARM_SEVERITY_HIGH" => Self::High,
4822                _ => Self::UnknownValue(harm_severity::UnknownValue(
4823                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4824                )),
4825            }
4826        }
4827    }
4828
4829    #[cfg(feature = "prediction-service")]
4830    impl serde::ser::Serialize for HarmSeverity {
4831        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4832        where
4833            S: serde::Serializer,
4834        {
4835            match self {
4836                Self::Unspecified => serializer.serialize_i32(0),
4837                Self::Negligible => serializer.serialize_i32(1),
4838                Self::Low => serializer.serialize_i32(2),
4839                Self::Medium => serializer.serialize_i32(3),
4840                Self::High => serializer.serialize_i32(4),
4841                Self::UnknownValue(u) => u.0.serialize(serializer),
4842            }
4843        }
4844    }
4845
4846    #[cfg(feature = "prediction-service")]
4847    impl<'de> serde::de::Deserialize<'de> for HarmSeverity {
4848        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4849        where
4850            D: serde::Deserializer<'de>,
4851        {
4852            deserializer.deserialize_any(wkt::internal::EnumVisitor::<HarmSeverity>::new(
4853                ".google.cloud.aiplatform.v1.SafetyRating.HarmSeverity",
4854            ))
4855        }
4856    }
4857}
4858
4859/// A collection of source attributions for a piece of content.
4860#[cfg(feature = "prediction-service")]
4861#[derive(Clone, Default, PartialEq)]
4862#[non_exhaustive]
4863pub struct CitationMetadata {
4864    /// Output only. List of citations.
4865    pub citations: std::vec::Vec<crate::model::Citation>,
4866
4867    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4868}
4869
4870#[cfg(feature = "prediction-service")]
4871impl CitationMetadata {
4872    pub fn new() -> Self {
4873        std::default::Default::default()
4874    }
4875
4876    /// Sets the value of [citations][crate::model::CitationMetadata::citations].
4877    pub fn set_citations<T, V>(mut self, v: T) -> Self
4878    where
4879        T: std::iter::IntoIterator<Item = V>,
4880        V: std::convert::Into<crate::model::Citation>,
4881    {
4882        use std::iter::Iterator;
4883        self.citations = v.into_iter().map(|i| i.into()).collect();
4884        self
4885    }
4886}
4887
4888#[cfg(feature = "prediction-service")]
4889impl wkt::message::Message for CitationMetadata {
4890    fn typename() -> &'static str {
4891        "type.googleapis.com/google.cloud.aiplatform.v1.CitationMetadata"
4892    }
4893}
4894
4895/// Source attributions for content.
4896#[cfg(feature = "prediction-service")]
4897#[derive(Clone, Default, PartialEq)]
4898#[non_exhaustive]
4899pub struct Citation {
4900    /// Output only. Start index into the content.
4901    pub start_index: i32,
4902
4903    /// Output only. End index into the content.
4904    pub end_index: i32,
4905
4906    /// Output only. Url reference of the attribution.
4907    pub uri: std::string::String,
4908
4909    /// Output only. Title of the attribution.
4910    pub title: std::string::String,
4911
4912    /// Output only. License of the attribution.
4913    pub license: std::string::String,
4914
4915    /// Output only. Publication date of the attribution.
4916    pub publication_date: std::option::Option<gtype::model::Date>,
4917
4918    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4919}
4920
4921#[cfg(feature = "prediction-service")]
4922impl Citation {
4923    pub fn new() -> Self {
4924        std::default::Default::default()
4925    }
4926
4927    /// Sets the value of [start_index][crate::model::Citation::start_index].
4928    pub fn set_start_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4929        self.start_index = v.into();
4930        self
4931    }
4932
4933    /// Sets the value of [end_index][crate::model::Citation::end_index].
4934    pub fn set_end_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4935        self.end_index = v.into();
4936        self
4937    }
4938
4939    /// Sets the value of [uri][crate::model::Citation::uri].
4940    pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4941        self.uri = v.into();
4942        self
4943    }
4944
4945    /// Sets the value of [title][crate::model::Citation::title].
4946    pub fn set_title<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4947        self.title = v.into();
4948        self
4949    }
4950
4951    /// Sets the value of [license][crate::model::Citation::license].
4952    pub fn set_license<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4953        self.license = v.into();
4954        self
4955    }
4956
4957    /// Sets the value of [publication_date][crate::model::Citation::publication_date].
4958    pub fn set_publication_date<T>(mut self, v: T) -> Self
4959    where
4960        T: std::convert::Into<gtype::model::Date>,
4961    {
4962        self.publication_date = std::option::Option::Some(v.into());
4963        self
4964    }
4965
4966    /// Sets or clears the value of [publication_date][crate::model::Citation::publication_date].
4967    pub fn set_or_clear_publication_date<T>(mut self, v: std::option::Option<T>) -> Self
4968    where
4969        T: std::convert::Into<gtype::model::Date>,
4970    {
4971        self.publication_date = v.map(|x| x.into());
4972        self
4973    }
4974}
4975
4976#[cfg(feature = "prediction-service")]
4977impl wkt::message::Message for Citation {
4978    fn typename() -> &'static str {
4979        "type.googleapis.com/google.cloud.aiplatform.v1.Citation"
4980    }
4981}
4982
4983/// A response candidate generated from the model.
4984#[cfg(feature = "prediction-service")]
4985#[derive(Clone, Default, PartialEq)]
4986#[non_exhaustive]
4987pub struct Candidate {
4988    /// Output only. Index of the candidate.
4989    pub index: i32,
4990
4991    /// Output only. Content parts of the candidate.
4992    pub content: std::option::Option<crate::model::Content>,
4993
4994    /// Output only. Confidence score of the candidate.
4995    pub score: f64,
4996
4997    /// Output only. Average log probability score of the candidate.
4998    pub avg_logprobs: f64,
4999
5000    /// Output only. Log-likelihood scores for the response tokens and top tokens
5001    pub logprobs_result: std::option::Option<crate::model::LogprobsResult>,
5002
5003    /// Output only. The reason why the model stopped generating tokens.
5004    /// If empty, the model has not stopped generating the tokens.
5005    pub finish_reason: crate::model::candidate::FinishReason,
5006
5007    /// Output only. List of ratings for the safety of a response candidate.
5008    ///
5009    /// There is at most one rating per category.
5010    pub safety_ratings: std::vec::Vec<crate::model::SafetyRating>,
5011
5012    /// Output only. Describes the reason the mode stopped generating tokens in
5013    /// more detail. This is only filled when `finish_reason` is set.
5014    pub finish_message: std::option::Option<std::string::String>,
5015
5016    /// Output only. Source attribution of the generated content.
5017    pub citation_metadata: std::option::Option<crate::model::CitationMetadata>,
5018
5019    /// Output only. Metadata specifies sources used to ground generated content.
5020    pub grounding_metadata: std::option::Option<crate::model::GroundingMetadata>,
5021
5022    /// Output only. Metadata related to url context retrieval tool.
5023    pub url_context_metadata: std::option::Option<crate::model::UrlContextMetadata>,
5024
5025    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5026}
5027
5028#[cfg(feature = "prediction-service")]
5029impl Candidate {
5030    pub fn new() -> Self {
5031        std::default::Default::default()
5032    }
5033
5034    /// Sets the value of [index][crate::model::Candidate::index].
5035    pub fn set_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5036        self.index = v.into();
5037        self
5038    }
5039
5040    /// Sets the value of [content][crate::model::Candidate::content].
5041    pub fn set_content<T>(mut self, v: T) -> Self
5042    where
5043        T: std::convert::Into<crate::model::Content>,
5044    {
5045        self.content = std::option::Option::Some(v.into());
5046        self
5047    }
5048
5049    /// Sets or clears the value of [content][crate::model::Candidate::content].
5050    pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
5051    where
5052        T: std::convert::Into<crate::model::Content>,
5053    {
5054        self.content = v.map(|x| x.into());
5055        self
5056    }
5057
5058    /// Sets the value of [score][crate::model::Candidate::score].
5059    pub fn set_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
5060        self.score = v.into();
5061        self
5062    }
5063
5064    /// Sets the value of [avg_logprobs][crate::model::Candidate::avg_logprobs].
5065    pub fn set_avg_logprobs<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
5066        self.avg_logprobs = v.into();
5067        self
5068    }
5069
5070    /// Sets the value of [logprobs_result][crate::model::Candidate::logprobs_result].
5071    pub fn set_logprobs_result<T>(mut self, v: T) -> Self
5072    where
5073        T: std::convert::Into<crate::model::LogprobsResult>,
5074    {
5075        self.logprobs_result = std::option::Option::Some(v.into());
5076        self
5077    }
5078
5079    /// Sets or clears the value of [logprobs_result][crate::model::Candidate::logprobs_result].
5080    pub fn set_or_clear_logprobs_result<T>(mut self, v: std::option::Option<T>) -> Self
5081    where
5082        T: std::convert::Into<crate::model::LogprobsResult>,
5083    {
5084        self.logprobs_result = v.map(|x| x.into());
5085        self
5086    }
5087
5088    /// Sets the value of [finish_reason][crate::model::Candidate::finish_reason].
5089    pub fn set_finish_reason<T: std::convert::Into<crate::model::candidate::FinishReason>>(
5090        mut self,
5091        v: T,
5092    ) -> Self {
5093        self.finish_reason = v.into();
5094        self
5095    }
5096
5097    /// Sets the value of [safety_ratings][crate::model::Candidate::safety_ratings].
5098    pub fn set_safety_ratings<T, V>(mut self, v: T) -> Self
5099    where
5100        T: std::iter::IntoIterator<Item = V>,
5101        V: std::convert::Into<crate::model::SafetyRating>,
5102    {
5103        use std::iter::Iterator;
5104        self.safety_ratings = v.into_iter().map(|i| i.into()).collect();
5105        self
5106    }
5107
5108    /// Sets the value of [finish_message][crate::model::Candidate::finish_message].
5109    pub fn set_finish_message<T>(mut self, v: T) -> Self
5110    where
5111        T: std::convert::Into<std::string::String>,
5112    {
5113        self.finish_message = std::option::Option::Some(v.into());
5114        self
5115    }
5116
5117    /// Sets or clears the value of [finish_message][crate::model::Candidate::finish_message].
5118    pub fn set_or_clear_finish_message<T>(mut self, v: std::option::Option<T>) -> Self
5119    where
5120        T: std::convert::Into<std::string::String>,
5121    {
5122        self.finish_message = v.map(|x| x.into());
5123        self
5124    }
5125
5126    /// Sets the value of [citation_metadata][crate::model::Candidate::citation_metadata].
5127    pub fn set_citation_metadata<T>(mut self, v: T) -> Self
5128    where
5129        T: std::convert::Into<crate::model::CitationMetadata>,
5130    {
5131        self.citation_metadata = std::option::Option::Some(v.into());
5132        self
5133    }
5134
5135    /// Sets or clears the value of [citation_metadata][crate::model::Candidate::citation_metadata].
5136    pub fn set_or_clear_citation_metadata<T>(mut self, v: std::option::Option<T>) -> Self
5137    where
5138        T: std::convert::Into<crate::model::CitationMetadata>,
5139    {
5140        self.citation_metadata = v.map(|x| x.into());
5141        self
5142    }
5143
5144    /// Sets the value of [grounding_metadata][crate::model::Candidate::grounding_metadata].
5145    pub fn set_grounding_metadata<T>(mut self, v: T) -> Self
5146    where
5147        T: std::convert::Into<crate::model::GroundingMetadata>,
5148    {
5149        self.grounding_metadata = std::option::Option::Some(v.into());
5150        self
5151    }
5152
5153    /// Sets or clears the value of [grounding_metadata][crate::model::Candidate::grounding_metadata].
5154    pub fn set_or_clear_grounding_metadata<T>(mut self, v: std::option::Option<T>) -> Self
5155    where
5156        T: std::convert::Into<crate::model::GroundingMetadata>,
5157    {
5158        self.grounding_metadata = v.map(|x| x.into());
5159        self
5160    }
5161
5162    /// Sets the value of [url_context_metadata][crate::model::Candidate::url_context_metadata].
5163    pub fn set_url_context_metadata<T>(mut self, v: T) -> Self
5164    where
5165        T: std::convert::Into<crate::model::UrlContextMetadata>,
5166    {
5167        self.url_context_metadata = std::option::Option::Some(v.into());
5168        self
5169    }
5170
5171    /// Sets or clears the value of [url_context_metadata][crate::model::Candidate::url_context_metadata].
5172    pub fn set_or_clear_url_context_metadata<T>(mut self, v: std::option::Option<T>) -> Self
5173    where
5174        T: std::convert::Into<crate::model::UrlContextMetadata>,
5175    {
5176        self.url_context_metadata = v.map(|x| x.into());
5177        self
5178    }
5179}
5180
5181#[cfg(feature = "prediction-service")]
5182impl wkt::message::Message for Candidate {
5183    fn typename() -> &'static str {
5184        "type.googleapis.com/google.cloud.aiplatform.v1.Candidate"
5185    }
5186}
5187
5188/// Defines additional types related to [Candidate].
5189#[cfg(feature = "prediction-service")]
5190pub mod candidate {
5191    #[allow(unused_imports)]
5192    use super::*;
5193
5194    /// The reason why the model stopped generating tokens.
5195    /// If empty, the model has not stopped generating the tokens.
5196    ///
5197    /// # Working with unknown values
5198    ///
5199    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5200    /// additional enum variants at any time. Adding new variants is not considered
5201    /// a breaking change. Applications should write their code in anticipation of:
5202    ///
5203    /// - New values appearing in future releases of the client library, **and**
5204    /// - New values received dynamically, without application changes.
5205    ///
5206    /// Please consult the [Working with enums] section in the user guide for some
5207    /// guidelines.
5208    ///
5209    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
5210    #[cfg(feature = "prediction-service")]
5211    #[derive(Clone, Debug, PartialEq)]
5212    #[non_exhaustive]
5213    pub enum FinishReason {
5214        /// The finish reason is unspecified.
5215        Unspecified,
5216        /// Token generation reached a natural stopping point or a configured stop
5217        /// sequence.
5218        Stop,
5219        /// Token generation reached the configured maximum output tokens.
5220        MaxTokens,
5221        /// Token generation stopped because the content potentially contains safety
5222        /// violations. NOTE: When streaming,
5223        /// [content][google.cloud.aiplatform.v1.Candidate.content] is empty if
5224        /// content filters blocks the output.
5225        ///
5226        /// [google.cloud.aiplatform.v1.Candidate.content]: crate::model::Candidate::content
5227        Safety,
5228        /// Token generation stopped because the content potentially contains
5229        /// copyright violations.
5230        Recitation,
5231        /// All other reasons that stopped the token generation.
5232        Other,
5233        /// Token generation stopped because the content contains forbidden terms.
5234        Blocklist,
5235        /// Token generation stopped for potentially containing prohibited content.
5236        ProhibitedContent,
5237        /// Token generation stopped because the content potentially contains
5238        /// Sensitive Personally Identifiable Information (SPII).
5239        Spii,
5240        /// The function call generated by the model is invalid.
5241        MalformedFunctionCall,
5242        /// The model response was blocked by Model Armor.
5243        ModelArmor,
5244        /// If set, the enum was initialized with an unknown value.
5245        ///
5246        /// Applications can examine the value using [FinishReason::value] or
5247        /// [FinishReason::name].
5248        UnknownValue(finish_reason::UnknownValue),
5249    }
5250
5251    #[doc(hidden)]
5252    #[cfg(feature = "prediction-service")]
5253    pub mod finish_reason {
5254        #[allow(unused_imports)]
5255        use super::*;
5256        #[derive(Clone, Debug, PartialEq)]
5257        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5258    }
5259
5260    #[cfg(feature = "prediction-service")]
5261    impl FinishReason {
5262        /// Gets the enum value.
5263        ///
5264        /// Returns `None` if the enum contains an unknown value deserialized from
5265        /// the string representation of enums.
5266        pub fn value(&self) -> std::option::Option<i32> {
5267            match self {
5268                Self::Unspecified => std::option::Option::Some(0),
5269                Self::Stop => std::option::Option::Some(1),
5270                Self::MaxTokens => std::option::Option::Some(2),
5271                Self::Safety => std::option::Option::Some(3),
5272                Self::Recitation => std::option::Option::Some(4),
5273                Self::Other => std::option::Option::Some(5),
5274                Self::Blocklist => std::option::Option::Some(6),
5275                Self::ProhibitedContent => std::option::Option::Some(7),
5276                Self::Spii => std::option::Option::Some(8),
5277                Self::MalformedFunctionCall => std::option::Option::Some(9),
5278                Self::ModelArmor => std::option::Option::Some(10),
5279                Self::UnknownValue(u) => u.0.value(),
5280            }
5281        }
5282
5283        /// Gets the enum value as a string.
5284        ///
5285        /// Returns `None` if the enum contains an unknown value deserialized from
5286        /// the integer representation of enums.
5287        pub fn name(&self) -> std::option::Option<&str> {
5288            match self {
5289                Self::Unspecified => std::option::Option::Some("FINISH_REASON_UNSPECIFIED"),
5290                Self::Stop => std::option::Option::Some("STOP"),
5291                Self::MaxTokens => std::option::Option::Some("MAX_TOKENS"),
5292                Self::Safety => std::option::Option::Some("SAFETY"),
5293                Self::Recitation => std::option::Option::Some("RECITATION"),
5294                Self::Other => std::option::Option::Some("OTHER"),
5295                Self::Blocklist => std::option::Option::Some("BLOCKLIST"),
5296                Self::ProhibitedContent => std::option::Option::Some("PROHIBITED_CONTENT"),
5297                Self::Spii => std::option::Option::Some("SPII"),
5298                Self::MalformedFunctionCall => std::option::Option::Some("MALFORMED_FUNCTION_CALL"),
5299                Self::ModelArmor => std::option::Option::Some("MODEL_ARMOR"),
5300                Self::UnknownValue(u) => u.0.name(),
5301            }
5302        }
5303    }
5304
5305    #[cfg(feature = "prediction-service")]
5306    impl std::default::Default for FinishReason {
5307        fn default() -> Self {
5308            use std::convert::From;
5309            Self::from(0)
5310        }
5311    }
5312
5313    #[cfg(feature = "prediction-service")]
5314    impl std::fmt::Display for FinishReason {
5315        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5316            wkt::internal::display_enum(f, self.name(), self.value())
5317        }
5318    }
5319
5320    #[cfg(feature = "prediction-service")]
5321    impl std::convert::From<i32> for FinishReason {
5322        fn from(value: i32) -> Self {
5323            match value {
5324                0 => Self::Unspecified,
5325                1 => Self::Stop,
5326                2 => Self::MaxTokens,
5327                3 => Self::Safety,
5328                4 => Self::Recitation,
5329                5 => Self::Other,
5330                6 => Self::Blocklist,
5331                7 => Self::ProhibitedContent,
5332                8 => Self::Spii,
5333                9 => Self::MalformedFunctionCall,
5334                10 => Self::ModelArmor,
5335                _ => Self::UnknownValue(finish_reason::UnknownValue(
5336                    wkt::internal::UnknownEnumValue::Integer(value),
5337                )),
5338            }
5339        }
5340    }
5341
5342    #[cfg(feature = "prediction-service")]
5343    impl std::convert::From<&str> for FinishReason {
5344        fn from(value: &str) -> Self {
5345            use std::string::ToString;
5346            match value {
5347                "FINISH_REASON_UNSPECIFIED" => Self::Unspecified,
5348                "STOP" => Self::Stop,
5349                "MAX_TOKENS" => Self::MaxTokens,
5350                "SAFETY" => Self::Safety,
5351                "RECITATION" => Self::Recitation,
5352                "OTHER" => Self::Other,
5353                "BLOCKLIST" => Self::Blocklist,
5354                "PROHIBITED_CONTENT" => Self::ProhibitedContent,
5355                "SPII" => Self::Spii,
5356                "MALFORMED_FUNCTION_CALL" => Self::MalformedFunctionCall,
5357                "MODEL_ARMOR" => Self::ModelArmor,
5358                _ => Self::UnknownValue(finish_reason::UnknownValue(
5359                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5360                )),
5361            }
5362        }
5363    }
5364
5365    #[cfg(feature = "prediction-service")]
5366    impl serde::ser::Serialize for FinishReason {
5367        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5368        where
5369            S: serde::Serializer,
5370        {
5371            match self {
5372                Self::Unspecified => serializer.serialize_i32(0),
5373                Self::Stop => serializer.serialize_i32(1),
5374                Self::MaxTokens => serializer.serialize_i32(2),
5375                Self::Safety => serializer.serialize_i32(3),
5376                Self::Recitation => serializer.serialize_i32(4),
5377                Self::Other => serializer.serialize_i32(5),
5378                Self::Blocklist => serializer.serialize_i32(6),
5379                Self::ProhibitedContent => serializer.serialize_i32(7),
5380                Self::Spii => serializer.serialize_i32(8),
5381                Self::MalformedFunctionCall => serializer.serialize_i32(9),
5382                Self::ModelArmor => serializer.serialize_i32(10),
5383                Self::UnknownValue(u) => u.0.serialize(serializer),
5384            }
5385        }
5386    }
5387
5388    #[cfg(feature = "prediction-service")]
5389    impl<'de> serde::de::Deserialize<'de> for FinishReason {
5390        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5391        where
5392            D: serde::Deserializer<'de>,
5393        {
5394            deserializer.deserialize_any(wkt::internal::EnumVisitor::<FinishReason>::new(
5395                ".google.cloud.aiplatform.v1.Candidate.FinishReason",
5396            ))
5397        }
5398    }
5399}
5400
5401/// Metadata related to url context retrieval tool.
5402#[cfg(feature = "prediction-service")]
5403#[derive(Clone, Default, PartialEq)]
5404#[non_exhaustive]
5405pub struct UrlContextMetadata {
5406    /// Output only. List of url context.
5407    pub url_metadata: std::vec::Vec<crate::model::UrlMetadata>,
5408
5409    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5410}
5411
5412#[cfg(feature = "prediction-service")]
5413impl UrlContextMetadata {
5414    pub fn new() -> Self {
5415        std::default::Default::default()
5416    }
5417
5418    /// Sets the value of [url_metadata][crate::model::UrlContextMetadata::url_metadata].
5419    pub fn set_url_metadata<T, V>(mut self, v: T) -> Self
5420    where
5421        T: std::iter::IntoIterator<Item = V>,
5422        V: std::convert::Into<crate::model::UrlMetadata>,
5423    {
5424        use std::iter::Iterator;
5425        self.url_metadata = v.into_iter().map(|i| i.into()).collect();
5426        self
5427    }
5428}
5429
5430#[cfg(feature = "prediction-service")]
5431impl wkt::message::Message for UrlContextMetadata {
5432    fn typename() -> &'static str {
5433        "type.googleapis.com/google.cloud.aiplatform.v1.UrlContextMetadata"
5434    }
5435}
5436
5437/// Context of the a single url retrieval.
5438#[cfg(feature = "prediction-service")]
5439#[derive(Clone, Default, PartialEq)]
5440#[non_exhaustive]
5441pub struct UrlMetadata {
5442    /// Retrieved url by the tool.
5443    pub retrieved_url: std::string::String,
5444
5445    /// Status of the url retrieval.
5446    pub url_retrieval_status: crate::model::url_metadata::UrlRetrievalStatus,
5447
5448    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5449}
5450
5451#[cfg(feature = "prediction-service")]
5452impl UrlMetadata {
5453    pub fn new() -> Self {
5454        std::default::Default::default()
5455    }
5456
5457    /// Sets the value of [retrieved_url][crate::model::UrlMetadata::retrieved_url].
5458    pub fn set_retrieved_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5459        self.retrieved_url = v.into();
5460        self
5461    }
5462
5463    /// Sets the value of [url_retrieval_status][crate::model::UrlMetadata::url_retrieval_status].
5464    pub fn set_url_retrieval_status<
5465        T: std::convert::Into<crate::model::url_metadata::UrlRetrievalStatus>,
5466    >(
5467        mut self,
5468        v: T,
5469    ) -> Self {
5470        self.url_retrieval_status = v.into();
5471        self
5472    }
5473}
5474
5475#[cfg(feature = "prediction-service")]
5476impl wkt::message::Message for UrlMetadata {
5477    fn typename() -> &'static str {
5478        "type.googleapis.com/google.cloud.aiplatform.v1.UrlMetadata"
5479    }
5480}
5481
5482/// Defines additional types related to [UrlMetadata].
5483#[cfg(feature = "prediction-service")]
5484pub mod url_metadata {
5485    #[allow(unused_imports)]
5486    use super::*;
5487
5488    /// Status of the url retrieval.
5489    ///
5490    /// # Working with unknown values
5491    ///
5492    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5493    /// additional enum variants at any time. Adding new variants is not considered
5494    /// a breaking change. Applications should write their code in anticipation of:
5495    ///
5496    /// - New values appearing in future releases of the client library, **and**
5497    /// - New values received dynamically, without application changes.
5498    ///
5499    /// Please consult the [Working with enums] section in the user guide for some
5500    /// guidelines.
5501    ///
5502    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
5503    #[cfg(feature = "prediction-service")]
5504    #[derive(Clone, Debug, PartialEq)]
5505    #[non_exhaustive]
5506    pub enum UrlRetrievalStatus {
5507        /// Default value. This value is unused.
5508        Unspecified,
5509        /// Url retrieval is successful.
5510        Success,
5511        /// Url retrieval is failed due to error.
5512        Error,
5513        /// If set, the enum was initialized with an unknown value.
5514        ///
5515        /// Applications can examine the value using [UrlRetrievalStatus::value] or
5516        /// [UrlRetrievalStatus::name].
5517        UnknownValue(url_retrieval_status::UnknownValue),
5518    }
5519
5520    #[doc(hidden)]
5521    #[cfg(feature = "prediction-service")]
5522    pub mod url_retrieval_status {
5523        #[allow(unused_imports)]
5524        use super::*;
5525        #[derive(Clone, Debug, PartialEq)]
5526        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5527    }
5528
5529    #[cfg(feature = "prediction-service")]
5530    impl UrlRetrievalStatus {
5531        /// Gets the enum value.
5532        ///
5533        /// Returns `None` if the enum contains an unknown value deserialized from
5534        /// the string representation of enums.
5535        pub fn value(&self) -> std::option::Option<i32> {
5536            match self {
5537                Self::Unspecified => std::option::Option::Some(0),
5538                Self::Success => std::option::Option::Some(1),
5539                Self::Error => std::option::Option::Some(2),
5540                Self::UnknownValue(u) => u.0.value(),
5541            }
5542        }
5543
5544        /// Gets the enum value as a string.
5545        ///
5546        /// Returns `None` if the enum contains an unknown value deserialized from
5547        /// the integer representation of enums.
5548        pub fn name(&self) -> std::option::Option<&str> {
5549            match self {
5550                Self::Unspecified => std::option::Option::Some("URL_RETRIEVAL_STATUS_UNSPECIFIED"),
5551                Self::Success => std::option::Option::Some("URL_RETRIEVAL_STATUS_SUCCESS"),
5552                Self::Error => std::option::Option::Some("URL_RETRIEVAL_STATUS_ERROR"),
5553                Self::UnknownValue(u) => u.0.name(),
5554            }
5555        }
5556    }
5557
5558    #[cfg(feature = "prediction-service")]
5559    impl std::default::Default for UrlRetrievalStatus {
5560        fn default() -> Self {
5561            use std::convert::From;
5562            Self::from(0)
5563        }
5564    }
5565
5566    #[cfg(feature = "prediction-service")]
5567    impl std::fmt::Display for UrlRetrievalStatus {
5568        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5569            wkt::internal::display_enum(f, self.name(), self.value())
5570        }
5571    }
5572
5573    #[cfg(feature = "prediction-service")]
5574    impl std::convert::From<i32> for UrlRetrievalStatus {
5575        fn from(value: i32) -> Self {
5576            match value {
5577                0 => Self::Unspecified,
5578                1 => Self::Success,
5579                2 => Self::Error,
5580                _ => Self::UnknownValue(url_retrieval_status::UnknownValue(
5581                    wkt::internal::UnknownEnumValue::Integer(value),
5582                )),
5583            }
5584        }
5585    }
5586
5587    #[cfg(feature = "prediction-service")]
5588    impl std::convert::From<&str> for UrlRetrievalStatus {
5589        fn from(value: &str) -> Self {
5590            use std::string::ToString;
5591            match value {
5592                "URL_RETRIEVAL_STATUS_UNSPECIFIED" => Self::Unspecified,
5593                "URL_RETRIEVAL_STATUS_SUCCESS" => Self::Success,
5594                "URL_RETRIEVAL_STATUS_ERROR" => Self::Error,
5595                _ => Self::UnknownValue(url_retrieval_status::UnknownValue(
5596                    wkt::internal::UnknownEnumValue::String(value.to_string()),
5597                )),
5598            }
5599        }
5600    }
5601
5602    #[cfg(feature = "prediction-service")]
5603    impl serde::ser::Serialize for UrlRetrievalStatus {
5604        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5605        where
5606            S: serde::Serializer,
5607        {
5608            match self {
5609                Self::Unspecified => serializer.serialize_i32(0),
5610                Self::Success => serializer.serialize_i32(1),
5611                Self::Error => serializer.serialize_i32(2),
5612                Self::UnknownValue(u) => u.0.serialize(serializer),
5613            }
5614        }
5615    }
5616
5617    #[cfg(feature = "prediction-service")]
5618    impl<'de> serde::de::Deserialize<'de> for UrlRetrievalStatus {
5619        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5620        where
5621            D: serde::Deserializer<'de>,
5622        {
5623            deserializer.deserialize_any(wkt::internal::EnumVisitor::<UrlRetrievalStatus>::new(
5624                ".google.cloud.aiplatform.v1.UrlMetadata.UrlRetrievalStatus",
5625            ))
5626        }
5627    }
5628}
5629
5630/// Logprobs Result
5631#[cfg(feature = "prediction-service")]
5632#[derive(Clone, Default, PartialEq)]
5633#[non_exhaustive]
5634pub struct LogprobsResult {
5635    /// Length = total number of decoding steps.
5636    pub top_candidates: std::vec::Vec<crate::model::logprobs_result::TopCandidates>,
5637
5638    /// Length = total number of decoding steps.
5639    /// The chosen candidates may or may not be in top_candidates.
5640    pub chosen_candidates: std::vec::Vec<crate::model::logprobs_result::Candidate>,
5641
5642    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5643}
5644
5645#[cfg(feature = "prediction-service")]
5646impl LogprobsResult {
5647    pub fn new() -> Self {
5648        std::default::Default::default()
5649    }
5650
5651    /// Sets the value of [top_candidates][crate::model::LogprobsResult::top_candidates].
5652    pub fn set_top_candidates<T, V>(mut self, v: T) -> Self
5653    where
5654        T: std::iter::IntoIterator<Item = V>,
5655        V: std::convert::Into<crate::model::logprobs_result::TopCandidates>,
5656    {
5657        use std::iter::Iterator;
5658        self.top_candidates = v.into_iter().map(|i| i.into()).collect();
5659        self
5660    }
5661
5662    /// Sets the value of [chosen_candidates][crate::model::LogprobsResult::chosen_candidates].
5663    pub fn set_chosen_candidates<T, V>(mut self, v: T) -> Self
5664    where
5665        T: std::iter::IntoIterator<Item = V>,
5666        V: std::convert::Into<crate::model::logprobs_result::Candidate>,
5667    {
5668        use std::iter::Iterator;
5669        self.chosen_candidates = v.into_iter().map(|i| i.into()).collect();
5670        self
5671    }
5672}
5673
5674#[cfg(feature = "prediction-service")]
5675impl wkt::message::Message for LogprobsResult {
5676    fn typename() -> &'static str {
5677        "type.googleapis.com/google.cloud.aiplatform.v1.LogprobsResult"
5678    }
5679}
5680
5681/// Defines additional types related to [LogprobsResult].
5682#[cfg(feature = "prediction-service")]
5683pub mod logprobs_result {
5684    #[allow(unused_imports)]
5685    use super::*;
5686
5687    /// Candidate for the logprobs token and score.
5688    #[cfg(feature = "prediction-service")]
5689    #[derive(Clone, Default, PartialEq)]
5690    #[non_exhaustive]
5691    pub struct Candidate {
5692        /// The candidate’s token string value.
5693        pub token: std::option::Option<std::string::String>,
5694
5695        /// The candidate’s token id value.
5696        pub token_id: std::option::Option<i32>,
5697
5698        /// The candidate's log probability.
5699        pub log_probability: std::option::Option<f32>,
5700
5701        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5702    }
5703
5704    #[cfg(feature = "prediction-service")]
5705    impl Candidate {
5706        pub fn new() -> Self {
5707            std::default::Default::default()
5708        }
5709
5710        /// Sets the value of [token][crate::model::logprobs_result::Candidate::token].
5711        pub fn set_token<T>(mut self, v: T) -> Self
5712        where
5713            T: std::convert::Into<std::string::String>,
5714        {
5715            self.token = std::option::Option::Some(v.into());
5716            self
5717        }
5718
5719        /// Sets or clears the value of [token][crate::model::logprobs_result::Candidate::token].
5720        pub fn set_or_clear_token<T>(mut self, v: std::option::Option<T>) -> Self
5721        where
5722            T: std::convert::Into<std::string::String>,
5723        {
5724            self.token = v.map(|x| x.into());
5725            self
5726        }
5727
5728        /// Sets the value of [token_id][crate::model::logprobs_result::Candidate::token_id].
5729        pub fn set_token_id<T>(mut self, v: T) -> Self
5730        where
5731            T: std::convert::Into<i32>,
5732        {
5733            self.token_id = std::option::Option::Some(v.into());
5734            self
5735        }
5736
5737        /// Sets or clears the value of [token_id][crate::model::logprobs_result::Candidate::token_id].
5738        pub fn set_or_clear_token_id<T>(mut self, v: std::option::Option<T>) -> Self
5739        where
5740            T: std::convert::Into<i32>,
5741        {
5742            self.token_id = v.map(|x| x.into());
5743            self
5744        }
5745
5746        /// Sets the value of [log_probability][crate::model::logprobs_result::Candidate::log_probability].
5747        pub fn set_log_probability<T>(mut self, v: T) -> Self
5748        where
5749            T: std::convert::Into<f32>,
5750        {
5751            self.log_probability = std::option::Option::Some(v.into());
5752            self
5753        }
5754
5755        /// Sets or clears the value of [log_probability][crate::model::logprobs_result::Candidate::log_probability].
5756        pub fn set_or_clear_log_probability<T>(mut self, v: std::option::Option<T>) -> Self
5757        where
5758            T: std::convert::Into<f32>,
5759        {
5760            self.log_probability = v.map(|x| x.into());
5761            self
5762        }
5763    }
5764
5765    #[cfg(feature = "prediction-service")]
5766    impl wkt::message::Message for Candidate {
5767        fn typename() -> &'static str {
5768            "type.googleapis.com/google.cloud.aiplatform.v1.LogprobsResult.Candidate"
5769        }
5770    }
5771
5772    /// Candidates with top log probabilities at each decoding step.
5773    #[cfg(feature = "prediction-service")]
5774    #[derive(Clone, Default, PartialEq)]
5775    #[non_exhaustive]
5776    pub struct TopCandidates {
5777        /// Sorted by log probability in descending order.
5778        pub candidates: std::vec::Vec<crate::model::logprobs_result::Candidate>,
5779
5780        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5781    }
5782
5783    #[cfg(feature = "prediction-service")]
5784    impl TopCandidates {
5785        pub fn new() -> Self {
5786            std::default::Default::default()
5787        }
5788
5789        /// Sets the value of [candidates][crate::model::logprobs_result::TopCandidates::candidates].
5790        pub fn set_candidates<T, V>(mut self, v: T) -> Self
5791        where
5792            T: std::iter::IntoIterator<Item = V>,
5793            V: std::convert::Into<crate::model::logprobs_result::Candidate>,
5794        {
5795            use std::iter::Iterator;
5796            self.candidates = v.into_iter().map(|i| i.into()).collect();
5797            self
5798        }
5799    }
5800
5801    #[cfg(feature = "prediction-service")]
5802    impl wkt::message::Message for TopCandidates {
5803        fn typename() -> &'static str {
5804            "type.googleapis.com/google.cloud.aiplatform.v1.LogprobsResult.TopCandidates"
5805        }
5806    }
5807}
5808
5809/// Segment of the content.
5810#[cfg(feature = "prediction-service")]
5811#[derive(Clone, Default, PartialEq)]
5812#[non_exhaustive]
5813pub struct Segment {
5814    /// Output only. The index of a Part object within its parent Content object.
5815    pub part_index: i32,
5816
5817    /// Output only. Start index in the given Part, measured in bytes. Offset from
5818    /// the start of the Part, inclusive, starting at zero.
5819    pub start_index: i32,
5820
5821    /// Output only. End index in the given Part, measured in bytes. Offset from
5822    /// the start of the Part, exclusive, starting at zero.
5823    pub end_index: i32,
5824
5825    /// Output only. The text corresponding to the segment from the response.
5826    pub text: std::string::String,
5827
5828    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5829}
5830
5831#[cfg(feature = "prediction-service")]
5832impl Segment {
5833    pub fn new() -> Self {
5834        std::default::Default::default()
5835    }
5836
5837    /// Sets the value of [part_index][crate::model::Segment::part_index].
5838    pub fn set_part_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5839        self.part_index = v.into();
5840        self
5841    }
5842
5843    /// Sets the value of [start_index][crate::model::Segment::start_index].
5844    pub fn set_start_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5845        self.start_index = v.into();
5846        self
5847    }
5848
5849    /// Sets the value of [end_index][crate::model::Segment::end_index].
5850    pub fn set_end_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5851        self.end_index = v.into();
5852        self
5853    }
5854
5855    /// Sets the value of [text][crate::model::Segment::text].
5856    pub fn set_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5857        self.text = v.into();
5858        self
5859    }
5860}
5861
5862#[cfg(feature = "prediction-service")]
5863impl wkt::message::Message for Segment {
5864    fn typename() -> &'static str {
5865        "type.googleapis.com/google.cloud.aiplatform.v1.Segment"
5866    }
5867}
5868
5869/// Grounding chunk.
5870#[cfg(feature = "prediction-service")]
5871#[derive(Clone, Default, PartialEq)]
5872#[non_exhaustive]
5873pub struct GroundingChunk {
5874    /// Chunk type.
5875    pub chunk_type: std::option::Option<crate::model::grounding_chunk::ChunkType>,
5876
5877    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5878}
5879
5880#[cfg(feature = "prediction-service")]
5881impl GroundingChunk {
5882    pub fn new() -> Self {
5883        std::default::Default::default()
5884    }
5885
5886    /// Sets the value of [chunk_type][crate::model::GroundingChunk::chunk_type].
5887    ///
5888    /// Note that all the setters affecting `chunk_type` are mutually
5889    /// exclusive.
5890    pub fn set_chunk_type<
5891        T: std::convert::Into<std::option::Option<crate::model::grounding_chunk::ChunkType>>,
5892    >(
5893        mut self,
5894        v: T,
5895    ) -> Self {
5896        self.chunk_type = v.into();
5897        self
5898    }
5899
5900    /// The value of [chunk_type][crate::model::GroundingChunk::chunk_type]
5901    /// if it holds a `Web`, `None` if the field is not set or
5902    /// holds a different branch.
5903    pub fn web(&self) -> std::option::Option<&std::boxed::Box<crate::model::grounding_chunk::Web>> {
5904        #[allow(unreachable_patterns)]
5905        self.chunk_type.as_ref().and_then(|v| match v {
5906            crate::model::grounding_chunk::ChunkType::Web(v) => std::option::Option::Some(v),
5907            _ => std::option::Option::None,
5908        })
5909    }
5910
5911    /// Sets the value of [chunk_type][crate::model::GroundingChunk::chunk_type]
5912    /// to hold a `Web`.
5913    ///
5914    /// Note that all the setters affecting `chunk_type` are
5915    /// mutually exclusive.
5916    pub fn set_web<T: std::convert::Into<std::boxed::Box<crate::model::grounding_chunk::Web>>>(
5917        mut self,
5918        v: T,
5919    ) -> Self {
5920        self.chunk_type =
5921            std::option::Option::Some(crate::model::grounding_chunk::ChunkType::Web(v.into()));
5922        self
5923    }
5924
5925    /// The value of [chunk_type][crate::model::GroundingChunk::chunk_type]
5926    /// if it holds a `RetrievedContext`, `None` if the field is not set or
5927    /// holds a different branch.
5928    pub fn retrieved_context(
5929        &self,
5930    ) -> std::option::Option<&std::boxed::Box<crate::model::grounding_chunk::RetrievedContext>>
5931    {
5932        #[allow(unreachable_patterns)]
5933        self.chunk_type.as_ref().and_then(|v| match v {
5934            crate::model::grounding_chunk::ChunkType::RetrievedContext(v) => {
5935                std::option::Option::Some(v)
5936            }
5937            _ => std::option::Option::None,
5938        })
5939    }
5940
5941    /// Sets the value of [chunk_type][crate::model::GroundingChunk::chunk_type]
5942    /// to hold a `RetrievedContext`.
5943    ///
5944    /// Note that all the setters affecting `chunk_type` are
5945    /// mutually exclusive.
5946    pub fn set_retrieved_context<
5947        T: std::convert::Into<std::boxed::Box<crate::model::grounding_chunk::RetrievedContext>>,
5948    >(
5949        mut self,
5950        v: T,
5951    ) -> Self {
5952        self.chunk_type = std::option::Option::Some(
5953            crate::model::grounding_chunk::ChunkType::RetrievedContext(v.into()),
5954        );
5955        self
5956    }
5957
5958    /// The value of [chunk_type][crate::model::GroundingChunk::chunk_type]
5959    /// if it holds a `Maps`, `None` if the field is not set or
5960    /// holds a different branch.
5961    pub fn maps(
5962        &self,
5963    ) -> std::option::Option<&std::boxed::Box<crate::model::grounding_chunk::Maps>> {
5964        #[allow(unreachable_patterns)]
5965        self.chunk_type.as_ref().and_then(|v| match v {
5966            crate::model::grounding_chunk::ChunkType::Maps(v) => std::option::Option::Some(v),
5967            _ => std::option::Option::None,
5968        })
5969    }
5970
5971    /// Sets the value of [chunk_type][crate::model::GroundingChunk::chunk_type]
5972    /// to hold a `Maps`.
5973    ///
5974    /// Note that all the setters affecting `chunk_type` are
5975    /// mutually exclusive.
5976    pub fn set_maps<T: std::convert::Into<std::boxed::Box<crate::model::grounding_chunk::Maps>>>(
5977        mut self,
5978        v: T,
5979    ) -> Self {
5980        self.chunk_type =
5981            std::option::Option::Some(crate::model::grounding_chunk::ChunkType::Maps(v.into()));
5982        self
5983    }
5984}
5985
5986#[cfg(feature = "prediction-service")]
5987impl wkt::message::Message for GroundingChunk {
5988    fn typename() -> &'static str {
5989        "type.googleapis.com/google.cloud.aiplatform.v1.GroundingChunk"
5990    }
5991}
5992
5993/// Defines additional types related to [GroundingChunk].
5994#[cfg(feature = "prediction-service")]
5995pub mod grounding_chunk {
5996    #[allow(unused_imports)]
5997    use super::*;
5998
5999    /// Chunk from the web.
6000    #[cfg(feature = "prediction-service")]
6001    #[derive(Clone, Default, PartialEq)]
6002    #[non_exhaustive]
6003    pub struct Web {
6004        /// URI reference of the chunk.
6005        pub uri: std::option::Option<std::string::String>,
6006
6007        /// Title of the chunk.
6008        pub title: std::option::Option<std::string::String>,
6009
6010        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6011    }
6012
6013    #[cfg(feature = "prediction-service")]
6014    impl Web {
6015        pub fn new() -> Self {
6016            std::default::Default::default()
6017        }
6018
6019        /// Sets the value of [uri][crate::model::grounding_chunk::Web::uri].
6020        pub fn set_uri<T>(mut self, v: T) -> Self
6021        where
6022            T: std::convert::Into<std::string::String>,
6023        {
6024            self.uri = std::option::Option::Some(v.into());
6025            self
6026        }
6027
6028        /// Sets or clears the value of [uri][crate::model::grounding_chunk::Web::uri].
6029        pub fn set_or_clear_uri<T>(mut self, v: std::option::Option<T>) -> Self
6030        where
6031            T: std::convert::Into<std::string::String>,
6032        {
6033            self.uri = v.map(|x| x.into());
6034            self
6035        }
6036
6037        /// Sets the value of [title][crate::model::grounding_chunk::Web::title].
6038        pub fn set_title<T>(mut self, v: T) -> Self
6039        where
6040            T: std::convert::Into<std::string::String>,
6041        {
6042            self.title = std::option::Option::Some(v.into());
6043            self
6044        }
6045
6046        /// Sets or clears the value of [title][crate::model::grounding_chunk::Web::title].
6047        pub fn set_or_clear_title<T>(mut self, v: std::option::Option<T>) -> Self
6048        where
6049            T: std::convert::Into<std::string::String>,
6050        {
6051            self.title = v.map(|x| x.into());
6052            self
6053        }
6054    }
6055
6056    #[cfg(feature = "prediction-service")]
6057    impl wkt::message::Message for Web {
6058        fn typename() -> &'static str {
6059            "type.googleapis.com/google.cloud.aiplatform.v1.GroundingChunk.Web"
6060        }
6061    }
6062
6063    /// Chunk from context retrieved by the retrieval tools.
6064    #[cfg(feature = "prediction-service")]
6065    #[derive(Clone, Default, PartialEq)]
6066    #[non_exhaustive]
6067    pub struct RetrievedContext {
6068        /// URI reference of the attribution.
6069        pub uri: std::option::Option<std::string::String>,
6070
6071        /// Title of the attribution.
6072        pub title: std::option::Option<std::string::String>,
6073
6074        /// Text of the attribution.
6075        pub text: std::option::Option<std::string::String>,
6076
6077        /// Output only. The full document name for the referenced Vertex AI Search
6078        /// document.
6079        pub document_name: std::option::Option<std::string::String>,
6080
6081        /// Tool-specific details about the retrieved context.
6082        pub context_details:
6083            std::option::Option<crate::model::grounding_chunk::retrieved_context::ContextDetails>,
6084
6085        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6086    }
6087
6088    #[cfg(feature = "prediction-service")]
6089    impl RetrievedContext {
6090        pub fn new() -> Self {
6091            std::default::Default::default()
6092        }
6093
6094        /// Sets the value of [uri][crate::model::grounding_chunk::RetrievedContext::uri].
6095        pub fn set_uri<T>(mut self, v: T) -> Self
6096        where
6097            T: std::convert::Into<std::string::String>,
6098        {
6099            self.uri = std::option::Option::Some(v.into());
6100            self
6101        }
6102
6103        /// Sets or clears the value of [uri][crate::model::grounding_chunk::RetrievedContext::uri].
6104        pub fn set_or_clear_uri<T>(mut self, v: std::option::Option<T>) -> Self
6105        where
6106            T: std::convert::Into<std::string::String>,
6107        {
6108            self.uri = v.map(|x| x.into());
6109            self
6110        }
6111
6112        /// Sets the value of [title][crate::model::grounding_chunk::RetrievedContext::title].
6113        pub fn set_title<T>(mut self, v: T) -> Self
6114        where
6115            T: std::convert::Into<std::string::String>,
6116        {
6117            self.title = std::option::Option::Some(v.into());
6118            self
6119        }
6120
6121        /// Sets or clears the value of [title][crate::model::grounding_chunk::RetrievedContext::title].
6122        pub fn set_or_clear_title<T>(mut self, v: std::option::Option<T>) -> Self
6123        where
6124            T: std::convert::Into<std::string::String>,
6125        {
6126            self.title = v.map(|x| x.into());
6127            self
6128        }
6129
6130        /// Sets the value of [text][crate::model::grounding_chunk::RetrievedContext::text].
6131        pub fn set_text<T>(mut self, v: T) -> Self
6132        where
6133            T: std::convert::Into<std::string::String>,
6134        {
6135            self.text = std::option::Option::Some(v.into());
6136            self
6137        }
6138
6139        /// Sets or clears the value of [text][crate::model::grounding_chunk::RetrievedContext::text].
6140        pub fn set_or_clear_text<T>(mut self, v: std::option::Option<T>) -> Self
6141        where
6142            T: std::convert::Into<std::string::String>,
6143        {
6144            self.text = v.map(|x| x.into());
6145            self
6146        }
6147
6148        /// Sets the value of [document_name][crate::model::grounding_chunk::RetrievedContext::document_name].
6149        pub fn set_document_name<T>(mut self, v: T) -> Self
6150        where
6151            T: std::convert::Into<std::string::String>,
6152        {
6153            self.document_name = std::option::Option::Some(v.into());
6154            self
6155        }
6156
6157        /// Sets or clears the value of [document_name][crate::model::grounding_chunk::RetrievedContext::document_name].
6158        pub fn set_or_clear_document_name<T>(mut self, v: std::option::Option<T>) -> Self
6159        where
6160            T: std::convert::Into<std::string::String>,
6161        {
6162            self.document_name = v.map(|x| x.into());
6163            self
6164        }
6165
6166        /// Sets the value of [context_details][crate::model::grounding_chunk::RetrievedContext::context_details].
6167        ///
6168        /// Note that all the setters affecting `context_details` are mutually
6169        /// exclusive.
6170        pub fn set_context_details<
6171            T: std::convert::Into<
6172                    std::option::Option<
6173                        crate::model::grounding_chunk::retrieved_context::ContextDetails,
6174                    >,
6175                >,
6176        >(
6177            mut self,
6178            v: T,
6179        ) -> Self {
6180            self.context_details = v.into();
6181            self
6182        }
6183
6184        /// The value of [context_details][crate::model::grounding_chunk::RetrievedContext::context_details]
6185        /// if it holds a `RagChunk`, `None` if the field is not set or
6186        /// holds a different branch.
6187        pub fn rag_chunk(&self) -> std::option::Option<&std::boxed::Box<crate::model::RagChunk>> {
6188            #[allow(unreachable_patterns)]
6189            self.context_details.as_ref().and_then(|v| match v {
6190                crate::model::grounding_chunk::retrieved_context::ContextDetails::RagChunk(v) => {
6191                    std::option::Option::Some(v)
6192                }
6193                _ => std::option::Option::None,
6194            })
6195        }
6196
6197        /// Sets the value of [context_details][crate::model::grounding_chunk::RetrievedContext::context_details]
6198        /// to hold a `RagChunk`.
6199        ///
6200        /// Note that all the setters affecting `context_details` are
6201        /// mutually exclusive.
6202        pub fn set_rag_chunk<T: std::convert::Into<std::boxed::Box<crate::model::RagChunk>>>(
6203            mut self,
6204            v: T,
6205        ) -> Self {
6206            self.context_details = std::option::Option::Some(
6207                crate::model::grounding_chunk::retrieved_context::ContextDetails::RagChunk(
6208                    v.into(),
6209                ),
6210            );
6211            self
6212        }
6213    }
6214
6215    #[cfg(feature = "prediction-service")]
6216    impl wkt::message::Message for RetrievedContext {
6217        fn typename() -> &'static str {
6218            "type.googleapis.com/google.cloud.aiplatform.v1.GroundingChunk.RetrievedContext"
6219        }
6220    }
6221
6222    /// Defines additional types related to [RetrievedContext].
6223    #[cfg(feature = "prediction-service")]
6224    pub mod retrieved_context {
6225        #[allow(unused_imports)]
6226        use super::*;
6227
6228        /// Tool-specific details about the retrieved context.
6229        #[cfg(feature = "prediction-service")]
6230        #[derive(Clone, Debug, PartialEq)]
6231        #[non_exhaustive]
6232        pub enum ContextDetails {
6233            /// Additional context for the RAG retrieval result. This is only populated
6234            /// when using the RAG retrieval tool.
6235            RagChunk(std::boxed::Box<crate::model::RagChunk>),
6236        }
6237    }
6238
6239    /// Chunk from Google Maps.
6240    #[cfg(feature = "prediction-service")]
6241    #[derive(Clone, Default, PartialEq)]
6242    #[non_exhaustive]
6243    pub struct Maps {
6244        /// URI reference of the chunk.
6245        pub uri: std::option::Option<std::string::String>,
6246
6247        /// Title of the chunk.
6248        pub title: std::option::Option<std::string::String>,
6249
6250        /// Text of the chunk.
6251        pub text: std::option::Option<std::string::String>,
6252
6253        /// This Place's resource name, in `places/{place_id}` format.  Can be used
6254        /// to look up the Place.
6255        pub place_id: std::option::Option<std::string::String>,
6256
6257        /// Sources used to generate the place answer.
6258        /// This includes review snippets and photos that were used to generate the
6259        /// answer, as well as uris to flag content.
6260        pub place_answer_sources:
6261            std::option::Option<crate::model::grounding_chunk::maps::PlaceAnswerSources>,
6262
6263        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6264    }
6265
6266    #[cfg(feature = "prediction-service")]
6267    impl Maps {
6268        pub fn new() -> Self {
6269            std::default::Default::default()
6270        }
6271
6272        /// Sets the value of [uri][crate::model::grounding_chunk::Maps::uri].
6273        pub fn set_uri<T>(mut self, v: T) -> Self
6274        where
6275            T: std::convert::Into<std::string::String>,
6276        {
6277            self.uri = std::option::Option::Some(v.into());
6278            self
6279        }
6280
6281        /// Sets or clears the value of [uri][crate::model::grounding_chunk::Maps::uri].
6282        pub fn set_or_clear_uri<T>(mut self, v: std::option::Option<T>) -> Self
6283        where
6284            T: std::convert::Into<std::string::String>,
6285        {
6286            self.uri = v.map(|x| x.into());
6287            self
6288        }
6289
6290        /// Sets the value of [title][crate::model::grounding_chunk::Maps::title].
6291        pub fn set_title<T>(mut self, v: T) -> Self
6292        where
6293            T: std::convert::Into<std::string::String>,
6294        {
6295            self.title = std::option::Option::Some(v.into());
6296            self
6297        }
6298
6299        /// Sets or clears the value of [title][crate::model::grounding_chunk::Maps::title].
6300        pub fn set_or_clear_title<T>(mut self, v: std::option::Option<T>) -> Self
6301        where
6302            T: std::convert::Into<std::string::String>,
6303        {
6304            self.title = v.map(|x| x.into());
6305            self
6306        }
6307
6308        /// Sets the value of [text][crate::model::grounding_chunk::Maps::text].
6309        pub fn set_text<T>(mut self, v: T) -> Self
6310        where
6311            T: std::convert::Into<std::string::String>,
6312        {
6313            self.text = std::option::Option::Some(v.into());
6314            self
6315        }
6316
6317        /// Sets or clears the value of [text][crate::model::grounding_chunk::Maps::text].
6318        pub fn set_or_clear_text<T>(mut self, v: std::option::Option<T>) -> Self
6319        where
6320            T: std::convert::Into<std::string::String>,
6321        {
6322            self.text = v.map(|x| x.into());
6323            self
6324        }
6325
6326        /// Sets the value of [place_id][crate::model::grounding_chunk::Maps::place_id].
6327        pub fn set_place_id<T>(mut self, v: T) -> Self
6328        where
6329            T: std::convert::Into<std::string::String>,
6330        {
6331            self.place_id = std::option::Option::Some(v.into());
6332            self
6333        }
6334
6335        /// Sets or clears the value of [place_id][crate::model::grounding_chunk::Maps::place_id].
6336        pub fn set_or_clear_place_id<T>(mut self, v: std::option::Option<T>) -> Self
6337        where
6338            T: std::convert::Into<std::string::String>,
6339        {
6340            self.place_id = v.map(|x| x.into());
6341            self
6342        }
6343
6344        /// Sets the value of [place_answer_sources][crate::model::grounding_chunk::Maps::place_answer_sources].
6345        pub fn set_place_answer_sources<T>(mut self, v: T) -> Self
6346        where
6347            T: std::convert::Into<crate::model::grounding_chunk::maps::PlaceAnswerSources>,
6348        {
6349            self.place_answer_sources = std::option::Option::Some(v.into());
6350            self
6351        }
6352
6353        /// Sets or clears the value of [place_answer_sources][crate::model::grounding_chunk::Maps::place_answer_sources].
6354        pub fn set_or_clear_place_answer_sources<T>(mut self, v: std::option::Option<T>) -> Self
6355        where
6356            T: std::convert::Into<crate::model::grounding_chunk::maps::PlaceAnswerSources>,
6357        {
6358            self.place_answer_sources = v.map(|x| x.into());
6359            self
6360        }
6361    }
6362
6363    #[cfg(feature = "prediction-service")]
6364    impl wkt::message::Message for Maps {
6365        fn typename() -> &'static str {
6366            "type.googleapis.com/google.cloud.aiplatform.v1.GroundingChunk.Maps"
6367        }
6368    }
6369
6370    /// Defines additional types related to [Maps].
6371    #[cfg(feature = "prediction-service")]
6372    pub mod maps {
6373        #[allow(unused_imports)]
6374        use super::*;
6375
6376        #[cfg(feature = "prediction-service")]
6377        #[derive(Clone, Default, PartialEq)]
6378        #[non_exhaustive]
6379        pub struct PlaceAnswerSources {
6380            /// Snippets of reviews that are used to generate the answer.
6381            pub review_snippets: std::vec::Vec<
6382                crate::model::grounding_chunk::maps::place_answer_sources::ReviewSnippet,
6383            >,
6384
6385            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6386        }
6387
6388        #[cfg(feature = "prediction-service")]
6389        impl PlaceAnswerSources {
6390            pub fn new() -> Self {
6391                std::default::Default::default()
6392            }
6393
6394            /// Sets the value of [review_snippets][crate::model::grounding_chunk::maps::PlaceAnswerSources::review_snippets].
6395            pub fn set_review_snippets<T, V>(mut self, v: T) -> Self
6396            where
6397                T: std::iter::IntoIterator<Item = V>,
6398                V: std::convert::Into<
6399                        crate::model::grounding_chunk::maps::place_answer_sources::ReviewSnippet,
6400                    >,
6401            {
6402                use std::iter::Iterator;
6403                self.review_snippets = v.into_iter().map(|i| i.into()).collect();
6404                self
6405            }
6406        }
6407
6408        #[cfg(feature = "prediction-service")]
6409        impl wkt::message::Message for PlaceAnswerSources {
6410            fn typename() -> &'static str {
6411                "type.googleapis.com/google.cloud.aiplatform.v1.GroundingChunk.Maps.PlaceAnswerSources"
6412            }
6413        }
6414
6415        /// Defines additional types related to [PlaceAnswerSources].
6416        #[cfg(feature = "prediction-service")]
6417        pub mod place_answer_sources {
6418            #[allow(unused_imports)]
6419            use super::*;
6420
6421            /// Encapsulates a review snippet.
6422            #[cfg(feature = "prediction-service")]
6423            #[derive(Clone, Default, PartialEq)]
6424            #[non_exhaustive]
6425            pub struct ReviewSnippet {
6426                /// Id of the review referencing the place.
6427                pub review_id: std::string::String,
6428
6429                /// A link to show the review on Google Maps.
6430                pub google_maps_uri: std::string::String,
6431
6432                /// Title of the review.
6433                pub title: std::string::String,
6434
6435                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6436            }
6437
6438            #[cfg(feature = "prediction-service")]
6439            impl ReviewSnippet {
6440                pub fn new() -> Self {
6441                    std::default::Default::default()
6442                }
6443
6444                /// Sets the value of [review_id][crate::model::grounding_chunk::maps::place_answer_sources::ReviewSnippet::review_id].
6445                pub fn set_review_id<T: std::convert::Into<std::string::String>>(
6446                    mut self,
6447                    v: T,
6448                ) -> Self {
6449                    self.review_id = v.into();
6450                    self
6451                }
6452
6453                /// Sets the value of [google_maps_uri][crate::model::grounding_chunk::maps::place_answer_sources::ReviewSnippet::google_maps_uri].
6454                pub fn set_google_maps_uri<T: std::convert::Into<std::string::String>>(
6455                    mut self,
6456                    v: T,
6457                ) -> Self {
6458                    self.google_maps_uri = v.into();
6459                    self
6460                }
6461
6462                /// Sets the value of [title][crate::model::grounding_chunk::maps::place_answer_sources::ReviewSnippet::title].
6463                pub fn set_title<T: std::convert::Into<std::string::String>>(
6464                    mut self,
6465                    v: T,
6466                ) -> Self {
6467                    self.title = v.into();
6468                    self
6469                }
6470            }
6471
6472            #[cfg(feature = "prediction-service")]
6473            impl wkt::message::Message for ReviewSnippet {
6474                fn typename() -> &'static str {
6475                    "type.googleapis.com/google.cloud.aiplatform.v1.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet"
6476                }
6477            }
6478        }
6479    }
6480
6481    /// Chunk type.
6482    #[cfg(feature = "prediction-service")]
6483    #[derive(Clone, Debug, PartialEq)]
6484    #[non_exhaustive]
6485    pub enum ChunkType {
6486        /// Grounding chunk from the web.
6487        Web(std::boxed::Box<crate::model::grounding_chunk::Web>),
6488        /// Grounding chunk from context retrieved by the retrieval tools.
6489        RetrievedContext(std::boxed::Box<crate::model::grounding_chunk::RetrievedContext>),
6490        /// Grounding chunk from Google Maps.
6491        Maps(std::boxed::Box<crate::model::grounding_chunk::Maps>),
6492    }
6493}
6494
6495/// Grounding support.
6496#[cfg(feature = "prediction-service")]
6497#[derive(Clone, Default, PartialEq)]
6498#[non_exhaustive]
6499pub struct GroundingSupport {
6500    /// Segment of the content this support belongs to.
6501    pub segment: std::option::Option<crate::model::Segment>,
6502
6503    /// A list of indices (into 'grounding_chunk') specifying the
6504    /// citations associated with the claim. For instance [1,3,4] means
6505    /// that grounding_chunk[1], grounding_chunk[3],
6506    /// grounding_chunk[4] are the retrieved content attributed to the claim.
6507    pub grounding_chunk_indices: std::vec::Vec<i32>,
6508
6509    /// Confidence score of the support references. Ranges from 0 to 1. 1 is the
6510    /// most confident. This list must have the same size as the
6511    /// grounding_chunk_indices.
6512    pub confidence_scores: std::vec::Vec<f32>,
6513
6514    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6515}
6516
6517#[cfg(feature = "prediction-service")]
6518impl GroundingSupport {
6519    pub fn new() -> Self {
6520        std::default::Default::default()
6521    }
6522
6523    /// Sets the value of [segment][crate::model::GroundingSupport::segment].
6524    pub fn set_segment<T>(mut self, v: T) -> Self
6525    where
6526        T: std::convert::Into<crate::model::Segment>,
6527    {
6528        self.segment = std::option::Option::Some(v.into());
6529        self
6530    }
6531
6532    /// Sets or clears the value of [segment][crate::model::GroundingSupport::segment].
6533    pub fn set_or_clear_segment<T>(mut self, v: std::option::Option<T>) -> Self
6534    where
6535        T: std::convert::Into<crate::model::Segment>,
6536    {
6537        self.segment = v.map(|x| x.into());
6538        self
6539    }
6540
6541    /// Sets the value of [grounding_chunk_indices][crate::model::GroundingSupport::grounding_chunk_indices].
6542    pub fn set_grounding_chunk_indices<T, V>(mut self, v: T) -> Self
6543    where
6544        T: std::iter::IntoIterator<Item = V>,
6545        V: std::convert::Into<i32>,
6546    {
6547        use std::iter::Iterator;
6548        self.grounding_chunk_indices = v.into_iter().map(|i| i.into()).collect();
6549        self
6550    }
6551
6552    /// Sets the value of [confidence_scores][crate::model::GroundingSupport::confidence_scores].
6553    pub fn set_confidence_scores<T, V>(mut self, v: T) -> Self
6554    where
6555        T: std::iter::IntoIterator<Item = V>,
6556        V: std::convert::Into<f32>,
6557    {
6558        use std::iter::Iterator;
6559        self.confidence_scores = v.into_iter().map(|i| i.into()).collect();
6560        self
6561    }
6562}
6563
6564#[cfg(feature = "prediction-service")]
6565impl wkt::message::Message for GroundingSupport {
6566    fn typename() -> &'static str {
6567        "type.googleapis.com/google.cloud.aiplatform.v1.GroundingSupport"
6568    }
6569}
6570
6571/// Metadata returned to client when grounding is enabled.
6572#[cfg(feature = "prediction-service")]
6573#[derive(Clone, Default, PartialEq)]
6574#[non_exhaustive]
6575pub struct GroundingMetadata {
6576    /// Optional. Web search queries for the following-up web search.
6577    pub web_search_queries: std::vec::Vec<std::string::String>,
6578
6579    /// Optional. Google search entry for the following-up web searches.
6580    pub search_entry_point: std::option::Option<crate::model::SearchEntryPoint>,
6581
6582    /// List of supporting references retrieved from specified grounding source.
6583    pub grounding_chunks: std::vec::Vec<crate::model::GroundingChunk>,
6584
6585    /// Optional. List of grounding support.
6586    pub grounding_supports: std::vec::Vec<crate::model::GroundingSupport>,
6587
6588    /// Optional. Output only. Retrieval metadata.
6589    pub retrieval_metadata: std::option::Option<crate::model::RetrievalMetadata>,
6590
6591    /// Optional. Output only. Resource name of the Google Maps widget context
6592    /// token to be used with the PlacesContextElement widget to render contextual
6593    /// data. This is populated only for Google Maps grounding.
6594    pub google_maps_widget_context_token: std::option::Option<std::string::String>,
6595
6596    /// List of source flagging uris. This is currently populated only for Google
6597    /// Maps grounding.
6598    pub source_flagging_uris: std::vec::Vec<crate::model::grounding_metadata::SourceFlaggingUri>,
6599
6600    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6601}
6602
6603#[cfg(feature = "prediction-service")]
6604impl GroundingMetadata {
6605    pub fn new() -> Self {
6606        std::default::Default::default()
6607    }
6608
6609    /// Sets the value of [web_search_queries][crate::model::GroundingMetadata::web_search_queries].
6610    pub fn set_web_search_queries<T, V>(mut self, v: T) -> Self
6611    where
6612        T: std::iter::IntoIterator<Item = V>,
6613        V: std::convert::Into<std::string::String>,
6614    {
6615        use std::iter::Iterator;
6616        self.web_search_queries = v.into_iter().map(|i| i.into()).collect();
6617        self
6618    }
6619
6620    /// Sets the value of [search_entry_point][crate::model::GroundingMetadata::search_entry_point].
6621    pub fn set_search_entry_point<T>(mut self, v: T) -> Self
6622    where
6623        T: std::convert::Into<crate::model::SearchEntryPoint>,
6624    {
6625        self.search_entry_point = std::option::Option::Some(v.into());
6626        self
6627    }
6628
6629    /// Sets or clears the value of [search_entry_point][crate::model::GroundingMetadata::search_entry_point].
6630    pub fn set_or_clear_search_entry_point<T>(mut self, v: std::option::Option<T>) -> Self
6631    where
6632        T: std::convert::Into<crate::model::SearchEntryPoint>,
6633    {
6634        self.search_entry_point = v.map(|x| x.into());
6635        self
6636    }
6637
6638    /// Sets the value of [grounding_chunks][crate::model::GroundingMetadata::grounding_chunks].
6639    pub fn set_grounding_chunks<T, V>(mut self, v: T) -> Self
6640    where
6641        T: std::iter::IntoIterator<Item = V>,
6642        V: std::convert::Into<crate::model::GroundingChunk>,
6643    {
6644        use std::iter::Iterator;
6645        self.grounding_chunks = v.into_iter().map(|i| i.into()).collect();
6646        self
6647    }
6648
6649    /// Sets the value of [grounding_supports][crate::model::GroundingMetadata::grounding_supports].
6650    pub fn set_grounding_supports<T, V>(mut self, v: T) -> Self
6651    where
6652        T: std::iter::IntoIterator<Item = V>,
6653        V: std::convert::Into<crate::model::GroundingSupport>,
6654    {
6655        use std::iter::Iterator;
6656        self.grounding_supports = v.into_iter().map(|i| i.into()).collect();
6657        self
6658    }
6659
6660    /// Sets the value of [retrieval_metadata][crate::model::GroundingMetadata::retrieval_metadata].
6661    pub fn set_retrieval_metadata<T>(mut self, v: T) -> Self
6662    where
6663        T: std::convert::Into<crate::model::RetrievalMetadata>,
6664    {
6665        self.retrieval_metadata = std::option::Option::Some(v.into());
6666        self
6667    }
6668
6669    /// Sets or clears the value of [retrieval_metadata][crate::model::GroundingMetadata::retrieval_metadata].
6670    pub fn set_or_clear_retrieval_metadata<T>(mut self, v: std::option::Option<T>) -> Self
6671    where
6672        T: std::convert::Into<crate::model::RetrievalMetadata>,
6673    {
6674        self.retrieval_metadata = v.map(|x| x.into());
6675        self
6676    }
6677
6678    /// Sets the value of [google_maps_widget_context_token][crate::model::GroundingMetadata::google_maps_widget_context_token].
6679    pub fn set_google_maps_widget_context_token<T>(mut self, v: T) -> Self
6680    where
6681        T: std::convert::Into<std::string::String>,
6682    {
6683        self.google_maps_widget_context_token = std::option::Option::Some(v.into());
6684        self
6685    }
6686
6687    /// Sets or clears the value of [google_maps_widget_context_token][crate::model::GroundingMetadata::google_maps_widget_context_token].
6688    pub fn set_or_clear_google_maps_widget_context_token<T>(
6689        mut self,
6690        v: std::option::Option<T>,
6691    ) -> Self
6692    where
6693        T: std::convert::Into<std::string::String>,
6694    {
6695        self.google_maps_widget_context_token = v.map(|x| x.into());
6696        self
6697    }
6698
6699    /// Sets the value of [source_flagging_uris][crate::model::GroundingMetadata::source_flagging_uris].
6700    pub fn set_source_flagging_uris<T, V>(mut self, v: T) -> Self
6701    where
6702        T: std::iter::IntoIterator<Item = V>,
6703        V: std::convert::Into<crate::model::grounding_metadata::SourceFlaggingUri>,
6704    {
6705        use std::iter::Iterator;
6706        self.source_flagging_uris = v.into_iter().map(|i| i.into()).collect();
6707        self
6708    }
6709}
6710
6711#[cfg(feature = "prediction-service")]
6712impl wkt::message::Message for GroundingMetadata {
6713    fn typename() -> &'static str {
6714        "type.googleapis.com/google.cloud.aiplatform.v1.GroundingMetadata"
6715    }
6716}
6717
6718/// Defines additional types related to [GroundingMetadata].
6719#[cfg(feature = "prediction-service")]
6720pub mod grounding_metadata {
6721    #[allow(unused_imports)]
6722    use super::*;
6723
6724    /// Source content flagging uri for a place or review. This is currently
6725    /// populated only for Google Maps grounding.
6726    #[cfg(feature = "prediction-service")]
6727    #[derive(Clone, Default, PartialEq)]
6728    #[non_exhaustive]
6729    pub struct SourceFlaggingUri {
6730        /// Id of the place or review.
6731        pub source_id: std::string::String,
6732
6733        /// A link where users can flag a problem with the source (place or review).
6734        /// (-- The link is generated by Google and it does not contain
6735        /// information from the user query. It may contain information of the
6736        /// content it is flagging, which can be used to identify places. --)
6737        pub flag_content_uri: std::string::String,
6738
6739        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6740    }
6741
6742    #[cfg(feature = "prediction-service")]
6743    impl SourceFlaggingUri {
6744        pub fn new() -> Self {
6745            std::default::Default::default()
6746        }
6747
6748        /// Sets the value of [source_id][crate::model::grounding_metadata::SourceFlaggingUri::source_id].
6749        pub fn set_source_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6750            self.source_id = v.into();
6751            self
6752        }
6753
6754        /// Sets the value of [flag_content_uri][crate::model::grounding_metadata::SourceFlaggingUri::flag_content_uri].
6755        pub fn set_flag_content_uri<T: std::convert::Into<std::string::String>>(
6756            mut self,
6757            v: T,
6758        ) -> Self {
6759            self.flag_content_uri = v.into();
6760            self
6761        }
6762    }
6763
6764    #[cfg(feature = "prediction-service")]
6765    impl wkt::message::Message for SourceFlaggingUri {
6766        fn typename() -> &'static str {
6767            "type.googleapis.com/google.cloud.aiplatform.v1.GroundingMetadata.SourceFlaggingUri"
6768        }
6769    }
6770}
6771
6772/// Google search entry point.
6773#[cfg(feature = "prediction-service")]
6774#[derive(Clone, Default, PartialEq)]
6775#[non_exhaustive]
6776pub struct SearchEntryPoint {
6777    /// Optional. Web content snippet that can be embedded in a web page or an app
6778    /// webview.
6779    pub rendered_content: std::string::String,
6780
6781    /// Optional. Base64 encoded JSON representing array of <search term, search
6782    /// url> tuple.
6783    pub sdk_blob: ::bytes::Bytes,
6784
6785    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6786}
6787
6788#[cfg(feature = "prediction-service")]
6789impl SearchEntryPoint {
6790    pub fn new() -> Self {
6791        std::default::Default::default()
6792    }
6793
6794    /// Sets the value of [rendered_content][crate::model::SearchEntryPoint::rendered_content].
6795    pub fn set_rendered_content<T: std::convert::Into<std::string::String>>(
6796        mut self,
6797        v: T,
6798    ) -> Self {
6799        self.rendered_content = v.into();
6800        self
6801    }
6802
6803    /// Sets the value of [sdk_blob][crate::model::SearchEntryPoint::sdk_blob].
6804    pub fn set_sdk_blob<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
6805        self.sdk_blob = v.into();
6806        self
6807    }
6808}
6809
6810#[cfg(feature = "prediction-service")]
6811impl wkt::message::Message for SearchEntryPoint {
6812    fn typename() -> &'static str {
6813        "type.googleapis.com/google.cloud.aiplatform.v1.SearchEntryPoint"
6814    }
6815}
6816
6817/// Metadata related to retrieval in the grounding flow.
6818#[cfg(feature = "prediction-service")]
6819#[derive(Clone, Default, PartialEq)]
6820#[non_exhaustive]
6821pub struct RetrievalMetadata {
6822    /// Optional. Score indicating how likely information from Google Search could
6823    /// help answer the prompt. The score is in the range `[0, 1]`, where 0 is the
6824    /// least likely and 1 is the most likely. This score is only populated when
6825    /// Google Search grounding and dynamic retrieval is enabled. It will be
6826    /// compared to the threshold to determine whether to trigger Google Search.
6827    pub google_search_dynamic_retrieval_score: f32,
6828
6829    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6830}
6831
6832#[cfg(feature = "prediction-service")]
6833impl RetrievalMetadata {
6834    pub fn new() -> Self {
6835        std::default::Default::default()
6836    }
6837
6838    /// Sets the value of [google_search_dynamic_retrieval_score][crate::model::RetrievalMetadata::google_search_dynamic_retrieval_score].
6839    pub fn set_google_search_dynamic_retrieval_score<T: std::convert::Into<f32>>(
6840        mut self,
6841        v: T,
6842    ) -> Self {
6843        self.google_search_dynamic_retrieval_score = v.into();
6844        self
6845    }
6846}
6847
6848#[cfg(feature = "prediction-service")]
6849impl wkt::message::Message for RetrievalMetadata {
6850    fn typename() -> &'static str {
6851        "type.googleapis.com/google.cloud.aiplatform.v1.RetrievalMetadata"
6852    }
6853}
6854
6855/// Configuration for Model Armor integrations of prompt and responses.
6856#[cfg(feature = "prediction-service")]
6857#[derive(Clone, Default, PartialEq)]
6858#[non_exhaustive]
6859pub struct ModelArmorConfig {
6860    /// Optional. The name of the Model Armor template to use for prompt
6861    /// sanitization.
6862    pub prompt_template_name: std::string::String,
6863
6864    /// Optional. The name of the Model Armor template to use for response
6865    /// sanitization.
6866    pub response_template_name: std::string::String,
6867
6868    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6869}
6870
6871#[cfg(feature = "prediction-service")]
6872impl ModelArmorConfig {
6873    pub fn new() -> Self {
6874        std::default::Default::default()
6875    }
6876
6877    /// Sets the value of [prompt_template_name][crate::model::ModelArmorConfig::prompt_template_name].
6878    pub fn set_prompt_template_name<T: std::convert::Into<std::string::String>>(
6879        mut self,
6880        v: T,
6881    ) -> Self {
6882        self.prompt_template_name = v.into();
6883        self
6884    }
6885
6886    /// Sets the value of [response_template_name][crate::model::ModelArmorConfig::response_template_name].
6887    pub fn set_response_template_name<T: std::convert::Into<std::string::String>>(
6888        mut self,
6889        v: T,
6890    ) -> Self {
6891        self.response_template_name = v.into();
6892        self
6893    }
6894}
6895
6896#[cfg(feature = "prediction-service")]
6897impl wkt::message::Message for ModelArmorConfig {
6898    fn typename() -> &'static str {
6899        "type.googleapis.com/google.cloud.aiplatform.v1.ModelArmorConfig"
6900    }
6901}
6902
6903/// Represents token counting info for a single modality.
6904#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
6905#[derive(Clone, Default, PartialEq)]
6906#[non_exhaustive]
6907pub struct ModalityTokenCount {
6908    /// The modality associated with this token count.
6909    pub modality: crate::model::Modality,
6910
6911    /// Number of tokens.
6912    pub token_count: i32,
6913
6914    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6915}
6916
6917#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
6918impl ModalityTokenCount {
6919    pub fn new() -> Self {
6920        std::default::Default::default()
6921    }
6922
6923    /// Sets the value of [modality][crate::model::ModalityTokenCount::modality].
6924    pub fn set_modality<T: std::convert::Into<crate::model::Modality>>(mut self, v: T) -> Self {
6925        self.modality = v.into();
6926        self
6927    }
6928
6929    /// Sets the value of [token_count][crate::model::ModalityTokenCount::token_count].
6930    pub fn set_token_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6931        self.token_count = v.into();
6932        self
6933    }
6934}
6935
6936#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
6937impl wkt::message::Message for ModalityTokenCount {
6938    fn typename() -> &'static str {
6939        "type.googleapis.com/google.cloud.aiplatform.v1.ModalityTokenCount"
6940    }
6941}
6942
6943/// Instance of a general context.
6944#[cfg(any(
6945    feature = "metadata-service",
6946    feature = "pipeline-service",
6947    feature = "schedule-service",
6948))]
6949#[derive(Clone, Default, PartialEq)]
6950#[non_exhaustive]
6951pub struct Context {
6952    /// Immutable. The resource name of the Context.
6953    pub name: std::string::String,
6954
6955    /// User provided display name of the Context.
6956    /// May be up to 128 Unicode characters.
6957    pub display_name: std::string::String,
6958
6959    /// An eTag used to perform consistent read-modify-write updates. If not set, a
6960    /// blind "overwrite" update happens.
6961    pub etag: std::string::String,
6962
6963    /// The labels with user-defined metadata to organize your Contexts.
6964    ///
6965    /// Label keys and values can be no longer than 64 characters
6966    /// (Unicode codepoints), can only contain lowercase letters, numeric
6967    /// characters, underscores and dashes. International characters are allowed.
6968    /// No more than 64 user labels can be associated with one Context (System
6969    /// labels are excluded).
6970    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
6971
6972    /// Output only. Timestamp when this Context was created.
6973    pub create_time: std::option::Option<wkt::Timestamp>,
6974
6975    /// Output only. Timestamp when this Context was last updated.
6976    pub update_time: std::option::Option<wkt::Timestamp>,
6977
6978    /// Output only. A list of resource names of Contexts that are parents of this
6979    /// Context. A Context may have at most 10 parent_contexts.
6980    pub parent_contexts: std::vec::Vec<std::string::String>,
6981
6982    /// The title of the schema describing the metadata.
6983    ///
6984    /// Schema title and version is expected to be registered in earlier Create
6985    /// Schema calls. And both are used together as unique identifiers to identify
6986    /// schemas within the local metadata store.
6987    pub schema_title: std::string::String,
6988
6989    /// The version of the schema in schema_name to use.
6990    ///
6991    /// Schema title and version is expected to be registered in earlier Create
6992    /// Schema calls. And both are used together as unique identifiers to identify
6993    /// schemas within the local metadata store.
6994    pub schema_version: std::string::String,
6995
6996    /// Properties of the Context.
6997    /// Top level metadata keys' heading and trailing spaces will be trimmed.
6998    /// The size of this field should not exceed 200KB.
6999    pub metadata: std::option::Option<wkt::Struct>,
7000
7001    /// Description of the Context
7002    pub description: std::string::String,
7003
7004    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7005}
7006
7007#[cfg(any(
7008    feature = "metadata-service",
7009    feature = "pipeline-service",
7010    feature = "schedule-service",
7011))]
7012impl Context {
7013    pub fn new() -> Self {
7014        std::default::Default::default()
7015    }
7016
7017    /// Sets the value of [name][crate::model::Context::name].
7018    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7019        self.name = v.into();
7020        self
7021    }
7022
7023    /// Sets the value of [display_name][crate::model::Context::display_name].
7024    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7025        self.display_name = v.into();
7026        self
7027    }
7028
7029    /// Sets the value of [etag][crate::model::Context::etag].
7030    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7031        self.etag = v.into();
7032        self
7033    }
7034
7035    /// Sets the value of [labels][crate::model::Context::labels].
7036    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
7037    where
7038        T: std::iter::IntoIterator<Item = (K, V)>,
7039        K: std::convert::Into<std::string::String>,
7040        V: std::convert::Into<std::string::String>,
7041    {
7042        use std::iter::Iterator;
7043        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7044        self
7045    }
7046
7047    /// Sets the value of [create_time][crate::model::Context::create_time].
7048    pub fn set_create_time<T>(mut self, v: T) -> Self
7049    where
7050        T: std::convert::Into<wkt::Timestamp>,
7051    {
7052        self.create_time = std::option::Option::Some(v.into());
7053        self
7054    }
7055
7056    /// Sets or clears the value of [create_time][crate::model::Context::create_time].
7057    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7058    where
7059        T: std::convert::Into<wkt::Timestamp>,
7060    {
7061        self.create_time = v.map(|x| x.into());
7062        self
7063    }
7064
7065    /// Sets the value of [update_time][crate::model::Context::update_time].
7066    pub fn set_update_time<T>(mut self, v: T) -> Self
7067    where
7068        T: std::convert::Into<wkt::Timestamp>,
7069    {
7070        self.update_time = std::option::Option::Some(v.into());
7071        self
7072    }
7073
7074    /// Sets or clears the value of [update_time][crate::model::Context::update_time].
7075    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
7076    where
7077        T: std::convert::Into<wkt::Timestamp>,
7078    {
7079        self.update_time = v.map(|x| x.into());
7080        self
7081    }
7082
7083    /// Sets the value of [parent_contexts][crate::model::Context::parent_contexts].
7084    pub fn set_parent_contexts<T, V>(mut self, v: T) -> Self
7085    where
7086        T: std::iter::IntoIterator<Item = V>,
7087        V: std::convert::Into<std::string::String>,
7088    {
7089        use std::iter::Iterator;
7090        self.parent_contexts = v.into_iter().map(|i| i.into()).collect();
7091        self
7092    }
7093
7094    /// Sets the value of [schema_title][crate::model::Context::schema_title].
7095    pub fn set_schema_title<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7096        self.schema_title = v.into();
7097        self
7098    }
7099
7100    /// Sets the value of [schema_version][crate::model::Context::schema_version].
7101    pub fn set_schema_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7102        self.schema_version = v.into();
7103        self
7104    }
7105
7106    /// Sets the value of [metadata][crate::model::Context::metadata].
7107    pub fn set_metadata<T>(mut self, v: T) -> Self
7108    where
7109        T: std::convert::Into<wkt::Struct>,
7110    {
7111        self.metadata = std::option::Option::Some(v.into());
7112        self
7113    }
7114
7115    /// Sets or clears the value of [metadata][crate::model::Context::metadata].
7116    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
7117    where
7118        T: std::convert::Into<wkt::Struct>,
7119    {
7120        self.metadata = v.map(|x| x.into());
7121        self
7122    }
7123
7124    /// Sets the value of [description][crate::model::Context::description].
7125    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7126        self.description = v.into();
7127        self
7128    }
7129}
7130
7131#[cfg(any(
7132    feature = "metadata-service",
7133    feature = "pipeline-service",
7134    feature = "schedule-service",
7135))]
7136impl wkt::message::Message for Context {
7137    fn typename() -> &'static str {
7138        "type.googleapis.com/google.cloud.aiplatform.v1.Context"
7139    }
7140}
7141
7142/// Represents a job that runs custom workloads such as a Docker container or a
7143/// Python package. A CustomJob can have multiple worker pools and each worker
7144/// pool can have its own machine and input spec. A CustomJob will be cleaned up
7145/// once the job enters terminal state (failed or succeeded).
7146#[cfg(feature = "job-service")]
7147#[derive(Clone, Default, PartialEq)]
7148#[non_exhaustive]
7149pub struct CustomJob {
7150    /// Output only. Resource name of a CustomJob.
7151    pub name: std::string::String,
7152
7153    /// Required. The display name of the CustomJob.
7154    /// The name can be up to 128 characters long and can consist of any UTF-8
7155    /// characters.
7156    pub display_name: std::string::String,
7157
7158    /// Required. Job spec.
7159    pub job_spec: std::option::Option<crate::model::CustomJobSpec>,
7160
7161    /// Output only. The detailed state of the job.
7162    pub state: crate::model::JobState,
7163
7164    /// Output only. Time when the CustomJob was created.
7165    pub create_time: std::option::Option<wkt::Timestamp>,
7166
7167    /// Output only. Time when the CustomJob for the first time entered the
7168    /// `JOB_STATE_RUNNING` state.
7169    pub start_time: std::option::Option<wkt::Timestamp>,
7170
7171    /// Output only. Time when the CustomJob entered any of the following states:
7172    /// `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
7173    pub end_time: std::option::Option<wkt::Timestamp>,
7174
7175    /// Output only. Time when the CustomJob was most recently updated.
7176    pub update_time: std::option::Option<wkt::Timestamp>,
7177
7178    /// Output only. Only populated when job's state is `JOB_STATE_FAILED` or
7179    /// `JOB_STATE_CANCELLED`.
7180    pub error: std::option::Option<rpc::model::Status>,
7181
7182    /// The labels with user-defined metadata to organize CustomJobs.
7183    ///
7184    /// Label keys and values can be no longer than 64 characters
7185    /// (Unicode codepoints), can only contain lowercase letters, numeric
7186    /// characters, underscores and dashes. International characters are allowed.
7187    ///
7188    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
7189    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
7190
7191    /// Customer-managed encryption key options for a CustomJob. If this is set,
7192    /// then all resources created by the CustomJob will be encrypted with the
7193    /// provided encryption key.
7194    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
7195
7196    /// Output only. URIs for accessing [interactive
7197    /// shells](https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell)
7198    /// (one URI for each training node). Only available if
7199    /// [job_spec.enable_web_access][google.cloud.aiplatform.v1.CustomJobSpec.enable_web_access]
7200    /// is `true`.
7201    ///
7202    /// The keys are names of each node in the training job; for example,
7203    /// `workerpool0-0` for the primary node, `workerpool1-0` for the first node in
7204    /// the second worker pool, and `workerpool1-1` for the second node in the
7205    /// second worker pool.
7206    ///
7207    /// The values are the URIs for each node's interactive shell.
7208    ///
7209    /// [google.cloud.aiplatform.v1.CustomJobSpec.enable_web_access]: crate::model::CustomJobSpec::enable_web_access
7210    pub web_access_uris: std::collections::HashMap<std::string::String, std::string::String>,
7211
7212    /// Output only. Reserved for future use.
7213    pub satisfies_pzs: bool,
7214
7215    /// Output only. Reserved for future use.
7216    pub satisfies_pzi: bool,
7217
7218    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7219}
7220
7221#[cfg(feature = "job-service")]
7222impl CustomJob {
7223    pub fn new() -> Self {
7224        std::default::Default::default()
7225    }
7226
7227    /// Sets the value of [name][crate::model::CustomJob::name].
7228    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7229        self.name = v.into();
7230        self
7231    }
7232
7233    /// Sets the value of [display_name][crate::model::CustomJob::display_name].
7234    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7235        self.display_name = v.into();
7236        self
7237    }
7238
7239    /// Sets the value of [job_spec][crate::model::CustomJob::job_spec].
7240    pub fn set_job_spec<T>(mut self, v: T) -> Self
7241    where
7242        T: std::convert::Into<crate::model::CustomJobSpec>,
7243    {
7244        self.job_spec = std::option::Option::Some(v.into());
7245        self
7246    }
7247
7248    /// Sets or clears the value of [job_spec][crate::model::CustomJob::job_spec].
7249    pub fn set_or_clear_job_spec<T>(mut self, v: std::option::Option<T>) -> Self
7250    where
7251        T: std::convert::Into<crate::model::CustomJobSpec>,
7252    {
7253        self.job_spec = v.map(|x| x.into());
7254        self
7255    }
7256
7257    /// Sets the value of [state][crate::model::CustomJob::state].
7258    pub fn set_state<T: std::convert::Into<crate::model::JobState>>(mut self, v: T) -> Self {
7259        self.state = v.into();
7260        self
7261    }
7262
7263    /// Sets the value of [create_time][crate::model::CustomJob::create_time].
7264    pub fn set_create_time<T>(mut self, v: T) -> Self
7265    where
7266        T: std::convert::Into<wkt::Timestamp>,
7267    {
7268        self.create_time = std::option::Option::Some(v.into());
7269        self
7270    }
7271
7272    /// Sets or clears the value of [create_time][crate::model::CustomJob::create_time].
7273    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7274    where
7275        T: std::convert::Into<wkt::Timestamp>,
7276    {
7277        self.create_time = v.map(|x| x.into());
7278        self
7279    }
7280
7281    /// Sets the value of [start_time][crate::model::CustomJob::start_time].
7282    pub fn set_start_time<T>(mut self, v: T) -> Self
7283    where
7284        T: std::convert::Into<wkt::Timestamp>,
7285    {
7286        self.start_time = std::option::Option::Some(v.into());
7287        self
7288    }
7289
7290    /// Sets or clears the value of [start_time][crate::model::CustomJob::start_time].
7291    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
7292    where
7293        T: std::convert::Into<wkt::Timestamp>,
7294    {
7295        self.start_time = v.map(|x| x.into());
7296        self
7297    }
7298
7299    /// Sets the value of [end_time][crate::model::CustomJob::end_time].
7300    pub fn set_end_time<T>(mut self, v: T) -> Self
7301    where
7302        T: std::convert::Into<wkt::Timestamp>,
7303    {
7304        self.end_time = std::option::Option::Some(v.into());
7305        self
7306    }
7307
7308    /// Sets or clears the value of [end_time][crate::model::CustomJob::end_time].
7309    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
7310    where
7311        T: std::convert::Into<wkt::Timestamp>,
7312    {
7313        self.end_time = v.map(|x| x.into());
7314        self
7315    }
7316
7317    /// Sets the value of [update_time][crate::model::CustomJob::update_time].
7318    pub fn set_update_time<T>(mut self, v: T) -> Self
7319    where
7320        T: std::convert::Into<wkt::Timestamp>,
7321    {
7322        self.update_time = std::option::Option::Some(v.into());
7323        self
7324    }
7325
7326    /// Sets or clears the value of [update_time][crate::model::CustomJob::update_time].
7327    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
7328    where
7329        T: std::convert::Into<wkt::Timestamp>,
7330    {
7331        self.update_time = v.map(|x| x.into());
7332        self
7333    }
7334
7335    /// Sets the value of [error][crate::model::CustomJob::error].
7336    pub fn set_error<T>(mut self, v: T) -> Self
7337    where
7338        T: std::convert::Into<rpc::model::Status>,
7339    {
7340        self.error = std::option::Option::Some(v.into());
7341        self
7342    }
7343
7344    /// Sets or clears the value of [error][crate::model::CustomJob::error].
7345    pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
7346    where
7347        T: std::convert::Into<rpc::model::Status>,
7348    {
7349        self.error = v.map(|x| x.into());
7350        self
7351    }
7352
7353    /// Sets the value of [labels][crate::model::CustomJob::labels].
7354    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
7355    where
7356        T: std::iter::IntoIterator<Item = (K, V)>,
7357        K: std::convert::Into<std::string::String>,
7358        V: std::convert::Into<std::string::String>,
7359    {
7360        use std::iter::Iterator;
7361        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7362        self
7363    }
7364
7365    /// Sets the value of [encryption_spec][crate::model::CustomJob::encryption_spec].
7366    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
7367    where
7368        T: std::convert::Into<crate::model::EncryptionSpec>,
7369    {
7370        self.encryption_spec = std::option::Option::Some(v.into());
7371        self
7372    }
7373
7374    /// Sets or clears the value of [encryption_spec][crate::model::CustomJob::encryption_spec].
7375    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
7376    where
7377        T: std::convert::Into<crate::model::EncryptionSpec>,
7378    {
7379        self.encryption_spec = v.map(|x| x.into());
7380        self
7381    }
7382
7383    /// Sets the value of [web_access_uris][crate::model::CustomJob::web_access_uris].
7384    pub fn set_web_access_uris<T, K, V>(mut self, v: T) -> Self
7385    where
7386        T: std::iter::IntoIterator<Item = (K, V)>,
7387        K: std::convert::Into<std::string::String>,
7388        V: std::convert::Into<std::string::String>,
7389    {
7390        use std::iter::Iterator;
7391        self.web_access_uris = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7392        self
7393    }
7394
7395    /// Sets the value of [satisfies_pzs][crate::model::CustomJob::satisfies_pzs].
7396    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7397        self.satisfies_pzs = v.into();
7398        self
7399    }
7400
7401    /// Sets the value of [satisfies_pzi][crate::model::CustomJob::satisfies_pzi].
7402    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7403        self.satisfies_pzi = v.into();
7404        self
7405    }
7406}
7407
7408#[cfg(feature = "job-service")]
7409impl wkt::message::Message for CustomJob {
7410    fn typename() -> &'static str {
7411        "type.googleapis.com/google.cloud.aiplatform.v1.CustomJob"
7412    }
7413}
7414
7415/// Represents the spec of a CustomJob.
7416#[cfg(feature = "job-service")]
7417#[derive(Clone, Default, PartialEq)]
7418#[non_exhaustive]
7419pub struct CustomJobSpec {
7420    /// Optional. The ID of the PersistentResource in the same Project and Location
7421    /// which to run
7422    ///
7423    /// If this is specified, the job will be run on existing machines held by the
7424    /// PersistentResource instead of on-demand short-live machines.
7425    /// The network and CMEK configs on the job should be consistent with those on
7426    /// the PersistentResource, otherwise, the job will be rejected.
7427    pub persistent_resource_id: std::string::String,
7428
7429    /// Required. The spec of the worker pools including machine type and Docker
7430    /// image. All worker pools except the first one are optional and can be
7431    /// skipped by providing an empty value.
7432    pub worker_pool_specs: std::vec::Vec<crate::model::WorkerPoolSpec>,
7433
7434    /// Scheduling options for a CustomJob.
7435    pub scheduling: std::option::Option<crate::model::Scheduling>,
7436
7437    /// Specifies the service account for workload run-as account.
7438    /// Users submitting jobs must have act-as permission on this run-as account.
7439    /// If unspecified, the [Vertex AI Custom Code Service
7440    /// Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
7441    /// for the CustomJob's project is used.
7442    pub service_account: std::string::String,
7443
7444    /// Optional. The full name of the Compute Engine
7445    /// [network](/compute/docs/networks-and-firewalls#networks) to which the Job
7446    /// should be peered. For example, `projects/12345/global/networks/myVPC`.
7447    /// [Format](/compute/docs/reference/rest/v1/networks/insert)
7448    /// is of the form `projects/{project}/global/networks/{network}`.
7449    /// Where {project} is a project number, as in `12345`, and {network} is a
7450    /// network name.
7451    ///
7452    /// To specify this field, you must have already [configured VPC Network
7453    /// Peering for Vertex
7454    /// AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering).
7455    ///
7456    /// If this field is left unspecified, the job is not peered with any network.
7457    pub network: std::string::String,
7458
7459    /// Optional. A list of names for the reserved ip ranges under the VPC network
7460    /// that can be used for this job.
7461    ///
7462    /// If set, we will deploy the job within the provided ip ranges. Otherwise,
7463    /// the job will be deployed to any ip ranges under the provided VPC
7464    /// network.
7465    ///
7466    /// Example: ['vertex-ai-ip-range'].
7467    pub reserved_ip_ranges: std::vec::Vec<std::string::String>,
7468
7469    /// Optional. Configuration for PSC-I for CustomJob.
7470    pub psc_interface_config: std::option::Option<crate::model::PscInterfaceConfig>,
7471
7472    /// The Cloud Storage location to store the output of this CustomJob or
7473    /// HyperparameterTuningJob. For HyperparameterTuningJob,
7474    /// the baseOutputDirectory of
7475    /// each child CustomJob backing a Trial is set to a subdirectory of name
7476    /// [id][google.cloud.aiplatform.v1.Trial.id] under its parent
7477    /// HyperparameterTuningJob's baseOutputDirectory.
7478    ///
7479    /// The following Vertex AI environment variables will be passed to
7480    /// containers or python modules when this field is set:
7481    ///
7482    /// For CustomJob:
7483    ///
7484    /// * AIP_MODEL_DIR = `<base_output_directory>/model/`
7485    /// * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
7486    /// * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
7487    ///
7488    /// For CustomJob backing a Trial of HyperparameterTuningJob:
7489    ///
7490    /// * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
7491    /// * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
7492    /// * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
7493    ///
7494    /// [google.cloud.aiplatform.v1.Trial.id]: crate::model::Trial::id
7495    pub base_output_directory: std::option::Option<crate::model::GcsDestination>,
7496
7497    /// The ID of the location to store protected artifacts. e.g. us-central1.
7498    /// Populate only when the location is different than CustomJob location.
7499    /// List of supported locations:
7500    /// <https://cloud.google.com/vertex-ai/docs/general/locations>
7501    pub protected_artifact_location_id: std::string::String,
7502
7503    /// Optional. The name of a Vertex AI
7504    /// [Tensorboard][google.cloud.aiplatform.v1.Tensorboard] resource to which
7505    /// this CustomJob will upload Tensorboard logs. Format:
7506    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
7507    ///
7508    /// [google.cloud.aiplatform.v1.Tensorboard]: crate::model::Tensorboard
7509    pub tensorboard: std::string::String,
7510
7511    /// Optional. Whether you want Vertex AI to enable [interactive shell
7512    /// access](https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell)
7513    /// to training containers.
7514    ///
7515    /// If set to `true`, you can access interactive shells at the URIs given
7516    /// by
7517    /// [CustomJob.web_access_uris][google.cloud.aiplatform.v1.CustomJob.web_access_uris]
7518    /// or
7519    /// [Trial.web_access_uris][google.cloud.aiplatform.v1.Trial.web_access_uris]
7520    /// (within
7521    /// [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials]).
7522    ///
7523    /// [google.cloud.aiplatform.v1.CustomJob.web_access_uris]: crate::model::CustomJob::web_access_uris
7524    /// [google.cloud.aiplatform.v1.HyperparameterTuningJob.trials]: crate::model::HyperparameterTuningJob::trials
7525    /// [google.cloud.aiplatform.v1.Trial.web_access_uris]: crate::model::Trial::web_access_uris
7526    pub enable_web_access: bool,
7527
7528    /// Optional. Whether you want Vertex AI to enable access to the customized
7529    /// dashboard in training chief container.
7530    ///
7531    /// If set to `true`, you can access the dashboard at the URIs given
7532    /// by
7533    /// [CustomJob.web_access_uris][google.cloud.aiplatform.v1.CustomJob.web_access_uris]
7534    /// or
7535    /// [Trial.web_access_uris][google.cloud.aiplatform.v1.Trial.web_access_uris]
7536    /// (within
7537    /// [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials]).
7538    ///
7539    /// [google.cloud.aiplatform.v1.CustomJob.web_access_uris]: crate::model::CustomJob::web_access_uris
7540    /// [google.cloud.aiplatform.v1.HyperparameterTuningJob.trials]: crate::model::HyperparameterTuningJob::trials
7541    /// [google.cloud.aiplatform.v1.Trial.web_access_uris]: crate::model::Trial::web_access_uris
7542    pub enable_dashboard_access: bool,
7543
7544    /// Optional. The Experiment associated with this job.
7545    /// Format:
7546    /// `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}`
7547    pub experiment: std::string::String,
7548
7549    /// Optional. The Experiment Run associated with this job.
7550    /// Format:
7551    /// `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}-{experiment-run-name}`
7552    pub experiment_run: std::string::String,
7553
7554    /// Optional. The name of the Model resources for which to generate a mapping
7555    /// to artifact URIs. Applicable only to some of the Google-provided custom
7556    /// jobs. Format: `projects/{project}/locations/{location}/models/{model}`
7557    ///
7558    /// In order to retrieve a specific version of the model, also provide
7559    /// the version ID or version alias.
7560    /// Example: `projects/{project}/locations/{location}/models/{model}@2`
7561    /// or
7562    /// `projects/{project}/locations/{location}/models/{model}@golden`
7563    /// If no version ID or alias is specified, the "default" version will be
7564    /// returned. The "default" version alias is created for the first version of
7565    /// the model, and can be moved to other versions later on. There will be
7566    /// exactly one default version.
7567    pub models: std::vec::Vec<std::string::String>,
7568
7569    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7570}
7571
7572#[cfg(feature = "job-service")]
7573impl CustomJobSpec {
7574    pub fn new() -> Self {
7575        std::default::Default::default()
7576    }
7577
7578    /// Sets the value of [persistent_resource_id][crate::model::CustomJobSpec::persistent_resource_id].
7579    pub fn set_persistent_resource_id<T: std::convert::Into<std::string::String>>(
7580        mut self,
7581        v: T,
7582    ) -> Self {
7583        self.persistent_resource_id = v.into();
7584        self
7585    }
7586
7587    /// Sets the value of [worker_pool_specs][crate::model::CustomJobSpec::worker_pool_specs].
7588    pub fn set_worker_pool_specs<T, V>(mut self, v: T) -> Self
7589    where
7590        T: std::iter::IntoIterator<Item = V>,
7591        V: std::convert::Into<crate::model::WorkerPoolSpec>,
7592    {
7593        use std::iter::Iterator;
7594        self.worker_pool_specs = v.into_iter().map(|i| i.into()).collect();
7595        self
7596    }
7597
7598    /// Sets the value of [scheduling][crate::model::CustomJobSpec::scheduling].
7599    pub fn set_scheduling<T>(mut self, v: T) -> Self
7600    where
7601        T: std::convert::Into<crate::model::Scheduling>,
7602    {
7603        self.scheduling = std::option::Option::Some(v.into());
7604        self
7605    }
7606
7607    /// Sets or clears the value of [scheduling][crate::model::CustomJobSpec::scheduling].
7608    pub fn set_or_clear_scheduling<T>(mut self, v: std::option::Option<T>) -> Self
7609    where
7610        T: std::convert::Into<crate::model::Scheduling>,
7611    {
7612        self.scheduling = v.map(|x| x.into());
7613        self
7614    }
7615
7616    /// Sets the value of [service_account][crate::model::CustomJobSpec::service_account].
7617    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7618        self.service_account = v.into();
7619        self
7620    }
7621
7622    /// Sets the value of [network][crate::model::CustomJobSpec::network].
7623    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7624        self.network = v.into();
7625        self
7626    }
7627
7628    /// Sets the value of [reserved_ip_ranges][crate::model::CustomJobSpec::reserved_ip_ranges].
7629    pub fn set_reserved_ip_ranges<T, V>(mut self, v: T) -> Self
7630    where
7631        T: std::iter::IntoIterator<Item = V>,
7632        V: std::convert::Into<std::string::String>,
7633    {
7634        use std::iter::Iterator;
7635        self.reserved_ip_ranges = v.into_iter().map(|i| i.into()).collect();
7636        self
7637    }
7638
7639    /// Sets the value of [psc_interface_config][crate::model::CustomJobSpec::psc_interface_config].
7640    pub fn set_psc_interface_config<T>(mut self, v: T) -> Self
7641    where
7642        T: std::convert::Into<crate::model::PscInterfaceConfig>,
7643    {
7644        self.psc_interface_config = std::option::Option::Some(v.into());
7645        self
7646    }
7647
7648    /// Sets or clears the value of [psc_interface_config][crate::model::CustomJobSpec::psc_interface_config].
7649    pub fn set_or_clear_psc_interface_config<T>(mut self, v: std::option::Option<T>) -> Self
7650    where
7651        T: std::convert::Into<crate::model::PscInterfaceConfig>,
7652    {
7653        self.psc_interface_config = v.map(|x| x.into());
7654        self
7655    }
7656
7657    /// Sets the value of [base_output_directory][crate::model::CustomJobSpec::base_output_directory].
7658    pub fn set_base_output_directory<T>(mut self, v: T) -> Self
7659    where
7660        T: std::convert::Into<crate::model::GcsDestination>,
7661    {
7662        self.base_output_directory = std::option::Option::Some(v.into());
7663        self
7664    }
7665
7666    /// Sets or clears the value of [base_output_directory][crate::model::CustomJobSpec::base_output_directory].
7667    pub fn set_or_clear_base_output_directory<T>(mut self, v: std::option::Option<T>) -> Self
7668    where
7669        T: std::convert::Into<crate::model::GcsDestination>,
7670    {
7671        self.base_output_directory = v.map(|x| x.into());
7672        self
7673    }
7674
7675    /// Sets the value of [protected_artifact_location_id][crate::model::CustomJobSpec::protected_artifact_location_id].
7676    pub fn set_protected_artifact_location_id<T: std::convert::Into<std::string::String>>(
7677        mut self,
7678        v: T,
7679    ) -> Self {
7680        self.protected_artifact_location_id = v.into();
7681        self
7682    }
7683
7684    /// Sets the value of [tensorboard][crate::model::CustomJobSpec::tensorboard].
7685    pub fn set_tensorboard<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7686        self.tensorboard = v.into();
7687        self
7688    }
7689
7690    /// Sets the value of [enable_web_access][crate::model::CustomJobSpec::enable_web_access].
7691    pub fn set_enable_web_access<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7692        self.enable_web_access = v.into();
7693        self
7694    }
7695
7696    /// Sets the value of [enable_dashboard_access][crate::model::CustomJobSpec::enable_dashboard_access].
7697    pub fn set_enable_dashboard_access<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7698        self.enable_dashboard_access = v.into();
7699        self
7700    }
7701
7702    /// Sets the value of [experiment][crate::model::CustomJobSpec::experiment].
7703    pub fn set_experiment<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7704        self.experiment = v.into();
7705        self
7706    }
7707
7708    /// Sets the value of [experiment_run][crate::model::CustomJobSpec::experiment_run].
7709    pub fn set_experiment_run<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7710        self.experiment_run = v.into();
7711        self
7712    }
7713
7714    /// Sets the value of [models][crate::model::CustomJobSpec::models].
7715    pub fn set_models<T, V>(mut self, v: T) -> Self
7716    where
7717        T: std::iter::IntoIterator<Item = V>,
7718        V: std::convert::Into<std::string::String>,
7719    {
7720        use std::iter::Iterator;
7721        self.models = v.into_iter().map(|i| i.into()).collect();
7722        self
7723    }
7724}
7725
7726#[cfg(feature = "job-service")]
7727impl wkt::message::Message for CustomJobSpec {
7728    fn typename() -> &'static str {
7729        "type.googleapis.com/google.cloud.aiplatform.v1.CustomJobSpec"
7730    }
7731}
7732
7733/// Represents the spec of a worker pool in a job.
7734#[cfg(feature = "job-service")]
7735#[derive(Clone, Default, PartialEq)]
7736#[non_exhaustive]
7737pub struct WorkerPoolSpec {
7738    /// Optional. Immutable. The specification of a single machine.
7739    pub machine_spec: std::option::Option<crate::model::MachineSpec>,
7740
7741    /// Optional. The number of worker replicas to use for this worker pool.
7742    pub replica_count: i64,
7743
7744    /// Optional. List of NFS mount spec.
7745    pub nfs_mounts: std::vec::Vec<crate::model::NfsMount>,
7746
7747    /// Disk spec.
7748    pub disk_spec: std::option::Option<crate::model::DiskSpec>,
7749
7750    /// The custom task to be executed in this worker pool.
7751    pub task: std::option::Option<crate::model::worker_pool_spec::Task>,
7752
7753    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7754}
7755
7756#[cfg(feature = "job-service")]
7757impl WorkerPoolSpec {
7758    pub fn new() -> Self {
7759        std::default::Default::default()
7760    }
7761
7762    /// Sets the value of [machine_spec][crate::model::WorkerPoolSpec::machine_spec].
7763    pub fn set_machine_spec<T>(mut self, v: T) -> Self
7764    where
7765        T: std::convert::Into<crate::model::MachineSpec>,
7766    {
7767        self.machine_spec = std::option::Option::Some(v.into());
7768        self
7769    }
7770
7771    /// Sets or clears the value of [machine_spec][crate::model::WorkerPoolSpec::machine_spec].
7772    pub fn set_or_clear_machine_spec<T>(mut self, v: std::option::Option<T>) -> Self
7773    where
7774        T: std::convert::Into<crate::model::MachineSpec>,
7775    {
7776        self.machine_spec = v.map(|x| x.into());
7777        self
7778    }
7779
7780    /// Sets the value of [replica_count][crate::model::WorkerPoolSpec::replica_count].
7781    pub fn set_replica_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7782        self.replica_count = v.into();
7783        self
7784    }
7785
7786    /// Sets the value of [nfs_mounts][crate::model::WorkerPoolSpec::nfs_mounts].
7787    pub fn set_nfs_mounts<T, V>(mut self, v: T) -> Self
7788    where
7789        T: std::iter::IntoIterator<Item = V>,
7790        V: std::convert::Into<crate::model::NfsMount>,
7791    {
7792        use std::iter::Iterator;
7793        self.nfs_mounts = v.into_iter().map(|i| i.into()).collect();
7794        self
7795    }
7796
7797    /// Sets the value of [disk_spec][crate::model::WorkerPoolSpec::disk_spec].
7798    pub fn set_disk_spec<T>(mut self, v: T) -> Self
7799    where
7800        T: std::convert::Into<crate::model::DiskSpec>,
7801    {
7802        self.disk_spec = std::option::Option::Some(v.into());
7803        self
7804    }
7805
7806    /// Sets or clears the value of [disk_spec][crate::model::WorkerPoolSpec::disk_spec].
7807    pub fn set_or_clear_disk_spec<T>(mut self, v: std::option::Option<T>) -> Self
7808    where
7809        T: std::convert::Into<crate::model::DiskSpec>,
7810    {
7811        self.disk_spec = v.map(|x| x.into());
7812        self
7813    }
7814
7815    /// Sets the value of [task][crate::model::WorkerPoolSpec::task].
7816    ///
7817    /// Note that all the setters affecting `task` are mutually
7818    /// exclusive.
7819    pub fn set_task<
7820        T: std::convert::Into<std::option::Option<crate::model::worker_pool_spec::Task>>,
7821    >(
7822        mut self,
7823        v: T,
7824    ) -> Self {
7825        self.task = v.into();
7826        self
7827    }
7828
7829    /// The value of [task][crate::model::WorkerPoolSpec::task]
7830    /// if it holds a `ContainerSpec`, `None` if the field is not set or
7831    /// holds a different branch.
7832    pub fn container_spec(
7833        &self,
7834    ) -> std::option::Option<&std::boxed::Box<crate::model::ContainerSpec>> {
7835        #[allow(unreachable_patterns)]
7836        self.task.as_ref().and_then(|v| match v {
7837            crate::model::worker_pool_spec::Task::ContainerSpec(v) => std::option::Option::Some(v),
7838            _ => std::option::Option::None,
7839        })
7840    }
7841
7842    /// Sets the value of [task][crate::model::WorkerPoolSpec::task]
7843    /// to hold a `ContainerSpec`.
7844    ///
7845    /// Note that all the setters affecting `task` are
7846    /// mutually exclusive.
7847    pub fn set_container_spec<
7848        T: std::convert::Into<std::boxed::Box<crate::model::ContainerSpec>>,
7849    >(
7850        mut self,
7851        v: T,
7852    ) -> Self {
7853        self.task = std::option::Option::Some(crate::model::worker_pool_spec::Task::ContainerSpec(
7854            v.into(),
7855        ));
7856        self
7857    }
7858
7859    /// The value of [task][crate::model::WorkerPoolSpec::task]
7860    /// if it holds a `PythonPackageSpec`, `None` if the field is not set or
7861    /// holds a different branch.
7862    pub fn python_package_spec(
7863        &self,
7864    ) -> std::option::Option<&std::boxed::Box<crate::model::PythonPackageSpec>> {
7865        #[allow(unreachable_patterns)]
7866        self.task.as_ref().and_then(|v| match v {
7867            crate::model::worker_pool_spec::Task::PythonPackageSpec(v) => {
7868                std::option::Option::Some(v)
7869            }
7870            _ => std::option::Option::None,
7871        })
7872    }
7873
7874    /// Sets the value of [task][crate::model::WorkerPoolSpec::task]
7875    /// to hold a `PythonPackageSpec`.
7876    ///
7877    /// Note that all the setters affecting `task` are
7878    /// mutually exclusive.
7879    pub fn set_python_package_spec<
7880        T: std::convert::Into<std::boxed::Box<crate::model::PythonPackageSpec>>,
7881    >(
7882        mut self,
7883        v: T,
7884    ) -> Self {
7885        self.task = std::option::Option::Some(
7886            crate::model::worker_pool_spec::Task::PythonPackageSpec(v.into()),
7887        );
7888        self
7889    }
7890}
7891
7892#[cfg(feature = "job-service")]
7893impl wkt::message::Message for WorkerPoolSpec {
7894    fn typename() -> &'static str {
7895        "type.googleapis.com/google.cloud.aiplatform.v1.WorkerPoolSpec"
7896    }
7897}
7898
7899/// Defines additional types related to [WorkerPoolSpec].
7900#[cfg(feature = "job-service")]
7901pub mod worker_pool_spec {
7902    #[allow(unused_imports)]
7903    use super::*;
7904
7905    /// The custom task to be executed in this worker pool.
7906    #[cfg(feature = "job-service")]
7907    #[derive(Clone, Debug, PartialEq)]
7908    #[non_exhaustive]
7909    pub enum Task {
7910        /// The custom container task.
7911        ContainerSpec(std::boxed::Box<crate::model::ContainerSpec>),
7912        /// The Python packaged task.
7913        PythonPackageSpec(std::boxed::Box<crate::model::PythonPackageSpec>),
7914    }
7915}
7916
7917/// The spec of a Container.
7918#[cfg(feature = "job-service")]
7919#[derive(Clone, Default, PartialEq)]
7920#[non_exhaustive]
7921pub struct ContainerSpec {
7922    /// Required. The URI of a container image in the Container Registry that is to
7923    /// be run on each worker replica.
7924    pub image_uri: std::string::String,
7925
7926    /// The command to be invoked when the container is started.
7927    /// It overrides the entrypoint instruction in Dockerfile when provided.
7928    pub command: std::vec::Vec<std::string::String>,
7929
7930    /// The arguments to be passed when starting the container.
7931    pub args: std::vec::Vec<std::string::String>,
7932
7933    /// Environment variables to be passed to the container.
7934    /// Maximum limit is 100.
7935    pub env: std::vec::Vec<crate::model::EnvVar>,
7936
7937    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7938}
7939
7940#[cfg(feature = "job-service")]
7941impl ContainerSpec {
7942    pub fn new() -> Self {
7943        std::default::Default::default()
7944    }
7945
7946    /// Sets the value of [image_uri][crate::model::ContainerSpec::image_uri].
7947    pub fn set_image_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7948        self.image_uri = v.into();
7949        self
7950    }
7951
7952    /// Sets the value of [command][crate::model::ContainerSpec::command].
7953    pub fn set_command<T, V>(mut self, v: T) -> Self
7954    where
7955        T: std::iter::IntoIterator<Item = V>,
7956        V: std::convert::Into<std::string::String>,
7957    {
7958        use std::iter::Iterator;
7959        self.command = v.into_iter().map(|i| i.into()).collect();
7960        self
7961    }
7962
7963    /// Sets the value of [args][crate::model::ContainerSpec::args].
7964    pub fn set_args<T, V>(mut self, v: T) -> Self
7965    where
7966        T: std::iter::IntoIterator<Item = V>,
7967        V: std::convert::Into<std::string::String>,
7968    {
7969        use std::iter::Iterator;
7970        self.args = v.into_iter().map(|i| i.into()).collect();
7971        self
7972    }
7973
7974    /// Sets the value of [env][crate::model::ContainerSpec::env].
7975    pub fn set_env<T, V>(mut self, v: T) -> Self
7976    where
7977        T: std::iter::IntoIterator<Item = V>,
7978        V: std::convert::Into<crate::model::EnvVar>,
7979    {
7980        use std::iter::Iterator;
7981        self.env = v.into_iter().map(|i| i.into()).collect();
7982        self
7983    }
7984}
7985
7986#[cfg(feature = "job-service")]
7987impl wkt::message::Message for ContainerSpec {
7988    fn typename() -> &'static str {
7989        "type.googleapis.com/google.cloud.aiplatform.v1.ContainerSpec"
7990    }
7991}
7992
7993/// The spec of a Python packaged code.
7994#[cfg(feature = "job-service")]
7995#[derive(Clone, Default, PartialEq)]
7996#[non_exhaustive]
7997pub struct PythonPackageSpec {
7998    /// Required. The URI of a container image in Artifact Registry that will run
7999    /// the provided Python package. Vertex AI provides a wide range of executor
8000    /// images with pre-installed packages to meet users' various use cases. See
8001    /// the list of [pre-built containers for
8002    /// training](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers).
8003    /// You must use an image from this list.
8004    pub executor_image_uri: std::string::String,
8005
8006    /// Required. The Google Cloud Storage location of the Python package files
8007    /// which are the training program and its dependent packages. The maximum
8008    /// number of package URIs is 100.
8009    pub package_uris: std::vec::Vec<std::string::String>,
8010
8011    /// Required. The Python module name to run after installing the packages.
8012    pub python_module: std::string::String,
8013
8014    /// Command line arguments to be passed to the Python task.
8015    pub args: std::vec::Vec<std::string::String>,
8016
8017    /// Environment variables to be passed to the python module.
8018    /// Maximum limit is 100.
8019    pub env: std::vec::Vec<crate::model::EnvVar>,
8020
8021    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8022}
8023
8024#[cfg(feature = "job-service")]
8025impl PythonPackageSpec {
8026    pub fn new() -> Self {
8027        std::default::Default::default()
8028    }
8029
8030    /// Sets the value of [executor_image_uri][crate::model::PythonPackageSpec::executor_image_uri].
8031    pub fn set_executor_image_uri<T: std::convert::Into<std::string::String>>(
8032        mut self,
8033        v: T,
8034    ) -> Self {
8035        self.executor_image_uri = v.into();
8036        self
8037    }
8038
8039    /// Sets the value of [package_uris][crate::model::PythonPackageSpec::package_uris].
8040    pub fn set_package_uris<T, V>(mut self, v: T) -> Self
8041    where
8042        T: std::iter::IntoIterator<Item = V>,
8043        V: std::convert::Into<std::string::String>,
8044    {
8045        use std::iter::Iterator;
8046        self.package_uris = v.into_iter().map(|i| i.into()).collect();
8047        self
8048    }
8049
8050    /// Sets the value of [python_module][crate::model::PythonPackageSpec::python_module].
8051    pub fn set_python_module<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8052        self.python_module = v.into();
8053        self
8054    }
8055
8056    /// Sets the value of [args][crate::model::PythonPackageSpec::args].
8057    pub fn set_args<T, V>(mut self, v: T) -> Self
8058    where
8059        T: std::iter::IntoIterator<Item = V>,
8060        V: std::convert::Into<std::string::String>,
8061    {
8062        use std::iter::Iterator;
8063        self.args = v.into_iter().map(|i| i.into()).collect();
8064        self
8065    }
8066
8067    /// Sets the value of [env][crate::model::PythonPackageSpec::env].
8068    pub fn set_env<T, V>(mut self, v: T) -> Self
8069    where
8070        T: std::iter::IntoIterator<Item = V>,
8071        V: std::convert::Into<crate::model::EnvVar>,
8072    {
8073        use std::iter::Iterator;
8074        self.env = v.into_iter().map(|i| i.into()).collect();
8075        self
8076    }
8077}
8078
8079#[cfg(feature = "job-service")]
8080impl wkt::message::Message for PythonPackageSpec {
8081    fn typename() -> &'static str {
8082        "type.googleapis.com/google.cloud.aiplatform.v1.PythonPackageSpec"
8083    }
8084}
8085
8086/// All parameters related to queuing and scheduling of custom jobs.
8087#[cfg(feature = "job-service")]
8088#[derive(Clone, Default, PartialEq)]
8089#[non_exhaustive]
8090pub struct Scheduling {
8091    /// Optional. The maximum job running time. The default is 7 days.
8092    pub timeout: std::option::Option<wkt::Duration>,
8093
8094    /// Optional. Restarts the entire CustomJob if a worker gets restarted.
8095    /// This feature can be used by distributed training jobs that are not
8096    /// resilient to workers leaving and joining a job.
8097    pub restart_job_on_worker_restart: bool,
8098
8099    /// Optional. This determines which type of scheduling strategy to use.
8100    pub strategy: crate::model::scheduling::Strategy,
8101
8102    /// Optional. Indicates if the job should retry for internal errors after the
8103    /// job starts running. If true, overrides
8104    /// `Scheduling.restart_job_on_worker_restart` to false.
8105    pub disable_retries: bool,
8106
8107    /// Optional. This is the maximum duration that a job will wait for the
8108    /// requested resources to be provisioned if the scheduling strategy is set to
8109    /// [Strategy.DWS_FLEX_START].
8110    /// If set to 0, the job will wait indefinitely. The default is 24 hours.
8111    pub max_wait_duration: std::option::Option<wkt::Duration>,
8112
8113    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8114}
8115
8116#[cfg(feature = "job-service")]
8117impl Scheduling {
8118    pub fn new() -> Self {
8119        std::default::Default::default()
8120    }
8121
8122    /// Sets the value of [timeout][crate::model::Scheduling::timeout].
8123    pub fn set_timeout<T>(mut self, v: T) -> Self
8124    where
8125        T: std::convert::Into<wkt::Duration>,
8126    {
8127        self.timeout = std::option::Option::Some(v.into());
8128        self
8129    }
8130
8131    /// Sets or clears the value of [timeout][crate::model::Scheduling::timeout].
8132    pub fn set_or_clear_timeout<T>(mut self, v: std::option::Option<T>) -> Self
8133    where
8134        T: std::convert::Into<wkt::Duration>,
8135    {
8136        self.timeout = v.map(|x| x.into());
8137        self
8138    }
8139
8140    /// Sets the value of [restart_job_on_worker_restart][crate::model::Scheduling::restart_job_on_worker_restart].
8141    pub fn set_restart_job_on_worker_restart<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8142        self.restart_job_on_worker_restart = v.into();
8143        self
8144    }
8145
8146    /// Sets the value of [strategy][crate::model::Scheduling::strategy].
8147    pub fn set_strategy<T: std::convert::Into<crate::model::scheduling::Strategy>>(
8148        mut self,
8149        v: T,
8150    ) -> Self {
8151        self.strategy = v.into();
8152        self
8153    }
8154
8155    /// Sets the value of [disable_retries][crate::model::Scheduling::disable_retries].
8156    pub fn set_disable_retries<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8157        self.disable_retries = v.into();
8158        self
8159    }
8160
8161    /// Sets the value of [max_wait_duration][crate::model::Scheduling::max_wait_duration].
8162    pub fn set_max_wait_duration<T>(mut self, v: T) -> Self
8163    where
8164        T: std::convert::Into<wkt::Duration>,
8165    {
8166        self.max_wait_duration = std::option::Option::Some(v.into());
8167        self
8168    }
8169
8170    /// Sets or clears the value of [max_wait_duration][crate::model::Scheduling::max_wait_duration].
8171    pub fn set_or_clear_max_wait_duration<T>(mut self, v: std::option::Option<T>) -> Self
8172    where
8173        T: std::convert::Into<wkt::Duration>,
8174    {
8175        self.max_wait_duration = v.map(|x| x.into());
8176        self
8177    }
8178}
8179
8180#[cfg(feature = "job-service")]
8181impl wkt::message::Message for Scheduling {
8182    fn typename() -> &'static str {
8183        "type.googleapis.com/google.cloud.aiplatform.v1.Scheduling"
8184    }
8185}
8186
8187/// Defines additional types related to [Scheduling].
8188#[cfg(feature = "job-service")]
8189pub mod scheduling {
8190    #[allow(unused_imports)]
8191    use super::*;
8192
8193    /// Optional. This determines which type of scheduling strategy to use. Right
8194    /// now users have two options such as STANDARD which will use regular on
8195    /// demand resources to schedule the job, the other is SPOT which would
8196    /// leverage spot resources alongwith regular resources to schedule
8197    /// the job.
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://google-cloud-rust.github.io/working_with_enums.html
8212    #[cfg(feature = "job-service")]
8213    #[derive(Clone, Debug, PartialEq)]
8214    #[non_exhaustive]
8215    pub enum Strategy {
8216        /// Strategy will default to STANDARD.
8217        Unspecified,
8218        /// Deprecated. Regular on-demand provisioning strategy.
8219        #[deprecated]
8220        OnDemand,
8221        /// Deprecated. Low cost by making potential use of spot resources.
8222        #[deprecated]
8223        LowCost,
8224        /// Standard provisioning strategy uses regular on-demand resources.
8225        Standard,
8226        /// Spot provisioning strategy uses spot resources.
8227        Spot,
8228        /// Flex Start strategy uses DWS to queue for resources.
8229        FlexStart,
8230        /// If set, the enum was initialized with an unknown value.
8231        ///
8232        /// Applications can examine the value using [Strategy::value] or
8233        /// [Strategy::name].
8234        UnknownValue(strategy::UnknownValue),
8235    }
8236
8237    #[doc(hidden)]
8238    #[cfg(feature = "job-service")]
8239    pub mod strategy {
8240        #[allow(unused_imports)]
8241        use super::*;
8242        #[derive(Clone, Debug, PartialEq)]
8243        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8244    }
8245
8246    #[cfg(feature = "job-service")]
8247    impl Strategy {
8248        /// Gets the enum value.
8249        ///
8250        /// Returns `None` if the enum contains an unknown value deserialized from
8251        /// the string representation of enums.
8252        pub fn value(&self) -> std::option::Option<i32> {
8253            match self {
8254                Self::Unspecified => std::option::Option::Some(0),
8255                Self::OnDemand => std::option::Option::Some(1),
8256                Self::LowCost => std::option::Option::Some(2),
8257                Self::Standard => std::option::Option::Some(3),
8258                Self::Spot => std::option::Option::Some(4),
8259                Self::FlexStart => std::option::Option::Some(6),
8260                Self::UnknownValue(u) => u.0.value(),
8261            }
8262        }
8263
8264        /// Gets the enum value as a string.
8265        ///
8266        /// Returns `None` if the enum contains an unknown value deserialized from
8267        /// the integer representation of enums.
8268        pub fn name(&self) -> std::option::Option<&str> {
8269            match self {
8270                Self::Unspecified => std::option::Option::Some("STRATEGY_UNSPECIFIED"),
8271                Self::OnDemand => std::option::Option::Some("ON_DEMAND"),
8272                Self::LowCost => std::option::Option::Some("LOW_COST"),
8273                Self::Standard => std::option::Option::Some("STANDARD"),
8274                Self::Spot => std::option::Option::Some("SPOT"),
8275                Self::FlexStart => std::option::Option::Some("FLEX_START"),
8276                Self::UnknownValue(u) => u.0.name(),
8277            }
8278        }
8279    }
8280
8281    #[cfg(feature = "job-service")]
8282    impl std::default::Default for Strategy {
8283        fn default() -> Self {
8284            use std::convert::From;
8285            Self::from(0)
8286        }
8287    }
8288
8289    #[cfg(feature = "job-service")]
8290    impl std::fmt::Display for Strategy {
8291        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8292            wkt::internal::display_enum(f, self.name(), self.value())
8293        }
8294    }
8295
8296    #[cfg(feature = "job-service")]
8297    impl std::convert::From<i32> for Strategy {
8298        fn from(value: i32) -> Self {
8299            match value {
8300                0 => Self::Unspecified,
8301                1 => Self::OnDemand,
8302                2 => Self::LowCost,
8303                3 => Self::Standard,
8304                4 => Self::Spot,
8305                6 => Self::FlexStart,
8306                _ => Self::UnknownValue(strategy::UnknownValue(
8307                    wkt::internal::UnknownEnumValue::Integer(value),
8308                )),
8309            }
8310        }
8311    }
8312
8313    #[cfg(feature = "job-service")]
8314    impl std::convert::From<&str> for Strategy {
8315        fn from(value: &str) -> Self {
8316            use std::string::ToString;
8317            match value {
8318                "STRATEGY_UNSPECIFIED" => Self::Unspecified,
8319                "ON_DEMAND" => Self::OnDemand,
8320                "LOW_COST" => Self::LowCost,
8321                "STANDARD" => Self::Standard,
8322                "SPOT" => Self::Spot,
8323                "FLEX_START" => Self::FlexStart,
8324                _ => Self::UnknownValue(strategy::UnknownValue(
8325                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8326                )),
8327            }
8328        }
8329    }
8330
8331    #[cfg(feature = "job-service")]
8332    impl serde::ser::Serialize for Strategy {
8333        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8334        where
8335            S: serde::Serializer,
8336        {
8337            match self {
8338                Self::Unspecified => serializer.serialize_i32(0),
8339                Self::OnDemand => serializer.serialize_i32(1),
8340                Self::LowCost => serializer.serialize_i32(2),
8341                Self::Standard => serializer.serialize_i32(3),
8342                Self::Spot => serializer.serialize_i32(4),
8343                Self::FlexStart => serializer.serialize_i32(6),
8344                Self::UnknownValue(u) => u.0.serialize(serializer),
8345            }
8346        }
8347    }
8348
8349    #[cfg(feature = "job-service")]
8350    impl<'de> serde::de::Deserialize<'de> for Strategy {
8351        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8352        where
8353            D: serde::Deserializer<'de>,
8354        {
8355            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Strategy>::new(
8356                ".google.cloud.aiplatform.v1.Scheduling.Strategy",
8357            ))
8358        }
8359    }
8360}
8361
8362/// Request message for DataFoundryService.GenerateSyntheticData.
8363#[cfg(feature = "data-foundry-service")]
8364#[derive(Clone, Default, PartialEq)]
8365#[non_exhaustive]
8366pub struct GenerateSyntheticDataRequest {
8367    /// Required. The resource name of the Location to run the job.
8368    /// Format: `projects/{project}/locations/{location}`
8369    pub location: std::string::String,
8370
8371    /// Required. The number of synthetic examples to generate.
8372    /// For this stateless API, the count is limited to a small number.
8373    pub count: i32,
8374
8375    /// Required. The schema of the desired output, defined by a list of fields.
8376    pub output_field_specs: std::vec::Vec<crate::model::OutputFieldSpec>,
8377
8378    /// Optional. A list of few-shot examples to guide the model's output style
8379    /// and format.
8380    pub examples: std::vec::Vec<crate::model::SyntheticExample>,
8381
8382    /// The generation strategy to use.
8383    pub strategy: std::option::Option<crate::model::generate_synthetic_data_request::Strategy>,
8384
8385    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8386}
8387
8388#[cfg(feature = "data-foundry-service")]
8389impl GenerateSyntheticDataRequest {
8390    pub fn new() -> Self {
8391        std::default::Default::default()
8392    }
8393
8394    /// Sets the value of [location][crate::model::GenerateSyntheticDataRequest::location].
8395    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8396        self.location = v.into();
8397        self
8398    }
8399
8400    /// Sets the value of [count][crate::model::GenerateSyntheticDataRequest::count].
8401    pub fn set_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8402        self.count = v.into();
8403        self
8404    }
8405
8406    /// Sets the value of [output_field_specs][crate::model::GenerateSyntheticDataRequest::output_field_specs].
8407    pub fn set_output_field_specs<T, V>(mut self, v: T) -> Self
8408    where
8409        T: std::iter::IntoIterator<Item = V>,
8410        V: std::convert::Into<crate::model::OutputFieldSpec>,
8411    {
8412        use std::iter::Iterator;
8413        self.output_field_specs = v.into_iter().map(|i| i.into()).collect();
8414        self
8415    }
8416
8417    /// Sets the value of [examples][crate::model::GenerateSyntheticDataRequest::examples].
8418    pub fn set_examples<T, V>(mut self, v: T) -> Self
8419    where
8420        T: std::iter::IntoIterator<Item = V>,
8421        V: std::convert::Into<crate::model::SyntheticExample>,
8422    {
8423        use std::iter::Iterator;
8424        self.examples = v.into_iter().map(|i| i.into()).collect();
8425        self
8426    }
8427
8428    /// Sets the value of [strategy][crate::model::GenerateSyntheticDataRequest::strategy].
8429    ///
8430    /// Note that all the setters affecting `strategy` are mutually
8431    /// exclusive.
8432    pub fn set_strategy<
8433        T: std::convert::Into<
8434                std::option::Option<crate::model::generate_synthetic_data_request::Strategy>,
8435            >,
8436    >(
8437        mut self,
8438        v: T,
8439    ) -> Self {
8440        self.strategy = v.into();
8441        self
8442    }
8443
8444    /// The value of [strategy][crate::model::GenerateSyntheticDataRequest::strategy]
8445    /// if it holds a `TaskDescription`, `None` if the field is not set or
8446    /// holds a different branch.
8447    pub fn task_description(
8448        &self,
8449    ) -> std::option::Option<&std::boxed::Box<crate::model::TaskDescriptionStrategy>> {
8450        #[allow(unreachable_patterns)]
8451        self.strategy.as_ref().and_then(|v| match v {
8452            crate::model::generate_synthetic_data_request::Strategy::TaskDescription(v) => {
8453                std::option::Option::Some(v)
8454            }
8455            _ => std::option::Option::None,
8456        })
8457    }
8458
8459    /// Sets the value of [strategy][crate::model::GenerateSyntheticDataRequest::strategy]
8460    /// to hold a `TaskDescription`.
8461    ///
8462    /// Note that all the setters affecting `strategy` are
8463    /// mutually exclusive.
8464    pub fn set_task_description<
8465        T: std::convert::Into<std::boxed::Box<crate::model::TaskDescriptionStrategy>>,
8466    >(
8467        mut self,
8468        v: T,
8469    ) -> Self {
8470        self.strategy = std::option::Option::Some(
8471            crate::model::generate_synthetic_data_request::Strategy::TaskDescription(v.into()),
8472        );
8473        self
8474    }
8475}
8476
8477#[cfg(feature = "data-foundry-service")]
8478impl wkt::message::Message for GenerateSyntheticDataRequest {
8479    fn typename() -> &'static str {
8480        "type.googleapis.com/google.cloud.aiplatform.v1.GenerateSyntheticDataRequest"
8481    }
8482}
8483
8484/// Defines additional types related to [GenerateSyntheticDataRequest].
8485#[cfg(feature = "data-foundry-service")]
8486pub mod generate_synthetic_data_request {
8487    #[allow(unused_imports)]
8488    use super::*;
8489
8490    /// The generation strategy to use.
8491    #[cfg(feature = "data-foundry-service")]
8492    #[derive(Clone, Debug, PartialEq)]
8493    #[non_exhaustive]
8494    pub enum Strategy {
8495        /// Generate data from a high-level task description.
8496        TaskDescription(std::boxed::Box<crate::model::TaskDescriptionStrategy>),
8497    }
8498}
8499
8500/// Represents a single named field within a SyntheticExample.
8501#[cfg(feature = "data-foundry-service")]
8502#[derive(Clone, Default, PartialEq)]
8503#[non_exhaustive]
8504pub struct SyntheticField {
8505    /// Optional. The name of the field.
8506    pub field_name: std::string::String,
8507
8508    /// Required. The content of the field.
8509    pub content: std::option::Option<crate::model::Content>,
8510
8511    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8512}
8513
8514#[cfg(feature = "data-foundry-service")]
8515impl SyntheticField {
8516    pub fn new() -> Self {
8517        std::default::Default::default()
8518    }
8519
8520    /// Sets the value of [field_name][crate::model::SyntheticField::field_name].
8521    pub fn set_field_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8522        self.field_name = v.into();
8523        self
8524    }
8525
8526    /// Sets the value of [content][crate::model::SyntheticField::content].
8527    pub fn set_content<T>(mut self, v: T) -> Self
8528    where
8529        T: std::convert::Into<crate::model::Content>,
8530    {
8531        self.content = std::option::Option::Some(v.into());
8532        self
8533    }
8534
8535    /// Sets or clears the value of [content][crate::model::SyntheticField::content].
8536    pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
8537    where
8538        T: std::convert::Into<crate::model::Content>,
8539    {
8540        self.content = v.map(|x| x.into());
8541        self
8542    }
8543}
8544
8545#[cfg(feature = "data-foundry-service")]
8546impl wkt::message::Message for SyntheticField {
8547    fn typename() -> &'static str {
8548        "type.googleapis.com/google.cloud.aiplatform.v1.SyntheticField"
8549    }
8550}
8551
8552/// Represents a single synthetic example, composed of multiple fields.
8553/// Used for providing few-shot examples in the request and for returning
8554/// generated examples in the response.
8555#[cfg(feature = "data-foundry-service")]
8556#[derive(Clone, Default, PartialEq)]
8557#[non_exhaustive]
8558pub struct SyntheticExample {
8559    /// Required. A list of fields that constitute an example.
8560    pub fields: std::vec::Vec<crate::model::SyntheticField>,
8561
8562    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8563}
8564
8565#[cfg(feature = "data-foundry-service")]
8566impl SyntheticExample {
8567    pub fn new() -> Self {
8568        std::default::Default::default()
8569    }
8570
8571    /// Sets the value of [fields][crate::model::SyntheticExample::fields].
8572    pub fn set_fields<T, V>(mut self, v: T) -> Self
8573    where
8574        T: std::iter::IntoIterator<Item = V>,
8575        V: std::convert::Into<crate::model::SyntheticField>,
8576    {
8577        use std::iter::Iterator;
8578        self.fields = v.into_iter().map(|i| i.into()).collect();
8579        self
8580    }
8581}
8582
8583#[cfg(feature = "data-foundry-service")]
8584impl wkt::message::Message for SyntheticExample {
8585    fn typename() -> &'static str {
8586        "type.googleapis.com/google.cloud.aiplatform.v1.SyntheticExample"
8587    }
8588}
8589
8590/// Defines a specification for a single output field.
8591#[cfg(feature = "data-foundry-service")]
8592#[derive(Clone, Default, PartialEq)]
8593#[non_exhaustive]
8594pub struct OutputFieldSpec {
8595    /// Required. The name of the output field.
8596    pub field_name: std::string::String,
8597
8598    /// Optional. Optional, but recommended. Additional guidance specific to this
8599    /// field to provide targeted instructions for the LLM to generate the content
8600    /// of a single output field. While the LLM can sometimes infer content from
8601    /// the field name, providing explicit guidance is preferred.
8602    pub guidance: std::string::String,
8603
8604    /// Optional. The data type of the field. Defaults to CONTENT if not set.
8605    pub field_type: crate::model::output_field_spec::FieldType,
8606
8607    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8608}
8609
8610#[cfg(feature = "data-foundry-service")]
8611impl OutputFieldSpec {
8612    pub fn new() -> Self {
8613        std::default::Default::default()
8614    }
8615
8616    /// Sets the value of [field_name][crate::model::OutputFieldSpec::field_name].
8617    pub fn set_field_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8618        self.field_name = v.into();
8619        self
8620    }
8621
8622    /// Sets the value of [guidance][crate::model::OutputFieldSpec::guidance].
8623    pub fn set_guidance<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8624        self.guidance = v.into();
8625        self
8626    }
8627
8628    /// Sets the value of [field_type][crate::model::OutputFieldSpec::field_type].
8629    pub fn set_field_type<T: std::convert::Into<crate::model::output_field_spec::FieldType>>(
8630        mut self,
8631        v: T,
8632    ) -> Self {
8633        self.field_type = v.into();
8634        self
8635    }
8636}
8637
8638#[cfg(feature = "data-foundry-service")]
8639impl wkt::message::Message for OutputFieldSpec {
8640    fn typename() -> &'static str {
8641        "type.googleapis.com/google.cloud.aiplatform.v1.OutputFieldSpec"
8642    }
8643}
8644
8645/// Defines additional types related to [OutputFieldSpec].
8646#[cfg(feature = "data-foundry-service")]
8647pub mod output_field_spec {
8648    #[allow(unused_imports)]
8649    use super::*;
8650
8651    /// The data type of the field.
8652    ///
8653    /// # Working with unknown values
8654    ///
8655    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8656    /// additional enum variants at any time. Adding new variants is not considered
8657    /// a breaking change. Applications should write their code in anticipation of:
8658    ///
8659    /// - New values appearing in future releases of the client library, **and**
8660    /// - New values received dynamically, without application changes.
8661    ///
8662    /// Please consult the [Working with enums] section in the user guide for some
8663    /// guidelines.
8664    ///
8665    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8666    #[cfg(feature = "data-foundry-service")]
8667    #[derive(Clone, Debug, PartialEq)]
8668    #[non_exhaustive]
8669    pub enum FieldType {
8670        /// Field type is unspecified.
8671        Unspecified,
8672        /// Arbitrary content field type.
8673        Content,
8674        /// Text field type.
8675        Text,
8676        /// Image field type.
8677        Image,
8678        /// Audio field type.
8679        Audio,
8680        /// If set, the enum was initialized with an unknown value.
8681        ///
8682        /// Applications can examine the value using [FieldType::value] or
8683        /// [FieldType::name].
8684        UnknownValue(field_type::UnknownValue),
8685    }
8686
8687    #[doc(hidden)]
8688    #[cfg(feature = "data-foundry-service")]
8689    pub mod field_type {
8690        #[allow(unused_imports)]
8691        use super::*;
8692        #[derive(Clone, Debug, PartialEq)]
8693        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8694    }
8695
8696    #[cfg(feature = "data-foundry-service")]
8697    impl FieldType {
8698        /// Gets the enum value.
8699        ///
8700        /// Returns `None` if the enum contains an unknown value deserialized from
8701        /// the string representation of enums.
8702        pub fn value(&self) -> std::option::Option<i32> {
8703            match self {
8704                Self::Unspecified => std::option::Option::Some(0),
8705                Self::Content => std::option::Option::Some(1),
8706                Self::Text => std::option::Option::Some(2),
8707                Self::Image => std::option::Option::Some(3),
8708                Self::Audio => std::option::Option::Some(4),
8709                Self::UnknownValue(u) => u.0.value(),
8710            }
8711        }
8712
8713        /// Gets the enum value as a string.
8714        ///
8715        /// Returns `None` if the enum contains an unknown value deserialized from
8716        /// the integer representation of enums.
8717        pub fn name(&self) -> std::option::Option<&str> {
8718            match self {
8719                Self::Unspecified => std::option::Option::Some("FIELD_TYPE_UNSPECIFIED"),
8720                Self::Content => std::option::Option::Some("CONTENT"),
8721                Self::Text => std::option::Option::Some("TEXT"),
8722                Self::Image => std::option::Option::Some("IMAGE"),
8723                Self::Audio => std::option::Option::Some("AUDIO"),
8724                Self::UnknownValue(u) => u.0.name(),
8725            }
8726        }
8727    }
8728
8729    #[cfg(feature = "data-foundry-service")]
8730    impl std::default::Default for FieldType {
8731        fn default() -> Self {
8732            use std::convert::From;
8733            Self::from(0)
8734        }
8735    }
8736
8737    #[cfg(feature = "data-foundry-service")]
8738    impl std::fmt::Display for FieldType {
8739        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8740            wkt::internal::display_enum(f, self.name(), self.value())
8741        }
8742    }
8743
8744    #[cfg(feature = "data-foundry-service")]
8745    impl std::convert::From<i32> for FieldType {
8746        fn from(value: i32) -> Self {
8747            match value {
8748                0 => Self::Unspecified,
8749                1 => Self::Content,
8750                2 => Self::Text,
8751                3 => Self::Image,
8752                4 => Self::Audio,
8753                _ => Self::UnknownValue(field_type::UnknownValue(
8754                    wkt::internal::UnknownEnumValue::Integer(value),
8755                )),
8756            }
8757        }
8758    }
8759
8760    #[cfg(feature = "data-foundry-service")]
8761    impl std::convert::From<&str> for FieldType {
8762        fn from(value: &str) -> Self {
8763            use std::string::ToString;
8764            match value {
8765                "FIELD_TYPE_UNSPECIFIED" => Self::Unspecified,
8766                "CONTENT" => Self::Content,
8767                "TEXT" => Self::Text,
8768                "IMAGE" => Self::Image,
8769                "AUDIO" => Self::Audio,
8770                _ => Self::UnknownValue(field_type::UnknownValue(
8771                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8772                )),
8773            }
8774        }
8775    }
8776
8777    #[cfg(feature = "data-foundry-service")]
8778    impl serde::ser::Serialize for FieldType {
8779        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8780        where
8781            S: serde::Serializer,
8782        {
8783            match self {
8784                Self::Unspecified => serializer.serialize_i32(0),
8785                Self::Content => serializer.serialize_i32(1),
8786                Self::Text => serializer.serialize_i32(2),
8787                Self::Image => serializer.serialize_i32(3),
8788                Self::Audio => serializer.serialize_i32(4),
8789                Self::UnknownValue(u) => u.0.serialize(serializer),
8790            }
8791        }
8792    }
8793
8794    #[cfg(feature = "data-foundry-service")]
8795    impl<'de> serde::de::Deserialize<'de> for FieldType {
8796        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8797        where
8798            D: serde::Deserializer<'de>,
8799        {
8800            deserializer.deserialize_any(wkt::internal::EnumVisitor::<FieldType>::new(
8801                ".google.cloud.aiplatform.v1.OutputFieldSpec.FieldType",
8802            ))
8803        }
8804    }
8805}
8806
8807/// Defines a generation strategy based on a high-level task description.
8808#[cfg(feature = "data-foundry-service")]
8809#[derive(Clone, Default, PartialEq)]
8810#[non_exhaustive]
8811pub struct TaskDescriptionStrategy {
8812    /// Required. A high-level description of the synthetic data to be generated.
8813    pub task_description: std::string::String,
8814
8815    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8816}
8817
8818#[cfg(feature = "data-foundry-service")]
8819impl TaskDescriptionStrategy {
8820    pub fn new() -> Self {
8821        std::default::Default::default()
8822    }
8823
8824    /// Sets the value of [task_description][crate::model::TaskDescriptionStrategy::task_description].
8825    pub fn set_task_description<T: std::convert::Into<std::string::String>>(
8826        mut self,
8827        v: T,
8828    ) -> Self {
8829        self.task_description = v.into();
8830        self
8831    }
8832}
8833
8834#[cfg(feature = "data-foundry-service")]
8835impl wkt::message::Message for TaskDescriptionStrategy {
8836    fn typename() -> &'static str {
8837        "type.googleapis.com/google.cloud.aiplatform.v1.TaskDescriptionStrategy"
8838    }
8839}
8840
8841/// The response containing the generated data.
8842#[cfg(feature = "data-foundry-service")]
8843#[derive(Clone, Default, PartialEq)]
8844#[non_exhaustive]
8845pub struct GenerateSyntheticDataResponse {
8846    /// A list of generated synthetic examples.
8847    pub synthetic_examples: std::vec::Vec<crate::model::SyntheticExample>,
8848
8849    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8850}
8851
8852#[cfg(feature = "data-foundry-service")]
8853impl GenerateSyntheticDataResponse {
8854    pub fn new() -> Self {
8855        std::default::Default::default()
8856    }
8857
8858    /// Sets the value of [synthetic_examples][crate::model::GenerateSyntheticDataResponse::synthetic_examples].
8859    pub fn set_synthetic_examples<T, V>(mut self, v: T) -> Self
8860    where
8861        T: std::iter::IntoIterator<Item = V>,
8862        V: std::convert::Into<crate::model::SyntheticExample>,
8863    {
8864        use std::iter::Iterator;
8865        self.synthetic_examples = v.into_iter().map(|i| i.into()).collect();
8866        self
8867    }
8868}
8869
8870#[cfg(feature = "data-foundry-service")]
8871impl wkt::message::Message for GenerateSyntheticDataResponse {
8872    fn typename() -> &'static str {
8873        "type.googleapis.com/google.cloud.aiplatform.v1.GenerateSyntheticDataResponse"
8874    }
8875}
8876
8877/// A piece of data in a Dataset. Could be an image, a video, a document or plain
8878/// text.
8879#[cfg(feature = "dataset-service")]
8880#[derive(Clone, Default, PartialEq)]
8881#[non_exhaustive]
8882pub struct DataItem {
8883    /// Output only. The resource name of the DataItem.
8884    pub name: std::string::String,
8885
8886    /// Output only. Timestamp when this DataItem was created.
8887    pub create_time: std::option::Option<wkt::Timestamp>,
8888
8889    /// Output only. Timestamp when this DataItem was last updated.
8890    pub update_time: std::option::Option<wkt::Timestamp>,
8891
8892    /// Optional. The labels with user-defined metadata to organize your DataItems.
8893    ///
8894    /// Label keys and values can be no longer than 64 characters
8895    /// (Unicode codepoints), can only contain lowercase letters, numeric
8896    /// characters, underscores and dashes. International characters are allowed.
8897    /// No more than 64 user labels can be associated with one DataItem(System
8898    /// labels are excluded).
8899    ///
8900    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
8901    /// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
8902    /// and are immutable.
8903    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
8904
8905    /// Required. The data that the DataItem represents (for example, an image or a
8906    /// text snippet). The schema of the payload is stored in the parent Dataset's
8907    /// [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]
8908    /// dataItemSchemaUri field.
8909    ///
8910    /// [google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]: crate::model::Dataset::metadata_schema_uri
8911    pub payload: std::option::Option<wkt::Value>,
8912
8913    /// Optional. Used to perform consistent read-modify-write updates. If not set,
8914    /// a blind "overwrite" update happens.
8915    pub etag: std::string::String,
8916
8917    /// Output only. Reserved for future use.
8918    pub satisfies_pzs: bool,
8919
8920    /// Output only. Reserved for future use.
8921    pub satisfies_pzi: bool,
8922
8923    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8924}
8925
8926#[cfg(feature = "dataset-service")]
8927impl DataItem {
8928    pub fn new() -> Self {
8929        std::default::Default::default()
8930    }
8931
8932    /// Sets the value of [name][crate::model::DataItem::name].
8933    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8934        self.name = v.into();
8935        self
8936    }
8937
8938    /// Sets the value of [create_time][crate::model::DataItem::create_time].
8939    pub fn set_create_time<T>(mut self, v: T) -> Self
8940    where
8941        T: std::convert::Into<wkt::Timestamp>,
8942    {
8943        self.create_time = std::option::Option::Some(v.into());
8944        self
8945    }
8946
8947    /// Sets or clears the value of [create_time][crate::model::DataItem::create_time].
8948    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
8949    where
8950        T: std::convert::Into<wkt::Timestamp>,
8951    {
8952        self.create_time = v.map(|x| x.into());
8953        self
8954    }
8955
8956    /// Sets the value of [update_time][crate::model::DataItem::update_time].
8957    pub fn set_update_time<T>(mut self, v: T) -> Self
8958    where
8959        T: std::convert::Into<wkt::Timestamp>,
8960    {
8961        self.update_time = std::option::Option::Some(v.into());
8962        self
8963    }
8964
8965    /// Sets or clears the value of [update_time][crate::model::DataItem::update_time].
8966    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
8967    where
8968        T: std::convert::Into<wkt::Timestamp>,
8969    {
8970        self.update_time = v.map(|x| x.into());
8971        self
8972    }
8973
8974    /// Sets the value of [labels][crate::model::DataItem::labels].
8975    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
8976    where
8977        T: std::iter::IntoIterator<Item = (K, V)>,
8978        K: std::convert::Into<std::string::String>,
8979        V: std::convert::Into<std::string::String>,
8980    {
8981        use std::iter::Iterator;
8982        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8983        self
8984    }
8985
8986    /// Sets the value of [payload][crate::model::DataItem::payload].
8987    pub fn set_payload<T>(mut self, v: T) -> Self
8988    where
8989        T: std::convert::Into<wkt::Value>,
8990    {
8991        self.payload = std::option::Option::Some(v.into());
8992        self
8993    }
8994
8995    /// Sets or clears the value of [payload][crate::model::DataItem::payload].
8996    pub fn set_or_clear_payload<T>(mut self, v: std::option::Option<T>) -> Self
8997    where
8998        T: std::convert::Into<wkt::Value>,
8999    {
9000        self.payload = v.map(|x| x.into());
9001        self
9002    }
9003
9004    /// Sets the value of [etag][crate::model::DataItem::etag].
9005    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9006        self.etag = v.into();
9007        self
9008    }
9009
9010    /// Sets the value of [satisfies_pzs][crate::model::DataItem::satisfies_pzs].
9011    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9012        self.satisfies_pzs = v.into();
9013        self
9014    }
9015
9016    /// Sets the value of [satisfies_pzi][crate::model::DataItem::satisfies_pzi].
9017    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9018        self.satisfies_pzi = v.into();
9019        self
9020    }
9021}
9022
9023#[cfg(feature = "dataset-service")]
9024impl wkt::message::Message for DataItem {
9025    fn typename() -> &'static str {
9026        "type.googleapis.com/google.cloud.aiplatform.v1.DataItem"
9027    }
9028}
9029
9030/// DataLabelingJob is used to trigger a human labeling job on unlabeled data
9031/// from the following Dataset:
9032#[cfg(feature = "job-service")]
9033#[derive(Clone, Default, PartialEq)]
9034#[non_exhaustive]
9035pub struct DataLabelingJob {
9036    /// Output only. Resource name of the DataLabelingJob.
9037    pub name: std::string::String,
9038
9039    /// Required. The user-defined name of the DataLabelingJob.
9040    /// The name can be up to 128 characters long and can consist of any UTF-8
9041    /// characters.
9042    /// Display name of a DataLabelingJob.
9043    pub display_name: std::string::String,
9044
9045    /// Required. Dataset resource names. Right now we only support labeling from a
9046    /// single Dataset. Format:
9047    /// `projects/{project}/locations/{location}/datasets/{dataset}`
9048    pub datasets: std::vec::Vec<std::string::String>,
9049
9050    /// Labels to assign to annotations generated by this DataLabelingJob.
9051    ///
9052    /// Label keys and values can be no longer than 64 characters
9053    /// (Unicode codepoints), can only contain lowercase letters, numeric
9054    /// characters, underscores and dashes. International characters are allowed.
9055    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
9056    /// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
9057    /// and are immutable.
9058    pub annotation_labels: std::collections::HashMap<std::string::String, std::string::String>,
9059
9060    /// Required. Number of labelers to work on each DataItem.
9061    pub labeler_count: i32,
9062
9063    /// Required. The Google Cloud Storage location of the instruction pdf. This
9064    /// pdf is shared with labelers, and provides detailed description on how to
9065    /// label DataItems in Datasets.
9066    pub instruction_uri: std::string::String,
9067
9068    /// Required. Points to a YAML file stored on Google Cloud Storage describing
9069    /// the config for a specific type of DataLabelingJob. The schema files that
9070    /// can be used here are found in the
9071    /// <https://storage.googleapis.com/google-cloud-aiplatform> bucket in the
9072    /// /schema/datalabelingjob/inputs/ folder.
9073    pub inputs_schema_uri: std::string::String,
9074
9075    /// Required. Input config parameters for the DataLabelingJob.
9076    pub inputs: std::option::Option<wkt::Value>,
9077
9078    /// Output only. The detailed state of the job.
9079    pub state: crate::model::JobState,
9080
9081    /// Output only. Current labeling job progress percentage scaled in interval
9082    /// [0, 100], indicating the percentage of DataItems that has been finished.
9083    pub labeling_progress: i32,
9084
9085    /// Output only. Estimated cost(in US dollars) that the DataLabelingJob has
9086    /// incurred to date.
9087    pub current_spend: std::option::Option<gtype::model::Money>,
9088
9089    /// Output only. Timestamp when this DataLabelingJob was created.
9090    pub create_time: std::option::Option<wkt::Timestamp>,
9091
9092    /// Output only. Timestamp when this DataLabelingJob was updated most recently.
9093    pub update_time: std::option::Option<wkt::Timestamp>,
9094
9095    /// Output only. DataLabelingJob errors. It is only populated when job's state
9096    /// is `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
9097    pub error: std::option::Option<rpc::model::Status>,
9098
9099    /// The labels with user-defined metadata to organize your DataLabelingJobs.
9100    ///
9101    /// Label keys and values can be no longer than 64 characters
9102    /// (Unicode codepoints), can only contain lowercase letters, numeric
9103    /// characters, underscores and dashes. International characters are allowed.
9104    ///
9105    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
9106    /// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
9107    /// and are immutable. Following system labels exist for each DataLabelingJob:
9108    ///
9109    /// * "aiplatform.googleapis.com/schema": output only, its value is the
9110    ///   [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s
9111    ///   title.
9112    ///
9113    /// [google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]: crate::model::DataLabelingJob::inputs_schema_uri
9114    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
9115
9116    /// The SpecialistPools' resource names associated with this job.
9117    pub specialist_pools: std::vec::Vec<std::string::String>,
9118
9119    /// Customer-managed encryption key spec for a DataLabelingJob. If set, this
9120    /// DataLabelingJob will be secured by this key.
9121    ///
9122    /// Note: Annotations created in the DataLabelingJob are associated with
9123    /// the EncryptionSpec of the Dataset they are exported to.
9124    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
9125
9126    /// Parameters that configure the active learning pipeline. Active learning
9127    /// will label the data incrementally via several iterations. For every
9128    /// iteration, it will select a batch of data based on the sampling strategy.
9129    pub active_learning_config: std::option::Option<crate::model::ActiveLearningConfig>,
9130
9131    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9132}
9133
9134#[cfg(feature = "job-service")]
9135impl DataLabelingJob {
9136    pub fn new() -> Self {
9137        std::default::Default::default()
9138    }
9139
9140    /// Sets the value of [name][crate::model::DataLabelingJob::name].
9141    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9142        self.name = v.into();
9143        self
9144    }
9145
9146    /// Sets the value of [display_name][crate::model::DataLabelingJob::display_name].
9147    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9148        self.display_name = v.into();
9149        self
9150    }
9151
9152    /// Sets the value of [datasets][crate::model::DataLabelingJob::datasets].
9153    pub fn set_datasets<T, V>(mut self, v: T) -> Self
9154    where
9155        T: std::iter::IntoIterator<Item = V>,
9156        V: std::convert::Into<std::string::String>,
9157    {
9158        use std::iter::Iterator;
9159        self.datasets = v.into_iter().map(|i| i.into()).collect();
9160        self
9161    }
9162
9163    /// Sets the value of [annotation_labels][crate::model::DataLabelingJob::annotation_labels].
9164    pub fn set_annotation_labels<T, K, V>(mut self, v: T) -> Self
9165    where
9166        T: std::iter::IntoIterator<Item = (K, V)>,
9167        K: std::convert::Into<std::string::String>,
9168        V: std::convert::Into<std::string::String>,
9169    {
9170        use std::iter::Iterator;
9171        self.annotation_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9172        self
9173    }
9174
9175    /// Sets the value of [labeler_count][crate::model::DataLabelingJob::labeler_count].
9176    pub fn set_labeler_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9177        self.labeler_count = v.into();
9178        self
9179    }
9180
9181    /// Sets the value of [instruction_uri][crate::model::DataLabelingJob::instruction_uri].
9182    pub fn set_instruction_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9183        self.instruction_uri = v.into();
9184        self
9185    }
9186
9187    /// Sets the value of [inputs_schema_uri][crate::model::DataLabelingJob::inputs_schema_uri].
9188    pub fn set_inputs_schema_uri<T: std::convert::Into<std::string::String>>(
9189        mut self,
9190        v: T,
9191    ) -> Self {
9192        self.inputs_schema_uri = v.into();
9193        self
9194    }
9195
9196    /// Sets the value of [inputs][crate::model::DataLabelingJob::inputs].
9197    pub fn set_inputs<T>(mut self, v: T) -> Self
9198    where
9199        T: std::convert::Into<wkt::Value>,
9200    {
9201        self.inputs = std::option::Option::Some(v.into());
9202        self
9203    }
9204
9205    /// Sets or clears the value of [inputs][crate::model::DataLabelingJob::inputs].
9206    pub fn set_or_clear_inputs<T>(mut self, v: std::option::Option<T>) -> Self
9207    where
9208        T: std::convert::Into<wkt::Value>,
9209    {
9210        self.inputs = v.map(|x| x.into());
9211        self
9212    }
9213
9214    /// Sets the value of [state][crate::model::DataLabelingJob::state].
9215    pub fn set_state<T: std::convert::Into<crate::model::JobState>>(mut self, v: T) -> Self {
9216        self.state = v.into();
9217        self
9218    }
9219
9220    /// Sets the value of [labeling_progress][crate::model::DataLabelingJob::labeling_progress].
9221    pub fn set_labeling_progress<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9222        self.labeling_progress = v.into();
9223        self
9224    }
9225
9226    /// Sets the value of [current_spend][crate::model::DataLabelingJob::current_spend].
9227    pub fn set_current_spend<T>(mut self, v: T) -> Self
9228    where
9229        T: std::convert::Into<gtype::model::Money>,
9230    {
9231        self.current_spend = std::option::Option::Some(v.into());
9232        self
9233    }
9234
9235    /// Sets or clears the value of [current_spend][crate::model::DataLabelingJob::current_spend].
9236    pub fn set_or_clear_current_spend<T>(mut self, v: std::option::Option<T>) -> Self
9237    where
9238        T: std::convert::Into<gtype::model::Money>,
9239    {
9240        self.current_spend = v.map(|x| x.into());
9241        self
9242    }
9243
9244    /// Sets the value of [create_time][crate::model::DataLabelingJob::create_time].
9245    pub fn set_create_time<T>(mut self, v: T) -> Self
9246    where
9247        T: std::convert::Into<wkt::Timestamp>,
9248    {
9249        self.create_time = std::option::Option::Some(v.into());
9250        self
9251    }
9252
9253    /// Sets or clears the value of [create_time][crate::model::DataLabelingJob::create_time].
9254    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9255    where
9256        T: std::convert::Into<wkt::Timestamp>,
9257    {
9258        self.create_time = v.map(|x| x.into());
9259        self
9260    }
9261
9262    /// Sets the value of [update_time][crate::model::DataLabelingJob::update_time].
9263    pub fn set_update_time<T>(mut self, v: T) -> Self
9264    where
9265        T: std::convert::Into<wkt::Timestamp>,
9266    {
9267        self.update_time = std::option::Option::Some(v.into());
9268        self
9269    }
9270
9271    /// Sets or clears the value of [update_time][crate::model::DataLabelingJob::update_time].
9272    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9273    where
9274        T: std::convert::Into<wkt::Timestamp>,
9275    {
9276        self.update_time = v.map(|x| x.into());
9277        self
9278    }
9279
9280    /// Sets the value of [error][crate::model::DataLabelingJob::error].
9281    pub fn set_error<T>(mut self, v: T) -> Self
9282    where
9283        T: std::convert::Into<rpc::model::Status>,
9284    {
9285        self.error = std::option::Option::Some(v.into());
9286        self
9287    }
9288
9289    /// Sets or clears the value of [error][crate::model::DataLabelingJob::error].
9290    pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
9291    where
9292        T: std::convert::Into<rpc::model::Status>,
9293    {
9294        self.error = v.map(|x| x.into());
9295        self
9296    }
9297
9298    /// Sets the value of [labels][crate::model::DataLabelingJob::labels].
9299    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
9300    where
9301        T: std::iter::IntoIterator<Item = (K, V)>,
9302        K: std::convert::Into<std::string::String>,
9303        V: std::convert::Into<std::string::String>,
9304    {
9305        use std::iter::Iterator;
9306        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9307        self
9308    }
9309
9310    /// Sets the value of [specialist_pools][crate::model::DataLabelingJob::specialist_pools].
9311    pub fn set_specialist_pools<T, V>(mut self, v: T) -> Self
9312    where
9313        T: std::iter::IntoIterator<Item = V>,
9314        V: std::convert::Into<std::string::String>,
9315    {
9316        use std::iter::Iterator;
9317        self.specialist_pools = v.into_iter().map(|i| i.into()).collect();
9318        self
9319    }
9320
9321    /// Sets the value of [encryption_spec][crate::model::DataLabelingJob::encryption_spec].
9322    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
9323    where
9324        T: std::convert::Into<crate::model::EncryptionSpec>,
9325    {
9326        self.encryption_spec = std::option::Option::Some(v.into());
9327        self
9328    }
9329
9330    /// Sets or clears the value of [encryption_spec][crate::model::DataLabelingJob::encryption_spec].
9331    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
9332    where
9333        T: std::convert::Into<crate::model::EncryptionSpec>,
9334    {
9335        self.encryption_spec = v.map(|x| x.into());
9336        self
9337    }
9338
9339    /// Sets the value of [active_learning_config][crate::model::DataLabelingJob::active_learning_config].
9340    pub fn set_active_learning_config<T>(mut self, v: T) -> Self
9341    where
9342        T: std::convert::Into<crate::model::ActiveLearningConfig>,
9343    {
9344        self.active_learning_config = std::option::Option::Some(v.into());
9345        self
9346    }
9347
9348    /// Sets or clears the value of [active_learning_config][crate::model::DataLabelingJob::active_learning_config].
9349    pub fn set_or_clear_active_learning_config<T>(mut self, v: std::option::Option<T>) -> Self
9350    where
9351        T: std::convert::Into<crate::model::ActiveLearningConfig>,
9352    {
9353        self.active_learning_config = v.map(|x| x.into());
9354        self
9355    }
9356}
9357
9358#[cfg(feature = "job-service")]
9359impl wkt::message::Message for DataLabelingJob {
9360    fn typename() -> &'static str {
9361        "type.googleapis.com/google.cloud.aiplatform.v1.DataLabelingJob"
9362    }
9363}
9364
9365/// Parameters that configure the active learning pipeline. Active learning will
9366/// label the data incrementally by several iterations. For every iteration, it
9367/// will select a batch of data based on the sampling strategy.
9368#[cfg(feature = "job-service")]
9369#[derive(Clone, Default, PartialEq)]
9370#[non_exhaustive]
9371pub struct ActiveLearningConfig {
9372    /// Active learning data sampling config. For every active learning labeling
9373    /// iteration, it will select a batch of data based on the sampling strategy.
9374    pub sample_config: std::option::Option<crate::model::SampleConfig>,
9375
9376    /// CMLE training config. For every active learning labeling iteration, system
9377    /// will train a machine learning model on CMLE. The trained model will be used
9378    /// by data sampling algorithm to select DataItems.
9379    pub training_config: std::option::Option<crate::model::TrainingConfig>,
9380
9381    /// Required. Max human labeling DataItems. The rest part will be labeled by
9382    /// machine.
9383    pub human_labeling_budget:
9384        std::option::Option<crate::model::active_learning_config::HumanLabelingBudget>,
9385
9386    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9387}
9388
9389#[cfg(feature = "job-service")]
9390impl ActiveLearningConfig {
9391    pub fn new() -> Self {
9392        std::default::Default::default()
9393    }
9394
9395    /// Sets the value of [sample_config][crate::model::ActiveLearningConfig::sample_config].
9396    pub fn set_sample_config<T>(mut self, v: T) -> Self
9397    where
9398        T: std::convert::Into<crate::model::SampleConfig>,
9399    {
9400        self.sample_config = std::option::Option::Some(v.into());
9401        self
9402    }
9403
9404    /// Sets or clears the value of [sample_config][crate::model::ActiveLearningConfig::sample_config].
9405    pub fn set_or_clear_sample_config<T>(mut self, v: std::option::Option<T>) -> Self
9406    where
9407        T: std::convert::Into<crate::model::SampleConfig>,
9408    {
9409        self.sample_config = v.map(|x| x.into());
9410        self
9411    }
9412
9413    /// Sets the value of [training_config][crate::model::ActiveLearningConfig::training_config].
9414    pub fn set_training_config<T>(mut self, v: T) -> Self
9415    where
9416        T: std::convert::Into<crate::model::TrainingConfig>,
9417    {
9418        self.training_config = std::option::Option::Some(v.into());
9419        self
9420    }
9421
9422    /// Sets or clears the value of [training_config][crate::model::ActiveLearningConfig::training_config].
9423    pub fn set_or_clear_training_config<T>(mut self, v: std::option::Option<T>) -> Self
9424    where
9425        T: std::convert::Into<crate::model::TrainingConfig>,
9426    {
9427        self.training_config = v.map(|x| x.into());
9428        self
9429    }
9430
9431    /// Sets the value of [human_labeling_budget][crate::model::ActiveLearningConfig::human_labeling_budget].
9432    ///
9433    /// Note that all the setters affecting `human_labeling_budget` are mutually
9434    /// exclusive.
9435    pub fn set_human_labeling_budget<
9436        T: std::convert::Into<
9437                std::option::Option<crate::model::active_learning_config::HumanLabelingBudget>,
9438            >,
9439    >(
9440        mut self,
9441        v: T,
9442    ) -> Self {
9443        self.human_labeling_budget = v.into();
9444        self
9445    }
9446
9447    /// The value of [human_labeling_budget][crate::model::ActiveLearningConfig::human_labeling_budget]
9448    /// if it holds a `MaxDataItemCount`, `None` if the field is not set or
9449    /// holds a different branch.
9450    pub fn max_data_item_count(&self) -> std::option::Option<&i64> {
9451        #[allow(unreachable_patterns)]
9452        self.human_labeling_budget.as_ref().and_then(|v| match v {
9453            crate::model::active_learning_config::HumanLabelingBudget::MaxDataItemCount(v) => {
9454                std::option::Option::Some(v)
9455            }
9456            _ => std::option::Option::None,
9457        })
9458    }
9459
9460    /// Sets the value of [human_labeling_budget][crate::model::ActiveLearningConfig::human_labeling_budget]
9461    /// to hold a `MaxDataItemCount`.
9462    ///
9463    /// Note that all the setters affecting `human_labeling_budget` are
9464    /// mutually exclusive.
9465    pub fn set_max_data_item_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9466        self.human_labeling_budget = std::option::Option::Some(
9467            crate::model::active_learning_config::HumanLabelingBudget::MaxDataItemCount(v.into()),
9468        );
9469        self
9470    }
9471
9472    /// The value of [human_labeling_budget][crate::model::ActiveLearningConfig::human_labeling_budget]
9473    /// if it holds a `MaxDataItemPercentage`, `None` if the field is not set or
9474    /// holds a different branch.
9475    pub fn max_data_item_percentage(&self) -> std::option::Option<&i32> {
9476        #[allow(unreachable_patterns)]
9477        self.human_labeling_budget.as_ref().and_then(|v| match v {
9478            crate::model::active_learning_config::HumanLabelingBudget::MaxDataItemPercentage(v) => {
9479                std::option::Option::Some(v)
9480            }
9481            _ => std::option::Option::None,
9482        })
9483    }
9484
9485    /// Sets the value of [human_labeling_budget][crate::model::ActiveLearningConfig::human_labeling_budget]
9486    /// to hold a `MaxDataItemPercentage`.
9487    ///
9488    /// Note that all the setters affecting `human_labeling_budget` are
9489    /// mutually exclusive.
9490    pub fn set_max_data_item_percentage<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9491        self.human_labeling_budget = std::option::Option::Some(
9492            crate::model::active_learning_config::HumanLabelingBudget::MaxDataItemPercentage(
9493                v.into(),
9494            ),
9495        );
9496        self
9497    }
9498}
9499
9500#[cfg(feature = "job-service")]
9501impl wkt::message::Message for ActiveLearningConfig {
9502    fn typename() -> &'static str {
9503        "type.googleapis.com/google.cloud.aiplatform.v1.ActiveLearningConfig"
9504    }
9505}
9506
9507/// Defines additional types related to [ActiveLearningConfig].
9508#[cfg(feature = "job-service")]
9509pub mod active_learning_config {
9510    #[allow(unused_imports)]
9511    use super::*;
9512
9513    /// Required. Max human labeling DataItems. The rest part will be labeled by
9514    /// machine.
9515    #[cfg(feature = "job-service")]
9516    #[derive(Clone, Debug, PartialEq)]
9517    #[non_exhaustive]
9518    pub enum HumanLabelingBudget {
9519        /// Max number of human labeled DataItems.
9520        MaxDataItemCount(i64),
9521        /// Max percent of total DataItems for human labeling.
9522        MaxDataItemPercentage(i32),
9523    }
9524}
9525
9526/// Active learning data sampling config. For every active learning labeling
9527/// iteration, it will select a batch of data based on the sampling strategy.
9528#[cfg(feature = "job-service")]
9529#[derive(Clone, Default, PartialEq)]
9530#[non_exhaustive]
9531pub struct SampleConfig {
9532    /// Field to choose sampling strategy. Sampling strategy will decide which data
9533    /// should be selected for human labeling in every batch.
9534    pub sample_strategy: crate::model::sample_config::SampleStrategy,
9535
9536    /// Decides sample size for the initial batch. initial_batch_sample_percentage
9537    /// is used by default.
9538    pub initial_batch_sample_size:
9539        std::option::Option<crate::model::sample_config::InitialBatchSampleSize>,
9540
9541    /// Decides sample size for the following batches.
9542    /// following_batch_sample_percentage is used by default.
9543    pub following_batch_sample_size:
9544        std::option::Option<crate::model::sample_config::FollowingBatchSampleSize>,
9545
9546    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9547}
9548
9549#[cfg(feature = "job-service")]
9550impl SampleConfig {
9551    pub fn new() -> Self {
9552        std::default::Default::default()
9553    }
9554
9555    /// Sets the value of [sample_strategy][crate::model::SampleConfig::sample_strategy].
9556    pub fn set_sample_strategy<
9557        T: std::convert::Into<crate::model::sample_config::SampleStrategy>,
9558    >(
9559        mut self,
9560        v: T,
9561    ) -> Self {
9562        self.sample_strategy = v.into();
9563        self
9564    }
9565
9566    /// Sets the value of [initial_batch_sample_size][crate::model::SampleConfig::initial_batch_sample_size].
9567    ///
9568    /// Note that all the setters affecting `initial_batch_sample_size` are mutually
9569    /// exclusive.
9570    pub fn set_initial_batch_sample_size<
9571        T: std::convert::Into<
9572                std::option::Option<crate::model::sample_config::InitialBatchSampleSize>,
9573            >,
9574    >(
9575        mut self,
9576        v: T,
9577    ) -> Self {
9578        self.initial_batch_sample_size = v.into();
9579        self
9580    }
9581
9582    /// The value of [initial_batch_sample_size][crate::model::SampleConfig::initial_batch_sample_size]
9583    /// if it holds a `InitialBatchSamplePercentage`, `None` if the field is not set or
9584    /// holds a different branch.
9585    pub fn initial_batch_sample_percentage(&self) -> std::option::Option<&i32> {
9586        #[allow(unreachable_patterns)]
9587        self.initial_batch_sample_size.as_ref().and_then(|v| match v {
9588            crate::model::sample_config::InitialBatchSampleSize::InitialBatchSamplePercentage(v) => std::option::Option::Some(v),
9589            _ => std::option::Option::None,
9590        })
9591    }
9592
9593    /// Sets the value of [initial_batch_sample_size][crate::model::SampleConfig::initial_batch_sample_size]
9594    /// to hold a `InitialBatchSamplePercentage`.
9595    ///
9596    /// Note that all the setters affecting `initial_batch_sample_size` are
9597    /// mutually exclusive.
9598    pub fn set_initial_batch_sample_percentage<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9599        self.initial_batch_sample_size = std::option::Option::Some(
9600            crate::model::sample_config::InitialBatchSampleSize::InitialBatchSamplePercentage(
9601                v.into(),
9602            ),
9603        );
9604        self
9605    }
9606
9607    /// Sets the value of [following_batch_sample_size][crate::model::SampleConfig::following_batch_sample_size].
9608    ///
9609    /// Note that all the setters affecting `following_batch_sample_size` are mutually
9610    /// exclusive.
9611    pub fn set_following_batch_sample_size<
9612        T: std::convert::Into<
9613                std::option::Option<crate::model::sample_config::FollowingBatchSampleSize>,
9614            >,
9615    >(
9616        mut self,
9617        v: T,
9618    ) -> Self {
9619        self.following_batch_sample_size = v.into();
9620        self
9621    }
9622
9623    /// The value of [following_batch_sample_size][crate::model::SampleConfig::following_batch_sample_size]
9624    /// if it holds a `FollowingBatchSamplePercentage`, `None` if the field is not set or
9625    /// holds a different branch.
9626    pub fn following_batch_sample_percentage(&self) -> std::option::Option<&i32> {
9627        #[allow(unreachable_patterns)]
9628        self.following_batch_sample_size.as_ref().and_then(|v| match v {
9629            crate::model::sample_config::FollowingBatchSampleSize::FollowingBatchSamplePercentage(v) => std::option::Option::Some(v),
9630            _ => std::option::Option::None,
9631        })
9632    }
9633
9634    /// Sets the value of [following_batch_sample_size][crate::model::SampleConfig::following_batch_sample_size]
9635    /// to hold a `FollowingBatchSamplePercentage`.
9636    ///
9637    /// Note that all the setters affecting `following_batch_sample_size` are
9638    /// mutually exclusive.
9639    pub fn set_following_batch_sample_percentage<T: std::convert::Into<i32>>(
9640        mut self,
9641        v: T,
9642    ) -> Self {
9643        self.following_batch_sample_size = std::option::Option::Some(
9644            crate::model::sample_config::FollowingBatchSampleSize::FollowingBatchSamplePercentage(
9645                v.into(),
9646            ),
9647        );
9648        self
9649    }
9650}
9651
9652#[cfg(feature = "job-service")]
9653impl wkt::message::Message for SampleConfig {
9654    fn typename() -> &'static str {
9655        "type.googleapis.com/google.cloud.aiplatform.v1.SampleConfig"
9656    }
9657}
9658
9659/// Defines additional types related to [SampleConfig].
9660#[cfg(feature = "job-service")]
9661pub mod sample_config {
9662    #[allow(unused_imports)]
9663    use super::*;
9664
9665    /// Sample strategy decides which subset of DataItems should be selected for
9666    /// human labeling in every batch.
9667    ///
9668    /// # Working with unknown values
9669    ///
9670    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9671    /// additional enum variants at any time. Adding new variants is not considered
9672    /// a breaking change. Applications should write their code in anticipation of:
9673    ///
9674    /// - New values appearing in future releases of the client library, **and**
9675    /// - New values received dynamically, without application changes.
9676    ///
9677    /// Please consult the [Working with enums] section in the user guide for some
9678    /// guidelines.
9679    ///
9680    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9681    #[cfg(feature = "job-service")]
9682    #[derive(Clone, Debug, PartialEq)]
9683    #[non_exhaustive]
9684    pub enum SampleStrategy {
9685        /// Default will be treated as UNCERTAINTY.
9686        Unspecified,
9687        /// Sample the most uncertain data to label.
9688        Uncertainty,
9689        /// If set, the enum was initialized with an unknown value.
9690        ///
9691        /// Applications can examine the value using [SampleStrategy::value] or
9692        /// [SampleStrategy::name].
9693        UnknownValue(sample_strategy::UnknownValue),
9694    }
9695
9696    #[doc(hidden)]
9697    #[cfg(feature = "job-service")]
9698    pub mod sample_strategy {
9699        #[allow(unused_imports)]
9700        use super::*;
9701        #[derive(Clone, Debug, PartialEq)]
9702        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9703    }
9704
9705    #[cfg(feature = "job-service")]
9706    impl SampleStrategy {
9707        /// Gets the enum value.
9708        ///
9709        /// Returns `None` if the enum contains an unknown value deserialized from
9710        /// the string representation of enums.
9711        pub fn value(&self) -> std::option::Option<i32> {
9712            match self {
9713                Self::Unspecified => std::option::Option::Some(0),
9714                Self::Uncertainty => std::option::Option::Some(1),
9715                Self::UnknownValue(u) => u.0.value(),
9716            }
9717        }
9718
9719        /// Gets the enum value as a string.
9720        ///
9721        /// Returns `None` if the enum contains an unknown value deserialized from
9722        /// the integer representation of enums.
9723        pub fn name(&self) -> std::option::Option<&str> {
9724            match self {
9725                Self::Unspecified => std::option::Option::Some("SAMPLE_STRATEGY_UNSPECIFIED"),
9726                Self::Uncertainty => std::option::Option::Some("UNCERTAINTY"),
9727                Self::UnknownValue(u) => u.0.name(),
9728            }
9729        }
9730    }
9731
9732    #[cfg(feature = "job-service")]
9733    impl std::default::Default for SampleStrategy {
9734        fn default() -> Self {
9735            use std::convert::From;
9736            Self::from(0)
9737        }
9738    }
9739
9740    #[cfg(feature = "job-service")]
9741    impl std::fmt::Display for SampleStrategy {
9742        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9743            wkt::internal::display_enum(f, self.name(), self.value())
9744        }
9745    }
9746
9747    #[cfg(feature = "job-service")]
9748    impl std::convert::From<i32> for SampleStrategy {
9749        fn from(value: i32) -> Self {
9750            match value {
9751                0 => Self::Unspecified,
9752                1 => Self::Uncertainty,
9753                _ => Self::UnknownValue(sample_strategy::UnknownValue(
9754                    wkt::internal::UnknownEnumValue::Integer(value),
9755                )),
9756            }
9757        }
9758    }
9759
9760    #[cfg(feature = "job-service")]
9761    impl std::convert::From<&str> for SampleStrategy {
9762        fn from(value: &str) -> Self {
9763            use std::string::ToString;
9764            match value {
9765                "SAMPLE_STRATEGY_UNSPECIFIED" => Self::Unspecified,
9766                "UNCERTAINTY" => Self::Uncertainty,
9767                _ => Self::UnknownValue(sample_strategy::UnknownValue(
9768                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9769                )),
9770            }
9771        }
9772    }
9773
9774    #[cfg(feature = "job-service")]
9775    impl serde::ser::Serialize for SampleStrategy {
9776        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9777        where
9778            S: serde::Serializer,
9779        {
9780            match self {
9781                Self::Unspecified => serializer.serialize_i32(0),
9782                Self::Uncertainty => serializer.serialize_i32(1),
9783                Self::UnknownValue(u) => u.0.serialize(serializer),
9784            }
9785        }
9786    }
9787
9788    #[cfg(feature = "job-service")]
9789    impl<'de> serde::de::Deserialize<'de> for SampleStrategy {
9790        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9791        where
9792            D: serde::Deserializer<'de>,
9793        {
9794            deserializer.deserialize_any(wkt::internal::EnumVisitor::<SampleStrategy>::new(
9795                ".google.cloud.aiplatform.v1.SampleConfig.SampleStrategy",
9796            ))
9797        }
9798    }
9799
9800    /// Decides sample size for the initial batch. initial_batch_sample_percentage
9801    /// is used by default.
9802    #[cfg(feature = "job-service")]
9803    #[derive(Clone, Debug, PartialEq)]
9804    #[non_exhaustive]
9805    pub enum InitialBatchSampleSize {
9806        /// The percentage of data needed to be labeled in the first batch.
9807        InitialBatchSamplePercentage(i32),
9808    }
9809
9810    /// Decides sample size for the following batches.
9811    /// following_batch_sample_percentage is used by default.
9812    #[cfg(feature = "job-service")]
9813    #[derive(Clone, Debug, PartialEq)]
9814    #[non_exhaustive]
9815    pub enum FollowingBatchSampleSize {
9816        /// The percentage of data needed to be labeled in each following batch
9817        /// (except the first batch).
9818        FollowingBatchSamplePercentage(i32),
9819    }
9820}
9821
9822/// CMLE training config. For every active learning labeling iteration, system
9823/// will train a machine learning model on CMLE. The trained model will be used
9824/// by data sampling algorithm to select DataItems.
9825#[cfg(feature = "job-service")]
9826#[derive(Clone, Default, PartialEq)]
9827#[non_exhaustive]
9828pub struct TrainingConfig {
9829    /// The timeout hours for the CMLE training job, expressed in milli hours
9830    /// i.e. 1,000 value in this field means 1 hour.
9831    pub timeout_training_milli_hours: i64,
9832
9833    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9834}
9835
9836#[cfg(feature = "job-service")]
9837impl TrainingConfig {
9838    pub fn new() -> Self {
9839        std::default::Default::default()
9840    }
9841
9842    /// Sets the value of [timeout_training_milli_hours][crate::model::TrainingConfig::timeout_training_milli_hours].
9843    pub fn set_timeout_training_milli_hours<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9844        self.timeout_training_milli_hours = v.into();
9845        self
9846    }
9847}
9848
9849#[cfg(feature = "job-service")]
9850impl wkt::message::Message for TrainingConfig {
9851    fn typename() -> &'static str {
9852        "type.googleapis.com/google.cloud.aiplatform.v1.TrainingConfig"
9853    }
9854}
9855
9856/// A collection of DataItems and Annotations on them.
9857#[cfg(feature = "dataset-service")]
9858#[derive(Clone, Default, PartialEq)]
9859#[non_exhaustive]
9860pub struct Dataset {
9861    /// Output only. Identifier. The resource name of the Dataset.
9862    pub name: std::string::String,
9863
9864    /// Required. The user-defined name of the Dataset.
9865    /// The name can be up to 128 characters long and can consist of any UTF-8
9866    /// characters.
9867    pub display_name: std::string::String,
9868
9869    /// The description of the Dataset.
9870    pub description: std::string::String,
9871
9872    /// Required. Points to a YAML file stored on Google Cloud Storage describing
9873    /// additional information about the Dataset. The schema is defined as an
9874    /// OpenAPI 3.0.2 Schema Object. The schema files that can be used here are
9875    /// found in gs://google-cloud-aiplatform/schema/dataset/metadata/.
9876    pub metadata_schema_uri: std::string::String,
9877
9878    /// Required. Additional information about the Dataset.
9879    pub metadata: std::option::Option<wkt::Value>,
9880
9881    /// Output only. The number of DataItems in this Dataset. Only apply for
9882    /// non-structured Dataset.
9883    pub data_item_count: i64,
9884
9885    /// Output only. Timestamp when this Dataset was created.
9886    pub create_time: std::option::Option<wkt::Timestamp>,
9887
9888    /// Output only. Timestamp when this Dataset was last updated.
9889    pub update_time: std::option::Option<wkt::Timestamp>,
9890
9891    /// Used to perform consistent read-modify-write updates. If not set, a blind
9892    /// "overwrite" update happens.
9893    pub etag: std::string::String,
9894
9895    /// The labels with user-defined metadata to organize your Datasets.
9896    ///
9897    /// Label keys and values can be no longer than 64 characters
9898    /// (Unicode codepoints), can only contain lowercase letters, numeric
9899    /// characters, underscores and dashes. International characters are allowed.
9900    /// No more than 64 user labels can be associated with one Dataset (System
9901    /// labels are excluded).
9902    ///
9903    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
9904    /// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
9905    /// and are immutable. Following system labels exist for each Dataset:
9906    ///
9907    /// * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
9908    ///   value is the
9909    ///   [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]
9910    ///   title.
9911    ///
9912    /// [google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]: crate::model::Dataset::metadata_schema_uri
9913    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
9914
9915    /// All SavedQueries belong to the Dataset will be returned in List/Get
9916    /// Dataset response. The annotation_specs field
9917    /// will not be populated except for UI cases which will only use
9918    /// [annotation_spec_count][google.cloud.aiplatform.v1.SavedQuery.annotation_spec_count].
9919    /// In CreateDataset request, a SavedQuery is created together if
9920    /// this field is set, up to one SavedQuery can be set in CreateDatasetRequest.
9921    /// The SavedQuery should not contain any AnnotationSpec.
9922    ///
9923    /// [google.cloud.aiplatform.v1.SavedQuery.annotation_spec_count]: crate::model::SavedQuery::annotation_spec_count
9924    pub saved_queries: std::vec::Vec<crate::model::SavedQuery>,
9925
9926    /// Customer-managed encryption key spec for a Dataset. If set, this Dataset
9927    /// and all sub-resources of this Dataset will be secured by this key.
9928    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
9929
9930    /// Output only. The resource name of the Artifact that was created in
9931    /// MetadataStore when creating the Dataset. The Artifact resource name pattern
9932    /// is
9933    /// `projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}`.
9934    pub metadata_artifact: std::string::String,
9935
9936    /// Optional. Reference to the public base model last used by the dataset. Only
9937    /// set for prompt datasets.
9938    pub model_reference: std::string::String,
9939
9940    /// Output only. Reserved for future use.
9941    pub satisfies_pzs: bool,
9942
9943    /// Output only. Reserved for future use.
9944    pub satisfies_pzi: bool,
9945
9946    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9947}
9948
9949#[cfg(feature = "dataset-service")]
9950impl Dataset {
9951    pub fn new() -> Self {
9952        std::default::Default::default()
9953    }
9954
9955    /// Sets the value of [name][crate::model::Dataset::name].
9956    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9957        self.name = v.into();
9958        self
9959    }
9960
9961    /// Sets the value of [display_name][crate::model::Dataset::display_name].
9962    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9963        self.display_name = v.into();
9964        self
9965    }
9966
9967    /// Sets the value of [description][crate::model::Dataset::description].
9968    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9969        self.description = v.into();
9970        self
9971    }
9972
9973    /// Sets the value of [metadata_schema_uri][crate::model::Dataset::metadata_schema_uri].
9974    pub fn set_metadata_schema_uri<T: std::convert::Into<std::string::String>>(
9975        mut self,
9976        v: T,
9977    ) -> Self {
9978        self.metadata_schema_uri = v.into();
9979        self
9980    }
9981
9982    /// Sets the value of [metadata][crate::model::Dataset::metadata].
9983    pub fn set_metadata<T>(mut self, v: T) -> Self
9984    where
9985        T: std::convert::Into<wkt::Value>,
9986    {
9987        self.metadata = std::option::Option::Some(v.into());
9988        self
9989    }
9990
9991    /// Sets or clears the value of [metadata][crate::model::Dataset::metadata].
9992    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
9993    where
9994        T: std::convert::Into<wkt::Value>,
9995    {
9996        self.metadata = v.map(|x| x.into());
9997        self
9998    }
9999
10000    /// Sets the value of [data_item_count][crate::model::Dataset::data_item_count].
10001    pub fn set_data_item_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10002        self.data_item_count = v.into();
10003        self
10004    }
10005
10006    /// Sets the value of [create_time][crate::model::Dataset::create_time].
10007    pub fn set_create_time<T>(mut self, v: T) -> Self
10008    where
10009        T: std::convert::Into<wkt::Timestamp>,
10010    {
10011        self.create_time = std::option::Option::Some(v.into());
10012        self
10013    }
10014
10015    /// Sets or clears the value of [create_time][crate::model::Dataset::create_time].
10016    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10017    where
10018        T: std::convert::Into<wkt::Timestamp>,
10019    {
10020        self.create_time = v.map(|x| x.into());
10021        self
10022    }
10023
10024    /// Sets the value of [update_time][crate::model::Dataset::update_time].
10025    pub fn set_update_time<T>(mut self, v: T) -> Self
10026    where
10027        T: std::convert::Into<wkt::Timestamp>,
10028    {
10029        self.update_time = std::option::Option::Some(v.into());
10030        self
10031    }
10032
10033    /// Sets or clears the value of [update_time][crate::model::Dataset::update_time].
10034    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
10035    where
10036        T: std::convert::Into<wkt::Timestamp>,
10037    {
10038        self.update_time = v.map(|x| x.into());
10039        self
10040    }
10041
10042    /// Sets the value of [etag][crate::model::Dataset::etag].
10043    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10044        self.etag = v.into();
10045        self
10046    }
10047
10048    /// Sets the value of [labels][crate::model::Dataset::labels].
10049    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
10050    where
10051        T: std::iter::IntoIterator<Item = (K, V)>,
10052        K: std::convert::Into<std::string::String>,
10053        V: std::convert::Into<std::string::String>,
10054    {
10055        use std::iter::Iterator;
10056        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
10057        self
10058    }
10059
10060    /// Sets the value of [saved_queries][crate::model::Dataset::saved_queries].
10061    pub fn set_saved_queries<T, V>(mut self, v: T) -> Self
10062    where
10063        T: std::iter::IntoIterator<Item = V>,
10064        V: std::convert::Into<crate::model::SavedQuery>,
10065    {
10066        use std::iter::Iterator;
10067        self.saved_queries = v.into_iter().map(|i| i.into()).collect();
10068        self
10069    }
10070
10071    /// Sets the value of [encryption_spec][crate::model::Dataset::encryption_spec].
10072    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
10073    where
10074        T: std::convert::Into<crate::model::EncryptionSpec>,
10075    {
10076        self.encryption_spec = std::option::Option::Some(v.into());
10077        self
10078    }
10079
10080    /// Sets or clears the value of [encryption_spec][crate::model::Dataset::encryption_spec].
10081    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
10082    where
10083        T: std::convert::Into<crate::model::EncryptionSpec>,
10084    {
10085        self.encryption_spec = v.map(|x| x.into());
10086        self
10087    }
10088
10089    /// Sets the value of [metadata_artifact][crate::model::Dataset::metadata_artifact].
10090    pub fn set_metadata_artifact<T: std::convert::Into<std::string::String>>(
10091        mut self,
10092        v: T,
10093    ) -> Self {
10094        self.metadata_artifact = v.into();
10095        self
10096    }
10097
10098    /// Sets the value of [model_reference][crate::model::Dataset::model_reference].
10099    pub fn set_model_reference<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10100        self.model_reference = v.into();
10101        self
10102    }
10103
10104    /// Sets the value of [satisfies_pzs][crate::model::Dataset::satisfies_pzs].
10105    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10106        self.satisfies_pzs = v.into();
10107        self
10108    }
10109
10110    /// Sets the value of [satisfies_pzi][crate::model::Dataset::satisfies_pzi].
10111    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10112        self.satisfies_pzi = v.into();
10113        self
10114    }
10115}
10116
10117#[cfg(feature = "dataset-service")]
10118impl wkt::message::Message for Dataset {
10119    fn typename() -> &'static str {
10120        "type.googleapis.com/google.cloud.aiplatform.v1.Dataset"
10121    }
10122}
10123
10124/// Describes the location from where we import data into a Dataset, together
10125/// with the labels that will be applied to the DataItems and the Annotations.
10126#[cfg(feature = "dataset-service")]
10127#[derive(Clone, Default, PartialEq)]
10128#[non_exhaustive]
10129pub struct ImportDataConfig {
10130    /// Labels that will be applied to newly imported DataItems. If an identical
10131    /// DataItem as one being imported already exists in the Dataset, then these
10132    /// labels will be appended to these of the already existing one, and if labels
10133    /// with identical key is imported before, the old label value will be
10134    /// overwritten. If two DataItems are identical in the same import data
10135    /// operation, the labels will be combined and if key collision happens in this
10136    /// case, one of the values will be picked randomly. Two DataItems are
10137    /// considered identical if their content bytes are identical (e.g. image bytes
10138    /// or pdf bytes).
10139    /// These labels will be overridden by Annotation labels specified inside index
10140    /// file referenced by
10141    /// [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri],
10142    /// e.g. jsonl file.
10143    ///
10144    /// [google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri]: crate::model::ImportDataConfig::import_schema_uri
10145    pub data_item_labels: std::collections::HashMap<std::string::String, std::string::String>,
10146
10147    /// Labels that will be applied to newly imported Annotations. If two
10148    /// Annotations are identical, one of them will be deduped. Two Annotations are
10149    /// considered identical if their
10150    /// [payload][google.cloud.aiplatform.v1.Annotation.payload],
10151    /// [payload_schema_uri][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]
10152    /// and all of their [labels][google.cloud.aiplatform.v1.Annotation.labels] are
10153    /// the same. These labels will be overridden by Annotation labels specified
10154    /// inside index file referenced by
10155    /// [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri],
10156    /// e.g. jsonl file.
10157    ///
10158    /// [google.cloud.aiplatform.v1.Annotation.labels]: crate::model::Annotation::labels
10159    /// [google.cloud.aiplatform.v1.Annotation.payload]: crate::model::Annotation::payload
10160    /// [google.cloud.aiplatform.v1.Annotation.payload_schema_uri]: crate::model::Annotation::payload_schema_uri
10161    /// [google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri]: crate::model::ImportDataConfig::import_schema_uri
10162    pub annotation_labels: std::collections::HashMap<std::string::String, std::string::String>,
10163
10164    /// Required. Points to a YAML file stored on Google Cloud Storage describing
10165    /// the import format. Validation will be done against the schema. The schema
10166    /// is defined as an [OpenAPI 3.0.2 Schema
10167    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
10168    pub import_schema_uri: std::string::String,
10169
10170    /// The source of the input.
10171    pub source: std::option::Option<crate::model::import_data_config::Source>,
10172
10173    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10174}
10175
10176#[cfg(feature = "dataset-service")]
10177impl ImportDataConfig {
10178    pub fn new() -> Self {
10179        std::default::Default::default()
10180    }
10181
10182    /// Sets the value of [data_item_labels][crate::model::ImportDataConfig::data_item_labels].
10183    pub fn set_data_item_labels<T, K, V>(mut self, v: T) -> Self
10184    where
10185        T: std::iter::IntoIterator<Item = (K, V)>,
10186        K: std::convert::Into<std::string::String>,
10187        V: std::convert::Into<std::string::String>,
10188    {
10189        use std::iter::Iterator;
10190        self.data_item_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
10191        self
10192    }
10193
10194    /// Sets the value of [annotation_labels][crate::model::ImportDataConfig::annotation_labels].
10195    pub fn set_annotation_labels<T, K, V>(mut self, v: T) -> Self
10196    where
10197        T: std::iter::IntoIterator<Item = (K, V)>,
10198        K: std::convert::Into<std::string::String>,
10199        V: std::convert::Into<std::string::String>,
10200    {
10201        use std::iter::Iterator;
10202        self.annotation_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
10203        self
10204    }
10205
10206    /// Sets the value of [import_schema_uri][crate::model::ImportDataConfig::import_schema_uri].
10207    pub fn set_import_schema_uri<T: std::convert::Into<std::string::String>>(
10208        mut self,
10209        v: T,
10210    ) -> Self {
10211        self.import_schema_uri = v.into();
10212        self
10213    }
10214
10215    /// Sets the value of [source][crate::model::ImportDataConfig::source].
10216    ///
10217    /// Note that all the setters affecting `source` are mutually
10218    /// exclusive.
10219    pub fn set_source<
10220        T: std::convert::Into<std::option::Option<crate::model::import_data_config::Source>>,
10221    >(
10222        mut self,
10223        v: T,
10224    ) -> Self {
10225        self.source = v.into();
10226        self
10227    }
10228
10229    /// The value of [source][crate::model::ImportDataConfig::source]
10230    /// if it holds a `GcsSource`, `None` if the field is not set or
10231    /// holds a different branch.
10232    pub fn gcs_source(&self) -> std::option::Option<&std::boxed::Box<crate::model::GcsSource>> {
10233        #[allow(unreachable_patterns)]
10234        self.source.as_ref().and_then(|v| match v {
10235            crate::model::import_data_config::Source::GcsSource(v) => std::option::Option::Some(v),
10236            _ => std::option::Option::None,
10237        })
10238    }
10239
10240    /// Sets the value of [source][crate::model::ImportDataConfig::source]
10241    /// to hold a `GcsSource`.
10242    ///
10243    /// Note that all the setters affecting `source` are
10244    /// mutually exclusive.
10245    pub fn set_gcs_source<T: std::convert::Into<std::boxed::Box<crate::model::GcsSource>>>(
10246        mut self,
10247        v: T,
10248    ) -> Self {
10249        self.source = std::option::Option::Some(
10250            crate::model::import_data_config::Source::GcsSource(v.into()),
10251        );
10252        self
10253    }
10254}
10255
10256#[cfg(feature = "dataset-service")]
10257impl wkt::message::Message for ImportDataConfig {
10258    fn typename() -> &'static str {
10259        "type.googleapis.com/google.cloud.aiplatform.v1.ImportDataConfig"
10260    }
10261}
10262
10263/// Defines additional types related to [ImportDataConfig].
10264#[cfg(feature = "dataset-service")]
10265pub mod import_data_config {
10266    #[allow(unused_imports)]
10267    use super::*;
10268
10269    /// The source of the input.
10270    #[cfg(feature = "dataset-service")]
10271    #[derive(Clone, Debug, PartialEq)]
10272    #[non_exhaustive]
10273    pub enum Source {
10274        /// The Google Cloud Storage location for the input content.
10275        GcsSource(std::boxed::Box<crate::model::GcsSource>),
10276    }
10277}
10278
10279/// Describes what part of the Dataset is to be exported, the destination of
10280/// the export and how to export.
10281#[cfg(feature = "dataset-service")]
10282#[derive(Clone, Default, PartialEq)]
10283#[non_exhaustive]
10284pub struct ExportDataConfig {
10285    /// An expression for filtering what part of the Dataset is to be exported.
10286    /// Only Annotations that match this filter will be exported. The filter syntax
10287    /// is the same as in
10288    /// [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
10289    ///
10290    /// [google.cloud.aiplatform.v1.DatasetService.ListAnnotations]: crate::client::DatasetService::list_annotations
10291    pub annotations_filter: std::string::String,
10292
10293    /// The ID of a SavedQuery (annotation set) under the Dataset specified by
10294    /// [ExportDataRequest.name][google.cloud.aiplatform.v1.ExportDataRequest.name]
10295    /// used for filtering Annotations for training.
10296    ///
10297    /// Only used for custom training data export use cases.
10298    /// Only applicable to Datasets that have SavedQueries.
10299    ///
10300    /// Only Annotations that are associated with this SavedQuery are used in
10301    /// respectively training. When used in conjunction with
10302    /// [annotations_filter][google.cloud.aiplatform.v1.ExportDataConfig.annotations_filter],
10303    /// the Annotations used for training are filtered by both
10304    /// [saved_query_id][google.cloud.aiplatform.v1.ExportDataConfig.saved_query_id]
10305    /// and
10306    /// [annotations_filter][google.cloud.aiplatform.v1.ExportDataConfig.annotations_filter].
10307    ///
10308    /// Only one of
10309    /// [saved_query_id][google.cloud.aiplatform.v1.ExportDataConfig.saved_query_id]
10310    /// and
10311    /// [annotation_schema_uri][google.cloud.aiplatform.v1.ExportDataConfig.annotation_schema_uri]
10312    /// should be specified as both of them represent the same thing: problem type.
10313    ///
10314    /// [google.cloud.aiplatform.v1.ExportDataConfig.annotation_schema_uri]: crate::model::ExportDataConfig::annotation_schema_uri
10315    /// [google.cloud.aiplatform.v1.ExportDataConfig.annotations_filter]: crate::model::ExportDataConfig::annotations_filter
10316    /// [google.cloud.aiplatform.v1.ExportDataConfig.saved_query_id]: crate::model::ExportDataConfig::saved_query_id
10317    /// [google.cloud.aiplatform.v1.ExportDataRequest.name]: crate::model::ExportDataRequest::name
10318    pub saved_query_id: std::string::String,
10319
10320    /// The Cloud Storage URI that points to a YAML file describing the annotation
10321    /// schema. The schema is defined as an OpenAPI 3.0.2 [Schema
10322    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
10323    /// The schema files that can be used here are found in
10324    /// gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the
10325    /// chosen schema must be consistent with
10326    /// [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] of the
10327    /// Dataset specified by
10328    /// [ExportDataRequest.name][google.cloud.aiplatform.v1.ExportDataRequest.name].
10329    ///
10330    /// Only used for custom training data export use cases.
10331    /// Only applicable to Datasets that have DataItems and Annotations.
10332    ///
10333    /// Only Annotations that both match this schema and belong to DataItems not
10334    /// ignored by the split method are used in respectively training, validation
10335    /// or test role, depending on the role of the DataItem they are on.
10336    ///
10337    /// When used in conjunction with
10338    /// [annotations_filter][google.cloud.aiplatform.v1.ExportDataConfig.annotations_filter],
10339    /// the Annotations used for training are filtered by both
10340    /// [annotations_filter][google.cloud.aiplatform.v1.ExportDataConfig.annotations_filter]
10341    /// and
10342    /// [annotation_schema_uri][google.cloud.aiplatform.v1.ExportDataConfig.annotation_schema_uri].
10343    ///
10344    /// [google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]: crate::model::Dataset::metadata_schema_uri
10345    /// [google.cloud.aiplatform.v1.ExportDataConfig.annotation_schema_uri]: crate::model::ExportDataConfig::annotation_schema_uri
10346    /// [google.cloud.aiplatform.v1.ExportDataConfig.annotations_filter]: crate::model::ExportDataConfig::annotations_filter
10347    /// [google.cloud.aiplatform.v1.ExportDataRequest.name]: crate::model::ExportDataRequest::name
10348    pub annotation_schema_uri: std::string::String,
10349
10350    /// Indicates the usage of the exported files.
10351    pub export_use: crate::model::export_data_config::ExportUse,
10352
10353    /// The destination of the output.
10354    pub destination: std::option::Option<crate::model::export_data_config::Destination>,
10355
10356    /// The instructions how the export data should be split between the
10357    /// training, validation and test sets.
10358    pub split: std::option::Option<crate::model::export_data_config::Split>,
10359
10360    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10361}
10362
10363#[cfg(feature = "dataset-service")]
10364impl ExportDataConfig {
10365    pub fn new() -> Self {
10366        std::default::Default::default()
10367    }
10368
10369    /// Sets the value of [annotations_filter][crate::model::ExportDataConfig::annotations_filter].
10370    pub fn set_annotations_filter<T: std::convert::Into<std::string::String>>(
10371        mut self,
10372        v: T,
10373    ) -> Self {
10374        self.annotations_filter = v.into();
10375        self
10376    }
10377
10378    /// Sets the value of [saved_query_id][crate::model::ExportDataConfig::saved_query_id].
10379    pub fn set_saved_query_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10380        self.saved_query_id = v.into();
10381        self
10382    }
10383
10384    /// Sets the value of [annotation_schema_uri][crate::model::ExportDataConfig::annotation_schema_uri].
10385    pub fn set_annotation_schema_uri<T: std::convert::Into<std::string::String>>(
10386        mut self,
10387        v: T,
10388    ) -> Self {
10389        self.annotation_schema_uri = v.into();
10390        self
10391    }
10392
10393    /// Sets the value of [export_use][crate::model::ExportDataConfig::export_use].
10394    pub fn set_export_use<T: std::convert::Into<crate::model::export_data_config::ExportUse>>(
10395        mut self,
10396        v: T,
10397    ) -> Self {
10398        self.export_use = v.into();
10399        self
10400    }
10401
10402    /// Sets the value of [destination][crate::model::ExportDataConfig::destination].
10403    ///
10404    /// Note that all the setters affecting `destination` are mutually
10405    /// exclusive.
10406    pub fn set_destination<
10407        T: std::convert::Into<std::option::Option<crate::model::export_data_config::Destination>>,
10408    >(
10409        mut self,
10410        v: T,
10411    ) -> Self {
10412        self.destination = v.into();
10413        self
10414    }
10415
10416    /// The value of [destination][crate::model::ExportDataConfig::destination]
10417    /// if it holds a `GcsDestination`, `None` if the field is not set or
10418    /// holds a different branch.
10419    pub fn gcs_destination(
10420        &self,
10421    ) -> std::option::Option<&std::boxed::Box<crate::model::GcsDestination>> {
10422        #[allow(unreachable_patterns)]
10423        self.destination.as_ref().and_then(|v| match v {
10424            crate::model::export_data_config::Destination::GcsDestination(v) => {
10425                std::option::Option::Some(v)
10426            }
10427            _ => std::option::Option::None,
10428        })
10429    }
10430
10431    /// Sets the value of [destination][crate::model::ExportDataConfig::destination]
10432    /// to hold a `GcsDestination`.
10433    ///
10434    /// Note that all the setters affecting `destination` are
10435    /// mutually exclusive.
10436    pub fn set_gcs_destination<
10437        T: std::convert::Into<std::boxed::Box<crate::model::GcsDestination>>,
10438    >(
10439        mut self,
10440        v: T,
10441    ) -> Self {
10442        self.destination = std::option::Option::Some(
10443            crate::model::export_data_config::Destination::GcsDestination(v.into()),
10444        );
10445        self
10446    }
10447
10448    /// Sets the value of [split][crate::model::ExportDataConfig::split].
10449    ///
10450    /// Note that all the setters affecting `split` are mutually
10451    /// exclusive.
10452    pub fn set_split<
10453        T: std::convert::Into<std::option::Option<crate::model::export_data_config::Split>>,
10454    >(
10455        mut self,
10456        v: T,
10457    ) -> Self {
10458        self.split = v.into();
10459        self
10460    }
10461
10462    /// The value of [split][crate::model::ExportDataConfig::split]
10463    /// if it holds a `FractionSplit`, `None` if the field is not set or
10464    /// holds a different branch.
10465    pub fn fraction_split(
10466        &self,
10467    ) -> std::option::Option<&std::boxed::Box<crate::model::ExportFractionSplit>> {
10468        #[allow(unreachable_patterns)]
10469        self.split.as_ref().and_then(|v| match v {
10470            crate::model::export_data_config::Split::FractionSplit(v) => {
10471                std::option::Option::Some(v)
10472            }
10473            _ => std::option::Option::None,
10474        })
10475    }
10476
10477    /// Sets the value of [split][crate::model::ExportDataConfig::split]
10478    /// to hold a `FractionSplit`.
10479    ///
10480    /// Note that all the setters affecting `split` are
10481    /// mutually exclusive.
10482    pub fn set_fraction_split<
10483        T: std::convert::Into<std::boxed::Box<crate::model::ExportFractionSplit>>,
10484    >(
10485        mut self,
10486        v: T,
10487    ) -> Self {
10488        self.split = std::option::Option::Some(
10489            crate::model::export_data_config::Split::FractionSplit(v.into()),
10490        );
10491        self
10492    }
10493
10494    /// The value of [split][crate::model::ExportDataConfig::split]
10495    /// if it holds a `FilterSplit`, `None` if the field is not set or
10496    /// holds a different branch.
10497    pub fn filter_split(
10498        &self,
10499    ) -> std::option::Option<&std::boxed::Box<crate::model::ExportFilterSplit>> {
10500        #[allow(unreachable_patterns)]
10501        self.split.as_ref().and_then(|v| match v {
10502            crate::model::export_data_config::Split::FilterSplit(v) => std::option::Option::Some(v),
10503            _ => std::option::Option::None,
10504        })
10505    }
10506
10507    /// Sets the value of [split][crate::model::ExportDataConfig::split]
10508    /// to hold a `FilterSplit`.
10509    ///
10510    /// Note that all the setters affecting `split` are
10511    /// mutually exclusive.
10512    pub fn set_filter_split<
10513        T: std::convert::Into<std::boxed::Box<crate::model::ExportFilterSplit>>,
10514    >(
10515        mut self,
10516        v: T,
10517    ) -> Self {
10518        self.split = std::option::Option::Some(
10519            crate::model::export_data_config::Split::FilterSplit(v.into()),
10520        );
10521        self
10522    }
10523}
10524
10525#[cfg(feature = "dataset-service")]
10526impl wkt::message::Message for ExportDataConfig {
10527    fn typename() -> &'static str {
10528        "type.googleapis.com/google.cloud.aiplatform.v1.ExportDataConfig"
10529    }
10530}
10531
10532/// Defines additional types related to [ExportDataConfig].
10533#[cfg(feature = "dataset-service")]
10534pub mod export_data_config {
10535    #[allow(unused_imports)]
10536    use super::*;
10537
10538    /// ExportUse indicates the usage of the exported files. It restricts file
10539    /// destination, format, annotations to be exported, whether to allow
10540    /// unannotated data to be exported and whether to clone files to temp Cloud
10541    /// Storage bucket.
10542    ///
10543    /// # Working with unknown values
10544    ///
10545    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10546    /// additional enum variants at any time. Adding new variants is not considered
10547    /// a breaking change. Applications should write their code in anticipation of:
10548    ///
10549    /// - New values appearing in future releases of the client library, **and**
10550    /// - New values received dynamically, without application changes.
10551    ///
10552    /// Please consult the [Working with enums] section in the user guide for some
10553    /// guidelines.
10554    ///
10555    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10556    #[cfg(feature = "dataset-service")]
10557    #[derive(Clone, Debug, PartialEq)]
10558    #[non_exhaustive]
10559    pub enum ExportUse {
10560        /// Regular user export.
10561        Unspecified,
10562        /// Export for custom code training.
10563        CustomCodeTraining,
10564        /// If set, the enum was initialized with an unknown value.
10565        ///
10566        /// Applications can examine the value using [ExportUse::value] or
10567        /// [ExportUse::name].
10568        UnknownValue(export_use::UnknownValue),
10569    }
10570
10571    #[doc(hidden)]
10572    #[cfg(feature = "dataset-service")]
10573    pub mod export_use {
10574        #[allow(unused_imports)]
10575        use super::*;
10576        #[derive(Clone, Debug, PartialEq)]
10577        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10578    }
10579
10580    #[cfg(feature = "dataset-service")]
10581    impl ExportUse {
10582        /// Gets the enum value.
10583        ///
10584        /// Returns `None` if the enum contains an unknown value deserialized from
10585        /// the string representation of enums.
10586        pub fn value(&self) -> std::option::Option<i32> {
10587            match self {
10588                Self::Unspecified => std::option::Option::Some(0),
10589                Self::CustomCodeTraining => std::option::Option::Some(6),
10590                Self::UnknownValue(u) => u.0.value(),
10591            }
10592        }
10593
10594        /// Gets the enum value as a string.
10595        ///
10596        /// Returns `None` if the enum contains an unknown value deserialized from
10597        /// the integer representation of enums.
10598        pub fn name(&self) -> std::option::Option<&str> {
10599            match self {
10600                Self::Unspecified => std::option::Option::Some("EXPORT_USE_UNSPECIFIED"),
10601                Self::CustomCodeTraining => std::option::Option::Some("CUSTOM_CODE_TRAINING"),
10602                Self::UnknownValue(u) => u.0.name(),
10603            }
10604        }
10605    }
10606
10607    #[cfg(feature = "dataset-service")]
10608    impl std::default::Default for ExportUse {
10609        fn default() -> Self {
10610            use std::convert::From;
10611            Self::from(0)
10612        }
10613    }
10614
10615    #[cfg(feature = "dataset-service")]
10616    impl std::fmt::Display for ExportUse {
10617        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10618            wkt::internal::display_enum(f, self.name(), self.value())
10619        }
10620    }
10621
10622    #[cfg(feature = "dataset-service")]
10623    impl std::convert::From<i32> for ExportUse {
10624        fn from(value: i32) -> Self {
10625            match value {
10626                0 => Self::Unspecified,
10627                6 => Self::CustomCodeTraining,
10628                _ => Self::UnknownValue(export_use::UnknownValue(
10629                    wkt::internal::UnknownEnumValue::Integer(value),
10630                )),
10631            }
10632        }
10633    }
10634
10635    #[cfg(feature = "dataset-service")]
10636    impl std::convert::From<&str> for ExportUse {
10637        fn from(value: &str) -> Self {
10638            use std::string::ToString;
10639            match value {
10640                "EXPORT_USE_UNSPECIFIED" => Self::Unspecified,
10641                "CUSTOM_CODE_TRAINING" => Self::CustomCodeTraining,
10642                _ => Self::UnknownValue(export_use::UnknownValue(
10643                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10644                )),
10645            }
10646        }
10647    }
10648
10649    #[cfg(feature = "dataset-service")]
10650    impl serde::ser::Serialize for ExportUse {
10651        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10652        where
10653            S: serde::Serializer,
10654        {
10655            match self {
10656                Self::Unspecified => serializer.serialize_i32(0),
10657                Self::CustomCodeTraining => serializer.serialize_i32(6),
10658                Self::UnknownValue(u) => u.0.serialize(serializer),
10659            }
10660        }
10661    }
10662
10663    #[cfg(feature = "dataset-service")]
10664    impl<'de> serde::de::Deserialize<'de> for ExportUse {
10665        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10666        where
10667            D: serde::Deserializer<'de>,
10668        {
10669            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ExportUse>::new(
10670                ".google.cloud.aiplatform.v1.ExportDataConfig.ExportUse",
10671            ))
10672        }
10673    }
10674
10675    /// The destination of the output.
10676    #[cfg(feature = "dataset-service")]
10677    #[derive(Clone, Debug, PartialEq)]
10678    #[non_exhaustive]
10679    pub enum Destination {
10680        /// The Google Cloud Storage location where the output is to be written to.
10681        /// In the given directory a new directory will be created with name:
10682        /// `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
10683        /// timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
10684        /// output will be written into that directory. Inside that directory,
10685        /// annotations with the same schema will be grouped into sub directories
10686        /// which are named with the corresponding annotations' schema title. Inside
10687        /// these sub directories, a schema.yaml will be created to describe the
10688        /// output format.
10689        GcsDestination(std::boxed::Box<crate::model::GcsDestination>),
10690    }
10691
10692    /// The instructions how the export data should be split between the
10693    /// training, validation and test sets.
10694    #[cfg(feature = "dataset-service")]
10695    #[derive(Clone, Debug, PartialEq)]
10696    #[non_exhaustive]
10697    pub enum Split {
10698        /// Split based on fractions defining the size of each set.
10699        FractionSplit(std::boxed::Box<crate::model::ExportFractionSplit>),
10700        /// Split based on the provided filters for each set.
10701        FilterSplit(std::boxed::Box<crate::model::ExportFilterSplit>),
10702    }
10703}
10704
10705/// Assigns the input data to training, validation, and test sets as per the
10706/// given fractions. Any of `training_fraction`, `validation_fraction` and
10707/// `test_fraction` may optionally be provided, they must sum to up to 1. If the
10708/// provided ones sum to less than 1, the remainder is assigned to sets as
10709/// decided by Vertex AI. If none of the fractions are set, by default roughly
10710/// 80% of data is used for training, 10% for validation, and 10% for test.
10711#[cfg(feature = "dataset-service")]
10712#[derive(Clone, Default, PartialEq)]
10713#[non_exhaustive]
10714pub struct ExportFractionSplit {
10715    /// The fraction of the input data that is to be used to train the Model.
10716    pub training_fraction: f64,
10717
10718    /// The fraction of the input data that is to be used to validate the Model.
10719    pub validation_fraction: f64,
10720
10721    /// The fraction of the input data that is to be used to evaluate the Model.
10722    pub test_fraction: f64,
10723
10724    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10725}
10726
10727#[cfg(feature = "dataset-service")]
10728impl ExportFractionSplit {
10729    pub fn new() -> Self {
10730        std::default::Default::default()
10731    }
10732
10733    /// Sets the value of [training_fraction][crate::model::ExportFractionSplit::training_fraction].
10734    pub fn set_training_fraction<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
10735        self.training_fraction = v.into();
10736        self
10737    }
10738
10739    /// Sets the value of [validation_fraction][crate::model::ExportFractionSplit::validation_fraction].
10740    pub fn set_validation_fraction<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
10741        self.validation_fraction = v.into();
10742        self
10743    }
10744
10745    /// Sets the value of [test_fraction][crate::model::ExportFractionSplit::test_fraction].
10746    pub fn set_test_fraction<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
10747        self.test_fraction = v.into();
10748        self
10749    }
10750}
10751
10752#[cfg(feature = "dataset-service")]
10753impl wkt::message::Message for ExportFractionSplit {
10754    fn typename() -> &'static str {
10755        "type.googleapis.com/google.cloud.aiplatform.v1.ExportFractionSplit"
10756    }
10757}
10758
10759/// Assigns input data to training, validation, and test sets based on the given
10760/// filters, data pieces not matched by any filter are ignored. Currently only
10761/// supported for Datasets containing DataItems.
10762/// If any of the filters in this message are to match nothing, then they can be
10763/// set as '-' (the minus sign).
10764///
10765/// Supported only for unstructured Datasets.
10766#[cfg(feature = "dataset-service")]
10767#[derive(Clone, Default, PartialEq)]
10768#[non_exhaustive]
10769pub struct ExportFilterSplit {
10770    /// Required. A filter on DataItems of the Dataset. DataItems that match
10771    /// this filter are used to train the Model. A filter with same syntax
10772    /// as the one used in
10773    /// [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems]
10774    /// may be used. If a single DataItem is matched by more than one of the
10775    /// FilterSplit filters, then it is assigned to the first set that applies to
10776    /// it in the training, validation, test order.
10777    ///
10778    /// [google.cloud.aiplatform.v1.DatasetService.ListDataItems]: crate::client::DatasetService::list_data_items
10779    pub training_filter: std::string::String,
10780
10781    /// Required. A filter on DataItems of the Dataset. DataItems that match
10782    /// this filter are used to validate the Model. A filter with same syntax
10783    /// as the one used in
10784    /// [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems]
10785    /// may be used. If a single DataItem is matched by more than one of the
10786    /// FilterSplit filters, then it is assigned to the first set that applies to
10787    /// it in the training, validation, test order.
10788    ///
10789    /// [google.cloud.aiplatform.v1.DatasetService.ListDataItems]: crate::client::DatasetService::list_data_items
10790    pub validation_filter: std::string::String,
10791
10792    /// Required. A filter on DataItems of the Dataset. DataItems that match
10793    /// this filter are used to test the Model. A filter with same syntax
10794    /// as the one used in
10795    /// [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems]
10796    /// may be used. If a single DataItem is matched by more than one of the
10797    /// FilterSplit filters, then it is assigned to the first set that applies to
10798    /// it in the training, validation, test order.
10799    ///
10800    /// [google.cloud.aiplatform.v1.DatasetService.ListDataItems]: crate::client::DatasetService::list_data_items
10801    pub test_filter: std::string::String,
10802
10803    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10804}
10805
10806#[cfg(feature = "dataset-service")]
10807impl ExportFilterSplit {
10808    pub fn new() -> Self {
10809        std::default::Default::default()
10810    }
10811
10812    /// Sets the value of [training_filter][crate::model::ExportFilterSplit::training_filter].
10813    pub fn set_training_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10814        self.training_filter = v.into();
10815        self
10816    }
10817
10818    /// Sets the value of [validation_filter][crate::model::ExportFilterSplit::validation_filter].
10819    pub fn set_validation_filter<T: std::convert::Into<std::string::String>>(
10820        mut self,
10821        v: T,
10822    ) -> Self {
10823        self.validation_filter = v.into();
10824        self
10825    }
10826
10827    /// Sets the value of [test_filter][crate::model::ExportFilterSplit::test_filter].
10828    pub fn set_test_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10829        self.test_filter = v.into();
10830        self
10831    }
10832}
10833
10834#[cfg(feature = "dataset-service")]
10835impl wkt::message::Message for ExportFilterSplit {
10836    fn typename() -> &'static str {
10837        "type.googleapis.com/google.cloud.aiplatform.v1.ExportFilterSplit"
10838    }
10839}
10840
10841/// Request message for
10842/// [DatasetService.CreateDataset][google.cloud.aiplatform.v1.DatasetService.CreateDataset].
10843///
10844/// [google.cloud.aiplatform.v1.DatasetService.CreateDataset]: crate::client::DatasetService::create_dataset
10845#[cfg(feature = "dataset-service")]
10846#[derive(Clone, Default, PartialEq)]
10847#[non_exhaustive]
10848pub struct CreateDatasetRequest {
10849    /// Required. The resource name of the Location to create the Dataset in.
10850    /// Format: `projects/{project}/locations/{location}`
10851    pub parent: std::string::String,
10852
10853    /// Required. The Dataset to create.
10854    pub dataset: std::option::Option<crate::model::Dataset>,
10855
10856    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10857}
10858
10859#[cfg(feature = "dataset-service")]
10860impl CreateDatasetRequest {
10861    pub fn new() -> Self {
10862        std::default::Default::default()
10863    }
10864
10865    /// Sets the value of [parent][crate::model::CreateDatasetRequest::parent].
10866    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10867        self.parent = v.into();
10868        self
10869    }
10870
10871    /// Sets the value of [dataset][crate::model::CreateDatasetRequest::dataset].
10872    pub fn set_dataset<T>(mut self, v: T) -> Self
10873    where
10874        T: std::convert::Into<crate::model::Dataset>,
10875    {
10876        self.dataset = std::option::Option::Some(v.into());
10877        self
10878    }
10879
10880    /// Sets or clears the value of [dataset][crate::model::CreateDatasetRequest::dataset].
10881    pub fn set_or_clear_dataset<T>(mut self, v: std::option::Option<T>) -> Self
10882    where
10883        T: std::convert::Into<crate::model::Dataset>,
10884    {
10885        self.dataset = v.map(|x| x.into());
10886        self
10887    }
10888}
10889
10890#[cfg(feature = "dataset-service")]
10891impl wkt::message::Message for CreateDatasetRequest {
10892    fn typename() -> &'static str {
10893        "type.googleapis.com/google.cloud.aiplatform.v1.CreateDatasetRequest"
10894    }
10895}
10896
10897/// Runtime operation information for
10898/// [DatasetService.CreateDataset][google.cloud.aiplatform.v1.DatasetService.CreateDataset].
10899///
10900/// [google.cloud.aiplatform.v1.DatasetService.CreateDataset]: crate::client::DatasetService::create_dataset
10901#[cfg(feature = "dataset-service")]
10902#[derive(Clone, Default, PartialEq)]
10903#[non_exhaustive]
10904pub struct CreateDatasetOperationMetadata {
10905    /// The operation generic information.
10906    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
10907
10908    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10909}
10910
10911#[cfg(feature = "dataset-service")]
10912impl CreateDatasetOperationMetadata {
10913    pub fn new() -> Self {
10914        std::default::Default::default()
10915    }
10916
10917    /// Sets the value of [generic_metadata][crate::model::CreateDatasetOperationMetadata::generic_metadata].
10918    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
10919    where
10920        T: std::convert::Into<crate::model::GenericOperationMetadata>,
10921    {
10922        self.generic_metadata = std::option::Option::Some(v.into());
10923        self
10924    }
10925
10926    /// Sets or clears the value of [generic_metadata][crate::model::CreateDatasetOperationMetadata::generic_metadata].
10927    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
10928    where
10929        T: std::convert::Into<crate::model::GenericOperationMetadata>,
10930    {
10931        self.generic_metadata = v.map(|x| x.into());
10932        self
10933    }
10934}
10935
10936#[cfg(feature = "dataset-service")]
10937impl wkt::message::Message for CreateDatasetOperationMetadata {
10938    fn typename() -> &'static str {
10939        "type.googleapis.com/google.cloud.aiplatform.v1.CreateDatasetOperationMetadata"
10940    }
10941}
10942
10943/// Request message for
10944/// [DatasetService.GetDataset][google.cloud.aiplatform.v1.DatasetService.GetDataset].
10945/// Next ID: 4
10946///
10947/// [google.cloud.aiplatform.v1.DatasetService.GetDataset]: crate::client::DatasetService::get_dataset
10948#[cfg(feature = "dataset-service")]
10949#[derive(Clone, Default, PartialEq)]
10950#[non_exhaustive]
10951pub struct GetDatasetRequest {
10952    /// Required. The name of the Dataset resource.
10953    pub name: std::string::String,
10954
10955    /// Mask specifying which fields to read.
10956    pub read_mask: std::option::Option<wkt::FieldMask>,
10957
10958    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10959}
10960
10961#[cfg(feature = "dataset-service")]
10962impl GetDatasetRequest {
10963    pub fn new() -> Self {
10964        std::default::Default::default()
10965    }
10966
10967    /// Sets the value of [name][crate::model::GetDatasetRequest::name].
10968    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10969        self.name = v.into();
10970        self
10971    }
10972
10973    /// Sets the value of [read_mask][crate::model::GetDatasetRequest::read_mask].
10974    pub fn set_read_mask<T>(mut self, v: T) -> Self
10975    where
10976        T: std::convert::Into<wkt::FieldMask>,
10977    {
10978        self.read_mask = std::option::Option::Some(v.into());
10979        self
10980    }
10981
10982    /// Sets or clears the value of [read_mask][crate::model::GetDatasetRequest::read_mask].
10983    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
10984    where
10985        T: std::convert::Into<wkt::FieldMask>,
10986    {
10987        self.read_mask = v.map(|x| x.into());
10988        self
10989    }
10990}
10991
10992#[cfg(feature = "dataset-service")]
10993impl wkt::message::Message for GetDatasetRequest {
10994    fn typename() -> &'static str {
10995        "type.googleapis.com/google.cloud.aiplatform.v1.GetDatasetRequest"
10996    }
10997}
10998
10999/// Request message for
11000/// [DatasetService.UpdateDataset][google.cloud.aiplatform.v1.DatasetService.UpdateDataset].
11001///
11002/// [google.cloud.aiplatform.v1.DatasetService.UpdateDataset]: crate::client::DatasetService::update_dataset
11003#[cfg(feature = "dataset-service")]
11004#[derive(Clone, Default, PartialEq)]
11005#[non_exhaustive]
11006pub struct UpdateDatasetRequest {
11007    /// Required. The Dataset which replaces the resource on the server.
11008    pub dataset: std::option::Option<crate::model::Dataset>,
11009
11010    /// Required. The update mask applies to the resource.
11011    /// For the `FieldMask` definition, see
11012    /// [google.protobuf.FieldMask][google.protobuf.FieldMask]. Updatable fields:
11013    ///
11014    /// * `display_name`
11015    /// * `description`
11016    /// * `labels`
11017    ///
11018    /// [google.protobuf.FieldMask]: wkt::FieldMask
11019    pub update_mask: std::option::Option<wkt::FieldMask>,
11020
11021    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11022}
11023
11024#[cfg(feature = "dataset-service")]
11025impl UpdateDatasetRequest {
11026    pub fn new() -> Self {
11027        std::default::Default::default()
11028    }
11029
11030    /// Sets the value of [dataset][crate::model::UpdateDatasetRequest::dataset].
11031    pub fn set_dataset<T>(mut self, v: T) -> Self
11032    where
11033        T: std::convert::Into<crate::model::Dataset>,
11034    {
11035        self.dataset = std::option::Option::Some(v.into());
11036        self
11037    }
11038
11039    /// Sets or clears the value of [dataset][crate::model::UpdateDatasetRequest::dataset].
11040    pub fn set_or_clear_dataset<T>(mut self, v: std::option::Option<T>) -> Self
11041    where
11042        T: std::convert::Into<crate::model::Dataset>,
11043    {
11044        self.dataset = v.map(|x| x.into());
11045        self
11046    }
11047
11048    /// Sets the value of [update_mask][crate::model::UpdateDatasetRequest::update_mask].
11049    pub fn set_update_mask<T>(mut self, v: T) -> Self
11050    where
11051        T: std::convert::Into<wkt::FieldMask>,
11052    {
11053        self.update_mask = std::option::Option::Some(v.into());
11054        self
11055    }
11056
11057    /// Sets or clears the value of [update_mask][crate::model::UpdateDatasetRequest::update_mask].
11058    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
11059    where
11060        T: std::convert::Into<wkt::FieldMask>,
11061    {
11062        self.update_mask = v.map(|x| x.into());
11063        self
11064    }
11065}
11066
11067#[cfg(feature = "dataset-service")]
11068impl wkt::message::Message for UpdateDatasetRequest {
11069    fn typename() -> &'static str {
11070        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateDatasetRequest"
11071    }
11072}
11073
11074/// Request message for
11075/// [DatasetService.UpdateDatasetVersion][google.cloud.aiplatform.v1.DatasetService.UpdateDatasetVersion].
11076///
11077/// [google.cloud.aiplatform.v1.DatasetService.UpdateDatasetVersion]: crate::client::DatasetService::update_dataset_version
11078#[cfg(feature = "dataset-service")]
11079#[derive(Clone, Default, PartialEq)]
11080#[non_exhaustive]
11081pub struct UpdateDatasetVersionRequest {
11082    /// Required. The DatasetVersion which replaces the resource on the server.
11083    pub dataset_version: std::option::Option<crate::model::DatasetVersion>,
11084
11085    /// Required. The update mask applies to the resource.
11086    /// For the `FieldMask` definition, see
11087    /// [google.protobuf.FieldMask][google.protobuf.FieldMask]. Updatable fields:
11088    ///
11089    /// * `display_name`
11090    ///
11091    /// [google.protobuf.FieldMask]: wkt::FieldMask
11092    pub update_mask: std::option::Option<wkt::FieldMask>,
11093
11094    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11095}
11096
11097#[cfg(feature = "dataset-service")]
11098impl UpdateDatasetVersionRequest {
11099    pub fn new() -> Self {
11100        std::default::Default::default()
11101    }
11102
11103    /// Sets the value of [dataset_version][crate::model::UpdateDatasetVersionRequest::dataset_version].
11104    pub fn set_dataset_version<T>(mut self, v: T) -> Self
11105    where
11106        T: std::convert::Into<crate::model::DatasetVersion>,
11107    {
11108        self.dataset_version = std::option::Option::Some(v.into());
11109        self
11110    }
11111
11112    /// Sets or clears the value of [dataset_version][crate::model::UpdateDatasetVersionRequest::dataset_version].
11113    pub fn set_or_clear_dataset_version<T>(mut self, v: std::option::Option<T>) -> Self
11114    where
11115        T: std::convert::Into<crate::model::DatasetVersion>,
11116    {
11117        self.dataset_version = v.map(|x| x.into());
11118        self
11119    }
11120
11121    /// Sets the value of [update_mask][crate::model::UpdateDatasetVersionRequest::update_mask].
11122    pub fn set_update_mask<T>(mut self, v: T) -> Self
11123    where
11124        T: std::convert::Into<wkt::FieldMask>,
11125    {
11126        self.update_mask = std::option::Option::Some(v.into());
11127        self
11128    }
11129
11130    /// Sets or clears the value of [update_mask][crate::model::UpdateDatasetVersionRequest::update_mask].
11131    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
11132    where
11133        T: std::convert::Into<wkt::FieldMask>,
11134    {
11135        self.update_mask = v.map(|x| x.into());
11136        self
11137    }
11138}
11139
11140#[cfg(feature = "dataset-service")]
11141impl wkt::message::Message for UpdateDatasetVersionRequest {
11142    fn typename() -> &'static str {
11143        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateDatasetVersionRequest"
11144    }
11145}
11146
11147/// Request message for
11148/// [DatasetService.ListDatasets][google.cloud.aiplatform.v1.DatasetService.ListDatasets].
11149///
11150/// [google.cloud.aiplatform.v1.DatasetService.ListDatasets]: crate::client::DatasetService::list_datasets
11151#[cfg(feature = "dataset-service")]
11152#[derive(Clone, Default, PartialEq)]
11153#[non_exhaustive]
11154pub struct ListDatasetsRequest {
11155    /// Required. The name of the Dataset's parent resource.
11156    /// Format: `projects/{project}/locations/{location}`
11157    pub parent: std::string::String,
11158
11159    /// An expression for filtering the results of the request. For field names
11160    /// both snake_case and camelCase are supported.
11161    ///
11162    /// * `display_name`: supports = and !=
11163    /// * `metadata_schema_uri`: supports = and !=
11164    /// * `labels` supports general map functions that is:
11165    ///   * `labels.key=value` - key:value equality
11166    ///   * `labels.key:* or labels:key - key existence
11167    ///   * A key including a space must be quoted. `labels."a key"`.
11168    ///
11169    /// Some examples:
11170    ///
11171    /// * `displayName="myDisplayName"`
11172    /// * `labels.myKey="myValue"`
11173    pub filter: std::string::String,
11174
11175    /// The standard list page size.
11176    pub page_size: i32,
11177
11178    /// The standard list page token.
11179    pub page_token: std::string::String,
11180
11181    /// Mask specifying which fields to read.
11182    pub read_mask: std::option::Option<wkt::FieldMask>,
11183
11184    /// A comma-separated list of fields to order by, sorted in ascending order.
11185    /// Use "desc" after a field name for descending.
11186    /// Supported fields:
11187    ///
11188    /// * `display_name`
11189    /// * `create_time`
11190    /// * `update_time`
11191    pub order_by: std::string::String,
11192
11193    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11194}
11195
11196#[cfg(feature = "dataset-service")]
11197impl ListDatasetsRequest {
11198    pub fn new() -> Self {
11199        std::default::Default::default()
11200    }
11201
11202    /// Sets the value of [parent][crate::model::ListDatasetsRequest::parent].
11203    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11204        self.parent = v.into();
11205        self
11206    }
11207
11208    /// Sets the value of [filter][crate::model::ListDatasetsRequest::filter].
11209    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11210        self.filter = v.into();
11211        self
11212    }
11213
11214    /// Sets the value of [page_size][crate::model::ListDatasetsRequest::page_size].
11215    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11216        self.page_size = v.into();
11217        self
11218    }
11219
11220    /// Sets the value of [page_token][crate::model::ListDatasetsRequest::page_token].
11221    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11222        self.page_token = v.into();
11223        self
11224    }
11225
11226    /// Sets the value of [read_mask][crate::model::ListDatasetsRequest::read_mask].
11227    pub fn set_read_mask<T>(mut self, v: T) -> Self
11228    where
11229        T: std::convert::Into<wkt::FieldMask>,
11230    {
11231        self.read_mask = std::option::Option::Some(v.into());
11232        self
11233    }
11234
11235    /// Sets or clears the value of [read_mask][crate::model::ListDatasetsRequest::read_mask].
11236    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
11237    where
11238        T: std::convert::Into<wkt::FieldMask>,
11239    {
11240        self.read_mask = v.map(|x| x.into());
11241        self
11242    }
11243
11244    /// Sets the value of [order_by][crate::model::ListDatasetsRequest::order_by].
11245    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11246        self.order_by = v.into();
11247        self
11248    }
11249}
11250
11251#[cfg(feature = "dataset-service")]
11252impl wkt::message::Message for ListDatasetsRequest {
11253    fn typename() -> &'static str {
11254        "type.googleapis.com/google.cloud.aiplatform.v1.ListDatasetsRequest"
11255    }
11256}
11257
11258/// Response message for
11259/// [DatasetService.ListDatasets][google.cloud.aiplatform.v1.DatasetService.ListDatasets].
11260///
11261/// [google.cloud.aiplatform.v1.DatasetService.ListDatasets]: crate::client::DatasetService::list_datasets
11262#[cfg(feature = "dataset-service")]
11263#[derive(Clone, Default, PartialEq)]
11264#[non_exhaustive]
11265pub struct ListDatasetsResponse {
11266    /// A list of Datasets that matches the specified filter in the request.
11267    pub datasets: std::vec::Vec<crate::model::Dataset>,
11268
11269    /// The standard List next-page token.
11270    pub next_page_token: std::string::String,
11271
11272    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11273}
11274
11275#[cfg(feature = "dataset-service")]
11276impl ListDatasetsResponse {
11277    pub fn new() -> Self {
11278        std::default::Default::default()
11279    }
11280
11281    /// Sets the value of [datasets][crate::model::ListDatasetsResponse::datasets].
11282    pub fn set_datasets<T, V>(mut self, v: T) -> Self
11283    where
11284        T: std::iter::IntoIterator<Item = V>,
11285        V: std::convert::Into<crate::model::Dataset>,
11286    {
11287        use std::iter::Iterator;
11288        self.datasets = v.into_iter().map(|i| i.into()).collect();
11289        self
11290    }
11291
11292    /// Sets the value of [next_page_token][crate::model::ListDatasetsResponse::next_page_token].
11293    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11294        self.next_page_token = v.into();
11295        self
11296    }
11297}
11298
11299#[cfg(feature = "dataset-service")]
11300impl wkt::message::Message for ListDatasetsResponse {
11301    fn typename() -> &'static str {
11302        "type.googleapis.com/google.cloud.aiplatform.v1.ListDatasetsResponse"
11303    }
11304}
11305
11306#[cfg(feature = "dataset-service")]
11307#[doc(hidden)]
11308impl gax::paginator::internal::PageableResponse for ListDatasetsResponse {
11309    type PageItem = crate::model::Dataset;
11310
11311    fn items(self) -> std::vec::Vec<Self::PageItem> {
11312        self.datasets
11313    }
11314
11315    fn next_page_token(&self) -> std::string::String {
11316        use std::clone::Clone;
11317        self.next_page_token.clone()
11318    }
11319}
11320
11321/// Request message for
11322/// [DatasetService.DeleteDataset][google.cloud.aiplatform.v1.DatasetService.DeleteDataset].
11323///
11324/// [google.cloud.aiplatform.v1.DatasetService.DeleteDataset]: crate::client::DatasetService::delete_dataset
11325#[cfg(feature = "dataset-service")]
11326#[derive(Clone, Default, PartialEq)]
11327#[non_exhaustive]
11328pub struct DeleteDatasetRequest {
11329    /// Required. The resource name of the Dataset to delete.
11330    /// Format:
11331    /// `projects/{project}/locations/{location}/datasets/{dataset}`
11332    pub name: std::string::String,
11333
11334    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11335}
11336
11337#[cfg(feature = "dataset-service")]
11338impl DeleteDatasetRequest {
11339    pub fn new() -> Self {
11340        std::default::Default::default()
11341    }
11342
11343    /// Sets the value of [name][crate::model::DeleteDatasetRequest::name].
11344    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11345        self.name = v.into();
11346        self
11347    }
11348}
11349
11350#[cfg(feature = "dataset-service")]
11351impl wkt::message::Message for DeleteDatasetRequest {
11352    fn typename() -> &'static str {
11353        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteDatasetRequest"
11354    }
11355}
11356
11357/// Request message for
11358/// [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData].
11359///
11360/// [google.cloud.aiplatform.v1.DatasetService.ImportData]: crate::client::DatasetService::import_data
11361#[cfg(feature = "dataset-service")]
11362#[derive(Clone, Default, PartialEq)]
11363#[non_exhaustive]
11364pub struct ImportDataRequest {
11365    /// Required. The name of the Dataset resource.
11366    /// Format:
11367    /// `projects/{project}/locations/{location}/datasets/{dataset}`
11368    pub name: std::string::String,
11369
11370    /// Required. The desired input locations. The contents of all input locations
11371    /// will be imported in one batch.
11372    pub import_configs: std::vec::Vec<crate::model::ImportDataConfig>,
11373
11374    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11375}
11376
11377#[cfg(feature = "dataset-service")]
11378impl ImportDataRequest {
11379    pub fn new() -> Self {
11380        std::default::Default::default()
11381    }
11382
11383    /// Sets the value of [name][crate::model::ImportDataRequest::name].
11384    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11385        self.name = v.into();
11386        self
11387    }
11388
11389    /// Sets the value of [import_configs][crate::model::ImportDataRequest::import_configs].
11390    pub fn set_import_configs<T, V>(mut self, v: T) -> Self
11391    where
11392        T: std::iter::IntoIterator<Item = V>,
11393        V: std::convert::Into<crate::model::ImportDataConfig>,
11394    {
11395        use std::iter::Iterator;
11396        self.import_configs = v.into_iter().map(|i| i.into()).collect();
11397        self
11398    }
11399}
11400
11401#[cfg(feature = "dataset-service")]
11402impl wkt::message::Message for ImportDataRequest {
11403    fn typename() -> &'static str {
11404        "type.googleapis.com/google.cloud.aiplatform.v1.ImportDataRequest"
11405    }
11406}
11407
11408/// Response message for
11409/// [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData].
11410///
11411/// [google.cloud.aiplatform.v1.DatasetService.ImportData]: crate::client::DatasetService::import_data
11412#[cfg(feature = "dataset-service")]
11413#[derive(Clone, Default, PartialEq)]
11414#[non_exhaustive]
11415pub struct ImportDataResponse {
11416    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11417}
11418
11419#[cfg(feature = "dataset-service")]
11420impl ImportDataResponse {
11421    pub fn new() -> Self {
11422        std::default::Default::default()
11423    }
11424}
11425
11426#[cfg(feature = "dataset-service")]
11427impl wkt::message::Message for ImportDataResponse {
11428    fn typename() -> &'static str {
11429        "type.googleapis.com/google.cloud.aiplatform.v1.ImportDataResponse"
11430    }
11431}
11432
11433/// Runtime operation information for
11434/// [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData].
11435///
11436/// [google.cloud.aiplatform.v1.DatasetService.ImportData]: crate::client::DatasetService::import_data
11437#[cfg(feature = "dataset-service")]
11438#[derive(Clone, Default, PartialEq)]
11439#[non_exhaustive]
11440pub struct ImportDataOperationMetadata {
11441    /// The common part of the operation metadata.
11442    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
11443
11444    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11445}
11446
11447#[cfg(feature = "dataset-service")]
11448impl ImportDataOperationMetadata {
11449    pub fn new() -> Self {
11450        std::default::Default::default()
11451    }
11452
11453    /// Sets the value of [generic_metadata][crate::model::ImportDataOperationMetadata::generic_metadata].
11454    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
11455    where
11456        T: std::convert::Into<crate::model::GenericOperationMetadata>,
11457    {
11458        self.generic_metadata = std::option::Option::Some(v.into());
11459        self
11460    }
11461
11462    /// Sets or clears the value of [generic_metadata][crate::model::ImportDataOperationMetadata::generic_metadata].
11463    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
11464    where
11465        T: std::convert::Into<crate::model::GenericOperationMetadata>,
11466    {
11467        self.generic_metadata = v.map(|x| x.into());
11468        self
11469    }
11470}
11471
11472#[cfg(feature = "dataset-service")]
11473impl wkt::message::Message for ImportDataOperationMetadata {
11474    fn typename() -> &'static str {
11475        "type.googleapis.com/google.cloud.aiplatform.v1.ImportDataOperationMetadata"
11476    }
11477}
11478
11479/// Request message for
11480/// [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData].
11481///
11482/// [google.cloud.aiplatform.v1.DatasetService.ExportData]: crate::client::DatasetService::export_data
11483#[cfg(feature = "dataset-service")]
11484#[derive(Clone, Default, PartialEq)]
11485#[non_exhaustive]
11486pub struct ExportDataRequest {
11487    /// Required. The name of the Dataset resource.
11488    /// Format:
11489    /// `projects/{project}/locations/{location}/datasets/{dataset}`
11490    pub name: std::string::String,
11491
11492    /// Required. The desired output location.
11493    pub export_config: std::option::Option<crate::model::ExportDataConfig>,
11494
11495    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11496}
11497
11498#[cfg(feature = "dataset-service")]
11499impl ExportDataRequest {
11500    pub fn new() -> Self {
11501        std::default::Default::default()
11502    }
11503
11504    /// Sets the value of [name][crate::model::ExportDataRequest::name].
11505    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11506        self.name = v.into();
11507        self
11508    }
11509
11510    /// Sets the value of [export_config][crate::model::ExportDataRequest::export_config].
11511    pub fn set_export_config<T>(mut self, v: T) -> Self
11512    where
11513        T: std::convert::Into<crate::model::ExportDataConfig>,
11514    {
11515        self.export_config = std::option::Option::Some(v.into());
11516        self
11517    }
11518
11519    /// Sets or clears the value of [export_config][crate::model::ExportDataRequest::export_config].
11520    pub fn set_or_clear_export_config<T>(mut self, v: std::option::Option<T>) -> Self
11521    where
11522        T: std::convert::Into<crate::model::ExportDataConfig>,
11523    {
11524        self.export_config = v.map(|x| x.into());
11525        self
11526    }
11527}
11528
11529#[cfg(feature = "dataset-service")]
11530impl wkt::message::Message for ExportDataRequest {
11531    fn typename() -> &'static str {
11532        "type.googleapis.com/google.cloud.aiplatform.v1.ExportDataRequest"
11533    }
11534}
11535
11536/// Response message for
11537/// [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData].
11538///
11539/// [google.cloud.aiplatform.v1.DatasetService.ExportData]: crate::client::DatasetService::export_data
11540#[cfg(feature = "dataset-service")]
11541#[derive(Clone, Default, PartialEq)]
11542#[non_exhaustive]
11543pub struct ExportDataResponse {
11544    /// All of the files that are exported in this export operation. For custom
11545    /// code training export, only three (training, validation and test)
11546    /// Cloud Storage paths in wildcard format are populated
11547    /// (for example, gs://.../training-*).
11548    pub exported_files: std::vec::Vec<std::string::String>,
11549
11550    /// Only present for custom code training export use case. Records data stats,
11551    /// i.e., train/validation/test item/annotation counts calculated during
11552    /// the export operation.
11553    pub data_stats: std::option::Option<crate::model::model::DataStats>,
11554
11555    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11556}
11557
11558#[cfg(feature = "dataset-service")]
11559impl ExportDataResponse {
11560    pub fn new() -> Self {
11561        std::default::Default::default()
11562    }
11563
11564    /// Sets the value of [exported_files][crate::model::ExportDataResponse::exported_files].
11565    pub fn set_exported_files<T, V>(mut self, v: T) -> Self
11566    where
11567        T: std::iter::IntoIterator<Item = V>,
11568        V: std::convert::Into<std::string::String>,
11569    {
11570        use std::iter::Iterator;
11571        self.exported_files = v.into_iter().map(|i| i.into()).collect();
11572        self
11573    }
11574
11575    /// Sets the value of [data_stats][crate::model::ExportDataResponse::data_stats].
11576    pub fn set_data_stats<T>(mut self, v: T) -> Self
11577    where
11578        T: std::convert::Into<crate::model::model::DataStats>,
11579    {
11580        self.data_stats = std::option::Option::Some(v.into());
11581        self
11582    }
11583
11584    /// Sets or clears the value of [data_stats][crate::model::ExportDataResponse::data_stats].
11585    pub fn set_or_clear_data_stats<T>(mut self, v: std::option::Option<T>) -> Self
11586    where
11587        T: std::convert::Into<crate::model::model::DataStats>,
11588    {
11589        self.data_stats = v.map(|x| x.into());
11590        self
11591    }
11592}
11593
11594#[cfg(feature = "dataset-service")]
11595impl wkt::message::Message for ExportDataResponse {
11596    fn typename() -> &'static str {
11597        "type.googleapis.com/google.cloud.aiplatform.v1.ExportDataResponse"
11598    }
11599}
11600
11601/// Runtime operation information for
11602/// [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData].
11603///
11604/// [google.cloud.aiplatform.v1.DatasetService.ExportData]: crate::client::DatasetService::export_data
11605#[cfg(feature = "dataset-service")]
11606#[derive(Clone, Default, PartialEq)]
11607#[non_exhaustive]
11608pub struct ExportDataOperationMetadata {
11609    /// The common part of the operation metadata.
11610    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
11611
11612    /// A Google Cloud Storage directory which path ends with '/'. The exported
11613    /// data is stored in the directory.
11614    pub gcs_output_directory: std::string::String,
11615
11616    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11617}
11618
11619#[cfg(feature = "dataset-service")]
11620impl ExportDataOperationMetadata {
11621    pub fn new() -> Self {
11622        std::default::Default::default()
11623    }
11624
11625    /// Sets the value of [generic_metadata][crate::model::ExportDataOperationMetadata::generic_metadata].
11626    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
11627    where
11628        T: std::convert::Into<crate::model::GenericOperationMetadata>,
11629    {
11630        self.generic_metadata = std::option::Option::Some(v.into());
11631        self
11632    }
11633
11634    /// Sets or clears the value of [generic_metadata][crate::model::ExportDataOperationMetadata::generic_metadata].
11635    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
11636    where
11637        T: std::convert::Into<crate::model::GenericOperationMetadata>,
11638    {
11639        self.generic_metadata = v.map(|x| x.into());
11640        self
11641    }
11642
11643    /// Sets the value of [gcs_output_directory][crate::model::ExportDataOperationMetadata::gcs_output_directory].
11644    pub fn set_gcs_output_directory<T: std::convert::Into<std::string::String>>(
11645        mut self,
11646        v: T,
11647    ) -> Self {
11648        self.gcs_output_directory = v.into();
11649        self
11650    }
11651}
11652
11653#[cfg(feature = "dataset-service")]
11654impl wkt::message::Message for ExportDataOperationMetadata {
11655    fn typename() -> &'static str {
11656        "type.googleapis.com/google.cloud.aiplatform.v1.ExportDataOperationMetadata"
11657    }
11658}
11659
11660/// Request message for
11661/// [DatasetService.CreateDatasetVersion][google.cloud.aiplatform.v1.DatasetService.CreateDatasetVersion].
11662///
11663/// [google.cloud.aiplatform.v1.DatasetService.CreateDatasetVersion]: crate::client::DatasetService::create_dataset_version
11664#[cfg(feature = "dataset-service")]
11665#[derive(Clone, Default, PartialEq)]
11666#[non_exhaustive]
11667pub struct CreateDatasetVersionRequest {
11668    /// Required. The name of the Dataset resource.
11669    /// Format:
11670    /// `projects/{project}/locations/{location}/datasets/{dataset}`
11671    pub parent: std::string::String,
11672
11673    /// Required. The version to be created. The same CMEK policies with the
11674    /// original Dataset will be applied the dataset version. So here we don't need
11675    /// to specify the EncryptionSpecType here.
11676    pub dataset_version: std::option::Option<crate::model::DatasetVersion>,
11677
11678    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11679}
11680
11681#[cfg(feature = "dataset-service")]
11682impl CreateDatasetVersionRequest {
11683    pub fn new() -> Self {
11684        std::default::Default::default()
11685    }
11686
11687    /// Sets the value of [parent][crate::model::CreateDatasetVersionRequest::parent].
11688    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11689        self.parent = v.into();
11690        self
11691    }
11692
11693    /// Sets the value of [dataset_version][crate::model::CreateDatasetVersionRequest::dataset_version].
11694    pub fn set_dataset_version<T>(mut self, v: T) -> Self
11695    where
11696        T: std::convert::Into<crate::model::DatasetVersion>,
11697    {
11698        self.dataset_version = std::option::Option::Some(v.into());
11699        self
11700    }
11701
11702    /// Sets or clears the value of [dataset_version][crate::model::CreateDatasetVersionRequest::dataset_version].
11703    pub fn set_or_clear_dataset_version<T>(mut self, v: std::option::Option<T>) -> Self
11704    where
11705        T: std::convert::Into<crate::model::DatasetVersion>,
11706    {
11707        self.dataset_version = v.map(|x| x.into());
11708        self
11709    }
11710}
11711
11712#[cfg(feature = "dataset-service")]
11713impl wkt::message::Message for CreateDatasetVersionRequest {
11714    fn typename() -> &'static str {
11715        "type.googleapis.com/google.cloud.aiplatform.v1.CreateDatasetVersionRequest"
11716    }
11717}
11718
11719/// Runtime operation information for
11720/// [DatasetService.CreateDatasetVersion][google.cloud.aiplatform.v1.DatasetService.CreateDatasetVersion].
11721///
11722/// [google.cloud.aiplatform.v1.DatasetService.CreateDatasetVersion]: crate::client::DatasetService::create_dataset_version
11723#[cfg(feature = "dataset-service")]
11724#[derive(Clone, Default, PartialEq)]
11725#[non_exhaustive]
11726pub struct CreateDatasetVersionOperationMetadata {
11727    /// The common part of the operation metadata.
11728    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
11729
11730    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11731}
11732
11733#[cfg(feature = "dataset-service")]
11734impl CreateDatasetVersionOperationMetadata {
11735    pub fn new() -> Self {
11736        std::default::Default::default()
11737    }
11738
11739    /// Sets the value of [generic_metadata][crate::model::CreateDatasetVersionOperationMetadata::generic_metadata].
11740    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
11741    where
11742        T: std::convert::Into<crate::model::GenericOperationMetadata>,
11743    {
11744        self.generic_metadata = std::option::Option::Some(v.into());
11745        self
11746    }
11747
11748    /// Sets or clears the value of [generic_metadata][crate::model::CreateDatasetVersionOperationMetadata::generic_metadata].
11749    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
11750    where
11751        T: std::convert::Into<crate::model::GenericOperationMetadata>,
11752    {
11753        self.generic_metadata = v.map(|x| x.into());
11754        self
11755    }
11756}
11757
11758#[cfg(feature = "dataset-service")]
11759impl wkt::message::Message for CreateDatasetVersionOperationMetadata {
11760    fn typename() -> &'static str {
11761        "type.googleapis.com/google.cloud.aiplatform.v1.CreateDatasetVersionOperationMetadata"
11762    }
11763}
11764
11765/// Request message for
11766/// [DatasetService.DeleteDatasetVersion][google.cloud.aiplatform.v1.DatasetService.DeleteDatasetVersion].
11767///
11768/// [google.cloud.aiplatform.v1.DatasetService.DeleteDatasetVersion]: crate::client::DatasetService::delete_dataset_version
11769#[cfg(feature = "dataset-service")]
11770#[derive(Clone, Default, PartialEq)]
11771#[non_exhaustive]
11772pub struct DeleteDatasetVersionRequest {
11773    /// Required. The resource name of the Dataset version to delete.
11774    /// Format:
11775    /// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
11776    pub name: std::string::String,
11777
11778    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11779}
11780
11781#[cfg(feature = "dataset-service")]
11782impl DeleteDatasetVersionRequest {
11783    pub fn new() -> Self {
11784        std::default::Default::default()
11785    }
11786
11787    /// Sets the value of [name][crate::model::DeleteDatasetVersionRequest::name].
11788    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11789        self.name = v.into();
11790        self
11791    }
11792}
11793
11794#[cfg(feature = "dataset-service")]
11795impl wkt::message::Message for DeleteDatasetVersionRequest {
11796    fn typename() -> &'static str {
11797        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteDatasetVersionRequest"
11798    }
11799}
11800
11801/// Request message for
11802/// [DatasetService.GetDatasetVersion][google.cloud.aiplatform.v1.DatasetService.GetDatasetVersion].
11803/// Next ID: 4
11804///
11805/// [google.cloud.aiplatform.v1.DatasetService.GetDatasetVersion]: crate::client::DatasetService::get_dataset_version
11806#[cfg(feature = "dataset-service")]
11807#[derive(Clone, Default, PartialEq)]
11808#[non_exhaustive]
11809pub struct GetDatasetVersionRequest {
11810    /// Required. The resource name of the Dataset version to delete.
11811    /// Format:
11812    /// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
11813    pub name: std::string::String,
11814
11815    /// Mask specifying which fields to read.
11816    pub read_mask: std::option::Option<wkt::FieldMask>,
11817
11818    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11819}
11820
11821#[cfg(feature = "dataset-service")]
11822impl GetDatasetVersionRequest {
11823    pub fn new() -> Self {
11824        std::default::Default::default()
11825    }
11826
11827    /// Sets the value of [name][crate::model::GetDatasetVersionRequest::name].
11828    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11829        self.name = v.into();
11830        self
11831    }
11832
11833    /// Sets the value of [read_mask][crate::model::GetDatasetVersionRequest::read_mask].
11834    pub fn set_read_mask<T>(mut self, v: T) -> Self
11835    where
11836        T: std::convert::Into<wkt::FieldMask>,
11837    {
11838        self.read_mask = std::option::Option::Some(v.into());
11839        self
11840    }
11841
11842    /// Sets or clears the value of [read_mask][crate::model::GetDatasetVersionRequest::read_mask].
11843    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
11844    where
11845        T: std::convert::Into<wkt::FieldMask>,
11846    {
11847        self.read_mask = v.map(|x| x.into());
11848        self
11849    }
11850}
11851
11852#[cfg(feature = "dataset-service")]
11853impl wkt::message::Message for GetDatasetVersionRequest {
11854    fn typename() -> &'static str {
11855        "type.googleapis.com/google.cloud.aiplatform.v1.GetDatasetVersionRequest"
11856    }
11857}
11858
11859/// Request message for
11860/// [DatasetService.ListDatasetVersions][google.cloud.aiplatform.v1.DatasetService.ListDatasetVersions].
11861///
11862/// [google.cloud.aiplatform.v1.DatasetService.ListDatasetVersions]: crate::client::DatasetService::list_dataset_versions
11863#[cfg(feature = "dataset-service")]
11864#[derive(Clone, Default, PartialEq)]
11865#[non_exhaustive]
11866pub struct ListDatasetVersionsRequest {
11867    /// Required. The resource name of the Dataset to list DatasetVersions from.
11868    /// Format:
11869    /// `projects/{project}/locations/{location}/datasets/{dataset}`
11870    pub parent: std::string::String,
11871
11872    /// Optional. The standard list filter.
11873    pub filter: std::string::String,
11874
11875    /// Optional. The standard list page size.
11876    pub page_size: i32,
11877
11878    /// Optional. The standard list page token.
11879    pub page_token: std::string::String,
11880
11881    /// Optional. Mask specifying which fields to read.
11882    pub read_mask: std::option::Option<wkt::FieldMask>,
11883
11884    /// Optional. A comma-separated list of fields to order by, sorted in ascending
11885    /// order. Use "desc" after a field name for descending.
11886    pub order_by: std::string::String,
11887
11888    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11889}
11890
11891#[cfg(feature = "dataset-service")]
11892impl ListDatasetVersionsRequest {
11893    pub fn new() -> Self {
11894        std::default::Default::default()
11895    }
11896
11897    /// Sets the value of [parent][crate::model::ListDatasetVersionsRequest::parent].
11898    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11899        self.parent = v.into();
11900        self
11901    }
11902
11903    /// Sets the value of [filter][crate::model::ListDatasetVersionsRequest::filter].
11904    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11905        self.filter = v.into();
11906        self
11907    }
11908
11909    /// Sets the value of [page_size][crate::model::ListDatasetVersionsRequest::page_size].
11910    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11911        self.page_size = v.into();
11912        self
11913    }
11914
11915    /// Sets the value of [page_token][crate::model::ListDatasetVersionsRequest::page_token].
11916    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11917        self.page_token = v.into();
11918        self
11919    }
11920
11921    /// Sets the value of [read_mask][crate::model::ListDatasetVersionsRequest::read_mask].
11922    pub fn set_read_mask<T>(mut self, v: T) -> Self
11923    where
11924        T: std::convert::Into<wkt::FieldMask>,
11925    {
11926        self.read_mask = std::option::Option::Some(v.into());
11927        self
11928    }
11929
11930    /// Sets or clears the value of [read_mask][crate::model::ListDatasetVersionsRequest::read_mask].
11931    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
11932    where
11933        T: std::convert::Into<wkt::FieldMask>,
11934    {
11935        self.read_mask = v.map(|x| x.into());
11936        self
11937    }
11938
11939    /// Sets the value of [order_by][crate::model::ListDatasetVersionsRequest::order_by].
11940    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11941        self.order_by = v.into();
11942        self
11943    }
11944}
11945
11946#[cfg(feature = "dataset-service")]
11947impl wkt::message::Message for ListDatasetVersionsRequest {
11948    fn typename() -> &'static str {
11949        "type.googleapis.com/google.cloud.aiplatform.v1.ListDatasetVersionsRequest"
11950    }
11951}
11952
11953/// Response message for
11954/// [DatasetService.ListDatasetVersions][google.cloud.aiplatform.v1.DatasetService.ListDatasetVersions].
11955///
11956/// [google.cloud.aiplatform.v1.DatasetService.ListDatasetVersions]: crate::client::DatasetService::list_dataset_versions
11957#[cfg(feature = "dataset-service")]
11958#[derive(Clone, Default, PartialEq)]
11959#[non_exhaustive]
11960pub struct ListDatasetVersionsResponse {
11961    /// A list of DatasetVersions that matches the specified filter in the request.
11962    pub dataset_versions: std::vec::Vec<crate::model::DatasetVersion>,
11963
11964    /// The standard List next-page token.
11965    pub next_page_token: std::string::String,
11966
11967    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11968}
11969
11970#[cfg(feature = "dataset-service")]
11971impl ListDatasetVersionsResponse {
11972    pub fn new() -> Self {
11973        std::default::Default::default()
11974    }
11975
11976    /// Sets the value of [dataset_versions][crate::model::ListDatasetVersionsResponse::dataset_versions].
11977    pub fn set_dataset_versions<T, V>(mut self, v: T) -> Self
11978    where
11979        T: std::iter::IntoIterator<Item = V>,
11980        V: std::convert::Into<crate::model::DatasetVersion>,
11981    {
11982        use std::iter::Iterator;
11983        self.dataset_versions = v.into_iter().map(|i| i.into()).collect();
11984        self
11985    }
11986
11987    /// Sets the value of [next_page_token][crate::model::ListDatasetVersionsResponse::next_page_token].
11988    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11989        self.next_page_token = v.into();
11990        self
11991    }
11992}
11993
11994#[cfg(feature = "dataset-service")]
11995impl wkt::message::Message for ListDatasetVersionsResponse {
11996    fn typename() -> &'static str {
11997        "type.googleapis.com/google.cloud.aiplatform.v1.ListDatasetVersionsResponse"
11998    }
11999}
12000
12001#[cfg(feature = "dataset-service")]
12002#[doc(hidden)]
12003impl gax::paginator::internal::PageableResponse for ListDatasetVersionsResponse {
12004    type PageItem = crate::model::DatasetVersion;
12005
12006    fn items(self) -> std::vec::Vec<Self::PageItem> {
12007        self.dataset_versions
12008    }
12009
12010    fn next_page_token(&self) -> std::string::String {
12011        use std::clone::Clone;
12012        self.next_page_token.clone()
12013    }
12014}
12015
12016/// Request message for
12017/// [DatasetService.RestoreDatasetVersion][google.cloud.aiplatform.v1.DatasetService.RestoreDatasetVersion].
12018///
12019/// [google.cloud.aiplatform.v1.DatasetService.RestoreDatasetVersion]: crate::client::DatasetService::restore_dataset_version
12020#[cfg(feature = "dataset-service")]
12021#[derive(Clone, Default, PartialEq)]
12022#[non_exhaustive]
12023pub struct RestoreDatasetVersionRequest {
12024    /// Required. The name of the DatasetVersion resource.
12025    /// Format:
12026    /// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
12027    pub name: std::string::String,
12028
12029    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12030}
12031
12032#[cfg(feature = "dataset-service")]
12033impl RestoreDatasetVersionRequest {
12034    pub fn new() -> Self {
12035        std::default::Default::default()
12036    }
12037
12038    /// Sets the value of [name][crate::model::RestoreDatasetVersionRequest::name].
12039    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12040        self.name = v.into();
12041        self
12042    }
12043}
12044
12045#[cfg(feature = "dataset-service")]
12046impl wkt::message::Message for RestoreDatasetVersionRequest {
12047    fn typename() -> &'static str {
12048        "type.googleapis.com/google.cloud.aiplatform.v1.RestoreDatasetVersionRequest"
12049    }
12050}
12051
12052/// Runtime operation information for
12053/// [DatasetService.RestoreDatasetVersion][google.cloud.aiplatform.v1.DatasetService.RestoreDatasetVersion].
12054///
12055/// [google.cloud.aiplatform.v1.DatasetService.RestoreDatasetVersion]: crate::client::DatasetService::restore_dataset_version
12056#[cfg(feature = "dataset-service")]
12057#[derive(Clone, Default, PartialEq)]
12058#[non_exhaustive]
12059pub struct RestoreDatasetVersionOperationMetadata {
12060    /// The common part of the operation metadata.
12061    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
12062
12063    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12064}
12065
12066#[cfg(feature = "dataset-service")]
12067impl RestoreDatasetVersionOperationMetadata {
12068    pub fn new() -> Self {
12069        std::default::Default::default()
12070    }
12071
12072    /// Sets the value of [generic_metadata][crate::model::RestoreDatasetVersionOperationMetadata::generic_metadata].
12073    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
12074    where
12075        T: std::convert::Into<crate::model::GenericOperationMetadata>,
12076    {
12077        self.generic_metadata = std::option::Option::Some(v.into());
12078        self
12079    }
12080
12081    /// Sets or clears the value of [generic_metadata][crate::model::RestoreDatasetVersionOperationMetadata::generic_metadata].
12082    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
12083    where
12084        T: std::convert::Into<crate::model::GenericOperationMetadata>,
12085    {
12086        self.generic_metadata = v.map(|x| x.into());
12087        self
12088    }
12089}
12090
12091#[cfg(feature = "dataset-service")]
12092impl wkt::message::Message for RestoreDatasetVersionOperationMetadata {
12093    fn typename() -> &'static str {
12094        "type.googleapis.com/google.cloud.aiplatform.v1.RestoreDatasetVersionOperationMetadata"
12095    }
12096}
12097
12098/// Request message for
12099/// [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems].
12100///
12101/// [google.cloud.aiplatform.v1.DatasetService.ListDataItems]: crate::client::DatasetService::list_data_items
12102#[cfg(feature = "dataset-service")]
12103#[derive(Clone, Default, PartialEq)]
12104#[non_exhaustive]
12105pub struct ListDataItemsRequest {
12106    /// Required. The resource name of the Dataset to list DataItems from.
12107    /// Format:
12108    /// `projects/{project}/locations/{location}/datasets/{dataset}`
12109    pub parent: std::string::String,
12110
12111    /// The standard list filter.
12112    pub filter: std::string::String,
12113
12114    /// The standard list page size.
12115    pub page_size: i32,
12116
12117    /// The standard list page token.
12118    pub page_token: std::string::String,
12119
12120    /// Mask specifying which fields to read.
12121    pub read_mask: std::option::Option<wkt::FieldMask>,
12122
12123    /// A comma-separated list of fields to order by, sorted in ascending order.
12124    /// Use "desc" after a field name for descending.
12125    pub order_by: std::string::String,
12126
12127    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12128}
12129
12130#[cfg(feature = "dataset-service")]
12131impl ListDataItemsRequest {
12132    pub fn new() -> Self {
12133        std::default::Default::default()
12134    }
12135
12136    /// Sets the value of [parent][crate::model::ListDataItemsRequest::parent].
12137    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12138        self.parent = v.into();
12139        self
12140    }
12141
12142    /// Sets the value of [filter][crate::model::ListDataItemsRequest::filter].
12143    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12144        self.filter = v.into();
12145        self
12146    }
12147
12148    /// Sets the value of [page_size][crate::model::ListDataItemsRequest::page_size].
12149    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12150        self.page_size = v.into();
12151        self
12152    }
12153
12154    /// Sets the value of [page_token][crate::model::ListDataItemsRequest::page_token].
12155    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12156        self.page_token = v.into();
12157        self
12158    }
12159
12160    /// Sets the value of [read_mask][crate::model::ListDataItemsRequest::read_mask].
12161    pub fn set_read_mask<T>(mut self, v: T) -> Self
12162    where
12163        T: std::convert::Into<wkt::FieldMask>,
12164    {
12165        self.read_mask = std::option::Option::Some(v.into());
12166        self
12167    }
12168
12169    /// Sets or clears the value of [read_mask][crate::model::ListDataItemsRequest::read_mask].
12170    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
12171    where
12172        T: std::convert::Into<wkt::FieldMask>,
12173    {
12174        self.read_mask = v.map(|x| x.into());
12175        self
12176    }
12177
12178    /// Sets the value of [order_by][crate::model::ListDataItemsRequest::order_by].
12179    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12180        self.order_by = v.into();
12181        self
12182    }
12183}
12184
12185#[cfg(feature = "dataset-service")]
12186impl wkt::message::Message for ListDataItemsRequest {
12187    fn typename() -> &'static str {
12188        "type.googleapis.com/google.cloud.aiplatform.v1.ListDataItemsRequest"
12189    }
12190}
12191
12192/// Response message for
12193/// [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems].
12194///
12195/// [google.cloud.aiplatform.v1.DatasetService.ListDataItems]: crate::client::DatasetService::list_data_items
12196#[cfg(feature = "dataset-service")]
12197#[derive(Clone, Default, PartialEq)]
12198#[non_exhaustive]
12199pub struct ListDataItemsResponse {
12200    /// A list of DataItems that matches the specified filter in the request.
12201    pub data_items: std::vec::Vec<crate::model::DataItem>,
12202
12203    /// The standard List next-page token.
12204    pub next_page_token: std::string::String,
12205
12206    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12207}
12208
12209#[cfg(feature = "dataset-service")]
12210impl ListDataItemsResponse {
12211    pub fn new() -> Self {
12212        std::default::Default::default()
12213    }
12214
12215    /// Sets the value of [data_items][crate::model::ListDataItemsResponse::data_items].
12216    pub fn set_data_items<T, V>(mut self, v: T) -> Self
12217    where
12218        T: std::iter::IntoIterator<Item = V>,
12219        V: std::convert::Into<crate::model::DataItem>,
12220    {
12221        use std::iter::Iterator;
12222        self.data_items = v.into_iter().map(|i| i.into()).collect();
12223        self
12224    }
12225
12226    /// Sets the value of [next_page_token][crate::model::ListDataItemsResponse::next_page_token].
12227    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12228        self.next_page_token = v.into();
12229        self
12230    }
12231}
12232
12233#[cfg(feature = "dataset-service")]
12234impl wkt::message::Message for ListDataItemsResponse {
12235    fn typename() -> &'static str {
12236        "type.googleapis.com/google.cloud.aiplatform.v1.ListDataItemsResponse"
12237    }
12238}
12239
12240#[cfg(feature = "dataset-service")]
12241#[doc(hidden)]
12242impl gax::paginator::internal::PageableResponse for ListDataItemsResponse {
12243    type PageItem = crate::model::DataItem;
12244
12245    fn items(self) -> std::vec::Vec<Self::PageItem> {
12246        self.data_items
12247    }
12248
12249    fn next_page_token(&self) -> std::string::String {
12250        use std::clone::Clone;
12251        self.next_page_token.clone()
12252    }
12253}
12254
12255/// Request message for
12256/// [DatasetService.SearchDataItems][google.cloud.aiplatform.v1.DatasetService.SearchDataItems].
12257///
12258/// [google.cloud.aiplatform.v1.DatasetService.SearchDataItems]: crate::client::DatasetService::search_data_items
12259#[cfg(feature = "dataset-service")]
12260#[derive(Clone, Default, PartialEq)]
12261#[non_exhaustive]
12262pub struct SearchDataItemsRequest {
12263    /// Required. The resource name of the Dataset from which to search DataItems.
12264    /// Format:
12265    /// `projects/{project}/locations/{location}/datasets/{dataset}`
12266    pub dataset: std::string::String,
12267
12268    /// The resource name of a SavedQuery(annotation set in UI).
12269    /// Format:
12270    /// `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`
12271    /// All of the search will be done in the context of this SavedQuery.
12272    #[deprecated]
12273    pub saved_query: std::string::String,
12274
12275    /// The resource name of a DataLabelingJob.
12276    /// Format:
12277    /// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
12278    /// If this field is set, all of the search will be done in the context of
12279    /// this DataLabelingJob.
12280    pub data_labeling_job: std::string::String,
12281
12282    /// An expression for filtering the DataItem that will be returned.
12283    ///
12284    /// * `data_item_id` - for = or !=.
12285    /// * `labeled` - for = or !=.
12286    /// * `has_annotation(ANNOTATION_SPEC_ID)` - true only for DataItem that
12287    ///   have at least one annotation with annotation_spec_id =
12288    ///   `ANNOTATION_SPEC_ID` in the context of SavedQuery or DataLabelingJob.
12289    ///
12290    /// For example:
12291    ///
12292    /// * `data_item=1`
12293    /// * `has_annotation(5)`
12294    pub data_item_filter: std::string::String,
12295
12296    /// An expression for filtering the Annotations that will be returned per
12297    /// DataItem.
12298    ///
12299    /// * `annotation_spec_id` - for = or !=.
12300    #[deprecated]
12301    pub annotations_filter: std::string::String,
12302
12303    /// An expression that specifies what Annotations will be returned per
12304    /// DataItem. Annotations satisfied either of the conditions will be returned.
12305    ///
12306    /// * `annotation_spec_id` - for = or !=.
12307    ///   Must specify `saved_query_id=` - saved query id that annotations should
12308    ///   belong to.
12309    pub annotation_filters: std::vec::Vec<std::string::String>,
12310
12311    /// Mask specifying which fields of
12312    /// [DataItemView][google.cloud.aiplatform.v1.DataItemView] to read.
12313    ///
12314    /// [google.cloud.aiplatform.v1.DataItemView]: crate::model::DataItemView
12315    pub field_mask: std::option::Option<wkt::FieldMask>,
12316
12317    /// If set, only up to this many of Annotations will be returned per
12318    /// DataItemView. The maximum value is 1000. If not set, the maximum value will
12319    /// be used.
12320    pub annotations_limit: i32,
12321
12322    /// Requested page size. Server may return fewer results than requested.
12323    /// Default and maximum page size is 100.
12324    pub page_size: i32,
12325
12326    /// A comma-separated list of fields to order by, sorted in ascending order.
12327    /// Use "desc" after a field name for descending.
12328    #[deprecated]
12329    pub order_by: std::string::String,
12330
12331    /// A token identifying a page of results for the server to return
12332    /// Typically obtained via
12333    /// [SearchDataItemsResponse.next_page_token][google.cloud.aiplatform.v1.SearchDataItemsResponse.next_page_token]
12334    /// of the previous
12335    /// [DatasetService.SearchDataItems][google.cloud.aiplatform.v1.DatasetService.SearchDataItems]
12336    /// call.
12337    ///
12338    /// [google.cloud.aiplatform.v1.DatasetService.SearchDataItems]: crate::client::DatasetService::search_data_items
12339    /// [google.cloud.aiplatform.v1.SearchDataItemsResponse.next_page_token]: crate::model::SearchDataItemsResponse::next_page_token
12340    pub page_token: std::string::String,
12341
12342    pub order: std::option::Option<crate::model::search_data_items_request::Order>,
12343
12344    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12345}
12346
12347#[cfg(feature = "dataset-service")]
12348impl SearchDataItemsRequest {
12349    pub fn new() -> Self {
12350        std::default::Default::default()
12351    }
12352
12353    /// Sets the value of [dataset][crate::model::SearchDataItemsRequest::dataset].
12354    pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12355        self.dataset = v.into();
12356        self
12357    }
12358
12359    /// Sets the value of [saved_query][crate::model::SearchDataItemsRequest::saved_query].
12360    #[deprecated]
12361    pub fn set_saved_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12362        self.saved_query = v.into();
12363        self
12364    }
12365
12366    /// Sets the value of [data_labeling_job][crate::model::SearchDataItemsRequest::data_labeling_job].
12367    pub fn set_data_labeling_job<T: std::convert::Into<std::string::String>>(
12368        mut self,
12369        v: T,
12370    ) -> Self {
12371        self.data_labeling_job = v.into();
12372        self
12373    }
12374
12375    /// Sets the value of [data_item_filter][crate::model::SearchDataItemsRequest::data_item_filter].
12376    pub fn set_data_item_filter<T: std::convert::Into<std::string::String>>(
12377        mut self,
12378        v: T,
12379    ) -> Self {
12380        self.data_item_filter = v.into();
12381        self
12382    }
12383
12384    /// Sets the value of [annotations_filter][crate::model::SearchDataItemsRequest::annotations_filter].
12385    #[deprecated]
12386    pub fn set_annotations_filter<T: std::convert::Into<std::string::String>>(
12387        mut self,
12388        v: T,
12389    ) -> Self {
12390        self.annotations_filter = v.into();
12391        self
12392    }
12393
12394    /// Sets the value of [annotation_filters][crate::model::SearchDataItemsRequest::annotation_filters].
12395    pub fn set_annotation_filters<T, V>(mut self, v: T) -> Self
12396    where
12397        T: std::iter::IntoIterator<Item = V>,
12398        V: std::convert::Into<std::string::String>,
12399    {
12400        use std::iter::Iterator;
12401        self.annotation_filters = v.into_iter().map(|i| i.into()).collect();
12402        self
12403    }
12404
12405    /// Sets the value of [field_mask][crate::model::SearchDataItemsRequest::field_mask].
12406    pub fn set_field_mask<T>(mut self, v: T) -> Self
12407    where
12408        T: std::convert::Into<wkt::FieldMask>,
12409    {
12410        self.field_mask = std::option::Option::Some(v.into());
12411        self
12412    }
12413
12414    /// Sets or clears the value of [field_mask][crate::model::SearchDataItemsRequest::field_mask].
12415    pub fn set_or_clear_field_mask<T>(mut self, v: std::option::Option<T>) -> Self
12416    where
12417        T: std::convert::Into<wkt::FieldMask>,
12418    {
12419        self.field_mask = v.map(|x| x.into());
12420        self
12421    }
12422
12423    /// Sets the value of [annotations_limit][crate::model::SearchDataItemsRequest::annotations_limit].
12424    pub fn set_annotations_limit<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12425        self.annotations_limit = v.into();
12426        self
12427    }
12428
12429    /// Sets the value of [page_size][crate::model::SearchDataItemsRequest::page_size].
12430    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12431        self.page_size = v.into();
12432        self
12433    }
12434
12435    /// Sets the value of [order_by][crate::model::SearchDataItemsRequest::order_by].
12436    #[deprecated]
12437    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12438        self.order_by = v.into();
12439        self
12440    }
12441
12442    /// Sets the value of [page_token][crate::model::SearchDataItemsRequest::page_token].
12443    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12444        self.page_token = v.into();
12445        self
12446    }
12447
12448    /// Sets the value of [order][crate::model::SearchDataItemsRequest::order].
12449    ///
12450    /// Note that all the setters affecting `order` are mutually
12451    /// exclusive.
12452    pub fn set_order<
12453        T: std::convert::Into<std::option::Option<crate::model::search_data_items_request::Order>>,
12454    >(
12455        mut self,
12456        v: T,
12457    ) -> Self {
12458        self.order = v.into();
12459        self
12460    }
12461
12462    /// The value of [order][crate::model::SearchDataItemsRequest::order]
12463    /// if it holds a `OrderByDataItem`, `None` if the field is not set or
12464    /// holds a different branch.
12465    pub fn order_by_data_item(&self) -> std::option::Option<&std::string::String> {
12466        #[allow(unreachable_patterns)]
12467        self.order.as_ref().and_then(|v| match v {
12468            crate::model::search_data_items_request::Order::OrderByDataItem(v) => {
12469                std::option::Option::Some(v)
12470            }
12471            _ => std::option::Option::None,
12472        })
12473    }
12474
12475    /// Sets the value of [order][crate::model::SearchDataItemsRequest::order]
12476    /// to hold a `OrderByDataItem`.
12477    ///
12478    /// Note that all the setters affecting `order` are
12479    /// mutually exclusive.
12480    pub fn set_order_by_data_item<T: std::convert::Into<std::string::String>>(
12481        mut self,
12482        v: T,
12483    ) -> Self {
12484        self.order = std::option::Option::Some(
12485            crate::model::search_data_items_request::Order::OrderByDataItem(v.into()),
12486        );
12487        self
12488    }
12489
12490    /// The value of [order][crate::model::SearchDataItemsRequest::order]
12491    /// if it holds a `OrderByAnnotation`, `None` if the field is not set or
12492    /// holds a different branch.
12493    pub fn order_by_annotation(
12494        &self,
12495    ) -> std::option::Option<
12496        &std::boxed::Box<crate::model::search_data_items_request::OrderByAnnotation>,
12497    > {
12498        #[allow(unreachable_patterns)]
12499        self.order.as_ref().and_then(|v| match v {
12500            crate::model::search_data_items_request::Order::OrderByAnnotation(v) => {
12501                std::option::Option::Some(v)
12502            }
12503            _ => std::option::Option::None,
12504        })
12505    }
12506
12507    /// Sets the value of [order][crate::model::SearchDataItemsRequest::order]
12508    /// to hold a `OrderByAnnotation`.
12509    ///
12510    /// Note that all the setters affecting `order` are
12511    /// mutually exclusive.
12512    pub fn set_order_by_annotation<
12513        T: std::convert::Into<
12514                std::boxed::Box<crate::model::search_data_items_request::OrderByAnnotation>,
12515            >,
12516    >(
12517        mut self,
12518        v: T,
12519    ) -> Self {
12520        self.order = std::option::Option::Some(
12521            crate::model::search_data_items_request::Order::OrderByAnnotation(v.into()),
12522        );
12523        self
12524    }
12525}
12526
12527#[cfg(feature = "dataset-service")]
12528impl wkt::message::Message for SearchDataItemsRequest {
12529    fn typename() -> &'static str {
12530        "type.googleapis.com/google.cloud.aiplatform.v1.SearchDataItemsRequest"
12531    }
12532}
12533
12534/// Defines additional types related to [SearchDataItemsRequest].
12535#[cfg(feature = "dataset-service")]
12536pub mod search_data_items_request {
12537    #[allow(unused_imports)]
12538    use super::*;
12539
12540    /// Expression that allows ranking results based on annotation's property.
12541    #[cfg(feature = "dataset-service")]
12542    #[derive(Clone, Default, PartialEq)]
12543    #[non_exhaustive]
12544    pub struct OrderByAnnotation {
12545        /// Required. Saved query of the Annotation. Only Annotations belong to this
12546        /// saved query will be considered for ordering.
12547        pub saved_query: std::string::String,
12548
12549        /// A comma-separated list of annotation fields to order by, sorted in
12550        /// ascending order. Use "desc" after a field name for descending. Must also
12551        /// specify saved_query.
12552        pub order_by: std::string::String,
12553
12554        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12555    }
12556
12557    #[cfg(feature = "dataset-service")]
12558    impl OrderByAnnotation {
12559        pub fn new() -> Self {
12560            std::default::Default::default()
12561        }
12562
12563        /// Sets the value of [saved_query][crate::model::search_data_items_request::OrderByAnnotation::saved_query].
12564        pub fn set_saved_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12565            self.saved_query = v.into();
12566            self
12567        }
12568
12569        /// Sets the value of [order_by][crate::model::search_data_items_request::OrderByAnnotation::order_by].
12570        pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12571            self.order_by = v.into();
12572            self
12573        }
12574    }
12575
12576    #[cfg(feature = "dataset-service")]
12577    impl wkt::message::Message for OrderByAnnotation {
12578        fn typename() -> &'static str {
12579            "type.googleapis.com/google.cloud.aiplatform.v1.SearchDataItemsRequest.OrderByAnnotation"
12580        }
12581    }
12582
12583    #[cfg(feature = "dataset-service")]
12584    #[derive(Clone, Debug, PartialEq)]
12585    #[non_exhaustive]
12586    pub enum Order {
12587        /// A comma-separated list of data item fields to order by, sorted in
12588        /// ascending order. Use "desc" after a field name for descending.
12589        OrderByDataItem(std::string::String),
12590        /// Expression that allows ranking results based on annotation's property.
12591        OrderByAnnotation(
12592            std::boxed::Box<crate::model::search_data_items_request::OrderByAnnotation>,
12593        ),
12594    }
12595}
12596
12597/// Response message for
12598/// [DatasetService.SearchDataItems][google.cloud.aiplatform.v1.DatasetService.SearchDataItems].
12599///
12600/// [google.cloud.aiplatform.v1.DatasetService.SearchDataItems]: crate::client::DatasetService::search_data_items
12601#[cfg(feature = "dataset-service")]
12602#[derive(Clone, Default, PartialEq)]
12603#[non_exhaustive]
12604pub struct SearchDataItemsResponse {
12605    /// The DataItemViews read.
12606    pub data_item_views: std::vec::Vec<crate::model::DataItemView>,
12607
12608    /// A token to retrieve next page of results.
12609    /// Pass to
12610    /// [SearchDataItemsRequest.page_token][google.cloud.aiplatform.v1.SearchDataItemsRequest.page_token]
12611    /// to obtain that page.
12612    ///
12613    /// [google.cloud.aiplatform.v1.SearchDataItemsRequest.page_token]: crate::model::SearchDataItemsRequest::page_token
12614    pub next_page_token: std::string::String,
12615
12616    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12617}
12618
12619#[cfg(feature = "dataset-service")]
12620impl SearchDataItemsResponse {
12621    pub fn new() -> Self {
12622        std::default::Default::default()
12623    }
12624
12625    /// Sets the value of [data_item_views][crate::model::SearchDataItemsResponse::data_item_views].
12626    pub fn set_data_item_views<T, V>(mut self, v: T) -> Self
12627    where
12628        T: std::iter::IntoIterator<Item = V>,
12629        V: std::convert::Into<crate::model::DataItemView>,
12630    {
12631        use std::iter::Iterator;
12632        self.data_item_views = v.into_iter().map(|i| i.into()).collect();
12633        self
12634    }
12635
12636    /// Sets the value of [next_page_token][crate::model::SearchDataItemsResponse::next_page_token].
12637    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12638        self.next_page_token = v.into();
12639        self
12640    }
12641}
12642
12643#[cfg(feature = "dataset-service")]
12644impl wkt::message::Message for SearchDataItemsResponse {
12645    fn typename() -> &'static str {
12646        "type.googleapis.com/google.cloud.aiplatform.v1.SearchDataItemsResponse"
12647    }
12648}
12649
12650#[cfg(feature = "dataset-service")]
12651#[doc(hidden)]
12652impl gax::paginator::internal::PageableResponse for SearchDataItemsResponse {
12653    type PageItem = crate::model::DataItemView;
12654
12655    fn items(self) -> std::vec::Vec<Self::PageItem> {
12656        self.data_item_views
12657    }
12658
12659    fn next_page_token(&self) -> std::string::String {
12660        use std::clone::Clone;
12661        self.next_page_token.clone()
12662    }
12663}
12664
12665/// A container for a single DataItem and Annotations on it.
12666#[cfg(feature = "dataset-service")]
12667#[derive(Clone, Default, PartialEq)]
12668#[non_exhaustive]
12669pub struct DataItemView {
12670    /// The DataItem.
12671    pub data_item: std::option::Option<crate::model::DataItem>,
12672
12673    /// The Annotations on the DataItem. If too many Annotations should be returned
12674    /// for the DataItem, this field will be truncated per annotations_limit in
12675    /// request. If it was, then the has_truncated_annotations will be set to true.
12676    pub annotations: std::vec::Vec<crate::model::Annotation>,
12677
12678    /// True if and only if the Annotations field has been truncated. It happens if
12679    /// more Annotations for this DataItem met the request's annotation_filter than
12680    /// are allowed to be returned by annotations_limit.
12681    /// Note that if Annotations field is not being returned due to field mask,
12682    /// then this field will not be set to true no matter how many Annotations are
12683    /// there.
12684    pub has_truncated_annotations: bool,
12685
12686    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12687}
12688
12689#[cfg(feature = "dataset-service")]
12690impl DataItemView {
12691    pub fn new() -> Self {
12692        std::default::Default::default()
12693    }
12694
12695    /// Sets the value of [data_item][crate::model::DataItemView::data_item].
12696    pub fn set_data_item<T>(mut self, v: T) -> Self
12697    where
12698        T: std::convert::Into<crate::model::DataItem>,
12699    {
12700        self.data_item = std::option::Option::Some(v.into());
12701        self
12702    }
12703
12704    /// Sets or clears the value of [data_item][crate::model::DataItemView::data_item].
12705    pub fn set_or_clear_data_item<T>(mut self, v: std::option::Option<T>) -> Self
12706    where
12707        T: std::convert::Into<crate::model::DataItem>,
12708    {
12709        self.data_item = v.map(|x| x.into());
12710        self
12711    }
12712
12713    /// Sets the value of [annotations][crate::model::DataItemView::annotations].
12714    pub fn set_annotations<T, V>(mut self, v: T) -> Self
12715    where
12716        T: std::iter::IntoIterator<Item = V>,
12717        V: std::convert::Into<crate::model::Annotation>,
12718    {
12719        use std::iter::Iterator;
12720        self.annotations = v.into_iter().map(|i| i.into()).collect();
12721        self
12722    }
12723
12724    /// Sets the value of [has_truncated_annotations][crate::model::DataItemView::has_truncated_annotations].
12725    pub fn set_has_truncated_annotations<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12726        self.has_truncated_annotations = v.into();
12727        self
12728    }
12729}
12730
12731#[cfg(feature = "dataset-service")]
12732impl wkt::message::Message for DataItemView {
12733    fn typename() -> &'static str {
12734        "type.googleapis.com/google.cloud.aiplatform.v1.DataItemView"
12735    }
12736}
12737
12738/// Request message for
12739/// [DatasetService.ListSavedQueries][google.cloud.aiplatform.v1.DatasetService.ListSavedQueries].
12740///
12741/// [google.cloud.aiplatform.v1.DatasetService.ListSavedQueries]: crate::client::DatasetService::list_saved_queries
12742#[cfg(feature = "dataset-service")]
12743#[derive(Clone, Default, PartialEq)]
12744#[non_exhaustive]
12745pub struct ListSavedQueriesRequest {
12746    /// Required. The resource name of the Dataset to list SavedQueries from.
12747    /// Format:
12748    /// `projects/{project}/locations/{location}/datasets/{dataset}`
12749    pub parent: std::string::String,
12750
12751    /// The standard list filter.
12752    pub filter: std::string::String,
12753
12754    /// The standard list page size.
12755    pub page_size: i32,
12756
12757    /// The standard list page token.
12758    pub page_token: std::string::String,
12759
12760    /// Mask specifying which fields to read.
12761    pub read_mask: std::option::Option<wkt::FieldMask>,
12762
12763    /// A comma-separated list of fields to order by, sorted in ascending order.
12764    /// Use "desc" after a field name for descending.
12765    pub order_by: std::string::String,
12766
12767    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12768}
12769
12770#[cfg(feature = "dataset-service")]
12771impl ListSavedQueriesRequest {
12772    pub fn new() -> Self {
12773        std::default::Default::default()
12774    }
12775
12776    /// Sets the value of [parent][crate::model::ListSavedQueriesRequest::parent].
12777    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12778        self.parent = v.into();
12779        self
12780    }
12781
12782    /// Sets the value of [filter][crate::model::ListSavedQueriesRequest::filter].
12783    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12784        self.filter = v.into();
12785        self
12786    }
12787
12788    /// Sets the value of [page_size][crate::model::ListSavedQueriesRequest::page_size].
12789    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12790        self.page_size = v.into();
12791        self
12792    }
12793
12794    /// Sets the value of [page_token][crate::model::ListSavedQueriesRequest::page_token].
12795    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12796        self.page_token = v.into();
12797        self
12798    }
12799
12800    /// Sets the value of [read_mask][crate::model::ListSavedQueriesRequest::read_mask].
12801    pub fn set_read_mask<T>(mut self, v: T) -> Self
12802    where
12803        T: std::convert::Into<wkt::FieldMask>,
12804    {
12805        self.read_mask = std::option::Option::Some(v.into());
12806        self
12807    }
12808
12809    /// Sets or clears the value of [read_mask][crate::model::ListSavedQueriesRequest::read_mask].
12810    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
12811    where
12812        T: std::convert::Into<wkt::FieldMask>,
12813    {
12814        self.read_mask = v.map(|x| x.into());
12815        self
12816    }
12817
12818    /// Sets the value of [order_by][crate::model::ListSavedQueriesRequest::order_by].
12819    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12820        self.order_by = v.into();
12821        self
12822    }
12823}
12824
12825#[cfg(feature = "dataset-service")]
12826impl wkt::message::Message for ListSavedQueriesRequest {
12827    fn typename() -> &'static str {
12828        "type.googleapis.com/google.cloud.aiplatform.v1.ListSavedQueriesRequest"
12829    }
12830}
12831
12832/// Response message for
12833/// [DatasetService.ListSavedQueries][google.cloud.aiplatform.v1.DatasetService.ListSavedQueries].
12834///
12835/// [google.cloud.aiplatform.v1.DatasetService.ListSavedQueries]: crate::client::DatasetService::list_saved_queries
12836#[cfg(feature = "dataset-service")]
12837#[derive(Clone, Default, PartialEq)]
12838#[non_exhaustive]
12839pub struct ListSavedQueriesResponse {
12840    /// A list of SavedQueries that match the specified filter in the request.
12841    pub saved_queries: std::vec::Vec<crate::model::SavedQuery>,
12842
12843    /// The standard List next-page token.
12844    pub next_page_token: std::string::String,
12845
12846    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12847}
12848
12849#[cfg(feature = "dataset-service")]
12850impl ListSavedQueriesResponse {
12851    pub fn new() -> Self {
12852        std::default::Default::default()
12853    }
12854
12855    /// Sets the value of [saved_queries][crate::model::ListSavedQueriesResponse::saved_queries].
12856    pub fn set_saved_queries<T, V>(mut self, v: T) -> Self
12857    where
12858        T: std::iter::IntoIterator<Item = V>,
12859        V: std::convert::Into<crate::model::SavedQuery>,
12860    {
12861        use std::iter::Iterator;
12862        self.saved_queries = v.into_iter().map(|i| i.into()).collect();
12863        self
12864    }
12865
12866    /// Sets the value of [next_page_token][crate::model::ListSavedQueriesResponse::next_page_token].
12867    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12868        self.next_page_token = v.into();
12869        self
12870    }
12871}
12872
12873#[cfg(feature = "dataset-service")]
12874impl wkt::message::Message for ListSavedQueriesResponse {
12875    fn typename() -> &'static str {
12876        "type.googleapis.com/google.cloud.aiplatform.v1.ListSavedQueriesResponse"
12877    }
12878}
12879
12880#[cfg(feature = "dataset-service")]
12881#[doc(hidden)]
12882impl gax::paginator::internal::PageableResponse for ListSavedQueriesResponse {
12883    type PageItem = crate::model::SavedQuery;
12884
12885    fn items(self) -> std::vec::Vec<Self::PageItem> {
12886        self.saved_queries
12887    }
12888
12889    fn next_page_token(&self) -> std::string::String {
12890        use std::clone::Clone;
12891        self.next_page_token.clone()
12892    }
12893}
12894
12895/// Request message for
12896/// [DatasetService.DeleteSavedQuery][google.cloud.aiplatform.v1.DatasetService.DeleteSavedQuery].
12897///
12898/// [google.cloud.aiplatform.v1.DatasetService.DeleteSavedQuery]: crate::client::DatasetService::delete_saved_query
12899#[cfg(feature = "dataset-service")]
12900#[derive(Clone, Default, PartialEq)]
12901#[non_exhaustive]
12902pub struct DeleteSavedQueryRequest {
12903    /// Required. The resource name of the SavedQuery to delete.
12904    /// Format:
12905    /// `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`
12906    pub name: std::string::String,
12907
12908    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12909}
12910
12911#[cfg(feature = "dataset-service")]
12912impl DeleteSavedQueryRequest {
12913    pub fn new() -> Self {
12914        std::default::Default::default()
12915    }
12916
12917    /// Sets the value of [name][crate::model::DeleteSavedQueryRequest::name].
12918    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12919        self.name = v.into();
12920        self
12921    }
12922}
12923
12924#[cfg(feature = "dataset-service")]
12925impl wkt::message::Message for DeleteSavedQueryRequest {
12926    fn typename() -> &'static str {
12927        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteSavedQueryRequest"
12928    }
12929}
12930
12931/// Request message for
12932/// [DatasetService.GetAnnotationSpec][google.cloud.aiplatform.v1.DatasetService.GetAnnotationSpec].
12933///
12934/// [google.cloud.aiplatform.v1.DatasetService.GetAnnotationSpec]: crate::client::DatasetService::get_annotation_spec
12935#[cfg(feature = "dataset-service")]
12936#[derive(Clone, Default, PartialEq)]
12937#[non_exhaustive]
12938pub struct GetAnnotationSpecRequest {
12939    /// Required. The name of the AnnotationSpec resource.
12940    /// Format:
12941    /// `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
12942    pub name: std::string::String,
12943
12944    /// Mask specifying which fields to read.
12945    pub read_mask: std::option::Option<wkt::FieldMask>,
12946
12947    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12948}
12949
12950#[cfg(feature = "dataset-service")]
12951impl GetAnnotationSpecRequest {
12952    pub fn new() -> Self {
12953        std::default::Default::default()
12954    }
12955
12956    /// Sets the value of [name][crate::model::GetAnnotationSpecRequest::name].
12957    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12958        self.name = v.into();
12959        self
12960    }
12961
12962    /// Sets the value of [read_mask][crate::model::GetAnnotationSpecRequest::read_mask].
12963    pub fn set_read_mask<T>(mut self, v: T) -> Self
12964    where
12965        T: std::convert::Into<wkt::FieldMask>,
12966    {
12967        self.read_mask = std::option::Option::Some(v.into());
12968        self
12969    }
12970
12971    /// Sets or clears the value of [read_mask][crate::model::GetAnnotationSpecRequest::read_mask].
12972    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
12973    where
12974        T: std::convert::Into<wkt::FieldMask>,
12975    {
12976        self.read_mask = v.map(|x| x.into());
12977        self
12978    }
12979}
12980
12981#[cfg(feature = "dataset-service")]
12982impl wkt::message::Message for GetAnnotationSpecRequest {
12983    fn typename() -> &'static str {
12984        "type.googleapis.com/google.cloud.aiplatform.v1.GetAnnotationSpecRequest"
12985    }
12986}
12987
12988/// Request message for
12989/// [DatasetService.ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
12990///
12991/// [google.cloud.aiplatform.v1.DatasetService.ListAnnotations]: crate::client::DatasetService::list_annotations
12992#[cfg(feature = "dataset-service")]
12993#[derive(Clone, Default, PartialEq)]
12994#[non_exhaustive]
12995pub struct ListAnnotationsRequest {
12996    /// Required. The resource name of the DataItem to list Annotations from.
12997    /// Format:
12998    /// `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
12999    pub parent: std::string::String,
13000
13001    /// The standard list filter.
13002    pub filter: std::string::String,
13003
13004    /// The standard list page size.
13005    pub page_size: i32,
13006
13007    /// The standard list page token.
13008    pub page_token: std::string::String,
13009
13010    /// Mask specifying which fields to read.
13011    pub read_mask: std::option::Option<wkt::FieldMask>,
13012
13013    /// A comma-separated list of fields to order by, sorted in ascending order.
13014    /// Use "desc" after a field name for descending.
13015    pub order_by: std::string::String,
13016
13017    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13018}
13019
13020#[cfg(feature = "dataset-service")]
13021impl ListAnnotationsRequest {
13022    pub fn new() -> Self {
13023        std::default::Default::default()
13024    }
13025
13026    /// Sets the value of [parent][crate::model::ListAnnotationsRequest::parent].
13027    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13028        self.parent = v.into();
13029        self
13030    }
13031
13032    /// Sets the value of [filter][crate::model::ListAnnotationsRequest::filter].
13033    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13034        self.filter = v.into();
13035        self
13036    }
13037
13038    /// Sets the value of [page_size][crate::model::ListAnnotationsRequest::page_size].
13039    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13040        self.page_size = v.into();
13041        self
13042    }
13043
13044    /// Sets the value of [page_token][crate::model::ListAnnotationsRequest::page_token].
13045    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13046        self.page_token = v.into();
13047        self
13048    }
13049
13050    /// Sets the value of [read_mask][crate::model::ListAnnotationsRequest::read_mask].
13051    pub fn set_read_mask<T>(mut self, v: T) -> Self
13052    where
13053        T: std::convert::Into<wkt::FieldMask>,
13054    {
13055        self.read_mask = std::option::Option::Some(v.into());
13056        self
13057    }
13058
13059    /// Sets or clears the value of [read_mask][crate::model::ListAnnotationsRequest::read_mask].
13060    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
13061    where
13062        T: std::convert::Into<wkt::FieldMask>,
13063    {
13064        self.read_mask = v.map(|x| x.into());
13065        self
13066    }
13067
13068    /// Sets the value of [order_by][crate::model::ListAnnotationsRequest::order_by].
13069    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13070        self.order_by = v.into();
13071        self
13072    }
13073}
13074
13075#[cfg(feature = "dataset-service")]
13076impl wkt::message::Message for ListAnnotationsRequest {
13077    fn typename() -> &'static str {
13078        "type.googleapis.com/google.cloud.aiplatform.v1.ListAnnotationsRequest"
13079    }
13080}
13081
13082/// Response message for
13083/// [DatasetService.ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations].
13084///
13085/// [google.cloud.aiplatform.v1.DatasetService.ListAnnotations]: crate::client::DatasetService::list_annotations
13086#[cfg(feature = "dataset-service")]
13087#[derive(Clone, Default, PartialEq)]
13088#[non_exhaustive]
13089pub struct ListAnnotationsResponse {
13090    /// A list of Annotations that matches the specified filter in the request.
13091    pub annotations: std::vec::Vec<crate::model::Annotation>,
13092
13093    /// The standard List next-page token.
13094    pub next_page_token: std::string::String,
13095
13096    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13097}
13098
13099#[cfg(feature = "dataset-service")]
13100impl ListAnnotationsResponse {
13101    pub fn new() -> Self {
13102        std::default::Default::default()
13103    }
13104
13105    /// Sets the value of [annotations][crate::model::ListAnnotationsResponse::annotations].
13106    pub fn set_annotations<T, V>(mut self, v: T) -> Self
13107    where
13108        T: std::iter::IntoIterator<Item = V>,
13109        V: std::convert::Into<crate::model::Annotation>,
13110    {
13111        use std::iter::Iterator;
13112        self.annotations = v.into_iter().map(|i| i.into()).collect();
13113        self
13114    }
13115
13116    /// Sets the value of [next_page_token][crate::model::ListAnnotationsResponse::next_page_token].
13117    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13118        self.next_page_token = v.into();
13119        self
13120    }
13121}
13122
13123#[cfg(feature = "dataset-service")]
13124impl wkt::message::Message for ListAnnotationsResponse {
13125    fn typename() -> &'static str {
13126        "type.googleapis.com/google.cloud.aiplatform.v1.ListAnnotationsResponse"
13127    }
13128}
13129
13130#[cfg(feature = "dataset-service")]
13131#[doc(hidden)]
13132impl gax::paginator::internal::PageableResponse for ListAnnotationsResponse {
13133    type PageItem = crate::model::Annotation;
13134
13135    fn items(self) -> std::vec::Vec<Self::PageItem> {
13136        self.annotations
13137    }
13138
13139    fn next_page_token(&self) -> std::string::String {
13140        use std::clone::Clone;
13141        self.next_page_token.clone()
13142    }
13143}
13144
13145/// Describes the dataset version.
13146#[cfg(feature = "dataset-service")]
13147#[derive(Clone, Default, PartialEq)]
13148#[non_exhaustive]
13149pub struct DatasetVersion {
13150    /// Output only. Identifier. The resource name of the DatasetVersion.
13151    pub name: std::string::String,
13152
13153    /// Output only. Timestamp when this DatasetVersion was created.
13154    pub create_time: std::option::Option<wkt::Timestamp>,
13155
13156    /// Output only. Timestamp when this DatasetVersion was last updated.
13157    pub update_time: std::option::Option<wkt::Timestamp>,
13158
13159    /// Used to perform consistent read-modify-write updates. If not set, a blind
13160    /// "overwrite" update happens.
13161    pub etag: std::string::String,
13162
13163    /// Output only. Name of the associated BigQuery dataset.
13164    pub big_query_dataset_name: std::string::String,
13165
13166    /// The user-defined name of the DatasetVersion.
13167    /// The name can be up to 128 characters long and can consist of any UTF-8
13168    /// characters.
13169    pub display_name: std::string::String,
13170
13171    /// Required. Output only. Additional information about the DatasetVersion.
13172    pub metadata: std::option::Option<wkt::Value>,
13173
13174    /// Output only. Reference to the public base model last used by the dataset
13175    /// version. Only set for prompt dataset versions.
13176    pub model_reference: std::string::String,
13177
13178    /// Output only. Reserved for future use.
13179    pub satisfies_pzs: bool,
13180
13181    /// Output only. Reserved for future use.
13182    pub satisfies_pzi: bool,
13183
13184    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13185}
13186
13187#[cfg(feature = "dataset-service")]
13188impl DatasetVersion {
13189    pub fn new() -> Self {
13190        std::default::Default::default()
13191    }
13192
13193    /// Sets the value of [name][crate::model::DatasetVersion::name].
13194    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13195        self.name = v.into();
13196        self
13197    }
13198
13199    /// Sets the value of [create_time][crate::model::DatasetVersion::create_time].
13200    pub fn set_create_time<T>(mut self, v: T) -> Self
13201    where
13202        T: std::convert::Into<wkt::Timestamp>,
13203    {
13204        self.create_time = std::option::Option::Some(v.into());
13205        self
13206    }
13207
13208    /// Sets or clears the value of [create_time][crate::model::DatasetVersion::create_time].
13209    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
13210    where
13211        T: std::convert::Into<wkt::Timestamp>,
13212    {
13213        self.create_time = v.map(|x| x.into());
13214        self
13215    }
13216
13217    /// Sets the value of [update_time][crate::model::DatasetVersion::update_time].
13218    pub fn set_update_time<T>(mut self, v: T) -> Self
13219    where
13220        T: std::convert::Into<wkt::Timestamp>,
13221    {
13222        self.update_time = std::option::Option::Some(v.into());
13223        self
13224    }
13225
13226    /// Sets or clears the value of [update_time][crate::model::DatasetVersion::update_time].
13227    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
13228    where
13229        T: std::convert::Into<wkt::Timestamp>,
13230    {
13231        self.update_time = v.map(|x| x.into());
13232        self
13233    }
13234
13235    /// Sets the value of [etag][crate::model::DatasetVersion::etag].
13236    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13237        self.etag = v.into();
13238        self
13239    }
13240
13241    /// Sets the value of [big_query_dataset_name][crate::model::DatasetVersion::big_query_dataset_name].
13242    pub fn set_big_query_dataset_name<T: std::convert::Into<std::string::String>>(
13243        mut self,
13244        v: T,
13245    ) -> Self {
13246        self.big_query_dataset_name = v.into();
13247        self
13248    }
13249
13250    /// Sets the value of [display_name][crate::model::DatasetVersion::display_name].
13251    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13252        self.display_name = v.into();
13253        self
13254    }
13255
13256    /// Sets the value of [metadata][crate::model::DatasetVersion::metadata].
13257    pub fn set_metadata<T>(mut self, v: T) -> Self
13258    where
13259        T: std::convert::Into<wkt::Value>,
13260    {
13261        self.metadata = std::option::Option::Some(v.into());
13262        self
13263    }
13264
13265    /// Sets or clears the value of [metadata][crate::model::DatasetVersion::metadata].
13266    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
13267    where
13268        T: std::convert::Into<wkt::Value>,
13269    {
13270        self.metadata = v.map(|x| x.into());
13271        self
13272    }
13273
13274    /// Sets the value of [model_reference][crate::model::DatasetVersion::model_reference].
13275    pub fn set_model_reference<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13276        self.model_reference = v.into();
13277        self
13278    }
13279
13280    /// Sets the value of [satisfies_pzs][crate::model::DatasetVersion::satisfies_pzs].
13281    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13282        self.satisfies_pzs = v.into();
13283        self
13284    }
13285
13286    /// Sets the value of [satisfies_pzi][crate::model::DatasetVersion::satisfies_pzi].
13287    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13288        self.satisfies_pzi = v.into();
13289        self
13290    }
13291}
13292
13293#[cfg(feature = "dataset-service")]
13294impl wkt::message::Message for DatasetVersion {
13295    fn typename() -> &'static str {
13296        "type.googleapis.com/google.cloud.aiplatform.v1.DatasetVersion"
13297    }
13298}
13299
13300/// Points to a DeployedIndex.
13301#[cfg(feature = "index-service")]
13302#[derive(Clone, Default, PartialEq)]
13303#[non_exhaustive]
13304pub struct DeployedIndexRef {
13305    /// Immutable. A resource name of the IndexEndpoint.
13306    pub index_endpoint: std::string::String,
13307
13308    /// Immutable. The ID of the DeployedIndex in the above IndexEndpoint.
13309    pub deployed_index_id: std::string::String,
13310
13311    /// Output only. The display name of the DeployedIndex.
13312    pub display_name: std::string::String,
13313
13314    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13315}
13316
13317#[cfg(feature = "index-service")]
13318impl DeployedIndexRef {
13319    pub fn new() -> Self {
13320        std::default::Default::default()
13321    }
13322
13323    /// Sets the value of [index_endpoint][crate::model::DeployedIndexRef::index_endpoint].
13324    pub fn set_index_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13325        self.index_endpoint = v.into();
13326        self
13327    }
13328
13329    /// Sets the value of [deployed_index_id][crate::model::DeployedIndexRef::deployed_index_id].
13330    pub fn set_deployed_index_id<T: std::convert::Into<std::string::String>>(
13331        mut self,
13332        v: T,
13333    ) -> Self {
13334        self.deployed_index_id = v.into();
13335        self
13336    }
13337
13338    /// Sets the value of [display_name][crate::model::DeployedIndexRef::display_name].
13339    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13340        self.display_name = v.into();
13341        self
13342    }
13343}
13344
13345#[cfg(feature = "index-service")]
13346impl wkt::message::Message for DeployedIndexRef {
13347    fn typename() -> &'static str {
13348        "type.googleapis.com/google.cloud.aiplatform.v1.DeployedIndexRef"
13349    }
13350}
13351
13352/// Points to a DeployedModel.
13353#[cfg(any(
13354    feature = "dataset-service",
13355    feature = "deployment-resource-pool-service",
13356    feature = "model-service",
13357    feature = "pipeline-service",
13358))]
13359#[derive(Clone, Default, PartialEq)]
13360#[non_exhaustive]
13361pub struct DeployedModelRef {
13362    /// Immutable. A resource name of an Endpoint.
13363    pub endpoint: std::string::String,
13364
13365    /// Immutable. An ID of a DeployedModel in the above Endpoint.
13366    pub deployed_model_id: std::string::String,
13367
13368    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13369}
13370
13371#[cfg(any(
13372    feature = "dataset-service",
13373    feature = "deployment-resource-pool-service",
13374    feature = "model-service",
13375    feature = "pipeline-service",
13376))]
13377impl DeployedModelRef {
13378    pub fn new() -> Self {
13379        std::default::Default::default()
13380    }
13381
13382    /// Sets the value of [endpoint][crate::model::DeployedModelRef::endpoint].
13383    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13384        self.endpoint = v.into();
13385        self
13386    }
13387
13388    /// Sets the value of [deployed_model_id][crate::model::DeployedModelRef::deployed_model_id].
13389    pub fn set_deployed_model_id<T: std::convert::Into<std::string::String>>(
13390        mut self,
13391        v: T,
13392    ) -> Self {
13393        self.deployed_model_id = v.into();
13394        self
13395    }
13396}
13397
13398#[cfg(any(
13399    feature = "dataset-service",
13400    feature = "deployment-resource-pool-service",
13401    feature = "model-service",
13402    feature = "pipeline-service",
13403))]
13404impl wkt::message::Message for DeployedModelRef {
13405    fn typename() -> &'static str {
13406        "type.googleapis.com/google.cloud.aiplatform.v1.DeployedModelRef"
13407    }
13408}
13409
13410/// A description of resources that can be shared by multiple DeployedModels,
13411/// whose underlying specification consists of a DedicatedResources.
13412#[cfg(feature = "deployment-resource-pool-service")]
13413#[derive(Clone, Default, PartialEq)]
13414#[non_exhaustive]
13415pub struct DeploymentResourcePool {
13416    /// Immutable. The resource name of the DeploymentResourcePool.
13417    /// Format:
13418    /// `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
13419    pub name: std::string::String,
13420
13421    /// Required. The underlying DedicatedResources that the DeploymentResourcePool
13422    /// uses.
13423    pub dedicated_resources: std::option::Option<crate::model::DedicatedResources>,
13424
13425    /// Customer-managed encryption key spec for a DeploymentResourcePool. If set,
13426    /// this DeploymentResourcePool will be secured by this key. Endpoints and the
13427    /// DeploymentResourcePool they deploy in need to have the same EncryptionSpec.
13428    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
13429
13430    /// The service account that the DeploymentResourcePool's container(s) run as.
13431    /// Specify the email address of the service account. If this service account
13432    /// is not specified, the container(s) run as a service account that doesn't
13433    /// have access to the resource project.
13434    ///
13435    /// Users deploying the Models to this DeploymentResourcePool must have the
13436    /// `iam.serviceAccounts.actAs` permission on this service account.
13437    pub service_account: std::string::String,
13438
13439    /// If the DeploymentResourcePool is deployed with custom-trained Models or
13440    /// AutoML Tabular Models, the container(s) of the DeploymentResourcePool will
13441    /// send `stderr` and `stdout` streams to Cloud Logging by default.
13442    /// Please note that the logs incur cost, which are subject to [Cloud Logging
13443    /// pricing](https://cloud.google.com/logging/pricing).
13444    ///
13445    /// User can disable container logging by setting this flag to true.
13446    pub disable_container_logging: bool,
13447
13448    /// Output only. Timestamp when this DeploymentResourcePool was created.
13449    pub create_time: std::option::Option<wkt::Timestamp>,
13450
13451    /// Output only. Reserved for future use.
13452    pub satisfies_pzs: bool,
13453
13454    /// Output only. Reserved for future use.
13455    pub satisfies_pzi: bool,
13456
13457    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13458}
13459
13460#[cfg(feature = "deployment-resource-pool-service")]
13461impl DeploymentResourcePool {
13462    pub fn new() -> Self {
13463        std::default::Default::default()
13464    }
13465
13466    /// Sets the value of [name][crate::model::DeploymentResourcePool::name].
13467    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13468        self.name = v.into();
13469        self
13470    }
13471
13472    /// Sets the value of [dedicated_resources][crate::model::DeploymentResourcePool::dedicated_resources].
13473    pub fn set_dedicated_resources<T>(mut self, v: T) -> Self
13474    where
13475        T: std::convert::Into<crate::model::DedicatedResources>,
13476    {
13477        self.dedicated_resources = std::option::Option::Some(v.into());
13478        self
13479    }
13480
13481    /// Sets or clears the value of [dedicated_resources][crate::model::DeploymentResourcePool::dedicated_resources].
13482    pub fn set_or_clear_dedicated_resources<T>(mut self, v: std::option::Option<T>) -> Self
13483    where
13484        T: std::convert::Into<crate::model::DedicatedResources>,
13485    {
13486        self.dedicated_resources = v.map(|x| x.into());
13487        self
13488    }
13489
13490    /// Sets the value of [encryption_spec][crate::model::DeploymentResourcePool::encryption_spec].
13491    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
13492    where
13493        T: std::convert::Into<crate::model::EncryptionSpec>,
13494    {
13495        self.encryption_spec = std::option::Option::Some(v.into());
13496        self
13497    }
13498
13499    /// Sets or clears the value of [encryption_spec][crate::model::DeploymentResourcePool::encryption_spec].
13500    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
13501    where
13502        T: std::convert::Into<crate::model::EncryptionSpec>,
13503    {
13504        self.encryption_spec = v.map(|x| x.into());
13505        self
13506    }
13507
13508    /// Sets the value of [service_account][crate::model::DeploymentResourcePool::service_account].
13509    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13510        self.service_account = v.into();
13511        self
13512    }
13513
13514    /// Sets the value of [disable_container_logging][crate::model::DeploymentResourcePool::disable_container_logging].
13515    pub fn set_disable_container_logging<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13516        self.disable_container_logging = v.into();
13517        self
13518    }
13519
13520    /// Sets the value of [create_time][crate::model::DeploymentResourcePool::create_time].
13521    pub fn set_create_time<T>(mut self, v: T) -> Self
13522    where
13523        T: std::convert::Into<wkt::Timestamp>,
13524    {
13525        self.create_time = std::option::Option::Some(v.into());
13526        self
13527    }
13528
13529    /// Sets or clears the value of [create_time][crate::model::DeploymentResourcePool::create_time].
13530    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
13531    where
13532        T: std::convert::Into<wkt::Timestamp>,
13533    {
13534        self.create_time = v.map(|x| x.into());
13535        self
13536    }
13537
13538    /// Sets the value of [satisfies_pzs][crate::model::DeploymentResourcePool::satisfies_pzs].
13539    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13540        self.satisfies_pzs = v.into();
13541        self
13542    }
13543
13544    /// Sets the value of [satisfies_pzi][crate::model::DeploymentResourcePool::satisfies_pzi].
13545    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13546        self.satisfies_pzi = v.into();
13547        self
13548    }
13549}
13550
13551#[cfg(feature = "deployment-resource-pool-service")]
13552impl wkt::message::Message for DeploymentResourcePool {
13553    fn typename() -> &'static str {
13554        "type.googleapis.com/google.cloud.aiplatform.v1.DeploymentResourcePool"
13555    }
13556}
13557
13558/// Request message for CreateDeploymentResourcePool method.
13559#[cfg(feature = "deployment-resource-pool-service")]
13560#[derive(Clone, Default, PartialEq)]
13561#[non_exhaustive]
13562pub struct CreateDeploymentResourcePoolRequest {
13563    /// Required. The parent location resource where this DeploymentResourcePool
13564    /// will be created. Format: `projects/{project}/locations/{location}`
13565    pub parent: std::string::String,
13566
13567    /// Required. The DeploymentResourcePool to create.
13568    pub deployment_resource_pool: std::option::Option<crate::model::DeploymentResourcePool>,
13569
13570    /// Required. The ID to use for the DeploymentResourcePool, which
13571    /// will become the final component of the DeploymentResourcePool's resource
13572    /// name.
13573    ///
13574    /// The maximum length is 63 characters, and valid characters
13575    /// are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
13576    pub deployment_resource_pool_id: std::string::String,
13577
13578    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13579}
13580
13581#[cfg(feature = "deployment-resource-pool-service")]
13582impl CreateDeploymentResourcePoolRequest {
13583    pub fn new() -> Self {
13584        std::default::Default::default()
13585    }
13586
13587    /// Sets the value of [parent][crate::model::CreateDeploymentResourcePoolRequest::parent].
13588    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13589        self.parent = v.into();
13590        self
13591    }
13592
13593    /// Sets the value of [deployment_resource_pool][crate::model::CreateDeploymentResourcePoolRequest::deployment_resource_pool].
13594    pub fn set_deployment_resource_pool<T>(mut self, v: T) -> Self
13595    where
13596        T: std::convert::Into<crate::model::DeploymentResourcePool>,
13597    {
13598        self.deployment_resource_pool = std::option::Option::Some(v.into());
13599        self
13600    }
13601
13602    /// Sets or clears the value of [deployment_resource_pool][crate::model::CreateDeploymentResourcePoolRequest::deployment_resource_pool].
13603    pub fn set_or_clear_deployment_resource_pool<T>(mut self, v: std::option::Option<T>) -> Self
13604    where
13605        T: std::convert::Into<crate::model::DeploymentResourcePool>,
13606    {
13607        self.deployment_resource_pool = v.map(|x| x.into());
13608        self
13609    }
13610
13611    /// Sets the value of [deployment_resource_pool_id][crate::model::CreateDeploymentResourcePoolRequest::deployment_resource_pool_id].
13612    pub fn set_deployment_resource_pool_id<T: std::convert::Into<std::string::String>>(
13613        mut self,
13614        v: T,
13615    ) -> Self {
13616        self.deployment_resource_pool_id = v.into();
13617        self
13618    }
13619}
13620
13621#[cfg(feature = "deployment-resource-pool-service")]
13622impl wkt::message::Message for CreateDeploymentResourcePoolRequest {
13623    fn typename() -> &'static str {
13624        "type.googleapis.com/google.cloud.aiplatform.v1.CreateDeploymentResourcePoolRequest"
13625    }
13626}
13627
13628/// Runtime operation information for CreateDeploymentResourcePool method.
13629#[cfg(feature = "deployment-resource-pool-service")]
13630#[derive(Clone, Default, PartialEq)]
13631#[non_exhaustive]
13632pub struct CreateDeploymentResourcePoolOperationMetadata {
13633    /// The operation generic information.
13634    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
13635
13636    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13637}
13638
13639#[cfg(feature = "deployment-resource-pool-service")]
13640impl CreateDeploymentResourcePoolOperationMetadata {
13641    pub fn new() -> Self {
13642        std::default::Default::default()
13643    }
13644
13645    /// Sets the value of [generic_metadata][crate::model::CreateDeploymentResourcePoolOperationMetadata::generic_metadata].
13646    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
13647    where
13648        T: std::convert::Into<crate::model::GenericOperationMetadata>,
13649    {
13650        self.generic_metadata = std::option::Option::Some(v.into());
13651        self
13652    }
13653
13654    /// Sets or clears the value of [generic_metadata][crate::model::CreateDeploymentResourcePoolOperationMetadata::generic_metadata].
13655    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
13656    where
13657        T: std::convert::Into<crate::model::GenericOperationMetadata>,
13658    {
13659        self.generic_metadata = v.map(|x| x.into());
13660        self
13661    }
13662}
13663
13664#[cfg(feature = "deployment-resource-pool-service")]
13665impl wkt::message::Message for CreateDeploymentResourcePoolOperationMetadata {
13666    fn typename() -> &'static str {
13667        "type.googleapis.com/google.cloud.aiplatform.v1.CreateDeploymentResourcePoolOperationMetadata"
13668    }
13669}
13670
13671/// Request message for GetDeploymentResourcePool method.
13672#[cfg(feature = "deployment-resource-pool-service")]
13673#[derive(Clone, Default, PartialEq)]
13674#[non_exhaustive]
13675pub struct GetDeploymentResourcePoolRequest {
13676    /// Required. The name of the DeploymentResourcePool to retrieve.
13677    /// Format:
13678    /// `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
13679    pub name: std::string::String,
13680
13681    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13682}
13683
13684#[cfg(feature = "deployment-resource-pool-service")]
13685impl GetDeploymentResourcePoolRequest {
13686    pub fn new() -> Self {
13687        std::default::Default::default()
13688    }
13689
13690    /// Sets the value of [name][crate::model::GetDeploymentResourcePoolRequest::name].
13691    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13692        self.name = v.into();
13693        self
13694    }
13695}
13696
13697#[cfg(feature = "deployment-resource-pool-service")]
13698impl wkt::message::Message for GetDeploymentResourcePoolRequest {
13699    fn typename() -> &'static str {
13700        "type.googleapis.com/google.cloud.aiplatform.v1.GetDeploymentResourcePoolRequest"
13701    }
13702}
13703
13704/// Request message for ListDeploymentResourcePools method.
13705#[cfg(feature = "deployment-resource-pool-service")]
13706#[derive(Clone, Default, PartialEq)]
13707#[non_exhaustive]
13708pub struct ListDeploymentResourcePoolsRequest {
13709    /// Required. The parent Location which owns this collection of
13710    /// DeploymentResourcePools. Format: `projects/{project}/locations/{location}`
13711    pub parent: std::string::String,
13712
13713    /// The maximum number of DeploymentResourcePools to return. The service may
13714    /// return fewer than this value.
13715    pub page_size: i32,
13716
13717    /// A page token, received from a previous `ListDeploymentResourcePools` call.
13718    /// Provide this to retrieve the subsequent page.
13719    ///
13720    /// When paginating, all other parameters provided to
13721    /// `ListDeploymentResourcePools` must match the call that provided the page
13722    /// token.
13723    pub page_token: std::string::String,
13724
13725    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13726}
13727
13728#[cfg(feature = "deployment-resource-pool-service")]
13729impl ListDeploymentResourcePoolsRequest {
13730    pub fn new() -> Self {
13731        std::default::Default::default()
13732    }
13733
13734    /// Sets the value of [parent][crate::model::ListDeploymentResourcePoolsRequest::parent].
13735    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13736        self.parent = v.into();
13737        self
13738    }
13739
13740    /// Sets the value of [page_size][crate::model::ListDeploymentResourcePoolsRequest::page_size].
13741    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13742        self.page_size = v.into();
13743        self
13744    }
13745
13746    /// Sets the value of [page_token][crate::model::ListDeploymentResourcePoolsRequest::page_token].
13747    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13748        self.page_token = v.into();
13749        self
13750    }
13751}
13752
13753#[cfg(feature = "deployment-resource-pool-service")]
13754impl wkt::message::Message for ListDeploymentResourcePoolsRequest {
13755    fn typename() -> &'static str {
13756        "type.googleapis.com/google.cloud.aiplatform.v1.ListDeploymentResourcePoolsRequest"
13757    }
13758}
13759
13760/// Response message for ListDeploymentResourcePools method.
13761#[cfg(feature = "deployment-resource-pool-service")]
13762#[derive(Clone, Default, PartialEq)]
13763#[non_exhaustive]
13764pub struct ListDeploymentResourcePoolsResponse {
13765    /// The DeploymentResourcePools from the specified location.
13766    pub deployment_resource_pools: std::vec::Vec<crate::model::DeploymentResourcePool>,
13767
13768    /// A token, which can be sent as `page_token` to retrieve the next page.
13769    /// If this field is omitted, there are no subsequent pages.
13770    pub next_page_token: std::string::String,
13771
13772    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13773}
13774
13775#[cfg(feature = "deployment-resource-pool-service")]
13776impl ListDeploymentResourcePoolsResponse {
13777    pub fn new() -> Self {
13778        std::default::Default::default()
13779    }
13780
13781    /// Sets the value of [deployment_resource_pools][crate::model::ListDeploymentResourcePoolsResponse::deployment_resource_pools].
13782    pub fn set_deployment_resource_pools<T, V>(mut self, v: T) -> Self
13783    where
13784        T: std::iter::IntoIterator<Item = V>,
13785        V: std::convert::Into<crate::model::DeploymentResourcePool>,
13786    {
13787        use std::iter::Iterator;
13788        self.deployment_resource_pools = v.into_iter().map(|i| i.into()).collect();
13789        self
13790    }
13791
13792    /// Sets the value of [next_page_token][crate::model::ListDeploymentResourcePoolsResponse::next_page_token].
13793    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13794        self.next_page_token = v.into();
13795        self
13796    }
13797}
13798
13799#[cfg(feature = "deployment-resource-pool-service")]
13800impl wkt::message::Message for ListDeploymentResourcePoolsResponse {
13801    fn typename() -> &'static str {
13802        "type.googleapis.com/google.cloud.aiplatform.v1.ListDeploymentResourcePoolsResponse"
13803    }
13804}
13805
13806#[cfg(feature = "deployment-resource-pool-service")]
13807#[doc(hidden)]
13808impl gax::paginator::internal::PageableResponse for ListDeploymentResourcePoolsResponse {
13809    type PageItem = crate::model::DeploymentResourcePool;
13810
13811    fn items(self) -> std::vec::Vec<Self::PageItem> {
13812        self.deployment_resource_pools
13813    }
13814
13815    fn next_page_token(&self) -> std::string::String {
13816        use std::clone::Clone;
13817        self.next_page_token.clone()
13818    }
13819}
13820
13821/// Request message for UpdateDeploymentResourcePool method.
13822#[cfg(feature = "deployment-resource-pool-service")]
13823#[derive(Clone, Default, PartialEq)]
13824#[non_exhaustive]
13825pub struct UpdateDeploymentResourcePoolRequest {
13826    /// Required. The DeploymentResourcePool to update.
13827    ///
13828    /// The DeploymentResourcePool's `name` field is used to identify the
13829    /// DeploymentResourcePool to update.
13830    /// Format:
13831    /// `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
13832    pub deployment_resource_pool: std::option::Option<crate::model::DeploymentResourcePool>,
13833
13834    /// Required. The list of fields to update.
13835    pub update_mask: std::option::Option<wkt::FieldMask>,
13836
13837    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13838}
13839
13840#[cfg(feature = "deployment-resource-pool-service")]
13841impl UpdateDeploymentResourcePoolRequest {
13842    pub fn new() -> Self {
13843        std::default::Default::default()
13844    }
13845
13846    /// Sets the value of [deployment_resource_pool][crate::model::UpdateDeploymentResourcePoolRequest::deployment_resource_pool].
13847    pub fn set_deployment_resource_pool<T>(mut self, v: T) -> Self
13848    where
13849        T: std::convert::Into<crate::model::DeploymentResourcePool>,
13850    {
13851        self.deployment_resource_pool = std::option::Option::Some(v.into());
13852        self
13853    }
13854
13855    /// Sets or clears the value of [deployment_resource_pool][crate::model::UpdateDeploymentResourcePoolRequest::deployment_resource_pool].
13856    pub fn set_or_clear_deployment_resource_pool<T>(mut self, v: std::option::Option<T>) -> Self
13857    where
13858        T: std::convert::Into<crate::model::DeploymentResourcePool>,
13859    {
13860        self.deployment_resource_pool = v.map(|x| x.into());
13861        self
13862    }
13863
13864    /// Sets the value of [update_mask][crate::model::UpdateDeploymentResourcePoolRequest::update_mask].
13865    pub fn set_update_mask<T>(mut self, v: T) -> Self
13866    where
13867        T: std::convert::Into<wkt::FieldMask>,
13868    {
13869        self.update_mask = std::option::Option::Some(v.into());
13870        self
13871    }
13872
13873    /// Sets or clears the value of [update_mask][crate::model::UpdateDeploymentResourcePoolRequest::update_mask].
13874    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13875    where
13876        T: std::convert::Into<wkt::FieldMask>,
13877    {
13878        self.update_mask = v.map(|x| x.into());
13879        self
13880    }
13881}
13882
13883#[cfg(feature = "deployment-resource-pool-service")]
13884impl wkt::message::Message for UpdateDeploymentResourcePoolRequest {
13885    fn typename() -> &'static str {
13886        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolRequest"
13887    }
13888}
13889
13890/// Runtime operation information for UpdateDeploymentResourcePool method.
13891#[cfg(feature = "deployment-resource-pool-service")]
13892#[derive(Clone, Default, PartialEq)]
13893#[non_exhaustive]
13894pub struct UpdateDeploymentResourcePoolOperationMetadata {
13895    /// The operation generic information.
13896    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
13897
13898    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13899}
13900
13901#[cfg(feature = "deployment-resource-pool-service")]
13902impl UpdateDeploymentResourcePoolOperationMetadata {
13903    pub fn new() -> Self {
13904        std::default::Default::default()
13905    }
13906
13907    /// Sets the value of [generic_metadata][crate::model::UpdateDeploymentResourcePoolOperationMetadata::generic_metadata].
13908    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
13909    where
13910        T: std::convert::Into<crate::model::GenericOperationMetadata>,
13911    {
13912        self.generic_metadata = std::option::Option::Some(v.into());
13913        self
13914    }
13915
13916    /// Sets or clears the value of [generic_metadata][crate::model::UpdateDeploymentResourcePoolOperationMetadata::generic_metadata].
13917    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
13918    where
13919        T: std::convert::Into<crate::model::GenericOperationMetadata>,
13920    {
13921        self.generic_metadata = v.map(|x| x.into());
13922        self
13923    }
13924}
13925
13926#[cfg(feature = "deployment-resource-pool-service")]
13927impl wkt::message::Message for UpdateDeploymentResourcePoolOperationMetadata {
13928    fn typename() -> &'static str {
13929        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateDeploymentResourcePoolOperationMetadata"
13930    }
13931}
13932
13933/// Request message for DeleteDeploymentResourcePool method.
13934#[cfg(feature = "deployment-resource-pool-service")]
13935#[derive(Clone, Default, PartialEq)]
13936#[non_exhaustive]
13937pub struct DeleteDeploymentResourcePoolRequest {
13938    /// Required. The name of the DeploymentResourcePool to delete.
13939    /// Format:
13940    /// `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
13941    pub name: std::string::String,
13942
13943    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13944}
13945
13946#[cfg(feature = "deployment-resource-pool-service")]
13947impl DeleteDeploymentResourcePoolRequest {
13948    pub fn new() -> Self {
13949        std::default::Default::default()
13950    }
13951
13952    /// Sets the value of [name][crate::model::DeleteDeploymentResourcePoolRequest::name].
13953    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13954        self.name = v.into();
13955        self
13956    }
13957}
13958
13959#[cfg(feature = "deployment-resource-pool-service")]
13960impl wkt::message::Message for DeleteDeploymentResourcePoolRequest {
13961    fn typename() -> &'static str {
13962        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteDeploymentResourcePoolRequest"
13963    }
13964}
13965
13966/// Request message for QueryDeployedModels method.
13967#[cfg(feature = "deployment-resource-pool-service")]
13968#[derive(Clone, Default, PartialEq)]
13969#[non_exhaustive]
13970pub struct QueryDeployedModelsRequest {
13971    /// Required. The name of the target DeploymentResourcePool to query.
13972    /// Format:
13973    /// `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
13974    pub deployment_resource_pool: std::string::String,
13975
13976    /// The maximum number of DeployedModels to return. The service may return
13977    /// fewer than this value.
13978    pub page_size: i32,
13979
13980    /// A page token, received from a previous `QueryDeployedModels` call.
13981    /// Provide this to retrieve the subsequent page.
13982    ///
13983    /// When paginating, all other parameters provided to
13984    /// `QueryDeployedModels` must match the call that provided the page
13985    /// token.
13986    pub page_token: std::string::String,
13987
13988    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13989}
13990
13991#[cfg(feature = "deployment-resource-pool-service")]
13992impl QueryDeployedModelsRequest {
13993    pub fn new() -> Self {
13994        std::default::Default::default()
13995    }
13996
13997    /// Sets the value of [deployment_resource_pool][crate::model::QueryDeployedModelsRequest::deployment_resource_pool].
13998    pub fn set_deployment_resource_pool<T: std::convert::Into<std::string::String>>(
13999        mut self,
14000        v: T,
14001    ) -> Self {
14002        self.deployment_resource_pool = v.into();
14003        self
14004    }
14005
14006    /// Sets the value of [page_size][crate::model::QueryDeployedModelsRequest::page_size].
14007    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14008        self.page_size = v.into();
14009        self
14010    }
14011
14012    /// Sets the value of [page_token][crate::model::QueryDeployedModelsRequest::page_token].
14013    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14014        self.page_token = v.into();
14015        self
14016    }
14017}
14018
14019#[cfg(feature = "deployment-resource-pool-service")]
14020impl wkt::message::Message for QueryDeployedModelsRequest {
14021    fn typename() -> &'static str {
14022        "type.googleapis.com/google.cloud.aiplatform.v1.QueryDeployedModelsRequest"
14023    }
14024}
14025
14026/// Response message for QueryDeployedModels method.
14027#[cfg(feature = "deployment-resource-pool-service")]
14028#[derive(Clone, Default, PartialEq)]
14029#[non_exhaustive]
14030pub struct QueryDeployedModelsResponse {
14031    /// DEPRECATED Use deployed_model_refs instead.
14032    #[deprecated]
14033    pub deployed_models: std::vec::Vec<crate::model::DeployedModel>,
14034
14035    /// A token, which can be sent as `page_token` to retrieve the next page.
14036    /// If this field is omitted, there are no subsequent pages.
14037    pub next_page_token: std::string::String,
14038
14039    /// References to the DeployedModels that share the specified
14040    /// deploymentResourcePool.
14041    pub deployed_model_refs: std::vec::Vec<crate::model::DeployedModelRef>,
14042
14043    /// The total number of DeployedModels on this DeploymentResourcePool.
14044    pub total_deployed_model_count: i32,
14045
14046    /// The total number of Endpoints that have DeployedModels on this
14047    /// DeploymentResourcePool.
14048    pub total_endpoint_count: i32,
14049
14050    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14051}
14052
14053#[cfg(feature = "deployment-resource-pool-service")]
14054impl QueryDeployedModelsResponse {
14055    pub fn new() -> Self {
14056        std::default::Default::default()
14057    }
14058
14059    /// Sets the value of [deployed_models][crate::model::QueryDeployedModelsResponse::deployed_models].
14060    #[deprecated]
14061    pub fn set_deployed_models<T, V>(mut self, v: T) -> Self
14062    where
14063        T: std::iter::IntoIterator<Item = V>,
14064        V: std::convert::Into<crate::model::DeployedModel>,
14065    {
14066        use std::iter::Iterator;
14067        self.deployed_models = v.into_iter().map(|i| i.into()).collect();
14068        self
14069    }
14070
14071    /// Sets the value of [next_page_token][crate::model::QueryDeployedModelsResponse::next_page_token].
14072    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14073        self.next_page_token = v.into();
14074        self
14075    }
14076
14077    /// Sets the value of [deployed_model_refs][crate::model::QueryDeployedModelsResponse::deployed_model_refs].
14078    pub fn set_deployed_model_refs<T, V>(mut self, v: T) -> Self
14079    where
14080        T: std::iter::IntoIterator<Item = V>,
14081        V: std::convert::Into<crate::model::DeployedModelRef>,
14082    {
14083        use std::iter::Iterator;
14084        self.deployed_model_refs = v.into_iter().map(|i| i.into()).collect();
14085        self
14086    }
14087
14088    /// Sets the value of [total_deployed_model_count][crate::model::QueryDeployedModelsResponse::total_deployed_model_count].
14089    pub fn set_total_deployed_model_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14090        self.total_deployed_model_count = v.into();
14091        self
14092    }
14093
14094    /// Sets the value of [total_endpoint_count][crate::model::QueryDeployedModelsResponse::total_endpoint_count].
14095    pub fn set_total_endpoint_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14096        self.total_endpoint_count = v.into();
14097        self
14098    }
14099}
14100
14101#[cfg(feature = "deployment-resource-pool-service")]
14102impl wkt::message::Message for QueryDeployedModelsResponse {
14103    fn typename() -> &'static str {
14104        "type.googleapis.com/google.cloud.aiplatform.v1.QueryDeployedModelsResponse"
14105    }
14106}
14107
14108#[cfg(feature = "deployment-resource-pool-service")]
14109#[doc(hidden)]
14110impl gax::paginator::internal::PageableResponse for QueryDeployedModelsResponse {
14111    type PageItem = crate::model::DeployedModel;
14112
14113    fn items(self) -> std::vec::Vec<Self::PageItem> {
14114        self.deployed_models
14115    }
14116
14117    fn next_page_token(&self) -> std::string::String {
14118        use std::clone::Clone;
14119        self.next_page_token.clone()
14120    }
14121}
14122
14123/// Represents a customer-managed encryption key spec that can be applied to
14124/// a top-level resource.
14125#[cfg(any(
14126    feature = "dataset-service",
14127    feature = "deployment-resource-pool-service",
14128    feature = "endpoint-service",
14129    feature = "feature-online-store-admin-service",
14130    feature = "featurestore-service",
14131    feature = "gen-ai-cache-service",
14132    feature = "gen-ai-tuning-service",
14133    feature = "index-endpoint-service",
14134    feature = "index-service",
14135    feature = "job-service",
14136    feature = "metadata-service",
14137    feature = "model-service",
14138    feature = "notebook-service",
14139    feature = "persistent-resource-service",
14140    feature = "pipeline-service",
14141    feature = "reasoning-engine-service",
14142    feature = "schedule-service",
14143    feature = "tensorboard-service",
14144    feature = "vertex-rag-data-service",
14145))]
14146#[derive(Clone, Default, PartialEq)]
14147#[non_exhaustive]
14148pub struct EncryptionSpec {
14149    /// Required. The Cloud KMS resource identifier of the customer managed
14150    /// encryption key used to protect a resource. Has the form:
14151    /// `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
14152    /// The key needs to be in the same region as where the compute resource is
14153    /// created.
14154    pub kms_key_name: std::string::String,
14155
14156    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14157}
14158
14159#[cfg(any(
14160    feature = "dataset-service",
14161    feature = "deployment-resource-pool-service",
14162    feature = "endpoint-service",
14163    feature = "feature-online-store-admin-service",
14164    feature = "featurestore-service",
14165    feature = "gen-ai-cache-service",
14166    feature = "gen-ai-tuning-service",
14167    feature = "index-endpoint-service",
14168    feature = "index-service",
14169    feature = "job-service",
14170    feature = "metadata-service",
14171    feature = "model-service",
14172    feature = "notebook-service",
14173    feature = "persistent-resource-service",
14174    feature = "pipeline-service",
14175    feature = "reasoning-engine-service",
14176    feature = "schedule-service",
14177    feature = "tensorboard-service",
14178    feature = "vertex-rag-data-service",
14179))]
14180impl EncryptionSpec {
14181    pub fn new() -> Self {
14182        std::default::Default::default()
14183    }
14184
14185    /// Sets the value of [kms_key_name][crate::model::EncryptionSpec::kms_key_name].
14186    pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14187        self.kms_key_name = v.into();
14188        self
14189    }
14190}
14191
14192#[cfg(any(
14193    feature = "dataset-service",
14194    feature = "deployment-resource-pool-service",
14195    feature = "endpoint-service",
14196    feature = "feature-online-store-admin-service",
14197    feature = "featurestore-service",
14198    feature = "gen-ai-cache-service",
14199    feature = "gen-ai-tuning-service",
14200    feature = "index-endpoint-service",
14201    feature = "index-service",
14202    feature = "job-service",
14203    feature = "metadata-service",
14204    feature = "model-service",
14205    feature = "notebook-service",
14206    feature = "persistent-resource-service",
14207    feature = "pipeline-service",
14208    feature = "reasoning-engine-service",
14209    feature = "schedule-service",
14210    feature = "tensorboard-service",
14211    feature = "vertex-rag-data-service",
14212))]
14213impl wkt::message::Message for EncryptionSpec {
14214    fn typename() -> &'static str {
14215        "type.googleapis.com/google.cloud.aiplatform.v1.EncryptionSpec"
14216    }
14217}
14218
14219/// Models are deployed into it, and afterwards Endpoint is called to obtain
14220/// predictions and explanations.
14221#[cfg(feature = "endpoint-service")]
14222#[derive(Clone, Default, PartialEq)]
14223#[non_exhaustive]
14224pub struct Endpoint {
14225    /// Output only. The resource name of the Endpoint.
14226    pub name: std::string::String,
14227
14228    /// Required. The display name of the Endpoint.
14229    /// The name can be up to 128 characters long and can consist of any UTF-8
14230    /// characters.
14231    pub display_name: std::string::String,
14232
14233    /// The description of the Endpoint.
14234    pub description: std::string::String,
14235
14236    /// Output only. The models deployed in this Endpoint.
14237    /// To add or remove DeployedModels use
14238    /// [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]
14239    /// and
14240    /// [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]
14241    /// respectively.
14242    ///
14243    /// [google.cloud.aiplatform.v1.EndpointService.DeployModel]: crate::client::EndpointService::deploy_model
14244    /// [google.cloud.aiplatform.v1.EndpointService.UndeployModel]: crate::client::EndpointService::undeploy_model
14245    pub deployed_models: std::vec::Vec<crate::model::DeployedModel>,
14246
14247    /// A map from a DeployedModel's ID to the percentage of this Endpoint's
14248    /// traffic that should be forwarded to that DeployedModel.
14249    ///
14250    /// If a DeployedModel's ID is not listed in this map, then it receives no
14251    /// traffic.
14252    ///
14253    /// The traffic percentage values must add up to 100, or map must be empty if
14254    /// the Endpoint is to not accept any traffic at a moment.
14255    pub traffic_split: std::collections::HashMap<std::string::String, i32>,
14256
14257    /// Used to perform consistent read-modify-write updates. If not set, a blind
14258    /// "overwrite" update happens.
14259    pub etag: std::string::String,
14260
14261    /// The labels with user-defined metadata to organize your Endpoints.
14262    ///
14263    /// Label keys and values can be no longer than 64 characters
14264    /// (Unicode codepoints), can only contain lowercase letters, numeric
14265    /// characters, underscores and dashes. International characters are allowed.
14266    ///
14267    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
14268    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
14269
14270    /// Output only. Timestamp when this Endpoint was created.
14271    pub create_time: std::option::Option<wkt::Timestamp>,
14272
14273    /// Output only. Timestamp when this Endpoint was last updated.
14274    pub update_time: std::option::Option<wkt::Timestamp>,
14275
14276    /// Customer-managed encryption key spec for an Endpoint. If set, this
14277    /// Endpoint and all sub-resources of this Endpoint will be secured by
14278    /// this key.
14279    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
14280
14281    /// Optional. The full name of the Google Compute Engine
14282    /// [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
14283    /// to which the Endpoint should be peered.
14284    ///
14285    /// Private services access must already be configured for the network. If left
14286    /// unspecified, the Endpoint is not peered with any network.
14287    ///
14288    /// Only one of the fields,
14289    /// [network][google.cloud.aiplatform.v1.Endpoint.network] or
14290    /// [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
14291    /// can be set.
14292    ///
14293    /// [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert):
14294    /// `projects/{project}/global/networks/{network}`.
14295    /// Where `{project}` is a project number, as in `12345`, and `{network}` is
14296    /// network name.
14297    ///
14298    /// [google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect]: crate::model::Endpoint::enable_private_service_connect
14299    /// [google.cloud.aiplatform.v1.Endpoint.network]: crate::model::Endpoint::network
14300    pub network: std::string::String,
14301
14302    /// Deprecated: If true, expose the Endpoint via private service connect.
14303    ///
14304    /// Only one of the fields,
14305    /// [network][google.cloud.aiplatform.v1.Endpoint.network] or
14306    /// [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect],
14307    /// can be set.
14308    ///
14309    /// [google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect]: crate::model::Endpoint::enable_private_service_connect
14310    /// [google.cloud.aiplatform.v1.Endpoint.network]: crate::model::Endpoint::network
14311    #[deprecated]
14312    pub enable_private_service_connect: bool,
14313
14314    /// Optional. Configuration for private service connect.
14315    ///
14316    /// [network][google.cloud.aiplatform.v1.Endpoint.network] and
14317    /// [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]
14318    /// are mutually exclusive.
14319    ///
14320    /// [google.cloud.aiplatform.v1.Endpoint.network]: crate::model::Endpoint::network
14321    /// [google.cloud.aiplatform.v1.Endpoint.private_service_connect_config]: crate::model::Endpoint::private_service_connect_config
14322    pub private_service_connect_config:
14323        std::option::Option<crate::model::PrivateServiceConnectConfig>,
14324
14325    /// Output only. Resource name of the Model Monitoring job associated with this
14326    /// Endpoint if monitoring is enabled by
14327    /// [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob].
14328    /// Format:
14329    /// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
14330    ///
14331    /// [google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob]: crate::client::JobService::create_model_deployment_monitoring_job
14332    pub model_deployment_monitoring_job: std::string::String,
14333
14334    /// Configures the request-response logging for online prediction.
14335    pub predict_request_response_logging_config:
14336        std::option::Option<crate::model::PredictRequestResponseLoggingConfig>,
14337
14338    /// If true, the endpoint will be exposed through a dedicated
14339    /// DNS [Endpoint.dedicated_endpoint_dns]. Your request to the dedicated DNS
14340    /// will be isolated from other users' traffic and will have better performance
14341    /// and reliability.
14342    /// Note: Once you enabled dedicated endpoint, you won't be able to send
14343    /// request to the shared DNS {region}-aiplatform.googleapis.com. The
14344    /// limitation will be removed soon.
14345    pub dedicated_endpoint_enabled: bool,
14346
14347    /// Output only. DNS of the dedicated endpoint. Will only be populated if
14348    /// dedicated_endpoint_enabled is true. Depending on the features enabled, uid
14349    /// might be a random number or a string. For example, if fast_tryout is
14350    /// enabled, uid will be fasttryout. Format:
14351    /// `https://{endpoint_id}.{region}-{uid}.prediction.vertexai.goog`.
14352    pub dedicated_endpoint_dns: std::string::String,
14353
14354    /// Configurations that are applied to the endpoint for online prediction.
14355    pub client_connection_config: std::option::Option<crate::model::ClientConnectionConfig>,
14356
14357    /// Output only. Reserved for future use.
14358    pub satisfies_pzs: bool,
14359
14360    /// Output only. Reserved for future use.
14361    pub satisfies_pzi: bool,
14362
14363    /// Optional. Configuration for GenAiAdvancedFeatures. If the endpoint is
14364    /// serving GenAI models, advanced features like native RAG integration can be
14365    /// configured. Currently, only Model Garden models are supported.
14366    pub gen_ai_advanced_features_config:
14367        std::option::Option<crate::model::GenAiAdvancedFeaturesConfig>,
14368
14369    /// If true, the model server will be isolated from the external internet.
14370    pub private_model_server_enabled: bool,
14371
14372    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14373}
14374
14375#[cfg(feature = "endpoint-service")]
14376impl Endpoint {
14377    pub fn new() -> Self {
14378        std::default::Default::default()
14379    }
14380
14381    /// Sets the value of [name][crate::model::Endpoint::name].
14382    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14383        self.name = v.into();
14384        self
14385    }
14386
14387    /// Sets the value of [display_name][crate::model::Endpoint::display_name].
14388    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14389        self.display_name = v.into();
14390        self
14391    }
14392
14393    /// Sets the value of [description][crate::model::Endpoint::description].
14394    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14395        self.description = v.into();
14396        self
14397    }
14398
14399    /// Sets the value of [deployed_models][crate::model::Endpoint::deployed_models].
14400    pub fn set_deployed_models<T, V>(mut self, v: T) -> Self
14401    where
14402        T: std::iter::IntoIterator<Item = V>,
14403        V: std::convert::Into<crate::model::DeployedModel>,
14404    {
14405        use std::iter::Iterator;
14406        self.deployed_models = v.into_iter().map(|i| i.into()).collect();
14407        self
14408    }
14409
14410    /// Sets the value of [traffic_split][crate::model::Endpoint::traffic_split].
14411    pub fn set_traffic_split<T, K, V>(mut self, v: T) -> Self
14412    where
14413        T: std::iter::IntoIterator<Item = (K, V)>,
14414        K: std::convert::Into<std::string::String>,
14415        V: std::convert::Into<i32>,
14416    {
14417        use std::iter::Iterator;
14418        self.traffic_split = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14419        self
14420    }
14421
14422    /// Sets the value of [etag][crate::model::Endpoint::etag].
14423    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14424        self.etag = v.into();
14425        self
14426    }
14427
14428    /// Sets the value of [labels][crate::model::Endpoint::labels].
14429    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
14430    where
14431        T: std::iter::IntoIterator<Item = (K, V)>,
14432        K: std::convert::Into<std::string::String>,
14433        V: std::convert::Into<std::string::String>,
14434    {
14435        use std::iter::Iterator;
14436        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14437        self
14438    }
14439
14440    /// Sets the value of [create_time][crate::model::Endpoint::create_time].
14441    pub fn set_create_time<T>(mut self, v: T) -> Self
14442    where
14443        T: std::convert::Into<wkt::Timestamp>,
14444    {
14445        self.create_time = std::option::Option::Some(v.into());
14446        self
14447    }
14448
14449    /// Sets or clears the value of [create_time][crate::model::Endpoint::create_time].
14450    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14451    where
14452        T: std::convert::Into<wkt::Timestamp>,
14453    {
14454        self.create_time = v.map(|x| x.into());
14455        self
14456    }
14457
14458    /// Sets the value of [update_time][crate::model::Endpoint::update_time].
14459    pub fn set_update_time<T>(mut self, v: T) -> Self
14460    where
14461        T: std::convert::Into<wkt::Timestamp>,
14462    {
14463        self.update_time = std::option::Option::Some(v.into());
14464        self
14465    }
14466
14467    /// Sets or clears the value of [update_time][crate::model::Endpoint::update_time].
14468    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
14469    where
14470        T: std::convert::Into<wkt::Timestamp>,
14471    {
14472        self.update_time = v.map(|x| x.into());
14473        self
14474    }
14475
14476    /// Sets the value of [encryption_spec][crate::model::Endpoint::encryption_spec].
14477    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
14478    where
14479        T: std::convert::Into<crate::model::EncryptionSpec>,
14480    {
14481        self.encryption_spec = std::option::Option::Some(v.into());
14482        self
14483    }
14484
14485    /// Sets or clears the value of [encryption_spec][crate::model::Endpoint::encryption_spec].
14486    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
14487    where
14488        T: std::convert::Into<crate::model::EncryptionSpec>,
14489    {
14490        self.encryption_spec = v.map(|x| x.into());
14491        self
14492    }
14493
14494    /// Sets the value of [network][crate::model::Endpoint::network].
14495    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14496        self.network = v.into();
14497        self
14498    }
14499
14500    /// Sets the value of [enable_private_service_connect][crate::model::Endpoint::enable_private_service_connect].
14501    #[deprecated]
14502    pub fn set_enable_private_service_connect<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14503        self.enable_private_service_connect = v.into();
14504        self
14505    }
14506
14507    /// Sets the value of [private_service_connect_config][crate::model::Endpoint::private_service_connect_config].
14508    pub fn set_private_service_connect_config<T>(mut self, v: T) -> Self
14509    where
14510        T: std::convert::Into<crate::model::PrivateServiceConnectConfig>,
14511    {
14512        self.private_service_connect_config = std::option::Option::Some(v.into());
14513        self
14514    }
14515
14516    /// Sets or clears the value of [private_service_connect_config][crate::model::Endpoint::private_service_connect_config].
14517    pub fn set_or_clear_private_service_connect_config<T>(
14518        mut self,
14519        v: std::option::Option<T>,
14520    ) -> Self
14521    where
14522        T: std::convert::Into<crate::model::PrivateServiceConnectConfig>,
14523    {
14524        self.private_service_connect_config = v.map(|x| x.into());
14525        self
14526    }
14527
14528    /// Sets the value of [model_deployment_monitoring_job][crate::model::Endpoint::model_deployment_monitoring_job].
14529    pub fn set_model_deployment_monitoring_job<T: std::convert::Into<std::string::String>>(
14530        mut self,
14531        v: T,
14532    ) -> Self {
14533        self.model_deployment_monitoring_job = v.into();
14534        self
14535    }
14536
14537    /// Sets the value of [predict_request_response_logging_config][crate::model::Endpoint::predict_request_response_logging_config].
14538    pub fn set_predict_request_response_logging_config<T>(mut self, v: T) -> Self
14539    where
14540        T: std::convert::Into<crate::model::PredictRequestResponseLoggingConfig>,
14541    {
14542        self.predict_request_response_logging_config = std::option::Option::Some(v.into());
14543        self
14544    }
14545
14546    /// Sets or clears the value of [predict_request_response_logging_config][crate::model::Endpoint::predict_request_response_logging_config].
14547    pub fn set_or_clear_predict_request_response_logging_config<T>(
14548        mut self,
14549        v: std::option::Option<T>,
14550    ) -> Self
14551    where
14552        T: std::convert::Into<crate::model::PredictRequestResponseLoggingConfig>,
14553    {
14554        self.predict_request_response_logging_config = v.map(|x| x.into());
14555        self
14556    }
14557
14558    /// Sets the value of [dedicated_endpoint_enabled][crate::model::Endpoint::dedicated_endpoint_enabled].
14559    pub fn set_dedicated_endpoint_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14560        self.dedicated_endpoint_enabled = v.into();
14561        self
14562    }
14563
14564    /// Sets the value of [dedicated_endpoint_dns][crate::model::Endpoint::dedicated_endpoint_dns].
14565    pub fn set_dedicated_endpoint_dns<T: std::convert::Into<std::string::String>>(
14566        mut self,
14567        v: T,
14568    ) -> Self {
14569        self.dedicated_endpoint_dns = v.into();
14570        self
14571    }
14572
14573    /// Sets the value of [client_connection_config][crate::model::Endpoint::client_connection_config].
14574    pub fn set_client_connection_config<T>(mut self, v: T) -> Self
14575    where
14576        T: std::convert::Into<crate::model::ClientConnectionConfig>,
14577    {
14578        self.client_connection_config = std::option::Option::Some(v.into());
14579        self
14580    }
14581
14582    /// Sets or clears the value of [client_connection_config][crate::model::Endpoint::client_connection_config].
14583    pub fn set_or_clear_client_connection_config<T>(mut self, v: std::option::Option<T>) -> Self
14584    where
14585        T: std::convert::Into<crate::model::ClientConnectionConfig>,
14586    {
14587        self.client_connection_config = v.map(|x| x.into());
14588        self
14589    }
14590
14591    /// Sets the value of [satisfies_pzs][crate::model::Endpoint::satisfies_pzs].
14592    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14593        self.satisfies_pzs = v.into();
14594        self
14595    }
14596
14597    /// Sets the value of [satisfies_pzi][crate::model::Endpoint::satisfies_pzi].
14598    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14599        self.satisfies_pzi = v.into();
14600        self
14601    }
14602
14603    /// Sets the value of [gen_ai_advanced_features_config][crate::model::Endpoint::gen_ai_advanced_features_config].
14604    pub fn set_gen_ai_advanced_features_config<T>(mut self, v: T) -> Self
14605    where
14606        T: std::convert::Into<crate::model::GenAiAdvancedFeaturesConfig>,
14607    {
14608        self.gen_ai_advanced_features_config = std::option::Option::Some(v.into());
14609        self
14610    }
14611
14612    /// Sets or clears the value of [gen_ai_advanced_features_config][crate::model::Endpoint::gen_ai_advanced_features_config].
14613    pub fn set_or_clear_gen_ai_advanced_features_config<T>(
14614        mut self,
14615        v: std::option::Option<T>,
14616    ) -> Self
14617    where
14618        T: std::convert::Into<crate::model::GenAiAdvancedFeaturesConfig>,
14619    {
14620        self.gen_ai_advanced_features_config = v.map(|x| x.into());
14621        self
14622    }
14623
14624    /// Sets the value of [private_model_server_enabled][crate::model::Endpoint::private_model_server_enabled].
14625    pub fn set_private_model_server_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14626        self.private_model_server_enabled = v.into();
14627        self
14628    }
14629}
14630
14631#[cfg(feature = "endpoint-service")]
14632impl wkt::message::Message for Endpoint {
14633    fn typename() -> &'static str {
14634        "type.googleapis.com/google.cloud.aiplatform.v1.Endpoint"
14635    }
14636}
14637
14638/// A deployment of a Model. Endpoints contain one or more DeployedModels.
14639#[cfg(any(
14640    feature = "deployment-resource-pool-service",
14641    feature = "endpoint-service",
14642))]
14643#[derive(Clone, Default, PartialEq)]
14644#[non_exhaustive]
14645pub struct DeployedModel {
14646    /// Immutable. The ID of the DeployedModel. If not provided upon deployment,
14647    /// Vertex AI will generate a value for this ID.
14648    ///
14649    /// This value should be 1-10 characters, and valid characters are `/[0-9]/`.
14650    pub id: std::string::String,
14651
14652    /// The resource name of the Model that this is the deployment of. Note that
14653    /// the Model may be in a different location than the DeployedModel's Endpoint.
14654    ///
14655    /// The resource name may contain version id or version alias to specify the
14656    /// version.
14657    /// Example: `projects/{project}/locations/{location}/models/{model}@2`
14658    /// or
14659    /// `projects/{project}/locations/{location}/models/{model}@golden`
14660    /// if no version is specified, the default version will be deployed.
14661    pub model: std::string::String,
14662
14663    /// Output only. The version ID of the model that is deployed.
14664    pub model_version_id: std::string::String,
14665
14666    /// The display name of the DeployedModel. If not provided upon creation,
14667    /// the Model's display_name is used.
14668    pub display_name: std::string::String,
14669
14670    /// Output only. Timestamp when the DeployedModel was created.
14671    pub create_time: std::option::Option<wkt::Timestamp>,
14672
14673    /// Explanation configuration for this DeployedModel.
14674    ///
14675    /// When deploying a Model using
14676    /// [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel],
14677    /// this value overrides the value of
14678    /// [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec].
14679    /// All fields of
14680    /// [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
14681    /// are optional in the request. If a field of
14682    /// [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
14683    /// is not populated, the value of the same field of
14684    /// [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
14685    /// is inherited. If the corresponding
14686    /// [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
14687    /// is not populated, all fields of the
14688    /// [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
14689    /// will be used for the explanation configuration.
14690    ///
14691    /// [google.cloud.aiplatform.v1.DeployedModel.explanation_spec]: crate::model::DeployedModel::explanation_spec
14692    /// [google.cloud.aiplatform.v1.EndpointService.DeployModel]: crate::client::EndpointService::deploy_model
14693    /// [google.cloud.aiplatform.v1.Model.explanation_spec]: crate::model::Model::explanation_spec
14694    pub explanation_spec: std::option::Option<crate::model::ExplanationSpec>,
14695
14696    /// If true, deploy the model without explainable feature, regardless the
14697    /// existence of
14698    /// [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]
14699    /// or
14700    /// [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec].
14701    ///
14702    /// [google.cloud.aiplatform.v1.DeployedModel.explanation_spec]: crate::model::DeployedModel::explanation_spec
14703    /// [google.cloud.aiplatform.v1.Model.explanation_spec]: crate::model::Model::explanation_spec
14704    pub disable_explanations: bool,
14705
14706    /// The service account that the DeployedModel's container runs as. Specify the
14707    /// email address of the service account. If this service account is not
14708    /// specified, the container runs as a service account that doesn't have access
14709    /// to the resource project.
14710    ///
14711    /// Users deploying the Model must have the `iam.serviceAccounts.actAs`
14712    /// permission on this service account.
14713    pub service_account: std::string::String,
14714
14715    /// For custom-trained Models and AutoML Tabular Models, the container of the
14716    /// DeployedModel instances will send `stderr` and `stdout` streams to
14717    /// Cloud Logging by default. Please note that the logs incur cost,
14718    /// which are subject to [Cloud Logging
14719    /// pricing](https://cloud.google.com/logging/pricing).
14720    ///
14721    /// User can disable container logging by setting this flag to true.
14722    pub disable_container_logging: bool,
14723
14724    /// If true, online prediction access logs are sent to Cloud
14725    /// Logging.
14726    /// These logs are like standard server access logs, containing
14727    /// information like timestamp and latency for each prediction request.
14728    ///
14729    /// Note that logs may incur a cost, especially if your project
14730    /// receives prediction requests at a high queries per second rate (QPS).
14731    /// Estimate your costs before enabling this option.
14732    pub enable_access_logging: bool,
14733
14734    /// Output only. Provide paths for users to send predict/explain/health
14735    /// requests directly to the deployed model services running on Cloud via
14736    /// private services access. This field is populated if
14737    /// [network][google.cloud.aiplatform.v1.Endpoint.network] is configured.
14738    ///
14739    /// [google.cloud.aiplatform.v1.Endpoint.network]: crate::model::Endpoint::network
14740    pub private_endpoints: std::option::Option<crate::model::PrivateEndpoints>,
14741
14742    /// Configuration for faster model deployment.
14743    pub faster_deployment_config: std::option::Option<crate::model::FasterDeploymentConfig>,
14744
14745    /// Output only. Runtime status of the deployed model.
14746    pub status: std::option::Option<crate::model::deployed_model::Status>,
14747
14748    /// System labels to apply to Model Garden deployments.
14749    /// System labels are managed by Google for internal use only.
14750    pub system_labels: std::collections::HashMap<std::string::String, std::string::String>,
14751
14752    /// The checkpoint id of the model.
14753    pub checkpoint_id: std::string::String,
14754
14755    /// Optional. Spec for configuring speculative decoding.
14756    pub speculative_decoding_spec: std::option::Option<crate::model::SpeculativeDecodingSpec>,
14757
14758    /// The prediction (for example, the machine) resources that the DeployedModel
14759    /// uses. The user is billed for the resources (at least their minimal amount)
14760    /// even if the DeployedModel receives no traffic.
14761    /// Not all Models support all resources types. See
14762    /// [Model.supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types].
14763    /// Required except for Large Model Deploy use cases.
14764    ///
14765    /// [google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]: crate::model::Model::supported_deployment_resources_types
14766    pub prediction_resources:
14767        std::option::Option<crate::model::deployed_model::PredictionResources>,
14768
14769    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14770}
14771
14772#[cfg(any(
14773    feature = "deployment-resource-pool-service",
14774    feature = "endpoint-service",
14775))]
14776impl DeployedModel {
14777    pub fn new() -> Self {
14778        std::default::Default::default()
14779    }
14780
14781    /// Sets the value of [id][crate::model::DeployedModel::id].
14782    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14783        self.id = v.into();
14784        self
14785    }
14786
14787    /// Sets the value of [model][crate::model::DeployedModel::model].
14788    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14789        self.model = v.into();
14790        self
14791    }
14792
14793    /// Sets the value of [model_version_id][crate::model::DeployedModel::model_version_id].
14794    pub fn set_model_version_id<T: std::convert::Into<std::string::String>>(
14795        mut self,
14796        v: T,
14797    ) -> Self {
14798        self.model_version_id = v.into();
14799        self
14800    }
14801
14802    /// Sets the value of [display_name][crate::model::DeployedModel::display_name].
14803    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14804        self.display_name = v.into();
14805        self
14806    }
14807
14808    /// Sets the value of [create_time][crate::model::DeployedModel::create_time].
14809    pub fn set_create_time<T>(mut self, v: T) -> Self
14810    where
14811        T: std::convert::Into<wkt::Timestamp>,
14812    {
14813        self.create_time = std::option::Option::Some(v.into());
14814        self
14815    }
14816
14817    /// Sets or clears the value of [create_time][crate::model::DeployedModel::create_time].
14818    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14819    where
14820        T: std::convert::Into<wkt::Timestamp>,
14821    {
14822        self.create_time = v.map(|x| x.into());
14823        self
14824    }
14825
14826    /// Sets the value of [explanation_spec][crate::model::DeployedModel::explanation_spec].
14827    pub fn set_explanation_spec<T>(mut self, v: T) -> Self
14828    where
14829        T: std::convert::Into<crate::model::ExplanationSpec>,
14830    {
14831        self.explanation_spec = std::option::Option::Some(v.into());
14832        self
14833    }
14834
14835    /// Sets or clears the value of [explanation_spec][crate::model::DeployedModel::explanation_spec].
14836    pub fn set_or_clear_explanation_spec<T>(mut self, v: std::option::Option<T>) -> Self
14837    where
14838        T: std::convert::Into<crate::model::ExplanationSpec>,
14839    {
14840        self.explanation_spec = v.map(|x| x.into());
14841        self
14842    }
14843
14844    /// Sets the value of [disable_explanations][crate::model::DeployedModel::disable_explanations].
14845    pub fn set_disable_explanations<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14846        self.disable_explanations = v.into();
14847        self
14848    }
14849
14850    /// Sets the value of [service_account][crate::model::DeployedModel::service_account].
14851    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14852        self.service_account = v.into();
14853        self
14854    }
14855
14856    /// Sets the value of [disable_container_logging][crate::model::DeployedModel::disable_container_logging].
14857    pub fn set_disable_container_logging<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14858        self.disable_container_logging = v.into();
14859        self
14860    }
14861
14862    /// Sets the value of [enable_access_logging][crate::model::DeployedModel::enable_access_logging].
14863    pub fn set_enable_access_logging<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14864        self.enable_access_logging = v.into();
14865        self
14866    }
14867
14868    /// Sets the value of [private_endpoints][crate::model::DeployedModel::private_endpoints].
14869    pub fn set_private_endpoints<T>(mut self, v: T) -> Self
14870    where
14871        T: std::convert::Into<crate::model::PrivateEndpoints>,
14872    {
14873        self.private_endpoints = std::option::Option::Some(v.into());
14874        self
14875    }
14876
14877    /// Sets or clears the value of [private_endpoints][crate::model::DeployedModel::private_endpoints].
14878    pub fn set_or_clear_private_endpoints<T>(mut self, v: std::option::Option<T>) -> Self
14879    where
14880        T: std::convert::Into<crate::model::PrivateEndpoints>,
14881    {
14882        self.private_endpoints = v.map(|x| x.into());
14883        self
14884    }
14885
14886    /// Sets the value of [faster_deployment_config][crate::model::DeployedModel::faster_deployment_config].
14887    pub fn set_faster_deployment_config<T>(mut self, v: T) -> Self
14888    where
14889        T: std::convert::Into<crate::model::FasterDeploymentConfig>,
14890    {
14891        self.faster_deployment_config = std::option::Option::Some(v.into());
14892        self
14893    }
14894
14895    /// Sets or clears the value of [faster_deployment_config][crate::model::DeployedModel::faster_deployment_config].
14896    pub fn set_or_clear_faster_deployment_config<T>(mut self, v: std::option::Option<T>) -> Self
14897    where
14898        T: std::convert::Into<crate::model::FasterDeploymentConfig>,
14899    {
14900        self.faster_deployment_config = v.map(|x| x.into());
14901        self
14902    }
14903
14904    /// Sets the value of [status][crate::model::DeployedModel::status].
14905    pub fn set_status<T>(mut self, v: T) -> Self
14906    where
14907        T: std::convert::Into<crate::model::deployed_model::Status>,
14908    {
14909        self.status = std::option::Option::Some(v.into());
14910        self
14911    }
14912
14913    /// Sets or clears the value of [status][crate::model::DeployedModel::status].
14914    pub fn set_or_clear_status<T>(mut self, v: std::option::Option<T>) -> Self
14915    where
14916        T: std::convert::Into<crate::model::deployed_model::Status>,
14917    {
14918        self.status = v.map(|x| x.into());
14919        self
14920    }
14921
14922    /// Sets the value of [system_labels][crate::model::DeployedModel::system_labels].
14923    pub fn set_system_labels<T, K, V>(mut self, v: T) -> Self
14924    where
14925        T: std::iter::IntoIterator<Item = (K, V)>,
14926        K: std::convert::Into<std::string::String>,
14927        V: std::convert::Into<std::string::String>,
14928    {
14929        use std::iter::Iterator;
14930        self.system_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14931        self
14932    }
14933
14934    /// Sets the value of [checkpoint_id][crate::model::DeployedModel::checkpoint_id].
14935    pub fn set_checkpoint_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14936        self.checkpoint_id = v.into();
14937        self
14938    }
14939
14940    /// Sets the value of [speculative_decoding_spec][crate::model::DeployedModel::speculative_decoding_spec].
14941    pub fn set_speculative_decoding_spec<T>(mut self, v: T) -> Self
14942    where
14943        T: std::convert::Into<crate::model::SpeculativeDecodingSpec>,
14944    {
14945        self.speculative_decoding_spec = std::option::Option::Some(v.into());
14946        self
14947    }
14948
14949    /// Sets or clears the value of [speculative_decoding_spec][crate::model::DeployedModel::speculative_decoding_spec].
14950    pub fn set_or_clear_speculative_decoding_spec<T>(mut self, v: std::option::Option<T>) -> Self
14951    where
14952        T: std::convert::Into<crate::model::SpeculativeDecodingSpec>,
14953    {
14954        self.speculative_decoding_spec = v.map(|x| x.into());
14955        self
14956    }
14957
14958    /// Sets the value of [prediction_resources][crate::model::DeployedModel::prediction_resources].
14959    ///
14960    /// Note that all the setters affecting `prediction_resources` are mutually
14961    /// exclusive.
14962    pub fn set_prediction_resources<
14963        T: std::convert::Into<std::option::Option<crate::model::deployed_model::PredictionResources>>,
14964    >(
14965        mut self,
14966        v: T,
14967    ) -> Self {
14968        self.prediction_resources = v.into();
14969        self
14970    }
14971
14972    /// The value of [prediction_resources][crate::model::DeployedModel::prediction_resources]
14973    /// if it holds a `DedicatedResources`, `None` if the field is not set or
14974    /// holds a different branch.
14975    pub fn dedicated_resources(
14976        &self,
14977    ) -> std::option::Option<&std::boxed::Box<crate::model::DedicatedResources>> {
14978        #[allow(unreachable_patterns)]
14979        self.prediction_resources.as_ref().and_then(|v| match v {
14980            crate::model::deployed_model::PredictionResources::DedicatedResources(v) => {
14981                std::option::Option::Some(v)
14982            }
14983            _ => std::option::Option::None,
14984        })
14985    }
14986
14987    /// Sets the value of [prediction_resources][crate::model::DeployedModel::prediction_resources]
14988    /// to hold a `DedicatedResources`.
14989    ///
14990    /// Note that all the setters affecting `prediction_resources` are
14991    /// mutually exclusive.
14992    pub fn set_dedicated_resources<
14993        T: std::convert::Into<std::boxed::Box<crate::model::DedicatedResources>>,
14994    >(
14995        mut self,
14996        v: T,
14997    ) -> Self {
14998        self.prediction_resources = std::option::Option::Some(
14999            crate::model::deployed_model::PredictionResources::DedicatedResources(v.into()),
15000        );
15001        self
15002    }
15003
15004    /// The value of [prediction_resources][crate::model::DeployedModel::prediction_resources]
15005    /// if it holds a `AutomaticResources`, `None` if the field is not set or
15006    /// holds a different branch.
15007    pub fn automatic_resources(
15008        &self,
15009    ) -> std::option::Option<&std::boxed::Box<crate::model::AutomaticResources>> {
15010        #[allow(unreachable_patterns)]
15011        self.prediction_resources.as_ref().and_then(|v| match v {
15012            crate::model::deployed_model::PredictionResources::AutomaticResources(v) => {
15013                std::option::Option::Some(v)
15014            }
15015            _ => std::option::Option::None,
15016        })
15017    }
15018
15019    /// Sets the value of [prediction_resources][crate::model::DeployedModel::prediction_resources]
15020    /// to hold a `AutomaticResources`.
15021    ///
15022    /// Note that all the setters affecting `prediction_resources` are
15023    /// mutually exclusive.
15024    pub fn set_automatic_resources<
15025        T: std::convert::Into<std::boxed::Box<crate::model::AutomaticResources>>,
15026    >(
15027        mut self,
15028        v: T,
15029    ) -> Self {
15030        self.prediction_resources = std::option::Option::Some(
15031            crate::model::deployed_model::PredictionResources::AutomaticResources(v.into()),
15032        );
15033        self
15034    }
15035
15036    /// The value of [prediction_resources][crate::model::DeployedModel::prediction_resources]
15037    /// if it holds a `SharedResources`, `None` if the field is not set or
15038    /// holds a different branch.
15039    pub fn shared_resources(&self) -> std::option::Option<&std::string::String> {
15040        #[allow(unreachable_patterns)]
15041        self.prediction_resources.as_ref().and_then(|v| match v {
15042            crate::model::deployed_model::PredictionResources::SharedResources(v) => {
15043                std::option::Option::Some(v)
15044            }
15045            _ => std::option::Option::None,
15046        })
15047    }
15048
15049    /// Sets the value of [prediction_resources][crate::model::DeployedModel::prediction_resources]
15050    /// to hold a `SharedResources`.
15051    ///
15052    /// Note that all the setters affecting `prediction_resources` are
15053    /// mutually exclusive.
15054    pub fn set_shared_resources<T: std::convert::Into<std::string::String>>(
15055        mut self,
15056        v: T,
15057    ) -> Self {
15058        self.prediction_resources = std::option::Option::Some(
15059            crate::model::deployed_model::PredictionResources::SharedResources(v.into()),
15060        );
15061        self
15062    }
15063}
15064
15065#[cfg(any(
15066    feature = "deployment-resource-pool-service",
15067    feature = "endpoint-service",
15068))]
15069impl wkt::message::Message for DeployedModel {
15070    fn typename() -> &'static str {
15071        "type.googleapis.com/google.cloud.aiplatform.v1.DeployedModel"
15072    }
15073}
15074
15075/// Defines additional types related to [DeployedModel].
15076#[cfg(any(
15077    feature = "deployment-resource-pool-service",
15078    feature = "endpoint-service",
15079))]
15080pub mod deployed_model {
15081    #[allow(unused_imports)]
15082    use super::*;
15083
15084    /// Runtime status of the deployed model.
15085    #[cfg(any(
15086        feature = "deployment-resource-pool-service",
15087        feature = "endpoint-service",
15088    ))]
15089    #[derive(Clone, Default, PartialEq)]
15090    #[non_exhaustive]
15091    pub struct Status {
15092        /// Output only. The latest deployed model's status message (if any).
15093        pub message: std::string::String,
15094
15095        /// Output only. The time at which the status was last updated.
15096        pub last_update_time: std::option::Option<wkt::Timestamp>,
15097
15098        /// Output only. The number of available replicas of the deployed model.
15099        pub available_replica_count: i32,
15100
15101        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15102    }
15103
15104    #[cfg(any(
15105        feature = "deployment-resource-pool-service",
15106        feature = "endpoint-service",
15107    ))]
15108    impl Status {
15109        pub fn new() -> Self {
15110            std::default::Default::default()
15111        }
15112
15113        /// Sets the value of [message][crate::model::deployed_model::Status::message].
15114        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15115            self.message = v.into();
15116            self
15117        }
15118
15119        /// Sets the value of [last_update_time][crate::model::deployed_model::Status::last_update_time].
15120        pub fn set_last_update_time<T>(mut self, v: T) -> Self
15121        where
15122            T: std::convert::Into<wkt::Timestamp>,
15123        {
15124            self.last_update_time = std::option::Option::Some(v.into());
15125            self
15126        }
15127
15128        /// Sets or clears the value of [last_update_time][crate::model::deployed_model::Status::last_update_time].
15129        pub fn set_or_clear_last_update_time<T>(mut self, v: std::option::Option<T>) -> Self
15130        where
15131            T: std::convert::Into<wkt::Timestamp>,
15132        {
15133            self.last_update_time = v.map(|x| x.into());
15134            self
15135        }
15136
15137        /// Sets the value of [available_replica_count][crate::model::deployed_model::Status::available_replica_count].
15138        pub fn set_available_replica_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15139            self.available_replica_count = v.into();
15140            self
15141        }
15142    }
15143
15144    #[cfg(any(
15145        feature = "deployment-resource-pool-service",
15146        feature = "endpoint-service",
15147    ))]
15148    impl wkt::message::Message for Status {
15149        fn typename() -> &'static str {
15150            "type.googleapis.com/google.cloud.aiplatform.v1.DeployedModel.Status"
15151        }
15152    }
15153
15154    /// The prediction (for example, the machine) resources that the DeployedModel
15155    /// uses. The user is billed for the resources (at least their minimal amount)
15156    /// even if the DeployedModel receives no traffic.
15157    /// Not all Models support all resources types. See
15158    /// [Model.supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types].
15159    /// Required except for Large Model Deploy use cases.
15160    ///
15161    /// [google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]: crate::model::Model::supported_deployment_resources_types
15162    #[cfg(any(
15163        feature = "deployment-resource-pool-service",
15164        feature = "endpoint-service",
15165    ))]
15166    #[derive(Clone, Debug, PartialEq)]
15167    #[non_exhaustive]
15168    pub enum PredictionResources {
15169        /// A description of resources that are dedicated to the DeployedModel, and
15170        /// that need a higher degree of manual configuration.
15171        DedicatedResources(std::boxed::Box<crate::model::DedicatedResources>),
15172        /// A description of resources that to large degree are decided by Vertex
15173        /// AI, and require only a modest additional configuration.
15174        AutomaticResources(std::boxed::Box<crate::model::AutomaticResources>),
15175        /// The resource name of the shared DeploymentResourcePool to deploy on.
15176        /// Format:
15177        /// `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
15178        SharedResources(std::string::String),
15179    }
15180}
15181
15182/// PrivateEndpoints proto is used to provide paths for users to send
15183/// requests privately.
15184/// To send request via private service access, use predict_http_uri,
15185/// explain_http_uri or health_http_uri. To send request via private service
15186/// connect, use service_attachment.
15187#[cfg(any(
15188    feature = "deployment-resource-pool-service",
15189    feature = "endpoint-service",
15190))]
15191#[derive(Clone, Default, PartialEq)]
15192#[non_exhaustive]
15193pub struct PrivateEndpoints {
15194    /// Output only. Http(s) path to send prediction requests.
15195    pub predict_http_uri: std::string::String,
15196
15197    /// Output only. Http(s) path to send explain requests.
15198    pub explain_http_uri: std::string::String,
15199
15200    /// Output only. Http(s) path to send health check requests.
15201    pub health_http_uri: std::string::String,
15202
15203    /// Output only. The name of the service attachment resource. Populated if
15204    /// private service connect is enabled.
15205    pub service_attachment: std::string::String,
15206
15207    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15208}
15209
15210#[cfg(any(
15211    feature = "deployment-resource-pool-service",
15212    feature = "endpoint-service",
15213))]
15214impl PrivateEndpoints {
15215    pub fn new() -> Self {
15216        std::default::Default::default()
15217    }
15218
15219    /// Sets the value of [predict_http_uri][crate::model::PrivateEndpoints::predict_http_uri].
15220    pub fn set_predict_http_uri<T: std::convert::Into<std::string::String>>(
15221        mut self,
15222        v: T,
15223    ) -> Self {
15224        self.predict_http_uri = v.into();
15225        self
15226    }
15227
15228    /// Sets the value of [explain_http_uri][crate::model::PrivateEndpoints::explain_http_uri].
15229    pub fn set_explain_http_uri<T: std::convert::Into<std::string::String>>(
15230        mut self,
15231        v: T,
15232    ) -> Self {
15233        self.explain_http_uri = v.into();
15234        self
15235    }
15236
15237    /// Sets the value of [health_http_uri][crate::model::PrivateEndpoints::health_http_uri].
15238    pub fn set_health_http_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15239        self.health_http_uri = v.into();
15240        self
15241    }
15242
15243    /// Sets the value of [service_attachment][crate::model::PrivateEndpoints::service_attachment].
15244    pub fn set_service_attachment<T: std::convert::Into<std::string::String>>(
15245        mut self,
15246        v: T,
15247    ) -> Self {
15248        self.service_attachment = v.into();
15249        self
15250    }
15251}
15252
15253#[cfg(any(
15254    feature = "deployment-resource-pool-service",
15255    feature = "endpoint-service",
15256))]
15257impl wkt::message::Message for PrivateEndpoints {
15258    fn typename() -> &'static str {
15259        "type.googleapis.com/google.cloud.aiplatform.v1.PrivateEndpoints"
15260    }
15261}
15262
15263/// Configuration for logging request-response to a BigQuery table.
15264#[cfg(feature = "endpoint-service")]
15265#[derive(Clone, Default, PartialEq)]
15266#[non_exhaustive]
15267pub struct PredictRequestResponseLoggingConfig {
15268    /// If logging is enabled or not.
15269    pub enabled: bool,
15270
15271    /// Percentage of requests to be logged, expressed as a fraction in
15272    /// range(0,1].
15273    pub sampling_rate: f64,
15274
15275    /// BigQuery table for logging.
15276    /// If only given a project, a new dataset will be created with name
15277    /// `logging_<endpoint-display-name>_<endpoint-id>` where
15278    /// \<endpoint-display-name\> will be made BigQuery-dataset-name compatible (e.g.
15279    /// most special characters will become underscores). If no table name is
15280    /// given, a new table will be created with name `request_response_logging`
15281    pub bigquery_destination: std::option::Option<crate::model::BigQueryDestination>,
15282
15283    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15284}
15285
15286#[cfg(feature = "endpoint-service")]
15287impl PredictRequestResponseLoggingConfig {
15288    pub fn new() -> Self {
15289        std::default::Default::default()
15290    }
15291
15292    /// Sets the value of [enabled][crate::model::PredictRequestResponseLoggingConfig::enabled].
15293    pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15294        self.enabled = v.into();
15295        self
15296    }
15297
15298    /// Sets the value of [sampling_rate][crate::model::PredictRequestResponseLoggingConfig::sampling_rate].
15299    pub fn set_sampling_rate<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
15300        self.sampling_rate = v.into();
15301        self
15302    }
15303
15304    /// Sets the value of [bigquery_destination][crate::model::PredictRequestResponseLoggingConfig::bigquery_destination].
15305    pub fn set_bigquery_destination<T>(mut self, v: T) -> Self
15306    where
15307        T: std::convert::Into<crate::model::BigQueryDestination>,
15308    {
15309        self.bigquery_destination = std::option::Option::Some(v.into());
15310        self
15311    }
15312
15313    /// Sets or clears the value of [bigquery_destination][crate::model::PredictRequestResponseLoggingConfig::bigquery_destination].
15314    pub fn set_or_clear_bigquery_destination<T>(mut self, v: std::option::Option<T>) -> Self
15315    where
15316        T: std::convert::Into<crate::model::BigQueryDestination>,
15317    {
15318        self.bigquery_destination = v.map(|x| x.into());
15319        self
15320    }
15321}
15322
15323#[cfg(feature = "endpoint-service")]
15324impl wkt::message::Message for PredictRequestResponseLoggingConfig {
15325    fn typename() -> &'static str {
15326        "type.googleapis.com/google.cloud.aiplatform.v1.PredictRequestResponseLoggingConfig"
15327    }
15328}
15329
15330/// Configurations (e.g. inference timeout) that are applied on your endpoints.
15331#[cfg(feature = "endpoint-service")]
15332#[derive(Clone, Default, PartialEq)]
15333#[non_exhaustive]
15334pub struct ClientConnectionConfig {
15335    /// Customizable online prediction request timeout.
15336    pub inference_timeout: std::option::Option<wkt::Duration>,
15337
15338    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15339}
15340
15341#[cfg(feature = "endpoint-service")]
15342impl ClientConnectionConfig {
15343    pub fn new() -> Self {
15344        std::default::Default::default()
15345    }
15346
15347    /// Sets the value of [inference_timeout][crate::model::ClientConnectionConfig::inference_timeout].
15348    pub fn set_inference_timeout<T>(mut self, v: T) -> Self
15349    where
15350        T: std::convert::Into<wkt::Duration>,
15351    {
15352        self.inference_timeout = std::option::Option::Some(v.into());
15353        self
15354    }
15355
15356    /// Sets or clears the value of [inference_timeout][crate::model::ClientConnectionConfig::inference_timeout].
15357    pub fn set_or_clear_inference_timeout<T>(mut self, v: std::option::Option<T>) -> Self
15358    where
15359        T: std::convert::Into<wkt::Duration>,
15360    {
15361        self.inference_timeout = v.map(|x| x.into());
15362        self
15363    }
15364}
15365
15366#[cfg(feature = "endpoint-service")]
15367impl wkt::message::Message for ClientConnectionConfig {
15368    fn typename() -> &'static str {
15369        "type.googleapis.com/google.cloud.aiplatform.v1.ClientConnectionConfig"
15370    }
15371}
15372
15373/// Configuration for faster model deployment.
15374#[cfg(any(
15375    feature = "deployment-resource-pool-service",
15376    feature = "endpoint-service",
15377))]
15378#[derive(Clone, Default, PartialEq)]
15379#[non_exhaustive]
15380pub struct FasterDeploymentConfig {
15381    /// If true, enable fast tryout feature for this deployed model.
15382    pub fast_tryout_enabled: bool,
15383
15384    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15385}
15386
15387#[cfg(any(
15388    feature = "deployment-resource-pool-service",
15389    feature = "endpoint-service",
15390))]
15391impl FasterDeploymentConfig {
15392    pub fn new() -> Self {
15393        std::default::Default::default()
15394    }
15395
15396    /// Sets the value of [fast_tryout_enabled][crate::model::FasterDeploymentConfig::fast_tryout_enabled].
15397    pub fn set_fast_tryout_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15398        self.fast_tryout_enabled = v.into();
15399        self
15400    }
15401}
15402
15403#[cfg(any(
15404    feature = "deployment-resource-pool-service",
15405    feature = "endpoint-service",
15406))]
15407impl wkt::message::Message for FasterDeploymentConfig {
15408    fn typename() -> &'static str {
15409        "type.googleapis.com/google.cloud.aiplatform.v1.FasterDeploymentConfig"
15410    }
15411}
15412
15413/// Configuration for GenAiAdvancedFeatures.
15414#[cfg(feature = "endpoint-service")]
15415#[derive(Clone, Default, PartialEq)]
15416#[non_exhaustive]
15417pub struct GenAiAdvancedFeaturesConfig {
15418    /// Configuration for Retrieval Augmented Generation feature.
15419    pub rag_config: std::option::Option<crate::model::gen_ai_advanced_features_config::RagConfig>,
15420
15421    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15422}
15423
15424#[cfg(feature = "endpoint-service")]
15425impl GenAiAdvancedFeaturesConfig {
15426    pub fn new() -> Self {
15427        std::default::Default::default()
15428    }
15429
15430    /// Sets the value of [rag_config][crate::model::GenAiAdvancedFeaturesConfig::rag_config].
15431    pub fn set_rag_config<T>(mut self, v: T) -> Self
15432    where
15433        T: std::convert::Into<crate::model::gen_ai_advanced_features_config::RagConfig>,
15434    {
15435        self.rag_config = std::option::Option::Some(v.into());
15436        self
15437    }
15438
15439    /// Sets or clears the value of [rag_config][crate::model::GenAiAdvancedFeaturesConfig::rag_config].
15440    pub fn set_or_clear_rag_config<T>(mut self, v: std::option::Option<T>) -> Self
15441    where
15442        T: std::convert::Into<crate::model::gen_ai_advanced_features_config::RagConfig>,
15443    {
15444        self.rag_config = v.map(|x| x.into());
15445        self
15446    }
15447}
15448
15449#[cfg(feature = "endpoint-service")]
15450impl wkt::message::Message for GenAiAdvancedFeaturesConfig {
15451    fn typename() -> &'static str {
15452        "type.googleapis.com/google.cloud.aiplatform.v1.GenAiAdvancedFeaturesConfig"
15453    }
15454}
15455
15456/// Defines additional types related to [GenAiAdvancedFeaturesConfig].
15457#[cfg(feature = "endpoint-service")]
15458pub mod gen_ai_advanced_features_config {
15459    #[allow(unused_imports)]
15460    use super::*;
15461
15462    /// Configuration for Retrieval Augmented Generation feature.
15463    #[cfg(feature = "endpoint-service")]
15464    #[derive(Clone, Default, PartialEq)]
15465    #[non_exhaustive]
15466    pub struct RagConfig {
15467        /// If true, enable Retrieval Augmented Generation in ChatCompletion request.
15468        /// Once enabled, the endpoint will be identified as GenAI endpoint and
15469        /// Arthedain router will be used.
15470        pub enable_rag: bool,
15471
15472        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15473    }
15474
15475    #[cfg(feature = "endpoint-service")]
15476    impl RagConfig {
15477        pub fn new() -> Self {
15478            std::default::Default::default()
15479        }
15480
15481        /// Sets the value of [enable_rag][crate::model::gen_ai_advanced_features_config::RagConfig::enable_rag].
15482        pub fn set_enable_rag<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15483            self.enable_rag = v.into();
15484            self
15485        }
15486    }
15487
15488    #[cfg(feature = "endpoint-service")]
15489    impl wkt::message::Message for RagConfig {
15490        fn typename() -> &'static str {
15491            "type.googleapis.com/google.cloud.aiplatform.v1.GenAiAdvancedFeaturesConfig.RagConfig"
15492        }
15493    }
15494}
15495
15496/// Configuration for Speculative Decoding.
15497#[cfg(any(
15498    feature = "deployment-resource-pool-service",
15499    feature = "endpoint-service",
15500))]
15501#[derive(Clone, Default, PartialEq)]
15502#[non_exhaustive]
15503pub struct SpeculativeDecodingSpec {
15504    /// The number of speculative tokens to generate at each step.
15505    pub speculative_token_count: i32,
15506
15507    /// The type of speculation method to use.
15508    pub speculation: std::option::Option<crate::model::speculative_decoding_spec::Speculation>,
15509
15510    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15511}
15512
15513#[cfg(any(
15514    feature = "deployment-resource-pool-service",
15515    feature = "endpoint-service",
15516))]
15517impl SpeculativeDecodingSpec {
15518    pub fn new() -> Self {
15519        std::default::Default::default()
15520    }
15521
15522    /// Sets the value of [speculative_token_count][crate::model::SpeculativeDecodingSpec::speculative_token_count].
15523    pub fn set_speculative_token_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15524        self.speculative_token_count = v.into();
15525        self
15526    }
15527
15528    /// Sets the value of [speculation][crate::model::SpeculativeDecodingSpec::speculation].
15529    ///
15530    /// Note that all the setters affecting `speculation` are mutually
15531    /// exclusive.
15532    pub fn set_speculation<
15533        T: std::convert::Into<
15534                std::option::Option<crate::model::speculative_decoding_spec::Speculation>,
15535            >,
15536    >(
15537        mut self,
15538        v: T,
15539    ) -> Self {
15540        self.speculation = v.into();
15541        self
15542    }
15543
15544    /// The value of [speculation][crate::model::SpeculativeDecodingSpec::speculation]
15545    /// if it holds a `DraftModelSpeculation`, `None` if the field is not set or
15546    /// holds a different branch.
15547    pub fn draft_model_speculation(
15548        &self,
15549    ) -> std::option::Option<
15550        &std::boxed::Box<crate::model::speculative_decoding_spec::DraftModelSpeculation>,
15551    > {
15552        #[allow(unreachable_patterns)]
15553        self.speculation.as_ref().and_then(|v| match v {
15554            crate::model::speculative_decoding_spec::Speculation::DraftModelSpeculation(v) => {
15555                std::option::Option::Some(v)
15556            }
15557            _ => std::option::Option::None,
15558        })
15559    }
15560
15561    /// Sets the value of [speculation][crate::model::SpeculativeDecodingSpec::speculation]
15562    /// to hold a `DraftModelSpeculation`.
15563    ///
15564    /// Note that all the setters affecting `speculation` are
15565    /// mutually exclusive.
15566    pub fn set_draft_model_speculation<
15567        T: std::convert::Into<
15568                std::boxed::Box<crate::model::speculative_decoding_spec::DraftModelSpeculation>,
15569            >,
15570    >(
15571        mut self,
15572        v: T,
15573    ) -> Self {
15574        self.speculation = std::option::Option::Some(
15575            crate::model::speculative_decoding_spec::Speculation::DraftModelSpeculation(v.into()),
15576        );
15577        self
15578    }
15579
15580    /// The value of [speculation][crate::model::SpeculativeDecodingSpec::speculation]
15581    /// if it holds a `NgramSpeculation`, `None` if the field is not set or
15582    /// holds a different branch.
15583    pub fn ngram_speculation(
15584        &self,
15585    ) -> std::option::Option<
15586        &std::boxed::Box<crate::model::speculative_decoding_spec::NgramSpeculation>,
15587    > {
15588        #[allow(unreachable_patterns)]
15589        self.speculation.as_ref().and_then(|v| match v {
15590            crate::model::speculative_decoding_spec::Speculation::NgramSpeculation(v) => {
15591                std::option::Option::Some(v)
15592            }
15593            _ => std::option::Option::None,
15594        })
15595    }
15596
15597    /// Sets the value of [speculation][crate::model::SpeculativeDecodingSpec::speculation]
15598    /// to hold a `NgramSpeculation`.
15599    ///
15600    /// Note that all the setters affecting `speculation` are
15601    /// mutually exclusive.
15602    pub fn set_ngram_speculation<
15603        T: std::convert::Into<
15604                std::boxed::Box<crate::model::speculative_decoding_spec::NgramSpeculation>,
15605            >,
15606    >(
15607        mut self,
15608        v: T,
15609    ) -> Self {
15610        self.speculation = std::option::Option::Some(
15611            crate::model::speculative_decoding_spec::Speculation::NgramSpeculation(v.into()),
15612        );
15613        self
15614    }
15615}
15616
15617#[cfg(any(
15618    feature = "deployment-resource-pool-service",
15619    feature = "endpoint-service",
15620))]
15621impl wkt::message::Message for SpeculativeDecodingSpec {
15622    fn typename() -> &'static str {
15623        "type.googleapis.com/google.cloud.aiplatform.v1.SpeculativeDecodingSpec"
15624    }
15625}
15626
15627/// Defines additional types related to [SpeculativeDecodingSpec].
15628#[cfg(any(
15629    feature = "deployment-resource-pool-service",
15630    feature = "endpoint-service",
15631))]
15632pub mod speculative_decoding_spec {
15633    #[allow(unused_imports)]
15634    use super::*;
15635
15636    /// Draft model speculation works by using the smaller model to generate
15637    /// candidate tokens for speculative decoding.
15638    #[cfg(any(
15639        feature = "deployment-resource-pool-service",
15640        feature = "endpoint-service",
15641    ))]
15642    #[derive(Clone, Default, PartialEq)]
15643    #[non_exhaustive]
15644    pub struct DraftModelSpeculation {
15645        /// Required. The resource name of the draft model.
15646        pub draft_model: std::string::String,
15647
15648        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15649    }
15650
15651    #[cfg(any(
15652        feature = "deployment-resource-pool-service",
15653        feature = "endpoint-service",
15654    ))]
15655    impl DraftModelSpeculation {
15656        pub fn new() -> Self {
15657            std::default::Default::default()
15658        }
15659
15660        /// Sets the value of [draft_model][crate::model::speculative_decoding_spec::DraftModelSpeculation::draft_model].
15661        pub fn set_draft_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15662            self.draft_model = v.into();
15663            self
15664        }
15665    }
15666
15667    #[cfg(any(
15668        feature = "deployment-resource-pool-service",
15669        feature = "endpoint-service",
15670    ))]
15671    impl wkt::message::Message for DraftModelSpeculation {
15672        fn typename() -> &'static str {
15673            "type.googleapis.com/google.cloud.aiplatform.v1.SpeculativeDecodingSpec.DraftModelSpeculation"
15674        }
15675    }
15676
15677    /// N-Gram speculation works by trying to find matching tokens in the
15678    /// previous prompt sequence and use those as speculation for generating
15679    /// new tokens.
15680    #[cfg(any(
15681        feature = "deployment-resource-pool-service",
15682        feature = "endpoint-service",
15683    ))]
15684    #[derive(Clone, Default, PartialEq)]
15685    #[non_exhaustive]
15686    pub struct NgramSpeculation {
15687        /// The number of last N input tokens used as ngram to search/match
15688        /// against the previous prompt sequence.
15689        /// This is equal to the N in N-Gram.
15690        /// The default value is 3 if not specified.
15691        pub ngram_size: i32,
15692
15693        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15694    }
15695
15696    #[cfg(any(
15697        feature = "deployment-resource-pool-service",
15698        feature = "endpoint-service",
15699    ))]
15700    impl NgramSpeculation {
15701        pub fn new() -> Self {
15702            std::default::Default::default()
15703        }
15704
15705        /// Sets the value of [ngram_size][crate::model::speculative_decoding_spec::NgramSpeculation::ngram_size].
15706        pub fn set_ngram_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15707            self.ngram_size = v.into();
15708            self
15709        }
15710    }
15711
15712    #[cfg(any(
15713        feature = "deployment-resource-pool-service",
15714        feature = "endpoint-service",
15715    ))]
15716    impl wkt::message::Message for NgramSpeculation {
15717        fn typename() -> &'static str {
15718            "type.googleapis.com/google.cloud.aiplatform.v1.SpeculativeDecodingSpec.NgramSpeculation"
15719        }
15720    }
15721
15722    /// The type of speculation method to use.
15723    #[cfg(any(
15724        feature = "deployment-resource-pool-service",
15725        feature = "endpoint-service",
15726    ))]
15727    #[derive(Clone, Debug, PartialEq)]
15728    #[non_exhaustive]
15729    pub enum Speculation {
15730        /// draft model speculation.
15731        DraftModelSpeculation(
15732            std::boxed::Box<crate::model::speculative_decoding_spec::DraftModelSpeculation>,
15733        ),
15734        /// N-Gram speculation.
15735        NgramSpeculation(
15736            std::boxed::Box<crate::model::speculative_decoding_spec::NgramSpeculation>,
15737        ),
15738    }
15739}
15740
15741/// Request message for
15742/// [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint].
15743///
15744/// [google.cloud.aiplatform.v1.EndpointService.CreateEndpoint]: crate::client::EndpointService::create_endpoint
15745#[cfg(feature = "endpoint-service")]
15746#[derive(Clone, Default, PartialEq)]
15747#[non_exhaustive]
15748pub struct CreateEndpointRequest {
15749    /// Required. The resource name of the Location to create the Endpoint in.
15750    /// Format: `projects/{project}/locations/{location}`
15751    pub parent: std::string::String,
15752
15753    /// Required. The Endpoint to create.
15754    pub endpoint: std::option::Option<crate::model::Endpoint>,
15755
15756    /// Immutable. The ID to use for endpoint, which will become the final
15757    /// component of the endpoint resource name.
15758    /// If not provided, Vertex AI will generate a value for this ID.
15759    ///
15760    /// If the first character is a letter, this value may be up to 63 characters,
15761    /// and valid characters are `[a-z0-9-]`. The last character must be a letter
15762    /// or number.
15763    ///
15764    /// If the first character is a number, this value may be up to 9 characters,
15765    /// and valid characters are `[0-9]` with no leading zeros.
15766    ///
15767    /// When using HTTP/JSON, this field is populated
15768    /// based on a query string argument, such as `?endpoint_id=12345`. This is the
15769    /// fallback for fields that are not included in either the URI or the body.
15770    pub endpoint_id: std::string::String,
15771
15772    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15773}
15774
15775#[cfg(feature = "endpoint-service")]
15776impl CreateEndpointRequest {
15777    pub fn new() -> Self {
15778        std::default::Default::default()
15779    }
15780
15781    /// Sets the value of [parent][crate::model::CreateEndpointRequest::parent].
15782    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15783        self.parent = v.into();
15784        self
15785    }
15786
15787    /// Sets the value of [endpoint][crate::model::CreateEndpointRequest::endpoint].
15788    pub fn set_endpoint<T>(mut self, v: T) -> Self
15789    where
15790        T: std::convert::Into<crate::model::Endpoint>,
15791    {
15792        self.endpoint = std::option::Option::Some(v.into());
15793        self
15794    }
15795
15796    /// Sets or clears the value of [endpoint][crate::model::CreateEndpointRequest::endpoint].
15797    pub fn set_or_clear_endpoint<T>(mut self, v: std::option::Option<T>) -> Self
15798    where
15799        T: std::convert::Into<crate::model::Endpoint>,
15800    {
15801        self.endpoint = v.map(|x| x.into());
15802        self
15803    }
15804
15805    /// Sets the value of [endpoint_id][crate::model::CreateEndpointRequest::endpoint_id].
15806    pub fn set_endpoint_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15807        self.endpoint_id = v.into();
15808        self
15809    }
15810}
15811
15812#[cfg(feature = "endpoint-service")]
15813impl wkt::message::Message for CreateEndpointRequest {
15814    fn typename() -> &'static str {
15815        "type.googleapis.com/google.cloud.aiplatform.v1.CreateEndpointRequest"
15816    }
15817}
15818
15819/// Runtime operation information for
15820/// [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint].
15821///
15822/// [google.cloud.aiplatform.v1.EndpointService.CreateEndpoint]: crate::client::EndpointService::create_endpoint
15823#[cfg(feature = "endpoint-service")]
15824#[derive(Clone, Default, PartialEq)]
15825#[non_exhaustive]
15826pub struct CreateEndpointOperationMetadata {
15827    /// The operation generic information.
15828    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
15829
15830    /// Output only. The deployment stage of the model. Only populated if this
15831    /// CreateEndpoint request deploys a model at the same time.
15832    pub deployment_stage: crate::model::DeploymentStage,
15833
15834    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15835}
15836
15837#[cfg(feature = "endpoint-service")]
15838impl CreateEndpointOperationMetadata {
15839    pub fn new() -> Self {
15840        std::default::Default::default()
15841    }
15842
15843    /// Sets the value of [generic_metadata][crate::model::CreateEndpointOperationMetadata::generic_metadata].
15844    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
15845    where
15846        T: std::convert::Into<crate::model::GenericOperationMetadata>,
15847    {
15848        self.generic_metadata = std::option::Option::Some(v.into());
15849        self
15850    }
15851
15852    /// Sets or clears the value of [generic_metadata][crate::model::CreateEndpointOperationMetadata::generic_metadata].
15853    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
15854    where
15855        T: std::convert::Into<crate::model::GenericOperationMetadata>,
15856    {
15857        self.generic_metadata = v.map(|x| x.into());
15858        self
15859    }
15860
15861    /// Sets the value of [deployment_stage][crate::model::CreateEndpointOperationMetadata::deployment_stage].
15862    pub fn set_deployment_stage<T: std::convert::Into<crate::model::DeploymentStage>>(
15863        mut self,
15864        v: T,
15865    ) -> Self {
15866        self.deployment_stage = v.into();
15867        self
15868    }
15869}
15870
15871#[cfg(feature = "endpoint-service")]
15872impl wkt::message::Message for CreateEndpointOperationMetadata {
15873    fn typename() -> &'static str {
15874        "type.googleapis.com/google.cloud.aiplatform.v1.CreateEndpointOperationMetadata"
15875    }
15876}
15877
15878/// Request message for
15879/// [EndpointService.GetEndpoint][google.cloud.aiplatform.v1.EndpointService.GetEndpoint]
15880///
15881/// [google.cloud.aiplatform.v1.EndpointService.GetEndpoint]: crate::client::EndpointService::get_endpoint
15882#[cfg(feature = "endpoint-service")]
15883#[derive(Clone, Default, PartialEq)]
15884#[non_exhaustive]
15885pub struct GetEndpointRequest {
15886    /// Required. The name of the Endpoint resource.
15887    /// Format:
15888    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
15889    pub name: std::string::String,
15890
15891    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15892}
15893
15894#[cfg(feature = "endpoint-service")]
15895impl GetEndpointRequest {
15896    pub fn new() -> Self {
15897        std::default::Default::default()
15898    }
15899
15900    /// Sets the value of [name][crate::model::GetEndpointRequest::name].
15901    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15902        self.name = v.into();
15903        self
15904    }
15905}
15906
15907#[cfg(feature = "endpoint-service")]
15908impl wkt::message::Message for GetEndpointRequest {
15909    fn typename() -> &'static str {
15910        "type.googleapis.com/google.cloud.aiplatform.v1.GetEndpointRequest"
15911    }
15912}
15913
15914/// Request message for
15915/// [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints].
15916///
15917/// [google.cloud.aiplatform.v1.EndpointService.ListEndpoints]: crate::client::EndpointService::list_endpoints
15918#[cfg(feature = "endpoint-service")]
15919#[derive(Clone, Default, PartialEq)]
15920#[non_exhaustive]
15921pub struct ListEndpointsRequest {
15922    /// Required. The resource name of the Location from which to list the
15923    /// Endpoints. Format: `projects/{project}/locations/{location}`
15924    pub parent: std::string::String,
15925
15926    /// Optional. An expression for filtering the results of the request. For field
15927    /// names both snake_case and camelCase are supported.
15928    ///
15929    /// * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint
15930    ///   ID, i.e. the last segment of the Endpoint's
15931    ///   [resource name][google.cloud.aiplatform.v1.Endpoint.name].
15932    /// * `display_name` supports `=` and `!=`.
15933    /// * `labels` supports general map functions that is:
15934    ///   * `labels.key=value` - key:value equality
15935    ///   * `labels.key:*` or `labels:key` - key existence
15936    ///   * A key including a space must be quoted. `labels."a key"`.
15937    /// * `base_model_name` only supports `=`.
15938    ///
15939    /// Some examples:
15940    ///
15941    /// * `endpoint=1`
15942    /// * `displayName="myDisplayName"`
15943    /// * `labels.myKey="myValue"`
15944    /// * `baseModelName="text-bison"`
15945    ///
15946    /// [google.cloud.aiplatform.v1.Endpoint.name]: crate::model::Endpoint::name
15947    pub filter: std::string::String,
15948
15949    /// Optional. The standard list page size.
15950    pub page_size: i32,
15951
15952    /// Optional. The standard list page token.
15953    /// Typically obtained via
15954    /// [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token]
15955    /// of the previous
15956    /// [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]
15957    /// call.
15958    ///
15959    /// [google.cloud.aiplatform.v1.EndpointService.ListEndpoints]: crate::client::EndpointService::list_endpoints
15960    /// [google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token]: crate::model::ListEndpointsResponse::next_page_token
15961    pub page_token: std::string::String,
15962
15963    /// Optional. Mask specifying which fields to read.
15964    pub read_mask: std::option::Option<wkt::FieldMask>,
15965
15966    /// A comma-separated list of fields to order by, sorted in ascending order.
15967    /// Use "desc" after a field name for descending.
15968    /// Supported fields:
15969    ///
15970    /// * `display_name`
15971    /// * `create_time`
15972    /// * `update_time`
15973    ///
15974    /// Example: `display_name, create_time desc`.
15975    pub order_by: std::string::String,
15976
15977    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15978}
15979
15980#[cfg(feature = "endpoint-service")]
15981impl ListEndpointsRequest {
15982    pub fn new() -> Self {
15983        std::default::Default::default()
15984    }
15985
15986    /// Sets the value of [parent][crate::model::ListEndpointsRequest::parent].
15987    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15988        self.parent = v.into();
15989        self
15990    }
15991
15992    /// Sets the value of [filter][crate::model::ListEndpointsRequest::filter].
15993    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15994        self.filter = v.into();
15995        self
15996    }
15997
15998    /// Sets the value of [page_size][crate::model::ListEndpointsRequest::page_size].
15999    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16000        self.page_size = v.into();
16001        self
16002    }
16003
16004    /// Sets the value of [page_token][crate::model::ListEndpointsRequest::page_token].
16005    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16006        self.page_token = v.into();
16007        self
16008    }
16009
16010    /// Sets the value of [read_mask][crate::model::ListEndpointsRequest::read_mask].
16011    pub fn set_read_mask<T>(mut self, v: T) -> Self
16012    where
16013        T: std::convert::Into<wkt::FieldMask>,
16014    {
16015        self.read_mask = std::option::Option::Some(v.into());
16016        self
16017    }
16018
16019    /// Sets or clears the value of [read_mask][crate::model::ListEndpointsRequest::read_mask].
16020    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
16021    where
16022        T: std::convert::Into<wkt::FieldMask>,
16023    {
16024        self.read_mask = v.map(|x| x.into());
16025        self
16026    }
16027
16028    /// Sets the value of [order_by][crate::model::ListEndpointsRequest::order_by].
16029    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16030        self.order_by = v.into();
16031        self
16032    }
16033}
16034
16035#[cfg(feature = "endpoint-service")]
16036impl wkt::message::Message for ListEndpointsRequest {
16037    fn typename() -> &'static str {
16038        "type.googleapis.com/google.cloud.aiplatform.v1.ListEndpointsRequest"
16039    }
16040}
16041
16042/// Response message for
16043/// [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints].
16044///
16045/// [google.cloud.aiplatform.v1.EndpointService.ListEndpoints]: crate::client::EndpointService::list_endpoints
16046#[cfg(feature = "endpoint-service")]
16047#[derive(Clone, Default, PartialEq)]
16048#[non_exhaustive]
16049pub struct ListEndpointsResponse {
16050    /// List of Endpoints in the requested page.
16051    pub endpoints: std::vec::Vec<crate::model::Endpoint>,
16052
16053    /// A token to retrieve the next page of results.
16054    /// Pass to
16055    /// [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token]
16056    /// to obtain that page.
16057    ///
16058    /// [google.cloud.aiplatform.v1.ListEndpointsRequest.page_token]: crate::model::ListEndpointsRequest::page_token
16059    pub next_page_token: std::string::String,
16060
16061    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16062}
16063
16064#[cfg(feature = "endpoint-service")]
16065impl ListEndpointsResponse {
16066    pub fn new() -> Self {
16067        std::default::Default::default()
16068    }
16069
16070    /// Sets the value of [endpoints][crate::model::ListEndpointsResponse::endpoints].
16071    pub fn set_endpoints<T, V>(mut self, v: T) -> Self
16072    where
16073        T: std::iter::IntoIterator<Item = V>,
16074        V: std::convert::Into<crate::model::Endpoint>,
16075    {
16076        use std::iter::Iterator;
16077        self.endpoints = v.into_iter().map(|i| i.into()).collect();
16078        self
16079    }
16080
16081    /// Sets the value of [next_page_token][crate::model::ListEndpointsResponse::next_page_token].
16082    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16083        self.next_page_token = v.into();
16084        self
16085    }
16086}
16087
16088#[cfg(feature = "endpoint-service")]
16089impl wkt::message::Message for ListEndpointsResponse {
16090    fn typename() -> &'static str {
16091        "type.googleapis.com/google.cloud.aiplatform.v1.ListEndpointsResponse"
16092    }
16093}
16094
16095#[cfg(feature = "endpoint-service")]
16096#[doc(hidden)]
16097impl gax::paginator::internal::PageableResponse for ListEndpointsResponse {
16098    type PageItem = crate::model::Endpoint;
16099
16100    fn items(self) -> std::vec::Vec<Self::PageItem> {
16101        self.endpoints
16102    }
16103
16104    fn next_page_token(&self) -> std::string::String {
16105        use std::clone::Clone;
16106        self.next_page_token.clone()
16107    }
16108}
16109
16110/// Request message for
16111/// [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
16112///
16113/// [google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint]: crate::client::EndpointService::update_endpoint
16114#[cfg(feature = "endpoint-service")]
16115#[derive(Clone, Default, PartialEq)]
16116#[non_exhaustive]
16117pub struct UpdateEndpointRequest {
16118    /// Required. The Endpoint which replaces the resource on the server.
16119    pub endpoint: std::option::Option<crate::model::Endpoint>,
16120
16121    /// Required. The update mask applies to the resource. See
16122    /// [google.protobuf.FieldMask][google.protobuf.FieldMask].
16123    ///
16124    /// [google.protobuf.FieldMask]: wkt::FieldMask
16125    pub update_mask: std::option::Option<wkt::FieldMask>,
16126
16127    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16128}
16129
16130#[cfg(feature = "endpoint-service")]
16131impl UpdateEndpointRequest {
16132    pub fn new() -> Self {
16133        std::default::Default::default()
16134    }
16135
16136    /// Sets the value of [endpoint][crate::model::UpdateEndpointRequest::endpoint].
16137    pub fn set_endpoint<T>(mut self, v: T) -> Self
16138    where
16139        T: std::convert::Into<crate::model::Endpoint>,
16140    {
16141        self.endpoint = std::option::Option::Some(v.into());
16142        self
16143    }
16144
16145    /// Sets or clears the value of [endpoint][crate::model::UpdateEndpointRequest::endpoint].
16146    pub fn set_or_clear_endpoint<T>(mut self, v: std::option::Option<T>) -> Self
16147    where
16148        T: std::convert::Into<crate::model::Endpoint>,
16149    {
16150        self.endpoint = v.map(|x| x.into());
16151        self
16152    }
16153
16154    /// Sets the value of [update_mask][crate::model::UpdateEndpointRequest::update_mask].
16155    pub fn set_update_mask<T>(mut self, v: T) -> Self
16156    where
16157        T: std::convert::Into<wkt::FieldMask>,
16158    {
16159        self.update_mask = std::option::Option::Some(v.into());
16160        self
16161    }
16162
16163    /// Sets or clears the value of [update_mask][crate::model::UpdateEndpointRequest::update_mask].
16164    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16165    where
16166        T: std::convert::Into<wkt::FieldMask>,
16167    {
16168        self.update_mask = v.map(|x| x.into());
16169        self
16170    }
16171}
16172
16173#[cfg(feature = "endpoint-service")]
16174impl wkt::message::Message for UpdateEndpointRequest {
16175    fn typename() -> &'static str {
16176        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateEndpointRequest"
16177    }
16178}
16179
16180/// Request message for
16181/// [EndpointService.UpdateEndpointLongRunning][google.cloud.aiplatform.v1.EndpointService.UpdateEndpointLongRunning].
16182///
16183/// [google.cloud.aiplatform.v1.EndpointService.UpdateEndpointLongRunning]: crate::client::EndpointService::update_endpoint_long_running
16184#[cfg(feature = "endpoint-service")]
16185#[derive(Clone, Default, PartialEq)]
16186#[non_exhaustive]
16187pub struct UpdateEndpointLongRunningRequest {
16188    /// Required. The Endpoint which replaces the resource on the server. Currently
16189    /// we only support updating the `client_connection_config` field, all the
16190    /// other fields' update will be blocked.
16191    pub endpoint: std::option::Option<crate::model::Endpoint>,
16192
16193    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16194}
16195
16196#[cfg(feature = "endpoint-service")]
16197impl UpdateEndpointLongRunningRequest {
16198    pub fn new() -> Self {
16199        std::default::Default::default()
16200    }
16201
16202    /// Sets the value of [endpoint][crate::model::UpdateEndpointLongRunningRequest::endpoint].
16203    pub fn set_endpoint<T>(mut self, v: T) -> Self
16204    where
16205        T: std::convert::Into<crate::model::Endpoint>,
16206    {
16207        self.endpoint = std::option::Option::Some(v.into());
16208        self
16209    }
16210
16211    /// Sets or clears the value of [endpoint][crate::model::UpdateEndpointLongRunningRequest::endpoint].
16212    pub fn set_or_clear_endpoint<T>(mut self, v: std::option::Option<T>) -> Self
16213    where
16214        T: std::convert::Into<crate::model::Endpoint>,
16215    {
16216        self.endpoint = v.map(|x| x.into());
16217        self
16218    }
16219}
16220
16221#[cfg(feature = "endpoint-service")]
16222impl wkt::message::Message for UpdateEndpointLongRunningRequest {
16223    fn typename() -> &'static str {
16224        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateEndpointLongRunningRequest"
16225    }
16226}
16227
16228/// Runtime operation information for
16229/// [EndpointService.UpdateEndpointLongRunning][google.cloud.aiplatform.v1.EndpointService.UpdateEndpointLongRunning].
16230///
16231/// [google.cloud.aiplatform.v1.EndpointService.UpdateEndpointLongRunning]: crate::client::EndpointService::update_endpoint_long_running
16232#[cfg(feature = "endpoint-service")]
16233#[derive(Clone, Default, PartialEq)]
16234#[non_exhaustive]
16235pub struct UpdateEndpointOperationMetadata {
16236    /// The operation generic information.
16237    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
16238
16239    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16240}
16241
16242#[cfg(feature = "endpoint-service")]
16243impl UpdateEndpointOperationMetadata {
16244    pub fn new() -> Self {
16245        std::default::Default::default()
16246    }
16247
16248    /// Sets the value of [generic_metadata][crate::model::UpdateEndpointOperationMetadata::generic_metadata].
16249    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
16250    where
16251        T: std::convert::Into<crate::model::GenericOperationMetadata>,
16252    {
16253        self.generic_metadata = std::option::Option::Some(v.into());
16254        self
16255    }
16256
16257    /// Sets or clears the value of [generic_metadata][crate::model::UpdateEndpointOperationMetadata::generic_metadata].
16258    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
16259    where
16260        T: std::convert::Into<crate::model::GenericOperationMetadata>,
16261    {
16262        self.generic_metadata = v.map(|x| x.into());
16263        self
16264    }
16265}
16266
16267#[cfg(feature = "endpoint-service")]
16268impl wkt::message::Message for UpdateEndpointOperationMetadata {
16269    fn typename() -> &'static str {
16270        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateEndpointOperationMetadata"
16271    }
16272}
16273
16274/// Request message for
16275/// [EndpointService.DeleteEndpoint][google.cloud.aiplatform.v1.EndpointService.DeleteEndpoint].
16276///
16277/// [google.cloud.aiplatform.v1.EndpointService.DeleteEndpoint]: crate::client::EndpointService::delete_endpoint
16278#[cfg(feature = "endpoint-service")]
16279#[derive(Clone, Default, PartialEq)]
16280#[non_exhaustive]
16281pub struct DeleteEndpointRequest {
16282    /// Required. The name of the Endpoint resource to be deleted.
16283    /// Format:
16284    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
16285    pub name: std::string::String,
16286
16287    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16288}
16289
16290#[cfg(feature = "endpoint-service")]
16291impl DeleteEndpointRequest {
16292    pub fn new() -> Self {
16293        std::default::Default::default()
16294    }
16295
16296    /// Sets the value of [name][crate::model::DeleteEndpointRequest::name].
16297    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16298        self.name = v.into();
16299        self
16300    }
16301}
16302
16303#[cfg(feature = "endpoint-service")]
16304impl wkt::message::Message for DeleteEndpointRequest {
16305    fn typename() -> &'static str {
16306        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteEndpointRequest"
16307    }
16308}
16309
16310/// Request message for
16311/// [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
16312///
16313/// [google.cloud.aiplatform.v1.EndpointService.DeployModel]: crate::client::EndpointService::deploy_model
16314#[cfg(feature = "endpoint-service")]
16315#[derive(Clone, Default, PartialEq)]
16316#[non_exhaustive]
16317pub struct DeployModelRequest {
16318    /// Required. The name of the Endpoint resource into which to deploy a Model.
16319    /// Format:
16320    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
16321    pub endpoint: std::string::String,
16322
16323    /// Required. The DeployedModel to be created within the Endpoint. Note that
16324    /// [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]
16325    /// must be updated for the DeployedModel to start receiving traffic, either as
16326    /// part of this call, or via
16327    /// [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
16328    ///
16329    /// [google.cloud.aiplatform.v1.Endpoint.traffic_split]: crate::model::Endpoint::traffic_split
16330    /// [google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint]: crate::client::EndpointService::update_endpoint
16331    pub deployed_model: std::option::Option<crate::model::DeployedModel>,
16332
16333    /// A map from a DeployedModel's ID to the percentage of this Endpoint's
16334    /// traffic that should be forwarded to that DeployedModel.
16335    ///
16336    /// If this field is non-empty, then the Endpoint's
16337    /// [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
16338    /// overwritten with it. To refer to the ID of the just being deployed Model, a
16339    /// "0" should be used, and the actual ID of the new DeployedModel will be
16340    /// filled in its place by this method. The traffic percentage values must add
16341    /// up to 100.
16342    ///
16343    /// If this field is empty, then the Endpoint's
16344    /// [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not
16345    /// updated.
16346    ///
16347    /// [google.cloud.aiplatform.v1.Endpoint.traffic_split]: crate::model::Endpoint::traffic_split
16348    pub traffic_split: std::collections::HashMap<std::string::String, i32>,
16349
16350    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16351}
16352
16353#[cfg(feature = "endpoint-service")]
16354impl DeployModelRequest {
16355    pub fn new() -> Self {
16356        std::default::Default::default()
16357    }
16358
16359    /// Sets the value of [endpoint][crate::model::DeployModelRequest::endpoint].
16360    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16361        self.endpoint = v.into();
16362        self
16363    }
16364
16365    /// Sets the value of [deployed_model][crate::model::DeployModelRequest::deployed_model].
16366    pub fn set_deployed_model<T>(mut self, v: T) -> Self
16367    where
16368        T: std::convert::Into<crate::model::DeployedModel>,
16369    {
16370        self.deployed_model = std::option::Option::Some(v.into());
16371        self
16372    }
16373
16374    /// Sets or clears the value of [deployed_model][crate::model::DeployModelRequest::deployed_model].
16375    pub fn set_or_clear_deployed_model<T>(mut self, v: std::option::Option<T>) -> Self
16376    where
16377        T: std::convert::Into<crate::model::DeployedModel>,
16378    {
16379        self.deployed_model = v.map(|x| x.into());
16380        self
16381    }
16382
16383    /// Sets the value of [traffic_split][crate::model::DeployModelRequest::traffic_split].
16384    pub fn set_traffic_split<T, K, V>(mut self, v: T) -> Self
16385    where
16386        T: std::iter::IntoIterator<Item = (K, V)>,
16387        K: std::convert::Into<std::string::String>,
16388        V: std::convert::Into<i32>,
16389    {
16390        use std::iter::Iterator;
16391        self.traffic_split = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
16392        self
16393    }
16394}
16395
16396#[cfg(feature = "endpoint-service")]
16397impl wkt::message::Message for DeployModelRequest {
16398    fn typename() -> &'static str {
16399        "type.googleapis.com/google.cloud.aiplatform.v1.DeployModelRequest"
16400    }
16401}
16402
16403/// Response message for
16404/// [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
16405///
16406/// [google.cloud.aiplatform.v1.EndpointService.DeployModel]: crate::client::EndpointService::deploy_model
16407#[cfg(feature = "endpoint-service")]
16408#[derive(Clone, Default, PartialEq)]
16409#[non_exhaustive]
16410pub struct DeployModelResponse {
16411    /// The DeployedModel that had been deployed in the Endpoint.
16412    pub deployed_model: std::option::Option<crate::model::DeployedModel>,
16413
16414    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16415}
16416
16417#[cfg(feature = "endpoint-service")]
16418impl DeployModelResponse {
16419    pub fn new() -> Self {
16420        std::default::Default::default()
16421    }
16422
16423    /// Sets the value of [deployed_model][crate::model::DeployModelResponse::deployed_model].
16424    pub fn set_deployed_model<T>(mut self, v: T) -> Self
16425    where
16426        T: std::convert::Into<crate::model::DeployedModel>,
16427    {
16428        self.deployed_model = std::option::Option::Some(v.into());
16429        self
16430    }
16431
16432    /// Sets or clears the value of [deployed_model][crate::model::DeployModelResponse::deployed_model].
16433    pub fn set_or_clear_deployed_model<T>(mut self, v: std::option::Option<T>) -> Self
16434    where
16435        T: std::convert::Into<crate::model::DeployedModel>,
16436    {
16437        self.deployed_model = v.map(|x| x.into());
16438        self
16439    }
16440}
16441
16442#[cfg(feature = "endpoint-service")]
16443impl wkt::message::Message for DeployModelResponse {
16444    fn typename() -> &'static str {
16445        "type.googleapis.com/google.cloud.aiplatform.v1.DeployModelResponse"
16446    }
16447}
16448
16449/// Runtime operation information for
16450/// [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel].
16451///
16452/// [google.cloud.aiplatform.v1.EndpointService.DeployModel]: crate::client::EndpointService::deploy_model
16453#[cfg(feature = "endpoint-service")]
16454#[derive(Clone, Default, PartialEq)]
16455#[non_exhaustive]
16456pub struct DeployModelOperationMetadata {
16457    /// The operation generic information.
16458    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
16459
16460    /// Output only. The deployment stage of the model.
16461    pub deployment_stage: crate::model::DeploymentStage,
16462
16463    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16464}
16465
16466#[cfg(feature = "endpoint-service")]
16467impl DeployModelOperationMetadata {
16468    pub fn new() -> Self {
16469        std::default::Default::default()
16470    }
16471
16472    /// Sets the value of [generic_metadata][crate::model::DeployModelOperationMetadata::generic_metadata].
16473    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
16474    where
16475        T: std::convert::Into<crate::model::GenericOperationMetadata>,
16476    {
16477        self.generic_metadata = std::option::Option::Some(v.into());
16478        self
16479    }
16480
16481    /// Sets or clears the value of [generic_metadata][crate::model::DeployModelOperationMetadata::generic_metadata].
16482    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
16483    where
16484        T: std::convert::Into<crate::model::GenericOperationMetadata>,
16485    {
16486        self.generic_metadata = v.map(|x| x.into());
16487        self
16488    }
16489
16490    /// Sets the value of [deployment_stage][crate::model::DeployModelOperationMetadata::deployment_stage].
16491    pub fn set_deployment_stage<T: std::convert::Into<crate::model::DeploymentStage>>(
16492        mut self,
16493        v: T,
16494    ) -> Self {
16495        self.deployment_stage = v.into();
16496        self
16497    }
16498}
16499
16500#[cfg(feature = "endpoint-service")]
16501impl wkt::message::Message for DeployModelOperationMetadata {
16502    fn typename() -> &'static str {
16503        "type.googleapis.com/google.cloud.aiplatform.v1.DeployModelOperationMetadata"
16504    }
16505}
16506
16507/// Request message for
16508/// [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
16509///
16510/// [google.cloud.aiplatform.v1.EndpointService.UndeployModel]: crate::client::EndpointService::undeploy_model
16511#[cfg(feature = "endpoint-service")]
16512#[derive(Clone, Default, PartialEq)]
16513#[non_exhaustive]
16514pub struct UndeployModelRequest {
16515    /// Required. The name of the Endpoint resource from which to undeploy a Model.
16516    /// Format:
16517    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
16518    pub endpoint: std::string::String,
16519
16520    /// Required. The ID of the DeployedModel to be undeployed from the Endpoint.
16521    pub deployed_model_id: std::string::String,
16522
16523    /// If this field is provided, then the Endpoint's
16524    /// [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
16525    /// overwritten with it. If last DeployedModel is being undeployed from the
16526    /// Endpoint, the [Endpoint.traffic_split] will always end up empty when this
16527    /// call returns. A DeployedModel will be successfully undeployed only if it
16528    /// doesn't have any traffic assigned to it when this method executes, or if
16529    /// this field unassigns any traffic to it.
16530    ///
16531    /// [google.cloud.aiplatform.v1.Endpoint.traffic_split]: crate::model::Endpoint::traffic_split
16532    pub traffic_split: std::collections::HashMap<std::string::String, i32>,
16533
16534    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16535}
16536
16537#[cfg(feature = "endpoint-service")]
16538impl UndeployModelRequest {
16539    pub fn new() -> Self {
16540        std::default::Default::default()
16541    }
16542
16543    /// Sets the value of [endpoint][crate::model::UndeployModelRequest::endpoint].
16544    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16545        self.endpoint = v.into();
16546        self
16547    }
16548
16549    /// Sets the value of [deployed_model_id][crate::model::UndeployModelRequest::deployed_model_id].
16550    pub fn set_deployed_model_id<T: std::convert::Into<std::string::String>>(
16551        mut self,
16552        v: T,
16553    ) -> Self {
16554        self.deployed_model_id = v.into();
16555        self
16556    }
16557
16558    /// Sets the value of [traffic_split][crate::model::UndeployModelRequest::traffic_split].
16559    pub fn set_traffic_split<T, K, V>(mut self, v: T) -> Self
16560    where
16561        T: std::iter::IntoIterator<Item = (K, V)>,
16562        K: std::convert::Into<std::string::String>,
16563        V: std::convert::Into<i32>,
16564    {
16565        use std::iter::Iterator;
16566        self.traffic_split = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
16567        self
16568    }
16569}
16570
16571#[cfg(feature = "endpoint-service")]
16572impl wkt::message::Message for UndeployModelRequest {
16573    fn typename() -> &'static str {
16574        "type.googleapis.com/google.cloud.aiplatform.v1.UndeployModelRequest"
16575    }
16576}
16577
16578/// Response message for
16579/// [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
16580///
16581/// [google.cloud.aiplatform.v1.EndpointService.UndeployModel]: crate::client::EndpointService::undeploy_model
16582#[cfg(feature = "endpoint-service")]
16583#[derive(Clone, Default, PartialEq)]
16584#[non_exhaustive]
16585pub struct UndeployModelResponse {
16586    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16587}
16588
16589#[cfg(feature = "endpoint-service")]
16590impl UndeployModelResponse {
16591    pub fn new() -> Self {
16592        std::default::Default::default()
16593    }
16594}
16595
16596#[cfg(feature = "endpoint-service")]
16597impl wkt::message::Message for UndeployModelResponse {
16598    fn typename() -> &'static str {
16599        "type.googleapis.com/google.cloud.aiplatform.v1.UndeployModelResponse"
16600    }
16601}
16602
16603/// Runtime operation information for
16604/// [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel].
16605///
16606/// [google.cloud.aiplatform.v1.EndpointService.UndeployModel]: crate::client::EndpointService::undeploy_model
16607#[cfg(feature = "endpoint-service")]
16608#[derive(Clone, Default, PartialEq)]
16609#[non_exhaustive]
16610pub struct UndeployModelOperationMetadata {
16611    /// The operation generic information.
16612    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
16613
16614    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16615}
16616
16617#[cfg(feature = "endpoint-service")]
16618impl UndeployModelOperationMetadata {
16619    pub fn new() -> Self {
16620        std::default::Default::default()
16621    }
16622
16623    /// Sets the value of [generic_metadata][crate::model::UndeployModelOperationMetadata::generic_metadata].
16624    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
16625    where
16626        T: std::convert::Into<crate::model::GenericOperationMetadata>,
16627    {
16628        self.generic_metadata = std::option::Option::Some(v.into());
16629        self
16630    }
16631
16632    /// Sets or clears the value of [generic_metadata][crate::model::UndeployModelOperationMetadata::generic_metadata].
16633    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
16634    where
16635        T: std::convert::Into<crate::model::GenericOperationMetadata>,
16636    {
16637        self.generic_metadata = v.map(|x| x.into());
16638        self
16639    }
16640}
16641
16642#[cfg(feature = "endpoint-service")]
16643impl wkt::message::Message for UndeployModelOperationMetadata {
16644    fn typename() -> &'static str {
16645        "type.googleapis.com/google.cloud.aiplatform.v1.UndeployModelOperationMetadata"
16646    }
16647}
16648
16649/// Request message for
16650/// [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel].
16651///
16652/// [google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel]: crate::client::EndpointService::mutate_deployed_model
16653#[cfg(feature = "endpoint-service")]
16654#[derive(Clone, Default, PartialEq)]
16655#[non_exhaustive]
16656pub struct MutateDeployedModelRequest {
16657    /// Required. The name of the Endpoint resource into which to mutate a
16658    /// DeployedModel. Format:
16659    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
16660    pub endpoint: std::string::String,
16661
16662    /// Required. The DeployedModel to be mutated within the Endpoint. Only the
16663    /// following fields can be mutated:
16664    ///
16665    /// * `min_replica_count` in either
16666    ///   [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
16667    ///   [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
16668    /// * `max_replica_count` in either
16669    ///   [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or
16670    ///   [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources]
16671    /// * `required_replica_count` in
16672    ///   [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources]
16673    /// * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]
16674    /// * `disable_container_logging` (v1 only)
16675    /// * `enable_container_logging` (v1beta1 only)
16676    ///
16677    /// [google.cloud.aiplatform.v1.AutomaticResources]: crate::model::AutomaticResources
16678    /// [google.cloud.aiplatform.v1.DedicatedResources]: crate::model::DedicatedResources
16679    /// [google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs]: crate::model::DedicatedResources::autoscaling_metric_specs
16680    pub deployed_model: std::option::Option<crate::model::DeployedModel>,
16681
16682    /// Required. The update mask applies to the resource. See
16683    /// [google.protobuf.FieldMask][google.protobuf.FieldMask].
16684    ///
16685    /// [google.protobuf.FieldMask]: wkt::FieldMask
16686    pub update_mask: std::option::Option<wkt::FieldMask>,
16687
16688    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16689}
16690
16691#[cfg(feature = "endpoint-service")]
16692impl MutateDeployedModelRequest {
16693    pub fn new() -> Self {
16694        std::default::Default::default()
16695    }
16696
16697    /// Sets the value of [endpoint][crate::model::MutateDeployedModelRequest::endpoint].
16698    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16699        self.endpoint = v.into();
16700        self
16701    }
16702
16703    /// Sets the value of [deployed_model][crate::model::MutateDeployedModelRequest::deployed_model].
16704    pub fn set_deployed_model<T>(mut self, v: T) -> Self
16705    where
16706        T: std::convert::Into<crate::model::DeployedModel>,
16707    {
16708        self.deployed_model = std::option::Option::Some(v.into());
16709        self
16710    }
16711
16712    /// Sets or clears the value of [deployed_model][crate::model::MutateDeployedModelRequest::deployed_model].
16713    pub fn set_or_clear_deployed_model<T>(mut self, v: std::option::Option<T>) -> Self
16714    where
16715        T: std::convert::Into<crate::model::DeployedModel>,
16716    {
16717        self.deployed_model = v.map(|x| x.into());
16718        self
16719    }
16720
16721    /// Sets the value of [update_mask][crate::model::MutateDeployedModelRequest::update_mask].
16722    pub fn set_update_mask<T>(mut self, v: T) -> Self
16723    where
16724        T: std::convert::Into<wkt::FieldMask>,
16725    {
16726        self.update_mask = std::option::Option::Some(v.into());
16727        self
16728    }
16729
16730    /// Sets or clears the value of [update_mask][crate::model::MutateDeployedModelRequest::update_mask].
16731    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16732    where
16733        T: std::convert::Into<wkt::FieldMask>,
16734    {
16735        self.update_mask = v.map(|x| x.into());
16736        self
16737    }
16738}
16739
16740#[cfg(feature = "endpoint-service")]
16741impl wkt::message::Message for MutateDeployedModelRequest {
16742    fn typename() -> &'static str {
16743        "type.googleapis.com/google.cloud.aiplatform.v1.MutateDeployedModelRequest"
16744    }
16745}
16746
16747/// Response message for
16748/// [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel].
16749///
16750/// [google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel]: crate::client::EndpointService::mutate_deployed_model
16751#[cfg(feature = "endpoint-service")]
16752#[derive(Clone, Default, PartialEq)]
16753#[non_exhaustive]
16754pub struct MutateDeployedModelResponse {
16755    /// The DeployedModel that's being mutated.
16756    pub deployed_model: std::option::Option<crate::model::DeployedModel>,
16757
16758    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16759}
16760
16761#[cfg(feature = "endpoint-service")]
16762impl MutateDeployedModelResponse {
16763    pub fn new() -> Self {
16764        std::default::Default::default()
16765    }
16766
16767    /// Sets the value of [deployed_model][crate::model::MutateDeployedModelResponse::deployed_model].
16768    pub fn set_deployed_model<T>(mut self, v: T) -> Self
16769    where
16770        T: std::convert::Into<crate::model::DeployedModel>,
16771    {
16772        self.deployed_model = std::option::Option::Some(v.into());
16773        self
16774    }
16775
16776    /// Sets or clears the value of [deployed_model][crate::model::MutateDeployedModelResponse::deployed_model].
16777    pub fn set_or_clear_deployed_model<T>(mut self, v: std::option::Option<T>) -> Self
16778    where
16779        T: std::convert::Into<crate::model::DeployedModel>,
16780    {
16781        self.deployed_model = v.map(|x| x.into());
16782        self
16783    }
16784}
16785
16786#[cfg(feature = "endpoint-service")]
16787impl wkt::message::Message for MutateDeployedModelResponse {
16788    fn typename() -> &'static str {
16789        "type.googleapis.com/google.cloud.aiplatform.v1.MutateDeployedModelResponse"
16790    }
16791}
16792
16793/// Runtime operation information for
16794/// [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel].
16795///
16796/// [google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel]: crate::client::EndpointService::mutate_deployed_model
16797#[cfg(feature = "endpoint-service")]
16798#[derive(Clone, Default, PartialEq)]
16799#[non_exhaustive]
16800pub struct MutateDeployedModelOperationMetadata {
16801    /// The operation generic information.
16802    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
16803
16804    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16805}
16806
16807#[cfg(feature = "endpoint-service")]
16808impl MutateDeployedModelOperationMetadata {
16809    pub fn new() -> Self {
16810        std::default::Default::default()
16811    }
16812
16813    /// Sets the value of [generic_metadata][crate::model::MutateDeployedModelOperationMetadata::generic_metadata].
16814    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
16815    where
16816        T: std::convert::Into<crate::model::GenericOperationMetadata>,
16817    {
16818        self.generic_metadata = std::option::Option::Some(v.into());
16819        self
16820    }
16821
16822    /// Sets or clears the value of [generic_metadata][crate::model::MutateDeployedModelOperationMetadata::generic_metadata].
16823    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
16824    where
16825        T: std::convert::Into<crate::model::GenericOperationMetadata>,
16826    {
16827        self.generic_metadata = v.map(|x| x.into());
16828        self
16829    }
16830}
16831
16832#[cfg(feature = "endpoint-service")]
16833impl wkt::message::Message for MutateDeployedModelOperationMetadata {
16834    fn typename() -> &'static str {
16835        "type.googleapis.com/google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata"
16836    }
16837}
16838
16839/// An entity type is a type of object in a system that needs to be modeled and
16840/// have stored information about. For example, driver is an entity type, and
16841/// driver0 is an instance of an entity type driver.
16842#[cfg(feature = "featurestore-service")]
16843#[derive(Clone, Default, PartialEq)]
16844#[non_exhaustive]
16845pub struct EntityType {
16846    /// Immutable. Name of the EntityType.
16847    /// Format:
16848    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
16849    ///
16850    /// The last part entity_type is assigned by the client. The entity_type can be
16851    /// up to 64 characters long and can consist only of ASCII Latin letters A-Z
16852    /// and a-z and underscore(_), and ASCII digits 0-9 starting with a letter. The
16853    /// value will be unique given a featurestore.
16854    pub name: std::string::String,
16855
16856    /// Optional. Description of the EntityType.
16857    pub description: std::string::String,
16858
16859    /// Output only. Timestamp when this EntityType was created.
16860    pub create_time: std::option::Option<wkt::Timestamp>,
16861
16862    /// Output only. Timestamp when this EntityType was most recently updated.
16863    pub update_time: std::option::Option<wkt::Timestamp>,
16864
16865    /// Optional. The labels with user-defined metadata to organize your
16866    /// EntityTypes.
16867    ///
16868    /// Label keys and values can be no longer than 64 characters
16869    /// (Unicode codepoints), can only contain lowercase letters, numeric
16870    /// characters, underscores and dashes. International characters are allowed.
16871    ///
16872    /// See <https://goo.gl/xmQnxf> for more information on and examples of labels.
16873    /// No more than 64 user labels can be associated with one EntityType (System
16874    /// labels are excluded)."
16875    /// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
16876    /// and are immutable.
16877    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
16878
16879    /// Optional. Used to perform a consistent read-modify-write updates. If not
16880    /// set, a blind "overwrite" update happens.
16881    pub etag: std::string::String,
16882
16883    /// Optional. The default monitoring configuration for all Features with value
16884    /// type
16885    /// ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) BOOL,
16886    /// STRING, DOUBLE or INT64 under this EntityType.
16887    ///
16888    /// If this is populated with
16889    /// [FeaturestoreMonitoringConfig.monitoring_interval] specified, snapshot
16890    /// analysis monitoring is enabled. Otherwise, snapshot analysis monitoring is
16891    /// disabled.
16892    ///
16893    /// [google.cloud.aiplatform.v1.Feature.ValueType]: crate::model::feature::ValueType
16894    pub monitoring_config: std::option::Option<crate::model::FeaturestoreMonitoringConfig>,
16895
16896    /// Optional. Config for data retention policy in offline storage.
16897    /// TTL in days for feature values that will be stored in offline storage.
16898    /// The Feature Store offline storage periodically removes obsolete feature
16899    /// values older than `offline_storage_ttl_days` since the feature generation
16900    /// time. If unset (or explicitly set to 0), default to 4000 days TTL.
16901    pub offline_storage_ttl_days: i32,
16902
16903    /// Output only. Reserved for future use.
16904    pub satisfies_pzs: bool,
16905
16906    /// Output only. Reserved for future use.
16907    pub satisfies_pzi: bool,
16908
16909    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16910}
16911
16912#[cfg(feature = "featurestore-service")]
16913impl EntityType {
16914    pub fn new() -> Self {
16915        std::default::Default::default()
16916    }
16917
16918    /// Sets the value of [name][crate::model::EntityType::name].
16919    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16920        self.name = v.into();
16921        self
16922    }
16923
16924    /// Sets the value of [description][crate::model::EntityType::description].
16925    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16926        self.description = v.into();
16927        self
16928    }
16929
16930    /// Sets the value of [create_time][crate::model::EntityType::create_time].
16931    pub fn set_create_time<T>(mut self, v: T) -> Self
16932    where
16933        T: std::convert::Into<wkt::Timestamp>,
16934    {
16935        self.create_time = std::option::Option::Some(v.into());
16936        self
16937    }
16938
16939    /// Sets or clears the value of [create_time][crate::model::EntityType::create_time].
16940    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
16941    where
16942        T: std::convert::Into<wkt::Timestamp>,
16943    {
16944        self.create_time = v.map(|x| x.into());
16945        self
16946    }
16947
16948    /// Sets the value of [update_time][crate::model::EntityType::update_time].
16949    pub fn set_update_time<T>(mut self, v: T) -> Self
16950    where
16951        T: std::convert::Into<wkt::Timestamp>,
16952    {
16953        self.update_time = std::option::Option::Some(v.into());
16954        self
16955    }
16956
16957    /// Sets or clears the value of [update_time][crate::model::EntityType::update_time].
16958    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
16959    where
16960        T: std::convert::Into<wkt::Timestamp>,
16961    {
16962        self.update_time = v.map(|x| x.into());
16963        self
16964    }
16965
16966    /// Sets the value of [labels][crate::model::EntityType::labels].
16967    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
16968    where
16969        T: std::iter::IntoIterator<Item = (K, V)>,
16970        K: std::convert::Into<std::string::String>,
16971        V: std::convert::Into<std::string::String>,
16972    {
16973        use std::iter::Iterator;
16974        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
16975        self
16976    }
16977
16978    /// Sets the value of [etag][crate::model::EntityType::etag].
16979    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16980        self.etag = v.into();
16981        self
16982    }
16983
16984    /// Sets the value of [monitoring_config][crate::model::EntityType::monitoring_config].
16985    pub fn set_monitoring_config<T>(mut self, v: T) -> Self
16986    where
16987        T: std::convert::Into<crate::model::FeaturestoreMonitoringConfig>,
16988    {
16989        self.monitoring_config = std::option::Option::Some(v.into());
16990        self
16991    }
16992
16993    /// Sets or clears the value of [monitoring_config][crate::model::EntityType::monitoring_config].
16994    pub fn set_or_clear_monitoring_config<T>(mut self, v: std::option::Option<T>) -> Self
16995    where
16996        T: std::convert::Into<crate::model::FeaturestoreMonitoringConfig>,
16997    {
16998        self.monitoring_config = v.map(|x| x.into());
16999        self
17000    }
17001
17002    /// Sets the value of [offline_storage_ttl_days][crate::model::EntityType::offline_storage_ttl_days].
17003    pub fn set_offline_storage_ttl_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17004        self.offline_storage_ttl_days = v.into();
17005        self
17006    }
17007
17008    /// Sets the value of [satisfies_pzs][crate::model::EntityType::satisfies_pzs].
17009    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17010        self.satisfies_pzs = v.into();
17011        self
17012    }
17013
17014    /// Sets the value of [satisfies_pzi][crate::model::EntityType::satisfies_pzi].
17015    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
17016        self.satisfies_pzi = v.into();
17017        self
17018    }
17019}
17020
17021#[cfg(feature = "featurestore-service")]
17022impl wkt::message::Message for EntityType {
17023    fn typename() -> &'static str {
17024        "type.googleapis.com/google.cloud.aiplatform.v1.EntityType"
17025    }
17026}
17027
17028/// Represents an environment variable present in a Container or Python Module.
17029#[cfg(any(
17030    feature = "dataset-service",
17031    feature = "job-service",
17032    feature = "model-garden-service",
17033    feature = "model-service",
17034    feature = "notebook-service",
17035    feature = "pipeline-service",
17036    feature = "reasoning-engine-service",
17037))]
17038#[derive(Clone, Default, PartialEq)]
17039#[non_exhaustive]
17040pub struct EnvVar {
17041    /// Required. Name of the environment variable. Must be a valid C identifier.
17042    pub name: std::string::String,
17043
17044    /// Required. Variables that reference a $(VAR_NAME) are expanded
17045    /// using the previous defined environment variables in the container and
17046    /// any service environment variables. If a variable cannot be resolved,
17047    /// the reference in the input string will be unchanged. The $(VAR_NAME)
17048    /// syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
17049    /// references will never be expanded, regardless of whether the variable
17050    /// exists or not.
17051    pub value: std::string::String,
17052
17053    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17054}
17055
17056#[cfg(any(
17057    feature = "dataset-service",
17058    feature = "job-service",
17059    feature = "model-garden-service",
17060    feature = "model-service",
17061    feature = "notebook-service",
17062    feature = "pipeline-service",
17063    feature = "reasoning-engine-service",
17064))]
17065impl EnvVar {
17066    pub fn new() -> Self {
17067        std::default::Default::default()
17068    }
17069
17070    /// Sets the value of [name][crate::model::EnvVar::name].
17071    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17072        self.name = v.into();
17073        self
17074    }
17075
17076    /// Sets the value of [value][crate::model::EnvVar::value].
17077    pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17078        self.value = v.into();
17079        self
17080    }
17081}
17082
17083#[cfg(any(
17084    feature = "dataset-service",
17085    feature = "job-service",
17086    feature = "model-garden-service",
17087    feature = "model-service",
17088    feature = "notebook-service",
17089    feature = "pipeline-service",
17090    feature = "reasoning-engine-service",
17091))]
17092impl wkt::message::Message for EnvVar {
17093    fn typename() -> &'static str {
17094        "type.googleapis.com/google.cloud.aiplatform.v1.EnvVar"
17095    }
17096}
17097
17098/// Reference to a secret stored in the Cloud Secret Manager that will
17099/// provide the value for this environment variable.
17100#[cfg(feature = "reasoning-engine-service")]
17101#[derive(Clone, Default, PartialEq)]
17102#[non_exhaustive]
17103pub struct SecretRef {
17104    /// Required. The name of the secret in Cloud Secret Manager.
17105    /// Format: {secret_name}.
17106    pub secret: std::string::String,
17107
17108    /// The Cloud Secret Manager secret version.
17109    /// Can be 'latest' for the latest version, an integer for a specific
17110    /// version, or a version alias.
17111    pub version: std::string::String,
17112
17113    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17114}
17115
17116#[cfg(feature = "reasoning-engine-service")]
17117impl SecretRef {
17118    pub fn new() -> Self {
17119        std::default::Default::default()
17120    }
17121
17122    /// Sets the value of [secret][crate::model::SecretRef::secret].
17123    pub fn set_secret<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17124        self.secret = v.into();
17125        self
17126    }
17127
17128    /// Sets the value of [version][crate::model::SecretRef::version].
17129    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17130        self.version = v.into();
17131        self
17132    }
17133}
17134
17135#[cfg(feature = "reasoning-engine-service")]
17136impl wkt::message::Message for SecretRef {
17137    fn typename() -> &'static str {
17138        "type.googleapis.com/google.cloud.aiplatform.v1.SecretRef"
17139    }
17140}
17141
17142/// Represents an environment variable where the value is a secret in Cloud
17143/// Secret Manager.
17144#[cfg(feature = "reasoning-engine-service")]
17145#[derive(Clone, Default, PartialEq)]
17146#[non_exhaustive]
17147pub struct SecretEnvVar {
17148    /// Required. Name of the secret environment variable.
17149    pub name: std::string::String,
17150
17151    /// Required. Reference to a secret stored in the Cloud Secret Manager that
17152    /// will provide the value for this environment variable.
17153    pub secret_ref: std::option::Option<crate::model::SecretRef>,
17154
17155    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17156}
17157
17158#[cfg(feature = "reasoning-engine-service")]
17159impl SecretEnvVar {
17160    pub fn new() -> Self {
17161        std::default::Default::default()
17162    }
17163
17164    /// Sets the value of [name][crate::model::SecretEnvVar::name].
17165    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17166        self.name = v.into();
17167        self
17168    }
17169
17170    /// Sets the value of [secret_ref][crate::model::SecretEnvVar::secret_ref].
17171    pub fn set_secret_ref<T>(mut self, v: T) -> Self
17172    where
17173        T: std::convert::Into<crate::model::SecretRef>,
17174    {
17175        self.secret_ref = std::option::Option::Some(v.into());
17176        self
17177    }
17178
17179    /// Sets or clears the value of [secret_ref][crate::model::SecretEnvVar::secret_ref].
17180    pub fn set_or_clear_secret_ref<T>(mut self, v: std::option::Option<T>) -> Self
17181    where
17182        T: std::convert::Into<crate::model::SecretRef>,
17183    {
17184        self.secret_ref = v.map(|x| x.into());
17185        self
17186    }
17187}
17188
17189#[cfg(feature = "reasoning-engine-service")]
17190impl wkt::message::Message for SecretEnvVar {
17191    fn typename() -> &'static str {
17192        "type.googleapis.com/google.cloud.aiplatform.v1.SecretEnvVar"
17193    }
17194}
17195
17196/// True positive, false positive, or false negative.
17197///
17198/// EvaluatedAnnotation is only available under ModelEvaluationSlice with slice
17199/// of `annotationSpec` dimension.
17200#[cfg(feature = "model-service")]
17201#[derive(Clone, Default, PartialEq)]
17202#[non_exhaustive]
17203pub struct EvaluatedAnnotation {
17204    /// Output only. Type of the EvaluatedAnnotation.
17205    pub r#type: crate::model::evaluated_annotation::EvaluatedAnnotationType,
17206
17207    /// Output only. The model predicted annotations.
17208    ///
17209    /// For true positive, there is one and only one prediction, which matches the
17210    /// only one ground truth annotation in
17211    /// [ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths].
17212    ///
17213    /// For false positive, there is one and only one prediction, which doesn't
17214    /// match any ground truth annotation of the corresponding
17215    /// [data_item_view_id][google.cloud.aiplatform.v1.EvaluatedAnnotation.evaluated_data_item_view_id].
17216    ///
17217    /// For false negative, there are zero or more predictions which are similar to
17218    /// the only ground truth annotation in
17219    /// [ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths]
17220    /// but not enough for a match.
17221    ///
17222    /// The schema of the prediction is stored in
17223    /// [ModelEvaluation.annotation_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.annotation_schema_uri]
17224    ///
17225    /// [google.cloud.aiplatform.v1.EvaluatedAnnotation.evaluated_data_item_view_id]: crate::model::EvaluatedAnnotation::evaluated_data_item_view_id
17226    /// [google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths]: crate::model::EvaluatedAnnotation::ground_truths
17227    /// [google.cloud.aiplatform.v1.ModelEvaluation.annotation_schema_uri]: crate::model::ModelEvaluation::annotation_schema_uri
17228    pub predictions: std::vec::Vec<wkt::Value>,
17229
17230    /// Output only. The ground truth Annotations, i.e. the Annotations that exist
17231    /// in the test data the Model is evaluated on.
17232    ///
17233    /// For true positive, there is one and only one ground truth annotation, which
17234    /// matches the only prediction in
17235    /// [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions].
17236    ///
17237    /// For false positive, there are zero or more ground truth annotations that
17238    /// are similar to the only prediction in
17239    /// [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions],
17240    /// but not enough for a match.
17241    ///
17242    /// For false negative, there is one and only one ground truth annotation,
17243    /// which doesn't match any predictions created by the model.
17244    ///
17245    /// The schema of the ground truth is stored in
17246    /// [ModelEvaluation.annotation_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.annotation_schema_uri]
17247    ///
17248    /// [google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions]: crate::model::EvaluatedAnnotation::predictions
17249    /// [google.cloud.aiplatform.v1.ModelEvaluation.annotation_schema_uri]: crate::model::ModelEvaluation::annotation_schema_uri
17250    pub ground_truths: std::vec::Vec<wkt::Value>,
17251
17252    /// Output only. The data item payload that the Model predicted this
17253    /// EvaluatedAnnotation on.
17254    pub data_item_payload: std::option::Option<wkt::Value>,
17255
17256    /// Output only. ID of the EvaluatedDataItemView under the same ancestor
17257    /// ModelEvaluation. The EvaluatedDataItemView consists of all ground truths
17258    /// and predictions on
17259    /// [data_item_payload][google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload].
17260    ///
17261    /// [google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload]: crate::model::EvaluatedAnnotation::data_item_payload
17262    pub evaluated_data_item_view_id: std::string::String,
17263
17264    /// Explanations of
17265    /// [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions].
17266    /// Each element of the explanations indicates the explanation for one
17267    /// explanation Method.
17268    ///
17269    /// The attributions list in the
17270    /// [EvaluatedAnnotationExplanation.explanation][google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.explanation]
17271    /// object corresponds to the
17272    /// [predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions]
17273    /// list. For example, the second element in the attributions list explains the
17274    /// second element in the predictions list.
17275    ///
17276    /// [google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions]: crate::model::EvaluatedAnnotation::predictions
17277    /// [google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation.explanation]: crate::model::EvaluatedAnnotationExplanation::explanation
17278    pub explanations: std::vec::Vec<crate::model::EvaluatedAnnotationExplanation>,
17279
17280    /// Annotations of model error analysis results.
17281    pub error_analysis_annotations: std::vec::Vec<crate::model::ErrorAnalysisAnnotation>,
17282
17283    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17284}
17285
17286#[cfg(feature = "model-service")]
17287impl EvaluatedAnnotation {
17288    pub fn new() -> Self {
17289        std::default::Default::default()
17290    }
17291
17292    /// Sets the value of [r#type][crate::model::EvaluatedAnnotation::type].
17293    pub fn set_type<
17294        T: std::convert::Into<crate::model::evaluated_annotation::EvaluatedAnnotationType>,
17295    >(
17296        mut self,
17297        v: T,
17298    ) -> Self {
17299        self.r#type = v.into();
17300        self
17301    }
17302
17303    /// Sets the value of [predictions][crate::model::EvaluatedAnnotation::predictions].
17304    pub fn set_predictions<T, V>(mut self, v: T) -> Self
17305    where
17306        T: std::iter::IntoIterator<Item = V>,
17307        V: std::convert::Into<wkt::Value>,
17308    {
17309        use std::iter::Iterator;
17310        self.predictions = v.into_iter().map(|i| i.into()).collect();
17311        self
17312    }
17313
17314    /// Sets the value of [ground_truths][crate::model::EvaluatedAnnotation::ground_truths].
17315    pub fn set_ground_truths<T, V>(mut self, v: T) -> Self
17316    where
17317        T: std::iter::IntoIterator<Item = V>,
17318        V: std::convert::Into<wkt::Value>,
17319    {
17320        use std::iter::Iterator;
17321        self.ground_truths = v.into_iter().map(|i| i.into()).collect();
17322        self
17323    }
17324
17325    /// Sets the value of [data_item_payload][crate::model::EvaluatedAnnotation::data_item_payload].
17326    pub fn set_data_item_payload<T>(mut self, v: T) -> Self
17327    where
17328        T: std::convert::Into<wkt::Value>,
17329    {
17330        self.data_item_payload = std::option::Option::Some(v.into());
17331        self
17332    }
17333
17334    /// Sets or clears the value of [data_item_payload][crate::model::EvaluatedAnnotation::data_item_payload].
17335    pub fn set_or_clear_data_item_payload<T>(mut self, v: std::option::Option<T>) -> Self
17336    where
17337        T: std::convert::Into<wkt::Value>,
17338    {
17339        self.data_item_payload = v.map(|x| x.into());
17340        self
17341    }
17342
17343    /// Sets the value of [evaluated_data_item_view_id][crate::model::EvaluatedAnnotation::evaluated_data_item_view_id].
17344    pub fn set_evaluated_data_item_view_id<T: std::convert::Into<std::string::String>>(
17345        mut self,
17346        v: T,
17347    ) -> Self {
17348        self.evaluated_data_item_view_id = v.into();
17349        self
17350    }
17351
17352    /// Sets the value of [explanations][crate::model::EvaluatedAnnotation::explanations].
17353    pub fn set_explanations<T, V>(mut self, v: T) -> Self
17354    where
17355        T: std::iter::IntoIterator<Item = V>,
17356        V: std::convert::Into<crate::model::EvaluatedAnnotationExplanation>,
17357    {
17358        use std::iter::Iterator;
17359        self.explanations = v.into_iter().map(|i| i.into()).collect();
17360        self
17361    }
17362
17363    /// Sets the value of [error_analysis_annotations][crate::model::EvaluatedAnnotation::error_analysis_annotations].
17364    pub fn set_error_analysis_annotations<T, V>(mut self, v: T) -> Self
17365    where
17366        T: std::iter::IntoIterator<Item = V>,
17367        V: std::convert::Into<crate::model::ErrorAnalysisAnnotation>,
17368    {
17369        use std::iter::Iterator;
17370        self.error_analysis_annotations = v.into_iter().map(|i| i.into()).collect();
17371        self
17372    }
17373}
17374
17375#[cfg(feature = "model-service")]
17376impl wkt::message::Message for EvaluatedAnnotation {
17377    fn typename() -> &'static str {
17378        "type.googleapis.com/google.cloud.aiplatform.v1.EvaluatedAnnotation"
17379    }
17380}
17381
17382/// Defines additional types related to [EvaluatedAnnotation].
17383#[cfg(feature = "model-service")]
17384pub mod evaluated_annotation {
17385    #[allow(unused_imports)]
17386    use super::*;
17387
17388    /// Describes the type of the EvaluatedAnnotation. The type is determined
17389    ///
17390    /// # Working with unknown values
17391    ///
17392    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17393    /// additional enum variants at any time. Adding new variants is not considered
17394    /// a breaking change. Applications should write their code in anticipation of:
17395    ///
17396    /// - New values appearing in future releases of the client library, **and**
17397    /// - New values received dynamically, without application changes.
17398    ///
17399    /// Please consult the [Working with enums] section in the user guide for some
17400    /// guidelines.
17401    ///
17402    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
17403    #[cfg(feature = "model-service")]
17404    #[derive(Clone, Debug, PartialEq)]
17405    #[non_exhaustive]
17406    pub enum EvaluatedAnnotationType {
17407        /// Invalid value.
17408        Unspecified,
17409        /// The EvaluatedAnnotation is a true positive. It has a prediction created
17410        /// by the Model and a ground truth Annotation which the prediction matches.
17411        TruePositive,
17412        /// The EvaluatedAnnotation is false positive. It has a prediction created by
17413        /// the Model which does not match any ground truth annotation.
17414        FalsePositive,
17415        /// The EvaluatedAnnotation is false negative. It has a ground truth
17416        /// annotation which is not matched by any of the model created predictions.
17417        FalseNegative,
17418        /// If set, the enum was initialized with an unknown value.
17419        ///
17420        /// Applications can examine the value using [EvaluatedAnnotationType::value] or
17421        /// [EvaluatedAnnotationType::name].
17422        UnknownValue(evaluated_annotation_type::UnknownValue),
17423    }
17424
17425    #[doc(hidden)]
17426    #[cfg(feature = "model-service")]
17427    pub mod evaluated_annotation_type {
17428        #[allow(unused_imports)]
17429        use super::*;
17430        #[derive(Clone, Debug, PartialEq)]
17431        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17432    }
17433
17434    #[cfg(feature = "model-service")]
17435    impl EvaluatedAnnotationType {
17436        /// Gets the enum value.
17437        ///
17438        /// Returns `None` if the enum contains an unknown value deserialized from
17439        /// the string representation of enums.
17440        pub fn value(&self) -> std::option::Option<i32> {
17441            match self {
17442                Self::Unspecified => std::option::Option::Some(0),
17443                Self::TruePositive => std::option::Option::Some(1),
17444                Self::FalsePositive => std::option::Option::Some(2),
17445                Self::FalseNegative => std::option::Option::Some(3),
17446                Self::UnknownValue(u) => u.0.value(),
17447            }
17448        }
17449
17450        /// Gets the enum value as a string.
17451        ///
17452        /// Returns `None` if the enum contains an unknown value deserialized from
17453        /// the integer representation of enums.
17454        pub fn name(&self) -> std::option::Option<&str> {
17455            match self {
17456                Self::Unspecified => {
17457                    std::option::Option::Some("EVALUATED_ANNOTATION_TYPE_UNSPECIFIED")
17458                }
17459                Self::TruePositive => std::option::Option::Some("TRUE_POSITIVE"),
17460                Self::FalsePositive => std::option::Option::Some("FALSE_POSITIVE"),
17461                Self::FalseNegative => std::option::Option::Some("FALSE_NEGATIVE"),
17462                Self::UnknownValue(u) => u.0.name(),
17463            }
17464        }
17465    }
17466
17467    #[cfg(feature = "model-service")]
17468    impl std::default::Default for EvaluatedAnnotationType {
17469        fn default() -> Self {
17470            use std::convert::From;
17471            Self::from(0)
17472        }
17473    }
17474
17475    #[cfg(feature = "model-service")]
17476    impl std::fmt::Display for EvaluatedAnnotationType {
17477        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17478            wkt::internal::display_enum(f, self.name(), self.value())
17479        }
17480    }
17481
17482    #[cfg(feature = "model-service")]
17483    impl std::convert::From<i32> for EvaluatedAnnotationType {
17484        fn from(value: i32) -> Self {
17485            match value {
17486                0 => Self::Unspecified,
17487                1 => Self::TruePositive,
17488                2 => Self::FalsePositive,
17489                3 => Self::FalseNegative,
17490                _ => Self::UnknownValue(evaluated_annotation_type::UnknownValue(
17491                    wkt::internal::UnknownEnumValue::Integer(value),
17492                )),
17493            }
17494        }
17495    }
17496
17497    #[cfg(feature = "model-service")]
17498    impl std::convert::From<&str> for EvaluatedAnnotationType {
17499        fn from(value: &str) -> Self {
17500            use std::string::ToString;
17501            match value {
17502                "EVALUATED_ANNOTATION_TYPE_UNSPECIFIED" => Self::Unspecified,
17503                "TRUE_POSITIVE" => Self::TruePositive,
17504                "FALSE_POSITIVE" => Self::FalsePositive,
17505                "FALSE_NEGATIVE" => Self::FalseNegative,
17506                _ => Self::UnknownValue(evaluated_annotation_type::UnknownValue(
17507                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17508                )),
17509            }
17510        }
17511    }
17512
17513    #[cfg(feature = "model-service")]
17514    impl serde::ser::Serialize for EvaluatedAnnotationType {
17515        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17516        where
17517            S: serde::Serializer,
17518        {
17519            match self {
17520                Self::Unspecified => serializer.serialize_i32(0),
17521                Self::TruePositive => serializer.serialize_i32(1),
17522                Self::FalsePositive => serializer.serialize_i32(2),
17523                Self::FalseNegative => serializer.serialize_i32(3),
17524                Self::UnknownValue(u) => u.0.serialize(serializer),
17525            }
17526        }
17527    }
17528
17529    #[cfg(feature = "model-service")]
17530    impl<'de> serde::de::Deserialize<'de> for EvaluatedAnnotationType {
17531        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17532        where
17533            D: serde::Deserializer<'de>,
17534        {
17535            deserializer.deserialize_any(
17536                wkt::internal::EnumVisitor::<EvaluatedAnnotationType>::new(
17537                    ".google.cloud.aiplatform.v1.EvaluatedAnnotation.EvaluatedAnnotationType",
17538                ),
17539            )
17540        }
17541    }
17542}
17543
17544/// Explanation result of the prediction produced by the Model.
17545#[cfg(feature = "model-service")]
17546#[derive(Clone, Default, PartialEq)]
17547#[non_exhaustive]
17548pub struct EvaluatedAnnotationExplanation {
17549    /// Explanation type.
17550    ///
17551    /// For AutoML Image Classification models, possible values are:
17552    ///
17553    /// * `image-integrated-gradients`
17554    /// * `image-xrai`
17555    pub explanation_type: std::string::String,
17556
17557    /// Explanation attribution response details.
17558    pub explanation: std::option::Option<crate::model::Explanation>,
17559
17560    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17561}
17562
17563#[cfg(feature = "model-service")]
17564impl EvaluatedAnnotationExplanation {
17565    pub fn new() -> Self {
17566        std::default::Default::default()
17567    }
17568
17569    /// Sets the value of [explanation_type][crate::model::EvaluatedAnnotationExplanation::explanation_type].
17570    pub fn set_explanation_type<T: std::convert::Into<std::string::String>>(
17571        mut self,
17572        v: T,
17573    ) -> Self {
17574        self.explanation_type = v.into();
17575        self
17576    }
17577
17578    /// Sets the value of [explanation][crate::model::EvaluatedAnnotationExplanation::explanation].
17579    pub fn set_explanation<T>(mut self, v: T) -> Self
17580    where
17581        T: std::convert::Into<crate::model::Explanation>,
17582    {
17583        self.explanation = std::option::Option::Some(v.into());
17584        self
17585    }
17586
17587    /// Sets or clears the value of [explanation][crate::model::EvaluatedAnnotationExplanation::explanation].
17588    pub fn set_or_clear_explanation<T>(mut self, v: std::option::Option<T>) -> Self
17589    where
17590        T: std::convert::Into<crate::model::Explanation>,
17591    {
17592        self.explanation = v.map(|x| x.into());
17593        self
17594    }
17595}
17596
17597#[cfg(feature = "model-service")]
17598impl wkt::message::Message for EvaluatedAnnotationExplanation {
17599    fn typename() -> &'static str {
17600        "type.googleapis.com/google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation"
17601    }
17602}
17603
17604/// Model error analysis for each annotation.
17605#[cfg(feature = "model-service")]
17606#[derive(Clone, Default, PartialEq)]
17607#[non_exhaustive]
17608pub struct ErrorAnalysisAnnotation {
17609    /// Attributed items for a given annotation, typically representing neighbors
17610    /// from the training sets constrained by the query type.
17611    pub attributed_items: std::vec::Vec<crate::model::error_analysis_annotation::AttributedItem>,
17612
17613    /// The query type used for finding the attributed items.
17614    pub query_type: crate::model::error_analysis_annotation::QueryType,
17615
17616    /// The outlier score of this annotated item. Usually defined as the min of all
17617    /// distances from attributed items.
17618    pub outlier_score: f64,
17619
17620    /// The threshold used to determine if this annotation is an outlier or not.
17621    pub outlier_threshold: f64,
17622
17623    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17624}
17625
17626#[cfg(feature = "model-service")]
17627impl ErrorAnalysisAnnotation {
17628    pub fn new() -> Self {
17629        std::default::Default::default()
17630    }
17631
17632    /// Sets the value of [attributed_items][crate::model::ErrorAnalysisAnnotation::attributed_items].
17633    pub fn set_attributed_items<T, V>(mut self, v: T) -> Self
17634    where
17635        T: std::iter::IntoIterator<Item = V>,
17636        V: std::convert::Into<crate::model::error_analysis_annotation::AttributedItem>,
17637    {
17638        use std::iter::Iterator;
17639        self.attributed_items = v.into_iter().map(|i| i.into()).collect();
17640        self
17641    }
17642
17643    /// Sets the value of [query_type][crate::model::ErrorAnalysisAnnotation::query_type].
17644    pub fn set_query_type<
17645        T: std::convert::Into<crate::model::error_analysis_annotation::QueryType>,
17646    >(
17647        mut self,
17648        v: T,
17649    ) -> Self {
17650        self.query_type = v.into();
17651        self
17652    }
17653
17654    /// Sets the value of [outlier_score][crate::model::ErrorAnalysisAnnotation::outlier_score].
17655    pub fn set_outlier_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
17656        self.outlier_score = v.into();
17657        self
17658    }
17659
17660    /// Sets the value of [outlier_threshold][crate::model::ErrorAnalysisAnnotation::outlier_threshold].
17661    pub fn set_outlier_threshold<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
17662        self.outlier_threshold = v.into();
17663        self
17664    }
17665}
17666
17667#[cfg(feature = "model-service")]
17668impl wkt::message::Message for ErrorAnalysisAnnotation {
17669    fn typename() -> &'static str {
17670        "type.googleapis.com/google.cloud.aiplatform.v1.ErrorAnalysisAnnotation"
17671    }
17672}
17673
17674/// Defines additional types related to [ErrorAnalysisAnnotation].
17675#[cfg(feature = "model-service")]
17676pub mod error_analysis_annotation {
17677    #[allow(unused_imports)]
17678    use super::*;
17679
17680    /// Attributed items for a given annotation, typically representing neighbors
17681    /// from the training sets constrained by the query type.
17682    #[cfg(feature = "model-service")]
17683    #[derive(Clone, Default, PartialEq)]
17684    #[non_exhaustive]
17685    pub struct AttributedItem {
17686        /// The unique ID for each annotation. Used by FE to allocate the annotation
17687        /// in DB.
17688        pub annotation_resource_name: std::string::String,
17689
17690        /// The distance of this item to the annotation.
17691        pub distance: f64,
17692
17693        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17694    }
17695
17696    #[cfg(feature = "model-service")]
17697    impl AttributedItem {
17698        pub fn new() -> Self {
17699            std::default::Default::default()
17700        }
17701
17702        /// Sets the value of [annotation_resource_name][crate::model::error_analysis_annotation::AttributedItem::annotation_resource_name].
17703        pub fn set_annotation_resource_name<T: std::convert::Into<std::string::String>>(
17704            mut self,
17705            v: T,
17706        ) -> Self {
17707            self.annotation_resource_name = v.into();
17708            self
17709        }
17710
17711        /// Sets the value of [distance][crate::model::error_analysis_annotation::AttributedItem::distance].
17712        pub fn set_distance<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
17713            self.distance = v.into();
17714            self
17715        }
17716    }
17717
17718    #[cfg(feature = "model-service")]
17719    impl wkt::message::Message for AttributedItem {
17720        fn typename() -> &'static str {
17721            "type.googleapis.com/google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.AttributedItem"
17722        }
17723    }
17724
17725    /// The query type used for finding the attributed items.
17726    ///
17727    /// # Working with unknown values
17728    ///
17729    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17730    /// additional enum variants at any time. Adding new variants is not considered
17731    /// a breaking change. Applications should write their code in anticipation of:
17732    ///
17733    /// - New values appearing in future releases of the client library, **and**
17734    /// - New values received dynamically, without application changes.
17735    ///
17736    /// Please consult the [Working with enums] section in the user guide for some
17737    /// guidelines.
17738    ///
17739    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
17740    #[cfg(feature = "model-service")]
17741    #[derive(Clone, Debug, PartialEq)]
17742    #[non_exhaustive]
17743    pub enum QueryType {
17744        /// Unspecified query type for model error analysis.
17745        Unspecified,
17746        /// Query similar samples across all classes in the dataset.
17747        AllSimilar,
17748        /// Query similar samples from the same class of the input sample.
17749        SameClassSimilar,
17750        /// Query dissimilar samples from the same class of the input sample.
17751        SameClassDissimilar,
17752        /// If set, the enum was initialized with an unknown value.
17753        ///
17754        /// Applications can examine the value using [QueryType::value] or
17755        /// [QueryType::name].
17756        UnknownValue(query_type::UnknownValue),
17757    }
17758
17759    #[doc(hidden)]
17760    #[cfg(feature = "model-service")]
17761    pub mod query_type {
17762        #[allow(unused_imports)]
17763        use super::*;
17764        #[derive(Clone, Debug, PartialEq)]
17765        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17766    }
17767
17768    #[cfg(feature = "model-service")]
17769    impl QueryType {
17770        /// Gets the enum value.
17771        ///
17772        /// Returns `None` if the enum contains an unknown value deserialized from
17773        /// the string representation of enums.
17774        pub fn value(&self) -> std::option::Option<i32> {
17775            match self {
17776                Self::Unspecified => std::option::Option::Some(0),
17777                Self::AllSimilar => std::option::Option::Some(1),
17778                Self::SameClassSimilar => std::option::Option::Some(2),
17779                Self::SameClassDissimilar => std::option::Option::Some(3),
17780                Self::UnknownValue(u) => u.0.value(),
17781            }
17782        }
17783
17784        /// Gets the enum value as a string.
17785        ///
17786        /// Returns `None` if the enum contains an unknown value deserialized from
17787        /// the integer representation of enums.
17788        pub fn name(&self) -> std::option::Option<&str> {
17789            match self {
17790                Self::Unspecified => std::option::Option::Some("QUERY_TYPE_UNSPECIFIED"),
17791                Self::AllSimilar => std::option::Option::Some("ALL_SIMILAR"),
17792                Self::SameClassSimilar => std::option::Option::Some("SAME_CLASS_SIMILAR"),
17793                Self::SameClassDissimilar => std::option::Option::Some("SAME_CLASS_DISSIMILAR"),
17794                Self::UnknownValue(u) => u.0.name(),
17795            }
17796        }
17797    }
17798
17799    #[cfg(feature = "model-service")]
17800    impl std::default::Default for QueryType {
17801        fn default() -> Self {
17802            use std::convert::From;
17803            Self::from(0)
17804        }
17805    }
17806
17807    #[cfg(feature = "model-service")]
17808    impl std::fmt::Display for QueryType {
17809        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17810            wkt::internal::display_enum(f, self.name(), self.value())
17811        }
17812    }
17813
17814    #[cfg(feature = "model-service")]
17815    impl std::convert::From<i32> for QueryType {
17816        fn from(value: i32) -> Self {
17817            match value {
17818                0 => Self::Unspecified,
17819                1 => Self::AllSimilar,
17820                2 => Self::SameClassSimilar,
17821                3 => Self::SameClassDissimilar,
17822                _ => Self::UnknownValue(query_type::UnknownValue(
17823                    wkt::internal::UnknownEnumValue::Integer(value),
17824                )),
17825            }
17826        }
17827    }
17828
17829    #[cfg(feature = "model-service")]
17830    impl std::convert::From<&str> for QueryType {
17831        fn from(value: &str) -> Self {
17832            use std::string::ToString;
17833            match value {
17834                "QUERY_TYPE_UNSPECIFIED" => Self::Unspecified,
17835                "ALL_SIMILAR" => Self::AllSimilar,
17836                "SAME_CLASS_SIMILAR" => Self::SameClassSimilar,
17837                "SAME_CLASS_DISSIMILAR" => Self::SameClassDissimilar,
17838                _ => Self::UnknownValue(query_type::UnknownValue(
17839                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17840                )),
17841            }
17842        }
17843    }
17844
17845    #[cfg(feature = "model-service")]
17846    impl serde::ser::Serialize for QueryType {
17847        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17848        where
17849            S: serde::Serializer,
17850        {
17851            match self {
17852                Self::Unspecified => serializer.serialize_i32(0),
17853                Self::AllSimilar => serializer.serialize_i32(1),
17854                Self::SameClassSimilar => serializer.serialize_i32(2),
17855                Self::SameClassDissimilar => serializer.serialize_i32(3),
17856                Self::UnknownValue(u) => u.0.serialize(serializer),
17857            }
17858        }
17859    }
17860
17861    #[cfg(feature = "model-service")]
17862    impl<'de> serde::de::Deserialize<'de> for QueryType {
17863        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17864        where
17865            D: serde::Deserializer<'de>,
17866        {
17867            deserializer.deserialize_any(wkt::internal::EnumVisitor::<QueryType>::new(
17868                ".google.cloud.aiplatform.v1.ErrorAnalysisAnnotation.QueryType",
17869            ))
17870        }
17871    }
17872}
17873
17874/// Request message for EvaluationService.EvaluateInstances.
17875#[cfg(feature = "evaluation-service")]
17876#[derive(Clone, Default, PartialEq)]
17877#[non_exhaustive]
17878pub struct EvaluateInstancesRequest {
17879    /// Required. The resource name of the Location to evaluate the instances.
17880    /// Format: `projects/{project}/locations/{location}`
17881    pub location: std::string::String,
17882
17883    /// Instances and specs for evaluation
17884    pub metric_inputs: std::option::Option<crate::model::evaluate_instances_request::MetricInputs>,
17885
17886    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17887}
17888
17889#[cfg(feature = "evaluation-service")]
17890impl EvaluateInstancesRequest {
17891    pub fn new() -> Self {
17892        std::default::Default::default()
17893    }
17894
17895    /// Sets the value of [location][crate::model::EvaluateInstancesRequest::location].
17896    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17897        self.location = v.into();
17898        self
17899    }
17900
17901    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs].
17902    ///
17903    /// Note that all the setters affecting `metric_inputs` are mutually
17904    /// exclusive.
17905    pub fn set_metric_inputs<
17906        T: std::convert::Into<
17907                std::option::Option<crate::model::evaluate_instances_request::MetricInputs>,
17908            >,
17909    >(
17910        mut self,
17911        v: T,
17912    ) -> Self {
17913        self.metric_inputs = v.into();
17914        self
17915    }
17916
17917    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
17918    /// if it holds a `ExactMatchInput`, `None` if the field is not set or
17919    /// holds a different branch.
17920    pub fn exact_match_input(
17921        &self,
17922    ) -> std::option::Option<&std::boxed::Box<crate::model::ExactMatchInput>> {
17923        #[allow(unreachable_patterns)]
17924        self.metric_inputs.as_ref().and_then(|v| match v {
17925            crate::model::evaluate_instances_request::MetricInputs::ExactMatchInput(v) => {
17926                std::option::Option::Some(v)
17927            }
17928            _ => std::option::Option::None,
17929        })
17930    }
17931
17932    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
17933    /// to hold a `ExactMatchInput`.
17934    ///
17935    /// Note that all the setters affecting `metric_inputs` are
17936    /// mutually exclusive.
17937    pub fn set_exact_match_input<
17938        T: std::convert::Into<std::boxed::Box<crate::model::ExactMatchInput>>,
17939    >(
17940        mut self,
17941        v: T,
17942    ) -> Self {
17943        self.metric_inputs = std::option::Option::Some(
17944            crate::model::evaluate_instances_request::MetricInputs::ExactMatchInput(v.into()),
17945        );
17946        self
17947    }
17948
17949    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
17950    /// if it holds a `BleuInput`, `None` if the field is not set or
17951    /// holds a different branch.
17952    pub fn bleu_input(&self) -> std::option::Option<&std::boxed::Box<crate::model::BleuInput>> {
17953        #[allow(unreachable_patterns)]
17954        self.metric_inputs.as_ref().and_then(|v| match v {
17955            crate::model::evaluate_instances_request::MetricInputs::BleuInput(v) => {
17956                std::option::Option::Some(v)
17957            }
17958            _ => std::option::Option::None,
17959        })
17960    }
17961
17962    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
17963    /// to hold a `BleuInput`.
17964    ///
17965    /// Note that all the setters affecting `metric_inputs` are
17966    /// mutually exclusive.
17967    pub fn set_bleu_input<T: std::convert::Into<std::boxed::Box<crate::model::BleuInput>>>(
17968        mut self,
17969        v: T,
17970    ) -> Self {
17971        self.metric_inputs = std::option::Option::Some(
17972            crate::model::evaluate_instances_request::MetricInputs::BleuInput(v.into()),
17973        );
17974        self
17975    }
17976
17977    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
17978    /// if it holds a `RougeInput`, `None` if the field is not set or
17979    /// holds a different branch.
17980    pub fn rouge_input(&self) -> std::option::Option<&std::boxed::Box<crate::model::RougeInput>> {
17981        #[allow(unreachable_patterns)]
17982        self.metric_inputs.as_ref().and_then(|v| match v {
17983            crate::model::evaluate_instances_request::MetricInputs::RougeInput(v) => {
17984                std::option::Option::Some(v)
17985            }
17986            _ => std::option::Option::None,
17987        })
17988    }
17989
17990    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
17991    /// to hold a `RougeInput`.
17992    ///
17993    /// Note that all the setters affecting `metric_inputs` are
17994    /// mutually exclusive.
17995    pub fn set_rouge_input<T: std::convert::Into<std::boxed::Box<crate::model::RougeInput>>>(
17996        mut self,
17997        v: T,
17998    ) -> Self {
17999        self.metric_inputs = std::option::Option::Some(
18000            crate::model::evaluate_instances_request::MetricInputs::RougeInput(v.into()),
18001        );
18002        self
18003    }
18004
18005    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18006    /// if it holds a `FluencyInput`, `None` if the field is not set or
18007    /// holds a different branch.
18008    pub fn fluency_input(
18009        &self,
18010    ) -> std::option::Option<&std::boxed::Box<crate::model::FluencyInput>> {
18011        #[allow(unreachable_patterns)]
18012        self.metric_inputs.as_ref().and_then(|v| match v {
18013            crate::model::evaluate_instances_request::MetricInputs::FluencyInput(v) => {
18014                std::option::Option::Some(v)
18015            }
18016            _ => std::option::Option::None,
18017        })
18018    }
18019
18020    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18021    /// to hold a `FluencyInput`.
18022    ///
18023    /// Note that all the setters affecting `metric_inputs` are
18024    /// mutually exclusive.
18025    pub fn set_fluency_input<T: std::convert::Into<std::boxed::Box<crate::model::FluencyInput>>>(
18026        mut self,
18027        v: T,
18028    ) -> Self {
18029        self.metric_inputs = std::option::Option::Some(
18030            crate::model::evaluate_instances_request::MetricInputs::FluencyInput(v.into()),
18031        );
18032        self
18033    }
18034
18035    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18036    /// if it holds a `CoherenceInput`, `None` if the field is not set or
18037    /// holds a different branch.
18038    pub fn coherence_input(
18039        &self,
18040    ) -> std::option::Option<&std::boxed::Box<crate::model::CoherenceInput>> {
18041        #[allow(unreachable_patterns)]
18042        self.metric_inputs.as_ref().and_then(|v| match v {
18043            crate::model::evaluate_instances_request::MetricInputs::CoherenceInput(v) => {
18044                std::option::Option::Some(v)
18045            }
18046            _ => std::option::Option::None,
18047        })
18048    }
18049
18050    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18051    /// to hold a `CoherenceInput`.
18052    ///
18053    /// Note that all the setters affecting `metric_inputs` are
18054    /// mutually exclusive.
18055    pub fn set_coherence_input<
18056        T: std::convert::Into<std::boxed::Box<crate::model::CoherenceInput>>,
18057    >(
18058        mut self,
18059        v: T,
18060    ) -> Self {
18061        self.metric_inputs = std::option::Option::Some(
18062            crate::model::evaluate_instances_request::MetricInputs::CoherenceInput(v.into()),
18063        );
18064        self
18065    }
18066
18067    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18068    /// if it holds a `SafetyInput`, `None` if the field is not set or
18069    /// holds a different branch.
18070    pub fn safety_input(&self) -> std::option::Option<&std::boxed::Box<crate::model::SafetyInput>> {
18071        #[allow(unreachable_patterns)]
18072        self.metric_inputs.as_ref().and_then(|v| match v {
18073            crate::model::evaluate_instances_request::MetricInputs::SafetyInput(v) => {
18074                std::option::Option::Some(v)
18075            }
18076            _ => std::option::Option::None,
18077        })
18078    }
18079
18080    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18081    /// to hold a `SafetyInput`.
18082    ///
18083    /// Note that all the setters affecting `metric_inputs` are
18084    /// mutually exclusive.
18085    pub fn set_safety_input<T: std::convert::Into<std::boxed::Box<crate::model::SafetyInput>>>(
18086        mut self,
18087        v: T,
18088    ) -> Self {
18089        self.metric_inputs = std::option::Option::Some(
18090            crate::model::evaluate_instances_request::MetricInputs::SafetyInput(v.into()),
18091        );
18092        self
18093    }
18094
18095    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18096    /// if it holds a `GroundednessInput`, `None` if the field is not set or
18097    /// holds a different branch.
18098    pub fn groundedness_input(
18099        &self,
18100    ) -> std::option::Option<&std::boxed::Box<crate::model::GroundednessInput>> {
18101        #[allow(unreachable_patterns)]
18102        self.metric_inputs.as_ref().and_then(|v| match v {
18103            crate::model::evaluate_instances_request::MetricInputs::GroundednessInput(v) => {
18104                std::option::Option::Some(v)
18105            }
18106            _ => std::option::Option::None,
18107        })
18108    }
18109
18110    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18111    /// to hold a `GroundednessInput`.
18112    ///
18113    /// Note that all the setters affecting `metric_inputs` are
18114    /// mutually exclusive.
18115    pub fn set_groundedness_input<
18116        T: std::convert::Into<std::boxed::Box<crate::model::GroundednessInput>>,
18117    >(
18118        mut self,
18119        v: T,
18120    ) -> Self {
18121        self.metric_inputs = std::option::Option::Some(
18122            crate::model::evaluate_instances_request::MetricInputs::GroundednessInput(v.into()),
18123        );
18124        self
18125    }
18126
18127    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18128    /// if it holds a `FulfillmentInput`, `None` if the field is not set or
18129    /// holds a different branch.
18130    pub fn fulfillment_input(
18131        &self,
18132    ) -> std::option::Option<&std::boxed::Box<crate::model::FulfillmentInput>> {
18133        #[allow(unreachable_patterns)]
18134        self.metric_inputs.as_ref().and_then(|v| match v {
18135            crate::model::evaluate_instances_request::MetricInputs::FulfillmentInput(v) => {
18136                std::option::Option::Some(v)
18137            }
18138            _ => std::option::Option::None,
18139        })
18140    }
18141
18142    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18143    /// to hold a `FulfillmentInput`.
18144    ///
18145    /// Note that all the setters affecting `metric_inputs` are
18146    /// mutually exclusive.
18147    pub fn set_fulfillment_input<
18148        T: std::convert::Into<std::boxed::Box<crate::model::FulfillmentInput>>,
18149    >(
18150        mut self,
18151        v: T,
18152    ) -> Self {
18153        self.metric_inputs = std::option::Option::Some(
18154            crate::model::evaluate_instances_request::MetricInputs::FulfillmentInput(v.into()),
18155        );
18156        self
18157    }
18158
18159    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18160    /// if it holds a `SummarizationQualityInput`, `None` if the field is not set or
18161    /// holds a different branch.
18162    pub fn summarization_quality_input(
18163        &self,
18164    ) -> std::option::Option<&std::boxed::Box<crate::model::SummarizationQualityInput>> {
18165        #[allow(unreachable_patterns)]
18166        self.metric_inputs.as_ref().and_then(|v| match v {
18167            crate::model::evaluate_instances_request::MetricInputs::SummarizationQualityInput(
18168                v,
18169            ) => std::option::Option::Some(v),
18170            _ => std::option::Option::None,
18171        })
18172    }
18173
18174    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18175    /// to hold a `SummarizationQualityInput`.
18176    ///
18177    /// Note that all the setters affecting `metric_inputs` are
18178    /// mutually exclusive.
18179    pub fn set_summarization_quality_input<
18180        T: std::convert::Into<std::boxed::Box<crate::model::SummarizationQualityInput>>,
18181    >(
18182        mut self,
18183        v: T,
18184    ) -> Self {
18185        self.metric_inputs = std::option::Option::Some(
18186            crate::model::evaluate_instances_request::MetricInputs::SummarizationQualityInput(
18187                v.into(),
18188            ),
18189        );
18190        self
18191    }
18192
18193    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18194    /// if it holds a `PairwiseSummarizationQualityInput`, `None` if the field is not set or
18195    /// holds a different branch.
18196    pub fn pairwise_summarization_quality_input(
18197        &self,
18198    ) -> std::option::Option<&std::boxed::Box<crate::model::PairwiseSummarizationQualityInput>>
18199    {
18200        #[allow(unreachable_patterns)]
18201        self.metric_inputs.as_ref().and_then(|v| match v {
18202            crate::model::evaluate_instances_request::MetricInputs::PairwiseSummarizationQualityInput(v) => std::option::Option::Some(v),
18203            _ => std::option::Option::None,
18204        })
18205    }
18206
18207    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18208    /// to hold a `PairwiseSummarizationQualityInput`.
18209    ///
18210    /// Note that all the setters affecting `metric_inputs` are
18211    /// mutually exclusive.
18212    pub fn set_pairwise_summarization_quality_input<
18213        T: std::convert::Into<std::boxed::Box<crate::model::PairwiseSummarizationQualityInput>>,
18214    >(
18215        mut self,
18216        v: T,
18217    ) -> Self {
18218        self.metric_inputs = std::option::Option::Some(
18219            crate::model::evaluate_instances_request::MetricInputs::PairwiseSummarizationQualityInput(
18220                v.into()
18221            )
18222        );
18223        self
18224    }
18225
18226    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18227    /// if it holds a `SummarizationHelpfulnessInput`, `None` if the field is not set or
18228    /// holds a different branch.
18229    pub fn summarization_helpfulness_input(
18230        &self,
18231    ) -> std::option::Option<&std::boxed::Box<crate::model::SummarizationHelpfulnessInput>> {
18232        #[allow(unreachable_patterns)]
18233        self.metric_inputs.as_ref().and_then(|v| match v {
18234            crate::model::evaluate_instances_request::MetricInputs::SummarizationHelpfulnessInput(v) => std::option::Option::Some(v),
18235            _ => std::option::Option::None,
18236        })
18237    }
18238
18239    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18240    /// to hold a `SummarizationHelpfulnessInput`.
18241    ///
18242    /// Note that all the setters affecting `metric_inputs` are
18243    /// mutually exclusive.
18244    pub fn set_summarization_helpfulness_input<
18245        T: std::convert::Into<std::boxed::Box<crate::model::SummarizationHelpfulnessInput>>,
18246    >(
18247        mut self,
18248        v: T,
18249    ) -> Self {
18250        self.metric_inputs = std::option::Option::Some(
18251            crate::model::evaluate_instances_request::MetricInputs::SummarizationHelpfulnessInput(
18252                v.into(),
18253            ),
18254        );
18255        self
18256    }
18257
18258    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18259    /// if it holds a `SummarizationVerbosityInput`, `None` if the field is not set or
18260    /// holds a different branch.
18261    pub fn summarization_verbosity_input(
18262        &self,
18263    ) -> std::option::Option<&std::boxed::Box<crate::model::SummarizationVerbosityInput>> {
18264        #[allow(unreachable_patterns)]
18265        self.metric_inputs.as_ref().and_then(|v| match v {
18266            crate::model::evaluate_instances_request::MetricInputs::SummarizationVerbosityInput(
18267                v,
18268            ) => std::option::Option::Some(v),
18269            _ => std::option::Option::None,
18270        })
18271    }
18272
18273    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18274    /// to hold a `SummarizationVerbosityInput`.
18275    ///
18276    /// Note that all the setters affecting `metric_inputs` are
18277    /// mutually exclusive.
18278    pub fn set_summarization_verbosity_input<
18279        T: std::convert::Into<std::boxed::Box<crate::model::SummarizationVerbosityInput>>,
18280    >(
18281        mut self,
18282        v: T,
18283    ) -> Self {
18284        self.metric_inputs = std::option::Option::Some(
18285            crate::model::evaluate_instances_request::MetricInputs::SummarizationVerbosityInput(
18286                v.into(),
18287            ),
18288        );
18289        self
18290    }
18291
18292    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18293    /// if it holds a `QuestionAnsweringQualityInput`, `None` if the field is not set or
18294    /// holds a different branch.
18295    pub fn question_answering_quality_input(
18296        &self,
18297    ) -> std::option::Option<&std::boxed::Box<crate::model::QuestionAnsweringQualityInput>> {
18298        #[allow(unreachable_patterns)]
18299        self.metric_inputs.as_ref().and_then(|v| match v {
18300            crate::model::evaluate_instances_request::MetricInputs::QuestionAnsweringQualityInput(v) => std::option::Option::Some(v),
18301            _ => std::option::Option::None,
18302        })
18303    }
18304
18305    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18306    /// to hold a `QuestionAnsweringQualityInput`.
18307    ///
18308    /// Note that all the setters affecting `metric_inputs` are
18309    /// mutually exclusive.
18310    pub fn set_question_answering_quality_input<
18311        T: std::convert::Into<std::boxed::Box<crate::model::QuestionAnsweringQualityInput>>,
18312    >(
18313        mut self,
18314        v: T,
18315    ) -> Self {
18316        self.metric_inputs = std::option::Option::Some(
18317            crate::model::evaluate_instances_request::MetricInputs::QuestionAnsweringQualityInput(
18318                v.into(),
18319            ),
18320        );
18321        self
18322    }
18323
18324    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18325    /// if it holds a `PairwiseQuestionAnsweringQualityInput`, `None` if the field is not set or
18326    /// holds a different branch.
18327    pub fn pairwise_question_answering_quality_input(
18328        &self,
18329    ) -> std::option::Option<&std::boxed::Box<crate::model::PairwiseQuestionAnsweringQualityInput>>
18330    {
18331        #[allow(unreachable_patterns)]
18332        self.metric_inputs.as_ref().and_then(|v| match v {
18333            crate::model::evaluate_instances_request::MetricInputs::PairwiseQuestionAnsweringQualityInput(v) => std::option::Option::Some(v),
18334            _ => std::option::Option::None,
18335        })
18336    }
18337
18338    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18339    /// to hold a `PairwiseQuestionAnsweringQualityInput`.
18340    ///
18341    /// Note that all the setters affecting `metric_inputs` are
18342    /// mutually exclusive.
18343    pub fn set_pairwise_question_answering_quality_input<
18344        T: std::convert::Into<std::boxed::Box<crate::model::PairwiseQuestionAnsweringQualityInput>>,
18345    >(
18346        mut self,
18347        v: T,
18348    ) -> Self {
18349        self.metric_inputs = std::option::Option::Some(
18350            crate::model::evaluate_instances_request::MetricInputs::PairwiseQuestionAnsweringQualityInput(
18351                v.into()
18352            )
18353        );
18354        self
18355    }
18356
18357    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18358    /// if it holds a `QuestionAnsweringRelevanceInput`, `None` if the field is not set or
18359    /// holds a different branch.
18360    pub fn question_answering_relevance_input(
18361        &self,
18362    ) -> std::option::Option<&std::boxed::Box<crate::model::QuestionAnsweringRelevanceInput>> {
18363        #[allow(unreachable_patterns)]
18364        self.metric_inputs.as_ref().and_then(|v| match v {
18365            crate::model::evaluate_instances_request::MetricInputs::QuestionAnsweringRelevanceInput(v) => std::option::Option::Some(v),
18366            _ => std::option::Option::None,
18367        })
18368    }
18369
18370    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18371    /// to hold a `QuestionAnsweringRelevanceInput`.
18372    ///
18373    /// Note that all the setters affecting `metric_inputs` are
18374    /// mutually exclusive.
18375    pub fn set_question_answering_relevance_input<
18376        T: std::convert::Into<std::boxed::Box<crate::model::QuestionAnsweringRelevanceInput>>,
18377    >(
18378        mut self,
18379        v: T,
18380    ) -> Self {
18381        self.metric_inputs = std::option::Option::Some(
18382            crate::model::evaluate_instances_request::MetricInputs::QuestionAnsweringRelevanceInput(
18383                v.into(),
18384            ),
18385        );
18386        self
18387    }
18388
18389    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18390    /// if it holds a `QuestionAnsweringHelpfulnessInput`, `None` if the field is not set or
18391    /// holds a different branch.
18392    pub fn question_answering_helpfulness_input(
18393        &self,
18394    ) -> std::option::Option<&std::boxed::Box<crate::model::QuestionAnsweringHelpfulnessInput>>
18395    {
18396        #[allow(unreachable_patterns)]
18397        self.metric_inputs.as_ref().and_then(|v| match v {
18398            crate::model::evaluate_instances_request::MetricInputs::QuestionAnsweringHelpfulnessInput(v) => std::option::Option::Some(v),
18399            _ => std::option::Option::None,
18400        })
18401    }
18402
18403    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18404    /// to hold a `QuestionAnsweringHelpfulnessInput`.
18405    ///
18406    /// Note that all the setters affecting `metric_inputs` are
18407    /// mutually exclusive.
18408    pub fn set_question_answering_helpfulness_input<
18409        T: std::convert::Into<std::boxed::Box<crate::model::QuestionAnsweringHelpfulnessInput>>,
18410    >(
18411        mut self,
18412        v: T,
18413    ) -> Self {
18414        self.metric_inputs = std::option::Option::Some(
18415            crate::model::evaluate_instances_request::MetricInputs::QuestionAnsweringHelpfulnessInput(
18416                v.into()
18417            )
18418        );
18419        self
18420    }
18421
18422    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18423    /// if it holds a `QuestionAnsweringCorrectnessInput`, `None` if the field is not set or
18424    /// holds a different branch.
18425    pub fn question_answering_correctness_input(
18426        &self,
18427    ) -> std::option::Option<&std::boxed::Box<crate::model::QuestionAnsweringCorrectnessInput>>
18428    {
18429        #[allow(unreachable_patterns)]
18430        self.metric_inputs.as_ref().and_then(|v| match v {
18431            crate::model::evaluate_instances_request::MetricInputs::QuestionAnsweringCorrectnessInput(v) => std::option::Option::Some(v),
18432            _ => std::option::Option::None,
18433        })
18434    }
18435
18436    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18437    /// to hold a `QuestionAnsweringCorrectnessInput`.
18438    ///
18439    /// Note that all the setters affecting `metric_inputs` are
18440    /// mutually exclusive.
18441    pub fn set_question_answering_correctness_input<
18442        T: std::convert::Into<std::boxed::Box<crate::model::QuestionAnsweringCorrectnessInput>>,
18443    >(
18444        mut self,
18445        v: T,
18446    ) -> Self {
18447        self.metric_inputs = std::option::Option::Some(
18448            crate::model::evaluate_instances_request::MetricInputs::QuestionAnsweringCorrectnessInput(
18449                v.into()
18450            )
18451        );
18452        self
18453    }
18454
18455    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18456    /// if it holds a `PointwiseMetricInput`, `None` if the field is not set or
18457    /// holds a different branch.
18458    pub fn pointwise_metric_input(
18459        &self,
18460    ) -> std::option::Option<&std::boxed::Box<crate::model::PointwiseMetricInput>> {
18461        #[allow(unreachable_patterns)]
18462        self.metric_inputs.as_ref().and_then(|v| match v {
18463            crate::model::evaluate_instances_request::MetricInputs::PointwiseMetricInput(v) => {
18464                std::option::Option::Some(v)
18465            }
18466            _ => std::option::Option::None,
18467        })
18468    }
18469
18470    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18471    /// to hold a `PointwiseMetricInput`.
18472    ///
18473    /// Note that all the setters affecting `metric_inputs` are
18474    /// mutually exclusive.
18475    pub fn set_pointwise_metric_input<
18476        T: std::convert::Into<std::boxed::Box<crate::model::PointwiseMetricInput>>,
18477    >(
18478        mut self,
18479        v: T,
18480    ) -> Self {
18481        self.metric_inputs = std::option::Option::Some(
18482            crate::model::evaluate_instances_request::MetricInputs::PointwiseMetricInput(v.into()),
18483        );
18484        self
18485    }
18486
18487    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18488    /// if it holds a `PairwiseMetricInput`, `None` if the field is not set or
18489    /// holds a different branch.
18490    pub fn pairwise_metric_input(
18491        &self,
18492    ) -> std::option::Option<&std::boxed::Box<crate::model::PairwiseMetricInput>> {
18493        #[allow(unreachable_patterns)]
18494        self.metric_inputs.as_ref().and_then(|v| match v {
18495            crate::model::evaluate_instances_request::MetricInputs::PairwiseMetricInput(v) => {
18496                std::option::Option::Some(v)
18497            }
18498            _ => std::option::Option::None,
18499        })
18500    }
18501
18502    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18503    /// to hold a `PairwiseMetricInput`.
18504    ///
18505    /// Note that all the setters affecting `metric_inputs` are
18506    /// mutually exclusive.
18507    pub fn set_pairwise_metric_input<
18508        T: std::convert::Into<std::boxed::Box<crate::model::PairwiseMetricInput>>,
18509    >(
18510        mut self,
18511        v: T,
18512    ) -> Self {
18513        self.metric_inputs = std::option::Option::Some(
18514            crate::model::evaluate_instances_request::MetricInputs::PairwiseMetricInput(v.into()),
18515        );
18516        self
18517    }
18518
18519    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18520    /// if it holds a `ToolCallValidInput`, `None` if the field is not set or
18521    /// holds a different branch.
18522    pub fn tool_call_valid_input(
18523        &self,
18524    ) -> std::option::Option<&std::boxed::Box<crate::model::ToolCallValidInput>> {
18525        #[allow(unreachable_patterns)]
18526        self.metric_inputs.as_ref().and_then(|v| match v {
18527            crate::model::evaluate_instances_request::MetricInputs::ToolCallValidInput(v) => {
18528                std::option::Option::Some(v)
18529            }
18530            _ => std::option::Option::None,
18531        })
18532    }
18533
18534    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18535    /// to hold a `ToolCallValidInput`.
18536    ///
18537    /// Note that all the setters affecting `metric_inputs` are
18538    /// mutually exclusive.
18539    pub fn set_tool_call_valid_input<
18540        T: std::convert::Into<std::boxed::Box<crate::model::ToolCallValidInput>>,
18541    >(
18542        mut self,
18543        v: T,
18544    ) -> Self {
18545        self.metric_inputs = std::option::Option::Some(
18546            crate::model::evaluate_instances_request::MetricInputs::ToolCallValidInput(v.into()),
18547        );
18548        self
18549    }
18550
18551    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18552    /// if it holds a `ToolNameMatchInput`, `None` if the field is not set or
18553    /// holds a different branch.
18554    pub fn tool_name_match_input(
18555        &self,
18556    ) -> std::option::Option<&std::boxed::Box<crate::model::ToolNameMatchInput>> {
18557        #[allow(unreachable_patterns)]
18558        self.metric_inputs.as_ref().and_then(|v| match v {
18559            crate::model::evaluate_instances_request::MetricInputs::ToolNameMatchInput(v) => {
18560                std::option::Option::Some(v)
18561            }
18562            _ => std::option::Option::None,
18563        })
18564    }
18565
18566    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18567    /// to hold a `ToolNameMatchInput`.
18568    ///
18569    /// Note that all the setters affecting `metric_inputs` are
18570    /// mutually exclusive.
18571    pub fn set_tool_name_match_input<
18572        T: std::convert::Into<std::boxed::Box<crate::model::ToolNameMatchInput>>,
18573    >(
18574        mut self,
18575        v: T,
18576    ) -> Self {
18577        self.metric_inputs = std::option::Option::Some(
18578            crate::model::evaluate_instances_request::MetricInputs::ToolNameMatchInput(v.into()),
18579        );
18580        self
18581    }
18582
18583    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18584    /// if it holds a `ToolParameterKeyMatchInput`, `None` if the field is not set or
18585    /// holds a different branch.
18586    pub fn tool_parameter_key_match_input(
18587        &self,
18588    ) -> std::option::Option<&std::boxed::Box<crate::model::ToolParameterKeyMatchInput>> {
18589        #[allow(unreachable_patterns)]
18590        self.metric_inputs.as_ref().and_then(|v| match v {
18591            crate::model::evaluate_instances_request::MetricInputs::ToolParameterKeyMatchInput(
18592                v,
18593            ) => std::option::Option::Some(v),
18594            _ => std::option::Option::None,
18595        })
18596    }
18597
18598    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18599    /// to hold a `ToolParameterKeyMatchInput`.
18600    ///
18601    /// Note that all the setters affecting `metric_inputs` are
18602    /// mutually exclusive.
18603    pub fn set_tool_parameter_key_match_input<
18604        T: std::convert::Into<std::boxed::Box<crate::model::ToolParameterKeyMatchInput>>,
18605    >(
18606        mut self,
18607        v: T,
18608    ) -> Self {
18609        self.metric_inputs = std::option::Option::Some(
18610            crate::model::evaluate_instances_request::MetricInputs::ToolParameterKeyMatchInput(
18611                v.into(),
18612            ),
18613        );
18614        self
18615    }
18616
18617    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18618    /// if it holds a `ToolParameterKvMatchInput`, `None` if the field is not set or
18619    /// holds a different branch.
18620    pub fn tool_parameter_kv_match_input(
18621        &self,
18622    ) -> std::option::Option<&std::boxed::Box<crate::model::ToolParameterKVMatchInput>> {
18623        #[allow(unreachable_patterns)]
18624        self.metric_inputs.as_ref().and_then(|v| match v {
18625            crate::model::evaluate_instances_request::MetricInputs::ToolParameterKvMatchInput(
18626                v,
18627            ) => std::option::Option::Some(v),
18628            _ => std::option::Option::None,
18629        })
18630    }
18631
18632    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18633    /// to hold a `ToolParameterKvMatchInput`.
18634    ///
18635    /// Note that all the setters affecting `metric_inputs` are
18636    /// mutually exclusive.
18637    pub fn set_tool_parameter_kv_match_input<
18638        T: std::convert::Into<std::boxed::Box<crate::model::ToolParameterKVMatchInput>>,
18639    >(
18640        mut self,
18641        v: T,
18642    ) -> Self {
18643        self.metric_inputs = std::option::Option::Some(
18644            crate::model::evaluate_instances_request::MetricInputs::ToolParameterKvMatchInput(
18645                v.into(),
18646            ),
18647        );
18648        self
18649    }
18650
18651    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18652    /// if it holds a `CometInput`, `None` if the field is not set or
18653    /// holds a different branch.
18654    pub fn comet_input(&self) -> std::option::Option<&std::boxed::Box<crate::model::CometInput>> {
18655        #[allow(unreachable_patterns)]
18656        self.metric_inputs.as_ref().and_then(|v| match v {
18657            crate::model::evaluate_instances_request::MetricInputs::CometInput(v) => {
18658                std::option::Option::Some(v)
18659            }
18660            _ => std::option::Option::None,
18661        })
18662    }
18663
18664    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18665    /// to hold a `CometInput`.
18666    ///
18667    /// Note that all the setters affecting `metric_inputs` are
18668    /// mutually exclusive.
18669    pub fn set_comet_input<T: std::convert::Into<std::boxed::Box<crate::model::CometInput>>>(
18670        mut self,
18671        v: T,
18672    ) -> Self {
18673        self.metric_inputs = std::option::Option::Some(
18674            crate::model::evaluate_instances_request::MetricInputs::CometInput(v.into()),
18675        );
18676        self
18677    }
18678
18679    /// The value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18680    /// if it holds a `MetricxInput`, `None` if the field is not set or
18681    /// holds a different branch.
18682    pub fn metricx_input(
18683        &self,
18684    ) -> std::option::Option<&std::boxed::Box<crate::model::MetricxInput>> {
18685        #[allow(unreachable_patterns)]
18686        self.metric_inputs.as_ref().and_then(|v| match v {
18687            crate::model::evaluate_instances_request::MetricInputs::MetricxInput(v) => {
18688                std::option::Option::Some(v)
18689            }
18690            _ => std::option::Option::None,
18691        })
18692    }
18693
18694    /// Sets the value of [metric_inputs][crate::model::EvaluateInstancesRequest::metric_inputs]
18695    /// to hold a `MetricxInput`.
18696    ///
18697    /// Note that all the setters affecting `metric_inputs` are
18698    /// mutually exclusive.
18699    pub fn set_metricx_input<T: std::convert::Into<std::boxed::Box<crate::model::MetricxInput>>>(
18700        mut self,
18701        v: T,
18702    ) -> Self {
18703        self.metric_inputs = std::option::Option::Some(
18704            crate::model::evaluate_instances_request::MetricInputs::MetricxInput(v.into()),
18705        );
18706        self
18707    }
18708}
18709
18710#[cfg(feature = "evaluation-service")]
18711impl wkt::message::Message for EvaluateInstancesRequest {
18712    fn typename() -> &'static str {
18713        "type.googleapis.com/google.cloud.aiplatform.v1.EvaluateInstancesRequest"
18714    }
18715}
18716
18717/// Defines additional types related to [EvaluateInstancesRequest].
18718#[cfg(feature = "evaluation-service")]
18719pub mod evaluate_instances_request {
18720    #[allow(unused_imports)]
18721    use super::*;
18722
18723    /// Instances and specs for evaluation
18724    #[cfg(feature = "evaluation-service")]
18725    #[derive(Clone, Debug, PartialEq)]
18726    #[non_exhaustive]
18727    pub enum MetricInputs {
18728        /// Auto metric instances.
18729        /// Instances and metric spec for exact match metric.
18730        ExactMatchInput(std::boxed::Box<crate::model::ExactMatchInput>),
18731        /// Instances and metric spec for bleu metric.
18732        BleuInput(std::boxed::Box<crate::model::BleuInput>),
18733        /// Instances and metric spec for rouge metric.
18734        RougeInput(std::boxed::Box<crate::model::RougeInput>),
18735        /// LLM-based metric instance.
18736        /// General text generation metrics, applicable to other categories.
18737        /// Input for fluency metric.
18738        FluencyInput(std::boxed::Box<crate::model::FluencyInput>),
18739        /// Input for coherence metric.
18740        CoherenceInput(std::boxed::Box<crate::model::CoherenceInput>),
18741        /// Input for safety metric.
18742        SafetyInput(std::boxed::Box<crate::model::SafetyInput>),
18743        /// Input for groundedness metric.
18744        GroundednessInput(std::boxed::Box<crate::model::GroundednessInput>),
18745        /// Input for fulfillment metric.
18746        FulfillmentInput(std::boxed::Box<crate::model::FulfillmentInput>),
18747        /// Input for summarization quality metric.
18748        SummarizationQualityInput(std::boxed::Box<crate::model::SummarizationQualityInput>),
18749        /// Input for pairwise summarization quality metric.
18750        PairwiseSummarizationQualityInput(
18751            std::boxed::Box<crate::model::PairwiseSummarizationQualityInput>,
18752        ),
18753        /// Input for summarization helpfulness metric.
18754        SummarizationHelpfulnessInput(std::boxed::Box<crate::model::SummarizationHelpfulnessInput>),
18755        /// Input for summarization verbosity metric.
18756        SummarizationVerbosityInput(std::boxed::Box<crate::model::SummarizationVerbosityInput>),
18757        /// Input for question answering quality metric.
18758        QuestionAnsweringQualityInput(std::boxed::Box<crate::model::QuestionAnsweringQualityInput>),
18759        /// Input for pairwise question answering quality metric.
18760        PairwiseQuestionAnsweringQualityInput(
18761            std::boxed::Box<crate::model::PairwiseQuestionAnsweringQualityInput>,
18762        ),
18763        /// Input for question answering relevance metric.
18764        QuestionAnsweringRelevanceInput(
18765            std::boxed::Box<crate::model::QuestionAnsweringRelevanceInput>,
18766        ),
18767        /// Input for question answering helpfulness
18768        /// metric.
18769        QuestionAnsweringHelpfulnessInput(
18770            std::boxed::Box<crate::model::QuestionAnsweringHelpfulnessInput>,
18771        ),
18772        /// Input for question answering correctness
18773        /// metric.
18774        QuestionAnsweringCorrectnessInput(
18775            std::boxed::Box<crate::model::QuestionAnsweringCorrectnessInput>,
18776        ),
18777        /// Input for pointwise metric.
18778        PointwiseMetricInput(std::boxed::Box<crate::model::PointwiseMetricInput>),
18779        /// Input for pairwise metric.
18780        PairwiseMetricInput(std::boxed::Box<crate::model::PairwiseMetricInput>),
18781        /// Tool call metric instances.
18782        /// Input for tool call valid metric.
18783        ToolCallValidInput(std::boxed::Box<crate::model::ToolCallValidInput>),
18784        /// Input for tool name match metric.
18785        ToolNameMatchInput(std::boxed::Box<crate::model::ToolNameMatchInput>),
18786        /// Input for tool parameter key match metric.
18787        ToolParameterKeyMatchInput(std::boxed::Box<crate::model::ToolParameterKeyMatchInput>),
18788        /// Input for tool parameter key value match metric.
18789        ToolParameterKvMatchInput(std::boxed::Box<crate::model::ToolParameterKVMatchInput>),
18790        /// Translation metrics.
18791        /// Input for Comet metric.
18792        CometInput(std::boxed::Box<crate::model::CometInput>),
18793        /// Input for Metricx metric.
18794        MetricxInput(std::boxed::Box<crate::model::MetricxInput>),
18795    }
18796}
18797
18798/// Response message for EvaluationService.EvaluateInstances.
18799#[cfg(feature = "evaluation-service")]
18800#[derive(Clone, Default, PartialEq)]
18801#[non_exhaustive]
18802pub struct EvaluateInstancesResponse {
18803    /// Evaluation results will be served in the same order as presented in
18804    /// EvaluationRequest.instances.
18805    pub evaluation_results:
18806        std::option::Option<crate::model::evaluate_instances_response::EvaluationResults>,
18807
18808    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18809}
18810
18811#[cfg(feature = "evaluation-service")]
18812impl EvaluateInstancesResponse {
18813    pub fn new() -> Self {
18814        std::default::Default::default()
18815    }
18816
18817    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results].
18818    ///
18819    /// Note that all the setters affecting `evaluation_results` are mutually
18820    /// exclusive.
18821    pub fn set_evaluation_results<
18822        T: std::convert::Into<
18823                std::option::Option<crate::model::evaluate_instances_response::EvaluationResults>,
18824            >,
18825    >(
18826        mut self,
18827        v: T,
18828    ) -> Self {
18829        self.evaluation_results = v.into();
18830        self
18831    }
18832
18833    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
18834    /// if it holds a `ExactMatchResults`, `None` if the field is not set or
18835    /// holds a different branch.
18836    pub fn exact_match_results(
18837        &self,
18838    ) -> std::option::Option<&std::boxed::Box<crate::model::ExactMatchResults>> {
18839        #[allow(unreachable_patterns)]
18840        self.evaluation_results.as_ref().and_then(|v| match v {
18841            crate::model::evaluate_instances_response::EvaluationResults::ExactMatchResults(v) => {
18842                std::option::Option::Some(v)
18843            }
18844            _ => std::option::Option::None,
18845        })
18846    }
18847
18848    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
18849    /// to hold a `ExactMatchResults`.
18850    ///
18851    /// Note that all the setters affecting `evaluation_results` are
18852    /// mutually exclusive.
18853    pub fn set_exact_match_results<
18854        T: std::convert::Into<std::boxed::Box<crate::model::ExactMatchResults>>,
18855    >(
18856        mut self,
18857        v: T,
18858    ) -> Self {
18859        self.evaluation_results = std::option::Option::Some(
18860            crate::model::evaluate_instances_response::EvaluationResults::ExactMatchResults(
18861                v.into(),
18862            ),
18863        );
18864        self
18865    }
18866
18867    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
18868    /// if it holds a `BleuResults`, `None` if the field is not set or
18869    /// holds a different branch.
18870    pub fn bleu_results(&self) -> std::option::Option<&std::boxed::Box<crate::model::BleuResults>> {
18871        #[allow(unreachable_patterns)]
18872        self.evaluation_results.as_ref().and_then(|v| match v {
18873            crate::model::evaluate_instances_response::EvaluationResults::BleuResults(v) => {
18874                std::option::Option::Some(v)
18875            }
18876            _ => std::option::Option::None,
18877        })
18878    }
18879
18880    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
18881    /// to hold a `BleuResults`.
18882    ///
18883    /// Note that all the setters affecting `evaluation_results` are
18884    /// mutually exclusive.
18885    pub fn set_bleu_results<T: std::convert::Into<std::boxed::Box<crate::model::BleuResults>>>(
18886        mut self,
18887        v: T,
18888    ) -> Self {
18889        self.evaluation_results = std::option::Option::Some(
18890            crate::model::evaluate_instances_response::EvaluationResults::BleuResults(v.into()),
18891        );
18892        self
18893    }
18894
18895    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
18896    /// if it holds a `RougeResults`, `None` if the field is not set or
18897    /// holds a different branch.
18898    pub fn rouge_results(
18899        &self,
18900    ) -> std::option::Option<&std::boxed::Box<crate::model::RougeResults>> {
18901        #[allow(unreachable_patterns)]
18902        self.evaluation_results.as_ref().and_then(|v| match v {
18903            crate::model::evaluate_instances_response::EvaluationResults::RougeResults(v) => {
18904                std::option::Option::Some(v)
18905            }
18906            _ => std::option::Option::None,
18907        })
18908    }
18909
18910    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
18911    /// to hold a `RougeResults`.
18912    ///
18913    /// Note that all the setters affecting `evaluation_results` are
18914    /// mutually exclusive.
18915    pub fn set_rouge_results<T: std::convert::Into<std::boxed::Box<crate::model::RougeResults>>>(
18916        mut self,
18917        v: T,
18918    ) -> Self {
18919        self.evaluation_results = std::option::Option::Some(
18920            crate::model::evaluate_instances_response::EvaluationResults::RougeResults(v.into()),
18921        );
18922        self
18923    }
18924
18925    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
18926    /// if it holds a `FluencyResult`, `None` if the field is not set or
18927    /// holds a different branch.
18928    pub fn fluency_result(
18929        &self,
18930    ) -> std::option::Option<&std::boxed::Box<crate::model::FluencyResult>> {
18931        #[allow(unreachable_patterns)]
18932        self.evaluation_results.as_ref().and_then(|v| match v {
18933            crate::model::evaluate_instances_response::EvaluationResults::FluencyResult(v) => {
18934                std::option::Option::Some(v)
18935            }
18936            _ => std::option::Option::None,
18937        })
18938    }
18939
18940    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
18941    /// to hold a `FluencyResult`.
18942    ///
18943    /// Note that all the setters affecting `evaluation_results` are
18944    /// mutually exclusive.
18945    pub fn set_fluency_result<
18946        T: std::convert::Into<std::boxed::Box<crate::model::FluencyResult>>,
18947    >(
18948        mut self,
18949        v: T,
18950    ) -> Self {
18951        self.evaluation_results = std::option::Option::Some(
18952            crate::model::evaluate_instances_response::EvaluationResults::FluencyResult(v.into()),
18953        );
18954        self
18955    }
18956
18957    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
18958    /// if it holds a `CoherenceResult`, `None` if the field is not set or
18959    /// holds a different branch.
18960    pub fn coherence_result(
18961        &self,
18962    ) -> std::option::Option<&std::boxed::Box<crate::model::CoherenceResult>> {
18963        #[allow(unreachable_patterns)]
18964        self.evaluation_results.as_ref().and_then(|v| match v {
18965            crate::model::evaluate_instances_response::EvaluationResults::CoherenceResult(v) => {
18966                std::option::Option::Some(v)
18967            }
18968            _ => std::option::Option::None,
18969        })
18970    }
18971
18972    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
18973    /// to hold a `CoherenceResult`.
18974    ///
18975    /// Note that all the setters affecting `evaluation_results` are
18976    /// mutually exclusive.
18977    pub fn set_coherence_result<
18978        T: std::convert::Into<std::boxed::Box<crate::model::CoherenceResult>>,
18979    >(
18980        mut self,
18981        v: T,
18982    ) -> Self {
18983        self.evaluation_results = std::option::Option::Some(
18984            crate::model::evaluate_instances_response::EvaluationResults::CoherenceResult(v.into()),
18985        );
18986        self
18987    }
18988
18989    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
18990    /// if it holds a `SafetyResult`, `None` if the field is not set or
18991    /// holds a different branch.
18992    pub fn safety_result(
18993        &self,
18994    ) -> std::option::Option<&std::boxed::Box<crate::model::SafetyResult>> {
18995        #[allow(unreachable_patterns)]
18996        self.evaluation_results.as_ref().and_then(|v| match v {
18997            crate::model::evaluate_instances_response::EvaluationResults::SafetyResult(v) => {
18998                std::option::Option::Some(v)
18999            }
19000            _ => std::option::Option::None,
19001        })
19002    }
19003
19004    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19005    /// to hold a `SafetyResult`.
19006    ///
19007    /// Note that all the setters affecting `evaluation_results` are
19008    /// mutually exclusive.
19009    pub fn set_safety_result<T: std::convert::Into<std::boxed::Box<crate::model::SafetyResult>>>(
19010        mut self,
19011        v: T,
19012    ) -> Self {
19013        self.evaluation_results = std::option::Option::Some(
19014            crate::model::evaluate_instances_response::EvaluationResults::SafetyResult(v.into()),
19015        );
19016        self
19017    }
19018
19019    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19020    /// if it holds a `GroundednessResult`, `None` if the field is not set or
19021    /// holds a different branch.
19022    pub fn groundedness_result(
19023        &self,
19024    ) -> std::option::Option<&std::boxed::Box<crate::model::GroundednessResult>> {
19025        #[allow(unreachable_patterns)]
19026        self.evaluation_results.as_ref().and_then(|v| match v {
19027            crate::model::evaluate_instances_response::EvaluationResults::GroundednessResult(v) => {
19028                std::option::Option::Some(v)
19029            }
19030            _ => std::option::Option::None,
19031        })
19032    }
19033
19034    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19035    /// to hold a `GroundednessResult`.
19036    ///
19037    /// Note that all the setters affecting `evaluation_results` are
19038    /// mutually exclusive.
19039    pub fn set_groundedness_result<
19040        T: std::convert::Into<std::boxed::Box<crate::model::GroundednessResult>>,
19041    >(
19042        mut self,
19043        v: T,
19044    ) -> Self {
19045        self.evaluation_results = std::option::Option::Some(
19046            crate::model::evaluate_instances_response::EvaluationResults::GroundednessResult(
19047                v.into(),
19048            ),
19049        );
19050        self
19051    }
19052
19053    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19054    /// if it holds a `FulfillmentResult`, `None` if the field is not set or
19055    /// holds a different branch.
19056    pub fn fulfillment_result(
19057        &self,
19058    ) -> std::option::Option<&std::boxed::Box<crate::model::FulfillmentResult>> {
19059        #[allow(unreachable_patterns)]
19060        self.evaluation_results.as_ref().and_then(|v| match v {
19061            crate::model::evaluate_instances_response::EvaluationResults::FulfillmentResult(v) => {
19062                std::option::Option::Some(v)
19063            }
19064            _ => std::option::Option::None,
19065        })
19066    }
19067
19068    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19069    /// to hold a `FulfillmentResult`.
19070    ///
19071    /// Note that all the setters affecting `evaluation_results` are
19072    /// mutually exclusive.
19073    pub fn set_fulfillment_result<
19074        T: std::convert::Into<std::boxed::Box<crate::model::FulfillmentResult>>,
19075    >(
19076        mut self,
19077        v: T,
19078    ) -> Self {
19079        self.evaluation_results = std::option::Option::Some(
19080            crate::model::evaluate_instances_response::EvaluationResults::FulfillmentResult(
19081                v.into(),
19082            ),
19083        );
19084        self
19085    }
19086
19087    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19088    /// if it holds a `SummarizationQualityResult`, `None` if the field is not set or
19089    /// holds a different branch.
19090    pub fn summarization_quality_result(
19091        &self,
19092    ) -> std::option::Option<&std::boxed::Box<crate::model::SummarizationQualityResult>> {
19093        #[allow(unreachable_patterns)]
19094        self.evaluation_results.as_ref().and_then(|v| match v {
19095            crate::model::evaluate_instances_response::EvaluationResults::SummarizationQualityResult(v) => std::option::Option::Some(v),
19096            _ => std::option::Option::None,
19097        })
19098    }
19099
19100    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19101    /// to hold a `SummarizationQualityResult`.
19102    ///
19103    /// Note that all the setters affecting `evaluation_results` are
19104    /// mutually exclusive.
19105    pub fn set_summarization_quality_result<
19106        T: std::convert::Into<std::boxed::Box<crate::model::SummarizationQualityResult>>,
19107    >(
19108        mut self,
19109        v: T,
19110    ) -> Self {
19111        self.evaluation_results = std::option::Option::Some(
19112            crate::model::evaluate_instances_response::EvaluationResults::SummarizationQualityResult(
19113                v.into()
19114            )
19115        );
19116        self
19117    }
19118
19119    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19120    /// if it holds a `PairwiseSummarizationQualityResult`, `None` if the field is not set or
19121    /// holds a different branch.
19122    pub fn pairwise_summarization_quality_result(
19123        &self,
19124    ) -> std::option::Option<&std::boxed::Box<crate::model::PairwiseSummarizationQualityResult>>
19125    {
19126        #[allow(unreachable_patterns)]
19127        self.evaluation_results.as_ref().and_then(|v| match v {
19128            crate::model::evaluate_instances_response::EvaluationResults::PairwiseSummarizationQualityResult(v) => std::option::Option::Some(v),
19129            _ => std::option::Option::None,
19130        })
19131    }
19132
19133    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19134    /// to hold a `PairwiseSummarizationQualityResult`.
19135    ///
19136    /// Note that all the setters affecting `evaluation_results` are
19137    /// mutually exclusive.
19138    pub fn set_pairwise_summarization_quality_result<
19139        T: std::convert::Into<std::boxed::Box<crate::model::PairwiseSummarizationQualityResult>>,
19140    >(
19141        mut self,
19142        v: T,
19143    ) -> Self {
19144        self.evaluation_results = std::option::Option::Some(
19145            crate::model::evaluate_instances_response::EvaluationResults::PairwiseSummarizationQualityResult(
19146                v.into()
19147            )
19148        );
19149        self
19150    }
19151
19152    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19153    /// if it holds a `SummarizationHelpfulnessResult`, `None` if the field is not set or
19154    /// holds a different branch.
19155    pub fn summarization_helpfulness_result(
19156        &self,
19157    ) -> std::option::Option<&std::boxed::Box<crate::model::SummarizationHelpfulnessResult>> {
19158        #[allow(unreachable_patterns)]
19159        self.evaluation_results.as_ref().and_then(|v| match v {
19160            crate::model::evaluate_instances_response::EvaluationResults::SummarizationHelpfulnessResult(v) => std::option::Option::Some(v),
19161            _ => std::option::Option::None,
19162        })
19163    }
19164
19165    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19166    /// to hold a `SummarizationHelpfulnessResult`.
19167    ///
19168    /// Note that all the setters affecting `evaluation_results` are
19169    /// mutually exclusive.
19170    pub fn set_summarization_helpfulness_result<
19171        T: std::convert::Into<std::boxed::Box<crate::model::SummarizationHelpfulnessResult>>,
19172    >(
19173        mut self,
19174        v: T,
19175    ) -> Self {
19176        self.evaluation_results = std::option::Option::Some(
19177            crate::model::evaluate_instances_response::EvaluationResults::SummarizationHelpfulnessResult(
19178                v.into()
19179            )
19180        );
19181        self
19182    }
19183
19184    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19185    /// if it holds a `SummarizationVerbosityResult`, `None` if the field is not set or
19186    /// holds a different branch.
19187    pub fn summarization_verbosity_result(
19188        &self,
19189    ) -> std::option::Option<&std::boxed::Box<crate::model::SummarizationVerbosityResult>> {
19190        #[allow(unreachable_patterns)]
19191        self.evaluation_results.as_ref().and_then(|v| match v {
19192            crate::model::evaluate_instances_response::EvaluationResults::SummarizationVerbosityResult(v) => std::option::Option::Some(v),
19193            _ => std::option::Option::None,
19194        })
19195    }
19196
19197    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19198    /// to hold a `SummarizationVerbosityResult`.
19199    ///
19200    /// Note that all the setters affecting `evaluation_results` are
19201    /// mutually exclusive.
19202    pub fn set_summarization_verbosity_result<
19203        T: std::convert::Into<std::boxed::Box<crate::model::SummarizationVerbosityResult>>,
19204    >(
19205        mut self,
19206        v: T,
19207    ) -> Self {
19208        self.evaluation_results = std::option::Option::Some(
19209            crate::model::evaluate_instances_response::EvaluationResults::SummarizationVerbosityResult(
19210                v.into()
19211            )
19212        );
19213        self
19214    }
19215
19216    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19217    /// if it holds a `QuestionAnsweringQualityResult`, `None` if the field is not set or
19218    /// holds a different branch.
19219    pub fn question_answering_quality_result(
19220        &self,
19221    ) -> std::option::Option<&std::boxed::Box<crate::model::QuestionAnsweringQualityResult>> {
19222        #[allow(unreachable_patterns)]
19223        self.evaluation_results.as_ref().and_then(|v| match v {
19224            crate::model::evaluate_instances_response::EvaluationResults::QuestionAnsweringQualityResult(v) => std::option::Option::Some(v),
19225            _ => std::option::Option::None,
19226        })
19227    }
19228
19229    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19230    /// to hold a `QuestionAnsweringQualityResult`.
19231    ///
19232    /// Note that all the setters affecting `evaluation_results` are
19233    /// mutually exclusive.
19234    pub fn set_question_answering_quality_result<
19235        T: std::convert::Into<std::boxed::Box<crate::model::QuestionAnsweringQualityResult>>,
19236    >(
19237        mut self,
19238        v: T,
19239    ) -> Self {
19240        self.evaluation_results = std::option::Option::Some(
19241            crate::model::evaluate_instances_response::EvaluationResults::QuestionAnsweringQualityResult(
19242                v.into()
19243            )
19244        );
19245        self
19246    }
19247
19248    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19249    /// if it holds a `PairwiseQuestionAnsweringQualityResult`, `None` if the field is not set or
19250    /// holds a different branch.
19251    pub fn pairwise_question_answering_quality_result(
19252        &self,
19253    ) -> std::option::Option<&std::boxed::Box<crate::model::PairwiseQuestionAnsweringQualityResult>>
19254    {
19255        #[allow(unreachable_patterns)]
19256        self.evaluation_results.as_ref().and_then(|v| match v {
19257            crate::model::evaluate_instances_response::EvaluationResults::PairwiseQuestionAnsweringQualityResult(v) => std::option::Option::Some(v),
19258            _ => std::option::Option::None,
19259        })
19260    }
19261
19262    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19263    /// to hold a `PairwiseQuestionAnsweringQualityResult`.
19264    ///
19265    /// Note that all the setters affecting `evaluation_results` are
19266    /// mutually exclusive.
19267    pub fn set_pairwise_question_answering_quality_result<
19268        T: std::convert::Into<std::boxed::Box<crate::model::PairwiseQuestionAnsweringQualityResult>>,
19269    >(
19270        mut self,
19271        v: T,
19272    ) -> Self {
19273        self.evaluation_results = std::option::Option::Some(
19274            crate::model::evaluate_instances_response::EvaluationResults::PairwiseQuestionAnsweringQualityResult(
19275                v.into()
19276            )
19277        );
19278        self
19279    }
19280
19281    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19282    /// if it holds a `QuestionAnsweringRelevanceResult`, `None` if the field is not set or
19283    /// holds a different branch.
19284    pub fn question_answering_relevance_result(
19285        &self,
19286    ) -> std::option::Option<&std::boxed::Box<crate::model::QuestionAnsweringRelevanceResult>> {
19287        #[allow(unreachable_patterns)]
19288        self.evaluation_results.as_ref().and_then(|v| match v {
19289            crate::model::evaluate_instances_response::EvaluationResults::QuestionAnsweringRelevanceResult(v) => std::option::Option::Some(v),
19290            _ => std::option::Option::None,
19291        })
19292    }
19293
19294    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19295    /// to hold a `QuestionAnsweringRelevanceResult`.
19296    ///
19297    /// Note that all the setters affecting `evaluation_results` are
19298    /// mutually exclusive.
19299    pub fn set_question_answering_relevance_result<
19300        T: std::convert::Into<std::boxed::Box<crate::model::QuestionAnsweringRelevanceResult>>,
19301    >(
19302        mut self,
19303        v: T,
19304    ) -> Self {
19305        self.evaluation_results = std::option::Option::Some(
19306            crate::model::evaluate_instances_response::EvaluationResults::QuestionAnsweringRelevanceResult(
19307                v.into()
19308            )
19309        );
19310        self
19311    }
19312
19313    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19314    /// if it holds a `QuestionAnsweringHelpfulnessResult`, `None` if the field is not set or
19315    /// holds a different branch.
19316    pub fn question_answering_helpfulness_result(
19317        &self,
19318    ) -> std::option::Option<&std::boxed::Box<crate::model::QuestionAnsweringHelpfulnessResult>>
19319    {
19320        #[allow(unreachable_patterns)]
19321        self.evaluation_results.as_ref().and_then(|v| match v {
19322            crate::model::evaluate_instances_response::EvaluationResults::QuestionAnsweringHelpfulnessResult(v) => std::option::Option::Some(v),
19323            _ => std::option::Option::None,
19324        })
19325    }
19326
19327    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19328    /// to hold a `QuestionAnsweringHelpfulnessResult`.
19329    ///
19330    /// Note that all the setters affecting `evaluation_results` are
19331    /// mutually exclusive.
19332    pub fn set_question_answering_helpfulness_result<
19333        T: std::convert::Into<std::boxed::Box<crate::model::QuestionAnsweringHelpfulnessResult>>,
19334    >(
19335        mut self,
19336        v: T,
19337    ) -> Self {
19338        self.evaluation_results = std::option::Option::Some(
19339            crate::model::evaluate_instances_response::EvaluationResults::QuestionAnsweringHelpfulnessResult(
19340                v.into()
19341            )
19342        );
19343        self
19344    }
19345
19346    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19347    /// if it holds a `QuestionAnsweringCorrectnessResult`, `None` if the field is not set or
19348    /// holds a different branch.
19349    pub fn question_answering_correctness_result(
19350        &self,
19351    ) -> std::option::Option<&std::boxed::Box<crate::model::QuestionAnsweringCorrectnessResult>>
19352    {
19353        #[allow(unreachable_patterns)]
19354        self.evaluation_results.as_ref().and_then(|v| match v {
19355            crate::model::evaluate_instances_response::EvaluationResults::QuestionAnsweringCorrectnessResult(v) => std::option::Option::Some(v),
19356            _ => std::option::Option::None,
19357        })
19358    }
19359
19360    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19361    /// to hold a `QuestionAnsweringCorrectnessResult`.
19362    ///
19363    /// Note that all the setters affecting `evaluation_results` are
19364    /// mutually exclusive.
19365    pub fn set_question_answering_correctness_result<
19366        T: std::convert::Into<std::boxed::Box<crate::model::QuestionAnsweringCorrectnessResult>>,
19367    >(
19368        mut self,
19369        v: T,
19370    ) -> Self {
19371        self.evaluation_results = std::option::Option::Some(
19372            crate::model::evaluate_instances_response::EvaluationResults::QuestionAnsweringCorrectnessResult(
19373                v.into()
19374            )
19375        );
19376        self
19377    }
19378
19379    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19380    /// if it holds a `PointwiseMetricResult`, `None` if the field is not set or
19381    /// holds a different branch.
19382    pub fn pointwise_metric_result(
19383        &self,
19384    ) -> std::option::Option<&std::boxed::Box<crate::model::PointwiseMetricResult>> {
19385        #[allow(unreachable_patterns)]
19386        self.evaluation_results.as_ref().and_then(|v| match v {
19387            crate::model::evaluate_instances_response::EvaluationResults::PointwiseMetricResult(
19388                v,
19389            ) => std::option::Option::Some(v),
19390            _ => std::option::Option::None,
19391        })
19392    }
19393
19394    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19395    /// to hold a `PointwiseMetricResult`.
19396    ///
19397    /// Note that all the setters affecting `evaluation_results` are
19398    /// mutually exclusive.
19399    pub fn set_pointwise_metric_result<
19400        T: std::convert::Into<std::boxed::Box<crate::model::PointwiseMetricResult>>,
19401    >(
19402        mut self,
19403        v: T,
19404    ) -> Self {
19405        self.evaluation_results = std::option::Option::Some(
19406            crate::model::evaluate_instances_response::EvaluationResults::PointwiseMetricResult(
19407                v.into(),
19408            ),
19409        );
19410        self
19411    }
19412
19413    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19414    /// if it holds a `PairwiseMetricResult`, `None` if the field is not set or
19415    /// holds a different branch.
19416    pub fn pairwise_metric_result(
19417        &self,
19418    ) -> std::option::Option<&std::boxed::Box<crate::model::PairwiseMetricResult>> {
19419        #[allow(unreachable_patterns)]
19420        self.evaluation_results.as_ref().and_then(|v| match v {
19421            crate::model::evaluate_instances_response::EvaluationResults::PairwiseMetricResult(
19422                v,
19423            ) => std::option::Option::Some(v),
19424            _ => std::option::Option::None,
19425        })
19426    }
19427
19428    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19429    /// to hold a `PairwiseMetricResult`.
19430    ///
19431    /// Note that all the setters affecting `evaluation_results` are
19432    /// mutually exclusive.
19433    pub fn set_pairwise_metric_result<
19434        T: std::convert::Into<std::boxed::Box<crate::model::PairwiseMetricResult>>,
19435    >(
19436        mut self,
19437        v: T,
19438    ) -> Self {
19439        self.evaluation_results = std::option::Option::Some(
19440            crate::model::evaluate_instances_response::EvaluationResults::PairwiseMetricResult(
19441                v.into(),
19442            ),
19443        );
19444        self
19445    }
19446
19447    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19448    /// if it holds a `ToolCallValidResults`, `None` if the field is not set or
19449    /// holds a different branch.
19450    pub fn tool_call_valid_results(
19451        &self,
19452    ) -> std::option::Option<&std::boxed::Box<crate::model::ToolCallValidResults>> {
19453        #[allow(unreachable_patterns)]
19454        self.evaluation_results.as_ref().and_then(|v| match v {
19455            crate::model::evaluate_instances_response::EvaluationResults::ToolCallValidResults(
19456                v,
19457            ) => std::option::Option::Some(v),
19458            _ => std::option::Option::None,
19459        })
19460    }
19461
19462    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19463    /// to hold a `ToolCallValidResults`.
19464    ///
19465    /// Note that all the setters affecting `evaluation_results` are
19466    /// mutually exclusive.
19467    pub fn set_tool_call_valid_results<
19468        T: std::convert::Into<std::boxed::Box<crate::model::ToolCallValidResults>>,
19469    >(
19470        mut self,
19471        v: T,
19472    ) -> Self {
19473        self.evaluation_results = std::option::Option::Some(
19474            crate::model::evaluate_instances_response::EvaluationResults::ToolCallValidResults(
19475                v.into(),
19476            ),
19477        );
19478        self
19479    }
19480
19481    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19482    /// if it holds a `ToolNameMatchResults`, `None` if the field is not set or
19483    /// holds a different branch.
19484    pub fn tool_name_match_results(
19485        &self,
19486    ) -> std::option::Option<&std::boxed::Box<crate::model::ToolNameMatchResults>> {
19487        #[allow(unreachable_patterns)]
19488        self.evaluation_results.as_ref().and_then(|v| match v {
19489            crate::model::evaluate_instances_response::EvaluationResults::ToolNameMatchResults(
19490                v,
19491            ) => std::option::Option::Some(v),
19492            _ => std::option::Option::None,
19493        })
19494    }
19495
19496    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19497    /// to hold a `ToolNameMatchResults`.
19498    ///
19499    /// Note that all the setters affecting `evaluation_results` are
19500    /// mutually exclusive.
19501    pub fn set_tool_name_match_results<
19502        T: std::convert::Into<std::boxed::Box<crate::model::ToolNameMatchResults>>,
19503    >(
19504        mut self,
19505        v: T,
19506    ) -> Self {
19507        self.evaluation_results = std::option::Option::Some(
19508            crate::model::evaluate_instances_response::EvaluationResults::ToolNameMatchResults(
19509                v.into(),
19510            ),
19511        );
19512        self
19513    }
19514
19515    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19516    /// if it holds a `ToolParameterKeyMatchResults`, `None` if the field is not set or
19517    /// holds a different branch.
19518    pub fn tool_parameter_key_match_results(
19519        &self,
19520    ) -> std::option::Option<&std::boxed::Box<crate::model::ToolParameterKeyMatchResults>> {
19521        #[allow(unreachable_patterns)]
19522        self.evaluation_results.as_ref().and_then(|v| match v {
19523            crate::model::evaluate_instances_response::EvaluationResults::ToolParameterKeyMatchResults(v) => std::option::Option::Some(v),
19524            _ => std::option::Option::None,
19525        })
19526    }
19527
19528    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19529    /// to hold a `ToolParameterKeyMatchResults`.
19530    ///
19531    /// Note that all the setters affecting `evaluation_results` are
19532    /// mutually exclusive.
19533    pub fn set_tool_parameter_key_match_results<
19534        T: std::convert::Into<std::boxed::Box<crate::model::ToolParameterKeyMatchResults>>,
19535    >(
19536        mut self,
19537        v: T,
19538    ) -> Self {
19539        self.evaluation_results = std::option::Option::Some(
19540            crate::model::evaluate_instances_response::EvaluationResults::ToolParameterKeyMatchResults(
19541                v.into()
19542            )
19543        );
19544        self
19545    }
19546
19547    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19548    /// if it holds a `ToolParameterKvMatchResults`, `None` if the field is not set or
19549    /// holds a different branch.
19550    pub fn tool_parameter_kv_match_results(
19551        &self,
19552    ) -> std::option::Option<&std::boxed::Box<crate::model::ToolParameterKVMatchResults>> {
19553        #[allow(unreachable_patterns)]
19554        self.evaluation_results.as_ref().and_then(|v| match v {
19555            crate::model::evaluate_instances_response::EvaluationResults::ToolParameterKvMatchResults(v) => std::option::Option::Some(v),
19556            _ => std::option::Option::None,
19557        })
19558    }
19559
19560    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19561    /// to hold a `ToolParameterKvMatchResults`.
19562    ///
19563    /// Note that all the setters affecting `evaluation_results` are
19564    /// mutually exclusive.
19565    pub fn set_tool_parameter_kv_match_results<
19566        T: std::convert::Into<std::boxed::Box<crate::model::ToolParameterKVMatchResults>>,
19567    >(
19568        mut self,
19569        v: T,
19570    ) -> Self {
19571        self.evaluation_results = std::option::Option::Some(
19572            crate::model::evaluate_instances_response::EvaluationResults::ToolParameterKvMatchResults(
19573                v.into()
19574            )
19575        );
19576        self
19577    }
19578
19579    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19580    /// if it holds a `CometResult`, `None` if the field is not set or
19581    /// holds a different branch.
19582    pub fn comet_result(&self) -> std::option::Option<&std::boxed::Box<crate::model::CometResult>> {
19583        #[allow(unreachable_patterns)]
19584        self.evaluation_results.as_ref().and_then(|v| match v {
19585            crate::model::evaluate_instances_response::EvaluationResults::CometResult(v) => {
19586                std::option::Option::Some(v)
19587            }
19588            _ => std::option::Option::None,
19589        })
19590    }
19591
19592    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19593    /// to hold a `CometResult`.
19594    ///
19595    /// Note that all the setters affecting `evaluation_results` are
19596    /// mutually exclusive.
19597    pub fn set_comet_result<T: std::convert::Into<std::boxed::Box<crate::model::CometResult>>>(
19598        mut self,
19599        v: T,
19600    ) -> Self {
19601        self.evaluation_results = std::option::Option::Some(
19602            crate::model::evaluate_instances_response::EvaluationResults::CometResult(v.into()),
19603        );
19604        self
19605    }
19606
19607    /// The value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19608    /// if it holds a `MetricxResult`, `None` if the field is not set or
19609    /// holds a different branch.
19610    pub fn metricx_result(
19611        &self,
19612    ) -> std::option::Option<&std::boxed::Box<crate::model::MetricxResult>> {
19613        #[allow(unreachable_patterns)]
19614        self.evaluation_results.as_ref().and_then(|v| match v {
19615            crate::model::evaluate_instances_response::EvaluationResults::MetricxResult(v) => {
19616                std::option::Option::Some(v)
19617            }
19618            _ => std::option::Option::None,
19619        })
19620    }
19621
19622    /// Sets the value of [evaluation_results][crate::model::EvaluateInstancesResponse::evaluation_results]
19623    /// to hold a `MetricxResult`.
19624    ///
19625    /// Note that all the setters affecting `evaluation_results` are
19626    /// mutually exclusive.
19627    pub fn set_metricx_result<
19628        T: std::convert::Into<std::boxed::Box<crate::model::MetricxResult>>,
19629    >(
19630        mut self,
19631        v: T,
19632    ) -> Self {
19633        self.evaluation_results = std::option::Option::Some(
19634            crate::model::evaluate_instances_response::EvaluationResults::MetricxResult(v.into()),
19635        );
19636        self
19637    }
19638}
19639
19640#[cfg(feature = "evaluation-service")]
19641impl wkt::message::Message for EvaluateInstancesResponse {
19642    fn typename() -> &'static str {
19643        "type.googleapis.com/google.cloud.aiplatform.v1.EvaluateInstancesResponse"
19644    }
19645}
19646
19647/// Defines additional types related to [EvaluateInstancesResponse].
19648#[cfg(feature = "evaluation-service")]
19649pub mod evaluate_instances_response {
19650    #[allow(unused_imports)]
19651    use super::*;
19652
19653    /// Evaluation results will be served in the same order as presented in
19654    /// EvaluationRequest.instances.
19655    #[cfg(feature = "evaluation-service")]
19656    #[derive(Clone, Debug, PartialEq)]
19657    #[non_exhaustive]
19658    pub enum EvaluationResults {
19659        /// Auto metric evaluation results.
19660        /// Results for exact match metric.
19661        ExactMatchResults(std::boxed::Box<crate::model::ExactMatchResults>),
19662        /// Results for bleu metric.
19663        BleuResults(std::boxed::Box<crate::model::BleuResults>),
19664        /// Results for rouge metric.
19665        RougeResults(std::boxed::Box<crate::model::RougeResults>),
19666        /// LLM-based metric evaluation result.
19667        /// General text generation metrics, applicable to other categories.
19668        /// Result for fluency metric.
19669        FluencyResult(std::boxed::Box<crate::model::FluencyResult>),
19670        /// Result for coherence metric.
19671        CoherenceResult(std::boxed::Box<crate::model::CoherenceResult>),
19672        /// Result for safety metric.
19673        SafetyResult(std::boxed::Box<crate::model::SafetyResult>),
19674        /// Result for groundedness metric.
19675        GroundednessResult(std::boxed::Box<crate::model::GroundednessResult>),
19676        /// Result for fulfillment metric.
19677        FulfillmentResult(std::boxed::Box<crate::model::FulfillmentResult>),
19678        /// Summarization only metrics.
19679        /// Result for summarization quality metric.
19680        SummarizationQualityResult(std::boxed::Box<crate::model::SummarizationQualityResult>),
19681        /// Result for pairwise summarization quality metric.
19682        PairwiseSummarizationQualityResult(
19683            std::boxed::Box<crate::model::PairwiseSummarizationQualityResult>,
19684        ),
19685        /// Result for summarization helpfulness metric.
19686        SummarizationHelpfulnessResult(
19687            std::boxed::Box<crate::model::SummarizationHelpfulnessResult>,
19688        ),
19689        /// Result for summarization verbosity metric.
19690        SummarizationVerbosityResult(std::boxed::Box<crate::model::SummarizationVerbosityResult>),
19691        /// Question answering only metrics.
19692        /// Result for question answering quality metric.
19693        QuestionAnsweringQualityResult(
19694            std::boxed::Box<crate::model::QuestionAnsweringQualityResult>,
19695        ),
19696        /// Result for pairwise question answering quality metric.
19697        PairwiseQuestionAnsweringQualityResult(
19698            std::boxed::Box<crate::model::PairwiseQuestionAnsweringQualityResult>,
19699        ),
19700        /// Result for question answering relevance metric.
19701        QuestionAnsweringRelevanceResult(
19702            std::boxed::Box<crate::model::QuestionAnsweringRelevanceResult>,
19703        ),
19704        /// Result for question answering helpfulness metric.
19705        QuestionAnsweringHelpfulnessResult(
19706            std::boxed::Box<crate::model::QuestionAnsweringHelpfulnessResult>,
19707        ),
19708        /// Result for question answering correctness metric.
19709        QuestionAnsweringCorrectnessResult(
19710            std::boxed::Box<crate::model::QuestionAnsweringCorrectnessResult>,
19711        ),
19712        /// Generic metrics.
19713        /// Result for pointwise metric.
19714        PointwiseMetricResult(std::boxed::Box<crate::model::PointwiseMetricResult>),
19715        /// Result for pairwise metric.
19716        PairwiseMetricResult(std::boxed::Box<crate::model::PairwiseMetricResult>),
19717        /// Tool call metrics.
19718        /// Results for tool call valid metric.
19719        ToolCallValidResults(std::boxed::Box<crate::model::ToolCallValidResults>),
19720        /// Results for tool name match metric.
19721        ToolNameMatchResults(std::boxed::Box<crate::model::ToolNameMatchResults>),
19722        /// Results for tool parameter key match  metric.
19723        ToolParameterKeyMatchResults(std::boxed::Box<crate::model::ToolParameterKeyMatchResults>),
19724        /// Results for tool parameter key value match metric.
19725        ToolParameterKvMatchResults(std::boxed::Box<crate::model::ToolParameterKVMatchResults>),
19726        /// Translation metrics.
19727        /// Result for Comet metric.
19728        CometResult(std::boxed::Box<crate::model::CometResult>),
19729        /// Result for Metricx metric.
19730        MetricxResult(std::boxed::Box<crate::model::MetricxResult>),
19731    }
19732}
19733
19734/// Input for exact match metric.
19735#[cfg(feature = "evaluation-service")]
19736#[derive(Clone, Default, PartialEq)]
19737#[non_exhaustive]
19738pub struct ExactMatchInput {
19739    /// Required. Spec for exact match metric.
19740    pub metric_spec: std::option::Option<crate::model::ExactMatchSpec>,
19741
19742    /// Required. Repeated exact match instances.
19743    pub instances: std::vec::Vec<crate::model::ExactMatchInstance>,
19744
19745    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19746}
19747
19748#[cfg(feature = "evaluation-service")]
19749impl ExactMatchInput {
19750    pub fn new() -> Self {
19751        std::default::Default::default()
19752    }
19753
19754    /// Sets the value of [metric_spec][crate::model::ExactMatchInput::metric_spec].
19755    pub fn set_metric_spec<T>(mut self, v: T) -> Self
19756    where
19757        T: std::convert::Into<crate::model::ExactMatchSpec>,
19758    {
19759        self.metric_spec = std::option::Option::Some(v.into());
19760        self
19761    }
19762
19763    /// Sets or clears the value of [metric_spec][crate::model::ExactMatchInput::metric_spec].
19764    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
19765    where
19766        T: std::convert::Into<crate::model::ExactMatchSpec>,
19767    {
19768        self.metric_spec = v.map(|x| x.into());
19769        self
19770    }
19771
19772    /// Sets the value of [instances][crate::model::ExactMatchInput::instances].
19773    pub fn set_instances<T, V>(mut self, v: T) -> Self
19774    where
19775        T: std::iter::IntoIterator<Item = V>,
19776        V: std::convert::Into<crate::model::ExactMatchInstance>,
19777    {
19778        use std::iter::Iterator;
19779        self.instances = v.into_iter().map(|i| i.into()).collect();
19780        self
19781    }
19782}
19783
19784#[cfg(feature = "evaluation-service")]
19785impl wkt::message::Message for ExactMatchInput {
19786    fn typename() -> &'static str {
19787        "type.googleapis.com/google.cloud.aiplatform.v1.ExactMatchInput"
19788    }
19789}
19790
19791/// Spec for exact match instance.
19792#[cfg(feature = "evaluation-service")]
19793#[derive(Clone, Default, PartialEq)]
19794#[non_exhaustive]
19795pub struct ExactMatchInstance {
19796    /// Required. Output of the evaluated model.
19797    pub prediction: std::option::Option<std::string::String>,
19798
19799    /// Required. Ground truth used to compare against the prediction.
19800    pub reference: std::option::Option<std::string::String>,
19801
19802    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19803}
19804
19805#[cfg(feature = "evaluation-service")]
19806impl ExactMatchInstance {
19807    pub fn new() -> Self {
19808        std::default::Default::default()
19809    }
19810
19811    /// Sets the value of [prediction][crate::model::ExactMatchInstance::prediction].
19812    pub fn set_prediction<T>(mut self, v: T) -> Self
19813    where
19814        T: std::convert::Into<std::string::String>,
19815    {
19816        self.prediction = std::option::Option::Some(v.into());
19817        self
19818    }
19819
19820    /// Sets or clears the value of [prediction][crate::model::ExactMatchInstance::prediction].
19821    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
19822    where
19823        T: std::convert::Into<std::string::String>,
19824    {
19825        self.prediction = v.map(|x| x.into());
19826        self
19827    }
19828
19829    /// Sets the value of [reference][crate::model::ExactMatchInstance::reference].
19830    pub fn set_reference<T>(mut self, v: T) -> Self
19831    where
19832        T: std::convert::Into<std::string::String>,
19833    {
19834        self.reference = std::option::Option::Some(v.into());
19835        self
19836    }
19837
19838    /// Sets or clears the value of [reference][crate::model::ExactMatchInstance::reference].
19839    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
19840    where
19841        T: std::convert::Into<std::string::String>,
19842    {
19843        self.reference = v.map(|x| x.into());
19844        self
19845    }
19846}
19847
19848#[cfg(feature = "evaluation-service")]
19849impl wkt::message::Message for ExactMatchInstance {
19850    fn typename() -> &'static str {
19851        "type.googleapis.com/google.cloud.aiplatform.v1.ExactMatchInstance"
19852    }
19853}
19854
19855/// Spec for exact match metric - returns 1 if prediction and reference exactly
19856/// matches, otherwise 0.
19857#[cfg(feature = "evaluation-service")]
19858#[derive(Clone, Default, PartialEq)]
19859#[non_exhaustive]
19860pub struct ExactMatchSpec {
19861    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19862}
19863
19864#[cfg(feature = "evaluation-service")]
19865impl ExactMatchSpec {
19866    pub fn new() -> Self {
19867        std::default::Default::default()
19868    }
19869}
19870
19871#[cfg(feature = "evaluation-service")]
19872impl wkt::message::Message for ExactMatchSpec {
19873    fn typename() -> &'static str {
19874        "type.googleapis.com/google.cloud.aiplatform.v1.ExactMatchSpec"
19875    }
19876}
19877
19878/// Results for exact match metric.
19879#[cfg(feature = "evaluation-service")]
19880#[derive(Clone, Default, PartialEq)]
19881#[non_exhaustive]
19882pub struct ExactMatchResults {
19883    /// Output only. Exact match metric values.
19884    pub exact_match_metric_values: std::vec::Vec<crate::model::ExactMatchMetricValue>,
19885
19886    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19887}
19888
19889#[cfg(feature = "evaluation-service")]
19890impl ExactMatchResults {
19891    pub fn new() -> Self {
19892        std::default::Default::default()
19893    }
19894
19895    /// Sets the value of [exact_match_metric_values][crate::model::ExactMatchResults::exact_match_metric_values].
19896    pub fn set_exact_match_metric_values<T, V>(mut self, v: T) -> Self
19897    where
19898        T: std::iter::IntoIterator<Item = V>,
19899        V: std::convert::Into<crate::model::ExactMatchMetricValue>,
19900    {
19901        use std::iter::Iterator;
19902        self.exact_match_metric_values = v.into_iter().map(|i| i.into()).collect();
19903        self
19904    }
19905}
19906
19907#[cfg(feature = "evaluation-service")]
19908impl wkt::message::Message for ExactMatchResults {
19909    fn typename() -> &'static str {
19910        "type.googleapis.com/google.cloud.aiplatform.v1.ExactMatchResults"
19911    }
19912}
19913
19914/// Exact match metric value for an instance.
19915#[cfg(feature = "evaluation-service")]
19916#[derive(Clone, Default, PartialEq)]
19917#[non_exhaustive]
19918pub struct ExactMatchMetricValue {
19919    /// Output only. Exact match score.
19920    pub score: std::option::Option<f32>,
19921
19922    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19923}
19924
19925#[cfg(feature = "evaluation-service")]
19926impl ExactMatchMetricValue {
19927    pub fn new() -> Self {
19928        std::default::Default::default()
19929    }
19930
19931    /// Sets the value of [score][crate::model::ExactMatchMetricValue::score].
19932    pub fn set_score<T>(mut self, v: T) -> Self
19933    where
19934        T: std::convert::Into<f32>,
19935    {
19936        self.score = std::option::Option::Some(v.into());
19937        self
19938    }
19939
19940    /// Sets or clears the value of [score][crate::model::ExactMatchMetricValue::score].
19941    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
19942    where
19943        T: std::convert::Into<f32>,
19944    {
19945        self.score = v.map(|x| x.into());
19946        self
19947    }
19948}
19949
19950#[cfg(feature = "evaluation-service")]
19951impl wkt::message::Message for ExactMatchMetricValue {
19952    fn typename() -> &'static str {
19953        "type.googleapis.com/google.cloud.aiplatform.v1.ExactMatchMetricValue"
19954    }
19955}
19956
19957/// Input for bleu metric.
19958#[cfg(feature = "evaluation-service")]
19959#[derive(Clone, Default, PartialEq)]
19960#[non_exhaustive]
19961pub struct BleuInput {
19962    /// Required. Spec for bleu score metric.
19963    pub metric_spec: std::option::Option<crate::model::BleuSpec>,
19964
19965    /// Required. Repeated bleu instances.
19966    pub instances: std::vec::Vec<crate::model::BleuInstance>,
19967
19968    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19969}
19970
19971#[cfg(feature = "evaluation-service")]
19972impl BleuInput {
19973    pub fn new() -> Self {
19974        std::default::Default::default()
19975    }
19976
19977    /// Sets the value of [metric_spec][crate::model::BleuInput::metric_spec].
19978    pub fn set_metric_spec<T>(mut self, v: T) -> Self
19979    where
19980        T: std::convert::Into<crate::model::BleuSpec>,
19981    {
19982        self.metric_spec = std::option::Option::Some(v.into());
19983        self
19984    }
19985
19986    /// Sets or clears the value of [metric_spec][crate::model::BleuInput::metric_spec].
19987    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
19988    where
19989        T: std::convert::Into<crate::model::BleuSpec>,
19990    {
19991        self.metric_spec = v.map(|x| x.into());
19992        self
19993    }
19994
19995    /// Sets the value of [instances][crate::model::BleuInput::instances].
19996    pub fn set_instances<T, V>(mut self, v: T) -> Self
19997    where
19998        T: std::iter::IntoIterator<Item = V>,
19999        V: std::convert::Into<crate::model::BleuInstance>,
20000    {
20001        use std::iter::Iterator;
20002        self.instances = v.into_iter().map(|i| i.into()).collect();
20003        self
20004    }
20005}
20006
20007#[cfg(feature = "evaluation-service")]
20008impl wkt::message::Message for BleuInput {
20009    fn typename() -> &'static str {
20010        "type.googleapis.com/google.cloud.aiplatform.v1.BleuInput"
20011    }
20012}
20013
20014/// Spec for bleu instance.
20015#[cfg(feature = "evaluation-service")]
20016#[derive(Clone, Default, PartialEq)]
20017#[non_exhaustive]
20018pub struct BleuInstance {
20019    /// Required. Output of the evaluated model.
20020    pub prediction: std::option::Option<std::string::String>,
20021
20022    /// Required. Ground truth used to compare against the prediction.
20023    pub reference: std::option::Option<std::string::String>,
20024
20025    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20026}
20027
20028#[cfg(feature = "evaluation-service")]
20029impl BleuInstance {
20030    pub fn new() -> Self {
20031        std::default::Default::default()
20032    }
20033
20034    /// Sets the value of [prediction][crate::model::BleuInstance::prediction].
20035    pub fn set_prediction<T>(mut self, v: T) -> Self
20036    where
20037        T: std::convert::Into<std::string::String>,
20038    {
20039        self.prediction = std::option::Option::Some(v.into());
20040        self
20041    }
20042
20043    /// Sets or clears the value of [prediction][crate::model::BleuInstance::prediction].
20044    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
20045    where
20046        T: std::convert::Into<std::string::String>,
20047    {
20048        self.prediction = v.map(|x| x.into());
20049        self
20050    }
20051
20052    /// Sets the value of [reference][crate::model::BleuInstance::reference].
20053    pub fn set_reference<T>(mut self, v: T) -> Self
20054    where
20055        T: std::convert::Into<std::string::String>,
20056    {
20057        self.reference = std::option::Option::Some(v.into());
20058        self
20059    }
20060
20061    /// Sets or clears the value of [reference][crate::model::BleuInstance::reference].
20062    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
20063    where
20064        T: std::convert::Into<std::string::String>,
20065    {
20066        self.reference = v.map(|x| x.into());
20067        self
20068    }
20069}
20070
20071#[cfg(feature = "evaluation-service")]
20072impl wkt::message::Message for BleuInstance {
20073    fn typename() -> &'static str {
20074        "type.googleapis.com/google.cloud.aiplatform.v1.BleuInstance"
20075    }
20076}
20077
20078/// Spec for bleu score metric - calculates the precision of n-grams in the
20079/// prediction as compared to reference - returns a score ranging between 0 to 1.
20080#[cfg(feature = "evaluation-service")]
20081#[derive(Clone, Default, PartialEq)]
20082#[non_exhaustive]
20083pub struct BleuSpec {
20084    /// Optional. Whether to use_effective_order to compute bleu score.
20085    pub use_effective_order: bool,
20086
20087    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20088}
20089
20090#[cfg(feature = "evaluation-service")]
20091impl BleuSpec {
20092    pub fn new() -> Self {
20093        std::default::Default::default()
20094    }
20095
20096    /// Sets the value of [use_effective_order][crate::model::BleuSpec::use_effective_order].
20097    pub fn set_use_effective_order<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20098        self.use_effective_order = v.into();
20099        self
20100    }
20101}
20102
20103#[cfg(feature = "evaluation-service")]
20104impl wkt::message::Message for BleuSpec {
20105    fn typename() -> &'static str {
20106        "type.googleapis.com/google.cloud.aiplatform.v1.BleuSpec"
20107    }
20108}
20109
20110/// Results for bleu metric.
20111#[cfg(feature = "evaluation-service")]
20112#[derive(Clone, Default, PartialEq)]
20113#[non_exhaustive]
20114pub struct BleuResults {
20115    /// Output only. Bleu metric values.
20116    pub bleu_metric_values: std::vec::Vec<crate::model::BleuMetricValue>,
20117
20118    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20119}
20120
20121#[cfg(feature = "evaluation-service")]
20122impl BleuResults {
20123    pub fn new() -> Self {
20124        std::default::Default::default()
20125    }
20126
20127    /// Sets the value of [bleu_metric_values][crate::model::BleuResults::bleu_metric_values].
20128    pub fn set_bleu_metric_values<T, V>(mut self, v: T) -> Self
20129    where
20130        T: std::iter::IntoIterator<Item = V>,
20131        V: std::convert::Into<crate::model::BleuMetricValue>,
20132    {
20133        use std::iter::Iterator;
20134        self.bleu_metric_values = v.into_iter().map(|i| i.into()).collect();
20135        self
20136    }
20137}
20138
20139#[cfg(feature = "evaluation-service")]
20140impl wkt::message::Message for BleuResults {
20141    fn typename() -> &'static str {
20142        "type.googleapis.com/google.cloud.aiplatform.v1.BleuResults"
20143    }
20144}
20145
20146/// Bleu metric value for an instance.
20147#[cfg(feature = "evaluation-service")]
20148#[derive(Clone, Default, PartialEq)]
20149#[non_exhaustive]
20150pub struct BleuMetricValue {
20151    /// Output only. Bleu score.
20152    pub score: std::option::Option<f32>,
20153
20154    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20155}
20156
20157#[cfg(feature = "evaluation-service")]
20158impl BleuMetricValue {
20159    pub fn new() -> Self {
20160        std::default::Default::default()
20161    }
20162
20163    /// Sets the value of [score][crate::model::BleuMetricValue::score].
20164    pub fn set_score<T>(mut self, v: T) -> Self
20165    where
20166        T: std::convert::Into<f32>,
20167    {
20168        self.score = std::option::Option::Some(v.into());
20169        self
20170    }
20171
20172    /// Sets or clears the value of [score][crate::model::BleuMetricValue::score].
20173    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
20174    where
20175        T: std::convert::Into<f32>,
20176    {
20177        self.score = v.map(|x| x.into());
20178        self
20179    }
20180}
20181
20182#[cfg(feature = "evaluation-service")]
20183impl wkt::message::Message for BleuMetricValue {
20184    fn typename() -> &'static str {
20185        "type.googleapis.com/google.cloud.aiplatform.v1.BleuMetricValue"
20186    }
20187}
20188
20189/// Input for rouge metric.
20190#[cfg(feature = "evaluation-service")]
20191#[derive(Clone, Default, PartialEq)]
20192#[non_exhaustive]
20193pub struct RougeInput {
20194    /// Required. Spec for rouge score metric.
20195    pub metric_spec: std::option::Option<crate::model::RougeSpec>,
20196
20197    /// Required. Repeated rouge instances.
20198    pub instances: std::vec::Vec<crate::model::RougeInstance>,
20199
20200    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20201}
20202
20203#[cfg(feature = "evaluation-service")]
20204impl RougeInput {
20205    pub fn new() -> Self {
20206        std::default::Default::default()
20207    }
20208
20209    /// Sets the value of [metric_spec][crate::model::RougeInput::metric_spec].
20210    pub fn set_metric_spec<T>(mut self, v: T) -> Self
20211    where
20212        T: std::convert::Into<crate::model::RougeSpec>,
20213    {
20214        self.metric_spec = std::option::Option::Some(v.into());
20215        self
20216    }
20217
20218    /// Sets or clears the value of [metric_spec][crate::model::RougeInput::metric_spec].
20219    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
20220    where
20221        T: std::convert::Into<crate::model::RougeSpec>,
20222    {
20223        self.metric_spec = v.map(|x| x.into());
20224        self
20225    }
20226
20227    /// Sets the value of [instances][crate::model::RougeInput::instances].
20228    pub fn set_instances<T, V>(mut self, v: T) -> Self
20229    where
20230        T: std::iter::IntoIterator<Item = V>,
20231        V: std::convert::Into<crate::model::RougeInstance>,
20232    {
20233        use std::iter::Iterator;
20234        self.instances = v.into_iter().map(|i| i.into()).collect();
20235        self
20236    }
20237}
20238
20239#[cfg(feature = "evaluation-service")]
20240impl wkt::message::Message for RougeInput {
20241    fn typename() -> &'static str {
20242        "type.googleapis.com/google.cloud.aiplatform.v1.RougeInput"
20243    }
20244}
20245
20246/// Spec for rouge instance.
20247#[cfg(feature = "evaluation-service")]
20248#[derive(Clone, Default, PartialEq)]
20249#[non_exhaustive]
20250pub struct RougeInstance {
20251    /// Required. Output of the evaluated model.
20252    pub prediction: std::option::Option<std::string::String>,
20253
20254    /// Required. Ground truth used to compare against the prediction.
20255    pub reference: std::option::Option<std::string::String>,
20256
20257    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20258}
20259
20260#[cfg(feature = "evaluation-service")]
20261impl RougeInstance {
20262    pub fn new() -> Self {
20263        std::default::Default::default()
20264    }
20265
20266    /// Sets the value of [prediction][crate::model::RougeInstance::prediction].
20267    pub fn set_prediction<T>(mut self, v: T) -> Self
20268    where
20269        T: std::convert::Into<std::string::String>,
20270    {
20271        self.prediction = std::option::Option::Some(v.into());
20272        self
20273    }
20274
20275    /// Sets or clears the value of [prediction][crate::model::RougeInstance::prediction].
20276    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
20277    where
20278        T: std::convert::Into<std::string::String>,
20279    {
20280        self.prediction = v.map(|x| x.into());
20281        self
20282    }
20283
20284    /// Sets the value of [reference][crate::model::RougeInstance::reference].
20285    pub fn set_reference<T>(mut self, v: T) -> Self
20286    where
20287        T: std::convert::Into<std::string::String>,
20288    {
20289        self.reference = std::option::Option::Some(v.into());
20290        self
20291    }
20292
20293    /// Sets or clears the value of [reference][crate::model::RougeInstance::reference].
20294    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
20295    where
20296        T: std::convert::Into<std::string::String>,
20297    {
20298        self.reference = v.map(|x| x.into());
20299        self
20300    }
20301}
20302
20303#[cfg(feature = "evaluation-service")]
20304impl wkt::message::Message for RougeInstance {
20305    fn typename() -> &'static str {
20306        "type.googleapis.com/google.cloud.aiplatform.v1.RougeInstance"
20307    }
20308}
20309
20310/// Spec for rouge score metric - calculates the recall of n-grams in prediction
20311/// as compared to reference - returns a score ranging between 0 and 1.
20312#[cfg(feature = "evaluation-service")]
20313#[derive(Clone, Default, PartialEq)]
20314#[non_exhaustive]
20315pub struct RougeSpec {
20316    /// Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum.
20317    pub rouge_type: std::string::String,
20318
20319    /// Optional. Whether to use stemmer to compute rouge score.
20320    pub use_stemmer: bool,
20321
20322    /// Optional. Whether to split summaries while using rougeLsum.
20323    pub split_summaries: bool,
20324
20325    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20326}
20327
20328#[cfg(feature = "evaluation-service")]
20329impl RougeSpec {
20330    pub fn new() -> Self {
20331        std::default::Default::default()
20332    }
20333
20334    /// Sets the value of [rouge_type][crate::model::RougeSpec::rouge_type].
20335    pub fn set_rouge_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20336        self.rouge_type = v.into();
20337        self
20338    }
20339
20340    /// Sets the value of [use_stemmer][crate::model::RougeSpec::use_stemmer].
20341    pub fn set_use_stemmer<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20342        self.use_stemmer = v.into();
20343        self
20344    }
20345
20346    /// Sets the value of [split_summaries][crate::model::RougeSpec::split_summaries].
20347    pub fn set_split_summaries<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20348        self.split_summaries = v.into();
20349        self
20350    }
20351}
20352
20353#[cfg(feature = "evaluation-service")]
20354impl wkt::message::Message for RougeSpec {
20355    fn typename() -> &'static str {
20356        "type.googleapis.com/google.cloud.aiplatform.v1.RougeSpec"
20357    }
20358}
20359
20360/// Results for rouge metric.
20361#[cfg(feature = "evaluation-service")]
20362#[derive(Clone, Default, PartialEq)]
20363#[non_exhaustive]
20364pub struct RougeResults {
20365    /// Output only. Rouge metric values.
20366    pub rouge_metric_values: std::vec::Vec<crate::model::RougeMetricValue>,
20367
20368    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20369}
20370
20371#[cfg(feature = "evaluation-service")]
20372impl RougeResults {
20373    pub fn new() -> Self {
20374        std::default::Default::default()
20375    }
20376
20377    /// Sets the value of [rouge_metric_values][crate::model::RougeResults::rouge_metric_values].
20378    pub fn set_rouge_metric_values<T, V>(mut self, v: T) -> Self
20379    where
20380        T: std::iter::IntoIterator<Item = V>,
20381        V: std::convert::Into<crate::model::RougeMetricValue>,
20382    {
20383        use std::iter::Iterator;
20384        self.rouge_metric_values = v.into_iter().map(|i| i.into()).collect();
20385        self
20386    }
20387}
20388
20389#[cfg(feature = "evaluation-service")]
20390impl wkt::message::Message for RougeResults {
20391    fn typename() -> &'static str {
20392        "type.googleapis.com/google.cloud.aiplatform.v1.RougeResults"
20393    }
20394}
20395
20396/// Rouge metric value for an instance.
20397#[cfg(feature = "evaluation-service")]
20398#[derive(Clone, Default, PartialEq)]
20399#[non_exhaustive]
20400pub struct RougeMetricValue {
20401    /// Output only. Rouge score.
20402    pub score: std::option::Option<f32>,
20403
20404    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20405}
20406
20407#[cfg(feature = "evaluation-service")]
20408impl RougeMetricValue {
20409    pub fn new() -> Self {
20410        std::default::Default::default()
20411    }
20412
20413    /// Sets the value of [score][crate::model::RougeMetricValue::score].
20414    pub fn set_score<T>(mut self, v: T) -> Self
20415    where
20416        T: std::convert::Into<f32>,
20417    {
20418        self.score = std::option::Option::Some(v.into());
20419        self
20420    }
20421
20422    /// Sets or clears the value of [score][crate::model::RougeMetricValue::score].
20423    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
20424    where
20425        T: std::convert::Into<f32>,
20426    {
20427        self.score = v.map(|x| x.into());
20428        self
20429    }
20430}
20431
20432#[cfg(feature = "evaluation-service")]
20433impl wkt::message::Message for RougeMetricValue {
20434    fn typename() -> &'static str {
20435        "type.googleapis.com/google.cloud.aiplatform.v1.RougeMetricValue"
20436    }
20437}
20438
20439/// Input for coherence metric.
20440#[cfg(feature = "evaluation-service")]
20441#[derive(Clone, Default, PartialEq)]
20442#[non_exhaustive]
20443pub struct CoherenceInput {
20444    /// Required. Spec for coherence score metric.
20445    pub metric_spec: std::option::Option<crate::model::CoherenceSpec>,
20446
20447    /// Required. Coherence instance.
20448    pub instance: std::option::Option<crate::model::CoherenceInstance>,
20449
20450    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20451}
20452
20453#[cfg(feature = "evaluation-service")]
20454impl CoherenceInput {
20455    pub fn new() -> Self {
20456        std::default::Default::default()
20457    }
20458
20459    /// Sets the value of [metric_spec][crate::model::CoherenceInput::metric_spec].
20460    pub fn set_metric_spec<T>(mut self, v: T) -> Self
20461    where
20462        T: std::convert::Into<crate::model::CoherenceSpec>,
20463    {
20464        self.metric_spec = std::option::Option::Some(v.into());
20465        self
20466    }
20467
20468    /// Sets or clears the value of [metric_spec][crate::model::CoherenceInput::metric_spec].
20469    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
20470    where
20471        T: std::convert::Into<crate::model::CoherenceSpec>,
20472    {
20473        self.metric_spec = v.map(|x| x.into());
20474        self
20475    }
20476
20477    /// Sets the value of [instance][crate::model::CoherenceInput::instance].
20478    pub fn set_instance<T>(mut self, v: T) -> Self
20479    where
20480        T: std::convert::Into<crate::model::CoherenceInstance>,
20481    {
20482        self.instance = std::option::Option::Some(v.into());
20483        self
20484    }
20485
20486    /// Sets or clears the value of [instance][crate::model::CoherenceInput::instance].
20487    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
20488    where
20489        T: std::convert::Into<crate::model::CoherenceInstance>,
20490    {
20491        self.instance = v.map(|x| x.into());
20492        self
20493    }
20494}
20495
20496#[cfg(feature = "evaluation-service")]
20497impl wkt::message::Message for CoherenceInput {
20498    fn typename() -> &'static str {
20499        "type.googleapis.com/google.cloud.aiplatform.v1.CoherenceInput"
20500    }
20501}
20502
20503/// Spec for coherence instance.
20504#[cfg(feature = "evaluation-service")]
20505#[derive(Clone, Default, PartialEq)]
20506#[non_exhaustive]
20507pub struct CoherenceInstance {
20508    /// Required. Output of the evaluated model.
20509    pub prediction: std::option::Option<std::string::String>,
20510
20511    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20512}
20513
20514#[cfg(feature = "evaluation-service")]
20515impl CoherenceInstance {
20516    pub fn new() -> Self {
20517        std::default::Default::default()
20518    }
20519
20520    /// Sets the value of [prediction][crate::model::CoherenceInstance::prediction].
20521    pub fn set_prediction<T>(mut self, v: T) -> Self
20522    where
20523        T: std::convert::Into<std::string::String>,
20524    {
20525        self.prediction = std::option::Option::Some(v.into());
20526        self
20527    }
20528
20529    /// Sets or clears the value of [prediction][crate::model::CoherenceInstance::prediction].
20530    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
20531    where
20532        T: std::convert::Into<std::string::String>,
20533    {
20534        self.prediction = v.map(|x| x.into());
20535        self
20536    }
20537}
20538
20539#[cfg(feature = "evaluation-service")]
20540impl wkt::message::Message for CoherenceInstance {
20541    fn typename() -> &'static str {
20542        "type.googleapis.com/google.cloud.aiplatform.v1.CoherenceInstance"
20543    }
20544}
20545
20546/// Spec for coherence score metric.
20547#[cfg(feature = "evaluation-service")]
20548#[derive(Clone, Default, PartialEq)]
20549#[non_exhaustive]
20550pub struct CoherenceSpec {
20551    /// Optional. Which version to use for evaluation.
20552    pub version: i32,
20553
20554    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20555}
20556
20557#[cfg(feature = "evaluation-service")]
20558impl CoherenceSpec {
20559    pub fn new() -> Self {
20560        std::default::Default::default()
20561    }
20562
20563    /// Sets the value of [version][crate::model::CoherenceSpec::version].
20564    pub fn set_version<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20565        self.version = v.into();
20566        self
20567    }
20568}
20569
20570#[cfg(feature = "evaluation-service")]
20571impl wkt::message::Message for CoherenceSpec {
20572    fn typename() -> &'static str {
20573        "type.googleapis.com/google.cloud.aiplatform.v1.CoherenceSpec"
20574    }
20575}
20576
20577/// Spec for coherence result.
20578#[cfg(feature = "evaluation-service")]
20579#[derive(Clone, Default, PartialEq)]
20580#[non_exhaustive]
20581pub struct CoherenceResult {
20582    /// Output only. Coherence score.
20583    pub score: std::option::Option<f32>,
20584
20585    /// Output only. Explanation for coherence score.
20586    pub explanation: std::string::String,
20587
20588    /// Output only. Confidence for coherence score.
20589    pub confidence: std::option::Option<f32>,
20590
20591    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20592}
20593
20594#[cfg(feature = "evaluation-service")]
20595impl CoherenceResult {
20596    pub fn new() -> Self {
20597        std::default::Default::default()
20598    }
20599
20600    /// Sets the value of [score][crate::model::CoherenceResult::score].
20601    pub fn set_score<T>(mut self, v: T) -> Self
20602    where
20603        T: std::convert::Into<f32>,
20604    {
20605        self.score = std::option::Option::Some(v.into());
20606        self
20607    }
20608
20609    /// Sets or clears the value of [score][crate::model::CoherenceResult::score].
20610    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
20611    where
20612        T: std::convert::Into<f32>,
20613    {
20614        self.score = v.map(|x| x.into());
20615        self
20616    }
20617
20618    /// Sets the value of [explanation][crate::model::CoherenceResult::explanation].
20619    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20620        self.explanation = v.into();
20621        self
20622    }
20623
20624    /// Sets the value of [confidence][crate::model::CoherenceResult::confidence].
20625    pub fn set_confidence<T>(mut self, v: T) -> Self
20626    where
20627        T: std::convert::Into<f32>,
20628    {
20629        self.confidence = std::option::Option::Some(v.into());
20630        self
20631    }
20632
20633    /// Sets or clears the value of [confidence][crate::model::CoherenceResult::confidence].
20634    pub fn set_or_clear_confidence<T>(mut self, v: std::option::Option<T>) -> Self
20635    where
20636        T: std::convert::Into<f32>,
20637    {
20638        self.confidence = v.map(|x| x.into());
20639        self
20640    }
20641}
20642
20643#[cfg(feature = "evaluation-service")]
20644impl wkt::message::Message for CoherenceResult {
20645    fn typename() -> &'static str {
20646        "type.googleapis.com/google.cloud.aiplatform.v1.CoherenceResult"
20647    }
20648}
20649
20650/// Input for fluency metric.
20651#[cfg(feature = "evaluation-service")]
20652#[derive(Clone, Default, PartialEq)]
20653#[non_exhaustive]
20654pub struct FluencyInput {
20655    /// Required. Spec for fluency score metric.
20656    pub metric_spec: std::option::Option<crate::model::FluencySpec>,
20657
20658    /// Required. Fluency instance.
20659    pub instance: std::option::Option<crate::model::FluencyInstance>,
20660
20661    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20662}
20663
20664#[cfg(feature = "evaluation-service")]
20665impl FluencyInput {
20666    pub fn new() -> Self {
20667        std::default::Default::default()
20668    }
20669
20670    /// Sets the value of [metric_spec][crate::model::FluencyInput::metric_spec].
20671    pub fn set_metric_spec<T>(mut self, v: T) -> Self
20672    where
20673        T: std::convert::Into<crate::model::FluencySpec>,
20674    {
20675        self.metric_spec = std::option::Option::Some(v.into());
20676        self
20677    }
20678
20679    /// Sets or clears the value of [metric_spec][crate::model::FluencyInput::metric_spec].
20680    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
20681    where
20682        T: std::convert::Into<crate::model::FluencySpec>,
20683    {
20684        self.metric_spec = v.map(|x| x.into());
20685        self
20686    }
20687
20688    /// Sets the value of [instance][crate::model::FluencyInput::instance].
20689    pub fn set_instance<T>(mut self, v: T) -> Self
20690    where
20691        T: std::convert::Into<crate::model::FluencyInstance>,
20692    {
20693        self.instance = std::option::Option::Some(v.into());
20694        self
20695    }
20696
20697    /// Sets or clears the value of [instance][crate::model::FluencyInput::instance].
20698    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
20699    where
20700        T: std::convert::Into<crate::model::FluencyInstance>,
20701    {
20702        self.instance = v.map(|x| x.into());
20703        self
20704    }
20705}
20706
20707#[cfg(feature = "evaluation-service")]
20708impl wkt::message::Message for FluencyInput {
20709    fn typename() -> &'static str {
20710        "type.googleapis.com/google.cloud.aiplatform.v1.FluencyInput"
20711    }
20712}
20713
20714/// Spec for fluency instance.
20715#[cfg(feature = "evaluation-service")]
20716#[derive(Clone, Default, PartialEq)]
20717#[non_exhaustive]
20718pub struct FluencyInstance {
20719    /// Required. Output of the evaluated model.
20720    pub prediction: std::option::Option<std::string::String>,
20721
20722    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20723}
20724
20725#[cfg(feature = "evaluation-service")]
20726impl FluencyInstance {
20727    pub fn new() -> Self {
20728        std::default::Default::default()
20729    }
20730
20731    /// Sets the value of [prediction][crate::model::FluencyInstance::prediction].
20732    pub fn set_prediction<T>(mut self, v: T) -> Self
20733    where
20734        T: std::convert::Into<std::string::String>,
20735    {
20736        self.prediction = std::option::Option::Some(v.into());
20737        self
20738    }
20739
20740    /// Sets or clears the value of [prediction][crate::model::FluencyInstance::prediction].
20741    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
20742    where
20743        T: std::convert::Into<std::string::String>,
20744    {
20745        self.prediction = v.map(|x| x.into());
20746        self
20747    }
20748}
20749
20750#[cfg(feature = "evaluation-service")]
20751impl wkt::message::Message for FluencyInstance {
20752    fn typename() -> &'static str {
20753        "type.googleapis.com/google.cloud.aiplatform.v1.FluencyInstance"
20754    }
20755}
20756
20757/// Spec for fluency score metric.
20758#[cfg(feature = "evaluation-service")]
20759#[derive(Clone, Default, PartialEq)]
20760#[non_exhaustive]
20761pub struct FluencySpec {
20762    /// Optional. Which version to use for evaluation.
20763    pub version: i32,
20764
20765    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20766}
20767
20768#[cfg(feature = "evaluation-service")]
20769impl FluencySpec {
20770    pub fn new() -> Self {
20771        std::default::Default::default()
20772    }
20773
20774    /// Sets the value of [version][crate::model::FluencySpec::version].
20775    pub fn set_version<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20776        self.version = v.into();
20777        self
20778    }
20779}
20780
20781#[cfg(feature = "evaluation-service")]
20782impl wkt::message::Message for FluencySpec {
20783    fn typename() -> &'static str {
20784        "type.googleapis.com/google.cloud.aiplatform.v1.FluencySpec"
20785    }
20786}
20787
20788/// Spec for fluency result.
20789#[cfg(feature = "evaluation-service")]
20790#[derive(Clone, Default, PartialEq)]
20791#[non_exhaustive]
20792pub struct FluencyResult {
20793    /// Output only. Fluency score.
20794    pub score: std::option::Option<f32>,
20795
20796    /// Output only. Explanation for fluency score.
20797    pub explanation: std::string::String,
20798
20799    /// Output only. Confidence for fluency score.
20800    pub confidence: std::option::Option<f32>,
20801
20802    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20803}
20804
20805#[cfg(feature = "evaluation-service")]
20806impl FluencyResult {
20807    pub fn new() -> Self {
20808        std::default::Default::default()
20809    }
20810
20811    /// Sets the value of [score][crate::model::FluencyResult::score].
20812    pub fn set_score<T>(mut self, v: T) -> Self
20813    where
20814        T: std::convert::Into<f32>,
20815    {
20816        self.score = std::option::Option::Some(v.into());
20817        self
20818    }
20819
20820    /// Sets or clears the value of [score][crate::model::FluencyResult::score].
20821    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
20822    where
20823        T: std::convert::Into<f32>,
20824    {
20825        self.score = v.map(|x| x.into());
20826        self
20827    }
20828
20829    /// Sets the value of [explanation][crate::model::FluencyResult::explanation].
20830    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20831        self.explanation = v.into();
20832        self
20833    }
20834
20835    /// Sets the value of [confidence][crate::model::FluencyResult::confidence].
20836    pub fn set_confidence<T>(mut self, v: T) -> Self
20837    where
20838        T: std::convert::Into<f32>,
20839    {
20840        self.confidence = std::option::Option::Some(v.into());
20841        self
20842    }
20843
20844    /// Sets or clears the value of [confidence][crate::model::FluencyResult::confidence].
20845    pub fn set_or_clear_confidence<T>(mut self, v: std::option::Option<T>) -> Self
20846    where
20847        T: std::convert::Into<f32>,
20848    {
20849        self.confidence = v.map(|x| x.into());
20850        self
20851    }
20852}
20853
20854#[cfg(feature = "evaluation-service")]
20855impl wkt::message::Message for FluencyResult {
20856    fn typename() -> &'static str {
20857        "type.googleapis.com/google.cloud.aiplatform.v1.FluencyResult"
20858    }
20859}
20860
20861/// Input for safety metric.
20862#[cfg(feature = "evaluation-service")]
20863#[derive(Clone, Default, PartialEq)]
20864#[non_exhaustive]
20865pub struct SafetyInput {
20866    /// Required. Spec for safety metric.
20867    pub metric_spec: std::option::Option<crate::model::SafetySpec>,
20868
20869    /// Required. Safety instance.
20870    pub instance: std::option::Option<crate::model::SafetyInstance>,
20871
20872    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20873}
20874
20875#[cfg(feature = "evaluation-service")]
20876impl SafetyInput {
20877    pub fn new() -> Self {
20878        std::default::Default::default()
20879    }
20880
20881    /// Sets the value of [metric_spec][crate::model::SafetyInput::metric_spec].
20882    pub fn set_metric_spec<T>(mut self, v: T) -> Self
20883    where
20884        T: std::convert::Into<crate::model::SafetySpec>,
20885    {
20886        self.metric_spec = std::option::Option::Some(v.into());
20887        self
20888    }
20889
20890    /// Sets or clears the value of [metric_spec][crate::model::SafetyInput::metric_spec].
20891    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
20892    where
20893        T: std::convert::Into<crate::model::SafetySpec>,
20894    {
20895        self.metric_spec = v.map(|x| x.into());
20896        self
20897    }
20898
20899    /// Sets the value of [instance][crate::model::SafetyInput::instance].
20900    pub fn set_instance<T>(mut self, v: T) -> Self
20901    where
20902        T: std::convert::Into<crate::model::SafetyInstance>,
20903    {
20904        self.instance = std::option::Option::Some(v.into());
20905        self
20906    }
20907
20908    /// Sets or clears the value of [instance][crate::model::SafetyInput::instance].
20909    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
20910    where
20911        T: std::convert::Into<crate::model::SafetyInstance>,
20912    {
20913        self.instance = v.map(|x| x.into());
20914        self
20915    }
20916}
20917
20918#[cfg(feature = "evaluation-service")]
20919impl wkt::message::Message for SafetyInput {
20920    fn typename() -> &'static str {
20921        "type.googleapis.com/google.cloud.aiplatform.v1.SafetyInput"
20922    }
20923}
20924
20925/// Spec for safety instance.
20926#[cfg(feature = "evaluation-service")]
20927#[derive(Clone, Default, PartialEq)]
20928#[non_exhaustive]
20929pub struct SafetyInstance {
20930    /// Required. Output of the evaluated model.
20931    pub prediction: std::option::Option<std::string::String>,
20932
20933    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20934}
20935
20936#[cfg(feature = "evaluation-service")]
20937impl SafetyInstance {
20938    pub fn new() -> Self {
20939        std::default::Default::default()
20940    }
20941
20942    /// Sets the value of [prediction][crate::model::SafetyInstance::prediction].
20943    pub fn set_prediction<T>(mut self, v: T) -> Self
20944    where
20945        T: std::convert::Into<std::string::String>,
20946    {
20947        self.prediction = std::option::Option::Some(v.into());
20948        self
20949    }
20950
20951    /// Sets or clears the value of [prediction][crate::model::SafetyInstance::prediction].
20952    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
20953    where
20954        T: std::convert::Into<std::string::String>,
20955    {
20956        self.prediction = v.map(|x| x.into());
20957        self
20958    }
20959}
20960
20961#[cfg(feature = "evaluation-service")]
20962impl wkt::message::Message for SafetyInstance {
20963    fn typename() -> &'static str {
20964        "type.googleapis.com/google.cloud.aiplatform.v1.SafetyInstance"
20965    }
20966}
20967
20968/// Spec for safety metric.
20969#[cfg(feature = "evaluation-service")]
20970#[derive(Clone, Default, PartialEq)]
20971#[non_exhaustive]
20972pub struct SafetySpec {
20973    /// Optional. Which version to use for evaluation.
20974    pub version: i32,
20975
20976    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20977}
20978
20979#[cfg(feature = "evaluation-service")]
20980impl SafetySpec {
20981    pub fn new() -> Self {
20982        std::default::Default::default()
20983    }
20984
20985    /// Sets the value of [version][crate::model::SafetySpec::version].
20986    pub fn set_version<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20987        self.version = v.into();
20988        self
20989    }
20990}
20991
20992#[cfg(feature = "evaluation-service")]
20993impl wkt::message::Message for SafetySpec {
20994    fn typename() -> &'static str {
20995        "type.googleapis.com/google.cloud.aiplatform.v1.SafetySpec"
20996    }
20997}
20998
20999/// Spec for safety result.
21000#[cfg(feature = "evaluation-service")]
21001#[derive(Clone, Default, PartialEq)]
21002#[non_exhaustive]
21003pub struct SafetyResult {
21004    /// Output only. Safety score.
21005    pub score: std::option::Option<f32>,
21006
21007    /// Output only. Explanation for safety score.
21008    pub explanation: std::string::String,
21009
21010    /// Output only. Confidence for safety score.
21011    pub confidence: std::option::Option<f32>,
21012
21013    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21014}
21015
21016#[cfg(feature = "evaluation-service")]
21017impl SafetyResult {
21018    pub fn new() -> Self {
21019        std::default::Default::default()
21020    }
21021
21022    /// Sets the value of [score][crate::model::SafetyResult::score].
21023    pub fn set_score<T>(mut self, v: T) -> Self
21024    where
21025        T: std::convert::Into<f32>,
21026    {
21027        self.score = std::option::Option::Some(v.into());
21028        self
21029    }
21030
21031    /// Sets or clears the value of [score][crate::model::SafetyResult::score].
21032    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
21033    where
21034        T: std::convert::Into<f32>,
21035    {
21036        self.score = v.map(|x| x.into());
21037        self
21038    }
21039
21040    /// Sets the value of [explanation][crate::model::SafetyResult::explanation].
21041    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21042        self.explanation = v.into();
21043        self
21044    }
21045
21046    /// Sets the value of [confidence][crate::model::SafetyResult::confidence].
21047    pub fn set_confidence<T>(mut self, v: T) -> Self
21048    where
21049        T: std::convert::Into<f32>,
21050    {
21051        self.confidence = std::option::Option::Some(v.into());
21052        self
21053    }
21054
21055    /// Sets or clears the value of [confidence][crate::model::SafetyResult::confidence].
21056    pub fn set_or_clear_confidence<T>(mut self, v: std::option::Option<T>) -> Self
21057    where
21058        T: std::convert::Into<f32>,
21059    {
21060        self.confidence = v.map(|x| x.into());
21061        self
21062    }
21063}
21064
21065#[cfg(feature = "evaluation-service")]
21066impl wkt::message::Message for SafetyResult {
21067    fn typename() -> &'static str {
21068        "type.googleapis.com/google.cloud.aiplatform.v1.SafetyResult"
21069    }
21070}
21071
21072/// Input for groundedness metric.
21073#[cfg(feature = "evaluation-service")]
21074#[derive(Clone, Default, PartialEq)]
21075#[non_exhaustive]
21076pub struct GroundednessInput {
21077    /// Required. Spec for groundedness metric.
21078    pub metric_spec: std::option::Option<crate::model::GroundednessSpec>,
21079
21080    /// Required. Groundedness instance.
21081    pub instance: std::option::Option<crate::model::GroundednessInstance>,
21082
21083    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21084}
21085
21086#[cfg(feature = "evaluation-service")]
21087impl GroundednessInput {
21088    pub fn new() -> Self {
21089        std::default::Default::default()
21090    }
21091
21092    /// Sets the value of [metric_spec][crate::model::GroundednessInput::metric_spec].
21093    pub fn set_metric_spec<T>(mut self, v: T) -> Self
21094    where
21095        T: std::convert::Into<crate::model::GroundednessSpec>,
21096    {
21097        self.metric_spec = std::option::Option::Some(v.into());
21098        self
21099    }
21100
21101    /// Sets or clears the value of [metric_spec][crate::model::GroundednessInput::metric_spec].
21102    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
21103    where
21104        T: std::convert::Into<crate::model::GroundednessSpec>,
21105    {
21106        self.metric_spec = v.map(|x| x.into());
21107        self
21108    }
21109
21110    /// Sets the value of [instance][crate::model::GroundednessInput::instance].
21111    pub fn set_instance<T>(mut self, v: T) -> Self
21112    where
21113        T: std::convert::Into<crate::model::GroundednessInstance>,
21114    {
21115        self.instance = std::option::Option::Some(v.into());
21116        self
21117    }
21118
21119    /// Sets or clears the value of [instance][crate::model::GroundednessInput::instance].
21120    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
21121    where
21122        T: std::convert::Into<crate::model::GroundednessInstance>,
21123    {
21124        self.instance = v.map(|x| x.into());
21125        self
21126    }
21127}
21128
21129#[cfg(feature = "evaluation-service")]
21130impl wkt::message::Message for GroundednessInput {
21131    fn typename() -> &'static str {
21132        "type.googleapis.com/google.cloud.aiplatform.v1.GroundednessInput"
21133    }
21134}
21135
21136/// Spec for groundedness instance.
21137#[cfg(feature = "evaluation-service")]
21138#[derive(Clone, Default, PartialEq)]
21139#[non_exhaustive]
21140pub struct GroundednessInstance {
21141    /// Required. Output of the evaluated model.
21142    pub prediction: std::option::Option<std::string::String>,
21143
21144    /// Required. Background information provided in context used to compare
21145    /// against the prediction.
21146    pub context: std::option::Option<std::string::String>,
21147
21148    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21149}
21150
21151#[cfg(feature = "evaluation-service")]
21152impl GroundednessInstance {
21153    pub fn new() -> Self {
21154        std::default::Default::default()
21155    }
21156
21157    /// Sets the value of [prediction][crate::model::GroundednessInstance::prediction].
21158    pub fn set_prediction<T>(mut self, v: T) -> Self
21159    where
21160        T: std::convert::Into<std::string::String>,
21161    {
21162        self.prediction = std::option::Option::Some(v.into());
21163        self
21164    }
21165
21166    /// Sets or clears the value of [prediction][crate::model::GroundednessInstance::prediction].
21167    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
21168    where
21169        T: std::convert::Into<std::string::String>,
21170    {
21171        self.prediction = v.map(|x| x.into());
21172        self
21173    }
21174
21175    /// Sets the value of [context][crate::model::GroundednessInstance::context].
21176    pub fn set_context<T>(mut self, v: T) -> Self
21177    where
21178        T: std::convert::Into<std::string::String>,
21179    {
21180        self.context = std::option::Option::Some(v.into());
21181        self
21182    }
21183
21184    /// Sets or clears the value of [context][crate::model::GroundednessInstance::context].
21185    pub fn set_or_clear_context<T>(mut self, v: std::option::Option<T>) -> Self
21186    where
21187        T: std::convert::Into<std::string::String>,
21188    {
21189        self.context = v.map(|x| x.into());
21190        self
21191    }
21192}
21193
21194#[cfg(feature = "evaluation-service")]
21195impl wkt::message::Message for GroundednessInstance {
21196    fn typename() -> &'static str {
21197        "type.googleapis.com/google.cloud.aiplatform.v1.GroundednessInstance"
21198    }
21199}
21200
21201/// Spec for groundedness metric.
21202#[cfg(feature = "evaluation-service")]
21203#[derive(Clone, Default, PartialEq)]
21204#[non_exhaustive]
21205pub struct GroundednessSpec {
21206    /// Optional. Which version to use for evaluation.
21207    pub version: i32,
21208
21209    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21210}
21211
21212#[cfg(feature = "evaluation-service")]
21213impl GroundednessSpec {
21214    pub fn new() -> Self {
21215        std::default::Default::default()
21216    }
21217
21218    /// Sets the value of [version][crate::model::GroundednessSpec::version].
21219    pub fn set_version<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
21220        self.version = v.into();
21221        self
21222    }
21223}
21224
21225#[cfg(feature = "evaluation-service")]
21226impl wkt::message::Message for GroundednessSpec {
21227    fn typename() -> &'static str {
21228        "type.googleapis.com/google.cloud.aiplatform.v1.GroundednessSpec"
21229    }
21230}
21231
21232/// Spec for groundedness result.
21233#[cfg(feature = "evaluation-service")]
21234#[derive(Clone, Default, PartialEq)]
21235#[non_exhaustive]
21236pub struct GroundednessResult {
21237    /// Output only. Groundedness score.
21238    pub score: std::option::Option<f32>,
21239
21240    /// Output only. Explanation for groundedness score.
21241    pub explanation: std::string::String,
21242
21243    /// Output only. Confidence for groundedness score.
21244    pub confidence: std::option::Option<f32>,
21245
21246    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21247}
21248
21249#[cfg(feature = "evaluation-service")]
21250impl GroundednessResult {
21251    pub fn new() -> Self {
21252        std::default::Default::default()
21253    }
21254
21255    /// Sets the value of [score][crate::model::GroundednessResult::score].
21256    pub fn set_score<T>(mut self, v: T) -> Self
21257    where
21258        T: std::convert::Into<f32>,
21259    {
21260        self.score = std::option::Option::Some(v.into());
21261        self
21262    }
21263
21264    /// Sets or clears the value of [score][crate::model::GroundednessResult::score].
21265    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
21266    where
21267        T: std::convert::Into<f32>,
21268    {
21269        self.score = v.map(|x| x.into());
21270        self
21271    }
21272
21273    /// Sets the value of [explanation][crate::model::GroundednessResult::explanation].
21274    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21275        self.explanation = v.into();
21276        self
21277    }
21278
21279    /// Sets the value of [confidence][crate::model::GroundednessResult::confidence].
21280    pub fn set_confidence<T>(mut self, v: T) -> Self
21281    where
21282        T: std::convert::Into<f32>,
21283    {
21284        self.confidence = std::option::Option::Some(v.into());
21285        self
21286    }
21287
21288    /// Sets or clears the value of [confidence][crate::model::GroundednessResult::confidence].
21289    pub fn set_or_clear_confidence<T>(mut self, v: std::option::Option<T>) -> Self
21290    where
21291        T: std::convert::Into<f32>,
21292    {
21293        self.confidence = v.map(|x| x.into());
21294        self
21295    }
21296}
21297
21298#[cfg(feature = "evaluation-service")]
21299impl wkt::message::Message for GroundednessResult {
21300    fn typename() -> &'static str {
21301        "type.googleapis.com/google.cloud.aiplatform.v1.GroundednessResult"
21302    }
21303}
21304
21305/// Input for fulfillment metric.
21306#[cfg(feature = "evaluation-service")]
21307#[derive(Clone, Default, PartialEq)]
21308#[non_exhaustive]
21309pub struct FulfillmentInput {
21310    /// Required. Spec for fulfillment score metric.
21311    pub metric_spec: std::option::Option<crate::model::FulfillmentSpec>,
21312
21313    /// Required. Fulfillment instance.
21314    pub instance: std::option::Option<crate::model::FulfillmentInstance>,
21315
21316    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21317}
21318
21319#[cfg(feature = "evaluation-service")]
21320impl FulfillmentInput {
21321    pub fn new() -> Self {
21322        std::default::Default::default()
21323    }
21324
21325    /// Sets the value of [metric_spec][crate::model::FulfillmentInput::metric_spec].
21326    pub fn set_metric_spec<T>(mut self, v: T) -> Self
21327    where
21328        T: std::convert::Into<crate::model::FulfillmentSpec>,
21329    {
21330        self.metric_spec = std::option::Option::Some(v.into());
21331        self
21332    }
21333
21334    /// Sets or clears the value of [metric_spec][crate::model::FulfillmentInput::metric_spec].
21335    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
21336    where
21337        T: std::convert::Into<crate::model::FulfillmentSpec>,
21338    {
21339        self.metric_spec = v.map(|x| x.into());
21340        self
21341    }
21342
21343    /// Sets the value of [instance][crate::model::FulfillmentInput::instance].
21344    pub fn set_instance<T>(mut self, v: T) -> Self
21345    where
21346        T: std::convert::Into<crate::model::FulfillmentInstance>,
21347    {
21348        self.instance = std::option::Option::Some(v.into());
21349        self
21350    }
21351
21352    /// Sets or clears the value of [instance][crate::model::FulfillmentInput::instance].
21353    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
21354    where
21355        T: std::convert::Into<crate::model::FulfillmentInstance>,
21356    {
21357        self.instance = v.map(|x| x.into());
21358        self
21359    }
21360}
21361
21362#[cfg(feature = "evaluation-service")]
21363impl wkt::message::Message for FulfillmentInput {
21364    fn typename() -> &'static str {
21365        "type.googleapis.com/google.cloud.aiplatform.v1.FulfillmentInput"
21366    }
21367}
21368
21369/// Spec for fulfillment instance.
21370#[cfg(feature = "evaluation-service")]
21371#[derive(Clone, Default, PartialEq)]
21372#[non_exhaustive]
21373pub struct FulfillmentInstance {
21374    /// Required. Output of the evaluated model.
21375    pub prediction: std::option::Option<std::string::String>,
21376
21377    /// Required. Inference instruction prompt to compare prediction with.
21378    pub instruction: std::option::Option<std::string::String>,
21379
21380    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21381}
21382
21383#[cfg(feature = "evaluation-service")]
21384impl FulfillmentInstance {
21385    pub fn new() -> Self {
21386        std::default::Default::default()
21387    }
21388
21389    /// Sets the value of [prediction][crate::model::FulfillmentInstance::prediction].
21390    pub fn set_prediction<T>(mut self, v: T) -> Self
21391    where
21392        T: std::convert::Into<std::string::String>,
21393    {
21394        self.prediction = std::option::Option::Some(v.into());
21395        self
21396    }
21397
21398    /// Sets or clears the value of [prediction][crate::model::FulfillmentInstance::prediction].
21399    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
21400    where
21401        T: std::convert::Into<std::string::String>,
21402    {
21403        self.prediction = v.map(|x| x.into());
21404        self
21405    }
21406
21407    /// Sets the value of [instruction][crate::model::FulfillmentInstance::instruction].
21408    pub fn set_instruction<T>(mut self, v: T) -> Self
21409    where
21410        T: std::convert::Into<std::string::String>,
21411    {
21412        self.instruction = std::option::Option::Some(v.into());
21413        self
21414    }
21415
21416    /// Sets or clears the value of [instruction][crate::model::FulfillmentInstance::instruction].
21417    pub fn set_or_clear_instruction<T>(mut self, v: std::option::Option<T>) -> Self
21418    where
21419        T: std::convert::Into<std::string::String>,
21420    {
21421        self.instruction = v.map(|x| x.into());
21422        self
21423    }
21424}
21425
21426#[cfg(feature = "evaluation-service")]
21427impl wkt::message::Message for FulfillmentInstance {
21428    fn typename() -> &'static str {
21429        "type.googleapis.com/google.cloud.aiplatform.v1.FulfillmentInstance"
21430    }
21431}
21432
21433/// Spec for fulfillment metric.
21434#[cfg(feature = "evaluation-service")]
21435#[derive(Clone, Default, PartialEq)]
21436#[non_exhaustive]
21437pub struct FulfillmentSpec {
21438    /// Optional. Which version to use for evaluation.
21439    pub version: i32,
21440
21441    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21442}
21443
21444#[cfg(feature = "evaluation-service")]
21445impl FulfillmentSpec {
21446    pub fn new() -> Self {
21447        std::default::Default::default()
21448    }
21449
21450    /// Sets the value of [version][crate::model::FulfillmentSpec::version].
21451    pub fn set_version<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
21452        self.version = v.into();
21453        self
21454    }
21455}
21456
21457#[cfg(feature = "evaluation-service")]
21458impl wkt::message::Message for FulfillmentSpec {
21459    fn typename() -> &'static str {
21460        "type.googleapis.com/google.cloud.aiplatform.v1.FulfillmentSpec"
21461    }
21462}
21463
21464/// Spec for fulfillment result.
21465#[cfg(feature = "evaluation-service")]
21466#[derive(Clone, Default, PartialEq)]
21467#[non_exhaustive]
21468pub struct FulfillmentResult {
21469    /// Output only. Fulfillment score.
21470    pub score: std::option::Option<f32>,
21471
21472    /// Output only. Explanation for fulfillment score.
21473    pub explanation: std::string::String,
21474
21475    /// Output only. Confidence for fulfillment score.
21476    pub confidence: std::option::Option<f32>,
21477
21478    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21479}
21480
21481#[cfg(feature = "evaluation-service")]
21482impl FulfillmentResult {
21483    pub fn new() -> Self {
21484        std::default::Default::default()
21485    }
21486
21487    /// Sets the value of [score][crate::model::FulfillmentResult::score].
21488    pub fn set_score<T>(mut self, v: T) -> Self
21489    where
21490        T: std::convert::Into<f32>,
21491    {
21492        self.score = std::option::Option::Some(v.into());
21493        self
21494    }
21495
21496    /// Sets or clears the value of [score][crate::model::FulfillmentResult::score].
21497    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
21498    where
21499        T: std::convert::Into<f32>,
21500    {
21501        self.score = v.map(|x| x.into());
21502        self
21503    }
21504
21505    /// Sets the value of [explanation][crate::model::FulfillmentResult::explanation].
21506    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21507        self.explanation = v.into();
21508        self
21509    }
21510
21511    /// Sets the value of [confidence][crate::model::FulfillmentResult::confidence].
21512    pub fn set_confidence<T>(mut self, v: T) -> Self
21513    where
21514        T: std::convert::Into<f32>,
21515    {
21516        self.confidence = std::option::Option::Some(v.into());
21517        self
21518    }
21519
21520    /// Sets or clears the value of [confidence][crate::model::FulfillmentResult::confidence].
21521    pub fn set_or_clear_confidence<T>(mut self, v: std::option::Option<T>) -> Self
21522    where
21523        T: std::convert::Into<f32>,
21524    {
21525        self.confidence = v.map(|x| x.into());
21526        self
21527    }
21528}
21529
21530#[cfg(feature = "evaluation-service")]
21531impl wkt::message::Message for FulfillmentResult {
21532    fn typename() -> &'static str {
21533        "type.googleapis.com/google.cloud.aiplatform.v1.FulfillmentResult"
21534    }
21535}
21536
21537/// Input for summarization quality metric.
21538#[cfg(feature = "evaluation-service")]
21539#[derive(Clone, Default, PartialEq)]
21540#[non_exhaustive]
21541pub struct SummarizationQualityInput {
21542    /// Required. Spec for summarization quality score metric.
21543    pub metric_spec: std::option::Option<crate::model::SummarizationQualitySpec>,
21544
21545    /// Required. Summarization quality instance.
21546    pub instance: std::option::Option<crate::model::SummarizationQualityInstance>,
21547
21548    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21549}
21550
21551#[cfg(feature = "evaluation-service")]
21552impl SummarizationQualityInput {
21553    pub fn new() -> Self {
21554        std::default::Default::default()
21555    }
21556
21557    /// Sets the value of [metric_spec][crate::model::SummarizationQualityInput::metric_spec].
21558    pub fn set_metric_spec<T>(mut self, v: T) -> Self
21559    where
21560        T: std::convert::Into<crate::model::SummarizationQualitySpec>,
21561    {
21562        self.metric_spec = std::option::Option::Some(v.into());
21563        self
21564    }
21565
21566    /// Sets or clears the value of [metric_spec][crate::model::SummarizationQualityInput::metric_spec].
21567    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
21568    where
21569        T: std::convert::Into<crate::model::SummarizationQualitySpec>,
21570    {
21571        self.metric_spec = v.map(|x| x.into());
21572        self
21573    }
21574
21575    /// Sets the value of [instance][crate::model::SummarizationQualityInput::instance].
21576    pub fn set_instance<T>(mut self, v: T) -> Self
21577    where
21578        T: std::convert::Into<crate::model::SummarizationQualityInstance>,
21579    {
21580        self.instance = std::option::Option::Some(v.into());
21581        self
21582    }
21583
21584    /// Sets or clears the value of [instance][crate::model::SummarizationQualityInput::instance].
21585    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
21586    where
21587        T: std::convert::Into<crate::model::SummarizationQualityInstance>,
21588    {
21589        self.instance = v.map(|x| x.into());
21590        self
21591    }
21592}
21593
21594#[cfg(feature = "evaluation-service")]
21595impl wkt::message::Message for SummarizationQualityInput {
21596    fn typename() -> &'static str {
21597        "type.googleapis.com/google.cloud.aiplatform.v1.SummarizationQualityInput"
21598    }
21599}
21600
21601/// Spec for summarization quality instance.
21602#[cfg(feature = "evaluation-service")]
21603#[derive(Clone, Default, PartialEq)]
21604#[non_exhaustive]
21605pub struct SummarizationQualityInstance {
21606    /// Required. Output of the evaluated model.
21607    pub prediction: std::option::Option<std::string::String>,
21608
21609    /// Optional. Ground truth used to compare against the prediction.
21610    pub reference: std::option::Option<std::string::String>,
21611
21612    /// Required. Text to be summarized.
21613    pub context: std::option::Option<std::string::String>,
21614
21615    /// Required. Summarization prompt for LLM.
21616    pub instruction: std::option::Option<std::string::String>,
21617
21618    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21619}
21620
21621#[cfg(feature = "evaluation-service")]
21622impl SummarizationQualityInstance {
21623    pub fn new() -> Self {
21624        std::default::Default::default()
21625    }
21626
21627    /// Sets the value of [prediction][crate::model::SummarizationQualityInstance::prediction].
21628    pub fn set_prediction<T>(mut self, v: T) -> Self
21629    where
21630        T: std::convert::Into<std::string::String>,
21631    {
21632        self.prediction = std::option::Option::Some(v.into());
21633        self
21634    }
21635
21636    /// Sets or clears the value of [prediction][crate::model::SummarizationQualityInstance::prediction].
21637    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
21638    where
21639        T: std::convert::Into<std::string::String>,
21640    {
21641        self.prediction = v.map(|x| x.into());
21642        self
21643    }
21644
21645    /// Sets the value of [reference][crate::model::SummarizationQualityInstance::reference].
21646    pub fn set_reference<T>(mut self, v: T) -> Self
21647    where
21648        T: std::convert::Into<std::string::String>,
21649    {
21650        self.reference = std::option::Option::Some(v.into());
21651        self
21652    }
21653
21654    /// Sets or clears the value of [reference][crate::model::SummarizationQualityInstance::reference].
21655    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
21656    where
21657        T: std::convert::Into<std::string::String>,
21658    {
21659        self.reference = v.map(|x| x.into());
21660        self
21661    }
21662
21663    /// Sets the value of [context][crate::model::SummarizationQualityInstance::context].
21664    pub fn set_context<T>(mut self, v: T) -> Self
21665    where
21666        T: std::convert::Into<std::string::String>,
21667    {
21668        self.context = std::option::Option::Some(v.into());
21669        self
21670    }
21671
21672    /// Sets or clears the value of [context][crate::model::SummarizationQualityInstance::context].
21673    pub fn set_or_clear_context<T>(mut self, v: std::option::Option<T>) -> Self
21674    where
21675        T: std::convert::Into<std::string::String>,
21676    {
21677        self.context = v.map(|x| x.into());
21678        self
21679    }
21680
21681    /// Sets the value of [instruction][crate::model::SummarizationQualityInstance::instruction].
21682    pub fn set_instruction<T>(mut self, v: T) -> Self
21683    where
21684        T: std::convert::Into<std::string::String>,
21685    {
21686        self.instruction = std::option::Option::Some(v.into());
21687        self
21688    }
21689
21690    /// Sets or clears the value of [instruction][crate::model::SummarizationQualityInstance::instruction].
21691    pub fn set_or_clear_instruction<T>(mut self, v: std::option::Option<T>) -> Self
21692    where
21693        T: std::convert::Into<std::string::String>,
21694    {
21695        self.instruction = v.map(|x| x.into());
21696        self
21697    }
21698}
21699
21700#[cfg(feature = "evaluation-service")]
21701impl wkt::message::Message for SummarizationQualityInstance {
21702    fn typename() -> &'static str {
21703        "type.googleapis.com/google.cloud.aiplatform.v1.SummarizationQualityInstance"
21704    }
21705}
21706
21707/// Spec for summarization quality score metric.
21708#[cfg(feature = "evaluation-service")]
21709#[derive(Clone, Default, PartialEq)]
21710#[non_exhaustive]
21711pub struct SummarizationQualitySpec {
21712    /// Optional. Whether to use instance.reference to compute summarization
21713    /// quality.
21714    pub use_reference: bool,
21715
21716    /// Optional. Which version to use for evaluation.
21717    pub version: i32,
21718
21719    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21720}
21721
21722#[cfg(feature = "evaluation-service")]
21723impl SummarizationQualitySpec {
21724    pub fn new() -> Self {
21725        std::default::Default::default()
21726    }
21727
21728    /// Sets the value of [use_reference][crate::model::SummarizationQualitySpec::use_reference].
21729    pub fn set_use_reference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21730        self.use_reference = v.into();
21731        self
21732    }
21733
21734    /// Sets the value of [version][crate::model::SummarizationQualitySpec::version].
21735    pub fn set_version<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
21736        self.version = v.into();
21737        self
21738    }
21739}
21740
21741#[cfg(feature = "evaluation-service")]
21742impl wkt::message::Message for SummarizationQualitySpec {
21743    fn typename() -> &'static str {
21744        "type.googleapis.com/google.cloud.aiplatform.v1.SummarizationQualitySpec"
21745    }
21746}
21747
21748/// Spec for summarization quality result.
21749#[cfg(feature = "evaluation-service")]
21750#[derive(Clone, Default, PartialEq)]
21751#[non_exhaustive]
21752pub struct SummarizationQualityResult {
21753    /// Output only. Summarization Quality score.
21754    pub score: std::option::Option<f32>,
21755
21756    /// Output only. Explanation for summarization quality score.
21757    pub explanation: std::string::String,
21758
21759    /// Output only. Confidence for summarization quality score.
21760    pub confidence: std::option::Option<f32>,
21761
21762    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21763}
21764
21765#[cfg(feature = "evaluation-service")]
21766impl SummarizationQualityResult {
21767    pub fn new() -> Self {
21768        std::default::Default::default()
21769    }
21770
21771    /// Sets the value of [score][crate::model::SummarizationQualityResult::score].
21772    pub fn set_score<T>(mut self, v: T) -> Self
21773    where
21774        T: std::convert::Into<f32>,
21775    {
21776        self.score = std::option::Option::Some(v.into());
21777        self
21778    }
21779
21780    /// Sets or clears the value of [score][crate::model::SummarizationQualityResult::score].
21781    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
21782    where
21783        T: std::convert::Into<f32>,
21784    {
21785        self.score = v.map(|x| x.into());
21786        self
21787    }
21788
21789    /// Sets the value of [explanation][crate::model::SummarizationQualityResult::explanation].
21790    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21791        self.explanation = v.into();
21792        self
21793    }
21794
21795    /// Sets the value of [confidence][crate::model::SummarizationQualityResult::confidence].
21796    pub fn set_confidence<T>(mut self, v: T) -> Self
21797    where
21798        T: std::convert::Into<f32>,
21799    {
21800        self.confidence = std::option::Option::Some(v.into());
21801        self
21802    }
21803
21804    /// Sets or clears the value of [confidence][crate::model::SummarizationQualityResult::confidence].
21805    pub fn set_or_clear_confidence<T>(mut self, v: std::option::Option<T>) -> Self
21806    where
21807        T: std::convert::Into<f32>,
21808    {
21809        self.confidence = v.map(|x| x.into());
21810        self
21811    }
21812}
21813
21814#[cfg(feature = "evaluation-service")]
21815impl wkt::message::Message for SummarizationQualityResult {
21816    fn typename() -> &'static str {
21817        "type.googleapis.com/google.cloud.aiplatform.v1.SummarizationQualityResult"
21818    }
21819}
21820
21821/// Input for pairwise summarization quality metric.
21822#[cfg(feature = "evaluation-service")]
21823#[derive(Clone, Default, PartialEq)]
21824#[non_exhaustive]
21825pub struct PairwiseSummarizationQualityInput {
21826    /// Required. Spec for pairwise summarization quality score metric.
21827    pub metric_spec: std::option::Option<crate::model::PairwiseSummarizationQualitySpec>,
21828
21829    /// Required. Pairwise summarization quality instance.
21830    pub instance: std::option::Option<crate::model::PairwiseSummarizationQualityInstance>,
21831
21832    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21833}
21834
21835#[cfg(feature = "evaluation-service")]
21836impl PairwiseSummarizationQualityInput {
21837    pub fn new() -> Self {
21838        std::default::Default::default()
21839    }
21840
21841    /// Sets the value of [metric_spec][crate::model::PairwiseSummarizationQualityInput::metric_spec].
21842    pub fn set_metric_spec<T>(mut self, v: T) -> Self
21843    where
21844        T: std::convert::Into<crate::model::PairwiseSummarizationQualitySpec>,
21845    {
21846        self.metric_spec = std::option::Option::Some(v.into());
21847        self
21848    }
21849
21850    /// Sets or clears the value of [metric_spec][crate::model::PairwiseSummarizationQualityInput::metric_spec].
21851    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
21852    where
21853        T: std::convert::Into<crate::model::PairwiseSummarizationQualitySpec>,
21854    {
21855        self.metric_spec = v.map(|x| x.into());
21856        self
21857    }
21858
21859    /// Sets the value of [instance][crate::model::PairwiseSummarizationQualityInput::instance].
21860    pub fn set_instance<T>(mut self, v: T) -> Self
21861    where
21862        T: std::convert::Into<crate::model::PairwiseSummarizationQualityInstance>,
21863    {
21864        self.instance = std::option::Option::Some(v.into());
21865        self
21866    }
21867
21868    /// Sets or clears the value of [instance][crate::model::PairwiseSummarizationQualityInput::instance].
21869    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
21870    where
21871        T: std::convert::Into<crate::model::PairwiseSummarizationQualityInstance>,
21872    {
21873        self.instance = v.map(|x| x.into());
21874        self
21875    }
21876}
21877
21878#[cfg(feature = "evaluation-service")]
21879impl wkt::message::Message for PairwiseSummarizationQualityInput {
21880    fn typename() -> &'static str {
21881        "type.googleapis.com/google.cloud.aiplatform.v1.PairwiseSummarizationQualityInput"
21882    }
21883}
21884
21885/// Spec for pairwise summarization quality instance.
21886#[cfg(feature = "evaluation-service")]
21887#[derive(Clone, Default, PartialEq)]
21888#[non_exhaustive]
21889pub struct PairwiseSummarizationQualityInstance {
21890    /// Required. Output of the candidate model.
21891    pub prediction: std::option::Option<std::string::String>,
21892
21893    /// Required. Output of the baseline model.
21894    pub baseline_prediction: std::option::Option<std::string::String>,
21895
21896    /// Optional. Ground truth used to compare against the prediction.
21897    pub reference: std::option::Option<std::string::String>,
21898
21899    /// Required. Text to be summarized.
21900    pub context: std::option::Option<std::string::String>,
21901
21902    /// Required. Summarization prompt for LLM.
21903    pub instruction: std::option::Option<std::string::String>,
21904
21905    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21906}
21907
21908#[cfg(feature = "evaluation-service")]
21909impl PairwiseSummarizationQualityInstance {
21910    pub fn new() -> Self {
21911        std::default::Default::default()
21912    }
21913
21914    /// Sets the value of [prediction][crate::model::PairwiseSummarizationQualityInstance::prediction].
21915    pub fn set_prediction<T>(mut self, v: T) -> Self
21916    where
21917        T: std::convert::Into<std::string::String>,
21918    {
21919        self.prediction = std::option::Option::Some(v.into());
21920        self
21921    }
21922
21923    /// Sets or clears the value of [prediction][crate::model::PairwiseSummarizationQualityInstance::prediction].
21924    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
21925    where
21926        T: std::convert::Into<std::string::String>,
21927    {
21928        self.prediction = v.map(|x| x.into());
21929        self
21930    }
21931
21932    /// Sets the value of [baseline_prediction][crate::model::PairwiseSummarizationQualityInstance::baseline_prediction].
21933    pub fn set_baseline_prediction<T>(mut self, v: T) -> Self
21934    where
21935        T: std::convert::Into<std::string::String>,
21936    {
21937        self.baseline_prediction = std::option::Option::Some(v.into());
21938        self
21939    }
21940
21941    /// Sets or clears the value of [baseline_prediction][crate::model::PairwiseSummarizationQualityInstance::baseline_prediction].
21942    pub fn set_or_clear_baseline_prediction<T>(mut self, v: std::option::Option<T>) -> Self
21943    where
21944        T: std::convert::Into<std::string::String>,
21945    {
21946        self.baseline_prediction = v.map(|x| x.into());
21947        self
21948    }
21949
21950    /// Sets the value of [reference][crate::model::PairwiseSummarizationQualityInstance::reference].
21951    pub fn set_reference<T>(mut self, v: T) -> Self
21952    where
21953        T: std::convert::Into<std::string::String>,
21954    {
21955        self.reference = std::option::Option::Some(v.into());
21956        self
21957    }
21958
21959    /// Sets or clears the value of [reference][crate::model::PairwiseSummarizationQualityInstance::reference].
21960    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
21961    where
21962        T: std::convert::Into<std::string::String>,
21963    {
21964        self.reference = v.map(|x| x.into());
21965        self
21966    }
21967
21968    /// Sets the value of [context][crate::model::PairwiseSummarizationQualityInstance::context].
21969    pub fn set_context<T>(mut self, v: T) -> Self
21970    where
21971        T: std::convert::Into<std::string::String>,
21972    {
21973        self.context = std::option::Option::Some(v.into());
21974        self
21975    }
21976
21977    /// Sets or clears the value of [context][crate::model::PairwiseSummarizationQualityInstance::context].
21978    pub fn set_or_clear_context<T>(mut self, v: std::option::Option<T>) -> Self
21979    where
21980        T: std::convert::Into<std::string::String>,
21981    {
21982        self.context = v.map(|x| x.into());
21983        self
21984    }
21985
21986    /// Sets the value of [instruction][crate::model::PairwiseSummarizationQualityInstance::instruction].
21987    pub fn set_instruction<T>(mut self, v: T) -> Self
21988    where
21989        T: std::convert::Into<std::string::String>,
21990    {
21991        self.instruction = std::option::Option::Some(v.into());
21992        self
21993    }
21994
21995    /// Sets or clears the value of [instruction][crate::model::PairwiseSummarizationQualityInstance::instruction].
21996    pub fn set_or_clear_instruction<T>(mut self, v: std::option::Option<T>) -> Self
21997    where
21998        T: std::convert::Into<std::string::String>,
21999    {
22000        self.instruction = v.map(|x| x.into());
22001        self
22002    }
22003}
22004
22005#[cfg(feature = "evaluation-service")]
22006impl wkt::message::Message for PairwiseSummarizationQualityInstance {
22007    fn typename() -> &'static str {
22008        "type.googleapis.com/google.cloud.aiplatform.v1.PairwiseSummarizationQualityInstance"
22009    }
22010}
22011
22012/// Spec for pairwise summarization quality score metric.
22013#[cfg(feature = "evaluation-service")]
22014#[derive(Clone, Default, PartialEq)]
22015#[non_exhaustive]
22016pub struct PairwiseSummarizationQualitySpec {
22017    /// Optional. Whether to use instance.reference to compute pairwise
22018    /// summarization quality.
22019    pub use_reference: bool,
22020
22021    /// Optional. Which version to use for evaluation.
22022    pub version: i32,
22023
22024    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22025}
22026
22027#[cfg(feature = "evaluation-service")]
22028impl PairwiseSummarizationQualitySpec {
22029    pub fn new() -> Self {
22030        std::default::Default::default()
22031    }
22032
22033    /// Sets the value of [use_reference][crate::model::PairwiseSummarizationQualitySpec::use_reference].
22034    pub fn set_use_reference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22035        self.use_reference = v.into();
22036        self
22037    }
22038
22039    /// Sets the value of [version][crate::model::PairwiseSummarizationQualitySpec::version].
22040    pub fn set_version<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
22041        self.version = v.into();
22042        self
22043    }
22044}
22045
22046#[cfg(feature = "evaluation-service")]
22047impl wkt::message::Message for PairwiseSummarizationQualitySpec {
22048    fn typename() -> &'static str {
22049        "type.googleapis.com/google.cloud.aiplatform.v1.PairwiseSummarizationQualitySpec"
22050    }
22051}
22052
22053/// Spec for pairwise summarization quality result.
22054#[cfg(feature = "evaluation-service")]
22055#[derive(Clone, Default, PartialEq)]
22056#[non_exhaustive]
22057pub struct PairwiseSummarizationQualityResult {
22058    /// Output only. Pairwise summarization prediction choice.
22059    pub pairwise_choice: crate::model::PairwiseChoice,
22060
22061    /// Output only. Explanation for summarization quality score.
22062    pub explanation: std::string::String,
22063
22064    /// Output only. Confidence for summarization quality score.
22065    pub confidence: std::option::Option<f32>,
22066
22067    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22068}
22069
22070#[cfg(feature = "evaluation-service")]
22071impl PairwiseSummarizationQualityResult {
22072    pub fn new() -> Self {
22073        std::default::Default::default()
22074    }
22075
22076    /// Sets the value of [pairwise_choice][crate::model::PairwiseSummarizationQualityResult::pairwise_choice].
22077    pub fn set_pairwise_choice<T: std::convert::Into<crate::model::PairwiseChoice>>(
22078        mut self,
22079        v: T,
22080    ) -> Self {
22081        self.pairwise_choice = v.into();
22082        self
22083    }
22084
22085    /// Sets the value of [explanation][crate::model::PairwiseSummarizationQualityResult::explanation].
22086    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22087        self.explanation = v.into();
22088        self
22089    }
22090
22091    /// Sets the value of [confidence][crate::model::PairwiseSummarizationQualityResult::confidence].
22092    pub fn set_confidence<T>(mut self, v: T) -> Self
22093    where
22094        T: std::convert::Into<f32>,
22095    {
22096        self.confidence = std::option::Option::Some(v.into());
22097        self
22098    }
22099
22100    /// Sets or clears the value of [confidence][crate::model::PairwiseSummarizationQualityResult::confidence].
22101    pub fn set_or_clear_confidence<T>(mut self, v: std::option::Option<T>) -> Self
22102    where
22103        T: std::convert::Into<f32>,
22104    {
22105        self.confidence = v.map(|x| x.into());
22106        self
22107    }
22108}
22109
22110#[cfg(feature = "evaluation-service")]
22111impl wkt::message::Message for PairwiseSummarizationQualityResult {
22112    fn typename() -> &'static str {
22113        "type.googleapis.com/google.cloud.aiplatform.v1.PairwiseSummarizationQualityResult"
22114    }
22115}
22116
22117/// Input for summarization helpfulness metric.
22118#[cfg(feature = "evaluation-service")]
22119#[derive(Clone, Default, PartialEq)]
22120#[non_exhaustive]
22121pub struct SummarizationHelpfulnessInput {
22122    /// Required. Spec for summarization helpfulness score metric.
22123    pub metric_spec: std::option::Option<crate::model::SummarizationHelpfulnessSpec>,
22124
22125    /// Required. Summarization helpfulness instance.
22126    pub instance: std::option::Option<crate::model::SummarizationHelpfulnessInstance>,
22127
22128    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22129}
22130
22131#[cfg(feature = "evaluation-service")]
22132impl SummarizationHelpfulnessInput {
22133    pub fn new() -> Self {
22134        std::default::Default::default()
22135    }
22136
22137    /// Sets the value of [metric_spec][crate::model::SummarizationHelpfulnessInput::metric_spec].
22138    pub fn set_metric_spec<T>(mut self, v: T) -> Self
22139    where
22140        T: std::convert::Into<crate::model::SummarizationHelpfulnessSpec>,
22141    {
22142        self.metric_spec = std::option::Option::Some(v.into());
22143        self
22144    }
22145
22146    /// Sets or clears the value of [metric_spec][crate::model::SummarizationHelpfulnessInput::metric_spec].
22147    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
22148    where
22149        T: std::convert::Into<crate::model::SummarizationHelpfulnessSpec>,
22150    {
22151        self.metric_spec = v.map(|x| x.into());
22152        self
22153    }
22154
22155    /// Sets the value of [instance][crate::model::SummarizationHelpfulnessInput::instance].
22156    pub fn set_instance<T>(mut self, v: T) -> Self
22157    where
22158        T: std::convert::Into<crate::model::SummarizationHelpfulnessInstance>,
22159    {
22160        self.instance = std::option::Option::Some(v.into());
22161        self
22162    }
22163
22164    /// Sets or clears the value of [instance][crate::model::SummarizationHelpfulnessInput::instance].
22165    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
22166    where
22167        T: std::convert::Into<crate::model::SummarizationHelpfulnessInstance>,
22168    {
22169        self.instance = v.map(|x| x.into());
22170        self
22171    }
22172}
22173
22174#[cfg(feature = "evaluation-service")]
22175impl wkt::message::Message for SummarizationHelpfulnessInput {
22176    fn typename() -> &'static str {
22177        "type.googleapis.com/google.cloud.aiplatform.v1.SummarizationHelpfulnessInput"
22178    }
22179}
22180
22181/// Spec for summarization helpfulness instance.
22182#[cfg(feature = "evaluation-service")]
22183#[derive(Clone, Default, PartialEq)]
22184#[non_exhaustive]
22185pub struct SummarizationHelpfulnessInstance {
22186    /// Required. Output of the evaluated model.
22187    pub prediction: std::option::Option<std::string::String>,
22188
22189    /// Optional. Ground truth used to compare against the prediction.
22190    pub reference: std::option::Option<std::string::String>,
22191
22192    /// Required. Text to be summarized.
22193    pub context: std::option::Option<std::string::String>,
22194
22195    /// Optional. Summarization prompt for LLM.
22196    pub instruction: std::option::Option<std::string::String>,
22197
22198    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22199}
22200
22201#[cfg(feature = "evaluation-service")]
22202impl SummarizationHelpfulnessInstance {
22203    pub fn new() -> Self {
22204        std::default::Default::default()
22205    }
22206
22207    /// Sets the value of [prediction][crate::model::SummarizationHelpfulnessInstance::prediction].
22208    pub fn set_prediction<T>(mut self, v: T) -> Self
22209    where
22210        T: std::convert::Into<std::string::String>,
22211    {
22212        self.prediction = std::option::Option::Some(v.into());
22213        self
22214    }
22215
22216    /// Sets or clears the value of [prediction][crate::model::SummarizationHelpfulnessInstance::prediction].
22217    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
22218    where
22219        T: std::convert::Into<std::string::String>,
22220    {
22221        self.prediction = v.map(|x| x.into());
22222        self
22223    }
22224
22225    /// Sets the value of [reference][crate::model::SummarizationHelpfulnessInstance::reference].
22226    pub fn set_reference<T>(mut self, v: T) -> Self
22227    where
22228        T: std::convert::Into<std::string::String>,
22229    {
22230        self.reference = std::option::Option::Some(v.into());
22231        self
22232    }
22233
22234    /// Sets or clears the value of [reference][crate::model::SummarizationHelpfulnessInstance::reference].
22235    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
22236    where
22237        T: std::convert::Into<std::string::String>,
22238    {
22239        self.reference = v.map(|x| x.into());
22240        self
22241    }
22242
22243    /// Sets the value of [context][crate::model::SummarizationHelpfulnessInstance::context].
22244    pub fn set_context<T>(mut self, v: T) -> Self
22245    where
22246        T: std::convert::Into<std::string::String>,
22247    {
22248        self.context = std::option::Option::Some(v.into());
22249        self
22250    }
22251
22252    /// Sets or clears the value of [context][crate::model::SummarizationHelpfulnessInstance::context].
22253    pub fn set_or_clear_context<T>(mut self, v: std::option::Option<T>) -> Self
22254    where
22255        T: std::convert::Into<std::string::String>,
22256    {
22257        self.context = v.map(|x| x.into());
22258        self
22259    }
22260
22261    /// Sets the value of [instruction][crate::model::SummarizationHelpfulnessInstance::instruction].
22262    pub fn set_instruction<T>(mut self, v: T) -> Self
22263    where
22264        T: std::convert::Into<std::string::String>,
22265    {
22266        self.instruction = std::option::Option::Some(v.into());
22267        self
22268    }
22269
22270    /// Sets or clears the value of [instruction][crate::model::SummarizationHelpfulnessInstance::instruction].
22271    pub fn set_or_clear_instruction<T>(mut self, v: std::option::Option<T>) -> Self
22272    where
22273        T: std::convert::Into<std::string::String>,
22274    {
22275        self.instruction = v.map(|x| x.into());
22276        self
22277    }
22278}
22279
22280#[cfg(feature = "evaluation-service")]
22281impl wkt::message::Message for SummarizationHelpfulnessInstance {
22282    fn typename() -> &'static str {
22283        "type.googleapis.com/google.cloud.aiplatform.v1.SummarizationHelpfulnessInstance"
22284    }
22285}
22286
22287/// Spec for summarization helpfulness score metric.
22288#[cfg(feature = "evaluation-service")]
22289#[derive(Clone, Default, PartialEq)]
22290#[non_exhaustive]
22291pub struct SummarizationHelpfulnessSpec {
22292    /// Optional. Whether to use instance.reference to compute summarization
22293    /// helpfulness.
22294    pub use_reference: bool,
22295
22296    /// Optional. Which version to use for evaluation.
22297    pub version: i32,
22298
22299    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22300}
22301
22302#[cfg(feature = "evaluation-service")]
22303impl SummarizationHelpfulnessSpec {
22304    pub fn new() -> Self {
22305        std::default::Default::default()
22306    }
22307
22308    /// Sets the value of [use_reference][crate::model::SummarizationHelpfulnessSpec::use_reference].
22309    pub fn set_use_reference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22310        self.use_reference = v.into();
22311        self
22312    }
22313
22314    /// Sets the value of [version][crate::model::SummarizationHelpfulnessSpec::version].
22315    pub fn set_version<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
22316        self.version = v.into();
22317        self
22318    }
22319}
22320
22321#[cfg(feature = "evaluation-service")]
22322impl wkt::message::Message for SummarizationHelpfulnessSpec {
22323    fn typename() -> &'static str {
22324        "type.googleapis.com/google.cloud.aiplatform.v1.SummarizationHelpfulnessSpec"
22325    }
22326}
22327
22328/// Spec for summarization helpfulness result.
22329#[cfg(feature = "evaluation-service")]
22330#[derive(Clone, Default, PartialEq)]
22331#[non_exhaustive]
22332pub struct SummarizationHelpfulnessResult {
22333    /// Output only. Summarization Helpfulness score.
22334    pub score: std::option::Option<f32>,
22335
22336    /// Output only. Explanation for summarization helpfulness score.
22337    pub explanation: std::string::String,
22338
22339    /// Output only. Confidence for summarization helpfulness score.
22340    pub confidence: std::option::Option<f32>,
22341
22342    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22343}
22344
22345#[cfg(feature = "evaluation-service")]
22346impl SummarizationHelpfulnessResult {
22347    pub fn new() -> Self {
22348        std::default::Default::default()
22349    }
22350
22351    /// Sets the value of [score][crate::model::SummarizationHelpfulnessResult::score].
22352    pub fn set_score<T>(mut self, v: T) -> Self
22353    where
22354        T: std::convert::Into<f32>,
22355    {
22356        self.score = std::option::Option::Some(v.into());
22357        self
22358    }
22359
22360    /// Sets or clears the value of [score][crate::model::SummarizationHelpfulnessResult::score].
22361    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
22362    where
22363        T: std::convert::Into<f32>,
22364    {
22365        self.score = v.map(|x| x.into());
22366        self
22367    }
22368
22369    /// Sets the value of [explanation][crate::model::SummarizationHelpfulnessResult::explanation].
22370    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22371        self.explanation = v.into();
22372        self
22373    }
22374
22375    /// Sets the value of [confidence][crate::model::SummarizationHelpfulnessResult::confidence].
22376    pub fn set_confidence<T>(mut self, v: T) -> Self
22377    where
22378        T: std::convert::Into<f32>,
22379    {
22380        self.confidence = std::option::Option::Some(v.into());
22381        self
22382    }
22383
22384    /// Sets or clears the value of [confidence][crate::model::SummarizationHelpfulnessResult::confidence].
22385    pub fn set_or_clear_confidence<T>(mut self, v: std::option::Option<T>) -> Self
22386    where
22387        T: std::convert::Into<f32>,
22388    {
22389        self.confidence = v.map(|x| x.into());
22390        self
22391    }
22392}
22393
22394#[cfg(feature = "evaluation-service")]
22395impl wkt::message::Message for SummarizationHelpfulnessResult {
22396    fn typename() -> &'static str {
22397        "type.googleapis.com/google.cloud.aiplatform.v1.SummarizationHelpfulnessResult"
22398    }
22399}
22400
22401/// Input for summarization verbosity metric.
22402#[cfg(feature = "evaluation-service")]
22403#[derive(Clone, Default, PartialEq)]
22404#[non_exhaustive]
22405pub struct SummarizationVerbosityInput {
22406    /// Required. Spec for summarization verbosity score metric.
22407    pub metric_spec: std::option::Option<crate::model::SummarizationVerbositySpec>,
22408
22409    /// Required. Summarization verbosity instance.
22410    pub instance: std::option::Option<crate::model::SummarizationVerbosityInstance>,
22411
22412    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22413}
22414
22415#[cfg(feature = "evaluation-service")]
22416impl SummarizationVerbosityInput {
22417    pub fn new() -> Self {
22418        std::default::Default::default()
22419    }
22420
22421    /// Sets the value of [metric_spec][crate::model::SummarizationVerbosityInput::metric_spec].
22422    pub fn set_metric_spec<T>(mut self, v: T) -> Self
22423    where
22424        T: std::convert::Into<crate::model::SummarizationVerbositySpec>,
22425    {
22426        self.metric_spec = std::option::Option::Some(v.into());
22427        self
22428    }
22429
22430    /// Sets or clears the value of [metric_spec][crate::model::SummarizationVerbosityInput::metric_spec].
22431    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
22432    where
22433        T: std::convert::Into<crate::model::SummarizationVerbositySpec>,
22434    {
22435        self.metric_spec = v.map(|x| x.into());
22436        self
22437    }
22438
22439    /// Sets the value of [instance][crate::model::SummarizationVerbosityInput::instance].
22440    pub fn set_instance<T>(mut self, v: T) -> Self
22441    where
22442        T: std::convert::Into<crate::model::SummarizationVerbosityInstance>,
22443    {
22444        self.instance = std::option::Option::Some(v.into());
22445        self
22446    }
22447
22448    /// Sets or clears the value of [instance][crate::model::SummarizationVerbosityInput::instance].
22449    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
22450    where
22451        T: std::convert::Into<crate::model::SummarizationVerbosityInstance>,
22452    {
22453        self.instance = v.map(|x| x.into());
22454        self
22455    }
22456}
22457
22458#[cfg(feature = "evaluation-service")]
22459impl wkt::message::Message for SummarizationVerbosityInput {
22460    fn typename() -> &'static str {
22461        "type.googleapis.com/google.cloud.aiplatform.v1.SummarizationVerbosityInput"
22462    }
22463}
22464
22465/// Spec for summarization verbosity instance.
22466#[cfg(feature = "evaluation-service")]
22467#[derive(Clone, Default, PartialEq)]
22468#[non_exhaustive]
22469pub struct SummarizationVerbosityInstance {
22470    /// Required. Output of the evaluated model.
22471    pub prediction: std::option::Option<std::string::String>,
22472
22473    /// Optional. Ground truth used to compare against the prediction.
22474    pub reference: std::option::Option<std::string::String>,
22475
22476    /// Required. Text to be summarized.
22477    pub context: std::option::Option<std::string::String>,
22478
22479    /// Optional. Summarization prompt for LLM.
22480    pub instruction: std::option::Option<std::string::String>,
22481
22482    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22483}
22484
22485#[cfg(feature = "evaluation-service")]
22486impl SummarizationVerbosityInstance {
22487    pub fn new() -> Self {
22488        std::default::Default::default()
22489    }
22490
22491    /// Sets the value of [prediction][crate::model::SummarizationVerbosityInstance::prediction].
22492    pub fn set_prediction<T>(mut self, v: T) -> Self
22493    where
22494        T: std::convert::Into<std::string::String>,
22495    {
22496        self.prediction = std::option::Option::Some(v.into());
22497        self
22498    }
22499
22500    /// Sets or clears the value of [prediction][crate::model::SummarizationVerbosityInstance::prediction].
22501    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
22502    where
22503        T: std::convert::Into<std::string::String>,
22504    {
22505        self.prediction = v.map(|x| x.into());
22506        self
22507    }
22508
22509    /// Sets the value of [reference][crate::model::SummarizationVerbosityInstance::reference].
22510    pub fn set_reference<T>(mut self, v: T) -> Self
22511    where
22512        T: std::convert::Into<std::string::String>,
22513    {
22514        self.reference = std::option::Option::Some(v.into());
22515        self
22516    }
22517
22518    /// Sets or clears the value of [reference][crate::model::SummarizationVerbosityInstance::reference].
22519    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
22520    where
22521        T: std::convert::Into<std::string::String>,
22522    {
22523        self.reference = v.map(|x| x.into());
22524        self
22525    }
22526
22527    /// Sets the value of [context][crate::model::SummarizationVerbosityInstance::context].
22528    pub fn set_context<T>(mut self, v: T) -> Self
22529    where
22530        T: std::convert::Into<std::string::String>,
22531    {
22532        self.context = std::option::Option::Some(v.into());
22533        self
22534    }
22535
22536    /// Sets or clears the value of [context][crate::model::SummarizationVerbosityInstance::context].
22537    pub fn set_or_clear_context<T>(mut self, v: std::option::Option<T>) -> Self
22538    where
22539        T: std::convert::Into<std::string::String>,
22540    {
22541        self.context = v.map(|x| x.into());
22542        self
22543    }
22544
22545    /// Sets the value of [instruction][crate::model::SummarizationVerbosityInstance::instruction].
22546    pub fn set_instruction<T>(mut self, v: T) -> Self
22547    where
22548        T: std::convert::Into<std::string::String>,
22549    {
22550        self.instruction = std::option::Option::Some(v.into());
22551        self
22552    }
22553
22554    /// Sets or clears the value of [instruction][crate::model::SummarizationVerbosityInstance::instruction].
22555    pub fn set_or_clear_instruction<T>(mut self, v: std::option::Option<T>) -> Self
22556    where
22557        T: std::convert::Into<std::string::String>,
22558    {
22559        self.instruction = v.map(|x| x.into());
22560        self
22561    }
22562}
22563
22564#[cfg(feature = "evaluation-service")]
22565impl wkt::message::Message for SummarizationVerbosityInstance {
22566    fn typename() -> &'static str {
22567        "type.googleapis.com/google.cloud.aiplatform.v1.SummarizationVerbosityInstance"
22568    }
22569}
22570
22571/// Spec for summarization verbosity score metric.
22572#[cfg(feature = "evaluation-service")]
22573#[derive(Clone, Default, PartialEq)]
22574#[non_exhaustive]
22575pub struct SummarizationVerbositySpec {
22576    /// Optional. Whether to use instance.reference to compute summarization
22577    /// verbosity.
22578    pub use_reference: bool,
22579
22580    /// Optional. Which version to use for evaluation.
22581    pub version: i32,
22582
22583    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22584}
22585
22586#[cfg(feature = "evaluation-service")]
22587impl SummarizationVerbositySpec {
22588    pub fn new() -> Self {
22589        std::default::Default::default()
22590    }
22591
22592    /// Sets the value of [use_reference][crate::model::SummarizationVerbositySpec::use_reference].
22593    pub fn set_use_reference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22594        self.use_reference = v.into();
22595        self
22596    }
22597
22598    /// Sets the value of [version][crate::model::SummarizationVerbositySpec::version].
22599    pub fn set_version<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
22600        self.version = v.into();
22601        self
22602    }
22603}
22604
22605#[cfg(feature = "evaluation-service")]
22606impl wkt::message::Message for SummarizationVerbositySpec {
22607    fn typename() -> &'static str {
22608        "type.googleapis.com/google.cloud.aiplatform.v1.SummarizationVerbositySpec"
22609    }
22610}
22611
22612/// Spec for summarization verbosity result.
22613#[cfg(feature = "evaluation-service")]
22614#[derive(Clone, Default, PartialEq)]
22615#[non_exhaustive]
22616pub struct SummarizationVerbosityResult {
22617    /// Output only. Summarization Verbosity score.
22618    pub score: std::option::Option<f32>,
22619
22620    /// Output only. Explanation for summarization verbosity score.
22621    pub explanation: std::string::String,
22622
22623    /// Output only. Confidence for summarization verbosity score.
22624    pub confidence: std::option::Option<f32>,
22625
22626    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22627}
22628
22629#[cfg(feature = "evaluation-service")]
22630impl SummarizationVerbosityResult {
22631    pub fn new() -> Self {
22632        std::default::Default::default()
22633    }
22634
22635    /// Sets the value of [score][crate::model::SummarizationVerbosityResult::score].
22636    pub fn set_score<T>(mut self, v: T) -> Self
22637    where
22638        T: std::convert::Into<f32>,
22639    {
22640        self.score = std::option::Option::Some(v.into());
22641        self
22642    }
22643
22644    /// Sets or clears the value of [score][crate::model::SummarizationVerbosityResult::score].
22645    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
22646    where
22647        T: std::convert::Into<f32>,
22648    {
22649        self.score = v.map(|x| x.into());
22650        self
22651    }
22652
22653    /// Sets the value of [explanation][crate::model::SummarizationVerbosityResult::explanation].
22654    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22655        self.explanation = v.into();
22656        self
22657    }
22658
22659    /// Sets the value of [confidence][crate::model::SummarizationVerbosityResult::confidence].
22660    pub fn set_confidence<T>(mut self, v: T) -> Self
22661    where
22662        T: std::convert::Into<f32>,
22663    {
22664        self.confidence = std::option::Option::Some(v.into());
22665        self
22666    }
22667
22668    /// Sets or clears the value of [confidence][crate::model::SummarizationVerbosityResult::confidence].
22669    pub fn set_or_clear_confidence<T>(mut self, v: std::option::Option<T>) -> Self
22670    where
22671        T: std::convert::Into<f32>,
22672    {
22673        self.confidence = v.map(|x| x.into());
22674        self
22675    }
22676}
22677
22678#[cfg(feature = "evaluation-service")]
22679impl wkt::message::Message for SummarizationVerbosityResult {
22680    fn typename() -> &'static str {
22681        "type.googleapis.com/google.cloud.aiplatform.v1.SummarizationVerbosityResult"
22682    }
22683}
22684
22685/// Input for question answering quality metric.
22686#[cfg(feature = "evaluation-service")]
22687#[derive(Clone, Default, PartialEq)]
22688#[non_exhaustive]
22689pub struct QuestionAnsweringQualityInput {
22690    /// Required. Spec for question answering quality score metric.
22691    pub metric_spec: std::option::Option<crate::model::QuestionAnsweringQualitySpec>,
22692
22693    /// Required. Question answering quality instance.
22694    pub instance: std::option::Option<crate::model::QuestionAnsweringQualityInstance>,
22695
22696    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22697}
22698
22699#[cfg(feature = "evaluation-service")]
22700impl QuestionAnsweringQualityInput {
22701    pub fn new() -> Self {
22702        std::default::Default::default()
22703    }
22704
22705    /// Sets the value of [metric_spec][crate::model::QuestionAnsweringQualityInput::metric_spec].
22706    pub fn set_metric_spec<T>(mut self, v: T) -> Self
22707    where
22708        T: std::convert::Into<crate::model::QuestionAnsweringQualitySpec>,
22709    {
22710        self.metric_spec = std::option::Option::Some(v.into());
22711        self
22712    }
22713
22714    /// Sets or clears the value of [metric_spec][crate::model::QuestionAnsweringQualityInput::metric_spec].
22715    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
22716    where
22717        T: std::convert::Into<crate::model::QuestionAnsweringQualitySpec>,
22718    {
22719        self.metric_spec = v.map(|x| x.into());
22720        self
22721    }
22722
22723    /// Sets the value of [instance][crate::model::QuestionAnsweringQualityInput::instance].
22724    pub fn set_instance<T>(mut self, v: T) -> Self
22725    where
22726        T: std::convert::Into<crate::model::QuestionAnsweringQualityInstance>,
22727    {
22728        self.instance = std::option::Option::Some(v.into());
22729        self
22730    }
22731
22732    /// Sets or clears the value of [instance][crate::model::QuestionAnsweringQualityInput::instance].
22733    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
22734    where
22735        T: std::convert::Into<crate::model::QuestionAnsweringQualityInstance>,
22736    {
22737        self.instance = v.map(|x| x.into());
22738        self
22739    }
22740}
22741
22742#[cfg(feature = "evaluation-service")]
22743impl wkt::message::Message for QuestionAnsweringQualityInput {
22744    fn typename() -> &'static str {
22745        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringQualityInput"
22746    }
22747}
22748
22749/// Spec for question answering quality instance.
22750#[cfg(feature = "evaluation-service")]
22751#[derive(Clone, Default, PartialEq)]
22752#[non_exhaustive]
22753pub struct QuestionAnsweringQualityInstance {
22754    /// Required. Output of the evaluated model.
22755    pub prediction: std::option::Option<std::string::String>,
22756
22757    /// Optional. Ground truth used to compare against the prediction.
22758    pub reference: std::option::Option<std::string::String>,
22759
22760    /// Required. Text to answer the question.
22761    pub context: std::option::Option<std::string::String>,
22762
22763    /// Required. Question Answering prompt for LLM.
22764    pub instruction: std::option::Option<std::string::String>,
22765
22766    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22767}
22768
22769#[cfg(feature = "evaluation-service")]
22770impl QuestionAnsweringQualityInstance {
22771    pub fn new() -> Self {
22772        std::default::Default::default()
22773    }
22774
22775    /// Sets the value of [prediction][crate::model::QuestionAnsweringQualityInstance::prediction].
22776    pub fn set_prediction<T>(mut self, v: T) -> Self
22777    where
22778        T: std::convert::Into<std::string::String>,
22779    {
22780        self.prediction = std::option::Option::Some(v.into());
22781        self
22782    }
22783
22784    /// Sets or clears the value of [prediction][crate::model::QuestionAnsweringQualityInstance::prediction].
22785    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
22786    where
22787        T: std::convert::Into<std::string::String>,
22788    {
22789        self.prediction = v.map(|x| x.into());
22790        self
22791    }
22792
22793    /// Sets the value of [reference][crate::model::QuestionAnsweringQualityInstance::reference].
22794    pub fn set_reference<T>(mut self, v: T) -> Self
22795    where
22796        T: std::convert::Into<std::string::String>,
22797    {
22798        self.reference = std::option::Option::Some(v.into());
22799        self
22800    }
22801
22802    /// Sets or clears the value of [reference][crate::model::QuestionAnsweringQualityInstance::reference].
22803    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
22804    where
22805        T: std::convert::Into<std::string::String>,
22806    {
22807        self.reference = v.map(|x| x.into());
22808        self
22809    }
22810
22811    /// Sets the value of [context][crate::model::QuestionAnsweringQualityInstance::context].
22812    pub fn set_context<T>(mut self, v: T) -> Self
22813    where
22814        T: std::convert::Into<std::string::String>,
22815    {
22816        self.context = std::option::Option::Some(v.into());
22817        self
22818    }
22819
22820    /// Sets or clears the value of [context][crate::model::QuestionAnsweringQualityInstance::context].
22821    pub fn set_or_clear_context<T>(mut self, v: std::option::Option<T>) -> Self
22822    where
22823        T: std::convert::Into<std::string::String>,
22824    {
22825        self.context = v.map(|x| x.into());
22826        self
22827    }
22828
22829    /// Sets the value of [instruction][crate::model::QuestionAnsweringQualityInstance::instruction].
22830    pub fn set_instruction<T>(mut self, v: T) -> Self
22831    where
22832        T: std::convert::Into<std::string::String>,
22833    {
22834        self.instruction = std::option::Option::Some(v.into());
22835        self
22836    }
22837
22838    /// Sets or clears the value of [instruction][crate::model::QuestionAnsweringQualityInstance::instruction].
22839    pub fn set_or_clear_instruction<T>(mut self, v: std::option::Option<T>) -> Self
22840    where
22841        T: std::convert::Into<std::string::String>,
22842    {
22843        self.instruction = v.map(|x| x.into());
22844        self
22845    }
22846}
22847
22848#[cfg(feature = "evaluation-service")]
22849impl wkt::message::Message for QuestionAnsweringQualityInstance {
22850    fn typename() -> &'static str {
22851        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringQualityInstance"
22852    }
22853}
22854
22855/// Spec for question answering quality score metric.
22856#[cfg(feature = "evaluation-service")]
22857#[derive(Clone, Default, PartialEq)]
22858#[non_exhaustive]
22859pub struct QuestionAnsweringQualitySpec {
22860    /// Optional. Whether to use instance.reference to compute question answering
22861    /// quality.
22862    pub use_reference: bool,
22863
22864    /// Optional. Which version to use for evaluation.
22865    pub version: i32,
22866
22867    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22868}
22869
22870#[cfg(feature = "evaluation-service")]
22871impl QuestionAnsweringQualitySpec {
22872    pub fn new() -> Self {
22873        std::default::Default::default()
22874    }
22875
22876    /// Sets the value of [use_reference][crate::model::QuestionAnsweringQualitySpec::use_reference].
22877    pub fn set_use_reference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22878        self.use_reference = v.into();
22879        self
22880    }
22881
22882    /// Sets the value of [version][crate::model::QuestionAnsweringQualitySpec::version].
22883    pub fn set_version<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
22884        self.version = v.into();
22885        self
22886    }
22887}
22888
22889#[cfg(feature = "evaluation-service")]
22890impl wkt::message::Message for QuestionAnsweringQualitySpec {
22891    fn typename() -> &'static str {
22892        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringQualitySpec"
22893    }
22894}
22895
22896/// Spec for question answering quality result.
22897#[cfg(feature = "evaluation-service")]
22898#[derive(Clone, Default, PartialEq)]
22899#[non_exhaustive]
22900pub struct QuestionAnsweringQualityResult {
22901    /// Output only. Question Answering Quality score.
22902    pub score: std::option::Option<f32>,
22903
22904    /// Output only. Explanation for question answering quality score.
22905    pub explanation: std::string::String,
22906
22907    /// Output only. Confidence for question answering quality score.
22908    pub confidence: std::option::Option<f32>,
22909
22910    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22911}
22912
22913#[cfg(feature = "evaluation-service")]
22914impl QuestionAnsweringQualityResult {
22915    pub fn new() -> Self {
22916        std::default::Default::default()
22917    }
22918
22919    /// Sets the value of [score][crate::model::QuestionAnsweringQualityResult::score].
22920    pub fn set_score<T>(mut self, v: T) -> Self
22921    where
22922        T: std::convert::Into<f32>,
22923    {
22924        self.score = std::option::Option::Some(v.into());
22925        self
22926    }
22927
22928    /// Sets or clears the value of [score][crate::model::QuestionAnsweringQualityResult::score].
22929    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
22930    where
22931        T: std::convert::Into<f32>,
22932    {
22933        self.score = v.map(|x| x.into());
22934        self
22935    }
22936
22937    /// Sets the value of [explanation][crate::model::QuestionAnsweringQualityResult::explanation].
22938    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22939        self.explanation = v.into();
22940        self
22941    }
22942
22943    /// Sets the value of [confidence][crate::model::QuestionAnsweringQualityResult::confidence].
22944    pub fn set_confidence<T>(mut self, v: T) -> Self
22945    where
22946        T: std::convert::Into<f32>,
22947    {
22948        self.confidence = std::option::Option::Some(v.into());
22949        self
22950    }
22951
22952    /// Sets or clears the value of [confidence][crate::model::QuestionAnsweringQualityResult::confidence].
22953    pub fn set_or_clear_confidence<T>(mut self, v: std::option::Option<T>) -> Self
22954    where
22955        T: std::convert::Into<f32>,
22956    {
22957        self.confidence = v.map(|x| x.into());
22958        self
22959    }
22960}
22961
22962#[cfg(feature = "evaluation-service")]
22963impl wkt::message::Message for QuestionAnsweringQualityResult {
22964    fn typename() -> &'static str {
22965        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringQualityResult"
22966    }
22967}
22968
22969/// Input for pairwise question answering quality metric.
22970#[cfg(feature = "evaluation-service")]
22971#[derive(Clone, Default, PartialEq)]
22972#[non_exhaustive]
22973pub struct PairwiseQuestionAnsweringQualityInput {
22974    /// Required. Spec for pairwise question answering quality score metric.
22975    pub metric_spec: std::option::Option<crate::model::PairwiseQuestionAnsweringQualitySpec>,
22976
22977    /// Required. Pairwise question answering quality instance.
22978    pub instance: std::option::Option<crate::model::PairwiseQuestionAnsweringQualityInstance>,
22979
22980    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22981}
22982
22983#[cfg(feature = "evaluation-service")]
22984impl PairwiseQuestionAnsweringQualityInput {
22985    pub fn new() -> Self {
22986        std::default::Default::default()
22987    }
22988
22989    /// Sets the value of [metric_spec][crate::model::PairwiseQuestionAnsweringQualityInput::metric_spec].
22990    pub fn set_metric_spec<T>(mut self, v: T) -> Self
22991    where
22992        T: std::convert::Into<crate::model::PairwiseQuestionAnsweringQualitySpec>,
22993    {
22994        self.metric_spec = std::option::Option::Some(v.into());
22995        self
22996    }
22997
22998    /// Sets or clears the value of [metric_spec][crate::model::PairwiseQuestionAnsweringQualityInput::metric_spec].
22999    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
23000    where
23001        T: std::convert::Into<crate::model::PairwiseQuestionAnsweringQualitySpec>,
23002    {
23003        self.metric_spec = v.map(|x| x.into());
23004        self
23005    }
23006
23007    /// Sets the value of [instance][crate::model::PairwiseQuestionAnsweringQualityInput::instance].
23008    pub fn set_instance<T>(mut self, v: T) -> Self
23009    where
23010        T: std::convert::Into<crate::model::PairwiseQuestionAnsweringQualityInstance>,
23011    {
23012        self.instance = std::option::Option::Some(v.into());
23013        self
23014    }
23015
23016    /// Sets or clears the value of [instance][crate::model::PairwiseQuestionAnsweringQualityInput::instance].
23017    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
23018    where
23019        T: std::convert::Into<crate::model::PairwiseQuestionAnsweringQualityInstance>,
23020    {
23021        self.instance = v.map(|x| x.into());
23022        self
23023    }
23024}
23025
23026#[cfg(feature = "evaluation-service")]
23027impl wkt::message::Message for PairwiseQuestionAnsweringQualityInput {
23028    fn typename() -> &'static str {
23029        "type.googleapis.com/google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityInput"
23030    }
23031}
23032
23033/// Spec for pairwise question answering quality instance.
23034#[cfg(feature = "evaluation-service")]
23035#[derive(Clone, Default, PartialEq)]
23036#[non_exhaustive]
23037pub struct PairwiseQuestionAnsweringQualityInstance {
23038    /// Required. Output of the candidate model.
23039    pub prediction: std::option::Option<std::string::String>,
23040
23041    /// Required. Output of the baseline model.
23042    pub baseline_prediction: std::option::Option<std::string::String>,
23043
23044    /// Optional. Ground truth used to compare against the prediction.
23045    pub reference: std::option::Option<std::string::String>,
23046
23047    /// Required. Text to answer the question.
23048    pub context: std::option::Option<std::string::String>,
23049
23050    /// Required. Question Answering prompt for LLM.
23051    pub instruction: std::option::Option<std::string::String>,
23052
23053    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23054}
23055
23056#[cfg(feature = "evaluation-service")]
23057impl PairwiseQuestionAnsweringQualityInstance {
23058    pub fn new() -> Self {
23059        std::default::Default::default()
23060    }
23061
23062    /// Sets the value of [prediction][crate::model::PairwiseQuestionAnsweringQualityInstance::prediction].
23063    pub fn set_prediction<T>(mut self, v: T) -> Self
23064    where
23065        T: std::convert::Into<std::string::String>,
23066    {
23067        self.prediction = std::option::Option::Some(v.into());
23068        self
23069    }
23070
23071    /// Sets or clears the value of [prediction][crate::model::PairwiseQuestionAnsweringQualityInstance::prediction].
23072    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
23073    where
23074        T: std::convert::Into<std::string::String>,
23075    {
23076        self.prediction = v.map(|x| x.into());
23077        self
23078    }
23079
23080    /// Sets the value of [baseline_prediction][crate::model::PairwiseQuestionAnsweringQualityInstance::baseline_prediction].
23081    pub fn set_baseline_prediction<T>(mut self, v: T) -> Self
23082    where
23083        T: std::convert::Into<std::string::String>,
23084    {
23085        self.baseline_prediction = std::option::Option::Some(v.into());
23086        self
23087    }
23088
23089    /// Sets or clears the value of [baseline_prediction][crate::model::PairwiseQuestionAnsweringQualityInstance::baseline_prediction].
23090    pub fn set_or_clear_baseline_prediction<T>(mut self, v: std::option::Option<T>) -> Self
23091    where
23092        T: std::convert::Into<std::string::String>,
23093    {
23094        self.baseline_prediction = v.map(|x| x.into());
23095        self
23096    }
23097
23098    /// Sets the value of [reference][crate::model::PairwiseQuestionAnsweringQualityInstance::reference].
23099    pub fn set_reference<T>(mut self, v: T) -> Self
23100    where
23101        T: std::convert::Into<std::string::String>,
23102    {
23103        self.reference = std::option::Option::Some(v.into());
23104        self
23105    }
23106
23107    /// Sets or clears the value of [reference][crate::model::PairwiseQuestionAnsweringQualityInstance::reference].
23108    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
23109    where
23110        T: std::convert::Into<std::string::String>,
23111    {
23112        self.reference = v.map(|x| x.into());
23113        self
23114    }
23115
23116    /// Sets the value of [context][crate::model::PairwiseQuestionAnsweringQualityInstance::context].
23117    pub fn set_context<T>(mut self, v: T) -> Self
23118    where
23119        T: std::convert::Into<std::string::String>,
23120    {
23121        self.context = std::option::Option::Some(v.into());
23122        self
23123    }
23124
23125    /// Sets or clears the value of [context][crate::model::PairwiseQuestionAnsweringQualityInstance::context].
23126    pub fn set_or_clear_context<T>(mut self, v: std::option::Option<T>) -> Self
23127    where
23128        T: std::convert::Into<std::string::String>,
23129    {
23130        self.context = v.map(|x| x.into());
23131        self
23132    }
23133
23134    /// Sets the value of [instruction][crate::model::PairwiseQuestionAnsweringQualityInstance::instruction].
23135    pub fn set_instruction<T>(mut self, v: T) -> Self
23136    where
23137        T: std::convert::Into<std::string::String>,
23138    {
23139        self.instruction = std::option::Option::Some(v.into());
23140        self
23141    }
23142
23143    /// Sets or clears the value of [instruction][crate::model::PairwiseQuestionAnsweringQualityInstance::instruction].
23144    pub fn set_or_clear_instruction<T>(mut self, v: std::option::Option<T>) -> Self
23145    where
23146        T: std::convert::Into<std::string::String>,
23147    {
23148        self.instruction = v.map(|x| x.into());
23149        self
23150    }
23151}
23152
23153#[cfg(feature = "evaluation-service")]
23154impl wkt::message::Message for PairwiseQuestionAnsweringQualityInstance {
23155    fn typename() -> &'static str {
23156        "type.googleapis.com/google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityInstance"
23157    }
23158}
23159
23160/// Spec for pairwise question answering quality score metric.
23161#[cfg(feature = "evaluation-service")]
23162#[derive(Clone, Default, PartialEq)]
23163#[non_exhaustive]
23164pub struct PairwiseQuestionAnsweringQualitySpec {
23165    /// Optional. Whether to use instance.reference to compute question answering
23166    /// quality.
23167    pub use_reference: bool,
23168
23169    /// Optional. Which version to use for evaluation.
23170    pub version: i32,
23171
23172    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23173}
23174
23175#[cfg(feature = "evaluation-service")]
23176impl PairwiseQuestionAnsweringQualitySpec {
23177    pub fn new() -> Self {
23178        std::default::Default::default()
23179    }
23180
23181    /// Sets the value of [use_reference][crate::model::PairwiseQuestionAnsweringQualitySpec::use_reference].
23182    pub fn set_use_reference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23183        self.use_reference = v.into();
23184        self
23185    }
23186
23187    /// Sets the value of [version][crate::model::PairwiseQuestionAnsweringQualitySpec::version].
23188    pub fn set_version<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
23189        self.version = v.into();
23190        self
23191    }
23192}
23193
23194#[cfg(feature = "evaluation-service")]
23195impl wkt::message::Message for PairwiseQuestionAnsweringQualitySpec {
23196    fn typename() -> &'static str {
23197        "type.googleapis.com/google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualitySpec"
23198    }
23199}
23200
23201/// Spec for pairwise question answering quality result.
23202#[cfg(feature = "evaluation-service")]
23203#[derive(Clone, Default, PartialEq)]
23204#[non_exhaustive]
23205pub struct PairwiseQuestionAnsweringQualityResult {
23206    /// Output only. Pairwise question answering prediction choice.
23207    pub pairwise_choice: crate::model::PairwiseChoice,
23208
23209    /// Output only. Explanation for question answering quality score.
23210    pub explanation: std::string::String,
23211
23212    /// Output only. Confidence for question answering quality score.
23213    pub confidence: std::option::Option<f32>,
23214
23215    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23216}
23217
23218#[cfg(feature = "evaluation-service")]
23219impl PairwiseQuestionAnsweringQualityResult {
23220    pub fn new() -> Self {
23221        std::default::Default::default()
23222    }
23223
23224    /// Sets the value of [pairwise_choice][crate::model::PairwiseQuestionAnsweringQualityResult::pairwise_choice].
23225    pub fn set_pairwise_choice<T: std::convert::Into<crate::model::PairwiseChoice>>(
23226        mut self,
23227        v: T,
23228    ) -> Self {
23229        self.pairwise_choice = v.into();
23230        self
23231    }
23232
23233    /// Sets the value of [explanation][crate::model::PairwiseQuestionAnsweringQualityResult::explanation].
23234    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23235        self.explanation = v.into();
23236        self
23237    }
23238
23239    /// Sets the value of [confidence][crate::model::PairwiseQuestionAnsweringQualityResult::confidence].
23240    pub fn set_confidence<T>(mut self, v: T) -> Self
23241    where
23242        T: std::convert::Into<f32>,
23243    {
23244        self.confidence = std::option::Option::Some(v.into());
23245        self
23246    }
23247
23248    /// Sets or clears the value of [confidence][crate::model::PairwiseQuestionAnsweringQualityResult::confidence].
23249    pub fn set_or_clear_confidence<T>(mut self, v: std::option::Option<T>) -> Self
23250    where
23251        T: std::convert::Into<f32>,
23252    {
23253        self.confidence = v.map(|x| x.into());
23254        self
23255    }
23256}
23257
23258#[cfg(feature = "evaluation-service")]
23259impl wkt::message::Message for PairwiseQuestionAnsweringQualityResult {
23260    fn typename() -> &'static str {
23261        "type.googleapis.com/google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityResult"
23262    }
23263}
23264
23265/// Input for question answering relevance metric.
23266#[cfg(feature = "evaluation-service")]
23267#[derive(Clone, Default, PartialEq)]
23268#[non_exhaustive]
23269pub struct QuestionAnsweringRelevanceInput {
23270    /// Required. Spec for question answering relevance score metric.
23271    pub metric_spec: std::option::Option<crate::model::QuestionAnsweringRelevanceSpec>,
23272
23273    /// Required. Question answering relevance instance.
23274    pub instance: std::option::Option<crate::model::QuestionAnsweringRelevanceInstance>,
23275
23276    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23277}
23278
23279#[cfg(feature = "evaluation-service")]
23280impl QuestionAnsweringRelevanceInput {
23281    pub fn new() -> Self {
23282        std::default::Default::default()
23283    }
23284
23285    /// Sets the value of [metric_spec][crate::model::QuestionAnsweringRelevanceInput::metric_spec].
23286    pub fn set_metric_spec<T>(mut self, v: T) -> Self
23287    where
23288        T: std::convert::Into<crate::model::QuestionAnsweringRelevanceSpec>,
23289    {
23290        self.metric_spec = std::option::Option::Some(v.into());
23291        self
23292    }
23293
23294    /// Sets or clears the value of [metric_spec][crate::model::QuestionAnsweringRelevanceInput::metric_spec].
23295    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
23296    where
23297        T: std::convert::Into<crate::model::QuestionAnsweringRelevanceSpec>,
23298    {
23299        self.metric_spec = v.map(|x| x.into());
23300        self
23301    }
23302
23303    /// Sets the value of [instance][crate::model::QuestionAnsweringRelevanceInput::instance].
23304    pub fn set_instance<T>(mut self, v: T) -> Self
23305    where
23306        T: std::convert::Into<crate::model::QuestionAnsweringRelevanceInstance>,
23307    {
23308        self.instance = std::option::Option::Some(v.into());
23309        self
23310    }
23311
23312    /// Sets or clears the value of [instance][crate::model::QuestionAnsweringRelevanceInput::instance].
23313    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
23314    where
23315        T: std::convert::Into<crate::model::QuestionAnsweringRelevanceInstance>,
23316    {
23317        self.instance = v.map(|x| x.into());
23318        self
23319    }
23320}
23321
23322#[cfg(feature = "evaluation-service")]
23323impl wkt::message::Message for QuestionAnsweringRelevanceInput {
23324    fn typename() -> &'static str {
23325        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringRelevanceInput"
23326    }
23327}
23328
23329/// Spec for question answering relevance instance.
23330#[cfg(feature = "evaluation-service")]
23331#[derive(Clone, Default, PartialEq)]
23332#[non_exhaustive]
23333pub struct QuestionAnsweringRelevanceInstance {
23334    /// Required. Output of the evaluated model.
23335    pub prediction: std::option::Option<std::string::String>,
23336
23337    /// Optional. Ground truth used to compare against the prediction.
23338    pub reference: std::option::Option<std::string::String>,
23339
23340    /// Optional. Text provided as context to answer the question.
23341    pub context: std::option::Option<std::string::String>,
23342
23343    /// Required. The question asked and other instruction in the inference prompt.
23344    pub instruction: std::option::Option<std::string::String>,
23345
23346    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23347}
23348
23349#[cfg(feature = "evaluation-service")]
23350impl QuestionAnsweringRelevanceInstance {
23351    pub fn new() -> Self {
23352        std::default::Default::default()
23353    }
23354
23355    /// Sets the value of [prediction][crate::model::QuestionAnsweringRelevanceInstance::prediction].
23356    pub fn set_prediction<T>(mut self, v: T) -> Self
23357    where
23358        T: std::convert::Into<std::string::String>,
23359    {
23360        self.prediction = std::option::Option::Some(v.into());
23361        self
23362    }
23363
23364    /// Sets or clears the value of [prediction][crate::model::QuestionAnsweringRelevanceInstance::prediction].
23365    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
23366    where
23367        T: std::convert::Into<std::string::String>,
23368    {
23369        self.prediction = v.map(|x| x.into());
23370        self
23371    }
23372
23373    /// Sets the value of [reference][crate::model::QuestionAnsweringRelevanceInstance::reference].
23374    pub fn set_reference<T>(mut self, v: T) -> Self
23375    where
23376        T: std::convert::Into<std::string::String>,
23377    {
23378        self.reference = std::option::Option::Some(v.into());
23379        self
23380    }
23381
23382    /// Sets or clears the value of [reference][crate::model::QuestionAnsweringRelevanceInstance::reference].
23383    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
23384    where
23385        T: std::convert::Into<std::string::String>,
23386    {
23387        self.reference = v.map(|x| x.into());
23388        self
23389    }
23390
23391    /// Sets the value of [context][crate::model::QuestionAnsweringRelevanceInstance::context].
23392    pub fn set_context<T>(mut self, v: T) -> Self
23393    where
23394        T: std::convert::Into<std::string::String>,
23395    {
23396        self.context = std::option::Option::Some(v.into());
23397        self
23398    }
23399
23400    /// Sets or clears the value of [context][crate::model::QuestionAnsweringRelevanceInstance::context].
23401    pub fn set_or_clear_context<T>(mut self, v: std::option::Option<T>) -> Self
23402    where
23403        T: std::convert::Into<std::string::String>,
23404    {
23405        self.context = v.map(|x| x.into());
23406        self
23407    }
23408
23409    /// Sets the value of [instruction][crate::model::QuestionAnsweringRelevanceInstance::instruction].
23410    pub fn set_instruction<T>(mut self, v: T) -> Self
23411    where
23412        T: std::convert::Into<std::string::String>,
23413    {
23414        self.instruction = std::option::Option::Some(v.into());
23415        self
23416    }
23417
23418    /// Sets or clears the value of [instruction][crate::model::QuestionAnsweringRelevanceInstance::instruction].
23419    pub fn set_or_clear_instruction<T>(mut self, v: std::option::Option<T>) -> Self
23420    where
23421        T: std::convert::Into<std::string::String>,
23422    {
23423        self.instruction = v.map(|x| x.into());
23424        self
23425    }
23426}
23427
23428#[cfg(feature = "evaluation-service")]
23429impl wkt::message::Message for QuestionAnsweringRelevanceInstance {
23430    fn typename() -> &'static str {
23431        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringRelevanceInstance"
23432    }
23433}
23434
23435/// Spec for question answering relevance metric.
23436#[cfg(feature = "evaluation-service")]
23437#[derive(Clone, Default, PartialEq)]
23438#[non_exhaustive]
23439pub struct QuestionAnsweringRelevanceSpec {
23440    /// Optional. Whether to use instance.reference to compute question answering
23441    /// relevance.
23442    pub use_reference: bool,
23443
23444    /// Optional. Which version to use for evaluation.
23445    pub version: i32,
23446
23447    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23448}
23449
23450#[cfg(feature = "evaluation-service")]
23451impl QuestionAnsweringRelevanceSpec {
23452    pub fn new() -> Self {
23453        std::default::Default::default()
23454    }
23455
23456    /// Sets the value of [use_reference][crate::model::QuestionAnsweringRelevanceSpec::use_reference].
23457    pub fn set_use_reference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23458        self.use_reference = v.into();
23459        self
23460    }
23461
23462    /// Sets the value of [version][crate::model::QuestionAnsweringRelevanceSpec::version].
23463    pub fn set_version<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
23464        self.version = v.into();
23465        self
23466    }
23467}
23468
23469#[cfg(feature = "evaluation-service")]
23470impl wkt::message::Message for QuestionAnsweringRelevanceSpec {
23471    fn typename() -> &'static str {
23472        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringRelevanceSpec"
23473    }
23474}
23475
23476/// Spec for question answering relevance result.
23477#[cfg(feature = "evaluation-service")]
23478#[derive(Clone, Default, PartialEq)]
23479#[non_exhaustive]
23480pub struct QuestionAnsweringRelevanceResult {
23481    /// Output only. Question Answering Relevance score.
23482    pub score: std::option::Option<f32>,
23483
23484    /// Output only. Explanation for question answering relevance score.
23485    pub explanation: std::string::String,
23486
23487    /// Output only. Confidence for question answering relevance score.
23488    pub confidence: std::option::Option<f32>,
23489
23490    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23491}
23492
23493#[cfg(feature = "evaluation-service")]
23494impl QuestionAnsweringRelevanceResult {
23495    pub fn new() -> Self {
23496        std::default::Default::default()
23497    }
23498
23499    /// Sets the value of [score][crate::model::QuestionAnsweringRelevanceResult::score].
23500    pub fn set_score<T>(mut self, v: T) -> Self
23501    where
23502        T: std::convert::Into<f32>,
23503    {
23504        self.score = std::option::Option::Some(v.into());
23505        self
23506    }
23507
23508    /// Sets or clears the value of [score][crate::model::QuestionAnsweringRelevanceResult::score].
23509    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
23510    where
23511        T: std::convert::Into<f32>,
23512    {
23513        self.score = v.map(|x| x.into());
23514        self
23515    }
23516
23517    /// Sets the value of [explanation][crate::model::QuestionAnsweringRelevanceResult::explanation].
23518    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23519        self.explanation = v.into();
23520        self
23521    }
23522
23523    /// Sets the value of [confidence][crate::model::QuestionAnsweringRelevanceResult::confidence].
23524    pub fn set_confidence<T>(mut self, v: T) -> Self
23525    where
23526        T: std::convert::Into<f32>,
23527    {
23528        self.confidence = std::option::Option::Some(v.into());
23529        self
23530    }
23531
23532    /// Sets or clears the value of [confidence][crate::model::QuestionAnsweringRelevanceResult::confidence].
23533    pub fn set_or_clear_confidence<T>(mut self, v: std::option::Option<T>) -> Self
23534    where
23535        T: std::convert::Into<f32>,
23536    {
23537        self.confidence = v.map(|x| x.into());
23538        self
23539    }
23540}
23541
23542#[cfg(feature = "evaluation-service")]
23543impl wkt::message::Message for QuestionAnsweringRelevanceResult {
23544    fn typename() -> &'static str {
23545        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringRelevanceResult"
23546    }
23547}
23548
23549/// Input for question answering helpfulness metric.
23550#[cfg(feature = "evaluation-service")]
23551#[derive(Clone, Default, PartialEq)]
23552#[non_exhaustive]
23553pub struct QuestionAnsweringHelpfulnessInput {
23554    /// Required. Spec for question answering helpfulness score metric.
23555    pub metric_spec: std::option::Option<crate::model::QuestionAnsweringHelpfulnessSpec>,
23556
23557    /// Required. Question answering helpfulness instance.
23558    pub instance: std::option::Option<crate::model::QuestionAnsweringHelpfulnessInstance>,
23559
23560    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23561}
23562
23563#[cfg(feature = "evaluation-service")]
23564impl QuestionAnsweringHelpfulnessInput {
23565    pub fn new() -> Self {
23566        std::default::Default::default()
23567    }
23568
23569    /// Sets the value of [metric_spec][crate::model::QuestionAnsweringHelpfulnessInput::metric_spec].
23570    pub fn set_metric_spec<T>(mut self, v: T) -> Self
23571    where
23572        T: std::convert::Into<crate::model::QuestionAnsweringHelpfulnessSpec>,
23573    {
23574        self.metric_spec = std::option::Option::Some(v.into());
23575        self
23576    }
23577
23578    /// Sets or clears the value of [metric_spec][crate::model::QuestionAnsweringHelpfulnessInput::metric_spec].
23579    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
23580    where
23581        T: std::convert::Into<crate::model::QuestionAnsweringHelpfulnessSpec>,
23582    {
23583        self.metric_spec = v.map(|x| x.into());
23584        self
23585    }
23586
23587    /// Sets the value of [instance][crate::model::QuestionAnsweringHelpfulnessInput::instance].
23588    pub fn set_instance<T>(mut self, v: T) -> Self
23589    where
23590        T: std::convert::Into<crate::model::QuestionAnsweringHelpfulnessInstance>,
23591    {
23592        self.instance = std::option::Option::Some(v.into());
23593        self
23594    }
23595
23596    /// Sets or clears the value of [instance][crate::model::QuestionAnsweringHelpfulnessInput::instance].
23597    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
23598    where
23599        T: std::convert::Into<crate::model::QuestionAnsweringHelpfulnessInstance>,
23600    {
23601        self.instance = v.map(|x| x.into());
23602        self
23603    }
23604}
23605
23606#[cfg(feature = "evaluation-service")]
23607impl wkt::message::Message for QuestionAnsweringHelpfulnessInput {
23608    fn typename() -> &'static str {
23609        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessInput"
23610    }
23611}
23612
23613/// Spec for question answering helpfulness instance.
23614#[cfg(feature = "evaluation-service")]
23615#[derive(Clone, Default, PartialEq)]
23616#[non_exhaustive]
23617pub struct QuestionAnsweringHelpfulnessInstance {
23618    /// Required. Output of the evaluated model.
23619    pub prediction: std::option::Option<std::string::String>,
23620
23621    /// Optional. Ground truth used to compare against the prediction.
23622    pub reference: std::option::Option<std::string::String>,
23623
23624    /// Optional. Text provided as context to answer the question.
23625    pub context: std::option::Option<std::string::String>,
23626
23627    /// Required. The question asked and other instruction in the inference prompt.
23628    pub instruction: std::option::Option<std::string::String>,
23629
23630    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23631}
23632
23633#[cfg(feature = "evaluation-service")]
23634impl QuestionAnsweringHelpfulnessInstance {
23635    pub fn new() -> Self {
23636        std::default::Default::default()
23637    }
23638
23639    /// Sets the value of [prediction][crate::model::QuestionAnsweringHelpfulnessInstance::prediction].
23640    pub fn set_prediction<T>(mut self, v: T) -> Self
23641    where
23642        T: std::convert::Into<std::string::String>,
23643    {
23644        self.prediction = std::option::Option::Some(v.into());
23645        self
23646    }
23647
23648    /// Sets or clears the value of [prediction][crate::model::QuestionAnsweringHelpfulnessInstance::prediction].
23649    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
23650    where
23651        T: std::convert::Into<std::string::String>,
23652    {
23653        self.prediction = v.map(|x| x.into());
23654        self
23655    }
23656
23657    /// Sets the value of [reference][crate::model::QuestionAnsweringHelpfulnessInstance::reference].
23658    pub fn set_reference<T>(mut self, v: T) -> Self
23659    where
23660        T: std::convert::Into<std::string::String>,
23661    {
23662        self.reference = std::option::Option::Some(v.into());
23663        self
23664    }
23665
23666    /// Sets or clears the value of [reference][crate::model::QuestionAnsweringHelpfulnessInstance::reference].
23667    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
23668    where
23669        T: std::convert::Into<std::string::String>,
23670    {
23671        self.reference = v.map(|x| x.into());
23672        self
23673    }
23674
23675    /// Sets the value of [context][crate::model::QuestionAnsweringHelpfulnessInstance::context].
23676    pub fn set_context<T>(mut self, v: T) -> Self
23677    where
23678        T: std::convert::Into<std::string::String>,
23679    {
23680        self.context = std::option::Option::Some(v.into());
23681        self
23682    }
23683
23684    /// Sets or clears the value of [context][crate::model::QuestionAnsweringHelpfulnessInstance::context].
23685    pub fn set_or_clear_context<T>(mut self, v: std::option::Option<T>) -> Self
23686    where
23687        T: std::convert::Into<std::string::String>,
23688    {
23689        self.context = v.map(|x| x.into());
23690        self
23691    }
23692
23693    /// Sets the value of [instruction][crate::model::QuestionAnsweringHelpfulnessInstance::instruction].
23694    pub fn set_instruction<T>(mut self, v: T) -> Self
23695    where
23696        T: std::convert::Into<std::string::String>,
23697    {
23698        self.instruction = std::option::Option::Some(v.into());
23699        self
23700    }
23701
23702    /// Sets or clears the value of [instruction][crate::model::QuestionAnsweringHelpfulnessInstance::instruction].
23703    pub fn set_or_clear_instruction<T>(mut self, v: std::option::Option<T>) -> Self
23704    where
23705        T: std::convert::Into<std::string::String>,
23706    {
23707        self.instruction = v.map(|x| x.into());
23708        self
23709    }
23710}
23711
23712#[cfg(feature = "evaluation-service")]
23713impl wkt::message::Message for QuestionAnsweringHelpfulnessInstance {
23714    fn typename() -> &'static str {
23715        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessInstance"
23716    }
23717}
23718
23719/// Spec for question answering helpfulness metric.
23720#[cfg(feature = "evaluation-service")]
23721#[derive(Clone, Default, PartialEq)]
23722#[non_exhaustive]
23723pub struct QuestionAnsweringHelpfulnessSpec {
23724    /// Optional. Whether to use instance.reference to compute question answering
23725    /// helpfulness.
23726    pub use_reference: bool,
23727
23728    /// Optional. Which version to use for evaluation.
23729    pub version: i32,
23730
23731    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23732}
23733
23734#[cfg(feature = "evaluation-service")]
23735impl QuestionAnsweringHelpfulnessSpec {
23736    pub fn new() -> Self {
23737        std::default::Default::default()
23738    }
23739
23740    /// Sets the value of [use_reference][crate::model::QuestionAnsweringHelpfulnessSpec::use_reference].
23741    pub fn set_use_reference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23742        self.use_reference = v.into();
23743        self
23744    }
23745
23746    /// Sets the value of [version][crate::model::QuestionAnsweringHelpfulnessSpec::version].
23747    pub fn set_version<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
23748        self.version = v.into();
23749        self
23750    }
23751}
23752
23753#[cfg(feature = "evaluation-service")]
23754impl wkt::message::Message for QuestionAnsweringHelpfulnessSpec {
23755    fn typename() -> &'static str {
23756        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessSpec"
23757    }
23758}
23759
23760/// Spec for question answering helpfulness result.
23761#[cfg(feature = "evaluation-service")]
23762#[derive(Clone, Default, PartialEq)]
23763#[non_exhaustive]
23764pub struct QuestionAnsweringHelpfulnessResult {
23765    /// Output only. Question Answering Helpfulness score.
23766    pub score: std::option::Option<f32>,
23767
23768    /// Output only. Explanation for question answering helpfulness score.
23769    pub explanation: std::string::String,
23770
23771    /// Output only. Confidence for question answering helpfulness score.
23772    pub confidence: std::option::Option<f32>,
23773
23774    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23775}
23776
23777#[cfg(feature = "evaluation-service")]
23778impl QuestionAnsweringHelpfulnessResult {
23779    pub fn new() -> Self {
23780        std::default::Default::default()
23781    }
23782
23783    /// Sets the value of [score][crate::model::QuestionAnsweringHelpfulnessResult::score].
23784    pub fn set_score<T>(mut self, v: T) -> Self
23785    where
23786        T: std::convert::Into<f32>,
23787    {
23788        self.score = std::option::Option::Some(v.into());
23789        self
23790    }
23791
23792    /// Sets or clears the value of [score][crate::model::QuestionAnsweringHelpfulnessResult::score].
23793    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
23794    where
23795        T: std::convert::Into<f32>,
23796    {
23797        self.score = v.map(|x| x.into());
23798        self
23799    }
23800
23801    /// Sets the value of [explanation][crate::model::QuestionAnsweringHelpfulnessResult::explanation].
23802    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23803        self.explanation = v.into();
23804        self
23805    }
23806
23807    /// Sets the value of [confidence][crate::model::QuestionAnsweringHelpfulnessResult::confidence].
23808    pub fn set_confidence<T>(mut self, v: T) -> Self
23809    where
23810        T: std::convert::Into<f32>,
23811    {
23812        self.confidence = std::option::Option::Some(v.into());
23813        self
23814    }
23815
23816    /// Sets or clears the value of [confidence][crate::model::QuestionAnsweringHelpfulnessResult::confidence].
23817    pub fn set_or_clear_confidence<T>(mut self, v: std::option::Option<T>) -> Self
23818    where
23819        T: std::convert::Into<f32>,
23820    {
23821        self.confidence = v.map(|x| x.into());
23822        self
23823    }
23824}
23825
23826#[cfg(feature = "evaluation-service")]
23827impl wkt::message::Message for QuestionAnsweringHelpfulnessResult {
23828    fn typename() -> &'static str {
23829        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessResult"
23830    }
23831}
23832
23833/// Input for question answering correctness metric.
23834#[cfg(feature = "evaluation-service")]
23835#[derive(Clone, Default, PartialEq)]
23836#[non_exhaustive]
23837pub struct QuestionAnsweringCorrectnessInput {
23838    /// Required. Spec for question answering correctness score metric.
23839    pub metric_spec: std::option::Option<crate::model::QuestionAnsweringCorrectnessSpec>,
23840
23841    /// Required. Question answering correctness instance.
23842    pub instance: std::option::Option<crate::model::QuestionAnsweringCorrectnessInstance>,
23843
23844    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23845}
23846
23847#[cfg(feature = "evaluation-service")]
23848impl QuestionAnsweringCorrectnessInput {
23849    pub fn new() -> Self {
23850        std::default::Default::default()
23851    }
23852
23853    /// Sets the value of [metric_spec][crate::model::QuestionAnsweringCorrectnessInput::metric_spec].
23854    pub fn set_metric_spec<T>(mut self, v: T) -> Self
23855    where
23856        T: std::convert::Into<crate::model::QuestionAnsweringCorrectnessSpec>,
23857    {
23858        self.metric_spec = std::option::Option::Some(v.into());
23859        self
23860    }
23861
23862    /// Sets or clears the value of [metric_spec][crate::model::QuestionAnsweringCorrectnessInput::metric_spec].
23863    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
23864    where
23865        T: std::convert::Into<crate::model::QuestionAnsweringCorrectnessSpec>,
23866    {
23867        self.metric_spec = v.map(|x| x.into());
23868        self
23869    }
23870
23871    /// Sets the value of [instance][crate::model::QuestionAnsweringCorrectnessInput::instance].
23872    pub fn set_instance<T>(mut self, v: T) -> Self
23873    where
23874        T: std::convert::Into<crate::model::QuestionAnsweringCorrectnessInstance>,
23875    {
23876        self.instance = std::option::Option::Some(v.into());
23877        self
23878    }
23879
23880    /// Sets or clears the value of [instance][crate::model::QuestionAnsweringCorrectnessInput::instance].
23881    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
23882    where
23883        T: std::convert::Into<crate::model::QuestionAnsweringCorrectnessInstance>,
23884    {
23885        self.instance = v.map(|x| x.into());
23886        self
23887    }
23888}
23889
23890#[cfg(feature = "evaluation-service")]
23891impl wkt::message::Message for QuestionAnsweringCorrectnessInput {
23892    fn typename() -> &'static str {
23893        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessInput"
23894    }
23895}
23896
23897/// Spec for question answering correctness instance.
23898#[cfg(feature = "evaluation-service")]
23899#[derive(Clone, Default, PartialEq)]
23900#[non_exhaustive]
23901pub struct QuestionAnsweringCorrectnessInstance {
23902    /// Required. Output of the evaluated model.
23903    pub prediction: std::option::Option<std::string::String>,
23904
23905    /// Optional. Ground truth used to compare against the prediction.
23906    pub reference: std::option::Option<std::string::String>,
23907
23908    /// Optional. Text provided as context to answer the question.
23909    pub context: std::option::Option<std::string::String>,
23910
23911    /// Required. The question asked and other instruction in the inference prompt.
23912    pub instruction: std::option::Option<std::string::String>,
23913
23914    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23915}
23916
23917#[cfg(feature = "evaluation-service")]
23918impl QuestionAnsweringCorrectnessInstance {
23919    pub fn new() -> Self {
23920        std::default::Default::default()
23921    }
23922
23923    /// Sets the value of [prediction][crate::model::QuestionAnsweringCorrectnessInstance::prediction].
23924    pub fn set_prediction<T>(mut self, v: T) -> Self
23925    where
23926        T: std::convert::Into<std::string::String>,
23927    {
23928        self.prediction = std::option::Option::Some(v.into());
23929        self
23930    }
23931
23932    /// Sets or clears the value of [prediction][crate::model::QuestionAnsweringCorrectnessInstance::prediction].
23933    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
23934    where
23935        T: std::convert::Into<std::string::String>,
23936    {
23937        self.prediction = v.map(|x| x.into());
23938        self
23939    }
23940
23941    /// Sets the value of [reference][crate::model::QuestionAnsweringCorrectnessInstance::reference].
23942    pub fn set_reference<T>(mut self, v: T) -> Self
23943    where
23944        T: std::convert::Into<std::string::String>,
23945    {
23946        self.reference = std::option::Option::Some(v.into());
23947        self
23948    }
23949
23950    /// Sets or clears the value of [reference][crate::model::QuestionAnsweringCorrectnessInstance::reference].
23951    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
23952    where
23953        T: std::convert::Into<std::string::String>,
23954    {
23955        self.reference = v.map(|x| x.into());
23956        self
23957    }
23958
23959    /// Sets the value of [context][crate::model::QuestionAnsweringCorrectnessInstance::context].
23960    pub fn set_context<T>(mut self, v: T) -> Self
23961    where
23962        T: std::convert::Into<std::string::String>,
23963    {
23964        self.context = std::option::Option::Some(v.into());
23965        self
23966    }
23967
23968    /// Sets or clears the value of [context][crate::model::QuestionAnsweringCorrectnessInstance::context].
23969    pub fn set_or_clear_context<T>(mut self, v: std::option::Option<T>) -> Self
23970    where
23971        T: std::convert::Into<std::string::String>,
23972    {
23973        self.context = v.map(|x| x.into());
23974        self
23975    }
23976
23977    /// Sets the value of [instruction][crate::model::QuestionAnsweringCorrectnessInstance::instruction].
23978    pub fn set_instruction<T>(mut self, v: T) -> Self
23979    where
23980        T: std::convert::Into<std::string::String>,
23981    {
23982        self.instruction = std::option::Option::Some(v.into());
23983        self
23984    }
23985
23986    /// Sets or clears the value of [instruction][crate::model::QuestionAnsweringCorrectnessInstance::instruction].
23987    pub fn set_or_clear_instruction<T>(mut self, v: std::option::Option<T>) -> Self
23988    where
23989        T: std::convert::Into<std::string::String>,
23990    {
23991        self.instruction = v.map(|x| x.into());
23992        self
23993    }
23994}
23995
23996#[cfg(feature = "evaluation-service")]
23997impl wkt::message::Message for QuestionAnsweringCorrectnessInstance {
23998    fn typename() -> &'static str {
23999        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessInstance"
24000    }
24001}
24002
24003/// Spec for question answering correctness metric.
24004#[cfg(feature = "evaluation-service")]
24005#[derive(Clone, Default, PartialEq)]
24006#[non_exhaustive]
24007pub struct QuestionAnsweringCorrectnessSpec {
24008    /// Optional. Whether to use instance.reference to compute question answering
24009    /// correctness.
24010    pub use_reference: bool,
24011
24012    /// Optional. Which version to use for evaluation.
24013    pub version: i32,
24014
24015    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24016}
24017
24018#[cfg(feature = "evaluation-service")]
24019impl QuestionAnsweringCorrectnessSpec {
24020    pub fn new() -> Self {
24021        std::default::Default::default()
24022    }
24023
24024    /// Sets the value of [use_reference][crate::model::QuestionAnsweringCorrectnessSpec::use_reference].
24025    pub fn set_use_reference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24026        self.use_reference = v.into();
24027        self
24028    }
24029
24030    /// Sets the value of [version][crate::model::QuestionAnsweringCorrectnessSpec::version].
24031    pub fn set_version<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
24032        self.version = v.into();
24033        self
24034    }
24035}
24036
24037#[cfg(feature = "evaluation-service")]
24038impl wkt::message::Message for QuestionAnsweringCorrectnessSpec {
24039    fn typename() -> &'static str {
24040        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessSpec"
24041    }
24042}
24043
24044/// Spec for question answering correctness result.
24045#[cfg(feature = "evaluation-service")]
24046#[derive(Clone, Default, PartialEq)]
24047#[non_exhaustive]
24048pub struct QuestionAnsweringCorrectnessResult {
24049    /// Output only. Question Answering Correctness score.
24050    pub score: std::option::Option<f32>,
24051
24052    /// Output only. Explanation for question answering correctness score.
24053    pub explanation: std::string::String,
24054
24055    /// Output only. Confidence for question answering correctness score.
24056    pub confidence: std::option::Option<f32>,
24057
24058    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24059}
24060
24061#[cfg(feature = "evaluation-service")]
24062impl QuestionAnsweringCorrectnessResult {
24063    pub fn new() -> Self {
24064        std::default::Default::default()
24065    }
24066
24067    /// Sets the value of [score][crate::model::QuestionAnsweringCorrectnessResult::score].
24068    pub fn set_score<T>(mut self, v: T) -> Self
24069    where
24070        T: std::convert::Into<f32>,
24071    {
24072        self.score = std::option::Option::Some(v.into());
24073        self
24074    }
24075
24076    /// Sets or clears the value of [score][crate::model::QuestionAnsweringCorrectnessResult::score].
24077    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
24078    where
24079        T: std::convert::Into<f32>,
24080    {
24081        self.score = v.map(|x| x.into());
24082        self
24083    }
24084
24085    /// Sets the value of [explanation][crate::model::QuestionAnsweringCorrectnessResult::explanation].
24086    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24087        self.explanation = v.into();
24088        self
24089    }
24090
24091    /// Sets the value of [confidence][crate::model::QuestionAnsweringCorrectnessResult::confidence].
24092    pub fn set_confidence<T>(mut self, v: T) -> Self
24093    where
24094        T: std::convert::Into<f32>,
24095    {
24096        self.confidence = std::option::Option::Some(v.into());
24097        self
24098    }
24099
24100    /// Sets or clears the value of [confidence][crate::model::QuestionAnsweringCorrectnessResult::confidence].
24101    pub fn set_or_clear_confidence<T>(mut self, v: std::option::Option<T>) -> Self
24102    where
24103        T: std::convert::Into<f32>,
24104    {
24105        self.confidence = v.map(|x| x.into());
24106        self
24107    }
24108}
24109
24110#[cfg(feature = "evaluation-service")]
24111impl wkt::message::Message for QuestionAnsweringCorrectnessResult {
24112    fn typename() -> &'static str {
24113        "type.googleapis.com/google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessResult"
24114    }
24115}
24116
24117/// Input for pointwise metric.
24118#[cfg(feature = "evaluation-service")]
24119#[derive(Clone, Default, PartialEq)]
24120#[non_exhaustive]
24121pub struct PointwiseMetricInput {
24122    /// Required. Spec for pointwise metric.
24123    pub metric_spec: std::option::Option<crate::model::PointwiseMetricSpec>,
24124
24125    /// Required. Pointwise metric instance.
24126    pub instance: std::option::Option<crate::model::PointwiseMetricInstance>,
24127
24128    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24129}
24130
24131#[cfg(feature = "evaluation-service")]
24132impl PointwiseMetricInput {
24133    pub fn new() -> Self {
24134        std::default::Default::default()
24135    }
24136
24137    /// Sets the value of [metric_spec][crate::model::PointwiseMetricInput::metric_spec].
24138    pub fn set_metric_spec<T>(mut self, v: T) -> Self
24139    where
24140        T: std::convert::Into<crate::model::PointwiseMetricSpec>,
24141    {
24142        self.metric_spec = std::option::Option::Some(v.into());
24143        self
24144    }
24145
24146    /// Sets or clears the value of [metric_spec][crate::model::PointwiseMetricInput::metric_spec].
24147    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
24148    where
24149        T: std::convert::Into<crate::model::PointwiseMetricSpec>,
24150    {
24151        self.metric_spec = v.map(|x| x.into());
24152        self
24153    }
24154
24155    /// Sets the value of [instance][crate::model::PointwiseMetricInput::instance].
24156    pub fn set_instance<T>(mut self, v: T) -> Self
24157    where
24158        T: std::convert::Into<crate::model::PointwiseMetricInstance>,
24159    {
24160        self.instance = std::option::Option::Some(v.into());
24161        self
24162    }
24163
24164    /// Sets or clears the value of [instance][crate::model::PointwiseMetricInput::instance].
24165    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
24166    where
24167        T: std::convert::Into<crate::model::PointwiseMetricInstance>,
24168    {
24169        self.instance = v.map(|x| x.into());
24170        self
24171    }
24172}
24173
24174#[cfg(feature = "evaluation-service")]
24175impl wkt::message::Message for PointwiseMetricInput {
24176    fn typename() -> &'static str {
24177        "type.googleapis.com/google.cloud.aiplatform.v1.PointwiseMetricInput"
24178    }
24179}
24180
24181/// Pointwise metric instance. Usually one instance corresponds to one row in an
24182/// evaluation dataset.
24183#[cfg(feature = "evaluation-service")]
24184#[derive(Clone, Default, PartialEq)]
24185#[non_exhaustive]
24186pub struct PointwiseMetricInstance {
24187    /// Instance for pointwise metric.
24188    pub instance: std::option::Option<crate::model::pointwise_metric_instance::Instance>,
24189
24190    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24191}
24192
24193#[cfg(feature = "evaluation-service")]
24194impl PointwiseMetricInstance {
24195    pub fn new() -> Self {
24196        std::default::Default::default()
24197    }
24198
24199    /// Sets the value of [instance][crate::model::PointwiseMetricInstance::instance].
24200    ///
24201    /// Note that all the setters affecting `instance` are mutually
24202    /// exclusive.
24203    pub fn set_instance<
24204        T: std::convert::Into<std::option::Option<crate::model::pointwise_metric_instance::Instance>>,
24205    >(
24206        mut self,
24207        v: T,
24208    ) -> Self {
24209        self.instance = v.into();
24210        self
24211    }
24212
24213    /// The value of [instance][crate::model::PointwiseMetricInstance::instance]
24214    /// if it holds a `JsonInstance`, `None` if the field is not set or
24215    /// holds a different branch.
24216    pub fn json_instance(&self) -> std::option::Option<&std::string::String> {
24217        #[allow(unreachable_patterns)]
24218        self.instance.as_ref().and_then(|v| match v {
24219            crate::model::pointwise_metric_instance::Instance::JsonInstance(v) => {
24220                std::option::Option::Some(v)
24221            }
24222            _ => std::option::Option::None,
24223        })
24224    }
24225
24226    /// Sets the value of [instance][crate::model::PointwiseMetricInstance::instance]
24227    /// to hold a `JsonInstance`.
24228    ///
24229    /// Note that all the setters affecting `instance` are
24230    /// mutually exclusive.
24231    pub fn set_json_instance<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24232        self.instance = std::option::Option::Some(
24233            crate::model::pointwise_metric_instance::Instance::JsonInstance(v.into()),
24234        );
24235        self
24236    }
24237}
24238
24239#[cfg(feature = "evaluation-service")]
24240impl wkt::message::Message for PointwiseMetricInstance {
24241    fn typename() -> &'static str {
24242        "type.googleapis.com/google.cloud.aiplatform.v1.PointwiseMetricInstance"
24243    }
24244}
24245
24246/// Defines additional types related to [PointwiseMetricInstance].
24247#[cfg(feature = "evaluation-service")]
24248pub mod pointwise_metric_instance {
24249    #[allow(unused_imports)]
24250    use super::*;
24251
24252    /// Instance for pointwise metric.
24253    #[cfg(feature = "evaluation-service")]
24254    #[derive(Clone, Debug, PartialEq)]
24255    #[non_exhaustive]
24256    pub enum Instance {
24257        /// Instance specified as a json string. String key-value pairs are expected
24258        /// in the json_instance to render
24259        /// PointwiseMetricSpec.instance_prompt_template.
24260        JsonInstance(std::string::String),
24261    }
24262}
24263
24264/// Spec for pointwise metric.
24265#[cfg(feature = "evaluation-service")]
24266#[derive(Clone, Default, PartialEq)]
24267#[non_exhaustive]
24268pub struct PointwiseMetricSpec {
24269    /// Required. Metric prompt template for pointwise metric.
24270    pub metric_prompt_template: std::option::Option<std::string::String>,
24271
24272    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24273}
24274
24275#[cfg(feature = "evaluation-service")]
24276impl PointwiseMetricSpec {
24277    pub fn new() -> Self {
24278        std::default::Default::default()
24279    }
24280
24281    /// Sets the value of [metric_prompt_template][crate::model::PointwiseMetricSpec::metric_prompt_template].
24282    pub fn set_metric_prompt_template<T>(mut self, v: T) -> Self
24283    where
24284        T: std::convert::Into<std::string::String>,
24285    {
24286        self.metric_prompt_template = std::option::Option::Some(v.into());
24287        self
24288    }
24289
24290    /// Sets or clears the value of [metric_prompt_template][crate::model::PointwiseMetricSpec::metric_prompt_template].
24291    pub fn set_or_clear_metric_prompt_template<T>(mut self, v: std::option::Option<T>) -> Self
24292    where
24293        T: std::convert::Into<std::string::String>,
24294    {
24295        self.metric_prompt_template = v.map(|x| x.into());
24296        self
24297    }
24298}
24299
24300#[cfg(feature = "evaluation-service")]
24301impl wkt::message::Message for PointwiseMetricSpec {
24302    fn typename() -> &'static str {
24303        "type.googleapis.com/google.cloud.aiplatform.v1.PointwiseMetricSpec"
24304    }
24305}
24306
24307/// Spec for pointwise metric result.
24308#[cfg(feature = "evaluation-service")]
24309#[derive(Clone, Default, PartialEq)]
24310#[non_exhaustive]
24311pub struct PointwiseMetricResult {
24312    /// Output only. Pointwise metric score.
24313    pub score: std::option::Option<f32>,
24314
24315    /// Output only. Explanation for pointwise metric score.
24316    pub explanation: std::string::String,
24317
24318    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24319}
24320
24321#[cfg(feature = "evaluation-service")]
24322impl PointwiseMetricResult {
24323    pub fn new() -> Self {
24324        std::default::Default::default()
24325    }
24326
24327    /// Sets the value of [score][crate::model::PointwiseMetricResult::score].
24328    pub fn set_score<T>(mut self, v: T) -> Self
24329    where
24330        T: std::convert::Into<f32>,
24331    {
24332        self.score = std::option::Option::Some(v.into());
24333        self
24334    }
24335
24336    /// Sets or clears the value of [score][crate::model::PointwiseMetricResult::score].
24337    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
24338    where
24339        T: std::convert::Into<f32>,
24340    {
24341        self.score = v.map(|x| x.into());
24342        self
24343    }
24344
24345    /// Sets the value of [explanation][crate::model::PointwiseMetricResult::explanation].
24346    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24347        self.explanation = v.into();
24348        self
24349    }
24350}
24351
24352#[cfg(feature = "evaluation-service")]
24353impl wkt::message::Message for PointwiseMetricResult {
24354    fn typename() -> &'static str {
24355        "type.googleapis.com/google.cloud.aiplatform.v1.PointwiseMetricResult"
24356    }
24357}
24358
24359/// Input for pairwise metric.
24360#[cfg(feature = "evaluation-service")]
24361#[derive(Clone, Default, PartialEq)]
24362#[non_exhaustive]
24363pub struct PairwiseMetricInput {
24364    /// Required. Spec for pairwise metric.
24365    pub metric_spec: std::option::Option<crate::model::PairwiseMetricSpec>,
24366
24367    /// Required. Pairwise metric instance.
24368    pub instance: std::option::Option<crate::model::PairwiseMetricInstance>,
24369
24370    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24371}
24372
24373#[cfg(feature = "evaluation-service")]
24374impl PairwiseMetricInput {
24375    pub fn new() -> Self {
24376        std::default::Default::default()
24377    }
24378
24379    /// Sets the value of [metric_spec][crate::model::PairwiseMetricInput::metric_spec].
24380    pub fn set_metric_spec<T>(mut self, v: T) -> Self
24381    where
24382        T: std::convert::Into<crate::model::PairwiseMetricSpec>,
24383    {
24384        self.metric_spec = std::option::Option::Some(v.into());
24385        self
24386    }
24387
24388    /// Sets or clears the value of [metric_spec][crate::model::PairwiseMetricInput::metric_spec].
24389    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
24390    where
24391        T: std::convert::Into<crate::model::PairwiseMetricSpec>,
24392    {
24393        self.metric_spec = v.map(|x| x.into());
24394        self
24395    }
24396
24397    /// Sets the value of [instance][crate::model::PairwiseMetricInput::instance].
24398    pub fn set_instance<T>(mut self, v: T) -> Self
24399    where
24400        T: std::convert::Into<crate::model::PairwiseMetricInstance>,
24401    {
24402        self.instance = std::option::Option::Some(v.into());
24403        self
24404    }
24405
24406    /// Sets or clears the value of [instance][crate::model::PairwiseMetricInput::instance].
24407    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
24408    where
24409        T: std::convert::Into<crate::model::PairwiseMetricInstance>,
24410    {
24411        self.instance = v.map(|x| x.into());
24412        self
24413    }
24414}
24415
24416#[cfg(feature = "evaluation-service")]
24417impl wkt::message::Message for PairwiseMetricInput {
24418    fn typename() -> &'static str {
24419        "type.googleapis.com/google.cloud.aiplatform.v1.PairwiseMetricInput"
24420    }
24421}
24422
24423/// Pairwise metric instance. Usually one instance corresponds to one row in an
24424/// evaluation dataset.
24425#[cfg(feature = "evaluation-service")]
24426#[derive(Clone, Default, PartialEq)]
24427#[non_exhaustive]
24428pub struct PairwiseMetricInstance {
24429    /// Instance for pairwise metric.
24430    pub instance: std::option::Option<crate::model::pairwise_metric_instance::Instance>,
24431
24432    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24433}
24434
24435#[cfg(feature = "evaluation-service")]
24436impl PairwiseMetricInstance {
24437    pub fn new() -> Self {
24438        std::default::Default::default()
24439    }
24440
24441    /// Sets the value of [instance][crate::model::PairwiseMetricInstance::instance].
24442    ///
24443    /// Note that all the setters affecting `instance` are mutually
24444    /// exclusive.
24445    pub fn set_instance<
24446        T: std::convert::Into<std::option::Option<crate::model::pairwise_metric_instance::Instance>>,
24447    >(
24448        mut self,
24449        v: T,
24450    ) -> Self {
24451        self.instance = v.into();
24452        self
24453    }
24454
24455    /// The value of [instance][crate::model::PairwiseMetricInstance::instance]
24456    /// if it holds a `JsonInstance`, `None` if the field is not set or
24457    /// holds a different branch.
24458    pub fn json_instance(&self) -> std::option::Option<&std::string::String> {
24459        #[allow(unreachable_patterns)]
24460        self.instance.as_ref().and_then(|v| match v {
24461            crate::model::pairwise_metric_instance::Instance::JsonInstance(v) => {
24462                std::option::Option::Some(v)
24463            }
24464            _ => std::option::Option::None,
24465        })
24466    }
24467
24468    /// Sets the value of [instance][crate::model::PairwiseMetricInstance::instance]
24469    /// to hold a `JsonInstance`.
24470    ///
24471    /// Note that all the setters affecting `instance` are
24472    /// mutually exclusive.
24473    pub fn set_json_instance<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24474        self.instance = std::option::Option::Some(
24475            crate::model::pairwise_metric_instance::Instance::JsonInstance(v.into()),
24476        );
24477        self
24478    }
24479}
24480
24481#[cfg(feature = "evaluation-service")]
24482impl wkt::message::Message for PairwiseMetricInstance {
24483    fn typename() -> &'static str {
24484        "type.googleapis.com/google.cloud.aiplatform.v1.PairwiseMetricInstance"
24485    }
24486}
24487
24488/// Defines additional types related to [PairwiseMetricInstance].
24489#[cfg(feature = "evaluation-service")]
24490pub mod pairwise_metric_instance {
24491    #[allow(unused_imports)]
24492    use super::*;
24493
24494    /// Instance for pairwise metric.
24495    #[cfg(feature = "evaluation-service")]
24496    #[derive(Clone, Debug, PartialEq)]
24497    #[non_exhaustive]
24498    pub enum Instance {
24499        /// Instance specified as a json string. String key-value pairs are expected
24500        /// in the json_instance to render
24501        /// PairwiseMetricSpec.instance_prompt_template.
24502        JsonInstance(std::string::String),
24503    }
24504}
24505
24506/// Spec for pairwise metric.
24507#[cfg(feature = "evaluation-service")]
24508#[derive(Clone, Default, PartialEq)]
24509#[non_exhaustive]
24510pub struct PairwiseMetricSpec {
24511    /// Required. Metric prompt template for pairwise metric.
24512    pub metric_prompt_template: std::option::Option<std::string::String>,
24513
24514    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24515}
24516
24517#[cfg(feature = "evaluation-service")]
24518impl PairwiseMetricSpec {
24519    pub fn new() -> Self {
24520        std::default::Default::default()
24521    }
24522
24523    /// Sets the value of [metric_prompt_template][crate::model::PairwiseMetricSpec::metric_prompt_template].
24524    pub fn set_metric_prompt_template<T>(mut self, v: T) -> Self
24525    where
24526        T: std::convert::Into<std::string::String>,
24527    {
24528        self.metric_prompt_template = std::option::Option::Some(v.into());
24529        self
24530    }
24531
24532    /// Sets or clears the value of [metric_prompt_template][crate::model::PairwiseMetricSpec::metric_prompt_template].
24533    pub fn set_or_clear_metric_prompt_template<T>(mut self, v: std::option::Option<T>) -> Self
24534    where
24535        T: std::convert::Into<std::string::String>,
24536    {
24537        self.metric_prompt_template = v.map(|x| x.into());
24538        self
24539    }
24540}
24541
24542#[cfg(feature = "evaluation-service")]
24543impl wkt::message::Message for PairwiseMetricSpec {
24544    fn typename() -> &'static str {
24545        "type.googleapis.com/google.cloud.aiplatform.v1.PairwiseMetricSpec"
24546    }
24547}
24548
24549/// Spec for pairwise metric result.
24550#[cfg(feature = "evaluation-service")]
24551#[derive(Clone, Default, PartialEq)]
24552#[non_exhaustive]
24553pub struct PairwiseMetricResult {
24554    /// Output only. Pairwise metric choice.
24555    pub pairwise_choice: crate::model::PairwiseChoice,
24556
24557    /// Output only. Explanation for pairwise metric score.
24558    pub explanation: std::string::String,
24559
24560    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24561}
24562
24563#[cfg(feature = "evaluation-service")]
24564impl PairwiseMetricResult {
24565    pub fn new() -> Self {
24566        std::default::Default::default()
24567    }
24568
24569    /// Sets the value of [pairwise_choice][crate::model::PairwiseMetricResult::pairwise_choice].
24570    pub fn set_pairwise_choice<T: std::convert::Into<crate::model::PairwiseChoice>>(
24571        mut self,
24572        v: T,
24573    ) -> Self {
24574        self.pairwise_choice = v.into();
24575        self
24576    }
24577
24578    /// Sets the value of [explanation][crate::model::PairwiseMetricResult::explanation].
24579    pub fn set_explanation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24580        self.explanation = v.into();
24581        self
24582    }
24583}
24584
24585#[cfg(feature = "evaluation-service")]
24586impl wkt::message::Message for PairwiseMetricResult {
24587    fn typename() -> &'static str {
24588        "type.googleapis.com/google.cloud.aiplatform.v1.PairwiseMetricResult"
24589    }
24590}
24591
24592/// Input for tool call valid metric.
24593#[cfg(feature = "evaluation-service")]
24594#[derive(Clone, Default, PartialEq)]
24595#[non_exhaustive]
24596pub struct ToolCallValidInput {
24597    /// Required. Spec for tool call valid metric.
24598    pub metric_spec: std::option::Option<crate::model::ToolCallValidSpec>,
24599
24600    /// Required. Repeated tool call valid instances.
24601    pub instances: std::vec::Vec<crate::model::ToolCallValidInstance>,
24602
24603    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24604}
24605
24606#[cfg(feature = "evaluation-service")]
24607impl ToolCallValidInput {
24608    pub fn new() -> Self {
24609        std::default::Default::default()
24610    }
24611
24612    /// Sets the value of [metric_spec][crate::model::ToolCallValidInput::metric_spec].
24613    pub fn set_metric_spec<T>(mut self, v: T) -> Self
24614    where
24615        T: std::convert::Into<crate::model::ToolCallValidSpec>,
24616    {
24617        self.metric_spec = std::option::Option::Some(v.into());
24618        self
24619    }
24620
24621    /// Sets or clears the value of [metric_spec][crate::model::ToolCallValidInput::metric_spec].
24622    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
24623    where
24624        T: std::convert::Into<crate::model::ToolCallValidSpec>,
24625    {
24626        self.metric_spec = v.map(|x| x.into());
24627        self
24628    }
24629
24630    /// Sets the value of [instances][crate::model::ToolCallValidInput::instances].
24631    pub fn set_instances<T, V>(mut self, v: T) -> Self
24632    where
24633        T: std::iter::IntoIterator<Item = V>,
24634        V: std::convert::Into<crate::model::ToolCallValidInstance>,
24635    {
24636        use std::iter::Iterator;
24637        self.instances = v.into_iter().map(|i| i.into()).collect();
24638        self
24639    }
24640}
24641
24642#[cfg(feature = "evaluation-service")]
24643impl wkt::message::Message for ToolCallValidInput {
24644    fn typename() -> &'static str {
24645        "type.googleapis.com/google.cloud.aiplatform.v1.ToolCallValidInput"
24646    }
24647}
24648
24649/// Spec for tool call valid metric.
24650#[cfg(feature = "evaluation-service")]
24651#[derive(Clone, Default, PartialEq)]
24652#[non_exhaustive]
24653pub struct ToolCallValidSpec {
24654    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24655}
24656
24657#[cfg(feature = "evaluation-service")]
24658impl ToolCallValidSpec {
24659    pub fn new() -> Self {
24660        std::default::Default::default()
24661    }
24662}
24663
24664#[cfg(feature = "evaluation-service")]
24665impl wkt::message::Message for ToolCallValidSpec {
24666    fn typename() -> &'static str {
24667        "type.googleapis.com/google.cloud.aiplatform.v1.ToolCallValidSpec"
24668    }
24669}
24670
24671/// Spec for tool call valid instance.
24672#[cfg(feature = "evaluation-service")]
24673#[derive(Clone, Default, PartialEq)]
24674#[non_exhaustive]
24675pub struct ToolCallValidInstance {
24676    /// Required. Output of the evaluated model.
24677    pub prediction: std::option::Option<std::string::String>,
24678
24679    /// Required. Ground truth used to compare against the prediction.
24680    pub reference: std::option::Option<std::string::String>,
24681
24682    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24683}
24684
24685#[cfg(feature = "evaluation-service")]
24686impl ToolCallValidInstance {
24687    pub fn new() -> Self {
24688        std::default::Default::default()
24689    }
24690
24691    /// Sets the value of [prediction][crate::model::ToolCallValidInstance::prediction].
24692    pub fn set_prediction<T>(mut self, v: T) -> Self
24693    where
24694        T: std::convert::Into<std::string::String>,
24695    {
24696        self.prediction = std::option::Option::Some(v.into());
24697        self
24698    }
24699
24700    /// Sets or clears the value of [prediction][crate::model::ToolCallValidInstance::prediction].
24701    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
24702    where
24703        T: std::convert::Into<std::string::String>,
24704    {
24705        self.prediction = v.map(|x| x.into());
24706        self
24707    }
24708
24709    /// Sets the value of [reference][crate::model::ToolCallValidInstance::reference].
24710    pub fn set_reference<T>(mut self, v: T) -> Self
24711    where
24712        T: std::convert::Into<std::string::String>,
24713    {
24714        self.reference = std::option::Option::Some(v.into());
24715        self
24716    }
24717
24718    /// Sets or clears the value of [reference][crate::model::ToolCallValidInstance::reference].
24719    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
24720    where
24721        T: std::convert::Into<std::string::String>,
24722    {
24723        self.reference = v.map(|x| x.into());
24724        self
24725    }
24726}
24727
24728#[cfg(feature = "evaluation-service")]
24729impl wkt::message::Message for ToolCallValidInstance {
24730    fn typename() -> &'static str {
24731        "type.googleapis.com/google.cloud.aiplatform.v1.ToolCallValidInstance"
24732    }
24733}
24734
24735/// Results for tool call valid metric.
24736#[cfg(feature = "evaluation-service")]
24737#[derive(Clone, Default, PartialEq)]
24738#[non_exhaustive]
24739pub struct ToolCallValidResults {
24740    /// Output only. Tool call valid metric values.
24741    pub tool_call_valid_metric_values: std::vec::Vec<crate::model::ToolCallValidMetricValue>,
24742
24743    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24744}
24745
24746#[cfg(feature = "evaluation-service")]
24747impl ToolCallValidResults {
24748    pub fn new() -> Self {
24749        std::default::Default::default()
24750    }
24751
24752    /// Sets the value of [tool_call_valid_metric_values][crate::model::ToolCallValidResults::tool_call_valid_metric_values].
24753    pub fn set_tool_call_valid_metric_values<T, V>(mut self, v: T) -> Self
24754    where
24755        T: std::iter::IntoIterator<Item = V>,
24756        V: std::convert::Into<crate::model::ToolCallValidMetricValue>,
24757    {
24758        use std::iter::Iterator;
24759        self.tool_call_valid_metric_values = v.into_iter().map(|i| i.into()).collect();
24760        self
24761    }
24762}
24763
24764#[cfg(feature = "evaluation-service")]
24765impl wkt::message::Message for ToolCallValidResults {
24766    fn typename() -> &'static str {
24767        "type.googleapis.com/google.cloud.aiplatform.v1.ToolCallValidResults"
24768    }
24769}
24770
24771/// Tool call valid metric value for an instance.
24772#[cfg(feature = "evaluation-service")]
24773#[derive(Clone, Default, PartialEq)]
24774#[non_exhaustive]
24775pub struct ToolCallValidMetricValue {
24776    /// Output only. Tool call valid score.
24777    pub score: std::option::Option<f32>,
24778
24779    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24780}
24781
24782#[cfg(feature = "evaluation-service")]
24783impl ToolCallValidMetricValue {
24784    pub fn new() -> Self {
24785        std::default::Default::default()
24786    }
24787
24788    /// Sets the value of [score][crate::model::ToolCallValidMetricValue::score].
24789    pub fn set_score<T>(mut self, v: T) -> Self
24790    where
24791        T: std::convert::Into<f32>,
24792    {
24793        self.score = std::option::Option::Some(v.into());
24794        self
24795    }
24796
24797    /// Sets or clears the value of [score][crate::model::ToolCallValidMetricValue::score].
24798    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
24799    where
24800        T: std::convert::Into<f32>,
24801    {
24802        self.score = v.map(|x| x.into());
24803        self
24804    }
24805}
24806
24807#[cfg(feature = "evaluation-service")]
24808impl wkt::message::Message for ToolCallValidMetricValue {
24809    fn typename() -> &'static str {
24810        "type.googleapis.com/google.cloud.aiplatform.v1.ToolCallValidMetricValue"
24811    }
24812}
24813
24814/// Input for tool name match metric.
24815#[cfg(feature = "evaluation-service")]
24816#[derive(Clone, Default, PartialEq)]
24817#[non_exhaustive]
24818pub struct ToolNameMatchInput {
24819    /// Required. Spec for tool name match metric.
24820    pub metric_spec: std::option::Option<crate::model::ToolNameMatchSpec>,
24821
24822    /// Required. Repeated tool name match instances.
24823    pub instances: std::vec::Vec<crate::model::ToolNameMatchInstance>,
24824
24825    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24826}
24827
24828#[cfg(feature = "evaluation-service")]
24829impl ToolNameMatchInput {
24830    pub fn new() -> Self {
24831        std::default::Default::default()
24832    }
24833
24834    /// Sets the value of [metric_spec][crate::model::ToolNameMatchInput::metric_spec].
24835    pub fn set_metric_spec<T>(mut self, v: T) -> Self
24836    where
24837        T: std::convert::Into<crate::model::ToolNameMatchSpec>,
24838    {
24839        self.metric_spec = std::option::Option::Some(v.into());
24840        self
24841    }
24842
24843    /// Sets or clears the value of [metric_spec][crate::model::ToolNameMatchInput::metric_spec].
24844    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
24845    where
24846        T: std::convert::Into<crate::model::ToolNameMatchSpec>,
24847    {
24848        self.metric_spec = v.map(|x| x.into());
24849        self
24850    }
24851
24852    /// Sets the value of [instances][crate::model::ToolNameMatchInput::instances].
24853    pub fn set_instances<T, V>(mut self, v: T) -> Self
24854    where
24855        T: std::iter::IntoIterator<Item = V>,
24856        V: std::convert::Into<crate::model::ToolNameMatchInstance>,
24857    {
24858        use std::iter::Iterator;
24859        self.instances = v.into_iter().map(|i| i.into()).collect();
24860        self
24861    }
24862}
24863
24864#[cfg(feature = "evaluation-service")]
24865impl wkt::message::Message for ToolNameMatchInput {
24866    fn typename() -> &'static str {
24867        "type.googleapis.com/google.cloud.aiplatform.v1.ToolNameMatchInput"
24868    }
24869}
24870
24871/// Spec for tool name match metric.
24872#[cfg(feature = "evaluation-service")]
24873#[derive(Clone, Default, PartialEq)]
24874#[non_exhaustive]
24875pub struct ToolNameMatchSpec {
24876    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24877}
24878
24879#[cfg(feature = "evaluation-service")]
24880impl ToolNameMatchSpec {
24881    pub fn new() -> Self {
24882        std::default::Default::default()
24883    }
24884}
24885
24886#[cfg(feature = "evaluation-service")]
24887impl wkt::message::Message for ToolNameMatchSpec {
24888    fn typename() -> &'static str {
24889        "type.googleapis.com/google.cloud.aiplatform.v1.ToolNameMatchSpec"
24890    }
24891}
24892
24893/// Spec for tool name match instance.
24894#[cfg(feature = "evaluation-service")]
24895#[derive(Clone, Default, PartialEq)]
24896#[non_exhaustive]
24897pub struct ToolNameMatchInstance {
24898    /// Required. Output of the evaluated model.
24899    pub prediction: std::option::Option<std::string::String>,
24900
24901    /// Required. Ground truth used to compare against the prediction.
24902    pub reference: std::option::Option<std::string::String>,
24903
24904    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24905}
24906
24907#[cfg(feature = "evaluation-service")]
24908impl ToolNameMatchInstance {
24909    pub fn new() -> Self {
24910        std::default::Default::default()
24911    }
24912
24913    /// Sets the value of [prediction][crate::model::ToolNameMatchInstance::prediction].
24914    pub fn set_prediction<T>(mut self, v: T) -> Self
24915    where
24916        T: std::convert::Into<std::string::String>,
24917    {
24918        self.prediction = std::option::Option::Some(v.into());
24919        self
24920    }
24921
24922    /// Sets or clears the value of [prediction][crate::model::ToolNameMatchInstance::prediction].
24923    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
24924    where
24925        T: std::convert::Into<std::string::String>,
24926    {
24927        self.prediction = v.map(|x| x.into());
24928        self
24929    }
24930
24931    /// Sets the value of [reference][crate::model::ToolNameMatchInstance::reference].
24932    pub fn set_reference<T>(mut self, v: T) -> Self
24933    where
24934        T: std::convert::Into<std::string::String>,
24935    {
24936        self.reference = std::option::Option::Some(v.into());
24937        self
24938    }
24939
24940    /// Sets or clears the value of [reference][crate::model::ToolNameMatchInstance::reference].
24941    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
24942    where
24943        T: std::convert::Into<std::string::String>,
24944    {
24945        self.reference = v.map(|x| x.into());
24946        self
24947    }
24948}
24949
24950#[cfg(feature = "evaluation-service")]
24951impl wkt::message::Message for ToolNameMatchInstance {
24952    fn typename() -> &'static str {
24953        "type.googleapis.com/google.cloud.aiplatform.v1.ToolNameMatchInstance"
24954    }
24955}
24956
24957/// Results for tool name match metric.
24958#[cfg(feature = "evaluation-service")]
24959#[derive(Clone, Default, PartialEq)]
24960#[non_exhaustive]
24961pub struct ToolNameMatchResults {
24962    /// Output only. Tool name match metric values.
24963    pub tool_name_match_metric_values: std::vec::Vec<crate::model::ToolNameMatchMetricValue>,
24964
24965    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24966}
24967
24968#[cfg(feature = "evaluation-service")]
24969impl ToolNameMatchResults {
24970    pub fn new() -> Self {
24971        std::default::Default::default()
24972    }
24973
24974    /// Sets the value of [tool_name_match_metric_values][crate::model::ToolNameMatchResults::tool_name_match_metric_values].
24975    pub fn set_tool_name_match_metric_values<T, V>(mut self, v: T) -> Self
24976    where
24977        T: std::iter::IntoIterator<Item = V>,
24978        V: std::convert::Into<crate::model::ToolNameMatchMetricValue>,
24979    {
24980        use std::iter::Iterator;
24981        self.tool_name_match_metric_values = v.into_iter().map(|i| i.into()).collect();
24982        self
24983    }
24984}
24985
24986#[cfg(feature = "evaluation-service")]
24987impl wkt::message::Message for ToolNameMatchResults {
24988    fn typename() -> &'static str {
24989        "type.googleapis.com/google.cloud.aiplatform.v1.ToolNameMatchResults"
24990    }
24991}
24992
24993/// Tool name match metric value for an instance.
24994#[cfg(feature = "evaluation-service")]
24995#[derive(Clone, Default, PartialEq)]
24996#[non_exhaustive]
24997pub struct ToolNameMatchMetricValue {
24998    /// Output only. Tool name match score.
24999    pub score: std::option::Option<f32>,
25000
25001    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25002}
25003
25004#[cfg(feature = "evaluation-service")]
25005impl ToolNameMatchMetricValue {
25006    pub fn new() -> Self {
25007        std::default::Default::default()
25008    }
25009
25010    /// Sets the value of [score][crate::model::ToolNameMatchMetricValue::score].
25011    pub fn set_score<T>(mut self, v: T) -> Self
25012    where
25013        T: std::convert::Into<f32>,
25014    {
25015        self.score = std::option::Option::Some(v.into());
25016        self
25017    }
25018
25019    /// Sets or clears the value of [score][crate::model::ToolNameMatchMetricValue::score].
25020    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
25021    where
25022        T: std::convert::Into<f32>,
25023    {
25024        self.score = v.map(|x| x.into());
25025        self
25026    }
25027}
25028
25029#[cfg(feature = "evaluation-service")]
25030impl wkt::message::Message for ToolNameMatchMetricValue {
25031    fn typename() -> &'static str {
25032        "type.googleapis.com/google.cloud.aiplatform.v1.ToolNameMatchMetricValue"
25033    }
25034}
25035
25036/// Input for tool parameter key match metric.
25037#[cfg(feature = "evaluation-service")]
25038#[derive(Clone, Default, PartialEq)]
25039#[non_exhaustive]
25040pub struct ToolParameterKeyMatchInput {
25041    /// Required. Spec for tool parameter key match metric.
25042    pub metric_spec: std::option::Option<crate::model::ToolParameterKeyMatchSpec>,
25043
25044    /// Required. Repeated tool parameter key match instances.
25045    pub instances: std::vec::Vec<crate::model::ToolParameterKeyMatchInstance>,
25046
25047    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25048}
25049
25050#[cfg(feature = "evaluation-service")]
25051impl ToolParameterKeyMatchInput {
25052    pub fn new() -> Self {
25053        std::default::Default::default()
25054    }
25055
25056    /// Sets the value of [metric_spec][crate::model::ToolParameterKeyMatchInput::metric_spec].
25057    pub fn set_metric_spec<T>(mut self, v: T) -> Self
25058    where
25059        T: std::convert::Into<crate::model::ToolParameterKeyMatchSpec>,
25060    {
25061        self.metric_spec = std::option::Option::Some(v.into());
25062        self
25063    }
25064
25065    /// Sets or clears the value of [metric_spec][crate::model::ToolParameterKeyMatchInput::metric_spec].
25066    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
25067    where
25068        T: std::convert::Into<crate::model::ToolParameterKeyMatchSpec>,
25069    {
25070        self.metric_spec = v.map(|x| x.into());
25071        self
25072    }
25073
25074    /// Sets the value of [instances][crate::model::ToolParameterKeyMatchInput::instances].
25075    pub fn set_instances<T, V>(mut self, v: T) -> Self
25076    where
25077        T: std::iter::IntoIterator<Item = V>,
25078        V: std::convert::Into<crate::model::ToolParameterKeyMatchInstance>,
25079    {
25080        use std::iter::Iterator;
25081        self.instances = v.into_iter().map(|i| i.into()).collect();
25082        self
25083    }
25084}
25085
25086#[cfg(feature = "evaluation-service")]
25087impl wkt::message::Message for ToolParameterKeyMatchInput {
25088    fn typename() -> &'static str {
25089        "type.googleapis.com/google.cloud.aiplatform.v1.ToolParameterKeyMatchInput"
25090    }
25091}
25092
25093/// Spec for tool parameter key match metric.
25094#[cfg(feature = "evaluation-service")]
25095#[derive(Clone, Default, PartialEq)]
25096#[non_exhaustive]
25097pub struct ToolParameterKeyMatchSpec {
25098    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25099}
25100
25101#[cfg(feature = "evaluation-service")]
25102impl ToolParameterKeyMatchSpec {
25103    pub fn new() -> Self {
25104        std::default::Default::default()
25105    }
25106}
25107
25108#[cfg(feature = "evaluation-service")]
25109impl wkt::message::Message for ToolParameterKeyMatchSpec {
25110    fn typename() -> &'static str {
25111        "type.googleapis.com/google.cloud.aiplatform.v1.ToolParameterKeyMatchSpec"
25112    }
25113}
25114
25115/// Spec for tool parameter key match instance.
25116#[cfg(feature = "evaluation-service")]
25117#[derive(Clone, Default, PartialEq)]
25118#[non_exhaustive]
25119pub struct ToolParameterKeyMatchInstance {
25120    /// Required. Output of the evaluated model.
25121    pub prediction: std::option::Option<std::string::String>,
25122
25123    /// Required. Ground truth used to compare against the prediction.
25124    pub reference: std::option::Option<std::string::String>,
25125
25126    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25127}
25128
25129#[cfg(feature = "evaluation-service")]
25130impl ToolParameterKeyMatchInstance {
25131    pub fn new() -> Self {
25132        std::default::Default::default()
25133    }
25134
25135    /// Sets the value of [prediction][crate::model::ToolParameterKeyMatchInstance::prediction].
25136    pub fn set_prediction<T>(mut self, v: T) -> Self
25137    where
25138        T: std::convert::Into<std::string::String>,
25139    {
25140        self.prediction = std::option::Option::Some(v.into());
25141        self
25142    }
25143
25144    /// Sets or clears the value of [prediction][crate::model::ToolParameterKeyMatchInstance::prediction].
25145    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
25146    where
25147        T: std::convert::Into<std::string::String>,
25148    {
25149        self.prediction = v.map(|x| x.into());
25150        self
25151    }
25152
25153    /// Sets the value of [reference][crate::model::ToolParameterKeyMatchInstance::reference].
25154    pub fn set_reference<T>(mut self, v: T) -> Self
25155    where
25156        T: std::convert::Into<std::string::String>,
25157    {
25158        self.reference = std::option::Option::Some(v.into());
25159        self
25160    }
25161
25162    /// Sets or clears the value of [reference][crate::model::ToolParameterKeyMatchInstance::reference].
25163    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
25164    where
25165        T: std::convert::Into<std::string::String>,
25166    {
25167        self.reference = v.map(|x| x.into());
25168        self
25169    }
25170}
25171
25172#[cfg(feature = "evaluation-service")]
25173impl wkt::message::Message for ToolParameterKeyMatchInstance {
25174    fn typename() -> &'static str {
25175        "type.googleapis.com/google.cloud.aiplatform.v1.ToolParameterKeyMatchInstance"
25176    }
25177}
25178
25179/// Results for tool parameter key match metric.
25180#[cfg(feature = "evaluation-service")]
25181#[derive(Clone, Default, PartialEq)]
25182#[non_exhaustive]
25183pub struct ToolParameterKeyMatchResults {
25184    /// Output only. Tool parameter key match metric values.
25185    pub tool_parameter_key_match_metric_values:
25186        std::vec::Vec<crate::model::ToolParameterKeyMatchMetricValue>,
25187
25188    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25189}
25190
25191#[cfg(feature = "evaluation-service")]
25192impl ToolParameterKeyMatchResults {
25193    pub fn new() -> Self {
25194        std::default::Default::default()
25195    }
25196
25197    /// Sets the value of [tool_parameter_key_match_metric_values][crate::model::ToolParameterKeyMatchResults::tool_parameter_key_match_metric_values].
25198    pub fn set_tool_parameter_key_match_metric_values<T, V>(mut self, v: T) -> Self
25199    where
25200        T: std::iter::IntoIterator<Item = V>,
25201        V: std::convert::Into<crate::model::ToolParameterKeyMatchMetricValue>,
25202    {
25203        use std::iter::Iterator;
25204        self.tool_parameter_key_match_metric_values = v.into_iter().map(|i| i.into()).collect();
25205        self
25206    }
25207}
25208
25209#[cfg(feature = "evaluation-service")]
25210impl wkt::message::Message for ToolParameterKeyMatchResults {
25211    fn typename() -> &'static str {
25212        "type.googleapis.com/google.cloud.aiplatform.v1.ToolParameterKeyMatchResults"
25213    }
25214}
25215
25216/// Tool parameter key match metric value for an instance.
25217#[cfg(feature = "evaluation-service")]
25218#[derive(Clone, Default, PartialEq)]
25219#[non_exhaustive]
25220pub struct ToolParameterKeyMatchMetricValue {
25221    /// Output only. Tool parameter key match score.
25222    pub score: std::option::Option<f32>,
25223
25224    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25225}
25226
25227#[cfg(feature = "evaluation-service")]
25228impl ToolParameterKeyMatchMetricValue {
25229    pub fn new() -> Self {
25230        std::default::Default::default()
25231    }
25232
25233    /// Sets the value of [score][crate::model::ToolParameterKeyMatchMetricValue::score].
25234    pub fn set_score<T>(mut self, v: T) -> Self
25235    where
25236        T: std::convert::Into<f32>,
25237    {
25238        self.score = std::option::Option::Some(v.into());
25239        self
25240    }
25241
25242    /// Sets or clears the value of [score][crate::model::ToolParameterKeyMatchMetricValue::score].
25243    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
25244    where
25245        T: std::convert::Into<f32>,
25246    {
25247        self.score = v.map(|x| x.into());
25248        self
25249    }
25250}
25251
25252#[cfg(feature = "evaluation-service")]
25253impl wkt::message::Message for ToolParameterKeyMatchMetricValue {
25254    fn typename() -> &'static str {
25255        "type.googleapis.com/google.cloud.aiplatform.v1.ToolParameterKeyMatchMetricValue"
25256    }
25257}
25258
25259/// Input for tool parameter key value match metric.
25260#[cfg(feature = "evaluation-service")]
25261#[derive(Clone, Default, PartialEq)]
25262#[non_exhaustive]
25263pub struct ToolParameterKVMatchInput {
25264    /// Required. Spec for tool parameter key value match metric.
25265    pub metric_spec: std::option::Option<crate::model::ToolParameterKVMatchSpec>,
25266
25267    /// Required. Repeated tool parameter key value match instances.
25268    pub instances: std::vec::Vec<crate::model::ToolParameterKVMatchInstance>,
25269
25270    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25271}
25272
25273#[cfg(feature = "evaluation-service")]
25274impl ToolParameterKVMatchInput {
25275    pub fn new() -> Self {
25276        std::default::Default::default()
25277    }
25278
25279    /// Sets the value of [metric_spec][crate::model::ToolParameterKVMatchInput::metric_spec].
25280    pub fn set_metric_spec<T>(mut self, v: T) -> Self
25281    where
25282        T: std::convert::Into<crate::model::ToolParameterKVMatchSpec>,
25283    {
25284        self.metric_spec = std::option::Option::Some(v.into());
25285        self
25286    }
25287
25288    /// Sets or clears the value of [metric_spec][crate::model::ToolParameterKVMatchInput::metric_spec].
25289    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
25290    where
25291        T: std::convert::Into<crate::model::ToolParameterKVMatchSpec>,
25292    {
25293        self.metric_spec = v.map(|x| x.into());
25294        self
25295    }
25296
25297    /// Sets the value of [instances][crate::model::ToolParameterKVMatchInput::instances].
25298    pub fn set_instances<T, V>(mut self, v: T) -> Self
25299    where
25300        T: std::iter::IntoIterator<Item = V>,
25301        V: std::convert::Into<crate::model::ToolParameterKVMatchInstance>,
25302    {
25303        use std::iter::Iterator;
25304        self.instances = v.into_iter().map(|i| i.into()).collect();
25305        self
25306    }
25307}
25308
25309#[cfg(feature = "evaluation-service")]
25310impl wkt::message::Message for ToolParameterKVMatchInput {
25311    fn typename() -> &'static str {
25312        "type.googleapis.com/google.cloud.aiplatform.v1.ToolParameterKVMatchInput"
25313    }
25314}
25315
25316/// Spec for tool parameter key value match metric.
25317#[cfg(feature = "evaluation-service")]
25318#[derive(Clone, Default, PartialEq)]
25319#[non_exhaustive]
25320pub struct ToolParameterKVMatchSpec {
25321    /// Optional. Whether to use STRICT string match on parameter values.
25322    pub use_strict_string_match: bool,
25323
25324    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25325}
25326
25327#[cfg(feature = "evaluation-service")]
25328impl ToolParameterKVMatchSpec {
25329    pub fn new() -> Self {
25330        std::default::Default::default()
25331    }
25332
25333    /// Sets the value of [use_strict_string_match][crate::model::ToolParameterKVMatchSpec::use_strict_string_match].
25334    pub fn set_use_strict_string_match<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25335        self.use_strict_string_match = v.into();
25336        self
25337    }
25338}
25339
25340#[cfg(feature = "evaluation-service")]
25341impl wkt::message::Message for ToolParameterKVMatchSpec {
25342    fn typename() -> &'static str {
25343        "type.googleapis.com/google.cloud.aiplatform.v1.ToolParameterKVMatchSpec"
25344    }
25345}
25346
25347/// Spec for tool parameter key value match instance.
25348#[cfg(feature = "evaluation-service")]
25349#[derive(Clone, Default, PartialEq)]
25350#[non_exhaustive]
25351pub struct ToolParameterKVMatchInstance {
25352    /// Required. Output of the evaluated model.
25353    pub prediction: std::option::Option<std::string::String>,
25354
25355    /// Required. Ground truth used to compare against the prediction.
25356    pub reference: std::option::Option<std::string::String>,
25357
25358    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25359}
25360
25361#[cfg(feature = "evaluation-service")]
25362impl ToolParameterKVMatchInstance {
25363    pub fn new() -> Self {
25364        std::default::Default::default()
25365    }
25366
25367    /// Sets the value of [prediction][crate::model::ToolParameterKVMatchInstance::prediction].
25368    pub fn set_prediction<T>(mut self, v: T) -> Self
25369    where
25370        T: std::convert::Into<std::string::String>,
25371    {
25372        self.prediction = std::option::Option::Some(v.into());
25373        self
25374    }
25375
25376    /// Sets or clears the value of [prediction][crate::model::ToolParameterKVMatchInstance::prediction].
25377    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
25378    where
25379        T: std::convert::Into<std::string::String>,
25380    {
25381        self.prediction = v.map(|x| x.into());
25382        self
25383    }
25384
25385    /// Sets the value of [reference][crate::model::ToolParameterKVMatchInstance::reference].
25386    pub fn set_reference<T>(mut self, v: T) -> Self
25387    where
25388        T: std::convert::Into<std::string::String>,
25389    {
25390        self.reference = std::option::Option::Some(v.into());
25391        self
25392    }
25393
25394    /// Sets or clears the value of [reference][crate::model::ToolParameterKVMatchInstance::reference].
25395    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
25396    where
25397        T: std::convert::Into<std::string::String>,
25398    {
25399        self.reference = v.map(|x| x.into());
25400        self
25401    }
25402}
25403
25404#[cfg(feature = "evaluation-service")]
25405impl wkt::message::Message for ToolParameterKVMatchInstance {
25406    fn typename() -> &'static str {
25407        "type.googleapis.com/google.cloud.aiplatform.v1.ToolParameterKVMatchInstance"
25408    }
25409}
25410
25411/// Results for tool parameter key value match metric.
25412#[cfg(feature = "evaluation-service")]
25413#[derive(Clone, Default, PartialEq)]
25414#[non_exhaustive]
25415pub struct ToolParameterKVMatchResults {
25416    /// Output only. Tool parameter key value match metric values.
25417    pub tool_parameter_kv_match_metric_values:
25418        std::vec::Vec<crate::model::ToolParameterKVMatchMetricValue>,
25419
25420    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25421}
25422
25423#[cfg(feature = "evaluation-service")]
25424impl ToolParameterKVMatchResults {
25425    pub fn new() -> Self {
25426        std::default::Default::default()
25427    }
25428
25429    /// Sets the value of [tool_parameter_kv_match_metric_values][crate::model::ToolParameterKVMatchResults::tool_parameter_kv_match_metric_values].
25430    pub fn set_tool_parameter_kv_match_metric_values<T, V>(mut self, v: T) -> Self
25431    where
25432        T: std::iter::IntoIterator<Item = V>,
25433        V: std::convert::Into<crate::model::ToolParameterKVMatchMetricValue>,
25434    {
25435        use std::iter::Iterator;
25436        self.tool_parameter_kv_match_metric_values = v.into_iter().map(|i| i.into()).collect();
25437        self
25438    }
25439}
25440
25441#[cfg(feature = "evaluation-service")]
25442impl wkt::message::Message for ToolParameterKVMatchResults {
25443    fn typename() -> &'static str {
25444        "type.googleapis.com/google.cloud.aiplatform.v1.ToolParameterKVMatchResults"
25445    }
25446}
25447
25448/// Tool parameter key value match metric value for an instance.
25449#[cfg(feature = "evaluation-service")]
25450#[derive(Clone, Default, PartialEq)]
25451#[non_exhaustive]
25452pub struct ToolParameterKVMatchMetricValue {
25453    /// Output only. Tool parameter key value match score.
25454    pub score: std::option::Option<f32>,
25455
25456    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25457}
25458
25459#[cfg(feature = "evaluation-service")]
25460impl ToolParameterKVMatchMetricValue {
25461    pub fn new() -> Self {
25462        std::default::Default::default()
25463    }
25464
25465    /// Sets the value of [score][crate::model::ToolParameterKVMatchMetricValue::score].
25466    pub fn set_score<T>(mut self, v: T) -> Self
25467    where
25468        T: std::convert::Into<f32>,
25469    {
25470        self.score = std::option::Option::Some(v.into());
25471        self
25472    }
25473
25474    /// Sets or clears the value of [score][crate::model::ToolParameterKVMatchMetricValue::score].
25475    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
25476    where
25477        T: std::convert::Into<f32>,
25478    {
25479        self.score = v.map(|x| x.into());
25480        self
25481    }
25482}
25483
25484#[cfg(feature = "evaluation-service")]
25485impl wkt::message::Message for ToolParameterKVMatchMetricValue {
25486    fn typename() -> &'static str {
25487        "type.googleapis.com/google.cloud.aiplatform.v1.ToolParameterKVMatchMetricValue"
25488    }
25489}
25490
25491/// Input for Comet metric.
25492#[cfg(feature = "evaluation-service")]
25493#[derive(Clone, Default, PartialEq)]
25494#[non_exhaustive]
25495pub struct CometInput {
25496    /// Required. Spec for comet metric.
25497    pub metric_spec: std::option::Option<crate::model::CometSpec>,
25498
25499    /// Required. Comet instance.
25500    pub instance: std::option::Option<crate::model::CometInstance>,
25501
25502    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25503}
25504
25505#[cfg(feature = "evaluation-service")]
25506impl CometInput {
25507    pub fn new() -> Self {
25508        std::default::Default::default()
25509    }
25510
25511    /// Sets the value of [metric_spec][crate::model::CometInput::metric_spec].
25512    pub fn set_metric_spec<T>(mut self, v: T) -> Self
25513    where
25514        T: std::convert::Into<crate::model::CometSpec>,
25515    {
25516        self.metric_spec = std::option::Option::Some(v.into());
25517        self
25518    }
25519
25520    /// Sets or clears the value of [metric_spec][crate::model::CometInput::metric_spec].
25521    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
25522    where
25523        T: std::convert::Into<crate::model::CometSpec>,
25524    {
25525        self.metric_spec = v.map(|x| x.into());
25526        self
25527    }
25528
25529    /// Sets the value of [instance][crate::model::CometInput::instance].
25530    pub fn set_instance<T>(mut self, v: T) -> Self
25531    where
25532        T: std::convert::Into<crate::model::CometInstance>,
25533    {
25534        self.instance = std::option::Option::Some(v.into());
25535        self
25536    }
25537
25538    /// Sets or clears the value of [instance][crate::model::CometInput::instance].
25539    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
25540    where
25541        T: std::convert::Into<crate::model::CometInstance>,
25542    {
25543        self.instance = v.map(|x| x.into());
25544        self
25545    }
25546}
25547
25548#[cfg(feature = "evaluation-service")]
25549impl wkt::message::Message for CometInput {
25550    fn typename() -> &'static str {
25551        "type.googleapis.com/google.cloud.aiplatform.v1.CometInput"
25552    }
25553}
25554
25555/// Spec for Comet metric.
25556#[cfg(feature = "evaluation-service")]
25557#[derive(Clone, Default, PartialEq)]
25558#[non_exhaustive]
25559pub struct CometSpec {
25560    /// Required. Which version to use for evaluation.
25561    pub version: std::option::Option<crate::model::comet_spec::CometVersion>,
25562
25563    /// Optional. Source language in BCP-47 format.
25564    pub source_language: std::string::String,
25565
25566    /// Optional. Target language in BCP-47 format. Covers both prediction and
25567    /// reference.
25568    pub target_language: std::string::String,
25569
25570    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25571}
25572
25573#[cfg(feature = "evaluation-service")]
25574impl CometSpec {
25575    pub fn new() -> Self {
25576        std::default::Default::default()
25577    }
25578
25579    /// Sets the value of [version][crate::model::CometSpec::version].
25580    pub fn set_version<T>(mut self, v: T) -> Self
25581    where
25582        T: std::convert::Into<crate::model::comet_spec::CometVersion>,
25583    {
25584        self.version = std::option::Option::Some(v.into());
25585        self
25586    }
25587
25588    /// Sets or clears the value of [version][crate::model::CometSpec::version].
25589    pub fn set_or_clear_version<T>(mut self, v: std::option::Option<T>) -> Self
25590    where
25591        T: std::convert::Into<crate::model::comet_spec::CometVersion>,
25592    {
25593        self.version = v.map(|x| x.into());
25594        self
25595    }
25596
25597    /// Sets the value of [source_language][crate::model::CometSpec::source_language].
25598    pub fn set_source_language<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25599        self.source_language = v.into();
25600        self
25601    }
25602
25603    /// Sets the value of [target_language][crate::model::CometSpec::target_language].
25604    pub fn set_target_language<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25605        self.target_language = v.into();
25606        self
25607    }
25608}
25609
25610#[cfg(feature = "evaluation-service")]
25611impl wkt::message::Message for CometSpec {
25612    fn typename() -> &'static str {
25613        "type.googleapis.com/google.cloud.aiplatform.v1.CometSpec"
25614    }
25615}
25616
25617/// Defines additional types related to [CometSpec].
25618#[cfg(feature = "evaluation-service")]
25619pub mod comet_spec {
25620    #[allow(unused_imports)]
25621    use super::*;
25622
25623    /// Comet version options.
25624    ///
25625    /// # Working with unknown values
25626    ///
25627    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
25628    /// additional enum variants at any time. Adding new variants is not considered
25629    /// a breaking change. Applications should write their code in anticipation of:
25630    ///
25631    /// - New values appearing in future releases of the client library, **and**
25632    /// - New values received dynamically, without application changes.
25633    ///
25634    /// Please consult the [Working with enums] section in the user guide for some
25635    /// guidelines.
25636    ///
25637    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
25638    #[cfg(feature = "evaluation-service")]
25639    #[derive(Clone, Debug, PartialEq)]
25640    #[non_exhaustive]
25641    pub enum CometVersion {
25642        /// Comet version unspecified.
25643        Unspecified,
25644        /// Comet 22 for translation + source + reference
25645        /// (source-reference-combined).
25646        Comet22SrcRef,
25647        /// If set, the enum was initialized with an unknown value.
25648        ///
25649        /// Applications can examine the value using [CometVersion::value] or
25650        /// [CometVersion::name].
25651        UnknownValue(comet_version::UnknownValue),
25652    }
25653
25654    #[doc(hidden)]
25655    #[cfg(feature = "evaluation-service")]
25656    pub mod comet_version {
25657        #[allow(unused_imports)]
25658        use super::*;
25659        #[derive(Clone, Debug, PartialEq)]
25660        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25661    }
25662
25663    #[cfg(feature = "evaluation-service")]
25664    impl CometVersion {
25665        /// Gets the enum value.
25666        ///
25667        /// Returns `None` if the enum contains an unknown value deserialized from
25668        /// the string representation of enums.
25669        pub fn value(&self) -> std::option::Option<i32> {
25670            match self {
25671                Self::Unspecified => std::option::Option::Some(0),
25672                Self::Comet22SrcRef => std::option::Option::Some(2),
25673                Self::UnknownValue(u) => u.0.value(),
25674            }
25675        }
25676
25677        /// Gets the enum value as a string.
25678        ///
25679        /// Returns `None` if the enum contains an unknown value deserialized from
25680        /// the integer representation of enums.
25681        pub fn name(&self) -> std::option::Option<&str> {
25682            match self {
25683                Self::Unspecified => std::option::Option::Some("COMET_VERSION_UNSPECIFIED"),
25684                Self::Comet22SrcRef => std::option::Option::Some("COMET_22_SRC_REF"),
25685                Self::UnknownValue(u) => u.0.name(),
25686            }
25687        }
25688    }
25689
25690    #[cfg(feature = "evaluation-service")]
25691    impl std::default::Default for CometVersion {
25692        fn default() -> Self {
25693            use std::convert::From;
25694            Self::from(0)
25695        }
25696    }
25697
25698    #[cfg(feature = "evaluation-service")]
25699    impl std::fmt::Display for CometVersion {
25700        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25701            wkt::internal::display_enum(f, self.name(), self.value())
25702        }
25703    }
25704
25705    #[cfg(feature = "evaluation-service")]
25706    impl std::convert::From<i32> for CometVersion {
25707        fn from(value: i32) -> Self {
25708            match value {
25709                0 => Self::Unspecified,
25710                2 => Self::Comet22SrcRef,
25711                _ => Self::UnknownValue(comet_version::UnknownValue(
25712                    wkt::internal::UnknownEnumValue::Integer(value),
25713                )),
25714            }
25715        }
25716    }
25717
25718    #[cfg(feature = "evaluation-service")]
25719    impl std::convert::From<&str> for CometVersion {
25720        fn from(value: &str) -> Self {
25721            use std::string::ToString;
25722            match value {
25723                "COMET_VERSION_UNSPECIFIED" => Self::Unspecified,
25724                "COMET_22_SRC_REF" => Self::Comet22SrcRef,
25725                _ => Self::UnknownValue(comet_version::UnknownValue(
25726                    wkt::internal::UnknownEnumValue::String(value.to_string()),
25727                )),
25728            }
25729        }
25730    }
25731
25732    #[cfg(feature = "evaluation-service")]
25733    impl serde::ser::Serialize for CometVersion {
25734        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25735        where
25736            S: serde::Serializer,
25737        {
25738            match self {
25739                Self::Unspecified => serializer.serialize_i32(0),
25740                Self::Comet22SrcRef => serializer.serialize_i32(2),
25741                Self::UnknownValue(u) => u.0.serialize(serializer),
25742            }
25743        }
25744    }
25745
25746    #[cfg(feature = "evaluation-service")]
25747    impl<'de> serde::de::Deserialize<'de> for CometVersion {
25748        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25749        where
25750            D: serde::Deserializer<'de>,
25751        {
25752            deserializer.deserialize_any(wkt::internal::EnumVisitor::<CometVersion>::new(
25753                ".google.cloud.aiplatform.v1.CometSpec.CometVersion",
25754            ))
25755        }
25756    }
25757}
25758
25759/// Spec for Comet instance - The fields used for evaluation are dependent on the
25760/// comet version.
25761#[cfg(feature = "evaluation-service")]
25762#[derive(Clone, Default, PartialEq)]
25763#[non_exhaustive]
25764pub struct CometInstance {
25765    /// Required. Output of the evaluated model.
25766    pub prediction: std::option::Option<std::string::String>,
25767
25768    /// Optional. Ground truth used to compare against the prediction.
25769    pub reference: std::option::Option<std::string::String>,
25770
25771    /// Optional. Source text in original language.
25772    pub source: std::option::Option<std::string::String>,
25773
25774    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25775}
25776
25777#[cfg(feature = "evaluation-service")]
25778impl CometInstance {
25779    pub fn new() -> Self {
25780        std::default::Default::default()
25781    }
25782
25783    /// Sets the value of [prediction][crate::model::CometInstance::prediction].
25784    pub fn set_prediction<T>(mut self, v: T) -> Self
25785    where
25786        T: std::convert::Into<std::string::String>,
25787    {
25788        self.prediction = std::option::Option::Some(v.into());
25789        self
25790    }
25791
25792    /// Sets or clears the value of [prediction][crate::model::CometInstance::prediction].
25793    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
25794    where
25795        T: std::convert::Into<std::string::String>,
25796    {
25797        self.prediction = v.map(|x| x.into());
25798        self
25799    }
25800
25801    /// Sets the value of [reference][crate::model::CometInstance::reference].
25802    pub fn set_reference<T>(mut self, v: T) -> Self
25803    where
25804        T: std::convert::Into<std::string::String>,
25805    {
25806        self.reference = std::option::Option::Some(v.into());
25807        self
25808    }
25809
25810    /// Sets or clears the value of [reference][crate::model::CometInstance::reference].
25811    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
25812    where
25813        T: std::convert::Into<std::string::String>,
25814    {
25815        self.reference = v.map(|x| x.into());
25816        self
25817    }
25818
25819    /// Sets the value of [source][crate::model::CometInstance::source].
25820    pub fn set_source<T>(mut self, v: T) -> Self
25821    where
25822        T: std::convert::Into<std::string::String>,
25823    {
25824        self.source = std::option::Option::Some(v.into());
25825        self
25826    }
25827
25828    /// Sets or clears the value of [source][crate::model::CometInstance::source].
25829    pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
25830    where
25831        T: std::convert::Into<std::string::String>,
25832    {
25833        self.source = v.map(|x| x.into());
25834        self
25835    }
25836}
25837
25838#[cfg(feature = "evaluation-service")]
25839impl wkt::message::Message for CometInstance {
25840    fn typename() -> &'static str {
25841        "type.googleapis.com/google.cloud.aiplatform.v1.CometInstance"
25842    }
25843}
25844
25845/// Spec for Comet result - calculates the comet score for the given instance
25846/// using the version specified in the spec.
25847#[cfg(feature = "evaluation-service")]
25848#[derive(Clone, Default, PartialEq)]
25849#[non_exhaustive]
25850pub struct CometResult {
25851    /// Output only. Comet score. Range depends on version.
25852    pub score: std::option::Option<f32>,
25853
25854    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25855}
25856
25857#[cfg(feature = "evaluation-service")]
25858impl CometResult {
25859    pub fn new() -> Self {
25860        std::default::Default::default()
25861    }
25862
25863    /// Sets the value of [score][crate::model::CometResult::score].
25864    pub fn set_score<T>(mut self, v: T) -> Self
25865    where
25866        T: std::convert::Into<f32>,
25867    {
25868        self.score = std::option::Option::Some(v.into());
25869        self
25870    }
25871
25872    /// Sets or clears the value of [score][crate::model::CometResult::score].
25873    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
25874    where
25875        T: std::convert::Into<f32>,
25876    {
25877        self.score = v.map(|x| x.into());
25878        self
25879    }
25880}
25881
25882#[cfg(feature = "evaluation-service")]
25883impl wkt::message::Message for CometResult {
25884    fn typename() -> &'static str {
25885        "type.googleapis.com/google.cloud.aiplatform.v1.CometResult"
25886    }
25887}
25888
25889/// Input for MetricX metric.
25890#[cfg(feature = "evaluation-service")]
25891#[derive(Clone, Default, PartialEq)]
25892#[non_exhaustive]
25893pub struct MetricxInput {
25894    /// Required. Spec for Metricx metric.
25895    pub metric_spec: std::option::Option<crate::model::MetricxSpec>,
25896
25897    /// Required. Metricx instance.
25898    pub instance: std::option::Option<crate::model::MetricxInstance>,
25899
25900    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25901}
25902
25903#[cfg(feature = "evaluation-service")]
25904impl MetricxInput {
25905    pub fn new() -> Self {
25906        std::default::Default::default()
25907    }
25908
25909    /// Sets the value of [metric_spec][crate::model::MetricxInput::metric_spec].
25910    pub fn set_metric_spec<T>(mut self, v: T) -> Self
25911    where
25912        T: std::convert::Into<crate::model::MetricxSpec>,
25913    {
25914        self.metric_spec = std::option::Option::Some(v.into());
25915        self
25916    }
25917
25918    /// Sets or clears the value of [metric_spec][crate::model::MetricxInput::metric_spec].
25919    pub fn set_or_clear_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
25920    where
25921        T: std::convert::Into<crate::model::MetricxSpec>,
25922    {
25923        self.metric_spec = v.map(|x| x.into());
25924        self
25925    }
25926
25927    /// Sets the value of [instance][crate::model::MetricxInput::instance].
25928    pub fn set_instance<T>(mut self, v: T) -> Self
25929    where
25930        T: std::convert::Into<crate::model::MetricxInstance>,
25931    {
25932        self.instance = std::option::Option::Some(v.into());
25933        self
25934    }
25935
25936    /// Sets or clears the value of [instance][crate::model::MetricxInput::instance].
25937    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
25938    where
25939        T: std::convert::Into<crate::model::MetricxInstance>,
25940    {
25941        self.instance = v.map(|x| x.into());
25942        self
25943    }
25944}
25945
25946#[cfg(feature = "evaluation-service")]
25947impl wkt::message::Message for MetricxInput {
25948    fn typename() -> &'static str {
25949        "type.googleapis.com/google.cloud.aiplatform.v1.MetricxInput"
25950    }
25951}
25952
25953/// Spec for MetricX metric.
25954#[cfg(feature = "evaluation-service")]
25955#[derive(Clone, Default, PartialEq)]
25956#[non_exhaustive]
25957pub struct MetricxSpec {
25958    /// Required. Which version to use for evaluation.
25959    pub version: std::option::Option<crate::model::metricx_spec::MetricxVersion>,
25960
25961    /// Optional. Source language in BCP-47 format.
25962    pub source_language: std::string::String,
25963
25964    /// Optional. Target language in BCP-47 format. Covers both prediction and
25965    /// reference.
25966    pub target_language: std::string::String,
25967
25968    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25969}
25970
25971#[cfg(feature = "evaluation-service")]
25972impl MetricxSpec {
25973    pub fn new() -> Self {
25974        std::default::Default::default()
25975    }
25976
25977    /// Sets the value of [version][crate::model::MetricxSpec::version].
25978    pub fn set_version<T>(mut self, v: T) -> Self
25979    where
25980        T: std::convert::Into<crate::model::metricx_spec::MetricxVersion>,
25981    {
25982        self.version = std::option::Option::Some(v.into());
25983        self
25984    }
25985
25986    /// Sets or clears the value of [version][crate::model::MetricxSpec::version].
25987    pub fn set_or_clear_version<T>(mut self, v: std::option::Option<T>) -> Self
25988    where
25989        T: std::convert::Into<crate::model::metricx_spec::MetricxVersion>,
25990    {
25991        self.version = v.map(|x| x.into());
25992        self
25993    }
25994
25995    /// Sets the value of [source_language][crate::model::MetricxSpec::source_language].
25996    pub fn set_source_language<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25997        self.source_language = v.into();
25998        self
25999    }
26000
26001    /// Sets the value of [target_language][crate::model::MetricxSpec::target_language].
26002    pub fn set_target_language<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26003        self.target_language = v.into();
26004        self
26005    }
26006}
26007
26008#[cfg(feature = "evaluation-service")]
26009impl wkt::message::Message for MetricxSpec {
26010    fn typename() -> &'static str {
26011        "type.googleapis.com/google.cloud.aiplatform.v1.MetricxSpec"
26012    }
26013}
26014
26015/// Defines additional types related to [MetricxSpec].
26016#[cfg(feature = "evaluation-service")]
26017pub mod metricx_spec {
26018    #[allow(unused_imports)]
26019    use super::*;
26020
26021    /// MetricX Version options.
26022    ///
26023    /// # Working with unknown values
26024    ///
26025    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26026    /// additional enum variants at any time. Adding new variants is not considered
26027    /// a breaking change. Applications should write their code in anticipation of:
26028    ///
26029    /// - New values appearing in future releases of the client library, **and**
26030    /// - New values received dynamically, without application changes.
26031    ///
26032    /// Please consult the [Working with enums] section in the user guide for some
26033    /// guidelines.
26034    ///
26035    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26036    #[cfg(feature = "evaluation-service")]
26037    #[derive(Clone, Debug, PartialEq)]
26038    #[non_exhaustive]
26039    pub enum MetricxVersion {
26040        /// MetricX version unspecified.
26041        Unspecified,
26042        /// MetricX 2024 (2.6) for translation + reference (reference-based).
26043        Metricx24Ref,
26044        /// MetricX 2024 (2.6) for translation + source (QE).
26045        Metricx24Src,
26046        /// MetricX 2024 (2.6) for translation + source + reference
26047        /// (source-reference-combined).
26048        Metricx24SrcRef,
26049        /// If set, the enum was initialized with an unknown value.
26050        ///
26051        /// Applications can examine the value using [MetricxVersion::value] or
26052        /// [MetricxVersion::name].
26053        UnknownValue(metricx_version::UnknownValue),
26054    }
26055
26056    #[doc(hidden)]
26057    #[cfg(feature = "evaluation-service")]
26058    pub mod metricx_version {
26059        #[allow(unused_imports)]
26060        use super::*;
26061        #[derive(Clone, Debug, PartialEq)]
26062        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26063    }
26064
26065    #[cfg(feature = "evaluation-service")]
26066    impl MetricxVersion {
26067        /// Gets the enum value.
26068        ///
26069        /// Returns `None` if the enum contains an unknown value deserialized from
26070        /// the string representation of enums.
26071        pub fn value(&self) -> std::option::Option<i32> {
26072            match self {
26073                Self::Unspecified => std::option::Option::Some(0),
26074                Self::Metricx24Ref => std::option::Option::Some(1),
26075                Self::Metricx24Src => std::option::Option::Some(2),
26076                Self::Metricx24SrcRef => std::option::Option::Some(3),
26077                Self::UnknownValue(u) => u.0.value(),
26078            }
26079        }
26080
26081        /// Gets the enum value as a string.
26082        ///
26083        /// Returns `None` if the enum contains an unknown value deserialized from
26084        /// the integer representation of enums.
26085        pub fn name(&self) -> std::option::Option<&str> {
26086            match self {
26087                Self::Unspecified => std::option::Option::Some("METRICX_VERSION_UNSPECIFIED"),
26088                Self::Metricx24Ref => std::option::Option::Some("METRICX_24_REF"),
26089                Self::Metricx24Src => std::option::Option::Some("METRICX_24_SRC"),
26090                Self::Metricx24SrcRef => std::option::Option::Some("METRICX_24_SRC_REF"),
26091                Self::UnknownValue(u) => u.0.name(),
26092            }
26093        }
26094    }
26095
26096    #[cfg(feature = "evaluation-service")]
26097    impl std::default::Default for MetricxVersion {
26098        fn default() -> Self {
26099            use std::convert::From;
26100            Self::from(0)
26101        }
26102    }
26103
26104    #[cfg(feature = "evaluation-service")]
26105    impl std::fmt::Display for MetricxVersion {
26106        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26107            wkt::internal::display_enum(f, self.name(), self.value())
26108        }
26109    }
26110
26111    #[cfg(feature = "evaluation-service")]
26112    impl std::convert::From<i32> for MetricxVersion {
26113        fn from(value: i32) -> Self {
26114            match value {
26115                0 => Self::Unspecified,
26116                1 => Self::Metricx24Ref,
26117                2 => Self::Metricx24Src,
26118                3 => Self::Metricx24SrcRef,
26119                _ => Self::UnknownValue(metricx_version::UnknownValue(
26120                    wkt::internal::UnknownEnumValue::Integer(value),
26121                )),
26122            }
26123        }
26124    }
26125
26126    #[cfg(feature = "evaluation-service")]
26127    impl std::convert::From<&str> for MetricxVersion {
26128        fn from(value: &str) -> Self {
26129            use std::string::ToString;
26130            match value {
26131                "METRICX_VERSION_UNSPECIFIED" => Self::Unspecified,
26132                "METRICX_24_REF" => Self::Metricx24Ref,
26133                "METRICX_24_SRC" => Self::Metricx24Src,
26134                "METRICX_24_SRC_REF" => Self::Metricx24SrcRef,
26135                _ => Self::UnknownValue(metricx_version::UnknownValue(
26136                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26137                )),
26138            }
26139        }
26140    }
26141
26142    #[cfg(feature = "evaluation-service")]
26143    impl serde::ser::Serialize for MetricxVersion {
26144        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26145        where
26146            S: serde::Serializer,
26147        {
26148            match self {
26149                Self::Unspecified => serializer.serialize_i32(0),
26150                Self::Metricx24Ref => serializer.serialize_i32(1),
26151                Self::Metricx24Src => serializer.serialize_i32(2),
26152                Self::Metricx24SrcRef => serializer.serialize_i32(3),
26153                Self::UnknownValue(u) => u.0.serialize(serializer),
26154            }
26155        }
26156    }
26157
26158    #[cfg(feature = "evaluation-service")]
26159    impl<'de> serde::de::Deserialize<'de> for MetricxVersion {
26160        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26161        where
26162            D: serde::Deserializer<'de>,
26163        {
26164            deserializer.deserialize_any(wkt::internal::EnumVisitor::<MetricxVersion>::new(
26165                ".google.cloud.aiplatform.v1.MetricxSpec.MetricxVersion",
26166            ))
26167        }
26168    }
26169}
26170
26171/// Spec for MetricX instance - The fields used for evaluation are dependent on
26172/// the MetricX version.
26173#[cfg(feature = "evaluation-service")]
26174#[derive(Clone, Default, PartialEq)]
26175#[non_exhaustive]
26176pub struct MetricxInstance {
26177    /// Required. Output of the evaluated model.
26178    pub prediction: std::option::Option<std::string::String>,
26179
26180    /// Optional. Ground truth used to compare against the prediction.
26181    pub reference: std::option::Option<std::string::String>,
26182
26183    /// Optional. Source text in original language.
26184    pub source: std::option::Option<std::string::String>,
26185
26186    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26187}
26188
26189#[cfg(feature = "evaluation-service")]
26190impl MetricxInstance {
26191    pub fn new() -> Self {
26192        std::default::Default::default()
26193    }
26194
26195    /// Sets the value of [prediction][crate::model::MetricxInstance::prediction].
26196    pub fn set_prediction<T>(mut self, v: T) -> Self
26197    where
26198        T: std::convert::Into<std::string::String>,
26199    {
26200        self.prediction = std::option::Option::Some(v.into());
26201        self
26202    }
26203
26204    /// Sets or clears the value of [prediction][crate::model::MetricxInstance::prediction].
26205    pub fn set_or_clear_prediction<T>(mut self, v: std::option::Option<T>) -> Self
26206    where
26207        T: std::convert::Into<std::string::String>,
26208    {
26209        self.prediction = v.map(|x| x.into());
26210        self
26211    }
26212
26213    /// Sets the value of [reference][crate::model::MetricxInstance::reference].
26214    pub fn set_reference<T>(mut self, v: T) -> Self
26215    where
26216        T: std::convert::Into<std::string::String>,
26217    {
26218        self.reference = std::option::Option::Some(v.into());
26219        self
26220    }
26221
26222    /// Sets or clears the value of [reference][crate::model::MetricxInstance::reference].
26223    pub fn set_or_clear_reference<T>(mut self, v: std::option::Option<T>) -> Self
26224    where
26225        T: std::convert::Into<std::string::String>,
26226    {
26227        self.reference = v.map(|x| x.into());
26228        self
26229    }
26230
26231    /// Sets the value of [source][crate::model::MetricxInstance::source].
26232    pub fn set_source<T>(mut self, v: T) -> Self
26233    where
26234        T: std::convert::Into<std::string::String>,
26235    {
26236        self.source = std::option::Option::Some(v.into());
26237        self
26238    }
26239
26240    /// Sets or clears the value of [source][crate::model::MetricxInstance::source].
26241    pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
26242    where
26243        T: std::convert::Into<std::string::String>,
26244    {
26245        self.source = v.map(|x| x.into());
26246        self
26247    }
26248}
26249
26250#[cfg(feature = "evaluation-service")]
26251impl wkt::message::Message for MetricxInstance {
26252    fn typename() -> &'static str {
26253        "type.googleapis.com/google.cloud.aiplatform.v1.MetricxInstance"
26254    }
26255}
26256
26257/// Spec for MetricX result - calculates the MetricX score for the given instance
26258/// using the version specified in the spec.
26259#[cfg(feature = "evaluation-service")]
26260#[derive(Clone, Default, PartialEq)]
26261#[non_exhaustive]
26262pub struct MetricxResult {
26263    /// Output only. MetricX score. Range depends on version.
26264    pub score: std::option::Option<f32>,
26265
26266    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26267}
26268
26269#[cfg(feature = "evaluation-service")]
26270impl MetricxResult {
26271    pub fn new() -> Self {
26272        std::default::Default::default()
26273    }
26274
26275    /// Sets the value of [score][crate::model::MetricxResult::score].
26276    pub fn set_score<T>(mut self, v: T) -> Self
26277    where
26278        T: std::convert::Into<f32>,
26279    {
26280        self.score = std::option::Option::Some(v.into());
26281        self
26282    }
26283
26284    /// Sets or clears the value of [score][crate::model::MetricxResult::score].
26285    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
26286    where
26287        T: std::convert::Into<f32>,
26288    {
26289        self.score = v.map(|x| x.into());
26290        self
26291    }
26292}
26293
26294#[cfg(feature = "evaluation-service")]
26295impl wkt::message::Message for MetricxResult {
26296    fn typename() -> &'static str {
26297        "type.googleapis.com/google.cloud.aiplatform.v1.MetricxResult"
26298    }
26299}
26300
26301/// An edge describing the relationship between an Artifact and an Execution in
26302/// a lineage graph.
26303#[cfg(feature = "metadata-service")]
26304#[derive(Clone, Default, PartialEq)]
26305#[non_exhaustive]
26306pub struct Event {
26307    /// Required. The relative resource name of the Artifact in the Event.
26308    pub artifact: std::string::String,
26309
26310    /// Output only. The relative resource name of the Execution in the Event.
26311    pub execution: std::string::String,
26312
26313    /// Output only. Time the Event occurred.
26314    pub event_time: std::option::Option<wkt::Timestamp>,
26315
26316    /// Required. The type of the Event.
26317    pub r#type: crate::model::event::Type,
26318
26319    /// The labels with user-defined metadata to annotate Events.
26320    ///
26321    /// Label keys and values can be no longer than 64 characters
26322    /// (Unicode codepoints), can only contain lowercase letters, numeric
26323    /// characters, underscores and dashes. International characters are allowed.
26324    /// No more than 64 user labels can be associated with one Event (System
26325    /// labels are excluded).
26326    ///
26327    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
26328    /// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
26329    /// and are immutable.
26330    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
26331
26332    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26333}
26334
26335#[cfg(feature = "metadata-service")]
26336impl Event {
26337    pub fn new() -> Self {
26338        std::default::Default::default()
26339    }
26340
26341    /// Sets the value of [artifact][crate::model::Event::artifact].
26342    pub fn set_artifact<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26343        self.artifact = v.into();
26344        self
26345    }
26346
26347    /// Sets the value of [execution][crate::model::Event::execution].
26348    pub fn set_execution<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26349        self.execution = v.into();
26350        self
26351    }
26352
26353    /// Sets the value of [event_time][crate::model::Event::event_time].
26354    pub fn set_event_time<T>(mut self, v: T) -> Self
26355    where
26356        T: std::convert::Into<wkt::Timestamp>,
26357    {
26358        self.event_time = std::option::Option::Some(v.into());
26359        self
26360    }
26361
26362    /// Sets or clears the value of [event_time][crate::model::Event::event_time].
26363    pub fn set_or_clear_event_time<T>(mut self, v: std::option::Option<T>) -> Self
26364    where
26365        T: std::convert::Into<wkt::Timestamp>,
26366    {
26367        self.event_time = v.map(|x| x.into());
26368        self
26369    }
26370
26371    /// Sets the value of [r#type][crate::model::Event::type].
26372    pub fn set_type<T: std::convert::Into<crate::model::event::Type>>(mut self, v: T) -> Self {
26373        self.r#type = v.into();
26374        self
26375    }
26376
26377    /// Sets the value of [labels][crate::model::Event::labels].
26378    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
26379    where
26380        T: std::iter::IntoIterator<Item = (K, V)>,
26381        K: std::convert::Into<std::string::String>,
26382        V: std::convert::Into<std::string::String>,
26383    {
26384        use std::iter::Iterator;
26385        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
26386        self
26387    }
26388}
26389
26390#[cfg(feature = "metadata-service")]
26391impl wkt::message::Message for Event {
26392    fn typename() -> &'static str {
26393        "type.googleapis.com/google.cloud.aiplatform.v1.Event"
26394    }
26395}
26396
26397/// Defines additional types related to [Event].
26398#[cfg(feature = "metadata-service")]
26399pub mod event {
26400    #[allow(unused_imports)]
26401    use super::*;
26402
26403    /// Describes whether an Event's Artifact is the Execution's input or output.
26404    ///
26405    /// # Working with unknown values
26406    ///
26407    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26408    /// additional enum variants at any time. Adding new variants is not considered
26409    /// a breaking change. Applications should write their code in anticipation of:
26410    ///
26411    /// - New values appearing in future releases of the client library, **and**
26412    /// - New values received dynamically, without application changes.
26413    ///
26414    /// Please consult the [Working with enums] section in the user guide for some
26415    /// guidelines.
26416    ///
26417    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26418    #[cfg(feature = "metadata-service")]
26419    #[derive(Clone, Debug, PartialEq)]
26420    #[non_exhaustive]
26421    pub enum Type {
26422        /// Unspecified whether input or output of the Execution.
26423        Unspecified,
26424        /// An input of the Execution.
26425        Input,
26426        /// An output of the Execution.
26427        Output,
26428        /// If set, the enum was initialized with an unknown value.
26429        ///
26430        /// Applications can examine the value using [Type::value] or
26431        /// [Type::name].
26432        UnknownValue(r#type::UnknownValue),
26433    }
26434
26435    #[doc(hidden)]
26436    #[cfg(feature = "metadata-service")]
26437    pub mod r#type {
26438        #[allow(unused_imports)]
26439        use super::*;
26440        #[derive(Clone, Debug, PartialEq)]
26441        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26442    }
26443
26444    #[cfg(feature = "metadata-service")]
26445    impl Type {
26446        /// Gets the enum value.
26447        ///
26448        /// Returns `None` if the enum contains an unknown value deserialized from
26449        /// the string representation of enums.
26450        pub fn value(&self) -> std::option::Option<i32> {
26451            match self {
26452                Self::Unspecified => std::option::Option::Some(0),
26453                Self::Input => std::option::Option::Some(1),
26454                Self::Output => std::option::Option::Some(2),
26455                Self::UnknownValue(u) => u.0.value(),
26456            }
26457        }
26458
26459        /// Gets the enum value as a string.
26460        ///
26461        /// Returns `None` if the enum contains an unknown value deserialized from
26462        /// the integer representation of enums.
26463        pub fn name(&self) -> std::option::Option<&str> {
26464            match self {
26465                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
26466                Self::Input => std::option::Option::Some("INPUT"),
26467                Self::Output => std::option::Option::Some("OUTPUT"),
26468                Self::UnknownValue(u) => u.0.name(),
26469            }
26470        }
26471    }
26472
26473    #[cfg(feature = "metadata-service")]
26474    impl std::default::Default for Type {
26475        fn default() -> Self {
26476            use std::convert::From;
26477            Self::from(0)
26478        }
26479    }
26480
26481    #[cfg(feature = "metadata-service")]
26482    impl std::fmt::Display for Type {
26483        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26484            wkt::internal::display_enum(f, self.name(), self.value())
26485        }
26486    }
26487
26488    #[cfg(feature = "metadata-service")]
26489    impl std::convert::From<i32> for Type {
26490        fn from(value: i32) -> Self {
26491            match value {
26492                0 => Self::Unspecified,
26493                1 => Self::Input,
26494                2 => Self::Output,
26495                _ => Self::UnknownValue(r#type::UnknownValue(
26496                    wkt::internal::UnknownEnumValue::Integer(value),
26497                )),
26498            }
26499        }
26500    }
26501
26502    #[cfg(feature = "metadata-service")]
26503    impl std::convert::From<&str> for Type {
26504        fn from(value: &str) -> Self {
26505            use std::string::ToString;
26506            match value {
26507                "TYPE_UNSPECIFIED" => Self::Unspecified,
26508                "INPUT" => Self::Input,
26509                "OUTPUT" => Self::Output,
26510                _ => Self::UnknownValue(r#type::UnknownValue(
26511                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26512                )),
26513            }
26514        }
26515    }
26516
26517    #[cfg(feature = "metadata-service")]
26518    impl serde::ser::Serialize for Type {
26519        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26520        where
26521            S: serde::Serializer,
26522        {
26523            match self {
26524                Self::Unspecified => serializer.serialize_i32(0),
26525                Self::Input => serializer.serialize_i32(1),
26526                Self::Output => serializer.serialize_i32(2),
26527                Self::UnknownValue(u) => u.0.serialize(serializer),
26528            }
26529        }
26530    }
26531
26532    #[cfg(feature = "metadata-service")]
26533    impl<'de> serde::de::Deserialize<'de> for Type {
26534        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26535        where
26536            D: serde::Deserializer<'de>,
26537        {
26538            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
26539                ".google.cloud.aiplatform.v1.Event.Type",
26540            ))
26541        }
26542    }
26543}
26544
26545/// Instance of a general execution.
26546#[cfg(any(
26547    feature = "metadata-service",
26548    feature = "pipeline-service",
26549    feature = "schedule-service",
26550))]
26551#[derive(Clone, Default, PartialEq)]
26552#[non_exhaustive]
26553pub struct Execution {
26554    /// Output only. The resource name of the Execution.
26555    pub name: std::string::String,
26556
26557    /// User provided display name of the Execution.
26558    /// May be up to 128 Unicode characters.
26559    pub display_name: std::string::String,
26560
26561    /// The state of this Execution. This is a property of the Execution, and does
26562    /// not imply or capture any ongoing process. This property is managed by
26563    /// clients (such as Vertex AI Pipelines) and the system does not prescribe
26564    /// or check the validity of state transitions.
26565    pub state: crate::model::execution::State,
26566
26567    /// An eTag used to perform consistent read-modify-write updates. If not set, a
26568    /// blind "overwrite" update happens.
26569    pub etag: std::string::String,
26570
26571    /// The labels with user-defined metadata to organize your Executions.
26572    ///
26573    /// Label keys and values can be no longer than 64 characters
26574    /// (Unicode codepoints), can only contain lowercase letters, numeric
26575    /// characters, underscores and dashes. International characters are allowed.
26576    /// No more than 64 user labels can be associated with one Execution (System
26577    /// labels are excluded).
26578    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
26579
26580    /// Output only. Timestamp when this Execution was created.
26581    pub create_time: std::option::Option<wkt::Timestamp>,
26582
26583    /// Output only. Timestamp when this Execution was last updated.
26584    pub update_time: std::option::Option<wkt::Timestamp>,
26585
26586    /// The title of the schema describing the metadata.
26587    ///
26588    /// Schema title and version is expected to be registered in earlier Create
26589    /// Schema calls. And both are used together as unique identifiers to identify
26590    /// schemas within the local metadata store.
26591    pub schema_title: std::string::String,
26592
26593    /// The version of the schema in `schema_title` to use.
26594    ///
26595    /// Schema title and version is expected to be registered in earlier Create
26596    /// Schema calls. And both are used together as unique identifiers to identify
26597    /// schemas within the local metadata store.
26598    pub schema_version: std::string::String,
26599
26600    /// Properties of the Execution.
26601    /// Top level metadata keys' heading and trailing spaces will be trimmed.
26602    /// The size of this field should not exceed 200KB.
26603    pub metadata: std::option::Option<wkt::Struct>,
26604
26605    /// Description of the Execution
26606    pub description: std::string::String,
26607
26608    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26609}
26610
26611#[cfg(any(
26612    feature = "metadata-service",
26613    feature = "pipeline-service",
26614    feature = "schedule-service",
26615))]
26616impl Execution {
26617    pub fn new() -> Self {
26618        std::default::Default::default()
26619    }
26620
26621    /// Sets the value of [name][crate::model::Execution::name].
26622    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26623        self.name = v.into();
26624        self
26625    }
26626
26627    /// Sets the value of [display_name][crate::model::Execution::display_name].
26628    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26629        self.display_name = v.into();
26630        self
26631    }
26632
26633    /// Sets the value of [state][crate::model::Execution::state].
26634    pub fn set_state<T: std::convert::Into<crate::model::execution::State>>(
26635        mut self,
26636        v: T,
26637    ) -> Self {
26638        self.state = v.into();
26639        self
26640    }
26641
26642    /// Sets the value of [etag][crate::model::Execution::etag].
26643    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26644        self.etag = v.into();
26645        self
26646    }
26647
26648    /// Sets the value of [labels][crate::model::Execution::labels].
26649    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
26650    where
26651        T: std::iter::IntoIterator<Item = (K, V)>,
26652        K: std::convert::Into<std::string::String>,
26653        V: std::convert::Into<std::string::String>,
26654    {
26655        use std::iter::Iterator;
26656        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
26657        self
26658    }
26659
26660    /// Sets the value of [create_time][crate::model::Execution::create_time].
26661    pub fn set_create_time<T>(mut self, v: T) -> Self
26662    where
26663        T: std::convert::Into<wkt::Timestamp>,
26664    {
26665        self.create_time = std::option::Option::Some(v.into());
26666        self
26667    }
26668
26669    /// Sets or clears the value of [create_time][crate::model::Execution::create_time].
26670    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
26671    where
26672        T: std::convert::Into<wkt::Timestamp>,
26673    {
26674        self.create_time = v.map(|x| x.into());
26675        self
26676    }
26677
26678    /// Sets the value of [update_time][crate::model::Execution::update_time].
26679    pub fn set_update_time<T>(mut self, v: T) -> Self
26680    where
26681        T: std::convert::Into<wkt::Timestamp>,
26682    {
26683        self.update_time = std::option::Option::Some(v.into());
26684        self
26685    }
26686
26687    /// Sets or clears the value of [update_time][crate::model::Execution::update_time].
26688    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
26689    where
26690        T: std::convert::Into<wkt::Timestamp>,
26691    {
26692        self.update_time = v.map(|x| x.into());
26693        self
26694    }
26695
26696    /// Sets the value of [schema_title][crate::model::Execution::schema_title].
26697    pub fn set_schema_title<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26698        self.schema_title = v.into();
26699        self
26700    }
26701
26702    /// Sets the value of [schema_version][crate::model::Execution::schema_version].
26703    pub fn set_schema_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26704        self.schema_version = v.into();
26705        self
26706    }
26707
26708    /// Sets the value of [metadata][crate::model::Execution::metadata].
26709    pub fn set_metadata<T>(mut self, v: T) -> Self
26710    where
26711        T: std::convert::Into<wkt::Struct>,
26712    {
26713        self.metadata = std::option::Option::Some(v.into());
26714        self
26715    }
26716
26717    /// Sets or clears the value of [metadata][crate::model::Execution::metadata].
26718    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
26719    where
26720        T: std::convert::Into<wkt::Struct>,
26721    {
26722        self.metadata = v.map(|x| x.into());
26723        self
26724    }
26725
26726    /// Sets the value of [description][crate::model::Execution::description].
26727    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26728        self.description = v.into();
26729        self
26730    }
26731}
26732
26733#[cfg(any(
26734    feature = "metadata-service",
26735    feature = "pipeline-service",
26736    feature = "schedule-service",
26737))]
26738impl wkt::message::Message for Execution {
26739    fn typename() -> &'static str {
26740        "type.googleapis.com/google.cloud.aiplatform.v1.Execution"
26741    }
26742}
26743
26744/// Defines additional types related to [Execution].
26745#[cfg(any(
26746    feature = "metadata-service",
26747    feature = "pipeline-service",
26748    feature = "schedule-service",
26749))]
26750pub mod execution {
26751    #[allow(unused_imports)]
26752    use super::*;
26753
26754    /// Describes the state of the Execution.
26755    ///
26756    /// # Working with unknown values
26757    ///
26758    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
26759    /// additional enum variants at any time. Adding new variants is not considered
26760    /// a breaking change. Applications should write their code in anticipation of:
26761    ///
26762    /// - New values appearing in future releases of the client library, **and**
26763    /// - New values received dynamically, without application changes.
26764    ///
26765    /// Please consult the [Working with enums] section in the user guide for some
26766    /// guidelines.
26767    ///
26768    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
26769    #[cfg(any(
26770        feature = "metadata-service",
26771        feature = "pipeline-service",
26772        feature = "schedule-service",
26773    ))]
26774    #[derive(Clone, Debug, PartialEq)]
26775    #[non_exhaustive]
26776    pub enum State {
26777        /// Unspecified Execution state
26778        Unspecified,
26779        /// The Execution is new
26780        New,
26781        /// The Execution is running
26782        Running,
26783        /// The Execution has finished running
26784        Complete,
26785        /// The Execution has failed
26786        Failed,
26787        /// The Execution completed through Cache hit.
26788        Cached,
26789        /// The Execution was cancelled.
26790        Cancelled,
26791        /// If set, the enum was initialized with an unknown value.
26792        ///
26793        /// Applications can examine the value using [State::value] or
26794        /// [State::name].
26795        UnknownValue(state::UnknownValue),
26796    }
26797
26798    #[doc(hidden)]
26799    #[cfg(any(
26800        feature = "metadata-service",
26801        feature = "pipeline-service",
26802        feature = "schedule-service",
26803    ))]
26804    pub mod state {
26805        #[allow(unused_imports)]
26806        use super::*;
26807        #[derive(Clone, Debug, PartialEq)]
26808        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26809    }
26810
26811    #[cfg(any(
26812        feature = "metadata-service",
26813        feature = "pipeline-service",
26814        feature = "schedule-service",
26815    ))]
26816    impl State {
26817        /// Gets the enum value.
26818        ///
26819        /// Returns `None` if the enum contains an unknown value deserialized from
26820        /// the string representation of enums.
26821        pub fn value(&self) -> std::option::Option<i32> {
26822            match self {
26823                Self::Unspecified => std::option::Option::Some(0),
26824                Self::New => std::option::Option::Some(1),
26825                Self::Running => std::option::Option::Some(2),
26826                Self::Complete => std::option::Option::Some(3),
26827                Self::Failed => std::option::Option::Some(4),
26828                Self::Cached => std::option::Option::Some(5),
26829                Self::Cancelled => std::option::Option::Some(6),
26830                Self::UnknownValue(u) => u.0.value(),
26831            }
26832        }
26833
26834        /// Gets the enum value as a string.
26835        ///
26836        /// Returns `None` if the enum contains an unknown value deserialized from
26837        /// the integer representation of enums.
26838        pub fn name(&self) -> std::option::Option<&str> {
26839            match self {
26840                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
26841                Self::New => std::option::Option::Some("NEW"),
26842                Self::Running => std::option::Option::Some("RUNNING"),
26843                Self::Complete => std::option::Option::Some("COMPLETE"),
26844                Self::Failed => std::option::Option::Some("FAILED"),
26845                Self::Cached => std::option::Option::Some("CACHED"),
26846                Self::Cancelled => std::option::Option::Some("CANCELLED"),
26847                Self::UnknownValue(u) => u.0.name(),
26848            }
26849        }
26850    }
26851
26852    #[cfg(any(
26853        feature = "metadata-service",
26854        feature = "pipeline-service",
26855        feature = "schedule-service",
26856    ))]
26857    impl std::default::Default for State {
26858        fn default() -> Self {
26859            use std::convert::From;
26860            Self::from(0)
26861        }
26862    }
26863
26864    #[cfg(any(
26865        feature = "metadata-service",
26866        feature = "pipeline-service",
26867        feature = "schedule-service",
26868    ))]
26869    impl std::fmt::Display for State {
26870        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26871            wkt::internal::display_enum(f, self.name(), self.value())
26872        }
26873    }
26874
26875    #[cfg(any(
26876        feature = "metadata-service",
26877        feature = "pipeline-service",
26878        feature = "schedule-service",
26879    ))]
26880    impl std::convert::From<i32> for State {
26881        fn from(value: i32) -> Self {
26882            match value {
26883                0 => Self::Unspecified,
26884                1 => Self::New,
26885                2 => Self::Running,
26886                3 => Self::Complete,
26887                4 => Self::Failed,
26888                5 => Self::Cached,
26889                6 => Self::Cancelled,
26890                _ => Self::UnknownValue(state::UnknownValue(
26891                    wkt::internal::UnknownEnumValue::Integer(value),
26892                )),
26893            }
26894        }
26895    }
26896
26897    #[cfg(any(
26898        feature = "metadata-service",
26899        feature = "pipeline-service",
26900        feature = "schedule-service",
26901    ))]
26902    impl std::convert::From<&str> for State {
26903        fn from(value: &str) -> Self {
26904            use std::string::ToString;
26905            match value {
26906                "STATE_UNSPECIFIED" => Self::Unspecified,
26907                "NEW" => Self::New,
26908                "RUNNING" => Self::Running,
26909                "COMPLETE" => Self::Complete,
26910                "FAILED" => Self::Failed,
26911                "CACHED" => Self::Cached,
26912                "CANCELLED" => Self::Cancelled,
26913                _ => Self::UnknownValue(state::UnknownValue(
26914                    wkt::internal::UnknownEnumValue::String(value.to_string()),
26915                )),
26916            }
26917        }
26918    }
26919
26920    #[cfg(any(
26921        feature = "metadata-service",
26922        feature = "pipeline-service",
26923        feature = "schedule-service",
26924    ))]
26925    impl serde::ser::Serialize for State {
26926        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26927        where
26928            S: serde::Serializer,
26929        {
26930            match self {
26931                Self::Unspecified => serializer.serialize_i32(0),
26932                Self::New => serializer.serialize_i32(1),
26933                Self::Running => serializer.serialize_i32(2),
26934                Self::Complete => serializer.serialize_i32(3),
26935                Self::Failed => serializer.serialize_i32(4),
26936                Self::Cached => serializer.serialize_i32(5),
26937                Self::Cancelled => serializer.serialize_i32(6),
26938                Self::UnknownValue(u) => u.0.serialize(serializer),
26939            }
26940        }
26941    }
26942
26943    #[cfg(any(
26944        feature = "metadata-service",
26945        feature = "pipeline-service",
26946        feature = "schedule-service",
26947    ))]
26948    impl<'de> serde::de::Deserialize<'de> for State {
26949        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26950        where
26951            D: serde::Deserializer<'de>,
26952        {
26953            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
26954                ".google.cloud.aiplatform.v1.Execution.State",
26955            ))
26956        }
26957    }
26958}
26959
26960/// Explanation of a prediction (provided in
26961/// [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions])
26962/// produced by the Model on a given
26963/// [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
26964///
26965/// [google.cloud.aiplatform.v1.ExplainRequest.instances]: crate::model::ExplainRequest::instances
26966/// [google.cloud.aiplatform.v1.PredictResponse.predictions]: crate::model::PredictResponse::predictions
26967#[cfg(any(feature = "model-service", feature = "prediction-service",))]
26968#[derive(Clone, Default, PartialEq)]
26969#[non_exhaustive]
26970pub struct Explanation {
26971    /// Output only. Feature attributions grouped by predicted outputs.
26972    ///
26973    /// For Models that predict only one output, such as regression Models that
26974    /// predict only one score, there is only one attibution that explains the
26975    /// predicted output. For Models that predict multiple outputs, such as
26976    /// multiclass Models that predict multiple classes, each element explains one
26977    /// specific item.
26978    /// [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
26979    /// can be used to identify which output this attribution is explaining.
26980    ///
26981    /// By default, we provide Shapley values for the predicted class. However,
26982    /// you can configure the explanation request to generate Shapley values for
26983    /// any other classes too. For example, if a model predicts a probability of
26984    /// `0.4` for approving a loan application, the model's decision is to reject
26985    /// the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
26986    /// Shapley values would be computed for rejection decision and not approval,
26987    /// even though the latter might be the positive class.
26988    ///
26989    /// If users set
26990    /// [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k],
26991    /// the attributions are sorted by
26992    /// [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value]
26993    /// in descending order. If
26994    /// [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices]
26995    /// is specified, the attributions are stored by
26996    /// [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
26997    /// in the same order as they appear in the output_indices.
26998    ///
26999    /// [google.cloud.aiplatform.v1.Attribution.instance_output_value]: crate::model::Attribution::instance_output_value
27000    /// [google.cloud.aiplatform.v1.Attribution.output_index]: crate::model::Attribution::output_index
27001    /// [google.cloud.aiplatform.v1.ExplanationParameters.output_indices]: crate::model::ExplanationParameters::output_indices
27002    /// [google.cloud.aiplatform.v1.ExplanationParameters.top_k]: crate::model::ExplanationParameters::top_k
27003    pub attributions: std::vec::Vec<crate::model::Attribution>,
27004
27005    /// Output only. List of the nearest neighbors for example-based explanations.
27006    ///
27007    /// For models deployed with the examples explanations feature enabled, the
27008    /// attributions field is empty and instead the neighbors field is populated.
27009    pub neighbors: std::vec::Vec<crate::model::Neighbor>,
27010
27011    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27012}
27013
27014#[cfg(any(feature = "model-service", feature = "prediction-service",))]
27015impl Explanation {
27016    pub fn new() -> Self {
27017        std::default::Default::default()
27018    }
27019
27020    /// Sets the value of [attributions][crate::model::Explanation::attributions].
27021    pub fn set_attributions<T, V>(mut self, v: T) -> Self
27022    where
27023        T: std::iter::IntoIterator<Item = V>,
27024        V: std::convert::Into<crate::model::Attribution>,
27025    {
27026        use std::iter::Iterator;
27027        self.attributions = v.into_iter().map(|i| i.into()).collect();
27028        self
27029    }
27030
27031    /// Sets the value of [neighbors][crate::model::Explanation::neighbors].
27032    pub fn set_neighbors<T, V>(mut self, v: T) -> Self
27033    where
27034        T: std::iter::IntoIterator<Item = V>,
27035        V: std::convert::Into<crate::model::Neighbor>,
27036    {
27037        use std::iter::Iterator;
27038        self.neighbors = v.into_iter().map(|i| i.into()).collect();
27039        self
27040    }
27041}
27042
27043#[cfg(any(feature = "model-service", feature = "prediction-service",))]
27044impl wkt::message::Message for Explanation {
27045    fn typename() -> &'static str {
27046        "type.googleapis.com/google.cloud.aiplatform.v1.Explanation"
27047    }
27048}
27049
27050/// Aggregated explanation metrics for a Model over a set of instances.
27051#[cfg(feature = "model-service")]
27052#[derive(Clone, Default, PartialEq)]
27053#[non_exhaustive]
27054pub struct ModelExplanation {
27055    /// Output only. Aggregated attributions explaining the Model's prediction
27056    /// outputs over the set of instances. The attributions are grouped by outputs.
27057    ///
27058    /// For Models that predict only one output, such as regression Models that
27059    /// predict only one score, there is only one attibution that explains the
27060    /// predicted output. For Models that predict multiple outputs, such as
27061    /// multiclass Models that predict multiple classes, each element explains one
27062    /// specific item.
27063    /// [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
27064    /// can be used to identify which output this attribution is explaining.
27065    ///
27066    /// The
27067    /// [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value],
27068    /// [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value]
27069    /// and
27070    /// [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
27071    /// fields are averaged over the test data.
27072    ///
27073    /// NOTE: Currently AutoML tabular classification Models produce only one
27074    /// attribution, which averages attributions over all the classes it predicts.
27075    /// [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error]
27076    /// is not populated.
27077    ///
27078    /// [google.cloud.aiplatform.v1.Attribution.approximation_error]: crate::model::Attribution::approximation_error
27079    /// [google.cloud.aiplatform.v1.Attribution.baseline_output_value]: crate::model::Attribution::baseline_output_value
27080    /// [google.cloud.aiplatform.v1.Attribution.feature_attributions]: crate::model::Attribution::feature_attributions
27081    /// [google.cloud.aiplatform.v1.Attribution.instance_output_value]: crate::model::Attribution::instance_output_value
27082    /// [google.cloud.aiplatform.v1.Attribution.output_index]: crate::model::Attribution::output_index
27083    pub mean_attributions: std::vec::Vec<crate::model::Attribution>,
27084
27085    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27086}
27087
27088#[cfg(feature = "model-service")]
27089impl ModelExplanation {
27090    pub fn new() -> Self {
27091        std::default::Default::default()
27092    }
27093
27094    /// Sets the value of [mean_attributions][crate::model::ModelExplanation::mean_attributions].
27095    pub fn set_mean_attributions<T, V>(mut self, v: T) -> Self
27096    where
27097        T: std::iter::IntoIterator<Item = V>,
27098        V: std::convert::Into<crate::model::Attribution>,
27099    {
27100        use std::iter::Iterator;
27101        self.mean_attributions = v.into_iter().map(|i| i.into()).collect();
27102        self
27103    }
27104}
27105
27106#[cfg(feature = "model-service")]
27107impl wkt::message::Message for ModelExplanation {
27108    fn typename() -> &'static str {
27109        "type.googleapis.com/google.cloud.aiplatform.v1.ModelExplanation"
27110    }
27111}
27112
27113/// Attribution that explains a particular prediction output.
27114#[cfg(any(feature = "model-service", feature = "prediction-service",))]
27115#[derive(Clone, Default, PartialEq)]
27116#[non_exhaustive]
27117pub struct Attribution {
27118    /// Output only. Model predicted output if the input instance is constructed
27119    /// from the baselines of all the features defined in
27120    /// [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
27121    /// The field name of the output is determined by the key in
27122    /// [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
27123    ///
27124    /// If the Model's predicted output has multiple dimensions (rank > 1), this is
27125    /// the value in the output located by
27126    /// [output_index][google.cloud.aiplatform.v1.Attribution.output_index].
27127    ///
27128    /// If there are multiple baselines, their output values are averaged.
27129    ///
27130    /// [google.cloud.aiplatform.v1.Attribution.output_index]: crate::model::Attribution::output_index
27131    /// [google.cloud.aiplatform.v1.ExplanationMetadata.inputs]: crate::model::ExplanationMetadata::inputs
27132    /// [google.cloud.aiplatform.v1.ExplanationMetadata.outputs]: crate::model::ExplanationMetadata::outputs
27133    pub baseline_output_value: f64,
27134
27135    /// Output only. Model predicted output on the corresponding [explanation
27136    /// instance][ExplainRequest.instances]. The field name of the output is
27137    /// determined by the key in
27138    /// [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
27139    ///
27140    /// If the Model predicted output has multiple dimensions, this is the value in
27141    /// the output located by
27142    /// [output_index][google.cloud.aiplatform.v1.Attribution.output_index].
27143    ///
27144    /// [ExplainRequest.instances]: crate::model::ExplainRequest::instances
27145    /// [google.cloud.aiplatform.v1.Attribution.output_index]: crate::model::Attribution::output_index
27146    /// [google.cloud.aiplatform.v1.ExplanationMetadata.outputs]: crate::model::ExplanationMetadata::outputs
27147    pub instance_output_value: f64,
27148
27149    /// Output only. Attributions of each explained feature. Features are extracted
27150    /// from the [prediction
27151    /// instances][google.cloud.aiplatform.v1.ExplainRequest.instances] according
27152    /// to [explanation metadata for
27153    /// inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
27154    ///
27155    /// The value is a struct, whose keys are the name of the feature. The values
27156    /// are how much the feature in the
27157    /// [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] contributed
27158    /// to the predicted result.
27159    ///
27160    /// The format of the value is determined by the feature's input format:
27161    ///
27162    /// * If the feature is a scalar value, the attribution value is a
27163    ///   [floating number][google.protobuf.Value.number_value].
27164    ///
27165    /// * If the feature is an array of scalar values, the attribution value is
27166    ///   an [array][google.protobuf.Value.list_value].
27167    ///
27168    /// * If the feature is a struct, the attribution value is a
27169    ///   [struct][google.protobuf.Value.struct_value]. The keys in the
27170    ///   attribution value struct are the same as the keys in the feature
27171    ///   struct. The formats of the values in the attribution struct are
27172    ///   determined by the formats of the values in the feature struct.
27173    ///
27174    ///
27175    /// The
27176    /// [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]
27177    /// field, pointed to by the
27178    /// [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] field of the
27179    /// [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
27180    /// object, points to the schema file that describes the features and their
27181    /// attribution values (if it is populated).
27182    ///
27183    /// [google.cloud.aiplatform.v1.Endpoint.deployed_models]: crate::model::Endpoint::deployed_models
27184    /// [google.cloud.aiplatform.v1.ExplainRequest.instances]: crate::model::ExplainRequest::instances
27185    /// [google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri]: crate::model::ExplanationMetadata::feature_attributions_schema_uri
27186    /// [google.cloud.aiplatform.v1.ExplanationMetadata.inputs]: crate::model::ExplanationMetadata::inputs
27187    /// [google.cloud.aiplatform.v1.ExplanationSpec]: crate::model::ExplanationSpec
27188    /// [google.protobuf.Value.list_value]: wkt::Value::kind
27189    /// [google.protobuf.Value.number_value]: wkt::Value::kind
27190    /// [google.protobuf.Value.struct_value]: wkt::Value::kind
27191    pub feature_attributions: std::option::Option<wkt::Value>,
27192
27193    /// Output only. The index that locates the explained prediction output.
27194    ///
27195    /// If the prediction output is a scalar value, output_index is not populated.
27196    /// If the prediction output has multiple dimensions, the length of the
27197    /// output_index list is the same as the number of dimensions of the output.
27198    /// The i-th element in output_index is the element index of the i-th dimension
27199    /// of the output vector. Indices start from 0.
27200    pub output_index: std::vec::Vec<i32>,
27201
27202    /// Output only. The display name of the output identified by
27203    /// [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. For
27204    /// example, the predicted class name by a multi-classification Model.
27205    ///
27206    /// This field is only populated iff the Model predicts display names as a
27207    /// separate field along with the explained output. The predicted display name
27208    /// must has the same shape of the explained output, and can be located using
27209    /// output_index.
27210    ///
27211    /// [google.cloud.aiplatform.v1.Attribution.output_index]: crate::model::Attribution::output_index
27212    pub output_display_name: std::string::String,
27213
27214    /// Output only. Error of
27215    /// [feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
27216    /// caused by approximation used in the explanation method. Lower value means
27217    /// more precise attributions.
27218    ///
27219    /// * For Sampled Shapley
27220    ///   [attribution][google.cloud.aiplatform.v1.ExplanationParameters.sampled_shapley_attribution],
27221    ///   increasing
27222    ///   [path_count][google.cloud.aiplatform.v1.SampledShapleyAttribution.path_count]
27223    ///   might reduce the error.
27224    /// * For Integrated Gradients
27225    ///   [attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
27226    ///   increasing
27227    ///   [step_count][google.cloud.aiplatform.v1.IntegratedGradientsAttribution.step_count]
27228    ///   might reduce the error.
27229    /// * For [XRAI
27230    ///   attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
27231    ///   increasing
27232    ///   [step_count][google.cloud.aiplatform.v1.XraiAttribution.step_count] might
27233    ///   reduce the error.
27234    ///
27235    /// See [this introduction](/vertex-ai/docs/explainable-ai/overview)
27236    /// for more information.
27237    ///
27238    /// [google.cloud.aiplatform.v1.Attribution.feature_attributions]: crate::model::Attribution::feature_attributions
27239    /// [google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]: crate::model::ExplanationParameters::method
27240    /// [google.cloud.aiplatform.v1.ExplanationParameters.sampled_shapley_attribution]: crate::model::ExplanationParameters::method
27241    /// [google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution]: crate::model::ExplanationParameters::method
27242    /// [google.cloud.aiplatform.v1.IntegratedGradientsAttribution.step_count]: crate::model::IntegratedGradientsAttribution::step_count
27243    /// [google.cloud.aiplatform.v1.SampledShapleyAttribution.path_count]: crate::model::SampledShapleyAttribution::path_count
27244    /// [google.cloud.aiplatform.v1.XraiAttribution.step_count]: crate::model::XraiAttribution::step_count
27245    pub approximation_error: f64,
27246
27247    /// Output only. Name of the explain output. Specified as the key in
27248    /// [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs].
27249    ///
27250    /// [google.cloud.aiplatform.v1.ExplanationMetadata.outputs]: crate::model::ExplanationMetadata::outputs
27251    pub output_name: std::string::String,
27252
27253    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27254}
27255
27256#[cfg(any(feature = "model-service", feature = "prediction-service",))]
27257impl Attribution {
27258    pub fn new() -> Self {
27259        std::default::Default::default()
27260    }
27261
27262    /// Sets the value of [baseline_output_value][crate::model::Attribution::baseline_output_value].
27263    pub fn set_baseline_output_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
27264        self.baseline_output_value = v.into();
27265        self
27266    }
27267
27268    /// Sets the value of [instance_output_value][crate::model::Attribution::instance_output_value].
27269    pub fn set_instance_output_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
27270        self.instance_output_value = v.into();
27271        self
27272    }
27273
27274    /// Sets the value of [feature_attributions][crate::model::Attribution::feature_attributions].
27275    pub fn set_feature_attributions<T>(mut self, v: T) -> Self
27276    where
27277        T: std::convert::Into<wkt::Value>,
27278    {
27279        self.feature_attributions = std::option::Option::Some(v.into());
27280        self
27281    }
27282
27283    /// Sets or clears the value of [feature_attributions][crate::model::Attribution::feature_attributions].
27284    pub fn set_or_clear_feature_attributions<T>(mut self, v: std::option::Option<T>) -> Self
27285    where
27286        T: std::convert::Into<wkt::Value>,
27287    {
27288        self.feature_attributions = v.map(|x| x.into());
27289        self
27290    }
27291
27292    /// Sets the value of [output_index][crate::model::Attribution::output_index].
27293    pub fn set_output_index<T, V>(mut self, v: T) -> Self
27294    where
27295        T: std::iter::IntoIterator<Item = V>,
27296        V: std::convert::Into<i32>,
27297    {
27298        use std::iter::Iterator;
27299        self.output_index = v.into_iter().map(|i| i.into()).collect();
27300        self
27301    }
27302
27303    /// Sets the value of [output_display_name][crate::model::Attribution::output_display_name].
27304    pub fn set_output_display_name<T: std::convert::Into<std::string::String>>(
27305        mut self,
27306        v: T,
27307    ) -> Self {
27308        self.output_display_name = v.into();
27309        self
27310    }
27311
27312    /// Sets the value of [approximation_error][crate::model::Attribution::approximation_error].
27313    pub fn set_approximation_error<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
27314        self.approximation_error = v.into();
27315        self
27316    }
27317
27318    /// Sets the value of [output_name][crate::model::Attribution::output_name].
27319    pub fn set_output_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27320        self.output_name = v.into();
27321        self
27322    }
27323}
27324
27325#[cfg(any(feature = "model-service", feature = "prediction-service",))]
27326impl wkt::message::Message for Attribution {
27327    fn typename() -> &'static str {
27328        "type.googleapis.com/google.cloud.aiplatform.v1.Attribution"
27329    }
27330}
27331
27332/// Neighbors for example-based explanations.
27333#[cfg(any(feature = "model-service", feature = "prediction-service",))]
27334#[derive(Clone, Default, PartialEq)]
27335#[non_exhaustive]
27336pub struct Neighbor {
27337    /// Output only. The neighbor id.
27338    pub neighbor_id: std::string::String,
27339
27340    /// Output only. The neighbor distance.
27341    pub neighbor_distance: f64,
27342
27343    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27344}
27345
27346#[cfg(any(feature = "model-service", feature = "prediction-service",))]
27347impl Neighbor {
27348    pub fn new() -> Self {
27349        std::default::Default::default()
27350    }
27351
27352    /// Sets the value of [neighbor_id][crate::model::Neighbor::neighbor_id].
27353    pub fn set_neighbor_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27354        self.neighbor_id = v.into();
27355        self
27356    }
27357
27358    /// Sets the value of [neighbor_distance][crate::model::Neighbor::neighbor_distance].
27359    pub fn set_neighbor_distance<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
27360        self.neighbor_distance = v.into();
27361        self
27362    }
27363}
27364
27365#[cfg(any(feature = "model-service", feature = "prediction-service",))]
27366impl wkt::message::Message for Neighbor {
27367    fn typename() -> &'static str {
27368        "type.googleapis.com/google.cloud.aiplatform.v1.Neighbor"
27369    }
27370}
27371
27372/// Specification of Model explanation.
27373#[cfg(any(
27374    feature = "dataset-service",
27375    feature = "deployment-resource-pool-service",
27376    feature = "endpoint-service",
27377    feature = "job-service",
27378    feature = "model-service",
27379    feature = "pipeline-service",
27380))]
27381#[derive(Clone, Default, PartialEq)]
27382#[non_exhaustive]
27383pub struct ExplanationSpec {
27384    /// Required. Parameters that configure explaining of the Model's predictions.
27385    pub parameters: std::option::Option<crate::model::ExplanationParameters>,
27386
27387    /// Optional. Metadata describing the Model's input and output for explanation.
27388    pub metadata: std::option::Option<crate::model::ExplanationMetadata>,
27389
27390    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27391}
27392
27393#[cfg(any(
27394    feature = "dataset-service",
27395    feature = "deployment-resource-pool-service",
27396    feature = "endpoint-service",
27397    feature = "job-service",
27398    feature = "model-service",
27399    feature = "pipeline-service",
27400))]
27401impl ExplanationSpec {
27402    pub fn new() -> Self {
27403        std::default::Default::default()
27404    }
27405
27406    /// Sets the value of [parameters][crate::model::ExplanationSpec::parameters].
27407    pub fn set_parameters<T>(mut self, v: T) -> Self
27408    where
27409        T: std::convert::Into<crate::model::ExplanationParameters>,
27410    {
27411        self.parameters = std::option::Option::Some(v.into());
27412        self
27413    }
27414
27415    /// Sets or clears the value of [parameters][crate::model::ExplanationSpec::parameters].
27416    pub fn set_or_clear_parameters<T>(mut self, v: std::option::Option<T>) -> Self
27417    where
27418        T: std::convert::Into<crate::model::ExplanationParameters>,
27419    {
27420        self.parameters = v.map(|x| x.into());
27421        self
27422    }
27423
27424    /// Sets the value of [metadata][crate::model::ExplanationSpec::metadata].
27425    pub fn set_metadata<T>(mut self, v: T) -> Self
27426    where
27427        T: std::convert::Into<crate::model::ExplanationMetadata>,
27428    {
27429        self.metadata = std::option::Option::Some(v.into());
27430        self
27431    }
27432
27433    /// Sets or clears the value of [metadata][crate::model::ExplanationSpec::metadata].
27434    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
27435    where
27436        T: std::convert::Into<crate::model::ExplanationMetadata>,
27437    {
27438        self.metadata = v.map(|x| x.into());
27439        self
27440    }
27441}
27442
27443#[cfg(any(
27444    feature = "dataset-service",
27445    feature = "deployment-resource-pool-service",
27446    feature = "endpoint-service",
27447    feature = "job-service",
27448    feature = "model-service",
27449    feature = "pipeline-service",
27450))]
27451impl wkt::message::Message for ExplanationSpec {
27452    fn typename() -> &'static str {
27453        "type.googleapis.com/google.cloud.aiplatform.v1.ExplanationSpec"
27454    }
27455}
27456
27457/// Parameters to configure explaining for Model's predictions.
27458#[cfg(any(
27459    feature = "dataset-service",
27460    feature = "deployment-resource-pool-service",
27461    feature = "endpoint-service",
27462    feature = "job-service",
27463    feature = "model-service",
27464    feature = "pipeline-service",
27465    feature = "prediction-service",
27466))]
27467#[derive(Clone, Default, PartialEq)]
27468#[non_exhaustive]
27469pub struct ExplanationParameters {
27470    /// If populated, returns attributions for top K indices of outputs
27471    /// (defaults to 1). Only applies to Models that predicts more than one outputs
27472    /// (e,g, multi-class Models). When set to -1, returns explanations for all
27473    /// outputs.
27474    pub top_k: i32,
27475
27476    /// If populated, only returns attributions that have
27477    /// [output_index][google.cloud.aiplatform.v1.Attribution.output_index]
27478    /// contained in output_indices. It must be an ndarray of integers, with the
27479    /// same shape of the output it's explaining.
27480    ///
27481    /// If not populated, returns attributions for
27482    /// [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of
27483    /// outputs. If neither top_k nor output_indices is populated, returns the
27484    /// argmax index of the outputs.
27485    ///
27486    /// Only applicable to Models that predict multiple outputs (e,g, multi-class
27487    /// Models that predict multiple classes).
27488    ///
27489    /// [google.cloud.aiplatform.v1.Attribution.output_index]: crate::model::Attribution::output_index
27490    /// [google.cloud.aiplatform.v1.ExplanationParameters.top_k]: crate::model::ExplanationParameters::top_k
27491    pub output_indices: std::option::Option<wkt::ListValue>,
27492
27493    pub method: std::option::Option<crate::model::explanation_parameters::Method>,
27494
27495    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27496}
27497
27498#[cfg(any(
27499    feature = "dataset-service",
27500    feature = "deployment-resource-pool-service",
27501    feature = "endpoint-service",
27502    feature = "job-service",
27503    feature = "model-service",
27504    feature = "pipeline-service",
27505    feature = "prediction-service",
27506))]
27507impl ExplanationParameters {
27508    pub fn new() -> Self {
27509        std::default::Default::default()
27510    }
27511
27512    /// Sets the value of [top_k][crate::model::ExplanationParameters::top_k].
27513    pub fn set_top_k<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27514        self.top_k = v.into();
27515        self
27516    }
27517
27518    /// Sets the value of [output_indices][crate::model::ExplanationParameters::output_indices].
27519    pub fn set_output_indices<T>(mut self, v: T) -> Self
27520    where
27521        T: std::convert::Into<wkt::ListValue>,
27522    {
27523        self.output_indices = std::option::Option::Some(v.into());
27524        self
27525    }
27526
27527    /// Sets or clears the value of [output_indices][crate::model::ExplanationParameters::output_indices].
27528    pub fn set_or_clear_output_indices<T>(mut self, v: std::option::Option<T>) -> Self
27529    where
27530        T: std::convert::Into<wkt::ListValue>,
27531    {
27532        self.output_indices = v.map(|x| x.into());
27533        self
27534    }
27535
27536    /// Sets the value of [method][crate::model::ExplanationParameters::method].
27537    ///
27538    /// Note that all the setters affecting `method` are mutually
27539    /// exclusive.
27540    pub fn set_method<
27541        T: std::convert::Into<std::option::Option<crate::model::explanation_parameters::Method>>,
27542    >(
27543        mut self,
27544        v: T,
27545    ) -> Self {
27546        self.method = v.into();
27547        self
27548    }
27549
27550    /// The value of [method][crate::model::ExplanationParameters::method]
27551    /// if it holds a `SampledShapleyAttribution`, `None` if the field is not set or
27552    /// holds a different branch.
27553    pub fn sampled_shapley_attribution(
27554        &self,
27555    ) -> std::option::Option<&std::boxed::Box<crate::model::SampledShapleyAttribution>> {
27556        #[allow(unreachable_patterns)]
27557        self.method.as_ref().and_then(|v| match v {
27558            crate::model::explanation_parameters::Method::SampledShapleyAttribution(v) => {
27559                std::option::Option::Some(v)
27560            }
27561            _ => std::option::Option::None,
27562        })
27563    }
27564
27565    /// Sets the value of [method][crate::model::ExplanationParameters::method]
27566    /// to hold a `SampledShapleyAttribution`.
27567    ///
27568    /// Note that all the setters affecting `method` are
27569    /// mutually exclusive.
27570    pub fn set_sampled_shapley_attribution<
27571        T: std::convert::Into<std::boxed::Box<crate::model::SampledShapleyAttribution>>,
27572    >(
27573        mut self,
27574        v: T,
27575    ) -> Self {
27576        self.method = std::option::Option::Some(
27577            crate::model::explanation_parameters::Method::SampledShapleyAttribution(v.into()),
27578        );
27579        self
27580    }
27581
27582    /// The value of [method][crate::model::ExplanationParameters::method]
27583    /// if it holds a `IntegratedGradientsAttribution`, `None` if the field is not set or
27584    /// holds a different branch.
27585    pub fn integrated_gradients_attribution(
27586        &self,
27587    ) -> std::option::Option<&std::boxed::Box<crate::model::IntegratedGradientsAttribution>> {
27588        #[allow(unreachable_patterns)]
27589        self.method.as_ref().and_then(|v| match v {
27590            crate::model::explanation_parameters::Method::IntegratedGradientsAttribution(v) => {
27591                std::option::Option::Some(v)
27592            }
27593            _ => std::option::Option::None,
27594        })
27595    }
27596
27597    /// Sets the value of [method][crate::model::ExplanationParameters::method]
27598    /// to hold a `IntegratedGradientsAttribution`.
27599    ///
27600    /// Note that all the setters affecting `method` are
27601    /// mutually exclusive.
27602    pub fn set_integrated_gradients_attribution<
27603        T: std::convert::Into<std::boxed::Box<crate::model::IntegratedGradientsAttribution>>,
27604    >(
27605        mut self,
27606        v: T,
27607    ) -> Self {
27608        self.method = std::option::Option::Some(
27609            crate::model::explanation_parameters::Method::IntegratedGradientsAttribution(v.into()),
27610        );
27611        self
27612    }
27613
27614    /// The value of [method][crate::model::ExplanationParameters::method]
27615    /// if it holds a `XraiAttribution`, `None` if the field is not set or
27616    /// holds a different branch.
27617    pub fn xrai_attribution(
27618        &self,
27619    ) -> std::option::Option<&std::boxed::Box<crate::model::XraiAttribution>> {
27620        #[allow(unreachable_patterns)]
27621        self.method.as_ref().and_then(|v| match v {
27622            crate::model::explanation_parameters::Method::XraiAttribution(v) => {
27623                std::option::Option::Some(v)
27624            }
27625            _ => std::option::Option::None,
27626        })
27627    }
27628
27629    /// Sets the value of [method][crate::model::ExplanationParameters::method]
27630    /// to hold a `XraiAttribution`.
27631    ///
27632    /// Note that all the setters affecting `method` are
27633    /// mutually exclusive.
27634    pub fn set_xrai_attribution<
27635        T: std::convert::Into<std::boxed::Box<crate::model::XraiAttribution>>,
27636    >(
27637        mut self,
27638        v: T,
27639    ) -> Self {
27640        self.method = std::option::Option::Some(
27641            crate::model::explanation_parameters::Method::XraiAttribution(v.into()),
27642        );
27643        self
27644    }
27645
27646    /// The value of [method][crate::model::ExplanationParameters::method]
27647    /// if it holds a `Examples`, `None` if the field is not set or
27648    /// holds a different branch.
27649    pub fn examples(&self) -> std::option::Option<&std::boxed::Box<crate::model::Examples>> {
27650        #[allow(unreachable_patterns)]
27651        self.method.as_ref().and_then(|v| match v {
27652            crate::model::explanation_parameters::Method::Examples(v) => {
27653                std::option::Option::Some(v)
27654            }
27655            _ => std::option::Option::None,
27656        })
27657    }
27658
27659    /// Sets the value of [method][crate::model::ExplanationParameters::method]
27660    /// to hold a `Examples`.
27661    ///
27662    /// Note that all the setters affecting `method` are
27663    /// mutually exclusive.
27664    pub fn set_examples<T: std::convert::Into<std::boxed::Box<crate::model::Examples>>>(
27665        mut self,
27666        v: T,
27667    ) -> Self {
27668        self.method = std::option::Option::Some(
27669            crate::model::explanation_parameters::Method::Examples(v.into()),
27670        );
27671        self
27672    }
27673}
27674
27675#[cfg(any(
27676    feature = "dataset-service",
27677    feature = "deployment-resource-pool-service",
27678    feature = "endpoint-service",
27679    feature = "job-service",
27680    feature = "model-service",
27681    feature = "pipeline-service",
27682    feature = "prediction-service",
27683))]
27684impl wkt::message::Message for ExplanationParameters {
27685    fn typename() -> &'static str {
27686        "type.googleapis.com/google.cloud.aiplatform.v1.ExplanationParameters"
27687    }
27688}
27689
27690/// Defines additional types related to [ExplanationParameters].
27691#[cfg(any(
27692    feature = "dataset-service",
27693    feature = "deployment-resource-pool-service",
27694    feature = "endpoint-service",
27695    feature = "job-service",
27696    feature = "model-service",
27697    feature = "pipeline-service",
27698    feature = "prediction-service",
27699))]
27700pub mod explanation_parameters {
27701    #[allow(unused_imports)]
27702    use super::*;
27703
27704    #[cfg(any(
27705        feature = "dataset-service",
27706        feature = "deployment-resource-pool-service",
27707        feature = "endpoint-service",
27708        feature = "job-service",
27709        feature = "model-service",
27710        feature = "pipeline-service",
27711        feature = "prediction-service",
27712    ))]
27713    #[derive(Clone, Debug, PartialEq)]
27714    #[non_exhaustive]
27715    pub enum Method {
27716        /// An attribution method that approximates Shapley values for features that
27717        /// contribute to the label being predicted. A sampling strategy is used to
27718        /// approximate the value rather than considering all subsets of features.
27719        /// Refer to this paper for model details: <https://arxiv.org/abs/1306.4265>.
27720        SampledShapleyAttribution(std::boxed::Box<crate::model::SampledShapleyAttribution>),
27721        /// An attribution method that computes Aumann-Shapley values taking
27722        /// advantage of the model's fully differentiable structure. Refer to this
27723        /// paper for more details: <https://arxiv.org/abs/1703.01365>
27724        IntegratedGradientsAttribution(
27725            std::boxed::Box<crate::model::IntegratedGradientsAttribution>,
27726        ),
27727        /// An attribution method that redistributes Integrated Gradients
27728        /// attribution to segmented regions, taking advantage of the model's fully
27729        /// differentiable structure. Refer to this paper for
27730        /// more details: <https://arxiv.org/abs/1906.02825>
27731        ///
27732        /// XRAI currently performs better on natural images, like a picture of a
27733        /// house or an animal. If the images are taken in artificial environments,
27734        /// like a lab or manufacturing line, or from diagnostic equipment, like
27735        /// x-rays or quality-control cameras, use Integrated Gradients instead.
27736        XraiAttribution(std::boxed::Box<crate::model::XraiAttribution>),
27737        /// Example-based explanations that returns the nearest neighbors from the
27738        /// provided dataset.
27739        Examples(std::boxed::Box<crate::model::Examples>),
27740    }
27741}
27742
27743/// An attribution method that approximates Shapley values for features that
27744/// contribute to the label being predicted. A sampling strategy is used to
27745/// approximate the value rather than considering all subsets of features.
27746#[cfg(any(
27747    feature = "dataset-service",
27748    feature = "deployment-resource-pool-service",
27749    feature = "endpoint-service",
27750    feature = "job-service",
27751    feature = "model-service",
27752    feature = "pipeline-service",
27753    feature = "prediction-service",
27754))]
27755#[derive(Clone, Default, PartialEq)]
27756#[non_exhaustive]
27757pub struct SampledShapleyAttribution {
27758    /// Required. The number of feature permutations to consider when approximating
27759    /// the Shapley values.
27760    ///
27761    /// Valid range of its value is [1, 50], inclusively.
27762    pub path_count: i32,
27763
27764    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27765}
27766
27767#[cfg(any(
27768    feature = "dataset-service",
27769    feature = "deployment-resource-pool-service",
27770    feature = "endpoint-service",
27771    feature = "job-service",
27772    feature = "model-service",
27773    feature = "pipeline-service",
27774    feature = "prediction-service",
27775))]
27776impl SampledShapleyAttribution {
27777    pub fn new() -> Self {
27778        std::default::Default::default()
27779    }
27780
27781    /// Sets the value of [path_count][crate::model::SampledShapleyAttribution::path_count].
27782    pub fn set_path_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27783        self.path_count = v.into();
27784        self
27785    }
27786}
27787
27788#[cfg(any(
27789    feature = "dataset-service",
27790    feature = "deployment-resource-pool-service",
27791    feature = "endpoint-service",
27792    feature = "job-service",
27793    feature = "model-service",
27794    feature = "pipeline-service",
27795    feature = "prediction-service",
27796))]
27797impl wkt::message::Message for SampledShapleyAttribution {
27798    fn typename() -> &'static str {
27799        "type.googleapis.com/google.cloud.aiplatform.v1.SampledShapleyAttribution"
27800    }
27801}
27802
27803/// An attribution method that computes the Aumann-Shapley value taking advantage
27804/// of the model's fully differentiable structure. Refer to this paper for
27805/// more details: <https://arxiv.org/abs/1703.01365>
27806#[cfg(any(
27807    feature = "dataset-service",
27808    feature = "deployment-resource-pool-service",
27809    feature = "endpoint-service",
27810    feature = "job-service",
27811    feature = "model-service",
27812    feature = "pipeline-service",
27813    feature = "prediction-service",
27814))]
27815#[derive(Clone, Default, PartialEq)]
27816#[non_exhaustive]
27817pub struct IntegratedGradientsAttribution {
27818    /// Required. The number of steps for approximating the path integral.
27819    /// A good value to start is 50 and gradually increase until the
27820    /// sum to diff property is within the desired error range.
27821    ///
27822    /// Valid range of its value is [1, 100], inclusively.
27823    pub step_count: i32,
27824
27825    /// Config for SmoothGrad approximation of gradients.
27826    ///
27827    /// When enabled, the gradients are approximated by averaging the gradients
27828    /// from noisy samples in the vicinity of the inputs. Adding
27829    /// noise can help improve the computed gradients. Refer to this paper for more
27830    /// details: <https://arxiv.org/pdf/1706.03825.pdf>
27831    pub smooth_grad_config: std::option::Option<crate::model::SmoothGradConfig>,
27832
27833    /// Config for IG with blur baseline.
27834    ///
27835    /// When enabled, a linear path from the maximally blurred image to the input
27836    /// image is created. Using a blurred baseline instead of zero (black image) is
27837    /// motivated by the BlurIG approach explained here:
27838    /// <https://arxiv.org/abs/2004.03383>
27839    pub blur_baseline_config: std::option::Option<crate::model::BlurBaselineConfig>,
27840
27841    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27842}
27843
27844#[cfg(any(
27845    feature = "dataset-service",
27846    feature = "deployment-resource-pool-service",
27847    feature = "endpoint-service",
27848    feature = "job-service",
27849    feature = "model-service",
27850    feature = "pipeline-service",
27851    feature = "prediction-service",
27852))]
27853impl IntegratedGradientsAttribution {
27854    pub fn new() -> Self {
27855        std::default::Default::default()
27856    }
27857
27858    /// Sets the value of [step_count][crate::model::IntegratedGradientsAttribution::step_count].
27859    pub fn set_step_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27860        self.step_count = v.into();
27861        self
27862    }
27863
27864    /// Sets the value of [smooth_grad_config][crate::model::IntegratedGradientsAttribution::smooth_grad_config].
27865    pub fn set_smooth_grad_config<T>(mut self, v: T) -> Self
27866    where
27867        T: std::convert::Into<crate::model::SmoothGradConfig>,
27868    {
27869        self.smooth_grad_config = std::option::Option::Some(v.into());
27870        self
27871    }
27872
27873    /// Sets or clears the value of [smooth_grad_config][crate::model::IntegratedGradientsAttribution::smooth_grad_config].
27874    pub fn set_or_clear_smooth_grad_config<T>(mut self, v: std::option::Option<T>) -> Self
27875    where
27876        T: std::convert::Into<crate::model::SmoothGradConfig>,
27877    {
27878        self.smooth_grad_config = v.map(|x| x.into());
27879        self
27880    }
27881
27882    /// Sets the value of [blur_baseline_config][crate::model::IntegratedGradientsAttribution::blur_baseline_config].
27883    pub fn set_blur_baseline_config<T>(mut self, v: T) -> Self
27884    where
27885        T: std::convert::Into<crate::model::BlurBaselineConfig>,
27886    {
27887        self.blur_baseline_config = std::option::Option::Some(v.into());
27888        self
27889    }
27890
27891    /// Sets or clears the value of [blur_baseline_config][crate::model::IntegratedGradientsAttribution::blur_baseline_config].
27892    pub fn set_or_clear_blur_baseline_config<T>(mut self, v: std::option::Option<T>) -> Self
27893    where
27894        T: std::convert::Into<crate::model::BlurBaselineConfig>,
27895    {
27896        self.blur_baseline_config = v.map(|x| x.into());
27897        self
27898    }
27899}
27900
27901#[cfg(any(
27902    feature = "dataset-service",
27903    feature = "deployment-resource-pool-service",
27904    feature = "endpoint-service",
27905    feature = "job-service",
27906    feature = "model-service",
27907    feature = "pipeline-service",
27908    feature = "prediction-service",
27909))]
27910impl wkt::message::Message for IntegratedGradientsAttribution {
27911    fn typename() -> &'static str {
27912        "type.googleapis.com/google.cloud.aiplatform.v1.IntegratedGradientsAttribution"
27913    }
27914}
27915
27916/// An explanation method that redistributes Integrated Gradients
27917/// attributions to segmented regions, taking advantage of the model's fully
27918/// differentiable structure. Refer to this paper for more details:
27919/// <https://arxiv.org/abs/1906.02825>
27920///
27921/// Supported only by image Models.
27922#[cfg(any(
27923    feature = "dataset-service",
27924    feature = "deployment-resource-pool-service",
27925    feature = "endpoint-service",
27926    feature = "job-service",
27927    feature = "model-service",
27928    feature = "pipeline-service",
27929    feature = "prediction-service",
27930))]
27931#[derive(Clone, Default, PartialEq)]
27932#[non_exhaustive]
27933pub struct XraiAttribution {
27934    /// Required. The number of steps for approximating the path integral.
27935    /// A good value to start is 50 and gradually increase until the
27936    /// sum to diff property is met within the desired error range.
27937    ///
27938    /// Valid range of its value is [1, 100], inclusively.
27939    pub step_count: i32,
27940
27941    /// Config for SmoothGrad approximation of gradients.
27942    ///
27943    /// When enabled, the gradients are approximated by averaging the gradients
27944    /// from noisy samples in the vicinity of the inputs. Adding
27945    /// noise can help improve the computed gradients. Refer to this paper for more
27946    /// details: <https://arxiv.org/pdf/1706.03825.pdf>
27947    pub smooth_grad_config: std::option::Option<crate::model::SmoothGradConfig>,
27948
27949    /// Config for XRAI with blur baseline.
27950    ///
27951    /// When enabled, a linear path from the maximally blurred image to the input
27952    /// image is created. Using a blurred baseline instead of zero (black image) is
27953    /// motivated by the BlurIG approach explained here:
27954    /// <https://arxiv.org/abs/2004.03383>
27955    pub blur_baseline_config: std::option::Option<crate::model::BlurBaselineConfig>,
27956
27957    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27958}
27959
27960#[cfg(any(
27961    feature = "dataset-service",
27962    feature = "deployment-resource-pool-service",
27963    feature = "endpoint-service",
27964    feature = "job-service",
27965    feature = "model-service",
27966    feature = "pipeline-service",
27967    feature = "prediction-service",
27968))]
27969impl XraiAttribution {
27970    pub fn new() -> Self {
27971        std::default::Default::default()
27972    }
27973
27974    /// Sets the value of [step_count][crate::model::XraiAttribution::step_count].
27975    pub fn set_step_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27976        self.step_count = v.into();
27977        self
27978    }
27979
27980    /// Sets the value of [smooth_grad_config][crate::model::XraiAttribution::smooth_grad_config].
27981    pub fn set_smooth_grad_config<T>(mut self, v: T) -> Self
27982    where
27983        T: std::convert::Into<crate::model::SmoothGradConfig>,
27984    {
27985        self.smooth_grad_config = std::option::Option::Some(v.into());
27986        self
27987    }
27988
27989    /// Sets or clears the value of [smooth_grad_config][crate::model::XraiAttribution::smooth_grad_config].
27990    pub fn set_or_clear_smooth_grad_config<T>(mut self, v: std::option::Option<T>) -> Self
27991    where
27992        T: std::convert::Into<crate::model::SmoothGradConfig>,
27993    {
27994        self.smooth_grad_config = v.map(|x| x.into());
27995        self
27996    }
27997
27998    /// Sets the value of [blur_baseline_config][crate::model::XraiAttribution::blur_baseline_config].
27999    pub fn set_blur_baseline_config<T>(mut self, v: T) -> Self
28000    where
28001        T: std::convert::Into<crate::model::BlurBaselineConfig>,
28002    {
28003        self.blur_baseline_config = std::option::Option::Some(v.into());
28004        self
28005    }
28006
28007    /// Sets or clears the value of [blur_baseline_config][crate::model::XraiAttribution::blur_baseline_config].
28008    pub fn set_or_clear_blur_baseline_config<T>(mut self, v: std::option::Option<T>) -> Self
28009    where
28010        T: std::convert::Into<crate::model::BlurBaselineConfig>,
28011    {
28012        self.blur_baseline_config = v.map(|x| x.into());
28013        self
28014    }
28015}
28016
28017#[cfg(any(
28018    feature = "dataset-service",
28019    feature = "deployment-resource-pool-service",
28020    feature = "endpoint-service",
28021    feature = "job-service",
28022    feature = "model-service",
28023    feature = "pipeline-service",
28024    feature = "prediction-service",
28025))]
28026impl wkt::message::Message for XraiAttribution {
28027    fn typename() -> &'static str {
28028        "type.googleapis.com/google.cloud.aiplatform.v1.XraiAttribution"
28029    }
28030}
28031
28032/// Config for SmoothGrad approximation of gradients.
28033///
28034/// When enabled, the gradients are approximated by averaging the gradients from
28035/// noisy samples in the vicinity of the inputs. Adding noise can help improve
28036/// the computed gradients. Refer to this paper for more details:
28037/// <https://arxiv.org/pdf/1706.03825.pdf>
28038#[cfg(any(
28039    feature = "dataset-service",
28040    feature = "deployment-resource-pool-service",
28041    feature = "endpoint-service",
28042    feature = "job-service",
28043    feature = "model-service",
28044    feature = "pipeline-service",
28045    feature = "prediction-service",
28046))]
28047#[derive(Clone, Default, PartialEq)]
28048#[non_exhaustive]
28049pub struct SmoothGradConfig {
28050    /// The number of gradient samples to use for
28051    /// approximation. The higher this number, the more accurate the gradient
28052    /// is, but the runtime complexity increases by this factor as well.
28053    /// Valid range of its value is [1, 50]. Defaults to 3.
28054    pub noisy_sample_count: i32,
28055
28056    /// Represents the standard deviation of the gaussian kernel
28057    /// that will be used to add noise to the interpolated inputs
28058    /// prior to computing gradients.
28059    pub gradient_noise_sigma:
28060        std::option::Option<crate::model::smooth_grad_config::GradientNoiseSigma>,
28061
28062    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28063}
28064
28065#[cfg(any(
28066    feature = "dataset-service",
28067    feature = "deployment-resource-pool-service",
28068    feature = "endpoint-service",
28069    feature = "job-service",
28070    feature = "model-service",
28071    feature = "pipeline-service",
28072    feature = "prediction-service",
28073))]
28074impl SmoothGradConfig {
28075    pub fn new() -> Self {
28076        std::default::Default::default()
28077    }
28078
28079    /// Sets the value of [noisy_sample_count][crate::model::SmoothGradConfig::noisy_sample_count].
28080    pub fn set_noisy_sample_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
28081        self.noisy_sample_count = v.into();
28082        self
28083    }
28084
28085    /// Sets the value of [gradient_noise_sigma][crate::model::SmoothGradConfig::gradient_noise_sigma].
28086    ///
28087    /// Note that all the setters affecting `gradient_noise_sigma` are mutually
28088    /// exclusive.
28089    pub fn set_gradient_noise_sigma<
28090        T: std::convert::Into<
28091                std::option::Option<crate::model::smooth_grad_config::GradientNoiseSigma>,
28092            >,
28093    >(
28094        mut self,
28095        v: T,
28096    ) -> Self {
28097        self.gradient_noise_sigma = v.into();
28098        self
28099    }
28100
28101    /// The value of [gradient_noise_sigma][crate::model::SmoothGradConfig::gradient_noise_sigma]
28102    /// if it holds a `NoiseSigma`, `None` if the field is not set or
28103    /// holds a different branch.
28104    pub fn noise_sigma(&self) -> std::option::Option<&f32> {
28105        #[allow(unreachable_patterns)]
28106        self.gradient_noise_sigma.as_ref().and_then(|v| match v {
28107            crate::model::smooth_grad_config::GradientNoiseSigma::NoiseSigma(v) => {
28108                std::option::Option::Some(v)
28109            }
28110            _ => std::option::Option::None,
28111        })
28112    }
28113
28114    /// Sets the value of [gradient_noise_sigma][crate::model::SmoothGradConfig::gradient_noise_sigma]
28115    /// to hold a `NoiseSigma`.
28116    ///
28117    /// Note that all the setters affecting `gradient_noise_sigma` are
28118    /// mutually exclusive.
28119    pub fn set_noise_sigma<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
28120        self.gradient_noise_sigma = std::option::Option::Some(
28121            crate::model::smooth_grad_config::GradientNoiseSigma::NoiseSigma(v.into()),
28122        );
28123        self
28124    }
28125
28126    /// The value of [gradient_noise_sigma][crate::model::SmoothGradConfig::gradient_noise_sigma]
28127    /// if it holds a `FeatureNoiseSigma`, `None` if the field is not set or
28128    /// holds a different branch.
28129    pub fn feature_noise_sigma(
28130        &self,
28131    ) -> std::option::Option<&std::boxed::Box<crate::model::FeatureNoiseSigma>> {
28132        #[allow(unreachable_patterns)]
28133        self.gradient_noise_sigma.as_ref().and_then(|v| match v {
28134            crate::model::smooth_grad_config::GradientNoiseSigma::FeatureNoiseSigma(v) => {
28135                std::option::Option::Some(v)
28136            }
28137            _ => std::option::Option::None,
28138        })
28139    }
28140
28141    /// Sets the value of [gradient_noise_sigma][crate::model::SmoothGradConfig::gradient_noise_sigma]
28142    /// to hold a `FeatureNoiseSigma`.
28143    ///
28144    /// Note that all the setters affecting `gradient_noise_sigma` are
28145    /// mutually exclusive.
28146    pub fn set_feature_noise_sigma<
28147        T: std::convert::Into<std::boxed::Box<crate::model::FeatureNoiseSigma>>,
28148    >(
28149        mut self,
28150        v: T,
28151    ) -> Self {
28152        self.gradient_noise_sigma = std::option::Option::Some(
28153            crate::model::smooth_grad_config::GradientNoiseSigma::FeatureNoiseSigma(v.into()),
28154        );
28155        self
28156    }
28157}
28158
28159#[cfg(any(
28160    feature = "dataset-service",
28161    feature = "deployment-resource-pool-service",
28162    feature = "endpoint-service",
28163    feature = "job-service",
28164    feature = "model-service",
28165    feature = "pipeline-service",
28166    feature = "prediction-service",
28167))]
28168impl wkt::message::Message for SmoothGradConfig {
28169    fn typename() -> &'static str {
28170        "type.googleapis.com/google.cloud.aiplatform.v1.SmoothGradConfig"
28171    }
28172}
28173
28174/// Defines additional types related to [SmoothGradConfig].
28175#[cfg(any(
28176    feature = "dataset-service",
28177    feature = "deployment-resource-pool-service",
28178    feature = "endpoint-service",
28179    feature = "job-service",
28180    feature = "model-service",
28181    feature = "pipeline-service",
28182    feature = "prediction-service",
28183))]
28184pub mod smooth_grad_config {
28185    #[allow(unused_imports)]
28186    use super::*;
28187
28188    /// Represents the standard deviation of the gaussian kernel
28189    /// that will be used to add noise to the interpolated inputs
28190    /// prior to computing gradients.
28191    #[cfg(any(
28192        feature = "dataset-service",
28193        feature = "deployment-resource-pool-service",
28194        feature = "endpoint-service",
28195        feature = "job-service",
28196        feature = "model-service",
28197        feature = "pipeline-service",
28198        feature = "prediction-service",
28199    ))]
28200    #[derive(Clone, Debug, PartialEq)]
28201    #[non_exhaustive]
28202    pub enum GradientNoiseSigma {
28203        /// This is a single float value and will be used to add noise to all the
28204        /// features. Use this field when all features are normalized to have the
28205        /// same distribution: scale to range [0, 1], [-1, 1] or z-scoring, where
28206        /// features are normalized to have 0-mean and 1-variance. Learn more about
28207        /// [normalization](https://developers.google.com/machine-learning/data-prep/transform/normalization).
28208        ///
28209        /// For best results the recommended value is about 10% - 20% of the standard
28210        /// deviation of the input feature. Refer to section 3.2 of the SmoothGrad
28211        /// paper: <https://arxiv.org/pdf/1706.03825.pdf>. Defaults to 0.1.
28212        ///
28213        /// If the distribution is different per feature, set
28214        /// [feature_noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.feature_noise_sigma]
28215        /// instead for each feature.
28216        ///
28217        /// [google.cloud.aiplatform.v1.SmoothGradConfig.feature_noise_sigma]: crate::model::SmoothGradConfig::gradient_noise_sigma
28218        NoiseSigma(f32),
28219        /// This is similar to
28220        /// [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma],
28221        /// but provides additional flexibility. A separate noise sigma can be
28222        /// provided for each feature, which is useful if their distributions are
28223        /// different. No noise is added to features that are not set. If this field
28224        /// is unset,
28225        /// [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
28226        /// will be used for all features.
28227        ///
28228        /// [google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]: crate::model::SmoothGradConfig::gradient_noise_sigma
28229        FeatureNoiseSigma(std::boxed::Box<crate::model::FeatureNoiseSigma>),
28230    }
28231}
28232
28233/// Noise sigma by features. Noise sigma represents the standard deviation of the
28234/// gaussian kernel that will be used to add noise to interpolated inputs prior
28235/// to computing gradients.
28236#[cfg(any(
28237    feature = "dataset-service",
28238    feature = "deployment-resource-pool-service",
28239    feature = "endpoint-service",
28240    feature = "job-service",
28241    feature = "model-service",
28242    feature = "pipeline-service",
28243    feature = "prediction-service",
28244))]
28245#[derive(Clone, Default, PartialEq)]
28246#[non_exhaustive]
28247pub struct FeatureNoiseSigma {
28248    /// Noise sigma per feature. No noise is added to features that are not set.
28249    pub noise_sigma: std::vec::Vec<crate::model::feature_noise_sigma::NoiseSigmaForFeature>,
28250
28251    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28252}
28253
28254#[cfg(any(
28255    feature = "dataset-service",
28256    feature = "deployment-resource-pool-service",
28257    feature = "endpoint-service",
28258    feature = "job-service",
28259    feature = "model-service",
28260    feature = "pipeline-service",
28261    feature = "prediction-service",
28262))]
28263impl FeatureNoiseSigma {
28264    pub fn new() -> Self {
28265        std::default::Default::default()
28266    }
28267
28268    /// Sets the value of [noise_sigma][crate::model::FeatureNoiseSigma::noise_sigma].
28269    pub fn set_noise_sigma<T, V>(mut self, v: T) -> Self
28270    where
28271        T: std::iter::IntoIterator<Item = V>,
28272        V: std::convert::Into<crate::model::feature_noise_sigma::NoiseSigmaForFeature>,
28273    {
28274        use std::iter::Iterator;
28275        self.noise_sigma = v.into_iter().map(|i| i.into()).collect();
28276        self
28277    }
28278}
28279
28280#[cfg(any(
28281    feature = "dataset-service",
28282    feature = "deployment-resource-pool-service",
28283    feature = "endpoint-service",
28284    feature = "job-service",
28285    feature = "model-service",
28286    feature = "pipeline-service",
28287    feature = "prediction-service",
28288))]
28289impl wkt::message::Message for FeatureNoiseSigma {
28290    fn typename() -> &'static str {
28291        "type.googleapis.com/google.cloud.aiplatform.v1.FeatureNoiseSigma"
28292    }
28293}
28294
28295/// Defines additional types related to [FeatureNoiseSigma].
28296#[cfg(any(
28297    feature = "dataset-service",
28298    feature = "deployment-resource-pool-service",
28299    feature = "endpoint-service",
28300    feature = "job-service",
28301    feature = "model-service",
28302    feature = "pipeline-service",
28303    feature = "prediction-service",
28304))]
28305pub mod feature_noise_sigma {
28306    #[allow(unused_imports)]
28307    use super::*;
28308
28309    /// Noise sigma for a single feature.
28310    #[cfg(any(
28311        feature = "dataset-service",
28312        feature = "deployment-resource-pool-service",
28313        feature = "endpoint-service",
28314        feature = "job-service",
28315        feature = "model-service",
28316        feature = "pipeline-service",
28317        feature = "prediction-service",
28318    ))]
28319    #[derive(Clone, Default, PartialEq)]
28320    #[non_exhaustive]
28321    pub struct NoiseSigmaForFeature {
28322        /// The name of the input feature for which noise sigma is provided. The
28323        /// features are defined in
28324        /// [explanation metadata
28325        /// inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
28326        ///
28327        /// [google.cloud.aiplatform.v1.ExplanationMetadata.inputs]: crate::model::ExplanationMetadata::inputs
28328        pub name: std::string::String,
28329
28330        /// This represents the standard deviation of the Gaussian kernel that will
28331        /// be used to add noise to the feature prior to computing gradients. Similar
28332        /// to [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]
28333        /// but represents the noise added to the current feature. Defaults to 0.1.
28334        ///
28335        /// [google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma]: crate::model::SmoothGradConfig::gradient_noise_sigma
28336        pub sigma: f32,
28337
28338        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28339    }
28340
28341    #[cfg(any(
28342        feature = "dataset-service",
28343        feature = "deployment-resource-pool-service",
28344        feature = "endpoint-service",
28345        feature = "job-service",
28346        feature = "model-service",
28347        feature = "pipeline-service",
28348        feature = "prediction-service",
28349    ))]
28350    impl NoiseSigmaForFeature {
28351        pub fn new() -> Self {
28352            std::default::Default::default()
28353        }
28354
28355        /// Sets the value of [name][crate::model::feature_noise_sigma::NoiseSigmaForFeature::name].
28356        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28357            self.name = v.into();
28358            self
28359        }
28360
28361        /// Sets the value of [sigma][crate::model::feature_noise_sigma::NoiseSigmaForFeature::sigma].
28362        pub fn set_sigma<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
28363            self.sigma = v.into();
28364            self
28365        }
28366    }
28367
28368    #[cfg(any(
28369        feature = "dataset-service",
28370        feature = "deployment-resource-pool-service",
28371        feature = "endpoint-service",
28372        feature = "job-service",
28373        feature = "model-service",
28374        feature = "pipeline-service",
28375        feature = "prediction-service",
28376    ))]
28377    impl wkt::message::Message for NoiseSigmaForFeature {
28378        fn typename() -> &'static str {
28379            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureNoiseSigma.NoiseSigmaForFeature"
28380        }
28381    }
28382}
28383
28384/// Config for blur baseline.
28385///
28386/// When enabled, a linear path from the maximally blurred image to the input
28387/// image is created. Using a blurred baseline instead of zero (black image) is
28388/// motivated by the BlurIG approach explained here:
28389/// <https://arxiv.org/abs/2004.03383>
28390#[cfg(any(
28391    feature = "dataset-service",
28392    feature = "deployment-resource-pool-service",
28393    feature = "endpoint-service",
28394    feature = "job-service",
28395    feature = "model-service",
28396    feature = "pipeline-service",
28397    feature = "prediction-service",
28398))]
28399#[derive(Clone, Default, PartialEq)]
28400#[non_exhaustive]
28401pub struct BlurBaselineConfig {
28402    /// The standard deviation of the blur kernel for the blurred baseline. The
28403    /// same blurring parameter is used for both the height and the width
28404    /// dimension. If not set, the method defaults to the zero (i.e. black for
28405    /// images) baseline.
28406    pub max_blur_sigma: f32,
28407
28408    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28409}
28410
28411#[cfg(any(
28412    feature = "dataset-service",
28413    feature = "deployment-resource-pool-service",
28414    feature = "endpoint-service",
28415    feature = "job-service",
28416    feature = "model-service",
28417    feature = "pipeline-service",
28418    feature = "prediction-service",
28419))]
28420impl BlurBaselineConfig {
28421    pub fn new() -> Self {
28422        std::default::Default::default()
28423    }
28424
28425    /// Sets the value of [max_blur_sigma][crate::model::BlurBaselineConfig::max_blur_sigma].
28426    pub fn set_max_blur_sigma<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
28427        self.max_blur_sigma = v.into();
28428        self
28429    }
28430}
28431
28432#[cfg(any(
28433    feature = "dataset-service",
28434    feature = "deployment-resource-pool-service",
28435    feature = "endpoint-service",
28436    feature = "job-service",
28437    feature = "model-service",
28438    feature = "pipeline-service",
28439    feature = "prediction-service",
28440))]
28441impl wkt::message::Message for BlurBaselineConfig {
28442    fn typename() -> &'static str {
28443        "type.googleapis.com/google.cloud.aiplatform.v1.BlurBaselineConfig"
28444    }
28445}
28446
28447/// Example-based explainability that returns the nearest neighbors from the
28448/// provided dataset.
28449#[cfg(any(
28450    feature = "dataset-service",
28451    feature = "deployment-resource-pool-service",
28452    feature = "endpoint-service",
28453    feature = "job-service",
28454    feature = "model-service",
28455    feature = "pipeline-service",
28456    feature = "prediction-service",
28457))]
28458#[derive(Clone, Default, PartialEq)]
28459#[non_exhaustive]
28460pub struct Examples {
28461    /// The number of neighbors to return when querying for examples.
28462    pub neighbor_count: i32,
28463
28464    pub source: std::option::Option<crate::model::examples::Source>,
28465
28466    pub config: std::option::Option<crate::model::examples::Config>,
28467
28468    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28469}
28470
28471#[cfg(any(
28472    feature = "dataset-service",
28473    feature = "deployment-resource-pool-service",
28474    feature = "endpoint-service",
28475    feature = "job-service",
28476    feature = "model-service",
28477    feature = "pipeline-service",
28478    feature = "prediction-service",
28479))]
28480impl Examples {
28481    pub fn new() -> Self {
28482        std::default::Default::default()
28483    }
28484
28485    /// Sets the value of [neighbor_count][crate::model::Examples::neighbor_count].
28486    pub fn set_neighbor_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
28487        self.neighbor_count = v.into();
28488        self
28489    }
28490
28491    /// Sets the value of [source][crate::model::Examples::source].
28492    ///
28493    /// Note that all the setters affecting `source` are mutually
28494    /// exclusive.
28495    pub fn set_source<
28496        T: std::convert::Into<std::option::Option<crate::model::examples::Source>>,
28497    >(
28498        mut self,
28499        v: T,
28500    ) -> Self {
28501        self.source = v.into();
28502        self
28503    }
28504
28505    /// The value of [source][crate::model::Examples::source]
28506    /// if it holds a `ExampleGcsSource`, `None` if the field is not set or
28507    /// holds a different branch.
28508    pub fn example_gcs_source(
28509        &self,
28510    ) -> std::option::Option<&std::boxed::Box<crate::model::examples::ExampleGcsSource>> {
28511        #[allow(unreachable_patterns)]
28512        self.source.as_ref().and_then(|v| match v {
28513            crate::model::examples::Source::ExampleGcsSource(v) => std::option::Option::Some(v),
28514            _ => std::option::Option::None,
28515        })
28516    }
28517
28518    /// Sets the value of [source][crate::model::Examples::source]
28519    /// to hold a `ExampleGcsSource`.
28520    ///
28521    /// Note that all the setters affecting `source` are
28522    /// mutually exclusive.
28523    pub fn set_example_gcs_source<
28524        T: std::convert::Into<std::boxed::Box<crate::model::examples::ExampleGcsSource>>,
28525    >(
28526        mut self,
28527        v: T,
28528    ) -> Self {
28529        self.source =
28530            std::option::Option::Some(crate::model::examples::Source::ExampleGcsSource(v.into()));
28531        self
28532    }
28533
28534    /// Sets the value of [config][crate::model::Examples::config].
28535    ///
28536    /// Note that all the setters affecting `config` are mutually
28537    /// exclusive.
28538    pub fn set_config<
28539        T: std::convert::Into<std::option::Option<crate::model::examples::Config>>,
28540    >(
28541        mut self,
28542        v: T,
28543    ) -> Self {
28544        self.config = v.into();
28545        self
28546    }
28547
28548    /// The value of [config][crate::model::Examples::config]
28549    /// if it holds a `NearestNeighborSearchConfig`, `None` if the field is not set or
28550    /// holds a different branch.
28551    pub fn nearest_neighbor_search_config(
28552        &self,
28553    ) -> std::option::Option<&std::boxed::Box<wkt::Value>> {
28554        #[allow(unreachable_patterns)]
28555        self.config.as_ref().and_then(|v| match v {
28556            crate::model::examples::Config::NearestNeighborSearchConfig(v) => {
28557                std::option::Option::Some(v)
28558            }
28559            _ => std::option::Option::None,
28560        })
28561    }
28562
28563    /// Sets the value of [config][crate::model::Examples::config]
28564    /// to hold a `NearestNeighborSearchConfig`.
28565    ///
28566    /// Note that all the setters affecting `config` are
28567    /// mutually exclusive.
28568    pub fn set_nearest_neighbor_search_config<
28569        T: std::convert::Into<std::boxed::Box<wkt::Value>>,
28570    >(
28571        mut self,
28572        v: T,
28573    ) -> Self {
28574        self.config = std::option::Option::Some(
28575            crate::model::examples::Config::NearestNeighborSearchConfig(v.into()),
28576        );
28577        self
28578    }
28579
28580    /// The value of [config][crate::model::Examples::config]
28581    /// if it holds a `Presets`, `None` if the field is not set or
28582    /// holds a different branch.
28583    pub fn presets(&self) -> std::option::Option<&std::boxed::Box<crate::model::Presets>> {
28584        #[allow(unreachable_patterns)]
28585        self.config.as_ref().and_then(|v| match v {
28586            crate::model::examples::Config::Presets(v) => std::option::Option::Some(v),
28587            _ => std::option::Option::None,
28588        })
28589    }
28590
28591    /// Sets the value of [config][crate::model::Examples::config]
28592    /// to hold a `Presets`.
28593    ///
28594    /// Note that all the setters affecting `config` are
28595    /// mutually exclusive.
28596    pub fn set_presets<T: std::convert::Into<std::boxed::Box<crate::model::Presets>>>(
28597        mut self,
28598        v: T,
28599    ) -> Self {
28600        self.config = std::option::Option::Some(crate::model::examples::Config::Presets(v.into()));
28601        self
28602    }
28603}
28604
28605#[cfg(any(
28606    feature = "dataset-service",
28607    feature = "deployment-resource-pool-service",
28608    feature = "endpoint-service",
28609    feature = "job-service",
28610    feature = "model-service",
28611    feature = "pipeline-service",
28612    feature = "prediction-service",
28613))]
28614impl wkt::message::Message for Examples {
28615    fn typename() -> &'static str {
28616        "type.googleapis.com/google.cloud.aiplatform.v1.Examples"
28617    }
28618}
28619
28620/// Defines additional types related to [Examples].
28621#[cfg(any(
28622    feature = "dataset-service",
28623    feature = "deployment-resource-pool-service",
28624    feature = "endpoint-service",
28625    feature = "job-service",
28626    feature = "model-service",
28627    feature = "pipeline-service",
28628    feature = "prediction-service",
28629))]
28630pub mod examples {
28631    #[allow(unused_imports)]
28632    use super::*;
28633
28634    /// The Cloud Storage input instances.
28635    #[cfg(any(
28636        feature = "dataset-service",
28637        feature = "deployment-resource-pool-service",
28638        feature = "endpoint-service",
28639        feature = "job-service",
28640        feature = "model-service",
28641        feature = "pipeline-service",
28642        feature = "prediction-service",
28643    ))]
28644    #[derive(Clone, Default, PartialEq)]
28645    #[non_exhaustive]
28646    pub struct ExampleGcsSource {
28647        /// The format in which instances are given, if not specified, assume it's
28648        /// JSONL format. Currently only JSONL format is supported.
28649        pub data_format: crate::model::examples::example_gcs_source::DataFormat,
28650
28651        /// The Cloud Storage location for the input instances.
28652        pub gcs_source: std::option::Option<crate::model::GcsSource>,
28653
28654        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28655    }
28656
28657    #[cfg(any(
28658        feature = "dataset-service",
28659        feature = "deployment-resource-pool-service",
28660        feature = "endpoint-service",
28661        feature = "job-service",
28662        feature = "model-service",
28663        feature = "pipeline-service",
28664        feature = "prediction-service",
28665    ))]
28666    impl ExampleGcsSource {
28667        pub fn new() -> Self {
28668            std::default::Default::default()
28669        }
28670
28671        /// Sets the value of [data_format][crate::model::examples::ExampleGcsSource::data_format].
28672        pub fn set_data_format<
28673            T: std::convert::Into<crate::model::examples::example_gcs_source::DataFormat>,
28674        >(
28675            mut self,
28676            v: T,
28677        ) -> Self {
28678            self.data_format = v.into();
28679            self
28680        }
28681
28682        /// Sets the value of [gcs_source][crate::model::examples::ExampleGcsSource::gcs_source].
28683        pub fn set_gcs_source<T>(mut self, v: T) -> Self
28684        where
28685            T: std::convert::Into<crate::model::GcsSource>,
28686        {
28687            self.gcs_source = std::option::Option::Some(v.into());
28688            self
28689        }
28690
28691        /// Sets or clears the value of [gcs_source][crate::model::examples::ExampleGcsSource::gcs_source].
28692        pub fn set_or_clear_gcs_source<T>(mut self, v: std::option::Option<T>) -> Self
28693        where
28694            T: std::convert::Into<crate::model::GcsSource>,
28695        {
28696            self.gcs_source = v.map(|x| x.into());
28697            self
28698        }
28699    }
28700
28701    #[cfg(any(
28702        feature = "dataset-service",
28703        feature = "deployment-resource-pool-service",
28704        feature = "endpoint-service",
28705        feature = "job-service",
28706        feature = "model-service",
28707        feature = "pipeline-service",
28708        feature = "prediction-service",
28709    ))]
28710    impl wkt::message::Message for ExampleGcsSource {
28711        fn typename() -> &'static str {
28712            "type.googleapis.com/google.cloud.aiplatform.v1.Examples.ExampleGcsSource"
28713        }
28714    }
28715
28716    /// Defines additional types related to [ExampleGcsSource].
28717    #[cfg(any(
28718        feature = "dataset-service",
28719        feature = "deployment-resource-pool-service",
28720        feature = "endpoint-service",
28721        feature = "job-service",
28722        feature = "model-service",
28723        feature = "pipeline-service",
28724        feature = "prediction-service",
28725    ))]
28726    pub mod example_gcs_source {
28727        #[allow(unused_imports)]
28728        use super::*;
28729
28730        /// The format of the input example instances.
28731        ///
28732        /// # Working with unknown values
28733        ///
28734        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
28735        /// additional enum variants at any time. Adding new variants is not considered
28736        /// a breaking change. Applications should write their code in anticipation of:
28737        ///
28738        /// - New values appearing in future releases of the client library, **and**
28739        /// - New values received dynamically, without application changes.
28740        ///
28741        /// Please consult the [Working with enums] section in the user guide for some
28742        /// guidelines.
28743        ///
28744        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
28745        #[cfg(any(
28746            feature = "dataset-service",
28747            feature = "deployment-resource-pool-service",
28748            feature = "endpoint-service",
28749            feature = "job-service",
28750            feature = "model-service",
28751            feature = "pipeline-service",
28752            feature = "prediction-service",
28753        ))]
28754        #[derive(Clone, Debug, PartialEq)]
28755        #[non_exhaustive]
28756        pub enum DataFormat {
28757            /// Format unspecified, used when unset.
28758            Unspecified,
28759            /// Examples are stored in JSONL files.
28760            Jsonl,
28761            /// If set, the enum was initialized with an unknown value.
28762            ///
28763            /// Applications can examine the value using [DataFormat::value] or
28764            /// [DataFormat::name].
28765            UnknownValue(data_format::UnknownValue),
28766        }
28767
28768        #[doc(hidden)]
28769        #[cfg(any(
28770            feature = "dataset-service",
28771            feature = "deployment-resource-pool-service",
28772            feature = "endpoint-service",
28773            feature = "job-service",
28774            feature = "model-service",
28775            feature = "pipeline-service",
28776            feature = "prediction-service",
28777        ))]
28778        pub mod data_format {
28779            #[allow(unused_imports)]
28780            use super::*;
28781            #[derive(Clone, Debug, PartialEq)]
28782            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28783        }
28784
28785        #[cfg(any(
28786            feature = "dataset-service",
28787            feature = "deployment-resource-pool-service",
28788            feature = "endpoint-service",
28789            feature = "job-service",
28790            feature = "model-service",
28791            feature = "pipeline-service",
28792            feature = "prediction-service",
28793        ))]
28794        impl DataFormat {
28795            /// Gets the enum value.
28796            ///
28797            /// Returns `None` if the enum contains an unknown value deserialized from
28798            /// the string representation of enums.
28799            pub fn value(&self) -> std::option::Option<i32> {
28800                match self {
28801                    Self::Unspecified => std::option::Option::Some(0),
28802                    Self::Jsonl => std::option::Option::Some(1),
28803                    Self::UnknownValue(u) => u.0.value(),
28804                }
28805            }
28806
28807            /// Gets the enum value as a string.
28808            ///
28809            /// Returns `None` if the enum contains an unknown value deserialized from
28810            /// the integer representation of enums.
28811            pub fn name(&self) -> std::option::Option<&str> {
28812                match self {
28813                    Self::Unspecified => std::option::Option::Some("DATA_FORMAT_UNSPECIFIED"),
28814                    Self::Jsonl => std::option::Option::Some("JSONL"),
28815                    Self::UnknownValue(u) => u.0.name(),
28816                }
28817            }
28818        }
28819
28820        #[cfg(any(
28821            feature = "dataset-service",
28822            feature = "deployment-resource-pool-service",
28823            feature = "endpoint-service",
28824            feature = "job-service",
28825            feature = "model-service",
28826            feature = "pipeline-service",
28827            feature = "prediction-service",
28828        ))]
28829        impl std::default::Default for DataFormat {
28830            fn default() -> Self {
28831                use std::convert::From;
28832                Self::from(0)
28833            }
28834        }
28835
28836        #[cfg(any(
28837            feature = "dataset-service",
28838            feature = "deployment-resource-pool-service",
28839            feature = "endpoint-service",
28840            feature = "job-service",
28841            feature = "model-service",
28842            feature = "pipeline-service",
28843            feature = "prediction-service",
28844        ))]
28845        impl std::fmt::Display for DataFormat {
28846            fn fmt(
28847                &self,
28848                f: &mut std::fmt::Formatter<'_>,
28849            ) -> std::result::Result<(), std::fmt::Error> {
28850                wkt::internal::display_enum(f, self.name(), self.value())
28851            }
28852        }
28853
28854        #[cfg(any(
28855            feature = "dataset-service",
28856            feature = "deployment-resource-pool-service",
28857            feature = "endpoint-service",
28858            feature = "job-service",
28859            feature = "model-service",
28860            feature = "pipeline-service",
28861            feature = "prediction-service",
28862        ))]
28863        impl std::convert::From<i32> for DataFormat {
28864            fn from(value: i32) -> Self {
28865                match value {
28866                    0 => Self::Unspecified,
28867                    1 => Self::Jsonl,
28868                    _ => Self::UnknownValue(data_format::UnknownValue(
28869                        wkt::internal::UnknownEnumValue::Integer(value),
28870                    )),
28871                }
28872            }
28873        }
28874
28875        #[cfg(any(
28876            feature = "dataset-service",
28877            feature = "deployment-resource-pool-service",
28878            feature = "endpoint-service",
28879            feature = "job-service",
28880            feature = "model-service",
28881            feature = "pipeline-service",
28882            feature = "prediction-service",
28883        ))]
28884        impl std::convert::From<&str> for DataFormat {
28885            fn from(value: &str) -> Self {
28886                use std::string::ToString;
28887                match value {
28888                    "DATA_FORMAT_UNSPECIFIED" => Self::Unspecified,
28889                    "JSONL" => Self::Jsonl,
28890                    _ => Self::UnknownValue(data_format::UnknownValue(
28891                        wkt::internal::UnknownEnumValue::String(value.to_string()),
28892                    )),
28893                }
28894            }
28895        }
28896
28897        #[cfg(any(
28898            feature = "dataset-service",
28899            feature = "deployment-resource-pool-service",
28900            feature = "endpoint-service",
28901            feature = "job-service",
28902            feature = "model-service",
28903            feature = "pipeline-service",
28904            feature = "prediction-service",
28905        ))]
28906        impl serde::ser::Serialize for DataFormat {
28907            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28908            where
28909                S: serde::Serializer,
28910            {
28911                match self {
28912                    Self::Unspecified => serializer.serialize_i32(0),
28913                    Self::Jsonl => serializer.serialize_i32(1),
28914                    Self::UnknownValue(u) => u.0.serialize(serializer),
28915                }
28916            }
28917        }
28918
28919        #[cfg(any(
28920            feature = "dataset-service",
28921            feature = "deployment-resource-pool-service",
28922            feature = "endpoint-service",
28923            feature = "job-service",
28924            feature = "model-service",
28925            feature = "pipeline-service",
28926            feature = "prediction-service",
28927        ))]
28928        impl<'de> serde::de::Deserialize<'de> for DataFormat {
28929            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28930            where
28931                D: serde::Deserializer<'de>,
28932            {
28933                deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataFormat>::new(
28934                    ".google.cloud.aiplatform.v1.Examples.ExampleGcsSource.DataFormat",
28935                ))
28936            }
28937        }
28938    }
28939
28940    #[cfg(any(
28941        feature = "dataset-service",
28942        feature = "deployment-resource-pool-service",
28943        feature = "endpoint-service",
28944        feature = "job-service",
28945        feature = "model-service",
28946        feature = "pipeline-service",
28947        feature = "prediction-service",
28948    ))]
28949    #[derive(Clone, Debug, PartialEq)]
28950    #[non_exhaustive]
28951    pub enum Source {
28952        /// The Cloud Storage input instances.
28953        ExampleGcsSource(std::boxed::Box<crate::model::examples::ExampleGcsSource>),
28954    }
28955
28956    #[cfg(any(
28957        feature = "dataset-service",
28958        feature = "deployment-resource-pool-service",
28959        feature = "endpoint-service",
28960        feature = "job-service",
28961        feature = "model-service",
28962        feature = "pipeline-service",
28963        feature = "prediction-service",
28964    ))]
28965    #[derive(Clone, Debug, PartialEq)]
28966    #[non_exhaustive]
28967    pub enum Config {
28968        /// The full configuration for the generated index, the semantics are the
28969        /// same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
28970        /// match
28971        /// [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
28972        ///
28973        /// [google.cloud.aiplatform.v1.Index.metadata]: crate::model::Index::metadata
28974        NearestNeighborSearchConfig(std::boxed::Box<wkt::Value>),
28975        /// Simplified preset configuration, which automatically sets configuration
28976        /// values based on the desired query speed-precision trade-off and modality.
28977        Presets(std::boxed::Box<crate::model::Presets>),
28978    }
28979}
28980
28981/// Preset configuration for example-based explanations
28982#[cfg(any(
28983    feature = "dataset-service",
28984    feature = "deployment-resource-pool-service",
28985    feature = "endpoint-service",
28986    feature = "job-service",
28987    feature = "model-service",
28988    feature = "pipeline-service",
28989    feature = "prediction-service",
28990))]
28991#[derive(Clone, Default, PartialEq)]
28992#[non_exhaustive]
28993pub struct Presets {
28994    /// Preset option controlling parameters for speed-precision trade-off when
28995    /// querying for examples. If omitted, defaults to `PRECISE`.
28996    pub query: std::option::Option<crate::model::presets::Query>,
28997
28998    /// The modality of the uploaded model, which automatically configures the
28999    /// distance measurement and feature normalization for the underlying example
29000    /// index and queries. If your model does not precisely fit one of these types,
29001    /// it is okay to choose the closest type.
29002    pub modality: crate::model::presets::Modality,
29003
29004    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29005}
29006
29007#[cfg(any(
29008    feature = "dataset-service",
29009    feature = "deployment-resource-pool-service",
29010    feature = "endpoint-service",
29011    feature = "job-service",
29012    feature = "model-service",
29013    feature = "pipeline-service",
29014    feature = "prediction-service",
29015))]
29016impl Presets {
29017    pub fn new() -> Self {
29018        std::default::Default::default()
29019    }
29020
29021    /// Sets the value of [query][crate::model::Presets::query].
29022    pub fn set_query<T>(mut self, v: T) -> Self
29023    where
29024        T: std::convert::Into<crate::model::presets::Query>,
29025    {
29026        self.query = std::option::Option::Some(v.into());
29027        self
29028    }
29029
29030    /// Sets or clears the value of [query][crate::model::Presets::query].
29031    pub fn set_or_clear_query<T>(mut self, v: std::option::Option<T>) -> Self
29032    where
29033        T: std::convert::Into<crate::model::presets::Query>,
29034    {
29035        self.query = v.map(|x| x.into());
29036        self
29037    }
29038
29039    /// Sets the value of [modality][crate::model::Presets::modality].
29040    pub fn set_modality<T: std::convert::Into<crate::model::presets::Modality>>(
29041        mut self,
29042        v: T,
29043    ) -> Self {
29044        self.modality = v.into();
29045        self
29046    }
29047}
29048
29049#[cfg(any(
29050    feature = "dataset-service",
29051    feature = "deployment-resource-pool-service",
29052    feature = "endpoint-service",
29053    feature = "job-service",
29054    feature = "model-service",
29055    feature = "pipeline-service",
29056    feature = "prediction-service",
29057))]
29058impl wkt::message::Message for Presets {
29059    fn typename() -> &'static str {
29060        "type.googleapis.com/google.cloud.aiplatform.v1.Presets"
29061    }
29062}
29063
29064/// Defines additional types related to [Presets].
29065#[cfg(any(
29066    feature = "dataset-service",
29067    feature = "deployment-resource-pool-service",
29068    feature = "endpoint-service",
29069    feature = "job-service",
29070    feature = "model-service",
29071    feature = "pipeline-service",
29072    feature = "prediction-service",
29073))]
29074pub mod presets {
29075    #[allow(unused_imports)]
29076    use super::*;
29077
29078    /// Preset option controlling parameters for query speed-precision trade-off
29079    ///
29080    /// # Working with unknown values
29081    ///
29082    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29083    /// additional enum variants at any time. Adding new variants is not considered
29084    /// a breaking change. Applications should write their code in anticipation of:
29085    ///
29086    /// - New values appearing in future releases of the client library, **and**
29087    /// - New values received dynamically, without application changes.
29088    ///
29089    /// Please consult the [Working with enums] section in the user guide for some
29090    /// guidelines.
29091    ///
29092    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29093    #[cfg(any(
29094        feature = "dataset-service",
29095        feature = "deployment-resource-pool-service",
29096        feature = "endpoint-service",
29097        feature = "job-service",
29098        feature = "model-service",
29099        feature = "pipeline-service",
29100        feature = "prediction-service",
29101    ))]
29102    #[derive(Clone, Debug, PartialEq)]
29103    #[non_exhaustive]
29104    pub enum Query {
29105        /// More precise neighbors as a trade-off against slower response.
29106        Precise,
29107        /// Faster response as a trade-off against less precise neighbors.
29108        Fast,
29109        /// If set, the enum was initialized with an unknown value.
29110        ///
29111        /// Applications can examine the value using [Query::value] or
29112        /// [Query::name].
29113        UnknownValue(query::UnknownValue),
29114    }
29115
29116    #[doc(hidden)]
29117    #[cfg(any(
29118        feature = "dataset-service",
29119        feature = "deployment-resource-pool-service",
29120        feature = "endpoint-service",
29121        feature = "job-service",
29122        feature = "model-service",
29123        feature = "pipeline-service",
29124        feature = "prediction-service",
29125    ))]
29126    pub mod query {
29127        #[allow(unused_imports)]
29128        use super::*;
29129        #[derive(Clone, Debug, PartialEq)]
29130        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29131    }
29132
29133    #[cfg(any(
29134        feature = "dataset-service",
29135        feature = "deployment-resource-pool-service",
29136        feature = "endpoint-service",
29137        feature = "job-service",
29138        feature = "model-service",
29139        feature = "pipeline-service",
29140        feature = "prediction-service",
29141    ))]
29142    impl Query {
29143        /// Gets the enum value.
29144        ///
29145        /// Returns `None` if the enum contains an unknown value deserialized from
29146        /// the string representation of enums.
29147        pub fn value(&self) -> std::option::Option<i32> {
29148            match self {
29149                Self::Precise => std::option::Option::Some(0),
29150                Self::Fast => std::option::Option::Some(1),
29151                Self::UnknownValue(u) => u.0.value(),
29152            }
29153        }
29154
29155        /// Gets the enum value as a string.
29156        ///
29157        /// Returns `None` if the enum contains an unknown value deserialized from
29158        /// the integer representation of enums.
29159        pub fn name(&self) -> std::option::Option<&str> {
29160            match self {
29161                Self::Precise => std::option::Option::Some("PRECISE"),
29162                Self::Fast => std::option::Option::Some("FAST"),
29163                Self::UnknownValue(u) => u.0.name(),
29164            }
29165        }
29166    }
29167
29168    #[cfg(any(
29169        feature = "dataset-service",
29170        feature = "deployment-resource-pool-service",
29171        feature = "endpoint-service",
29172        feature = "job-service",
29173        feature = "model-service",
29174        feature = "pipeline-service",
29175        feature = "prediction-service",
29176    ))]
29177    impl std::default::Default for Query {
29178        fn default() -> Self {
29179            use std::convert::From;
29180            Self::from(0)
29181        }
29182    }
29183
29184    #[cfg(any(
29185        feature = "dataset-service",
29186        feature = "deployment-resource-pool-service",
29187        feature = "endpoint-service",
29188        feature = "job-service",
29189        feature = "model-service",
29190        feature = "pipeline-service",
29191        feature = "prediction-service",
29192    ))]
29193    impl std::fmt::Display for Query {
29194        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29195            wkt::internal::display_enum(f, self.name(), self.value())
29196        }
29197    }
29198
29199    #[cfg(any(
29200        feature = "dataset-service",
29201        feature = "deployment-resource-pool-service",
29202        feature = "endpoint-service",
29203        feature = "job-service",
29204        feature = "model-service",
29205        feature = "pipeline-service",
29206        feature = "prediction-service",
29207    ))]
29208    impl std::convert::From<i32> for Query {
29209        fn from(value: i32) -> Self {
29210            match value {
29211                0 => Self::Precise,
29212                1 => Self::Fast,
29213                _ => Self::UnknownValue(query::UnknownValue(
29214                    wkt::internal::UnknownEnumValue::Integer(value),
29215                )),
29216            }
29217        }
29218    }
29219
29220    #[cfg(any(
29221        feature = "dataset-service",
29222        feature = "deployment-resource-pool-service",
29223        feature = "endpoint-service",
29224        feature = "job-service",
29225        feature = "model-service",
29226        feature = "pipeline-service",
29227        feature = "prediction-service",
29228    ))]
29229    impl std::convert::From<&str> for Query {
29230        fn from(value: &str) -> Self {
29231            use std::string::ToString;
29232            match value {
29233                "PRECISE" => Self::Precise,
29234                "FAST" => Self::Fast,
29235                _ => Self::UnknownValue(query::UnknownValue(
29236                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29237                )),
29238            }
29239        }
29240    }
29241
29242    #[cfg(any(
29243        feature = "dataset-service",
29244        feature = "deployment-resource-pool-service",
29245        feature = "endpoint-service",
29246        feature = "job-service",
29247        feature = "model-service",
29248        feature = "pipeline-service",
29249        feature = "prediction-service",
29250    ))]
29251    impl serde::ser::Serialize for Query {
29252        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29253        where
29254            S: serde::Serializer,
29255        {
29256            match self {
29257                Self::Precise => serializer.serialize_i32(0),
29258                Self::Fast => serializer.serialize_i32(1),
29259                Self::UnknownValue(u) => u.0.serialize(serializer),
29260            }
29261        }
29262    }
29263
29264    #[cfg(any(
29265        feature = "dataset-service",
29266        feature = "deployment-resource-pool-service",
29267        feature = "endpoint-service",
29268        feature = "job-service",
29269        feature = "model-service",
29270        feature = "pipeline-service",
29271        feature = "prediction-service",
29272    ))]
29273    impl<'de> serde::de::Deserialize<'de> for Query {
29274        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29275        where
29276            D: serde::Deserializer<'de>,
29277        {
29278            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Query>::new(
29279                ".google.cloud.aiplatform.v1.Presets.Query",
29280            ))
29281        }
29282    }
29283
29284    /// Preset option controlling parameters for different modalities
29285    ///
29286    /// # Working with unknown values
29287    ///
29288    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29289    /// additional enum variants at any time. Adding new variants is not considered
29290    /// a breaking change. Applications should write their code in anticipation of:
29291    ///
29292    /// - New values appearing in future releases of the client library, **and**
29293    /// - New values received dynamically, without application changes.
29294    ///
29295    /// Please consult the [Working with enums] section in the user guide for some
29296    /// guidelines.
29297    ///
29298    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29299    #[cfg(any(
29300        feature = "dataset-service",
29301        feature = "deployment-resource-pool-service",
29302        feature = "endpoint-service",
29303        feature = "job-service",
29304        feature = "model-service",
29305        feature = "pipeline-service",
29306        feature = "prediction-service",
29307    ))]
29308    #[derive(Clone, Debug, PartialEq)]
29309    #[non_exhaustive]
29310    pub enum Modality {
29311        /// Should not be set. Added as a recommended best practice for enums
29312        Unspecified,
29313        /// IMAGE modality
29314        Image,
29315        /// TEXT modality
29316        Text,
29317        /// TABULAR modality
29318        Tabular,
29319        /// If set, the enum was initialized with an unknown value.
29320        ///
29321        /// Applications can examine the value using [Modality::value] or
29322        /// [Modality::name].
29323        UnknownValue(modality::UnknownValue),
29324    }
29325
29326    #[doc(hidden)]
29327    #[cfg(any(
29328        feature = "dataset-service",
29329        feature = "deployment-resource-pool-service",
29330        feature = "endpoint-service",
29331        feature = "job-service",
29332        feature = "model-service",
29333        feature = "pipeline-service",
29334        feature = "prediction-service",
29335    ))]
29336    pub mod modality {
29337        #[allow(unused_imports)]
29338        use super::*;
29339        #[derive(Clone, Debug, PartialEq)]
29340        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29341    }
29342
29343    #[cfg(any(
29344        feature = "dataset-service",
29345        feature = "deployment-resource-pool-service",
29346        feature = "endpoint-service",
29347        feature = "job-service",
29348        feature = "model-service",
29349        feature = "pipeline-service",
29350        feature = "prediction-service",
29351    ))]
29352    impl Modality {
29353        /// Gets the enum value.
29354        ///
29355        /// Returns `None` if the enum contains an unknown value deserialized from
29356        /// the string representation of enums.
29357        pub fn value(&self) -> std::option::Option<i32> {
29358            match self {
29359                Self::Unspecified => std::option::Option::Some(0),
29360                Self::Image => std::option::Option::Some(1),
29361                Self::Text => std::option::Option::Some(2),
29362                Self::Tabular => std::option::Option::Some(3),
29363                Self::UnknownValue(u) => u.0.value(),
29364            }
29365        }
29366
29367        /// Gets the enum value as a string.
29368        ///
29369        /// Returns `None` if the enum contains an unknown value deserialized from
29370        /// the integer representation of enums.
29371        pub fn name(&self) -> std::option::Option<&str> {
29372            match self {
29373                Self::Unspecified => std::option::Option::Some("MODALITY_UNSPECIFIED"),
29374                Self::Image => std::option::Option::Some("IMAGE"),
29375                Self::Text => std::option::Option::Some("TEXT"),
29376                Self::Tabular => std::option::Option::Some("TABULAR"),
29377                Self::UnknownValue(u) => u.0.name(),
29378            }
29379        }
29380    }
29381
29382    #[cfg(any(
29383        feature = "dataset-service",
29384        feature = "deployment-resource-pool-service",
29385        feature = "endpoint-service",
29386        feature = "job-service",
29387        feature = "model-service",
29388        feature = "pipeline-service",
29389        feature = "prediction-service",
29390    ))]
29391    impl std::default::Default for Modality {
29392        fn default() -> Self {
29393            use std::convert::From;
29394            Self::from(0)
29395        }
29396    }
29397
29398    #[cfg(any(
29399        feature = "dataset-service",
29400        feature = "deployment-resource-pool-service",
29401        feature = "endpoint-service",
29402        feature = "job-service",
29403        feature = "model-service",
29404        feature = "pipeline-service",
29405        feature = "prediction-service",
29406    ))]
29407    impl std::fmt::Display for Modality {
29408        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29409            wkt::internal::display_enum(f, self.name(), self.value())
29410        }
29411    }
29412
29413    #[cfg(any(
29414        feature = "dataset-service",
29415        feature = "deployment-resource-pool-service",
29416        feature = "endpoint-service",
29417        feature = "job-service",
29418        feature = "model-service",
29419        feature = "pipeline-service",
29420        feature = "prediction-service",
29421    ))]
29422    impl std::convert::From<i32> for Modality {
29423        fn from(value: i32) -> Self {
29424            match value {
29425                0 => Self::Unspecified,
29426                1 => Self::Image,
29427                2 => Self::Text,
29428                3 => Self::Tabular,
29429                _ => Self::UnknownValue(modality::UnknownValue(
29430                    wkt::internal::UnknownEnumValue::Integer(value),
29431                )),
29432            }
29433        }
29434    }
29435
29436    #[cfg(any(
29437        feature = "dataset-service",
29438        feature = "deployment-resource-pool-service",
29439        feature = "endpoint-service",
29440        feature = "job-service",
29441        feature = "model-service",
29442        feature = "pipeline-service",
29443        feature = "prediction-service",
29444    ))]
29445    impl std::convert::From<&str> for Modality {
29446        fn from(value: &str) -> Self {
29447            use std::string::ToString;
29448            match value {
29449                "MODALITY_UNSPECIFIED" => Self::Unspecified,
29450                "IMAGE" => Self::Image,
29451                "TEXT" => Self::Text,
29452                "TABULAR" => Self::Tabular,
29453                _ => Self::UnknownValue(modality::UnknownValue(
29454                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29455                )),
29456            }
29457        }
29458    }
29459
29460    #[cfg(any(
29461        feature = "dataset-service",
29462        feature = "deployment-resource-pool-service",
29463        feature = "endpoint-service",
29464        feature = "job-service",
29465        feature = "model-service",
29466        feature = "pipeline-service",
29467        feature = "prediction-service",
29468    ))]
29469    impl serde::ser::Serialize for Modality {
29470        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29471        where
29472            S: serde::Serializer,
29473        {
29474            match self {
29475                Self::Unspecified => serializer.serialize_i32(0),
29476                Self::Image => serializer.serialize_i32(1),
29477                Self::Text => serializer.serialize_i32(2),
29478                Self::Tabular => serializer.serialize_i32(3),
29479                Self::UnknownValue(u) => u.0.serialize(serializer),
29480            }
29481        }
29482    }
29483
29484    #[cfg(any(
29485        feature = "dataset-service",
29486        feature = "deployment-resource-pool-service",
29487        feature = "endpoint-service",
29488        feature = "job-service",
29489        feature = "model-service",
29490        feature = "pipeline-service",
29491        feature = "prediction-service",
29492    ))]
29493    impl<'de> serde::de::Deserialize<'de> for Modality {
29494        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29495        where
29496            D: serde::Deserializer<'de>,
29497        {
29498            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Modality>::new(
29499                ".google.cloud.aiplatform.v1.Presets.Modality",
29500            ))
29501        }
29502    }
29503}
29504
29505/// The [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] entries
29506/// that can be overridden at [online
29507/// explanation][google.cloud.aiplatform.v1.PredictionService.Explain] time.
29508///
29509/// [google.cloud.aiplatform.v1.ExplanationSpec]: crate::model::ExplanationSpec
29510/// [google.cloud.aiplatform.v1.PredictionService.Explain]: crate::client::PredictionService::explain
29511#[cfg(feature = "prediction-service")]
29512#[derive(Clone, Default, PartialEq)]
29513#[non_exhaustive]
29514pub struct ExplanationSpecOverride {
29515    /// The parameters to be overridden. Note that the
29516    /// attribution method cannot be changed. If not specified,
29517    /// no parameter is overridden.
29518    pub parameters: std::option::Option<crate::model::ExplanationParameters>,
29519
29520    /// The metadata to be overridden. If not specified, no metadata is overridden.
29521    pub metadata: std::option::Option<crate::model::ExplanationMetadataOverride>,
29522
29523    /// The example-based explanations parameter overrides.
29524    pub examples_override: std::option::Option<crate::model::ExamplesOverride>,
29525
29526    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29527}
29528
29529#[cfg(feature = "prediction-service")]
29530impl ExplanationSpecOverride {
29531    pub fn new() -> Self {
29532        std::default::Default::default()
29533    }
29534
29535    /// Sets the value of [parameters][crate::model::ExplanationSpecOverride::parameters].
29536    pub fn set_parameters<T>(mut self, v: T) -> Self
29537    where
29538        T: std::convert::Into<crate::model::ExplanationParameters>,
29539    {
29540        self.parameters = std::option::Option::Some(v.into());
29541        self
29542    }
29543
29544    /// Sets or clears the value of [parameters][crate::model::ExplanationSpecOverride::parameters].
29545    pub fn set_or_clear_parameters<T>(mut self, v: std::option::Option<T>) -> Self
29546    where
29547        T: std::convert::Into<crate::model::ExplanationParameters>,
29548    {
29549        self.parameters = v.map(|x| x.into());
29550        self
29551    }
29552
29553    /// Sets the value of [metadata][crate::model::ExplanationSpecOverride::metadata].
29554    pub fn set_metadata<T>(mut self, v: T) -> Self
29555    where
29556        T: std::convert::Into<crate::model::ExplanationMetadataOverride>,
29557    {
29558        self.metadata = std::option::Option::Some(v.into());
29559        self
29560    }
29561
29562    /// Sets or clears the value of [metadata][crate::model::ExplanationSpecOverride::metadata].
29563    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
29564    where
29565        T: std::convert::Into<crate::model::ExplanationMetadataOverride>,
29566    {
29567        self.metadata = v.map(|x| x.into());
29568        self
29569    }
29570
29571    /// Sets the value of [examples_override][crate::model::ExplanationSpecOverride::examples_override].
29572    pub fn set_examples_override<T>(mut self, v: T) -> Self
29573    where
29574        T: std::convert::Into<crate::model::ExamplesOverride>,
29575    {
29576        self.examples_override = std::option::Option::Some(v.into());
29577        self
29578    }
29579
29580    /// Sets or clears the value of [examples_override][crate::model::ExplanationSpecOverride::examples_override].
29581    pub fn set_or_clear_examples_override<T>(mut self, v: std::option::Option<T>) -> Self
29582    where
29583        T: std::convert::Into<crate::model::ExamplesOverride>,
29584    {
29585        self.examples_override = v.map(|x| x.into());
29586        self
29587    }
29588}
29589
29590#[cfg(feature = "prediction-service")]
29591impl wkt::message::Message for ExplanationSpecOverride {
29592    fn typename() -> &'static str {
29593        "type.googleapis.com/google.cloud.aiplatform.v1.ExplanationSpecOverride"
29594    }
29595}
29596
29597/// The [ExplanationMetadata][google.cloud.aiplatform.v1.ExplanationMetadata]
29598/// entries that can be overridden at [online
29599/// explanation][google.cloud.aiplatform.v1.PredictionService.Explain] time.
29600///
29601/// [google.cloud.aiplatform.v1.ExplanationMetadata]: crate::model::ExplanationMetadata
29602/// [google.cloud.aiplatform.v1.PredictionService.Explain]: crate::client::PredictionService::explain
29603#[cfg(feature = "prediction-service")]
29604#[derive(Clone, Default, PartialEq)]
29605#[non_exhaustive]
29606pub struct ExplanationMetadataOverride {
29607    /// Required. Overrides the [input
29608    /// metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
29609    /// features. The key is the name of the feature to be overridden. The keys
29610    /// specified here must exist in the input metadata to be overridden. If a
29611    /// feature is not specified here, the corresponding feature's input metadata
29612    /// is not overridden.
29613    ///
29614    /// [google.cloud.aiplatform.v1.ExplanationMetadata.inputs]: crate::model::ExplanationMetadata::inputs
29615    pub inputs: std::collections::HashMap<
29616        std::string::String,
29617        crate::model::explanation_metadata_override::InputMetadataOverride,
29618    >,
29619
29620    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29621}
29622
29623#[cfg(feature = "prediction-service")]
29624impl ExplanationMetadataOverride {
29625    pub fn new() -> Self {
29626        std::default::Default::default()
29627    }
29628
29629    /// Sets the value of [inputs][crate::model::ExplanationMetadataOverride::inputs].
29630    pub fn set_inputs<T, K, V>(mut self, v: T) -> Self
29631    where
29632        T: std::iter::IntoIterator<Item = (K, V)>,
29633        K: std::convert::Into<std::string::String>,
29634        V: std::convert::Into<crate::model::explanation_metadata_override::InputMetadataOverride>,
29635    {
29636        use std::iter::Iterator;
29637        self.inputs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
29638        self
29639    }
29640}
29641
29642#[cfg(feature = "prediction-service")]
29643impl wkt::message::Message for ExplanationMetadataOverride {
29644    fn typename() -> &'static str {
29645        "type.googleapis.com/google.cloud.aiplatform.v1.ExplanationMetadataOverride"
29646    }
29647}
29648
29649/// Defines additional types related to [ExplanationMetadataOverride].
29650#[cfg(feature = "prediction-service")]
29651pub mod explanation_metadata_override {
29652    #[allow(unused_imports)]
29653    use super::*;
29654
29655    /// The [input
29656    /// metadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
29657    /// entries to be overridden.
29658    ///
29659    /// [google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]: crate::model::explanation_metadata::InputMetadata
29660    #[cfg(feature = "prediction-service")]
29661    #[derive(Clone, Default, PartialEq)]
29662    #[non_exhaustive]
29663    pub struct InputMetadataOverride {
29664        /// Baseline inputs for this feature.
29665        ///
29666        /// This overrides the `input_baseline` field of the
29667        /// [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]
29668        /// object of the corresponding feature's input metadata. If it's not
29669        /// specified, the original baselines are not overridden.
29670        ///
29671        /// [google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata]: crate::model::explanation_metadata::InputMetadata
29672        pub input_baselines: std::vec::Vec<wkt::Value>,
29673
29674        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29675    }
29676
29677    #[cfg(feature = "prediction-service")]
29678    impl InputMetadataOverride {
29679        pub fn new() -> Self {
29680            std::default::Default::default()
29681        }
29682
29683        /// Sets the value of [input_baselines][crate::model::explanation_metadata_override::InputMetadataOverride::input_baselines].
29684        pub fn set_input_baselines<T, V>(mut self, v: T) -> Self
29685        where
29686            T: std::iter::IntoIterator<Item = V>,
29687            V: std::convert::Into<wkt::Value>,
29688        {
29689            use std::iter::Iterator;
29690            self.input_baselines = v.into_iter().map(|i| i.into()).collect();
29691            self
29692        }
29693    }
29694
29695    #[cfg(feature = "prediction-service")]
29696    impl wkt::message::Message for InputMetadataOverride {
29697        fn typename() -> &'static str {
29698            "type.googleapis.com/google.cloud.aiplatform.v1.ExplanationMetadataOverride.InputMetadataOverride"
29699        }
29700    }
29701}
29702
29703/// Overrides for example-based explanations.
29704#[cfg(feature = "prediction-service")]
29705#[derive(Clone, Default, PartialEq)]
29706#[non_exhaustive]
29707pub struct ExamplesOverride {
29708    /// The number of neighbors to return.
29709    pub neighbor_count: i32,
29710
29711    /// The number of neighbors to return that have the same crowding tag.
29712    pub crowding_count: i32,
29713
29714    /// Restrict the resulting nearest neighbors to respect these constraints.
29715    pub restrictions: std::vec::Vec<crate::model::ExamplesRestrictionsNamespace>,
29716
29717    /// If true, return the embeddings instead of neighbors.
29718    pub return_embeddings: bool,
29719
29720    /// The format of the data being provided with each call.
29721    pub data_format: crate::model::examples_override::DataFormat,
29722
29723    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29724}
29725
29726#[cfg(feature = "prediction-service")]
29727impl ExamplesOverride {
29728    pub fn new() -> Self {
29729        std::default::Default::default()
29730    }
29731
29732    /// Sets the value of [neighbor_count][crate::model::ExamplesOverride::neighbor_count].
29733    pub fn set_neighbor_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
29734        self.neighbor_count = v.into();
29735        self
29736    }
29737
29738    /// Sets the value of [crowding_count][crate::model::ExamplesOverride::crowding_count].
29739    pub fn set_crowding_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
29740        self.crowding_count = v.into();
29741        self
29742    }
29743
29744    /// Sets the value of [restrictions][crate::model::ExamplesOverride::restrictions].
29745    pub fn set_restrictions<T, V>(mut self, v: T) -> Self
29746    where
29747        T: std::iter::IntoIterator<Item = V>,
29748        V: std::convert::Into<crate::model::ExamplesRestrictionsNamespace>,
29749    {
29750        use std::iter::Iterator;
29751        self.restrictions = v.into_iter().map(|i| i.into()).collect();
29752        self
29753    }
29754
29755    /// Sets the value of [return_embeddings][crate::model::ExamplesOverride::return_embeddings].
29756    pub fn set_return_embeddings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
29757        self.return_embeddings = v.into();
29758        self
29759    }
29760
29761    /// Sets the value of [data_format][crate::model::ExamplesOverride::data_format].
29762    pub fn set_data_format<T: std::convert::Into<crate::model::examples_override::DataFormat>>(
29763        mut self,
29764        v: T,
29765    ) -> Self {
29766        self.data_format = v.into();
29767        self
29768    }
29769}
29770
29771#[cfg(feature = "prediction-service")]
29772impl wkt::message::Message for ExamplesOverride {
29773    fn typename() -> &'static str {
29774        "type.googleapis.com/google.cloud.aiplatform.v1.ExamplesOverride"
29775    }
29776}
29777
29778/// Defines additional types related to [ExamplesOverride].
29779#[cfg(feature = "prediction-service")]
29780pub mod examples_override {
29781    #[allow(unused_imports)]
29782    use super::*;
29783
29784    /// Data format enum.
29785    ///
29786    /// # Working with unknown values
29787    ///
29788    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
29789    /// additional enum variants at any time. Adding new variants is not considered
29790    /// a breaking change. Applications should write their code in anticipation of:
29791    ///
29792    /// - New values appearing in future releases of the client library, **and**
29793    /// - New values received dynamically, without application changes.
29794    ///
29795    /// Please consult the [Working with enums] section in the user guide for some
29796    /// guidelines.
29797    ///
29798    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
29799    #[cfg(feature = "prediction-service")]
29800    #[derive(Clone, Debug, PartialEq)]
29801    #[non_exhaustive]
29802    pub enum DataFormat {
29803        /// Unspecified format. Must not be used.
29804        Unspecified,
29805        /// Provided data is a set of model inputs.
29806        Instances,
29807        /// Provided data is a set of embeddings.
29808        Embeddings,
29809        /// If set, the enum was initialized with an unknown value.
29810        ///
29811        /// Applications can examine the value using [DataFormat::value] or
29812        /// [DataFormat::name].
29813        UnknownValue(data_format::UnknownValue),
29814    }
29815
29816    #[doc(hidden)]
29817    #[cfg(feature = "prediction-service")]
29818    pub mod data_format {
29819        #[allow(unused_imports)]
29820        use super::*;
29821        #[derive(Clone, Debug, PartialEq)]
29822        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29823    }
29824
29825    #[cfg(feature = "prediction-service")]
29826    impl DataFormat {
29827        /// Gets the enum value.
29828        ///
29829        /// Returns `None` if the enum contains an unknown value deserialized from
29830        /// the string representation of enums.
29831        pub fn value(&self) -> std::option::Option<i32> {
29832            match self {
29833                Self::Unspecified => std::option::Option::Some(0),
29834                Self::Instances => std::option::Option::Some(1),
29835                Self::Embeddings => std::option::Option::Some(2),
29836                Self::UnknownValue(u) => u.0.value(),
29837            }
29838        }
29839
29840        /// Gets the enum value as a string.
29841        ///
29842        /// Returns `None` if the enum contains an unknown value deserialized from
29843        /// the integer representation of enums.
29844        pub fn name(&self) -> std::option::Option<&str> {
29845            match self {
29846                Self::Unspecified => std::option::Option::Some("DATA_FORMAT_UNSPECIFIED"),
29847                Self::Instances => std::option::Option::Some("INSTANCES"),
29848                Self::Embeddings => std::option::Option::Some("EMBEDDINGS"),
29849                Self::UnknownValue(u) => u.0.name(),
29850            }
29851        }
29852    }
29853
29854    #[cfg(feature = "prediction-service")]
29855    impl std::default::Default for DataFormat {
29856        fn default() -> Self {
29857            use std::convert::From;
29858            Self::from(0)
29859        }
29860    }
29861
29862    #[cfg(feature = "prediction-service")]
29863    impl std::fmt::Display for DataFormat {
29864        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29865            wkt::internal::display_enum(f, self.name(), self.value())
29866        }
29867    }
29868
29869    #[cfg(feature = "prediction-service")]
29870    impl std::convert::From<i32> for DataFormat {
29871        fn from(value: i32) -> Self {
29872            match value {
29873                0 => Self::Unspecified,
29874                1 => Self::Instances,
29875                2 => Self::Embeddings,
29876                _ => Self::UnknownValue(data_format::UnknownValue(
29877                    wkt::internal::UnknownEnumValue::Integer(value),
29878                )),
29879            }
29880        }
29881    }
29882
29883    #[cfg(feature = "prediction-service")]
29884    impl std::convert::From<&str> for DataFormat {
29885        fn from(value: &str) -> Self {
29886            use std::string::ToString;
29887            match value {
29888                "DATA_FORMAT_UNSPECIFIED" => Self::Unspecified,
29889                "INSTANCES" => Self::Instances,
29890                "EMBEDDINGS" => Self::Embeddings,
29891                _ => Self::UnknownValue(data_format::UnknownValue(
29892                    wkt::internal::UnknownEnumValue::String(value.to_string()),
29893                )),
29894            }
29895        }
29896    }
29897
29898    #[cfg(feature = "prediction-service")]
29899    impl serde::ser::Serialize for DataFormat {
29900        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29901        where
29902            S: serde::Serializer,
29903        {
29904            match self {
29905                Self::Unspecified => serializer.serialize_i32(0),
29906                Self::Instances => serializer.serialize_i32(1),
29907                Self::Embeddings => serializer.serialize_i32(2),
29908                Self::UnknownValue(u) => u.0.serialize(serializer),
29909            }
29910        }
29911    }
29912
29913    #[cfg(feature = "prediction-service")]
29914    impl<'de> serde::de::Deserialize<'de> for DataFormat {
29915        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29916        where
29917            D: serde::Deserializer<'de>,
29918        {
29919            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataFormat>::new(
29920                ".google.cloud.aiplatform.v1.ExamplesOverride.DataFormat",
29921            ))
29922        }
29923    }
29924}
29925
29926/// Restrictions namespace for example-based explanations overrides.
29927#[cfg(feature = "prediction-service")]
29928#[derive(Clone, Default, PartialEq)]
29929#[non_exhaustive]
29930pub struct ExamplesRestrictionsNamespace {
29931    /// The namespace name.
29932    pub namespace_name: std::string::String,
29933
29934    /// The list of allowed tags.
29935    pub allow: std::vec::Vec<std::string::String>,
29936
29937    /// The list of deny tags.
29938    pub deny: std::vec::Vec<std::string::String>,
29939
29940    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29941}
29942
29943#[cfg(feature = "prediction-service")]
29944impl ExamplesRestrictionsNamespace {
29945    pub fn new() -> Self {
29946        std::default::Default::default()
29947    }
29948
29949    /// Sets the value of [namespace_name][crate::model::ExamplesRestrictionsNamespace::namespace_name].
29950    pub fn set_namespace_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29951        self.namespace_name = v.into();
29952        self
29953    }
29954
29955    /// Sets the value of [allow][crate::model::ExamplesRestrictionsNamespace::allow].
29956    pub fn set_allow<T, V>(mut self, v: T) -> Self
29957    where
29958        T: std::iter::IntoIterator<Item = V>,
29959        V: std::convert::Into<std::string::String>,
29960    {
29961        use std::iter::Iterator;
29962        self.allow = v.into_iter().map(|i| i.into()).collect();
29963        self
29964    }
29965
29966    /// Sets the value of [deny][crate::model::ExamplesRestrictionsNamespace::deny].
29967    pub fn set_deny<T, V>(mut self, v: T) -> Self
29968    where
29969        T: std::iter::IntoIterator<Item = V>,
29970        V: std::convert::Into<std::string::String>,
29971    {
29972        use std::iter::Iterator;
29973        self.deny = v.into_iter().map(|i| i.into()).collect();
29974        self
29975    }
29976}
29977
29978#[cfg(feature = "prediction-service")]
29979impl wkt::message::Message for ExamplesRestrictionsNamespace {
29980    fn typename() -> &'static str {
29981        "type.googleapis.com/google.cloud.aiplatform.v1.ExamplesRestrictionsNamespace"
29982    }
29983}
29984
29985/// Metadata describing the Model's input and output for explanation.
29986#[cfg(any(
29987    feature = "dataset-service",
29988    feature = "deployment-resource-pool-service",
29989    feature = "endpoint-service",
29990    feature = "job-service",
29991    feature = "model-service",
29992    feature = "pipeline-service",
29993))]
29994#[derive(Clone, Default, PartialEq)]
29995#[non_exhaustive]
29996pub struct ExplanationMetadata {
29997    /// Required. Map from feature names to feature input metadata. Keys are the
29998    /// name of the features. Values are the specification of the feature.
29999    ///
30000    /// An empty InputMetadata is valid. It describes a text feature which has the
30001    /// name specified as the key in
30002    /// [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
30003    /// The baseline of the empty feature is chosen by Vertex AI.
30004    ///
30005    /// For Vertex AI-provided Tensorflow images, the key can be any friendly
30006    /// name of the feature. Once specified,
30007    /// [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
30008    /// are keyed by this key (if not grouped with another feature).
30009    ///
30010    /// For custom images, the key must match with the key in
30011    /// [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
30012    ///
30013    /// [google.cloud.aiplatform.v1.Attribution.feature_attributions]: crate::model::Attribution::feature_attributions
30014    /// [google.cloud.aiplatform.v1.ExplainRequest.instances]: crate::model::ExplainRequest::instances
30015    /// [google.cloud.aiplatform.v1.ExplanationMetadata.inputs]: crate::model::ExplanationMetadata::inputs
30016    pub inputs: std::collections::HashMap<
30017        std::string::String,
30018        crate::model::explanation_metadata::InputMetadata,
30019    >,
30020
30021    /// Required. Map from output names to output metadata.
30022    ///
30023    /// For Vertex AI-provided Tensorflow images, keys can be any user defined
30024    /// string that consists of any UTF-8 characters.
30025    ///
30026    /// For custom images, keys are the name of the output field in the prediction
30027    /// to be explained.
30028    ///
30029    /// Currently only one key is allowed.
30030    pub outputs: std::collections::HashMap<
30031        std::string::String,
30032        crate::model::explanation_metadata::OutputMetadata,
30033    >,
30034
30035    /// Points to a YAML file stored on Google Cloud Storage describing the format
30036    /// of the [feature
30037    /// attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
30038    /// The schema is defined as an OpenAPI 3.0.2 [Schema
30039    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
30040    /// AutoML tabular Models always have this field populated by Vertex AI.
30041    /// Note: The URI given on output may be different, including the URI scheme,
30042    /// than the one given on input. The output URI will point to a location where
30043    /// the user only has a read access.
30044    ///
30045    /// [google.cloud.aiplatform.v1.Attribution.feature_attributions]: crate::model::Attribution::feature_attributions
30046    pub feature_attributions_schema_uri: std::string::String,
30047
30048    /// Name of the source to generate embeddings for example based explanations.
30049    pub latent_space_source: std::string::String,
30050
30051    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30052}
30053
30054#[cfg(any(
30055    feature = "dataset-service",
30056    feature = "deployment-resource-pool-service",
30057    feature = "endpoint-service",
30058    feature = "job-service",
30059    feature = "model-service",
30060    feature = "pipeline-service",
30061))]
30062impl ExplanationMetadata {
30063    pub fn new() -> Self {
30064        std::default::Default::default()
30065    }
30066
30067    /// Sets the value of [inputs][crate::model::ExplanationMetadata::inputs].
30068    pub fn set_inputs<T, K, V>(mut self, v: T) -> Self
30069    where
30070        T: std::iter::IntoIterator<Item = (K, V)>,
30071        K: std::convert::Into<std::string::String>,
30072        V: std::convert::Into<crate::model::explanation_metadata::InputMetadata>,
30073    {
30074        use std::iter::Iterator;
30075        self.inputs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
30076        self
30077    }
30078
30079    /// Sets the value of [outputs][crate::model::ExplanationMetadata::outputs].
30080    pub fn set_outputs<T, K, V>(mut self, v: T) -> Self
30081    where
30082        T: std::iter::IntoIterator<Item = (K, V)>,
30083        K: std::convert::Into<std::string::String>,
30084        V: std::convert::Into<crate::model::explanation_metadata::OutputMetadata>,
30085    {
30086        use std::iter::Iterator;
30087        self.outputs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
30088        self
30089    }
30090
30091    /// Sets the value of [feature_attributions_schema_uri][crate::model::ExplanationMetadata::feature_attributions_schema_uri].
30092    pub fn set_feature_attributions_schema_uri<T: std::convert::Into<std::string::String>>(
30093        mut self,
30094        v: T,
30095    ) -> Self {
30096        self.feature_attributions_schema_uri = v.into();
30097        self
30098    }
30099
30100    /// Sets the value of [latent_space_source][crate::model::ExplanationMetadata::latent_space_source].
30101    pub fn set_latent_space_source<T: std::convert::Into<std::string::String>>(
30102        mut self,
30103        v: T,
30104    ) -> Self {
30105        self.latent_space_source = v.into();
30106        self
30107    }
30108}
30109
30110#[cfg(any(
30111    feature = "dataset-service",
30112    feature = "deployment-resource-pool-service",
30113    feature = "endpoint-service",
30114    feature = "job-service",
30115    feature = "model-service",
30116    feature = "pipeline-service",
30117))]
30118impl wkt::message::Message for ExplanationMetadata {
30119    fn typename() -> &'static str {
30120        "type.googleapis.com/google.cloud.aiplatform.v1.ExplanationMetadata"
30121    }
30122}
30123
30124/// Defines additional types related to [ExplanationMetadata].
30125#[cfg(any(
30126    feature = "dataset-service",
30127    feature = "deployment-resource-pool-service",
30128    feature = "endpoint-service",
30129    feature = "job-service",
30130    feature = "model-service",
30131    feature = "pipeline-service",
30132))]
30133pub mod explanation_metadata {
30134    #[allow(unused_imports)]
30135    use super::*;
30136
30137    /// Metadata of the input of a feature.
30138    ///
30139    /// Fields other than
30140    /// [InputMetadata.input_baselines][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.input_baselines]
30141    /// are applicable only for Models that are using Vertex AI-provided images for
30142    /// Tensorflow.
30143    ///
30144    /// [google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.input_baselines]: crate::model::explanation_metadata::InputMetadata::input_baselines
30145    #[cfg(any(
30146        feature = "dataset-service",
30147        feature = "deployment-resource-pool-service",
30148        feature = "endpoint-service",
30149        feature = "job-service",
30150        feature = "model-service",
30151        feature = "pipeline-service",
30152    ))]
30153    #[derive(Clone, Default, PartialEq)]
30154    #[non_exhaustive]
30155    pub struct InputMetadata {
30156        /// Baseline inputs for this feature.
30157        ///
30158        /// If no baseline is specified, Vertex AI chooses the baseline for this
30159        /// feature. If multiple baselines are specified, Vertex AI returns the
30160        /// average attributions across them in
30161        /// [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions].
30162        ///
30163        /// For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape
30164        /// of each baseline must match the shape of the input tensor. If a scalar is
30165        /// provided, we broadcast to the same shape as the input tensor.
30166        ///
30167        /// For custom images, the element of the baselines must be in the same
30168        /// format as the feature's input in the
30169        /// [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. The
30170        /// schema of any single instance may be specified via Endpoint's
30171        /// DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
30172        /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
30173        /// [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
30174        ///
30175        /// [google.cloud.aiplatform.v1.Attribution.feature_attributions]: crate::model::Attribution::feature_attributions
30176        /// [google.cloud.aiplatform.v1.DeployedModel.model]: crate::model::DeployedModel::model
30177        /// [google.cloud.aiplatform.v1.ExplainRequest.instances]: crate::model::ExplainRequest::instances
30178        /// [google.cloud.aiplatform.v1.Model.predict_schemata]: crate::model::Model::predict_schemata
30179        /// [google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]: crate::model::PredictSchemata::instance_schema_uri
30180        pub input_baselines: std::vec::Vec<wkt::Value>,
30181
30182        /// Name of the input tensor for this feature. Required and is only
30183        /// applicable to Vertex AI-provided images for Tensorflow.
30184        pub input_tensor_name: std::string::String,
30185
30186        /// Defines how the feature is encoded into the input tensor. Defaults to
30187        /// IDENTITY.
30188        pub encoding: crate::model::explanation_metadata::input_metadata::Encoding,
30189
30190        /// Modality of the feature. Valid values are: numeric, image. Defaults to
30191        /// numeric.
30192        pub modality: std::string::String,
30193
30194        /// The domain details of the input feature value. Like min/max, original
30195        /// mean or standard deviation if normalized.
30196        pub feature_value_domain: std::option::Option<
30197            crate::model::explanation_metadata::input_metadata::FeatureValueDomain,
30198        >,
30199
30200        /// Specifies the index of the values of the input tensor.
30201        /// Required when the input tensor is a sparse representation. Refer to
30202        /// Tensorflow documentation for more details:
30203        /// <https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor>.
30204        pub indices_tensor_name: std::string::String,
30205
30206        /// Specifies the shape of the values of the input if the input is a sparse
30207        /// representation. Refer to Tensorflow documentation for more details:
30208        /// <https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor>.
30209        pub dense_shape_tensor_name: std::string::String,
30210
30211        /// A list of feature names for each index in the input tensor.
30212        /// Required when the input
30213        /// [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]
30214        /// is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
30215        ///
30216        /// [google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding]: crate::model::explanation_metadata::InputMetadata::encoding
30217        pub index_feature_mapping: std::vec::Vec<std::string::String>,
30218
30219        /// Encoded tensor is a transformation of the input tensor. Must be provided
30220        /// if choosing
30221        /// [Integrated Gradients
30222        /// attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]
30223        /// or [XRAI
30224        /// attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution]
30225        /// and the input tensor is not differentiable.
30226        ///
30227        /// An encoded tensor is generated if the input tensor is encoded by a lookup
30228        /// table.
30229        ///
30230        /// [google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]: crate::model::ExplanationParameters::method
30231        /// [google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution]: crate::model::ExplanationParameters::method
30232        pub encoded_tensor_name: std::string::String,
30233
30234        /// A list of baselines for the encoded tensor.
30235        ///
30236        /// The shape of each baseline should match the shape of the encoded tensor.
30237        /// If a scalar is provided, Vertex AI broadcasts to the same shape as the
30238        /// encoded tensor.
30239        pub encoded_baselines: std::vec::Vec<wkt::Value>,
30240
30241        /// Visualization configurations for image explanation.
30242        pub visualization:
30243            std::option::Option<crate::model::explanation_metadata::input_metadata::Visualization>,
30244
30245        /// Name of the group that the input belongs to. Features with the same group
30246        /// name will be treated as one feature when computing attributions. Features
30247        /// grouped together can have different shapes in value. If provided, there
30248        /// will be one single attribution generated in
30249        /// [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions],
30250        /// keyed by the group name.
30251        ///
30252        /// [google.cloud.aiplatform.v1.Attribution.feature_attributions]: crate::model::Attribution::feature_attributions
30253        pub group_name: std::string::String,
30254
30255        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30256    }
30257
30258    #[cfg(any(
30259        feature = "dataset-service",
30260        feature = "deployment-resource-pool-service",
30261        feature = "endpoint-service",
30262        feature = "job-service",
30263        feature = "model-service",
30264        feature = "pipeline-service",
30265    ))]
30266    impl InputMetadata {
30267        pub fn new() -> Self {
30268            std::default::Default::default()
30269        }
30270
30271        /// Sets the value of [input_baselines][crate::model::explanation_metadata::InputMetadata::input_baselines].
30272        pub fn set_input_baselines<T, V>(mut self, v: T) -> Self
30273        where
30274            T: std::iter::IntoIterator<Item = V>,
30275            V: std::convert::Into<wkt::Value>,
30276        {
30277            use std::iter::Iterator;
30278            self.input_baselines = v.into_iter().map(|i| i.into()).collect();
30279            self
30280        }
30281
30282        /// Sets the value of [input_tensor_name][crate::model::explanation_metadata::InputMetadata::input_tensor_name].
30283        pub fn set_input_tensor_name<T: std::convert::Into<std::string::String>>(
30284            mut self,
30285            v: T,
30286        ) -> Self {
30287            self.input_tensor_name = v.into();
30288            self
30289        }
30290
30291        /// Sets the value of [encoding][crate::model::explanation_metadata::InputMetadata::encoding].
30292        pub fn set_encoding<
30293            T: std::convert::Into<crate::model::explanation_metadata::input_metadata::Encoding>,
30294        >(
30295            mut self,
30296            v: T,
30297        ) -> Self {
30298            self.encoding = v.into();
30299            self
30300        }
30301
30302        /// Sets the value of [modality][crate::model::explanation_metadata::InputMetadata::modality].
30303        pub fn set_modality<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30304            self.modality = v.into();
30305            self
30306        }
30307
30308        /// Sets the value of [feature_value_domain][crate::model::explanation_metadata::InputMetadata::feature_value_domain].
30309        pub fn set_feature_value_domain<T>(mut self, v: T) -> Self
30310        where
30311            T: std::convert::Into<
30312                    crate::model::explanation_metadata::input_metadata::FeatureValueDomain,
30313                >,
30314        {
30315            self.feature_value_domain = std::option::Option::Some(v.into());
30316            self
30317        }
30318
30319        /// Sets or clears the value of [feature_value_domain][crate::model::explanation_metadata::InputMetadata::feature_value_domain].
30320        pub fn set_or_clear_feature_value_domain<T>(mut self, v: std::option::Option<T>) -> Self
30321        where
30322            T: std::convert::Into<
30323                    crate::model::explanation_metadata::input_metadata::FeatureValueDomain,
30324                >,
30325        {
30326            self.feature_value_domain = v.map(|x| x.into());
30327            self
30328        }
30329
30330        /// Sets the value of [indices_tensor_name][crate::model::explanation_metadata::InputMetadata::indices_tensor_name].
30331        pub fn set_indices_tensor_name<T: std::convert::Into<std::string::String>>(
30332            mut self,
30333            v: T,
30334        ) -> Self {
30335            self.indices_tensor_name = v.into();
30336            self
30337        }
30338
30339        /// Sets the value of [dense_shape_tensor_name][crate::model::explanation_metadata::InputMetadata::dense_shape_tensor_name].
30340        pub fn set_dense_shape_tensor_name<T: std::convert::Into<std::string::String>>(
30341            mut self,
30342            v: T,
30343        ) -> Self {
30344            self.dense_shape_tensor_name = v.into();
30345            self
30346        }
30347
30348        /// Sets the value of [index_feature_mapping][crate::model::explanation_metadata::InputMetadata::index_feature_mapping].
30349        pub fn set_index_feature_mapping<T, V>(mut self, v: T) -> Self
30350        where
30351            T: std::iter::IntoIterator<Item = V>,
30352            V: std::convert::Into<std::string::String>,
30353        {
30354            use std::iter::Iterator;
30355            self.index_feature_mapping = v.into_iter().map(|i| i.into()).collect();
30356            self
30357        }
30358
30359        /// Sets the value of [encoded_tensor_name][crate::model::explanation_metadata::InputMetadata::encoded_tensor_name].
30360        pub fn set_encoded_tensor_name<T: std::convert::Into<std::string::String>>(
30361            mut self,
30362            v: T,
30363        ) -> Self {
30364            self.encoded_tensor_name = v.into();
30365            self
30366        }
30367
30368        /// Sets the value of [encoded_baselines][crate::model::explanation_metadata::InputMetadata::encoded_baselines].
30369        pub fn set_encoded_baselines<T, V>(mut self, v: T) -> Self
30370        where
30371            T: std::iter::IntoIterator<Item = V>,
30372            V: std::convert::Into<wkt::Value>,
30373        {
30374            use std::iter::Iterator;
30375            self.encoded_baselines = v.into_iter().map(|i| i.into()).collect();
30376            self
30377        }
30378
30379        /// Sets the value of [visualization][crate::model::explanation_metadata::InputMetadata::visualization].
30380        pub fn set_visualization<T>(mut self, v: T) -> Self
30381        where
30382            T: std::convert::Into<
30383                    crate::model::explanation_metadata::input_metadata::Visualization,
30384                >,
30385        {
30386            self.visualization = std::option::Option::Some(v.into());
30387            self
30388        }
30389
30390        /// Sets or clears the value of [visualization][crate::model::explanation_metadata::InputMetadata::visualization].
30391        pub fn set_or_clear_visualization<T>(mut self, v: std::option::Option<T>) -> Self
30392        where
30393            T: std::convert::Into<
30394                    crate::model::explanation_metadata::input_metadata::Visualization,
30395                >,
30396        {
30397            self.visualization = v.map(|x| x.into());
30398            self
30399        }
30400
30401        /// Sets the value of [group_name][crate::model::explanation_metadata::InputMetadata::group_name].
30402        pub fn set_group_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30403            self.group_name = v.into();
30404            self
30405        }
30406    }
30407
30408    #[cfg(any(
30409        feature = "dataset-service",
30410        feature = "deployment-resource-pool-service",
30411        feature = "endpoint-service",
30412        feature = "job-service",
30413        feature = "model-service",
30414        feature = "pipeline-service",
30415    ))]
30416    impl wkt::message::Message for InputMetadata {
30417        fn typename() -> &'static str {
30418            "type.googleapis.com/google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata"
30419        }
30420    }
30421
30422    /// Defines additional types related to [InputMetadata].
30423    #[cfg(any(
30424        feature = "dataset-service",
30425        feature = "deployment-resource-pool-service",
30426        feature = "endpoint-service",
30427        feature = "job-service",
30428        feature = "model-service",
30429        feature = "pipeline-service",
30430    ))]
30431    pub mod input_metadata {
30432        #[allow(unused_imports)]
30433        use super::*;
30434
30435        /// Domain details of the input feature value. Provides numeric information
30436        /// about the feature, such as its range (min, max). If the feature has been
30437        /// pre-processed, for example with z-scoring, then it provides information
30438        /// about how to recover the original feature. For example, if the input
30439        /// feature is an image and it has been pre-processed to obtain 0-mean and
30440        /// stddev = 1 values, then original_mean, and original_stddev refer to the
30441        /// mean and stddev of the original feature (e.g. image tensor) from which
30442        /// input feature (with mean = 0 and stddev = 1) was obtained.
30443        #[cfg(any(
30444            feature = "dataset-service",
30445            feature = "deployment-resource-pool-service",
30446            feature = "endpoint-service",
30447            feature = "job-service",
30448            feature = "model-service",
30449            feature = "pipeline-service",
30450        ))]
30451        #[derive(Clone, Default, PartialEq)]
30452        #[non_exhaustive]
30453        pub struct FeatureValueDomain {
30454            /// The minimum permissible value for this feature.
30455            pub min_value: f32,
30456
30457            /// The maximum permissible value for this feature.
30458            pub max_value: f32,
30459
30460            /// If this input feature has been normalized to a mean value of 0,
30461            /// the original_mean specifies the mean value of the domain prior to
30462            /// normalization.
30463            pub original_mean: f32,
30464
30465            /// If this input feature has been normalized to a standard deviation of
30466            /// 1.0, the original_stddev specifies the standard deviation of the domain
30467            /// prior to normalization.
30468            pub original_stddev: f32,
30469
30470            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30471        }
30472
30473        #[cfg(any(
30474            feature = "dataset-service",
30475            feature = "deployment-resource-pool-service",
30476            feature = "endpoint-service",
30477            feature = "job-service",
30478            feature = "model-service",
30479            feature = "pipeline-service",
30480        ))]
30481        impl FeatureValueDomain {
30482            pub fn new() -> Self {
30483                std::default::Default::default()
30484            }
30485
30486            /// Sets the value of [min_value][crate::model::explanation_metadata::input_metadata::FeatureValueDomain::min_value].
30487            pub fn set_min_value<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
30488                self.min_value = v.into();
30489                self
30490            }
30491
30492            /// Sets the value of [max_value][crate::model::explanation_metadata::input_metadata::FeatureValueDomain::max_value].
30493            pub fn set_max_value<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
30494                self.max_value = v.into();
30495                self
30496            }
30497
30498            /// Sets the value of [original_mean][crate::model::explanation_metadata::input_metadata::FeatureValueDomain::original_mean].
30499            pub fn set_original_mean<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
30500                self.original_mean = v.into();
30501                self
30502            }
30503
30504            /// Sets the value of [original_stddev][crate::model::explanation_metadata::input_metadata::FeatureValueDomain::original_stddev].
30505            pub fn set_original_stddev<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
30506                self.original_stddev = v.into();
30507                self
30508            }
30509        }
30510
30511        #[cfg(any(
30512            feature = "dataset-service",
30513            feature = "deployment-resource-pool-service",
30514            feature = "endpoint-service",
30515            feature = "job-service",
30516            feature = "model-service",
30517            feature = "pipeline-service",
30518        ))]
30519        impl wkt::message::Message for FeatureValueDomain {
30520            fn typename() -> &'static str {
30521                "type.googleapis.com/google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.FeatureValueDomain"
30522            }
30523        }
30524
30525        /// Visualization configurations for image explanation.
30526        #[cfg(any(
30527            feature = "dataset-service",
30528            feature = "deployment-resource-pool-service",
30529            feature = "endpoint-service",
30530            feature = "job-service",
30531            feature = "model-service",
30532            feature = "pipeline-service",
30533        ))]
30534        #[derive(Clone, Default, PartialEq)]
30535        #[non_exhaustive]
30536        pub struct Visualization {
30537            /// Type of the image visualization. Only applicable to
30538            /// [Integrated Gradients
30539            /// attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
30540            /// OUTLINES shows regions of attribution, while PIXELS shows per-pixel
30541            /// attribution. Defaults to OUTLINES.
30542            ///
30543            /// [google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]: crate::model::ExplanationParameters::method
30544            pub r#type: crate::model::explanation_metadata::input_metadata::visualization::Type,
30545
30546            /// Whether to only highlight pixels with positive contributions, negative
30547            /// or both. Defaults to POSITIVE.
30548            pub polarity:
30549                crate::model::explanation_metadata::input_metadata::visualization::Polarity,
30550
30551            /// The color scheme used for the highlighted areas.
30552            ///
30553            /// Defaults to PINK_GREEN for
30554            /// [Integrated Gradients
30555            /// attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution],
30556            /// which shows positive attributions in green and negative in pink.
30557            ///
30558            /// Defaults to VIRIDIS for
30559            /// [XRAI
30560            /// attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution],
30561            /// which highlights the most influential regions in yellow and the least
30562            /// influential in blue.
30563            ///
30564            /// [google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]: crate::model::ExplanationParameters::method
30565            /// [google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution]: crate::model::ExplanationParameters::method
30566            pub color_map:
30567                crate::model::explanation_metadata::input_metadata::visualization::ColorMap,
30568
30569            /// Excludes attributions above the specified percentile from the
30570            /// highlighted areas. Using the clip_percent_upperbound and
30571            /// clip_percent_lowerbound together can be useful for filtering out noise
30572            /// and making it easier to see areas of strong attribution. Defaults to
30573            /// 99.9.
30574            pub clip_percent_upperbound: f32,
30575
30576            /// Excludes attributions below the specified percentile, from the
30577            /// highlighted areas. Defaults to 62.
30578            pub clip_percent_lowerbound: f32,
30579
30580            /// How the original image is displayed in the visualization.
30581            /// Adjusting the overlay can help increase visual clarity if the original
30582            /// image makes it difficult to view the visualization. Defaults to NONE.
30583            pub overlay_type:
30584                crate::model::explanation_metadata::input_metadata::visualization::OverlayType,
30585
30586            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30587        }
30588
30589        #[cfg(any(
30590            feature = "dataset-service",
30591            feature = "deployment-resource-pool-service",
30592            feature = "endpoint-service",
30593            feature = "job-service",
30594            feature = "model-service",
30595            feature = "pipeline-service",
30596        ))]
30597        impl Visualization {
30598            pub fn new() -> Self {
30599                std::default::Default::default()
30600            }
30601
30602            /// Sets the value of [r#type][crate::model::explanation_metadata::input_metadata::Visualization::type].
30603            pub fn set_type<
30604                T: std::convert::Into<
30605                        crate::model::explanation_metadata::input_metadata::visualization::Type,
30606                    >,
30607            >(
30608                mut self,
30609                v: T,
30610            ) -> Self {
30611                self.r#type = v.into();
30612                self
30613            }
30614
30615            /// Sets the value of [polarity][crate::model::explanation_metadata::input_metadata::Visualization::polarity].
30616            pub fn set_polarity<
30617                T: std::convert::Into<
30618                        crate::model::explanation_metadata::input_metadata::visualization::Polarity,
30619                    >,
30620            >(
30621                mut self,
30622                v: T,
30623            ) -> Self {
30624                self.polarity = v.into();
30625                self
30626            }
30627
30628            /// Sets the value of [color_map][crate::model::explanation_metadata::input_metadata::Visualization::color_map].
30629            pub fn set_color_map<
30630                T: std::convert::Into<
30631                        crate::model::explanation_metadata::input_metadata::visualization::ColorMap,
30632                    >,
30633            >(
30634                mut self,
30635                v: T,
30636            ) -> Self {
30637                self.color_map = v.into();
30638                self
30639            }
30640
30641            /// Sets the value of [clip_percent_upperbound][crate::model::explanation_metadata::input_metadata::Visualization::clip_percent_upperbound].
30642            pub fn set_clip_percent_upperbound<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
30643                self.clip_percent_upperbound = v.into();
30644                self
30645            }
30646
30647            /// Sets the value of [clip_percent_lowerbound][crate::model::explanation_metadata::input_metadata::Visualization::clip_percent_lowerbound].
30648            pub fn set_clip_percent_lowerbound<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
30649                self.clip_percent_lowerbound = v.into();
30650                self
30651            }
30652
30653            /// Sets the value of [overlay_type][crate::model::explanation_metadata::input_metadata::Visualization::overlay_type].
30654            pub fn set_overlay_type<T: std::convert::Into<crate::model::explanation_metadata::input_metadata::visualization::OverlayType>>(mut self, v: T) -> Self{
30655                self.overlay_type = v.into();
30656                self
30657            }
30658        }
30659
30660        #[cfg(any(
30661            feature = "dataset-service",
30662            feature = "deployment-resource-pool-service",
30663            feature = "endpoint-service",
30664            feature = "job-service",
30665            feature = "model-service",
30666            feature = "pipeline-service",
30667        ))]
30668        impl wkt::message::Message for Visualization {
30669            fn typename() -> &'static str {
30670                "type.googleapis.com/google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization"
30671            }
30672        }
30673
30674        /// Defines additional types related to [Visualization].
30675        #[cfg(any(
30676            feature = "dataset-service",
30677            feature = "deployment-resource-pool-service",
30678            feature = "endpoint-service",
30679            feature = "job-service",
30680            feature = "model-service",
30681            feature = "pipeline-service",
30682        ))]
30683        pub mod visualization {
30684            #[allow(unused_imports)]
30685            use super::*;
30686
30687            /// Type of the image visualization. Only applicable to
30688            /// [Integrated Gradients
30689            /// attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution].
30690            ///
30691            /// [google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]: crate::model::ExplanationParameters::method
30692            ///
30693            /// # Working with unknown values
30694            ///
30695            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30696            /// additional enum variants at any time. Adding new variants is not considered
30697            /// a breaking change. Applications should write their code in anticipation of:
30698            ///
30699            /// - New values appearing in future releases of the client library, **and**
30700            /// - New values received dynamically, without application changes.
30701            ///
30702            /// Please consult the [Working with enums] section in the user guide for some
30703            /// guidelines.
30704            ///
30705            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30706            #[cfg(any(
30707                feature = "dataset-service",
30708                feature = "deployment-resource-pool-service",
30709                feature = "endpoint-service",
30710                feature = "job-service",
30711                feature = "model-service",
30712                feature = "pipeline-service",
30713            ))]
30714            #[derive(Clone, Debug, PartialEq)]
30715            #[non_exhaustive]
30716            pub enum Type {
30717                /// Should not be used.
30718                Unspecified,
30719                /// Shows which pixel contributed to the image prediction.
30720                Pixels,
30721                /// Shows which region contributed to the image prediction by outlining
30722                /// the region.
30723                Outlines,
30724                /// If set, the enum was initialized with an unknown value.
30725                ///
30726                /// Applications can examine the value using [Type::value] or
30727                /// [Type::name].
30728                UnknownValue(r#type::UnknownValue),
30729            }
30730
30731            #[doc(hidden)]
30732            #[cfg(any(
30733                feature = "dataset-service",
30734                feature = "deployment-resource-pool-service",
30735                feature = "endpoint-service",
30736                feature = "job-service",
30737                feature = "model-service",
30738                feature = "pipeline-service",
30739            ))]
30740            pub mod r#type {
30741                #[allow(unused_imports)]
30742                use super::*;
30743                #[derive(Clone, Debug, PartialEq)]
30744                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30745            }
30746
30747            #[cfg(any(
30748                feature = "dataset-service",
30749                feature = "deployment-resource-pool-service",
30750                feature = "endpoint-service",
30751                feature = "job-service",
30752                feature = "model-service",
30753                feature = "pipeline-service",
30754            ))]
30755            impl Type {
30756                /// Gets the enum value.
30757                ///
30758                /// Returns `None` if the enum contains an unknown value deserialized from
30759                /// the string representation of enums.
30760                pub fn value(&self) -> std::option::Option<i32> {
30761                    match self {
30762                        Self::Unspecified => std::option::Option::Some(0),
30763                        Self::Pixels => std::option::Option::Some(1),
30764                        Self::Outlines => std::option::Option::Some(2),
30765                        Self::UnknownValue(u) => u.0.value(),
30766                    }
30767                }
30768
30769                /// Gets the enum value as a string.
30770                ///
30771                /// Returns `None` if the enum contains an unknown value deserialized from
30772                /// the integer representation of enums.
30773                pub fn name(&self) -> std::option::Option<&str> {
30774                    match self {
30775                        Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
30776                        Self::Pixels => std::option::Option::Some("PIXELS"),
30777                        Self::Outlines => std::option::Option::Some("OUTLINES"),
30778                        Self::UnknownValue(u) => u.0.name(),
30779                    }
30780                }
30781            }
30782
30783            #[cfg(any(
30784                feature = "dataset-service",
30785                feature = "deployment-resource-pool-service",
30786                feature = "endpoint-service",
30787                feature = "job-service",
30788                feature = "model-service",
30789                feature = "pipeline-service",
30790            ))]
30791            impl std::default::Default for Type {
30792                fn default() -> Self {
30793                    use std::convert::From;
30794                    Self::from(0)
30795                }
30796            }
30797
30798            #[cfg(any(
30799                feature = "dataset-service",
30800                feature = "deployment-resource-pool-service",
30801                feature = "endpoint-service",
30802                feature = "job-service",
30803                feature = "model-service",
30804                feature = "pipeline-service",
30805            ))]
30806            impl std::fmt::Display for Type {
30807                fn fmt(
30808                    &self,
30809                    f: &mut std::fmt::Formatter<'_>,
30810                ) -> std::result::Result<(), std::fmt::Error> {
30811                    wkt::internal::display_enum(f, self.name(), self.value())
30812                }
30813            }
30814
30815            #[cfg(any(
30816                feature = "dataset-service",
30817                feature = "deployment-resource-pool-service",
30818                feature = "endpoint-service",
30819                feature = "job-service",
30820                feature = "model-service",
30821                feature = "pipeline-service",
30822            ))]
30823            impl std::convert::From<i32> for Type {
30824                fn from(value: i32) -> Self {
30825                    match value {
30826                        0 => Self::Unspecified,
30827                        1 => Self::Pixels,
30828                        2 => Self::Outlines,
30829                        _ => Self::UnknownValue(r#type::UnknownValue(
30830                            wkt::internal::UnknownEnumValue::Integer(value),
30831                        )),
30832                    }
30833                }
30834            }
30835
30836            #[cfg(any(
30837                feature = "dataset-service",
30838                feature = "deployment-resource-pool-service",
30839                feature = "endpoint-service",
30840                feature = "job-service",
30841                feature = "model-service",
30842                feature = "pipeline-service",
30843            ))]
30844            impl std::convert::From<&str> for Type {
30845                fn from(value: &str) -> Self {
30846                    use std::string::ToString;
30847                    match value {
30848                        "TYPE_UNSPECIFIED" => Self::Unspecified,
30849                        "PIXELS" => Self::Pixels,
30850                        "OUTLINES" => Self::Outlines,
30851                        _ => Self::UnknownValue(r#type::UnknownValue(
30852                            wkt::internal::UnknownEnumValue::String(value.to_string()),
30853                        )),
30854                    }
30855                }
30856            }
30857
30858            #[cfg(any(
30859                feature = "dataset-service",
30860                feature = "deployment-resource-pool-service",
30861                feature = "endpoint-service",
30862                feature = "job-service",
30863                feature = "model-service",
30864                feature = "pipeline-service",
30865            ))]
30866            impl serde::ser::Serialize for Type {
30867                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30868                where
30869                    S: serde::Serializer,
30870                {
30871                    match self {
30872                        Self::Unspecified => serializer.serialize_i32(0),
30873                        Self::Pixels => serializer.serialize_i32(1),
30874                        Self::Outlines => serializer.serialize_i32(2),
30875                        Self::UnknownValue(u) => u.0.serialize(serializer),
30876                    }
30877                }
30878            }
30879
30880            #[cfg(any(
30881                feature = "dataset-service",
30882                feature = "deployment-resource-pool-service",
30883                feature = "endpoint-service",
30884                feature = "job-service",
30885                feature = "model-service",
30886                feature = "pipeline-service",
30887            ))]
30888            impl<'de> serde::de::Deserialize<'de> for Type {
30889                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30890                where
30891                    D: serde::Deserializer<'de>,
30892                {
30893                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
30894                        ".google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Type"))
30895                }
30896            }
30897
30898            /// Whether to only highlight pixels with positive contributions, negative
30899            /// or both. Defaults to POSITIVE.
30900            ///
30901            /// # Working with unknown values
30902            ///
30903            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
30904            /// additional enum variants at any time. Adding new variants is not considered
30905            /// a breaking change. Applications should write their code in anticipation of:
30906            ///
30907            /// - New values appearing in future releases of the client library, **and**
30908            /// - New values received dynamically, without application changes.
30909            ///
30910            /// Please consult the [Working with enums] section in the user guide for some
30911            /// guidelines.
30912            ///
30913            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
30914            #[cfg(any(
30915                feature = "dataset-service",
30916                feature = "deployment-resource-pool-service",
30917                feature = "endpoint-service",
30918                feature = "job-service",
30919                feature = "model-service",
30920                feature = "pipeline-service",
30921            ))]
30922            #[derive(Clone, Debug, PartialEq)]
30923            #[non_exhaustive]
30924            pub enum Polarity {
30925                /// Default value. This is the same as POSITIVE.
30926                Unspecified,
30927                /// Highlights the pixels/outlines that were most influential to the
30928                /// model's prediction.
30929                Positive,
30930                /// Setting polarity to negative highlights areas that does not lead to
30931                /// the models's current prediction.
30932                Negative,
30933                /// Shows both positive and negative attributions.
30934                Both,
30935                /// If set, the enum was initialized with an unknown value.
30936                ///
30937                /// Applications can examine the value using [Polarity::value] or
30938                /// [Polarity::name].
30939                UnknownValue(polarity::UnknownValue),
30940            }
30941
30942            #[doc(hidden)]
30943            #[cfg(any(
30944                feature = "dataset-service",
30945                feature = "deployment-resource-pool-service",
30946                feature = "endpoint-service",
30947                feature = "job-service",
30948                feature = "model-service",
30949                feature = "pipeline-service",
30950            ))]
30951            pub mod polarity {
30952                #[allow(unused_imports)]
30953                use super::*;
30954                #[derive(Clone, Debug, PartialEq)]
30955                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30956            }
30957
30958            #[cfg(any(
30959                feature = "dataset-service",
30960                feature = "deployment-resource-pool-service",
30961                feature = "endpoint-service",
30962                feature = "job-service",
30963                feature = "model-service",
30964                feature = "pipeline-service",
30965            ))]
30966            impl Polarity {
30967                /// Gets the enum value.
30968                ///
30969                /// Returns `None` if the enum contains an unknown value deserialized from
30970                /// the string representation of enums.
30971                pub fn value(&self) -> std::option::Option<i32> {
30972                    match self {
30973                        Self::Unspecified => std::option::Option::Some(0),
30974                        Self::Positive => std::option::Option::Some(1),
30975                        Self::Negative => std::option::Option::Some(2),
30976                        Self::Both => std::option::Option::Some(3),
30977                        Self::UnknownValue(u) => u.0.value(),
30978                    }
30979                }
30980
30981                /// Gets the enum value as a string.
30982                ///
30983                /// Returns `None` if the enum contains an unknown value deserialized from
30984                /// the integer representation of enums.
30985                pub fn name(&self) -> std::option::Option<&str> {
30986                    match self {
30987                        Self::Unspecified => std::option::Option::Some("POLARITY_UNSPECIFIED"),
30988                        Self::Positive => std::option::Option::Some("POSITIVE"),
30989                        Self::Negative => std::option::Option::Some("NEGATIVE"),
30990                        Self::Both => std::option::Option::Some("BOTH"),
30991                        Self::UnknownValue(u) => u.0.name(),
30992                    }
30993                }
30994            }
30995
30996            #[cfg(any(
30997                feature = "dataset-service",
30998                feature = "deployment-resource-pool-service",
30999                feature = "endpoint-service",
31000                feature = "job-service",
31001                feature = "model-service",
31002                feature = "pipeline-service",
31003            ))]
31004            impl std::default::Default for Polarity {
31005                fn default() -> Self {
31006                    use std::convert::From;
31007                    Self::from(0)
31008                }
31009            }
31010
31011            #[cfg(any(
31012                feature = "dataset-service",
31013                feature = "deployment-resource-pool-service",
31014                feature = "endpoint-service",
31015                feature = "job-service",
31016                feature = "model-service",
31017                feature = "pipeline-service",
31018            ))]
31019            impl std::fmt::Display for Polarity {
31020                fn fmt(
31021                    &self,
31022                    f: &mut std::fmt::Formatter<'_>,
31023                ) -> std::result::Result<(), std::fmt::Error> {
31024                    wkt::internal::display_enum(f, self.name(), self.value())
31025                }
31026            }
31027
31028            #[cfg(any(
31029                feature = "dataset-service",
31030                feature = "deployment-resource-pool-service",
31031                feature = "endpoint-service",
31032                feature = "job-service",
31033                feature = "model-service",
31034                feature = "pipeline-service",
31035            ))]
31036            impl std::convert::From<i32> for Polarity {
31037                fn from(value: i32) -> Self {
31038                    match value {
31039                        0 => Self::Unspecified,
31040                        1 => Self::Positive,
31041                        2 => Self::Negative,
31042                        3 => Self::Both,
31043                        _ => Self::UnknownValue(polarity::UnknownValue(
31044                            wkt::internal::UnknownEnumValue::Integer(value),
31045                        )),
31046                    }
31047                }
31048            }
31049
31050            #[cfg(any(
31051                feature = "dataset-service",
31052                feature = "deployment-resource-pool-service",
31053                feature = "endpoint-service",
31054                feature = "job-service",
31055                feature = "model-service",
31056                feature = "pipeline-service",
31057            ))]
31058            impl std::convert::From<&str> for Polarity {
31059                fn from(value: &str) -> Self {
31060                    use std::string::ToString;
31061                    match value {
31062                        "POLARITY_UNSPECIFIED" => Self::Unspecified,
31063                        "POSITIVE" => Self::Positive,
31064                        "NEGATIVE" => Self::Negative,
31065                        "BOTH" => Self::Both,
31066                        _ => Self::UnknownValue(polarity::UnknownValue(
31067                            wkt::internal::UnknownEnumValue::String(value.to_string()),
31068                        )),
31069                    }
31070                }
31071            }
31072
31073            #[cfg(any(
31074                feature = "dataset-service",
31075                feature = "deployment-resource-pool-service",
31076                feature = "endpoint-service",
31077                feature = "job-service",
31078                feature = "model-service",
31079                feature = "pipeline-service",
31080            ))]
31081            impl serde::ser::Serialize for Polarity {
31082                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31083                where
31084                    S: serde::Serializer,
31085                {
31086                    match self {
31087                        Self::Unspecified => serializer.serialize_i32(0),
31088                        Self::Positive => serializer.serialize_i32(1),
31089                        Self::Negative => serializer.serialize_i32(2),
31090                        Self::Both => serializer.serialize_i32(3),
31091                        Self::UnknownValue(u) => u.0.serialize(serializer),
31092                    }
31093                }
31094            }
31095
31096            #[cfg(any(
31097                feature = "dataset-service",
31098                feature = "deployment-resource-pool-service",
31099                feature = "endpoint-service",
31100                feature = "job-service",
31101                feature = "model-service",
31102                feature = "pipeline-service",
31103            ))]
31104            impl<'de> serde::de::Deserialize<'de> for Polarity {
31105                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31106                where
31107                    D: serde::Deserializer<'de>,
31108                {
31109                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<Polarity>::new(
31110                        ".google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.Polarity"))
31111                }
31112            }
31113
31114            /// The color scheme used for highlighting areas.
31115            ///
31116            /// # Working with unknown values
31117            ///
31118            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
31119            /// additional enum variants at any time. Adding new variants is not considered
31120            /// a breaking change. Applications should write their code in anticipation of:
31121            ///
31122            /// - New values appearing in future releases of the client library, **and**
31123            /// - New values received dynamically, without application changes.
31124            ///
31125            /// Please consult the [Working with enums] section in the user guide for some
31126            /// guidelines.
31127            ///
31128            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
31129            #[cfg(any(
31130                feature = "dataset-service",
31131                feature = "deployment-resource-pool-service",
31132                feature = "endpoint-service",
31133                feature = "job-service",
31134                feature = "model-service",
31135                feature = "pipeline-service",
31136            ))]
31137            #[derive(Clone, Debug, PartialEq)]
31138            #[non_exhaustive]
31139            pub enum ColorMap {
31140                /// Should not be used.
31141                Unspecified,
31142                /// Positive: green. Negative: pink.
31143                PinkGreen,
31144                /// Viridis color map: A perceptually uniform color mapping which is
31145                /// easier to see by those with colorblindness and progresses from yellow
31146                /// to green to blue. Positive: yellow. Negative: blue.
31147                Viridis,
31148                /// Positive: red. Negative: red.
31149                Red,
31150                /// Positive: green. Negative: green.
31151                Green,
31152                /// Positive: green. Negative: red.
31153                RedGreen,
31154                /// PiYG palette.
31155                PinkWhiteGreen,
31156                /// If set, the enum was initialized with an unknown value.
31157                ///
31158                /// Applications can examine the value using [ColorMap::value] or
31159                /// [ColorMap::name].
31160                UnknownValue(color_map::UnknownValue),
31161            }
31162
31163            #[doc(hidden)]
31164            #[cfg(any(
31165                feature = "dataset-service",
31166                feature = "deployment-resource-pool-service",
31167                feature = "endpoint-service",
31168                feature = "job-service",
31169                feature = "model-service",
31170                feature = "pipeline-service",
31171            ))]
31172            pub mod color_map {
31173                #[allow(unused_imports)]
31174                use super::*;
31175                #[derive(Clone, Debug, PartialEq)]
31176                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31177            }
31178
31179            #[cfg(any(
31180                feature = "dataset-service",
31181                feature = "deployment-resource-pool-service",
31182                feature = "endpoint-service",
31183                feature = "job-service",
31184                feature = "model-service",
31185                feature = "pipeline-service",
31186            ))]
31187            impl ColorMap {
31188                /// Gets the enum value.
31189                ///
31190                /// Returns `None` if the enum contains an unknown value deserialized from
31191                /// the string representation of enums.
31192                pub fn value(&self) -> std::option::Option<i32> {
31193                    match self {
31194                        Self::Unspecified => std::option::Option::Some(0),
31195                        Self::PinkGreen => std::option::Option::Some(1),
31196                        Self::Viridis => std::option::Option::Some(2),
31197                        Self::Red => std::option::Option::Some(3),
31198                        Self::Green => std::option::Option::Some(4),
31199                        Self::RedGreen => std::option::Option::Some(6),
31200                        Self::PinkWhiteGreen => std::option::Option::Some(5),
31201                        Self::UnknownValue(u) => u.0.value(),
31202                    }
31203                }
31204
31205                /// Gets the enum value as a string.
31206                ///
31207                /// Returns `None` if the enum contains an unknown value deserialized from
31208                /// the integer representation of enums.
31209                pub fn name(&self) -> std::option::Option<&str> {
31210                    match self {
31211                        Self::Unspecified => std::option::Option::Some("COLOR_MAP_UNSPECIFIED"),
31212                        Self::PinkGreen => std::option::Option::Some("PINK_GREEN"),
31213                        Self::Viridis => std::option::Option::Some("VIRIDIS"),
31214                        Self::Red => std::option::Option::Some("RED"),
31215                        Self::Green => std::option::Option::Some("GREEN"),
31216                        Self::RedGreen => std::option::Option::Some("RED_GREEN"),
31217                        Self::PinkWhiteGreen => std::option::Option::Some("PINK_WHITE_GREEN"),
31218                        Self::UnknownValue(u) => u.0.name(),
31219                    }
31220                }
31221            }
31222
31223            #[cfg(any(
31224                feature = "dataset-service",
31225                feature = "deployment-resource-pool-service",
31226                feature = "endpoint-service",
31227                feature = "job-service",
31228                feature = "model-service",
31229                feature = "pipeline-service",
31230            ))]
31231            impl std::default::Default for ColorMap {
31232                fn default() -> Self {
31233                    use std::convert::From;
31234                    Self::from(0)
31235                }
31236            }
31237
31238            #[cfg(any(
31239                feature = "dataset-service",
31240                feature = "deployment-resource-pool-service",
31241                feature = "endpoint-service",
31242                feature = "job-service",
31243                feature = "model-service",
31244                feature = "pipeline-service",
31245            ))]
31246            impl std::fmt::Display for ColorMap {
31247                fn fmt(
31248                    &self,
31249                    f: &mut std::fmt::Formatter<'_>,
31250                ) -> std::result::Result<(), std::fmt::Error> {
31251                    wkt::internal::display_enum(f, self.name(), self.value())
31252                }
31253            }
31254
31255            #[cfg(any(
31256                feature = "dataset-service",
31257                feature = "deployment-resource-pool-service",
31258                feature = "endpoint-service",
31259                feature = "job-service",
31260                feature = "model-service",
31261                feature = "pipeline-service",
31262            ))]
31263            impl std::convert::From<i32> for ColorMap {
31264                fn from(value: i32) -> Self {
31265                    match value {
31266                        0 => Self::Unspecified,
31267                        1 => Self::PinkGreen,
31268                        2 => Self::Viridis,
31269                        3 => Self::Red,
31270                        4 => Self::Green,
31271                        5 => Self::PinkWhiteGreen,
31272                        6 => Self::RedGreen,
31273                        _ => Self::UnknownValue(color_map::UnknownValue(
31274                            wkt::internal::UnknownEnumValue::Integer(value),
31275                        )),
31276                    }
31277                }
31278            }
31279
31280            #[cfg(any(
31281                feature = "dataset-service",
31282                feature = "deployment-resource-pool-service",
31283                feature = "endpoint-service",
31284                feature = "job-service",
31285                feature = "model-service",
31286                feature = "pipeline-service",
31287            ))]
31288            impl std::convert::From<&str> for ColorMap {
31289                fn from(value: &str) -> Self {
31290                    use std::string::ToString;
31291                    match value {
31292                        "COLOR_MAP_UNSPECIFIED" => Self::Unspecified,
31293                        "PINK_GREEN" => Self::PinkGreen,
31294                        "VIRIDIS" => Self::Viridis,
31295                        "RED" => Self::Red,
31296                        "GREEN" => Self::Green,
31297                        "RED_GREEN" => Self::RedGreen,
31298                        "PINK_WHITE_GREEN" => Self::PinkWhiteGreen,
31299                        _ => Self::UnknownValue(color_map::UnknownValue(
31300                            wkt::internal::UnknownEnumValue::String(value.to_string()),
31301                        )),
31302                    }
31303                }
31304            }
31305
31306            #[cfg(any(
31307                feature = "dataset-service",
31308                feature = "deployment-resource-pool-service",
31309                feature = "endpoint-service",
31310                feature = "job-service",
31311                feature = "model-service",
31312                feature = "pipeline-service",
31313            ))]
31314            impl serde::ser::Serialize for ColorMap {
31315                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31316                where
31317                    S: serde::Serializer,
31318                {
31319                    match self {
31320                        Self::Unspecified => serializer.serialize_i32(0),
31321                        Self::PinkGreen => serializer.serialize_i32(1),
31322                        Self::Viridis => serializer.serialize_i32(2),
31323                        Self::Red => serializer.serialize_i32(3),
31324                        Self::Green => serializer.serialize_i32(4),
31325                        Self::RedGreen => serializer.serialize_i32(6),
31326                        Self::PinkWhiteGreen => serializer.serialize_i32(5),
31327                        Self::UnknownValue(u) => u.0.serialize(serializer),
31328                    }
31329                }
31330            }
31331
31332            #[cfg(any(
31333                feature = "dataset-service",
31334                feature = "deployment-resource-pool-service",
31335                feature = "endpoint-service",
31336                feature = "job-service",
31337                feature = "model-service",
31338                feature = "pipeline-service",
31339            ))]
31340            impl<'de> serde::de::Deserialize<'de> for ColorMap {
31341                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31342                where
31343                    D: serde::Deserializer<'de>,
31344                {
31345                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<ColorMap>::new(
31346                        ".google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.ColorMap"))
31347                }
31348            }
31349
31350            /// How the original image is displayed in the visualization.
31351            ///
31352            /// # Working with unknown values
31353            ///
31354            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
31355            /// additional enum variants at any time. Adding new variants is not considered
31356            /// a breaking change. Applications should write their code in anticipation of:
31357            ///
31358            /// - New values appearing in future releases of the client library, **and**
31359            /// - New values received dynamically, without application changes.
31360            ///
31361            /// Please consult the [Working with enums] section in the user guide for some
31362            /// guidelines.
31363            ///
31364            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
31365            #[cfg(any(
31366                feature = "dataset-service",
31367                feature = "deployment-resource-pool-service",
31368                feature = "endpoint-service",
31369                feature = "job-service",
31370                feature = "model-service",
31371                feature = "pipeline-service",
31372            ))]
31373            #[derive(Clone, Debug, PartialEq)]
31374            #[non_exhaustive]
31375            pub enum OverlayType {
31376                /// Default value. This is the same as NONE.
31377                Unspecified,
31378                /// No overlay.
31379                None,
31380                /// The attributions are shown on top of the original image.
31381                Original,
31382                /// The attributions are shown on top of grayscaled version of the
31383                /// original image.
31384                Grayscale,
31385                /// The attributions are used as a mask to reveal predictive parts of
31386                /// the image and hide the un-predictive parts.
31387                MaskBlack,
31388                /// If set, the enum was initialized with an unknown value.
31389                ///
31390                /// Applications can examine the value using [OverlayType::value] or
31391                /// [OverlayType::name].
31392                UnknownValue(overlay_type::UnknownValue),
31393            }
31394
31395            #[doc(hidden)]
31396            #[cfg(any(
31397                feature = "dataset-service",
31398                feature = "deployment-resource-pool-service",
31399                feature = "endpoint-service",
31400                feature = "job-service",
31401                feature = "model-service",
31402                feature = "pipeline-service",
31403            ))]
31404            pub mod overlay_type {
31405                #[allow(unused_imports)]
31406                use super::*;
31407                #[derive(Clone, Debug, PartialEq)]
31408                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31409            }
31410
31411            #[cfg(any(
31412                feature = "dataset-service",
31413                feature = "deployment-resource-pool-service",
31414                feature = "endpoint-service",
31415                feature = "job-service",
31416                feature = "model-service",
31417                feature = "pipeline-service",
31418            ))]
31419            impl OverlayType {
31420                /// Gets the enum value.
31421                ///
31422                /// Returns `None` if the enum contains an unknown value deserialized from
31423                /// the string representation of enums.
31424                pub fn value(&self) -> std::option::Option<i32> {
31425                    match self {
31426                        Self::Unspecified => std::option::Option::Some(0),
31427                        Self::None => std::option::Option::Some(1),
31428                        Self::Original => std::option::Option::Some(2),
31429                        Self::Grayscale => std::option::Option::Some(3),
31430                        Self::MaskBlack => std::option::Option::Some(4),
31431                        Self::UnknownValue(u) => u.0.value(),
31432                    }
31433                }
31434
31435                /// Gets the enum value as a string.
31436                ///
31437                /// Returns `None` if the enum contains an unknown value deserialized from
31438                /// the integer representation of enums.
31439                pub fn name(&self) -> std::option::Option<&str> {
31440                    match self {
31441                        Self::Unspecified => std::option::Option::Some("OVERLAY_TYPE_UNSPECIFIED"),
31442                        Self::None => std::option::Option::Some("NONE"),
31443                        Self::Original => std::option::Option::Some("ORIGINAL"),
31444                        Self::Grayscale => std::option::Option::Some("GRAYSCALE"),
31445                        Self::MaskBlack => std::option::Option::Some("MASK_BLACK"),
31446                        Self::UnknownValue(u) => u.0.name(),
31447                    }
31448                }
31449            }
31450
31451            #[cfg(any(
31452                feature = "dataset-service",
31453                feature = "deployment-resource-pool-service",
31454                feature = "endpoint-service",
31455                feature = "job-service",
31456                feature = "model-service",
31457                feature = "pipeline-service",
31458            ))]
31459            impl std::default::Default for OverlayType {
31460                fn default() -> Self {
31461                    use std::convert::From;
31462                    Self::from(0)
31463                }
31464            }
31465
31466            #[cfg(any(
31467                feature = "dataset-service",
31468                feature = "deployment-resource-pool-service",
31469                feature = "endpoint-service",
31470                feature = "job-service",
31471                feature = "model-service",
31472                feature = "pipeline-service",
31473            ))]
31474            impl std::fmt::Display for OverlayType {
31475                fn fmt(
31476                    &self,
31477                    f: &mut std::fmt::Formatter<'_>,
31478                ) -> std::result::Result<(), std::fmt::Error> {
31479                    wkt::internal::display_enum(f, self.name(), self.value())
31480                }
31481            }
31482
31483            #[cfg(any(
31484                feature = "dataset-service",
31485                feature = "deployment-resource-pool-service",
31486                feature = "endpoint-service",
31487                feature = "job-service",
31488                feature = "model-service",
31489                feature = "pipeline-service",
31490            ))]
31491            impl std::convert::From<i32> for OverlayType {
31492                fn from(value: i32) -> Self {
31493                    match value {
31494                        0 => Self::Unspecified,
31495                        1 => Self::None,
31496                        2 => Self::Original,
31497                        3 => Self::Grayscale,
31498                        4 => Self::MaskBlack,
31499                        _ => Self::UnknownValue(overlay_type::UnknownValue(
31500                            wkt::internal::UnknownEnumValue::Integer(value),
31501                        )),
31502                    }
31503                }
31504            }
31505
31506            #[cfg(any(
31507                feature = "dataset-service",
31508                feature = "deployment-resource-pool-service",
31509                feature = "endpoint-service",
31510                feature = "job-service",
31511                feature = "model-service",
31512                feature = "pipeline-service",
31513            ))]
31514            impl std::convert::From<&str> for OverlayType {
31515                fn from(value: &str) -> Self {
31516                    use std::string::ToString;
31517                    match value {
31518                        "OVERLAY_TYPE_UNSPECIFIED" => Self::Unspecified,
31519                        "NONE" => Self::None,
31520                        "ORIGINAL" => Self::Original,
31521                        "GRAYSCALE" => Self::Grayscale,
31522                        "MASK_BLACK" => Self::MaskBlack,
31523                        _ => Self::UnknownValue(overlay_type::UnknownValue(
31524                            wkt::internal::UnknownEnumValue::String(value.to_string()),
31525                        )),
31526                    }
31527                }
31528            }
31529
31530            #[cfg(any(
31531                feature = "dataset-service",
31532                feature = "deployment-resource-pool-service",
31533                feature = "endpoint-service",
31534                feature = "job-service",
31535                feature = "model-service",
31536                feature = "pipeline-service",
31537            ))]
31538            impl serde::ser::Serialize for OverlayType {
31539                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31540                where
31541                    S: serde::Serializer,
31542                {
31543                    match self {
31544                        Self::Unspecified => serializer.serialize_i32(0),
31545                        Self::None => serializer.serialize_i32(1),
31546                        Self::Original => serializer.serialize_i32(2),
31547                        Self::Grayscale => serializer.serialize_i32(3),
31548                        Self::MaskBlack => serializer.serialize_i32(4),
31549                        Self::UnknownValue(u) => u.0.serialize(serializer),
31550                    }
31551                }
31552            }
31553
31554            #[cfg(any(
31555                feature = "dataset-service",
31556                feature = "deployment-resource-pool-service",
31557                feature = "endpoint-service",
31558                feature = "job-service",
31559                feature = "model-service",
31560                feature = "pipeline-service",
31561            ))]
31562            impl<'de> serde::de::Deserialize<'de> for OverlayType {
31563                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31564                where
31565                    D: serde::Deserializer<'de>,
31566                {
31567                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<OverlayType>::new(
31568                        ".google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType"))
31569                }
31570            }
31571        }
31572
31573        /// Defines how a feature is encoded. Defaults to IDENTITY.
31574        ///
31575        /// # Working with unknown values
31576        ///
31577        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
31578        /// additional enum variants at any time. Adding new variants is not considered
31579        /// a breaking change. Applications should write their code in anticipation of:
31580        ///
31581        /// - New values appearing in future releases of the client library, **and**
31582        /// - New values received dynamically, without application changes.
31583        ///
31584        /// Please consult the [Working with enums] section in the user guide for some
31585        /// guidelines.
31586        ///
31587        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
31588        #[cfg(any(
31589            feature = "dataset-service",
31590            feature = "deployment-resource-pool-service",
31591            feature = "endpoint-service",
31592            feature = "job-service",
31593            feature = "model-service",
31594            feature = "pipeline-service",
31595        ))]
31596        #[derive(Clone, Debug, PartialEq)]
31597        #[non_exhaustive]
31598        pub enum Encoding {
31599            /// Default value. This is the same as IDENTITY.
31600            Unspecified,
31601            /// The tensor represents one feature.
31602            Identity,
31603            /// The tensor represents a bag of features where each index maps to
31604            /// a feature.
31605            /// [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping]
31606            /// must be provided for this encoding. For example:
31607            ///
31608            /// ```norust
31609            /// input = [27, 6.0, 150]
31610            /// index_feature_mapping = ["age", "height", "weight"]
31611            /// ```
31612            ///
31613            /// [google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping]: crate::model::explanation_metadata::InputMetadata::index_feature_mapping
31614            BagOfFeatures,
31615            /// The tensor represents a bag of features where each index maps to a
31616            /// feature. Zero values in the tensor indicates feature being
31617            /// non-existent.
31618            /// [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping]
31619            /// must be provided for this encoding. For example:
31620            ///
31621            /// ```norust
31622            /// input = [2, 0, 5, 0, 1]
31623            /// index_feature_mapping = ["a", "b", "c", "d", "e"]
31624            /// ```
31625            ///
31626            /// [google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping]: crate::model::explanation_metadata::InputMetadata::index_feature_mapping
31627            BagOfFeaturesSparse,
31628            /// The tensor is a list of binaries representing whether a feature exists
31629            /// or not (1 indicates existence).
31630            /// [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping]
31631            /// must be provided for this encoding. For example:
31632            ///
31633            /// ```norust
31634            /// input = [1, 0, 1, 0, 1]
31635            /// index_feature_mapping = ["a", "b", "c", "d", "e"]
31636            /// ```
31637            ///
31638            /// [google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping]: crate::model::explanation_metadata::InputMetadata::index_feature_mapping
31639            Indicator,
31640            /// The tensor is encoded into a 1-dimensional array represented by an
31641            /// encoded tensor.
31642            /// [InputMetadata.encoded_tensor_name][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoded_tensor_name]
31643            /// must be provided for this encoding. For example:
31644            ///
31645            /// ```norust
31646            /// input = ["This", "is", "a", "test", "."]
31647            /// encoded = [0.1, 0.2, 0.3, 0.4, 0.5]
31648            /// ```
31649            ///
31650            /// [google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoded_tensor_name]: crate::model::explanation_metadata::InputMetadata::encoded_tensor_name
31651            CombinedEmbedding,
31652            /// Select this encoding when the input tensor is encoded into a
31653            /// 2-dimensional array represented by an encoded tensor.
31654            /// [InputMetadata.encoded_tensor_name][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoded_tensor_name]
31655            /// must be provided for this encoding. The first dimension of the encoded
31656            /// tensor's shape is the same as the input tensor's shape. For example:
31657            ///
31658            /// ```norust
31659            /// input = ["This", "is", "a", "test", "."]
31660            /// encoded = [[0.1, 0.2, 0.3, 0.4, 0.5],
31661            ///            [0.2, 0.1, 0.4, 0.3, 0.5],
31662            ///            [0.5, 0.1, 0.3, 0.5, 0.4],
31663            ///            [0.5, 0.3, 0.1, 0.2, 0.4],
31664            ///            [0.4, 0.3, 0.2, 0.5, 0.1]]
31665            /// ```
31666            ///
31667            /// [google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoded_tensor_name]: crate::model::explanation_metadata::InputMetadata::encoded_tensor_name
31668            ConcatEmbedding,
31669            /// If set, the enum was initialized with an unknown value.
31670            ///
31671            /// Applications can examine the value using [Encoding::value] or
31672            /// [Encoding::name].
31673            UnknownValue(encoding::UnknownValue),
31674        }
31675
31676        #[doc(hidden)]
31677        #[cfg(any(
31678            feature = "dataset-service",
31679            feature = "deployment-resource-pool-service",
31680            feature = "endpoint-service",
31681            feature = "job-service",
31682            feature = "model-service",
31683            feature = "pipeline-service",
31684        ))]
31685        pub mod encoding {
31686            #[allow(unused_imports)]
31687            use super::*;
31688            #[derive(Clone, Debug, PartialEq)]
31689            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31690        }
31691
31692        #[cfg(any(
31693            feature = "dataset-service",
31694            feature = "deployment-resource-pool-service",
31695            feature = "endpoint-service",
31696            feature = "job-service",
31697            feature = "model-service",
31698            feature = "pipeline-service",
31699        ))]
31700        impl Encoding {
31701            /// Gets the enum value.
31702            ///
31703            /// Returns `None` if the enum contains an unknown value deserialized from
31704            /// the string representation of enums.
31705            pub fn value(&self) -> std::option::Option<i32> {
31706                match self {
31707                    Self::Unspecified => std::option::Option::Some(0),
31708                    Self::Identity => std::option::Option::Some(1),
31709                    Self::BagOfFeatures => std::option::Option::Some(2),
31710                    Self::BagOfFeaturesSparse => std::option::Option::Some(3),
31711                    Self::Indicator => std::option::Option::Some(4),
31712                    Self::CombinedEmbedding => std::option::Option::Some(5),
31713                    Self::ConcatEmbedding => std::option::Option::Some(6),
31714                    Self::UnknownValue(u) => u.0.value(),
31715                }
31716            }
31717
31718            /// Gets the enum value as a string.
31719            ///
31720            /// Returns `None` if the enum contains an unknown value deserialized from
31721            /// the integer representation of enums.
31722            pub fn name(&self) -> std::option::Option<&str> {
31723                match self {
31724                    Self::Unspecified => std::option::Option::Some("ENCODING_UNSPECIFIED"),
31725                    Self::Identity => std::option::Option::Some("IDENTITY"),
31726                    Self::BagOfFeatures => std::option::Option::Some("BAG_OF_FEATURES"),
31727                    Self::BagOfFeaturesSparse => {
31728                        std::option::Option::Some("BAG_OF_FEATURES_SPARSE")
31729                    }
31730                    Self::Indicator => std::option::Option::Some("INDICATOR"),
31731                    Self::CombinedEmbedding => std::option::Option::Some("COMBINED_EMBEDDING"),
31732                    Self::ConcatEmbedding => std::option::Option::Some("CONCAT_EMBEDDING"),
31733                    Self::UnknownValue(u) => u.0.name(),
31734                }
31735            }
31736        }
31737
31738        #[cfg(any(
31739            feature = "dataset-service",
31740            feature = "deployment-resource-pool-service",
31741            feature = "endpoint-service",
31742            feature = "job-service",
31743            feature = "model-service",
31744            feature = "pipeline-service",
31745        ))]
31746        impl std::default::Default for Encoding {
31747            fn default() -> Self {
31748                use std::convert::From;
31749                Self::from(0)
31750            }
31751        }
31752
31753        #[cfg(any(
31754            feature = "dataset-service",
31755            feature = "deployment-resource-pool-service",
31756            feature = "endpoint-service",
31757            feature = "job-service",
31758            feature = "model-service",
31759            feature = "pipeline-service",
31760        ))]
31761        impl std::fmt::Display for Encoding {
31762            fn fmt(
31763                &self,
31764                f: &mut std::fmt::Formatter<'_>,
31765            ) -> std::result::Result<(), std::fmt::Error> {
31766                wkt::internal::display_enum(f, self.name(), self.value())
31767            }
31768        }
31769
31770        #[cfg(any(
31771            feature = "dataset-service",
31772            feature = "deployment-resource-pool-service",
31773            feature = "endpoint-service",
31774            feature = "job-service",
31775            feature = "model-service",
31776            feature = "pipeline-service",
31777        ))]
31778        impl std::convert::From<i32> for Encoding {
31779            fn from(value: i32) -> Self {
31780                match value {
31781                    0 => Self::Unspecified,
31782                    1 => Self::Identity,
31783                    2 => Self::BagOfFeatures,
31784                    3 => Self::BagOfFeaturesSparse,
31785                    4 => Self::Indicator,
31786                    5 => Self::CombinedEmbedding,
31787                    6 => Self::ConcatEmbedding,
31788                    _ => Self::UnknownValue(encoding::UnknownValue(
31789                        wkt::internal::UnknownEnumValue::Integer(value),
31790                    )),
31791                }
31792            }
31793        }
31794
31795        #[cfg(any(
31796            feature = "dataset-service",
31797            feature = "deployment-resource-pool-service",
31798            feature = "endpoint-service",
31799            feature = "job-service",
31800            feature = "model-service",
31801            feature = "pipeline-service",
31802        ))]
31803        impl std::convert::From<&str> for Encoding {
31804            fn from(value: &str) -> Self {
31805                use std::string::ToString;
31806                match value {
31807                    "ENCODING_UNSPECIFIED" => Self::Unspecified,
31808                    "IDENTITY" => Self::Identity,
31809                    "BAG_OF_FEATURES" => Self::BagOfFeatures,
31810                    "BAG_OF_FEATURES_SPARSE" => Self::BagOfFeaturesSparse,
31811                    "INDICATOR" => Self::Indicator,
31812                    "COMBINED_EMBEDDING" => Self::CombinedEmbedding,
31813                    "CONCAT_EMBEDDING" => Self::ConcatEmbedding,
31814                    _ => Self::UnknownValue(encoding::UnknownValue(
31815                        wkt::internal::UnknownEnumValue::String(value.to_string()),
31816                    )),
31817                }
31818            }
31819        }
31820
31821        #[cfg(any(
31822            feature = "dataset-service",
31823            feature = "deployment-resource-pool-service",
31824            feature = "endpoint-service",
31825            feature = "job-service",
31826            feature = "model-service",
31827            feature = "pipeline-service",
31828        ))]
31829        impl serde::ser::Serialize for Encoding {
31830            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31831            where
31832                S: serde::Serializer,
31833            {
31834                match self {
31835                    Self::Unspecified => serializer.serialize_i32(0),
31836                    Self::Identity => serializer.serialize_i32(1),
31837                    Self::BagOfFeatures => serializer.serialize_i32(2),
31838                    Self::BagOfFeaturesSparse => serializer.serialize_i32(3),
31839                    Self::Indicator => serializer.serialize_i32(4),
31840                    Self::CombinedEmbedding => serializer.serialize_i32(5),
31841                    Self::ConcatEmbedding => serializer.serialize_i32(6),
31842                    Self::UnknownValue(u) => u.0.serialize(serializer),
31843                }
31844            }
31845        }
31846
31847        #[cfg(any(
31848            feature = "dataset-service",
31849            feature = "deployment-resource-pool-service",
31850            feature = "endpoint-service",
31851            feature = "job-service",
31852            feature = "model-service",
31853            feature = "pipeline-service",
31854        ))]
31855        impl<'de> serde::de::Deserialize<'de> for Encoding {
31856            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31857            where
31858                D: serde::Deserializer<'de>,
31859            {
31860                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Encoding>::new(
31861                    ".google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Encoding",
31862                ))
31863            }
31864        }
31865    }
31866
31867    /// Metadata of the prediction output to be explained.
31868    #[cfg(any(
31869        feature = "dataset-service",
31870        feature = "deployment-resource-pool-service",
31871        feature = "endpoint-service",
31872        feature = "job-service",
31873        feature = "model-service",
31874        feature = "pipeline-service",
31875    ))]
31876    #[derive(Clone, Default, PartialEq)]
31877    #[non_exhaustive]
31878    pub struct OutputMetadata {
31879        /// Name of the output tensor. Required and is only applicable to Vertex
31880        /// AI provided images for Tensorflow.
31881        pub output_tensor_name: std::string::String,
31882
31883        /// Defines how to map
31884        /// [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
31885        /// to
31886        /// [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name].
31887        ///
31888        /// If neither of the fields are specified,
31889        /// [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
31890        /// will not be populated.
31891        ///
31892        /// [google.cloud.aiplatform.v1.Attribution.output_display_name]: crate::model::Attribution::output_display_name
31893        /// [google.cloud.aiplatform.v1.Attribution.output_index]: crate::model::Attribution::output_index
31894        pub display_name_mapping: std::option::Option<
31895            crate::model::explanation_metadata::output_metadata::DisplayNameMapping,
31896        >,
31897
31898        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31899    }
31900
31901    #[cfg(any(
31902        feature = "dataset-service",
31903        feature = "deployment-resource-pool-service",
31904        feature = "endpoint-service",
31905        feature = "job-service",
31906        feature = "model-service",
31907        feature = "pipeline-service",
31908    ))]
31909    impl OutputMetadata {
31910        pub fn new() -> Self {
31911            std::default::Default::default()
31912        }
31913
31914        /// Sets the value of [output_tensor_name][crate::model::explanation_metadata::OutputMetadata::output_tensor_name].
31915        pub fn set_output_tensor_name<T: std::convert::Into<std::string::String>>(
31916            mut self,
31917            v: T,
31918        ) -> Self {
31919            self.output_tensor_name = v.into();
31920            self
31921        }
31922
31923        /// Sets the value of [display_name_mapping][crate::model::explanation_metadata::OutputMetadata::display_name_mapping].
31924        ///
31925        /// Note that all the setters affecting `display_name_mapping` are mutually
31926        /// exclusive.
31927        pub fn set_display_name_mapping<
31928            T: std::convert::Into<
31929                    std::option::Option<
31930                        crate::model::explanation_metadata::output_metadata::DisplayNameMapping,
31931                    >,
31932                >,
31933        >(
31934            mut self,
31935            v: T,
31936        ) -> Self {
31937            self.display_name_mapping = v.into();
31938            self
31939        }
31940
31941        /// The value of [display_name_mapping][crate::model::explanation_metadata::OutputMetadata::display_name_mapping]
31942        /// if it holds a `IndexDisplayNameMapping`, `None` if the field is not set or
31943        /// holds a different branch.
31944        pub fn index_display_name_mapping(
31945            &self,
31946        ) -> std::option::Option<&std::boxed::Box<wkt::Value>> {
31947            #[allow(unreachable_patterns)]
31948            self.display_name_mapping.as_ref().and_then(|v| match v {
31949                crate::model::explanation_metadata::output_metadata::DisplayNameMapping::IndexDisplayNameMapping(v) => std::option::Option::Some(v),
31950                _ => std::option::Option::None,
31951            })
31952        }
31953
31954        /// Sets the value of [display_name_mapping][crate::model::explanation_metadata::OutputMetadata::display_name_mapping]
31955        /// to hold a `IndexDisplayNameMapping`.
31956        ///
31957        /// Note that all the setters affecting `display_name_mapping` are
31958        /// mutually exclusive.
31959        pub fn set_index_display_name_mapping<
31960            T: std::convert::Into<std::boxed::Box<wkt::Value>>,
31961        >(
31962            mut self,
31963            v: T,
31964        ) -> Self {
31965            self.display_name_mapping = std::option::Option::Some(
31966                crate::model::explanation_metadata::output_metadata::DisplayNameMapping::IndexDisplayNameMapping(
31967                    v.into()
31968                )
31969            );
31970            self
31971        }
31972
31973        /// The value of [display_name_mapping][crate::model::explanation_metadata::OutputMetadata::display_name_mapping]
31974        /// if it holds a `DisplayNameMappingKey`, `None` if the field is not set or
31975        /// holds a different branch.
31976        pub fn display_name_mapping_key(&self) -> std::option::Option<&std::string::String> {
31977            #[allow(unreachable_patterns)]
31978            self.display_name_mapping.as_ref().and_then(|v| match v {
31979                crate::model::explanation_metadata::output_metadata::DisplayNameMapping::DisplayNameMappingKey(v) => std::option::Option::Some(v),
31980                _ => std::option::Option::None,
31981            })
31982        }
31983
31984        /// Sets the value of [display_name_mapping][crate::model::explanation_metadata::OutputMetadata::display_name_mapping]
31985        /// to hold a `DisplayNameMappingKey`.
31986        ///
31987        /// Note that all the setters affecting `display_name_mapping` are
31988        /// mutually exclusive.
31989        pub fn set_display_name_mapping_key<T: std::convert::Into<std::string::String>>(
31990            mut self,
31991            v: T,
31992        ) -> Self {
31993            self.display_name_mapping = std::option::Option::Some(
31994                crate::model::explanation_metadata::output_metadata::DisplayNameMapping::DisplayNameMappingKey(
31995                    v.into()
31996                )
31997            );
31998            self
31999        }
32000    }
32001
32002    #[cfg(any(
32003        feature = "dataset-service",
32004        feature = "deployment-resource-pool-service",
32005        feature = "endpoint-service",
32006        feature = "job-service",
32007        feature = "model-service",
32008        feature = "pipeline-service",
32009    ))]
32010    impl wkt::message::Message for OutputMetadata {
32011        fn typename() -> &'static str {
32012            "type.googleapis.com/google.cloud.aiplatform.v1.ExplanationMetadata.OutputMetadata"
32013        }
32014    }
32015
32016    /// Defines additional types related to [OutputMetadata].
32017    #[cfg(any(
32018        feature = "dataset-service",
32019        feature = "deployment-resource-pool-service",
32020        feature = "endpoint-service",
32021        feature = "job-service",
32022        feature = "model-service",
32023        feature = "pipeline-service",
32024    ))]
32025    pub mod output_metadata {
32026        #[allow(unused_imports)]
32027        use super::*;
32028
32029        /// Defines how to map
32030        /// [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
32031        /// to
32032        /// [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name].
32033        ///
32034        /// If neither of the fields are specified,
32035        /// [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
32036        /// will not be populated.
32037        ///
32038        /// [google.cloud.aiplatform.v1.Attribution.output_display_name]: crate::model::Attribution::output_display_name
32039        /// [google.cloud.aiplatform.v1.Attribution.output_index]: crate::model::Attribution::output_index
32040        #[cfg(any(
32041            feature = "dataset-service",
32042            feature = "deployment-resource-pool-service",
32043            feature = "endpoint-service",
32044            feature = "job-service",
32045            feature = "model-service",
32046            feature = "pipeline-service",
32047        ))]
32048        #[derive(Clone, Debug, PartialEq)]
32049        #[non_exhaustive]
32050        pub enum DisplayNameMapping {
32051            /// Static mapping between the index and display name.
32052            ///
32053            /// Use this if the outputs are a deterministic n-dimensional array, e.g. a
32054            /// list of scores of all the classes in a pre-defined order for a
32055            /// multi-classification Model. It's not feasible if the outputs are
32056            /// non-deterministic, e.g. the Model produces top-k classes or sort the
32057            /// outputs by their values.
32058            ///
32059            /// The shape of the value must be an n-dimensional array of strings. The
32060            /// number of dimensions must match that of the outputs to be explained.
32061            /// The
32062            /// [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name]
32063            /// is populated by locating in the mapping with
32064            /// [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
32065            ///
32066            /// [google.cloud.aiplatform.v1.Attribution.output_display_name]: crate::model::Attribution::output_display_name
32067            /// [google.cloud.aiplatform.v1.Attribution.output_index]: crate::model::Attribution::output_index
32068            IndexDisplayNameMapping(std::boxed::Box<wkt::Value>),
32069            /// Specify a field name in the prediction to look for the display name.
32070            ///
32071            /// Use this if the prediction contains the display names for the outputs.
32072            ///
32073            /// The display names in the prediction must have the same shape of the
32074            /// outputs, so that it can be located by
32075            /// [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]
32076            /// for a specific output.
32077            ///
32078            /// [google.cloud.aiplatform.v1.Attribution.output_index]: crate::model::Attribution::output_index
32079            DisplayNameMappingKey(std::string::String),
32080        }
32081    }
32082}
32083
32084/// Feature Metadata information.
32085/// For example, color is a feature that describes an apple.
32086#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32087#[derive(Clone, Default, PartialEq)]
32088#[non_exhaustive]
32089pub struct Feature {
32090    /// Immutable. Name of the Feature.
32091    /// Format:
32092    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`
32093    /// `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`
32094    ///
32095    /// The last part feature is assigned by the client. The feature can be up to
32096    /// 64 characters long and can consist only of ASCII Latin letters A-Z and a-z,
32097    /// underscore(_), and ASCII digits 0-9 starting with a letter. The value will
32098    /// be unique given an entity type.
32099    pub name: std::string::String,
32100
32101    /// Description of the Feature.
32102    pub description: std::string::String,
32103
32104    /// Immutable. Only applicable for Vertex AI Feature Store (Legacy).
32105    /// Type of Feature value.
32106    pub value_type: crate::model::feature::ValueType,
32107
32108    /// Output only. Only applicable for Vertex AI Feature Store (Legacy).
32109    /// Timestamp when this EntityType was created.
32110    pub create_time: std::option::Option<wkt::Timestamp>,
32111
32112    /// Output only. Only applicable for Vertex AI Feature Store (Legacy).
32113    /// Timestamp when this EntityType was most recently updated.
32114    pub update_time: std::option::Option<wkt::Timestamp>,
32115
32116    /// Optional. The labels with user-defined metadata to organize your Features.
32117    ///
32118    /// Label keys and values can be no longer than 64 characters
32119    /// (Unicode codepoints), can only contain lowercase letters, numeric
32120    /// characters, underscores and dashes. International characters are allowed.
32121    ///
32122    /// See <https://goo.gl/xmQnxf> for more information on and examples of labels.
32123    /// No more than 64 user labels can be associated with one Feature (System
32124    /// labels are excluded)."
32125    /// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
32126    /// and are immutable.
32127    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
32128
32129    /// Used to perform a consistent read-modify-write updates. If not set, a blind
32130    /// "overwrite" update happens.
32131    pub etag: std::string::String,
32132
32133    /// Optional. Only applicable for Vertex AI Feature Store (Legacy).
32134    /// If not set, use the monitoring_config defined for the EntityType this
32135    /// Feature belongs to.
32136    /// Only Features with type
32137    /// ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) BOOL,
32138    /// STRING, DOUBLE or INT64 can enable monitoring.
32139    ///
32140    /// If set to true, all types of data monitoring are disabled despite the
32141    /// config on EntityType.
32142    ///
32143    /// [google.cloud.aiplatform.v1.Feature.ValueType]: crate::model::feature::ValueType
32144    pub disable_monitoring: bool,
32145
32146    /// Output only. Only applicable for Vertex AI Feature Store (Legacy).
32147    /// The list of historical stats and anomalies with specified objectives.
32148    pub monitoring_stats_anomalies: std::vec::Vec<crate::model::feature::MonitoringStatsAnomaly>,
32149
32150    /// Only applicable for Vertex AI Feature Store.
32151    /// The name of the BigQuery Table/View column hosting data for this version.
32152    /// If no value is provided, will use feature_id.
32153    pub version_column_name: std::string::String,
32154
32155    /// Entity responsible for maintaining this feature. Can be comma separated
32156    /// list of email addresses or URIs.
32157    pub point_of_contact: std::string::String,
32158
32159    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32160}
32161
32162#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32163impl Feature {
32164    pub fn new() -> Self {
32165        std::default::Default::default()
32166    }
32167
32168    /// Sets the value of [name][crate::model::Feature::name].
32169    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32170        self.name = v.into();
32171        self
32172    }
32173
32174    /// Sets the value of [description][crate::model::Feature::description].
32175    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32176        self.description = v.into();
32177        self
32178    }
32179
32180    /// Sets the value of [value_type][crate::model::Feature::value_type].
32181    pub fn set_value_type<T: std::convert::Into<crate::model::feature::ValueType>>(
32182        mut self,
32183        v: T,
32184    ) -> Self {
32185        self.value_type = v.into();
32186        self
32187    }
32188
32189    /// Sets the value of [create_time][crate::model::Feature::create_time].
32190    pub fn set_create_time<T>(mut self, v: T) -> Self
32191    where
32192        T: std::convert::Into<wkt::Timestamp>,
32193    {
32194        self.create_time = std::option::Option::Some(v.into());
32195        self
32196    }
32197
32198    /// Sets or clears the value of [create_time][crate::model::Feature::create_time].
32199    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
32200    where
32201        T: std::convert::Into<wkt::Timestamp>,
32202    {
32203        self.create_time = v.map(|x| x.into());
32204        self
32205    }
32206
32207    /// Sets the value of [update_time][crate::model::Feature::update_time].
32208    pub fn set_update_time<T>(mut self, v: T) -> Self
32209    where
32210        T: std::convert::Into<wkt::Timestamp>,
32211    {
32212        self.update_time = std::option::Option::Some(v.into());
32213        self
32214    }
32215
32216    /// Sets or clears the value of [update_time][crate::model::Feature::update_time].
32217    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
32218    where
32219        T: std::convert::Into<wkt::Timestamp>,
32220    {
32221        self.update_time = v.map(|x| x.into());
32222        self
32223    }
32224
32225    /// Sets the value of [labels][crate::model::Feature::labels].
32226    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
32227    where
32228        T: std::iter::IntoIterator<Item = (K, V)>,
32229        K: std::convert::Into<std::string::String>,
32230        V: std::convert::Into<std::string::String>,
32231    {
32232        use std::iter::Iterator;
32233        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
32234        self
32235    }
32236
32237    /// Sets the value of [etag][crate::model::Feature::etag].
32238    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32239        self.etag = v.into();
32240        self
32241    }
32242
32243    /// Sets the value of [disable_monitoring][crate::model::Feature::disable_monitoring].
32244    pub fn set_disable_monitoring<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32245        self.disable_monitoring = v.into();
32246        self
32247    }
32248
32249    /// Sets the value of [monitoring_stats_anomalies][crate::model::Feature::monitoring_stats_anomalies].
32250    pub fn set_monitoring_stats_anomalies<T, V>(mut self, v: T) -> Self
32251    where
32252        T: std::iter::IntoIterator<Item = V>,
32253        V: std::convert::Into<crate::model::feature::MonitoringStatsAnomaly>,
32254    {
32255        use std::iter::Iterator;
32256        self.monitoring_stats_anomalies = v.into_iter().map(|i| i.into()).collect();
32257        self
32258    }
32259
32260    /// Sets the value of [version_column_name][crate::model::Feature::version_column_name].
32261    pub fn set_version_column_name<T: std::convert::Into<std::string::String>>(
32262        mut self,
32263        v: T,
32264    ) -> Self {
32265        self.version_column_name = v.into();
32266        self
32267    }
32268
32269    /// Sets the value of [point_of_contact][crate::model::Feature::point_of_contact].
32270    pub fn set_point_of_contact<T: std::convert::Into<std::string::String>>(
32271        mut self,
32272        v: T,
32273    ) -> Self {
32274        self.point_of_contact = v.into();
32275        self
32276    }
32277}
32278
32279#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32280impl wkt::message::Message for Feature {
32281    fn typename() -> &'static str {
32282        "type.googleapis.com/google.cloud.aiplatform.v1.Feature"
32283    }
32284}
32285
32286/// Defines additional types related to [Feature].
32287#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32288pub mod feature {
32289    #[allow(unused_imports)]
32290    use super::*;
32291
32292    /// A list of historical
32293    /// [SnapshotAnalysis][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis]
32294    /// or
32295    /// [ImportFeaturesAnalysis][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.ImportFeaturesAnalysis]
32296    /// stats requested by user, sorted by
32297    /// [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1.FeatureStatsAnomaly.start_time]
32298    /// descending.
32299    ///
32300    /// [google.cloud.aiplatform.v1.FeatureStatsAnomaly.start_time]: crate::model::FeatureStatsAnomaly::start_time
32301    /// [google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.ImportFeaturesAnalysis]: crate::model::featurestore_monitoring_config::ImportFeaturesAnalysis
32302    /// [google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis]: crate::model::featurestore_monitoring_config::SnapshotAnalysis
32303    #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32304    #[derive(Clone, Default, PartialEq)]
32305    #[non_exhaustive]
32306    pub struct MonitoringStatsAnomaly {
32307        /// Output only. The objective for each stats.
32308        pub objective: crate::model::feature::monitoring_stats_anomaly::Objective,
32309
32310        /// Output only. The stats and anomalies generated at specific timestamp.
32311        pub feature_stats_anomaly: std::option::Option<crate::model::FeatureStatsAnomaly>,
32312
32313        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32314    }
32315
32316    #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32317    impl MonitoringStatsAnomaly {
32318        pub fn new() -> Self {
32319            std::default::Default::default()
32320        }
32321
32322        /// Sets the value of [objective][crate::model::feature::MonitoringStatsAnomaly::objective].
32323        pub fn set_objective<
32324            T: std::convert::Into<crate::model::feature::monitoring_stats_anomaly::Objective>,
32325        >(
32326            mut self,
32327            v: T,
32328        ) -> Self {
32329            self.objective = v.into();
32330            self
32331        }
32332
32333        /// Sets the value of [feature_stats_anomaly][crate::model::feature::MonitoringStatsAnomaly::feature_stats_anomaly].
32334        pub fn set_feature_stats_anomaly<T>(mut self, v: T) -> Self
32335        where
32336            T: std::convert::Into<crate::model::FeatureStatsAnomaly>,
32337        {
32338            self.feature_stats_anomaly = std::option::Option::Some(v.into());
32339            self
32340        }
32341
32342        /// Sets or clears the value of [feature_stats_anomaly][crate::model::feature::MonitoringStatsAnomaly::feature_stats_anomaly].
32343        pub fn set_or_clear_feature_stats_anomaly<T>(mut self, v: std::option::Option<T>) -> Self
32344        where
32345            T: std::convert::Into<crate::model::FeatureStatsAnomaly>,
32346        {
32347            self.feature_stats_anomaly = v.map(|x| x.into());
32348            self
32349        }
32350    }
32351
32352    #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32353    impl wkt::message::Message for MonitoringStatsAnomaly {
32354        fn typename() -> &'static str {
32355            "type.googleapis.com/google.cloud.aiplatform.v1.Feature.MonitoringStatsAnomaly"
32356        }
32357    }
32358
32359    /// Defines additional types related to [MonitoringStatsAnomaly].
32360    #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32361    pub mod monitoring_stats_anomaly {
32362        #[allow(unused_imports)]
32363        use super::*;
32364
32365        /// If the objective in the request is both
32366        /// Import Feature Analysis and Snapshot Analysis, this objective could be
32367        /// one of them. Otherwise, this objective should be the same as the
32368        /// objective in the request.
32369        ///
32370        /// # Working with unknown values
32371        ///
32372        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
32373        /// additional enum variants at any time. Adding new variants is not considered
32374        /// a breaking change. Applications should write their code in anticipation of:
32375        ///
32376        /// - New values appearing in future releases of the client library, **and**
32377        /// - New values received dynamically, without application changes.
32378        ///
32379        /// Please consult the [Working with enums] section in the user guide for some
32380        /// guidelines.
32381        ///
32382        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
32383        #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32384        #[derive(Clone, Debug, PartialEq)]
32385        #[non_exhaustive]
32386        pub enum Objective {
32387            /// If it's OBJECTIVE_UNSPECIFIED, monitoring_stats will be empty.
32388            Unspecified,
32389            /// Stats are generated by Import Feature Analysis.
32390            ImportFeatureAnalysis,
32391            /// Stats are generated by Snapshot Analysis.
32392            SnapshotAnalysis,
32393            /// If set, the enum was initialized with an unknown value.
32394            ///
32395            /// Applications can examine the value using [Objective::value] or
32396            /// [Objective::name].
32397            UnknownValue(objective::UnknownValue),
32398        }
32399
32400        #[doc(hidden)]
32401        #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32402        pub mod objective {
32403            #[allow(unused_imports)]
32404            use super::*;
32405            #[derive(Clone, Debug, PartialEq)]
32406            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
32407        }
32408
32409        #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32410        impl Objective {
32411            /// Gets the enum value.
32412            ///
32413            /// Returns `None` if the enum contains an unknown value deserialized from
32414            /// the string representation of enums.
32415            pub fn value(&self) -> std::option::Option<i32> {
32416                match self {
32417                    Self::Unspecified => std::option::Option::Some(0),
32418                    Self::ImportFeatureAnalysis => std::option::Option::Some(1),
32419                    Self::SnapshotAnalysis => std::option::Option::Some(2),
32420                    Self::UnknownValue(u) => u.0.value(),
32421                }
32422            }
32423
32424            /// Gets the enum value as a string.
32425            ///
32426            /// Returns `None` if the enum contains an unknown value deserialized from
32427            /// the integer representation of enums.
32428            pub fn name(&self) -> std::option::Option<&str> {
32429                match self {
32430                    Self::Unspecified => std::option::Option::Some("OBJECTIVE_UNSPECIFIED"),
32431                    Self::ImportFeatureAnalysis => {
32432                        std::option::Option::Some("IMPORT_FEATURE_ANALYSIS")
32433                    }
32434                    Self::SnapshotAnalysis => std::option::Option::Some("SNAPSHOT_ANALYSIS"),
32435                    Self::UnknownValue(u) => u.0.name(),
32436                }
32437            }
32438        }
32439
32440        #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32441        impl std::default::Default for Objective {
32442            fn default() -> Self {
32443                use std::convert::From;
32444                Self::from(0)
32445            }
32446        }
32447
32448        #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32449        impl std::fmt::Display for Objective {
32450            fn fmt(
32451                &self,
32452                f: &mut std::fmt::Formatter<'_>,
32453            ) -> std::result::Result<(), std::fmt::Error> {
32454                wkt::internal::display_enum(f, self.name(), self.value())
32455            }
32456        }
32457
32458        #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32459        impl std::convert::From<i32> for Objective {
32460            fn from(value: i32) -> Self {
32461                match value {
32462                    0 => Self::Unspecified,
32463                    1 => Self::ImportFeatureAnalysis,
32464                    2 => Self::SnapshotAnalysis,
32465                    _ => Self::UnknownValue(objective::UnknownValue(
32466                        wkt::internal::UnknownEnumValue::Integer(value),
32467                    )),
32468                }
32469            }
32470        }
32471
32472        #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32473        impl std::convert::From<&str> for Objective {
32474            fn from(value: &str) -> Self {
32475                use std::string::ToString;
32476                match value {
32477                    "OBJECTIVE_UNSPECIFIED" => Self::Unspecified,
32478                    "IMPORT_FEATURE_ANALYSIS" => Self::ImportFeatureAnalysis,
32479                    "SNAPSHOT_ANALYSIS" => Self::SnapshotAnalysis,
32480                    _ => Self::UnknownValue(objective::UnknownValue(
32481                        wkt::internal::UnknownEnumValue::String(value.to_string()),
32482                    )),
32483                }
32484            }
32485        }
32486
32487        #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32488        impl serde::ser::Serialize for Objective {
32489            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
32490            where
32491                S: serde::Serializer,
32492            {
32493                match self {
32494                    Self::Unspecified => serializer.serialize_i32(0),
32495                    Self::ImportFeatureAnalysis => serializer.serialize_i32(1),
32496                    Self::SnapshotAnalysis => serializer.serialize_i32(2),
32497                    Self::UnknownValue(u) => u.0.serialize(serializer),
32498                }
32499            }
32500        }
32501
32502        #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32503        impl<'de> serde::de::Deserialize<'de> for Objective {
32504            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
32505            where
32506                D: serde::Deserializer<'de>,
32507            {
32508                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Objective>::new(
32509                    ".google.cloud.aiplatform.v1.Feature.MonitoringStatsAnomaly.Objective",
32510                ))
32511            }
32512        }
32513    }
32514
32515    /// Only applicable for Vertex AI Legacy Feature Store.
32516    /// An enum representing the value type of a feature.
32517    ///
32518    /// # Working with unknown values
32519    ///
32520    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
32521    /// additional enum variants at any time. Adding new variants is not considered
32522    /// a breaking change. Applications should write their code in anticipation of:
32523    ///
32524    /// - New values appearing in future releases of the client library, **and**
32525    /// - New values received dynamically, without application changes.
32526    ///
32527    /// Please consult the [Working with enums] section in the user guide for some
32528    /// guidelines.
32529    ///
32530    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
32531    #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32532    #[derive(Clone, Debug, PartialEq)]
32533    #[non_exhaustive]
32534    pub enum ValueType {
32535        /// The value type is unspecified.
32536        Unspecified,
32537        /// Used for Feature that is a boolean.
32538        Bool,
32539        /// Used for Feature that is a list of boolean.
32540        BoolArray,
32541        /// Used for Feature that is double.
32542        Double,
32543        /// Used for Feature that is a list of double.
32544        DoubleArray,
32545        /// Used for Feature that is INT64.
32546        Int64,
32547        /// Used for Feature that is a list of INT64.
32548        Int64Array,
32549        /// Used for Feature that is string.
32550        String,
32551        /// Used for Feature that is a list of String.
32552        StringArray,
32553        /// Used for Feature that is bytes.
32554        Bytes,
32555        /// Used for Feature that is struct.
32556        Struct,
32557        /// If set, the enum was initialized with an unknown value.
32558        ///
32559        /// Applications can examine the value using [ValueType::value] or
32560        /// [ValueType::name].
32561        UnknownValue(value_type::UnknownValue),
32562    }
32563
32564    #[doc(hidden)]
32565    #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32566    pub mod value_type {
32567        #[allow(unused_imports)]
32568        use super::*;
32569        #[derive(Clone, Debug, PartialEq)]
32570        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
32571    }
32572
32573    #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32574    impl ValueType {
32575        /// Gets the enum value.
32576        ///
32577        /// Returns `None` if the enum contains an unknown value deserialized from
32578        /// the string representation of enums.
32579        pub fn value(&self) -> std::option::Option<i32> {
32580            match self {
32581                Self::Unspecified => std::option::Option::Some(0),
32582                Self::Bool => std::option::Option::Some(1),
32583                Self::BoolArray => std::option::Option::Some(2),
32584                Self::Double => std::option::Option::Some(3),
32585                Self::DoubleArray => std::option::Option::Some(4),
32586                Self::Int64 => std::option::Option::Some(9),
32587                Self::Int64Array => std::option::Option::Some(10),
32588                Self::String => std::option::Option::Some(11),
32589                Self::StringArray => std::option::Option::Some(12),
32590                Self::Bytes => std::option::Option::Some(13),
32591                Self::Struct => std::option::Option::Some(14),
32592                Self::UnknownValue(u) => u.0.value(),
32593            }
32594        }
32595
32596        /// Gets the enum value as a string.
32597        ///
32598        /// Returns `None` if the enum contains an unknown value deserialized from
32599        /// the integer representation of enums.
32600        pub fn name(&self) -> std::option::Option<&str> {
32601            match self {
32602                Self::Unspecified => std::option::Option::Some("VALUE_TYPE_UNSPECIFIED"),
32603                Self::Bool => std::option::Option::Some("BOOL"),
32604                Self::BoolArray => std::option::Option::Some("BOOL_ARRAY"),
32605                Self::Double => std::option::Option::Some("DOUBLE"),
32606                Self::DoubleArray => std::option::Option::Some("DOUBLE_ARRAY"),
32607                Self::Int64 => std::option::Option::Some("INT64"),
32608                Self::Int64Array => std::option::Option::Some("INT64_ARRAY"),
32609                Self::String => std::option::Option::Some("STRING"),
32610                Self::StringArray => std::option::Option::Some("STRING_ARRAY"),
32611                Self::Bytes => std::option::Option::Some("BYTES"),
32612                Self::Struct => std::option::Option::Some("STRUCT"),
32613                Self::UnknownValue(u) => u.0.name(),
32614            }
32615        }
32616    }
32617
32618    #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32619    impl std::default::Default for ValueType {
32620        fn default() -> Self {
32621            use std::convert::From;
32622            Self::from(0)
32623        }
32624    }
32625
32626    #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32627    impl std::fmt::Display for ValueType {
32628        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
32629            wkt::internal::display_enum(f, self.name(), self.value())
32630        }
32631    }
32632
32633    #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32634    impl std::convert::From<i32> for ValueType {
32635        fn from(value: i32) -> Self {
32636            match value {
32637                0 => Self::Unspecified,
32638                1 => Self::Bool,
32639                2 => Self::BoolArray,
32640                3 => Self::Double,
32641                4 => Self::DoubleArray,
32642                9 => Self::Int64,
32643                10 => Self::Int64Array,
32644                11 => Self::String,
32645                12 => Self::StringArray,
32646                13 => Self::Bytes,
32647                14 => Self::Struct,
32648                _ => Self::UnknownValue(value_type::UnknownValue(
32649                    wkt::internal::UnknownEnumValue::Integer(value),
32650                )),
32651            }
32652        }
32653    }
32654
32655    #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32656    impl std::convert::From<&str> for ValueType {
32657        fn from(value: &str) -> Self {
32658            use std::string::ToString;
32659            match value {
32660                "VALUE_TYPE_UNSPECIFIED" => Self::Unspecified,
32661                "BOOL" => Self::Bool,
32662                "BOOL_ARRAY" => Self::BoolArray,
32663                "DOUBLE" => Self::Double,
32664                "DOUBLE_ARRAY" => Self::DoubleArray,
32665                "INT64" => Self::Int64,
32666                "INT64_ARRAY" => Self::Int64Array,
32667                "STRING" => Self::String,
32668                "STRING_ARRAY" => Self::StringArray,
32669                "BYTES" => Self::Bytes,
32670                "STRUCT" => Self::Struct,
32671                _ => Self::UnknownValue(value_type::UnknownValue(
32672                    wkt::internal::UnknownEnumValue::String(value.to_string()),
32673                )),
32674            }
32675        }
32676    }
32677
32678    #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32679    impl serde::ser::Serialize for ValueType {
32680        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
32681        where
32682            S: serde::Serializer,
32683        {
32684            match self {
32685                Self::Unspecified => serializer.serialize_i32(0),
32686                Self::Bool => serializer.serialize_i32(1),
32687                Self::BoolArray => serializer.serialize_i32(2),
32688                Self::Double => serializer.serialize_i32(3),
32689                Self::DoubleArray => serializer.serialize_i32(4),
32690                Self::Int64 => serializer.serialize_i32(9),
32691                Self::Int64Array => serializer.serialize_i32(10),
32692                Self::String => serializer.serialize_i32(11),
32693                Self::StringArray => serializer.serialize_i32(12),
32694                Self::Bytes => serializer.serialize_i32(13),
32695                Self::Struct => serializer.serialize_i32(14),
32696                Self::UnknownValue(u) => u.0.serialize(serializer),
32697            }
32698        }
32699    }
32700
32701    #[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
32702    impl<'de> serde::de::Deserialize<'de> for ValueType {
32703        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
32704        where
32705            D: serde::Deserializer<'de>,
32706        {
32707            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ValueType>::new(
32708                ".google.cloud.aiplatform.v1.Feature.ValueType",
32709            ))
32710        }
32711    }
32712}
32713
32714/// Vertex AI Feature Group.
32715#[cfg(feature = "feature-registry-service")]
32716#[derive(Clone, Default, PartialEq)]
32717#[non_exhaustive]
32718pub struct FeatureGroup {
32719    /// Identifier. Name of the FeatureGroup. Format:
32720    /// `projects/{project}/locations/{location}/featureGroups/{featureGroup}`
32721    pub name: std::string::String,
32722
32723    /// Output only. Timestamp when this FeatureGroup was created.
32724    pub create_time: std::option::Option<wkt::Timestamp>,
32725
32726    /// Output only. Timestamp when this FeatureGroup was last updated.
32727    pub update_time: std::option::Option<wkt::Timestamp>,
32728
32729    /// Optional. Used to perform consistent read-modify-write updates. If not set,
32730    /// a blind "overwrite" update happens.
32731    pub etag: std::string::String,
32732
32733    /// Optional. The labels with user-defined metadata to organize your
32734    /// FeatureGroup.
32735    ///
32736    /// Label keys and values can be no longer than 64 characters
32737    /// (Unicode codepoints), can only contain lowercase letters, numeric
32738    /// characters, underscores and dashes. International characters are allowed.
32739    ///
32740    /// See <https://goo.gl/xmQnxf> for more information on and examples of labels.
32741    /// No more than 64 user labels can be associated with one
32742    /// FeatureGroup(System labels are excluded)." System reserved label keys
32743    /// are prefixed with "aiplatform.googleapis.com/" and are immutable.
32744    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
32745
32746    /// Optional. Description of the FeatureGroup.
32747    pub description: std::string::String,
32748
32749    pub source: std::option::Option<crate::model::feature_group::Source>,
32750
32751    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32752}
32753
32754#[cfg(feature = "feature-registry-service")]
32755impl FeatureGroup {
32756    pub fn new() -> Self {
32757        std::default::Default::default()
32758    }
32759
32760    /// Sets the value of [name][crate::model::FeatureGroup::name].
32761    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32762        self.name = v.into();
32763        self
32764    }
32765
32766    /// Sets the value of [create_time][crate::model::FeatureGroup::create_time].
32767    pub fn set_create_time<T>(mut self, v: T) -> Self
32768    where
32769        T: std::convert::Into<wkt::Timestamp>,
32770    {
32771        self.create_time = std::option::Option::Some(v.into());
32772        self
32773    }
32774
32775    /// Sets or clears the value of [create_time][crate::model::FeatureGroup::create_time].
32776    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
32777    where
32778        T: std::convert::Into<wkt::Timestamp>,
32779    {
32780        self.create_time = v.map(|x| x.into());
32781        self
32782    }
32783
32784    /// Sets the value of [update_time][crate::model::FeatureGroup::update_time].
32785    pub fn set_update_time<T>(mut self, v: T) -> Self
32786    where
32787        T: std::convert::Into<wkt::Timestamp>,
32788    {
32789        self.update_time = std::option::Option::Some(v.into());
32790        self
32791    }
32792
32793    /// Sets or clears the value of [update_time][crate::model::FeatureGroup::update_time].
32794    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
32795    where
32796        T: std::convert::Into<wkt::Timestamp>,
32797    {
32798        self.update_time = v.map(|x| x.into());
32799        self
32800    }
32801
32802    /// Sets the value of [etag][crate::model::FeatureGroup::etag].
32803    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32804        self.etag = v.into();
32805        self
32806    }
32807
32808    /// Sets the value of [labels][crate::model::FeatureGroup::labels].
32809    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
32810    where
32811        T: std::iter::IntoIterator<Item = (K, V)>,
32812        K: std::convert::Into<std::string::String>,
32813        V: std::convert::Into<std::string::String>,
32814    {
32815        use std::iter::Iterator;
32816        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
32817        self
32818    }
32819
32820    /// Sets the value of [description][crate::model::FeatureGroup::description].
32821    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32822        self.description = v.into();
32823        self
32824    }
32825
32826    /// Sets the value of [source][crate::model::FeatureGroup::source].
32827    ///
32828    /// Note that all the setters affecting `source` are mutually
32829    /// exclusive.
32830    pub fn set_source<
32831        T: std::convert::Into<std::option::Option<crate::model::feature_group::Source>>,
32832    >(
32833        mut self,
32834        v: T,
32835    ) -> Self {
32836        self.source = v.into();
32837        self
32838    }
32839
32840    /// The value of [source][crate::model::FeatureGroup::source]
32841    /// if it holds a `BigQuery`, `None` if the field is not set or
32842    /// holds a different branch.
32843    pub fn big_query(
32844        &self,
32845    ) -> std::option::Option<&std::boxed::Box<crate::model::feature_group::BigQuery>> {
32846        #[allow(unreachable_patterns)]
32847        self.source.as_ref().and_then(|v| match v {
32848            crate::model::feature_group::Source::BigQuery(v) => std::option::Option::Some(v),
32849            _ => std::option::Option::None,
32850        })
32851    }
32852
32853    /// Sets the value of [source][crate::model::FeatureGroup::source]
32854    /// to hold a `BigQuery`.
32855    ///
32856    /// Note that all the setters affecting `source` are
32857    /// mutually exclusive.
32858    pub fn set_big_query<
32859        T: std::convert::Into<std::boxed::Box<crate::model::feature_group::BigQuery>>,
32860    >(
32861        mut self,
32862        v: T,
32863    ) -> Self {
32864        self.source =
32865            std::option::Option::Some(crate::model::feature_group::Source::BigQuery(v.into()));
32866        self
32867    }
32868}
32869
32870#[cfg(feature = "feature-registry-service")]
32871impl wkt::message::Message for FeatureGroup {
32872    fn typename() -> &'static str {
32873        "type.googleapis.com/google.cloud.aiplatform.v1.FeatureGroup"
32874    }
32875}
32876
32877/// Defines additional types related to [FeatureGroup].
32878#[cfg(feature = "feature-registry-service")]
32879pub mod feature_group {
32880    #[allow(unused_imports)]
32881    use super::*;
32882
32883    /// Input source type for BigQuery Tables and Views.
32884    #[cfg(feature = "feature-registry-service")]
32885    #[derive(Clone, Default, PartialEq)]
32886    #[non_exhaustive]
32887    pub struct BigQuery {
32888        /// Required. Immutable. The BigQuery source URI that points to either a
32889        /// BigQuery Table or View.
32890        pub big_query_source: std::option::Option<crate::model::BigQuerySource>,
32891
32892        /// Optional. Columns to construct entity_id / row keys.
32893        /// If not provided defaults to `entity_id`.
32894        pub entity_id_columns: std::vec::Vec<std::string::String>,
32895
32896        /// Optional. Set if the data source is not a time-series.
32897        pub static_data_source: bool,
32898
32899        /// Optional. If the source is a time-series source, this can be set to
32900        /// control how downstream sources (ex:
32901        /// [FeatureView][google.cloud.aiplatform.v1.FeatureView] ) will treat
32902        /// time-series sources. If not set, will treat the source as a time-series
32903        /// source with `feature_timestamp` as timestamp column and no scan boundary.
32904        ///
32905        /// [google.cloud.aiplatform.v1.FeatureView]: crate::model::FeatureView
32906        pub time_series: std::option::Option<crate::model::feature_group::big_query::TimeSeries>,
32907
32908        /// Optional. If set, all feature values will be fetched
32909        /// from a single row per unique entityId including nulls.
32910        /// If not set, will collapse all rows for each unique entityId into a singe
32911        /// row with any non-null values if present, if no non-null values are
32912        /// present will sync null.
32913        /// ex: If source has schema
32914        /// `(entity_id, feature_timestamp, f0, f1)` and the following rows:
32915        /// `(e1, 2020-01-01T10:00:00.123Z, 10, 15)`
32916        /// `(e1, 2020-02-01T10:00:00.123Z, 20, null)`
32917        /// If dense is set, `(e1, 20, null)` is synced to online stores. If dense is
32918        /// not set, `(e1, 20, 15)` is synced to online stores.
32919        pub dense: bool,
32920
32921        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32922    }
32923
32924    #[cfg(feature = "feature-registry-service")]
32925    impl BigQuery {
32926        pub fn new() -> Self {
32927            std::default::Default::default()
32928        }
32929
32930        /// Sets the value of [big_query_source][crate::model::feature_group::BigQuery::big_query_source].
32931        pub fn set_big_query_source<T>(mut self, v: T) -> Self
32932        where
32933            T: std::convert::Into<crate::model::BigQuerySource>,
32934        {
32935            self.big_query_source = std::option::Option::Some(v.into());
32936            self
32937        }
32938
32939        /// Sets or clears the value of [big_query_source][crate::model::feature_group::BigQuery::big_query_source].
32940        pub fn set_or_clear_big_query_source<T>(mut self, v: std::option::Option<T>) -> Self
32941        where
32942            T: std::convert::Into<crate::model::BigQuerySource>,
32943        {
32944            self.big_query_source = v.map(|x| x.into());
32945            self
32946        }
32947
32948        /// Sets the value of [entity_id_columns][crate::model::feature_group::BigQuery::entity_id_columns].
32949        pub fn set_entity_id_columns<T, V>(mut self, v: T) -> Self
32950        where
32951            T: std::iter::IntoIterator<Item = V>,
32952            V: std::convert::Into<std::string::String>,
32953        {
32954            use std::iter::Iterator;
32955            self.entity_id_columns = v.into_iter().map(|i| i.into()).collect();
32956            self
32957        }
32958
32959        /// Sets the value of [static_data_source][crate::model::feature_group::BigQuery::static_data_source].
32960        pub fn set_static_data_source<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32961            self.static_data_source = v.into();
32962            self
32963        }
32964
32965        /// Sets the value of [time_series][crate::model::feature_group::BigQuery::time_series].
32966        pub fn set_time_series<T>(mut self, v: T) -> Self
32967        where
32968            T: std::convert::Into<crate::model::feature_group::big_query::TimeSeries>,
32969        {
32970            self.time_series = std::option::Option::Some(v.into());
32971            self
32972        }
32973
32974        /// Sets or clears the value of [time_series][crate::model::feature_group::BigQuery::time_series].
32975        pub fn set_or_clear_time_series<T>(mut self, v: std::option::Option<T>) -> Self
32976        where
32977            T: std::convert::Into<crate::model::feature_group::big_query::TimeSeries>,
32978        {
32979            self.time_series = v.map(|x| x.into());
32980            self
32981        }
32982
32983        /// Sets the value of [dense][crate::model::feature_group::BigQuery::dense].
32984        pub fn set_dense<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32985            self.dense = v.into();
32986            self
32987        }
32988    }
32989
32990    #[cfg(feature = "feature-registry-service")]
32991    impl wkt::message::Message for BigQuery {
32992        fn typename() -> &'static str {
32993            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureGroup.BigQuery"
32994        }
32995    }
32996
32997    /// Defines additional types related to [BigQuery].
32998    #[cfg(feature = "feature-registry-service")]
32999    pub mod big_query {
33000        #[allow(unused_imports)]
33001        use super::*;
33002
33003        #[cfg(feature = "feature-registry-service")]
33004        #[derive(Clone, Default, PartialEq)]
33005        #[non_exhaustive]
33006        pub struct TimeSeries {
33007            /// Optional. Column hosting timestamp values for a time-series source.
33008            /// Will be used to determine the latest `feature_values` for each entity.
33009            /// Optional. If not provided, column named `feature_timestamp` of
33010            /// type `TIMESTAMP` will be used.
33011            pub timestamp_column: std::string::String,
33012
33013            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33014        }
33015
33016        #[cfg(feature = "feature-registry-service")]
33017        impl TimeSeries {
33018            pub fn new() -> Self {
33019                std::default::Default::default()
33020            }
33021
33022            /// Sets the value of [timestamp_column][crate::model::feature_group::big_query::TimeSeries::timestamp_column].
33023            pub fn set_timestamp_column<T: std::convert::Into<std::string::String>>(
33024                mut self,
33025                v: T,
33026            ) -> Self {
33027                self.timestamp_column = v.into();
33028                self
33029            }
33030        }
33031
33032        #[cfg(feature = "feature-registry-service")]
33033        impl wkt::message::Message for TimeSeries {
33034            fn typename() -> &'static str {
33035                "type.googleapis.com/google.cloud.aiplatform.v1.FeatureGroup.BigQuery.TimeSeries"
33036            }
33037        }
33038    }
33039
33040    #[cfg(feature = "feature-registry-service")]
33041    #[derive(Clone, Debug, PartialEq)]
33042    #[non_exhaustive]
33043    pub enum Source {
33044        /// Indicates that features for this group come from BigQuery Table/View.
33045        /// By default treats the source as a sparse time series source. The BigQuery
33046        /// source table or view must have at least one entity ID column and a column
33047        /// named `feature_timestamp`.
33048        BigQuery(std::boxed::Box<crate::model::feature_group::BigQuery>),
33049    }
33050}
33051
33052/// Stats and Anomaly generated at specific timestamp for specific Feature.
33053/// The start_time and end_time are used to define the time range of the dataset
33054/// that current stats belongs to, e.g. prediction traffic is bucketed into
33055/// prediction datasets by time window. If the Dataset is not defined by time
33056/// window, start_time = end_time. Timestamp of the stats and anomalies always
33057/// refers to end_time. Raw stats and anomalies are stored in stats_uri or
33058/// anomaly_uri in the tensorflow defined protos. Field data_stats contains
33059/// almost identical information with the raw stats in Vertex AI
33060/// defined proto, for UI to display.
33061#[cfg(any(
33062    feature = "feature-registry-service",
33063    feature = "featurestore-service",
33064    feature = "job-service",
33065))]
33066#[derive(Clone, Default, PartialEq)]
33067#[non_exhaustive]
33068pub struct FeatureStatsAnomaly {
33069    /// Feature importance score, only populated when cross-feature monitoring is
33070    /// enabled. For now only used to represent feature attribution score within
33071    /// range [0, 1] for
33072    /// [ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_SKEW][google.cloud.aiplatform.v1.ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_SKEW]
33073    /// and
33074    /// [ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT][google.cloud.aiplatform.v1.ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT].
33075    ///
33076    /// [google.cloud.aiplatform.v1.ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT]: crate::model::ModelDeploymentMonitoringObjectiveType::FeatureAttributionDrift
33077    /// [google.cloud.aiplatform.v1.ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_SKEW]: crate::model::ModelDeploymentMonitoringObjectiveType::FeatureAttributionSkew
33078    pub score: f64,
33079
33080    /// Path of the stats file for current feature values in Cloud Storage bucket.
33081    /// Format: gs://<bucket_name>/<object_name>/stats.
33082    /// Example: gs://monitoring_bucket/feature_name/stats.
33083    /// Stats are stored as binary format with Protobuf message
33084    /// [tensorflow.metadata.v0.FeatureNameStatistics](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto).
33085    pub stats_uri: std::string::String,
33086
33087    /// Path of the anomaly file for current feature values in Cloud Storage
33088    /// bucket.
33089    /// Format: gs://<bucket_name>/<object_name>/anomalies.
33090    /// Example: gs://monitoring_bucket/feature_name/anomalies.
33091    /// Stats are stored as binary format with Protobuf message
33092    /// Anoamlies are stored as binary format with Protobuf message
33093    /// [tensorflow.metadata.v0.AnomalyInfo]
33094    /// (<https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/anomalies.proto>).
33095    pub anomaly_uri: std::string::String,
33096
33097    /// Deviation from the current stats to baseline stats.
33098    ///
33099    /// 1. For categorical feature, the distribution distance is calculated by
33100    ///    L-inifinity norm.
33101    /// 1. For numerical feature, the distribution distance is calculated by
33102    ///    Jensen–Shannon divergence.
33103    pub distribution_deviation: f64,
33104
33105    /// This is the threshold used when detecting anomalies.
33106    /// The threshold can be changed by user, so this one might be different from
33107    /// [ThresholdConfig.value][google.cloud.aiplatform.v1.ThresholdConfig.value].
33108    ///
33109    /// [google.cloud.aiplatform.v1.ThresholdConfig.value]: crate::model::ThresholdConfig::threshold
33110    pub anomaly_detection_threshold: f64,
33111
33112    /// The start timestamp of window where stats were generated.
33113    /// For objectives where time window doesn't make sense (e.g. Featurestore
33114    /// Snapshot Monitoring), start_time is only used to indicate the monitoring
33115    /// intervals, so it always equals to (end_time - monitoring_interval).
33116    pub start_time: std::option::Option<wkt::Timestamp>,
33117
33118    /// The end timestamp of window where stats were generated.
33119    /// For objectives where time window doesn't make sense (e.g. Featurestore
33120    /// Snapshot Monitoring), end_time indicates the timestamp of the data used to
33121    /// generate stats (e.g. timestamp we take snapshots for feature values).
33122    pub end_time: std::option::Option<wkt::Timestamp>,
33123
33124    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33125}
33126
33127#[cfg(any(
33128    feature = "feature-registry-service",
33129    feature = "featurestore-service",
33130    feature = "job-service",
33131))]
33132impl FeatureStatsAnomaly {
33133    pub fn new() -> Self {
33134        std::default::Default::default()
33135    }
33136
33137    /// Sets the value of [score][crate::model::FeatureStatsAnomaly::score].
33138    pub fn set_score<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
33139        self.score = v.into();
33140        self
33141    }
33142
33143    /// Sets the value of [stats_uri][crate::model::FeatureStatsAnomaly::stats_uri].
33144    pub fn set_stats_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33145        self.stats_uri = v.into();
33146        self
33147    }
33148
33149    /// Sets the value of [anomaly_uri][crate::model::FeatureStatsAnomaly::anomaly_uri].
33150    pub fn set_anomaly_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33151        self.anomaly_uri = v.into();
33152        self
33153    }
33154
33155    /// Sets the value of [distribution_deviation][crate::model::FeatureStatsAnomaly::distribution_deviation].
33156    pub fn set_distribution_deviation<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
33157        self.distribution_deviation = v.into();
33158        self
33159    }
33160
33161    /// Sets the value of [anomaly_detection_threshold][crate::model::FeatureStatsAnomaly::anomaly_detection_threshold].
33162    pub fn set_anomaly_detection_threshold<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
33163        self.anomaly_detection_threshold = v.into();
33164        self
33165    }
33166
33167    /// Sets the value of [start_time][crate::model::FeatureStatsAnomaly::start_time].
33168    pub fn set_start_time<T>(mut self, v: T) -> Self
33169    where
33170        T: std::convert::Into<wkt::Timestamp>,
33171    {
33172        self.start_time = std::option::Option::Some(v.into());
33173        self
33174    }
33175
33176    /// Sets or clears the value of [start_time][crate::model::FeatureStatsAnomaly::start_time].
33177    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
33178    where
33179        T: std::convert::Into<wkt::Timestamp>,
33180    {
33181        self.start_time = v.map(|x| x.into());
33182        self
33183    }
33184
33185    /// Sets the value of [end_time][crate::model::FeatureStatsAnomaly::end_time].
33186    pub fn set_end_time<T>(mut self, v: T) -> Self
33187    where
33188        T: std::convert::Into<wkt::Timestamp>,
33189    {
33190        self.end_time = std::option::Option::Some(v.into());
33191        self
33192    }
33193
33194    /// Sets or clears the value of [end_time][crate::model::FeatureStatsAnomaly::end_time].
33195    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
33196    where
33197        T: std::convert::Into<wkt::Timestamp>,
33198    {
33199        self.end_time = v.map(|x| x.into());
33200        self
33201    }
33202}
33203
33204#[cfg(any(
33205    feature = "feature-registry-service",
33206    feature = "featurestore-service",
33207    feature = "job-service",
33208))]
33209impl wkt::message::Message for FeatureStatsAnomaly {
33210    fn typename() -> &'static str {
33211        "type.googleapis.com/google.cloud.aiplatform.v1.FeatureStatsAnomaly"
33212    }
33213}
33214
33215/// Vertex AI Feature Online Store provides a centralized repository for serving
33216/// ML features and embedding indexes at low latency. The Feature Online Store is
33217/// a top-level container.
33218#[cfg(feature = "feature-online-store-admin-service")]
33219#[derive(Clone, Default, PartialEq)]
33220#[non_exhaustive]
33221pub struct FeatureOnlineStore {
33222    /// Identifier. Name of the FeatureOnlineStore. Format:
33223    /// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`
33224    pub name: std::string::String,
33225
33226    /// Output only. Timestamp when this FeatureOnlineStore was created.
33227    pub create_time: std::option::Option<wkt::Timestamp>,
33228
33229    /// Output only. Timestamp when this FeatureOnlineStore was last updated.
33230    pub update_time: std::option::Option<wkt::Timestamp>,
33231
33232    /// Optional. Used to perform consistent read-modify-write updates. If not set,
33233    /// a blind "overwrite" update happens.
33234    pub etag: std::string::String,
33235
33236    /// Optional. The labels with user-defined metadata to organize your
33237    /// FeatureOnlineStore.
33238    ///
33239    /// Label keys and values can be no longer than 64 characters
33240    /// (Unicode codepoints), can only contain lowercase letters, numeric
33241    /// characters, underscores and dashes. International characters are allowed.
33242    ///
33243    /// See <https://goo.gl/xmQnxf> for more information on and examples of labels.
33244    /// No more than 64 user labels can be associated with one
33245    /// FeatureOnlineStore(System labels are excluded)." System reserved label keys
33246    /// are prefixed with "aiplatform.googleapis.com/" and are immutable.
33247    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
33248
33249    /// Output only. State of the featureOnlineStore.
33250    pub state: crate::model::feature_online_store::State,
33251
33252    /// Optional. The dedicated serving endpoint for this FeatureOnlineStore, which
33253    /// is different from common Vertex service endpoint.
33254    pub dedicated_serving_endpoint:
33255        std::option::Option<crate::model::feature_online_store::DedicatedServingEndpoint>,
33256
33257    /// Optional. Customer-managed encryption key spec for data storage. If set,
33258    /// online store will be secured by this key.
33259    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
33260
33261    /// Output only. Reserved for future use.
33262    pub satisfies_pzs: bool,
33263
33264    /// Output only. Reserved for future use.
33265    pub satisfies_pzi: bool,
33266
33267    pub storage_type: std::option::Option<crate::model::feature_online_store::StorageType>,
33268
33269    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33270}
33271
33272#[cfg(feature = "feature-online-store-admin-service")]
33273impl FeatureOnlineStore {
33274    pub fn new() -> Self {
33275        std::default::Default::default()
33276    }
33277
33278    /// Sets the value of [name][crate::model::FeatureOnlineStore::name].
33279    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33280        self.name = v.into();
33281        self
33282    }
33283
33284    /// Sets the value of [create_time][crate::model::FeatureOnlineStore::create_time].
33285    pub fn set_create_time<T>(mut self, v: T) -> Self
33286    where
33287        T: std::convert::Into<wkt::Timestamp>,
33288    {
33289        self.create_time = std::option::Option::Some(v.into());
33290        self
33291    }
33292
33293    /// Sets or clears the value of [create_time][crate::model::FeatureOnlineStore::create_time].
33294    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
33295    where
33296        T: std::convert::Into<wkt::Timestamp>,
33297    {
33298        self.create_time = v.map(|x| x.into());
33299        self
33300    }
33301
33302    /// Sets the value of [update_time][crate::model::FeatureOnlineStore::update_time].
33303    pub fn set_update_time<T>(mut self, v: T) -> Self
33304    where
33305        T: std::convert::Into<wkt::Timestamp>,
33306    {
33307        self.update_time = std::option::Option::Some(v.into());
33308        self
33309    }
33310
33311    /// Sets or clears the value of [update_time][crate::model::FeatureOnlineStore::update_time].
33312    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
33313    where
33314        T: std::convert::Into<wkt::Timestamp>,
33315    {
33316        self.update_time = v.map(|x| x.into());
33317        self
33318    }
33319
33320    /// Sets the value of [etag][crate::model::FeatureOnlineStore::etag].
33321    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33322        self.etag = v.into();
33323        self
33324    }
33325
33326    /// Sets the value of [labels][crate::model::FeatureOnlineStore::labels].
33327    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
33328    where
33329        T: std::iter::IntoIterator<Item = (K, V)>,
33330        K: std::convert::Into<std::string::String>,
33331        V: std::convert::Into<std::string::String>,
33332    {
33333        use std::iter::Iterator;
33334        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
33335        self
33336    }
33337
33338    /// Sets the value of [state][crate::model::FeatureOnlineStore::state].
33339    pub fn set_state<T: std::convert::Into<crate::model::feature_online_store::State>>(
33340        mut self,
33341        v: T,
33342    ) -> Self {
33343        self.state = v.into();
33344        self
33345    }
33346
33347    /// Sets the value of [dedicated_serving_endpoint][crate::model::FeatureOnlineStore::dedicated_serving_endpoint].
33348    pub fn set_dedicated_serving_endpoint<T>(mut self, v: T) -> Self
33349    where
33350        T: std::convert::Into<crate::model::feature_online_store::DedicatedServingEndpoint>,
33351    {
33352        self.dedicated_serving_endpoint = std::option::Option::Some(v.into());
33353        self
33354    }
33355
33356    /// Sets or clears the value of [dedicated_serving_endpoint][crate::model::FeatureOnlineStore::dedicated_serving_endpoint].
33357    pub fn set_or_clear_dedicated_serving_endpoint<T>(mut self, v: std::option::Option<T>) -> Self
33358    where
33359        T: std::convert::Into<crate::model::feature_online_store::DedicatedServingEndpoint>,
33360    {
33361        self.dedicated_serving_endpoint = v.map(|x| x.into());
33362        self
33363    }
33364
33365    /// Sets the value of [encryption_spec][crate::model::FeatureOnlineStore::encryption_spec].
33366    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
33367    where
33368        T: std::convert::Into<crate::model::EncryptionSpec>,
33369    {
33370        self.encryption_spec = std::option::Option::Some(v.into());
33371        self
33372    }
33373
33374    /// Sets or clears the value of [encryption_spec][crate::model::FeatureOnlineStore::encryption_spec].
33375    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
33376    where
33377        T: std::convert::Into<crate::model::EncryptionSpec>,
33378    {
33379        self.encryption_spec = v.map(|x| x.into());
33380        self
33381    }
33382
33383    /// Sets the value of [satisfies_pzs][crate::model::FeatureOnlineStore::satisfies_pzs].
33384    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
33385        self.satisfies_pzs = v.into();
33386        self
33387    }
33388
33389    /// Sets the value of [satisfies_pzi][crate::model::FeatureOnlineStore::satisfies_pzi].
33390    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
33391        self.satisfies_pzi = v.into();
33392        self
33393    }
33394
33395    /// Sets the value of [storage_type][crate::model::FeatureOnlineStore::storage_type].
33396    ///
33397    /// Note that all the setters affecting `storage_type` are mutually
33398    /// exclusive.
33399    pub fn set_storage_type<
33400        T: std::convert::Into<std::option::Option<crate::model::feature_online_store::StorageType>>,
33401    >(
33402        mut self,
33403        v: T,
33404    ) -> Self {
33405        self.storage_type = v.into();
33406        self
33407    }
33408
33409    /// The value of [storage_type][crate::model::FeatureOnlineStore::storage_type]
33410    /// if it holds a `Bigtable`, `None` if the field is not set or
33411    /// holds a different branch.
33412    pub fn bigtable(
33413        &self,
33414    ) -> std::option::Option<&std::boxed::Box<crate::model::feature_online_store::Bigtable>> {
33415        #[allow(unreachable_patterns)]
33416        self.storage_type.as_ref().and_then(|v| match v {
33417            crate::model::feature_online_store::StorageType::Bigtable(v) => {
33418                std::option::Option::Some(v)
33419            }
33420            _ => std::option::Option::None,
33421        })
33422    }
33423
33424    /// Sets the value of [storage_type][crate::model::FeatureOnlineStore::storage_type]
33425    /// to hold a `Bigtable`.
33426    ///
33427    /// Note that all the setters affecting `storage_type` are
33428    /// mutually exclusive.
33429    pub fn set_bigtable<
33430        T: std::convert::Into<std::boxed::Box<crate::model::feature_online_store::Bigtable>>,
33431    >(
33432        mut self,
33433        v: T,
33434    ) -> Self {
33435        self.storage_type = std::option::Option::Some(
33436            crate::model::feature_online_store::StorageType::Bigtable(v.into()),
33437        );
33438        self
33439    }
33440
33441    /// The value of [storage_type][crate::model::FeatureOnlineStore::storage_type]
33442    /// if it holds a `Optimized`, `None` if the field is not set or
33443    /// holds a different branch.
33444    pub fn optimized(
33445        &self,
33446    ) -> std::option::Option<&std::boxed::Box<crate::model::feature_online_store::Optimized>> {
33447        #[allow(unreachable_patterns)]
33448        self.storage_type.as_ref().and_then(|v| match v {
33449            crate::model::feature_online_store::StorageType::Optimized(v) => {
33450                std::option::Option::Some(v)
33451            }
33452            _ => std::option::Option::None,
33453        })
33454    }
33455
33456    /// Sets the value of [storage_type][crate::model::FeatureOnlineStore::storage_type]
33457    /// to hold a `Optimized`.
33458    ///
33459    /// Note that all the setters affecting `storage_type` are
33460    /// mutually exclusive.
33461    pub fn set_optimized<
33462        T: std::convert::Into<std::boxed::Box<crate::model::feature_online_store::Optimized>>,
33463    >(
33464        mut self,
33465        v: T,
33466    ) -> Self {
33467        self.storage_type = std::option::Option::Some(
33468            crate::model::feature_online_store::StorageType::Optimized(v.into()),
33469        );
33470        self
33471    }
33472}
33473
33474#[cfg(feature = "feature-online-store-admin-service")]
33475impl wkt::message::Message for FeatureOnlineStore {
33476    fn typename() -> &'static str {
33477        "type.googleapis.com/google.cloud.aiplatform.v1.FeatureOnlineStore"
33478    }
33479}
33480
33481/// Defines additional types related to [FeatureOnlineStore].
33482#[cfg(feature = "feature-online-store-admin-service")]
33483pub mod feature_online_store {
33484    #[allow(unused_imports)]
33485    use super::*;
33486
33487    #[cfg(feature = "feature-online-store-admin-service")]
33488    #[derive(Clone, Default, PartialEq)]
33489    #[non_exhaustive]
33490    pub struct Bigtable {
33491        /// Required. Autoscaling config applied to Bigtable Instance.
33492        pub auto_scaling:
33493            std::option::Option<crate::model::feature_online_store::bigtable::AutoScaling>,
33494
33495        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33496    }
33497
33498    #[cfg(feature = "feature-online-store-admin-service")]
33499    impl Bigtable {
33500        pub fn new() -> Self {
33501            std::default::Default::default()
33502        }
33503
33504        /// Sets the value of [auto_scaling][crate::model::feature_online_store::Bigtable::auto_scaling].
33505        pub fn set_auto_scaling<T>(mut self, v: T) -> Self
33506        where
33507            T: std::convert::Into<crate::model::feature_online_store::bigtable::AutoScaling>,
33508        {
33509            self.auto_scaling = std::option::Option::Some(v.into());
33510            self
33511        }
33512
33513        /// Sets or clears the value of [auto_scaling][crate::model::feature_online_store::Bigtable::auto_scaling].
33514        pub fn set_or_clear_auto_scaling<T>(mut self, v: std::option::Option<T>) -> Self
33515        where
33516            T: std::convert::Into<crate::model::feature_online_store::bigtable::AutoScaling>,
33517        {
33518            self.auto_scaling = v.map(|x| x.into());
33519            self
33520        }
33521    }
33522
33523    #[cfg(feature = "feature-online-store-admin-service")]
33524    impl wkt::message::Message for Bigtable {
33525        fn typename() -> &'static str {
33526            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable"
33527        }
33528    }
33529
33530    /// Defines additional types related to [Bigtable].
33531    #[cfg(feature = "feature-online-store-admin-service")]
33532    pub mod bigtable {
33533        #[allow(unused_imports)]
33534        use super::*;
33535
33536        #[cfg(feature = "feature-online-store-admin-service")]
33537        #[derive(Clone, Default, PartialEq)]
33538        #[non_exhaustive]
33539        pub struct AutoScaling {
33540            /// Required. The minimum number of nodes to scale down to. Must be greater
33541            /// than or equal to 1.
33542            pub min_node_count: i32,
33543
33544            /// Required. The maximum number of nodes to scale up to. Must be greater
33545            /// than or equal to min_node_count, and less than or equal to 10 times of
33546            /// 'min_node_count'.
33547            pub max_node_count: i32,
33548
33549            /// Optional. A percentage of the cluster's CPU capacity. Can be from 10%
33550            /// to 80%. When a cluster's CPU utilization exceeds the target that you
33551            /// have set, Bigtable immediately adds nodes to the cluster. When CPU
33552            /// utilization is substantially lower than the target, Bigtable removes
33553            /// nodes. If not set will default to 50%.
33554            pub cpu_utilization_target: i32,
33555
33556            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33557        }
33558
33559        #[cfg(feature = "feature-online-store-admin-service")]
33560        impl AutoScaling {
33561            pub fn new() -> Self {
33562                std::default::Default::default()
33563            }
33564
33565            /// Sets the value of [min_node_count][crate::model::feature_online_store::bigtable::AutoScaling::min_node_count].
33566            pub fn set_min_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
33567                self.min_node_count = v.into();
33568                self
33569            }
33570
33571            /// Sets the value of [max_node_count][crate::model::feature_online_store::bigtable::AutoScaling::max_node_count].
33572            pub fn set_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
33573                self.max_node_count = v.into();
33574                self
33575            }
33576
33577            /// Sets the value of [cpu_utilization_target][crate::model::feature_online_store::bigtable::AutoScaling::cpu_utilization_target].
33578            pub fn set_cpu_utilization_target<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
33579                self.cpu_utilization_target = v.into();
33580                self
33581            }
33582        }
33583
33584        #[cfg(feature = "feature-online-store-admin-service")]
33585        impl wkt::message::Message for AutoScaling {
33586            fn typename() -> &'static str {
33587                "type.googleapis.com/google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.AutoScaling"
33588            }
33589        }
33590    }
33591
33592    /// Optimized storage type
33593    #[cfg(feature = "feature-online-store-admin-service")]
33594    #[derive(Clone, Default, PartialEq)]
33595    #[non_exhaustive]
33596    pub struct Optimized {
33597        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33598    }
33599
33600    #[cfg(feature = "feature-online-store-admin-service")]
33601    impl Optimized {
33602        pub fn new() -> Self {
33603            std::default::Default::default()
33604        }
33605    }
33606
33607    #[cfg(feature = "feature-online-store-admin-service")]
33608    impl wkt::message::Message for Optimized {
33609        fn typename() -> &'static str {
33610            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized"
33611        }
33612    }
33613
33614    /// The dedicated serving endpoint for this FeatureOnlineStore. Only need to
33615    /// set when you choose Optimized storage type. Public endpoint is provisioned
33616    /// by default.
33617    #[cfg(feature = "feature-online-store-admin-service")]
33618    #[derive(Clone, Default, PartialEq)]
33619    #[non_exhaustive]
33620    pub struct DedicatedServingEndpoint {
33621        /// Output only. This field will be populated with the domain name to use for
33622        /// this FeatureOnlineStore
33623        pub public_endpoint_domain_name: std::string::String,
33624
33625        /// Optional. Private service connect config. The private service connection
33626        /// is available only for Optimized storage type, not for embedding
33627        /// management now. If
33628        /// [PrivateServiceConnectConfig.enable_private_service_connect][google.cloud.aiplatform.v1.PrivateServiceConnectConfig.enable_private_service_connect]
33629        /// set to true, customers will use private service connection to send
33630        /// request. Otherwise, the connection will set to public endpoint.
33631        ///
33632        /// [google.cloud.aiplatform.v1.PrivateServiceConnectConfig.enable_private_service_connect]: crate::model::PrivateServiceConnectConfig::enable_private_service_connect
33633        pub private_service_connect_config:
33634            std::option::Option<crate::model::PrivateServiceConnectConfig>,
33635
33636        /// Output only. The name of the service attachment resource. Populated if
33637        /// private service connect is enabled and after FeatureViewSync is created.
33638        pub service_attachment: std::string::String,
33639
33640        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33641    }
33642
33643    #[cfg(feature = "feature-online-store-admin-service")]
33644    impl DedicatedServingEndpoint {
33645        pub fn new() -> Self {
33646            std::default::Default::default()
33647        }
33648
33649        /// Sets the value of [public_endpoint_domain_name][crate::model::feature_online_store::DedicatedServingEndpoint::public_endpoint_domain_name].
33650        pub fn set_public_endpoint_domain_name<T: std::convert::Into<std::string::String>>(
33651            mut self,
33652            v: T,
33653        ) -> Self {
33654            self.public_endpoint_domain_name = v.into();
33655            self
33656        }
33657
33658        /// Sets the value of [private_service_connect_config][crate::model::feature_online_store::DedicatedServingEndpoint::private_service_connect_config].
33659        pub fn set_private_service_connect_config<T>(mut self, v: T) -> Self
33660        where
33661            T: std::convert::Into<crate::model::PrivateServiceConnectConfig>,
33662        {
33663            self.private_service_connect_config = std::option::Option::Some(v.into());
33664            self
33665        }
33666
33667        /// Sets or clears the value of [private_service_connect_config][crate::model::feature_online_store::DedicatedServingEndpoint::private_service_connect_config].
33668        pub fn set_or_clear_private_service_connect_config<T>(
33669            mut self,
33670            v: std::option::Option<T>,
33671        ) -> Self
33672        where
33673            T: std::convert::Into<crate::model::PrivateServiceConnectConfig>,
33674        {
33675            self.private_service_connect_config = v.map(|x| x.into());
33676            self
33677        }
33678
33679        /// Sets the value of [service_attachment][crate::model::feature_online_store::DedicatedServingEndpoint::service_attachment].
33680        pub fn set_service_attachment<T: std::convert::Into<std::string::String>>(
33681            mut self,
33682            v: T,
33683        ) -> Self {
33684            self.service_attachment = v.into();
33685            self
33686        }
33687    }
33688
33689    #[cfg(feature = "feature-online-store-admin-service")]
33690    impl wkt::message::Message for DedicatedServingEndpoint {
33691        fn typename() -> &'static str {
33692            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint"
33693        }
33694    }
33695
33696    /// Possible states a featureOnlineStore can have.
33697    ///
33698    /// # Working with unknown values
33699    ///
33700    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
33701    /// additional enum variants at any time. Adding new variants is not considered
33702    /// a breaking change. Applications should write their code in anticipation of:
33703    ///
33704    /// - New values appearing in future releases of the client library, **and**
33705    /// - New values received dynamically, without application changes.
33706    ///
33707    /// Please consult the [Working with enums] section in the user guide for some
33708    /// guidelines.
33709    ///
33710    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
33711    #[cfg(feature = "feature-online-store-admin-service")]
33712    #[derive(Clone, Debug, PartialEq)]
33713    #[non_exhaustive]
33714    pub enum State {
33715        /// Default value. This value is unused.
33716        Unspecified,
33717        /// State when the featureOnlineStore configuration is not being updated and
33718        /// the fields reflect the current configuration of the featureOnlineStore.
33719        /// The featureOnlineStore is usable in this state.
33720        Stable,
33721        /// The state of the featureOnlineStore configuration when it is being
33722        /// updated. During an update, the fields reflect either the original
33723        /// configuration or the updated configuration of the featureOnlineStore. The
33724        /// featureOnlineStore is still usable in this state.
33725        Updating,
33726        /// If set, the enum was initialized with an unknown value.
33727        ///
33728        /// Applications can examine the value using [State::value] or
33729        /// [State::name].
33730        UnknownValue(state::UnknownValue),
33731    }
33732
33733    #[doc(hidden)]
33734    #[cfg(feature = "feature-online-store-admin-service")]
33735    pub mod state {
33736        #[allow(unused_imports)]
33737        use super::*;
33738        #[derive(Clone, Debug, PartialEq)]
33739        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
33740    }
33741
33742    #[cfg(feature = "feature-online-store-admin-service")]
33743    impl State {
33744        /// Gets the enum value.
33745        ///
33746        /// Returns `None` if the enum contains an unknown value deserialized from
33747        /// the string representation of enums.
33748        pub fn value(&self) -> std::option::Option<i32> {
33749            match self {
33750                Self::Unspecified => std::option::Option::Some(0),
33751                Self::Stable => std::option::Option::Some(1),
33752                Self::Updating => std::option::Option::Some(2),
33753                Self::UnknownValue(u) => u.0.value(),
33754            }
33755        }
33756
33757        /// Gets the enum value as a string.
33758        ///
33759        /// Returns `None` if the enum contains an unknown value deserialized from
33760        /// the integer representation of enums.
33761        pub fn name(&self) -> std::option::Option<&str> {
33762            match self {
33763                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
33764                Self::Stable => std::option::Option::Some("STABLE"),
33765                Self::Updating => std::option::Option::Some("UPDATING"),
33766                Self::UnknownValue(u) => u.0.name(),
33767            }
33768        }
33769    }
33770
33771    #[cfg(feature = "feature-online-store-admin-service")]
33772    impl std::default::Default for State {
33773        fn default() -> Self {
33774            use std::convert::From;
33775            Self::from(0)
33776        }
33777    }
33778
33779    #[cfg(feature = "feature-online-store-admin-service")]
33780    impl std::fmt::Display for State {
33781        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
33782            wkt::internal::display_enum(f, self.name(), self.value())
33783        }
33784    }
33785
33786    #[cfg(feature = "feature-online-store-admin-service")]
33787    impl std::convert::From<i32> for State {
33788        fn from(value: i32) -> Self {
33789            match value {
33790                0 => Self::Unspecified,
33791                1 => Self::Stable,
33792                2 => Self::Updating,
33793                _ => Self::UnknownValue(state::UnknownValue(
33794                    wkt::internal::UnknownEnumValue::Integer(value),
33795                )),
33796            }
33797        }
33798    }
33799
33800    #[cfg(feature = "feature-online-store-admin-service")]
33801    impl std::convert::From<&str> for State {
33802        fn from(value: &str) -> Self {
33803            use std::string::ToString;
33804            match value {
33805                "STATE_UNSPECIFIED" => Self::Unspecified,
33806                "STABLE" => Self::Stable,
33807                "UPDATING" => Self::Updating,
33808                _ => Self::UnknownValue(state::UnknownValue(
33809                    wkt::internal::UnknownEnumValue::String(value.to_string()),
33810                )),
33811            }
33812        }
33813    }
33814
33815    #[cfg(feature = "feature-online-store-admin-service")]
33816    impl serde::ser::Serialize for State {
33817        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
33818        where
33819            S: serde::Serializer,
33820        {
33821            match self {
33822                Self::Unspecified => serializer.serialize_i32(0),
33823                Self::Stable => serializer.serialize_i32(1),
33824                Self::Updating => serializer.serialize_i32(2),
33825                Self::UnknownValue(u) => u.0.serialize(serializer),
33826            }
33827        }
33828    }
33829
33830    #[cfg(feature = "feature-online-store-admin-service")]
33831    impl<'de> serde::de::Deserialize<'de> for State {
33832        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
33833        where
33834            D: serde::Deserializer<'de>,
33835        {
33836            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
33837                ".google.cloud.aiplatform.v1.FeatureOnlineStore.State",
33838            ))
33839        }
33840    }
33841
33842    #[cfg(feature = "feature-online-store-admin-service")]
33843    #[derive(Clone, Debug, PartialEq)]
33844    #[non_exhaustive]
33845    pub enum StorageType {
33846        /// Contains settings for the Cloud Bigtable instance that will be created
33847        /// to serve featureValues for all FeatureViews under this
33848        /// FeatureOnlineStore.
33849        Bigtable(std::boxed::Box<crate::model::feature_online_store::Bigtable>),
33850        /// Contains settings for the Optimized store that will be created
33851        /// to serve featureValues for all FeatureViews under this
33852        /// FeatureOnlineStore. When choose Optimized storage type, need to set
33853        /// [PrivateServiceConnectConfig.enable_private_service_connect][google.cloud.aiplatform.v1.PrivateServiceConnectConfig.enable_private_service_connect]
33854        /// to use private endpoint. Otherwise will use public endpoint by default.
33855        ///
33856        /// [google.cloud.aiplatform.v1.PrivateServiceConnectConfig.enable_private_service_connect]: crate::model::PrivateServiceConnectConfig::enable_private_service_connect
33857        Optimized(std::boxed::Box<crate::model::feature_online_store::Optimized>),
33858    }
33859}
33860
33861/// Request message for
33862/// [FeatureOnlineStoreAdminService.CreateFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.CreateFeatureOnlineStore].
33863///
33864/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.CreateFeatureOnlineStore]: crate::client::FeatureOnlineStoreAdminService::create_feature_online_store
33865#[cfg(feature = "feature-online-store-admin-service")]
33866#[derive(Clone, Default, PartialEq)]
33867#[non_exhaustive]
33868pub struct CreateFeatureOnlineStoreRequest {
33869    /// Required. The resource name of the Location to create FeatureOnlineStores.
33870    /// Format:
33871    /// `projects/{project}/locations/{location}`
33872    pub parent: std::string::String,
33873
33874    /// Required. The FeatureOnlineStore to create.
33875    pub feature_online_store: std::option::Option<crate::model::FeatureOnlineStore>,
33876
33877    /// Required. The ID to use for this FeatureOnlineStore, which will become the
33878    /// final component of the FeatureOnlineStore's resource name.
33879    ///
33880    /// This value may be up to 60 characters, and valid characters are
33881    /// `[a-z0-9_]`. The first character cannot be a number.
33882    ///
33883    /// The value must be unique within the project and location.
33884    pub feature_online_store_id: std::string::String,
33885
33886    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33887}
33888
33889#[cfg(feature = "feature-online-store-admin-service")]
33890impl CreateFeatureOnlineStoreRequest {
33891    pub fn new() -> Self {
33892        std::default::Default::default()
33893    }
33894
33895    /// Sets the value of [parent][crate::model::CreateFeatureOnlineStoreRequest::parent].
33896    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33897        self.parent = v.into();
33898        self
33899    }
33900
33901    /// Sets the value of [feature_online_store][crate::model::CreateFeatureOnlineStoreRequest::feature_online_store].
33902    pub fn set_feature_online_store<T>(mut self, v: T) -> Self
33903    where
33904        T: std::convert::Into<crate::model::FeatureOnlineStore>,
33905    {
33906        self.feature_online_store = std::option::Option::Some(v.into());
33907        self
33908    }
33909
33910    /// Sets or clears the value of [feature_online_store][crate::model::CreateFeatureOnlineStoreRequest::feature_online_store].
33911    pub fn set_or_clear_feature_online_store<T>(mut self, v: std::option::Option<T>) -> Self
33912    where
33913        T: std::convert::Into<crate::model::FeatureOnlineStore>,
33914    {
33915        self.feature_online_store = v.map(|x| x.into());
33916        self
33917    }
33918
33919    /// Sets the value of [feature_online_store_id][crate::model::CreateFeatureOnlineStoreRequest::feature_online_store_id].
33920    pub fn set_feature_online_store_id<T: std::convert::Into<std::string::String>>(
33921        mut self,
33922        v: T,
33923    ) -> Self {
33924        self.feature_online_store_id = v.into();
33925        self
33926    }
33927}
33928
33929#[cfg(feature = "feature-online-store-admin-service")]
33930impl wkt::message::Message for CreateFeatureOnlineStoreRequest {
33931    fn typename() -> &'static str {
33932        "type.googleapis.com/google.cloud.aiplatform.v1.CreateFeatureOnlineStoreRequest"
33933    }
33934}
33935
33936/// Request message for
33937/// [FeatureOnlineStoreAdminService.GetFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureOnlineStore].
33938///
33939/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureOnlineStore]: crate::client::FeatureOnlineStoreAdminService::get_feature_online_store
33940#[cfg(feature = "feature-online-store-admin-service")]
33941#[derive(Clone, Default, PartialEq)]
33942#[non_exhaustive]
33943pub struct GetFeatureOnlineStoreRequest {
33944    /// Required. The name of the FeatureOnlineStore resource.
33945    pub name: std::string::String,
33946
33947    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33948}
33949
33950#[cfg(feature = "feature-online-store-admin-service")]
33951impl GetFeatureOnlineStoreRequest {
33952    pub fn new() -> Self {
33953        std::default::Default::default()
33954    }
33955
33956    /// Sets the value of [name][crate::model::GetFeatureOnlineStoreRequest::name].
33957    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33958        self.name = v.into();
33959        self
33960    }
33961}
33962
33963#[cfg(feature = "feature-online-store-admin-service")]
33964impl wkt::message::Message for GetFeatureOnlineStoreRequest {
33965    fn typename() -> &'static str {
33966        "type.googleapis.com/google.cloud.aiplatform.v1.GetFeatureOnlineStoreRequest"
33967    }
33968}
33969
33970/// Request message for
33971/// [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores].
33972///
33973/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]: crate::client::FeatureOnlineStoreAdminService::list_feature_online_stores
33974#[cfg(feature = "feature-online-store-admin-service")]
33975#[derive(Clone, Default, PartialEq)]
33976#[non_exhaustive]
33977pub struct ListFeatureOnlineStoresRequest {
33978    /// Required. The resource name of the Location to list FeatureOnlineStores.
33979    /// Format:
33980    /// `projects/{project}/locations/{location}`
33981    pub parent: std::string::String,
33982
33983    /// Lists the FeatureOnlineStores that match the filter expression. The
33984    /// following fields are supported:
33985    ///
33986    /// * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
33987    ///   Values must be
33988    ///   in RFC 3339 format.
33989    /// * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
33990    ///   Values must be
33991    ///   in RFC 3339 format.
33992    /// * `labels`: Supports key-value equality and key presence.
33993    ///
33994    /// Examples:
33995    ///
33996    /// * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
33997    ///   FeatureOnlineStores created or updated after 2020-01-01.
33998    /// * `labels.env = "prod"`
33999    ///   FeatureOnlineStores with label "env" set to "prod".
34000    pub filter: std::string::String,
34001
34002    /// The maximum number of FeatureOnlineStores to return. The service may return
34003    /// fewer than this value. If unspecified, at most 100 FeatureOnlineStores will
34004    /// be returned. The maximum value is 100; any value greater than 100 will be
34005    /// coerced to 100.
34006    pub page_size: i32,
34007
34008    /// A page token, received from a previous
34009    /// [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
34010    /// call. Provide this to retrieve the subsequent page.
34011    ///
34012    /// When paginating, all other parameters provided to
34013    /// [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]
34014    /// must match the call that provided the page token.
34015    ///
34016    /// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]: crate::client::FeatureOnlineStoreAdminService::list_feature_online_stores
34017    pub page_token: std::string::String,
34018
34019    /// A comma-separated list of fields to order by, sorted in ascending order.
34020    /// Use "desc" after a field name for descending.
34021    /// Supported Fields:
34022    ///
34023    /// * `create_time`
34024    /// * `update_time`
34025    pub order_by: std::string::String,
34026
34027    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34028}
34029
34030#[cfg(feature = "feature-online-store-admin-service")]
34031impl ListFeatureOnlineStoresRequest {
34032    pub fn new() -> Self {
34033        std::default::Default::default()
34034    }
34035
34036    /// Sets the value of [parent][crate::model::ListFeatureOnlineStoresRequest::parent].
34037    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34038        self.parent = v.into();
34039        self
34040    }
34041
34042    /// Sets the value of [filter][crate::model::ListFeatureOnlineStoresRequest::filter].
34043    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34044        self.filter = v.into();
34045        self
34046    }
34047
34048    /// Sets the value of [page_size][crate::model::ListFeatureOnlineStoresRequest::page_size].
34049    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
34050        self.page_size = v.into();
34051        self
34052    }
34053
34054    /// Sets the value of [page_token][crate::model::ListFeatureOnlineStoresRequest::page_token].
34055    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34056        self.page_token = v.into();
34057        self
34058    }
34059
34060    /// Sets the value of [order_by][crate::model::ListFeatureOnlineStoresRequest::order_by].
34061    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34062        self.order_by = v.into();
34063        self
34064    }
34065}
34066
34067#[cfg(feature = "feature-online-store-admin-service")]
34068impl wkt::message::Message for ListFeatureOnlineStoresRequest {
34069    fn typename() -> &'static str {
34070        "type.googleapis.com/google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest"
34071    }
34072}
34073
34074/// Response message for
34075/// [FeatureOnlineStoreAdminService.ListFeatureOnlineStores][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores].
34076///
34077/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureOnlineStores]: crate::client::FeatureOnlineStoreAdminService::list_feature_online_stores
34078#[cfg(feature = "feature-online-store-admin-service")]
34079#[derive(Clone, Default, PartialEq)]
34080#[non_exhaustive]
34081pub struct ListFeatureOnlineStoresResponse {
34082    /// The FeatureOnlineStores matching the request.
34083    pub feature_online_stores: std::vec::Vec<crate::model::FeatureOnlineStore>,
34084
34085    /// A token, which can be sent as
34086    /// [ListFeatureOnlineStoresRequest.page_token][google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.page_token]
34087    /// to retrieve the next page. If this field is omitted, there are no
34088    /// subsequent pages.
34089    ///
34090    /// [google.cloud.aiplatform.v1.ListFeatureOnlineStoresRequest.page_token]: crate::model::ListFeatureOnlineStoresRequest::page_token
34091    pub next_page_token: std::string::String,
34092
34093    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34094}
34095
34096#[cfg(feature = "feature-online-store-admin-service")]
34097impl ListFeatureOnlineStoresResponse {
34098    pub fn new() -> Self {
34099        std::default::Default::default()
34100    }
34101
34102    /// Sets the value of [feature_online_stores][crate::model::ListFeatureOnlineStoresResponse::feature_online_stores].
34103    pub fn set_feature_online_stores<T, V>(mut self, v: T) -> Self
34104    where
34105        T: std::iter::IntoIterator<Item = V>,
34106        V: std::convert::Into<crate::model::FeatureOnlineStore>,
34107    {
34108        use std::iter::Iterator;
34109        self.feature_online_stores = v.into_iter().map(|i| i.into()).collect();
34110        self
34111    }
34112
34113    /// Sets the value of [next_page_token][crate::model::ListFeatureOnlineStoresResponse::next_page_token].
34114    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34115        self.next_page_token = v.into();
34116        self
34117    }
34118}
34119
34120#[cfg(feature = "feature-online-store-admin-service")]
34121impl wkt::message::Message for ListFeatureOnlineStoresResponse {
34122    fn typename() -> &'static str {
34123        "type.googleapis.com/google.cloud.aiplatform.v1.ListFeatureOnlineStoresResponse"
34124    }
34125}
34126
34127#[cfg(feature = "feature-online-store-admin-service")]
34128#[doc(hidden)]
34129impl gax::paginator::internal::PageableResponse for ListFeatureOnlineStoresResponse {
34130    type PageItem = crate::model::FeatureOnlineStore;
34131
34132    fn items(self) -> std::vec::Vec<Self::PageItem> {
34133        self.feature_online_stores
34134    }
34135
34136    fn next_page_token(&self) -> std::string::String {
34137        use std::clone::Clone;
34138        self.next_page_token.clone()
34139    }
34140}
34141
34142/// Request message for
34143/// [FeatureOnlineStoreAdminService.UpdateFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.UpdateFeatureOnlineStore].
34144///
34145/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.UpdateFeatureOnlineStore]: crate::client::FeatureOnlineStoreAdminService::update_feature_online_store
34146#[cfg(feature = "feature-online-store-admin-service")]
34147#[derive(Clone, Default, PartialEq)]
34148#[non_exhaustive]
34149pub struct UpdateFeatureOnlineStoreRequest {
34150    /// Required. The FeatureOnlineStore's `name` field is used to identify the
34151    /// FeatureOnlineStore to be updated. Format:
34152    /// `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
34153    pub feature_online_store: std::option::Option<crate::model::FeatureOnlineStore>,
34154
34155    /// Field mask is used to specify the fields to be overwritten in the
34156    /// FeatureOnlineStore resource by the update.
34157    /// The fields specified in the update_mask are relative to the resource, not
34158    /// the full request. A field will be overwritten if it is in the mask. If the
34159    /// user does not provide a mask then only the non-empty fields present in the
34160    /// request will be overwritten. Set the update_mask to `*` to override all
34161    /// fields.
34162    ///
34163    /// Updatable fields:
34164    ///
34165    /// * `labels`
34166    /// * `description`
34167    /// * `bigtable`
34168    /// * `bigtable.auto_scaling`
34169    /// * `bigtable.enable_multi_region_replica`
34170    pub update_mask: std::option::Option<wkt::FieldMask>,
34171
34172    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34173}
34174
34175#[cfg(feature = "feature-online-store-admin-service")]
34176impl UpdateFeatureOnlineStoreRequest {
34177    pub fn new() -> Self {
34178        std::default::Default::default()
34179    }
34180
34181    /// Sets the value of [feature_online_store][crate::model::UpdateFeatureOnlineStoreRequest::feature_online_store].
34182    pub fn set_feature_online_store<T>(mut self, v: T) -> Self
34183    where
34184        T: std::convert::Into<crate::model::FeatureOnlineStore>,
34185    {
34186        self.feature_online_store = std::option::Option::Some(v.into());
34187        self
34188    }
34189
34190    /// Sets or clears the value of [feature_online_store][crate::model::UpdateFeatureOnlineStoreRequest::feature_online_store].
34191    pub fn set_or_clear_feature_online_store<T>(mut self, v: std::option::Option<T>) -> Self
34192    where
34193        T: std::convert::Into<crate::model::FeatureOnlineStore>,
34194    {
34195        self.feature_online_store = v.map(|x| x.into());
34196        self
34197    }
34198
34199    /// Sets the value of [update_mask][crate::model::UpdateFeatureOnlineStoreRequest::update_mask].
34200    pub fn set_update_mask<T>(mut self, v: T) -> Self
34201    where
34202        T: std::convert::Into<wkt::FieldMask>,
34203    {
34204        self.update_mask = std::option::Option::Some(v.into());
34205        self
34206    }
34207
34208    /// Sets or clears the value of [update_mask][crate::model::UpdateFeatureOnlineStoreRequest::update_mask].
34209    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
34210    where
34211        T: std::convert::Into<wkt::FieldMask>,
34212    {
34213        self.update_mask = v.map(|x| x.into());
34214        self
34215    }
34216}
34217
34218#[cfg(feature = "feature-online-store-admin-service")]
34219impl wkt::message::Message for UpdateFeatureOnlineStoreRequest {
34220    fn typename() -> &'static str {
34221        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest"
34222    }
34223}
34224
34225/// Request message for
34226/// [FeatureOnlineStoreAdminService.DeleteFeatureOnlineStore][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.DeleteFeatureOnlineStore].
34227///
34228/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.DeleteFeatureOnlineStore]: crate::client::FeatureOnlineStoreAdminService::delete_feature_online_store
34229#[cfg(feature = "feature-online-store-admin-service")]
34230#[derive(Clone, Default, PartialEq)]
34231#[non_exhaustive]
34232pub struct DeleteFeatureOnlineStoreRequest {
34233    /// Required. The name of the FeatureOnlineStore to be deleted.
34234    /// Format:
34235    /// `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
34236    pub name: std::string::String,
34237
34238    /// If set to true, any FeatureViews and Features for this FeatureOnlineStore
34239    /// will also be deleted. (Otherwise, the request will only work if the
34240    /// FeatureOnlineStore has no FeatureViews.)
34241    pub force: bool,
34242
34243    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34244}
34245
34246#[cfg(feature = "feature-online-store-admin-service")]
34247impl DeleteFeatureOnlineStoreRequest {
34248    pub fn new() -> Self {
34249        std::default::Default::default()
34250    }
34251
34252    /// Sets the value of [name][crate::model::DeleteFeatureOnlineStoreRequest::name].
34253    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34254        self.name = v.into();
34255        self
34256    }
34257
34258    /// Sets the value of [force][crate::model::DeleteFeatureOnlineStoreRequest::force].
34259    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
34260        self.force = v.into();
34261        self
34262    }
34263}
34264
34265#[cfg(feature = "feature-online-store-admin-service")]
34266impl wkt::message::Message for DeleteFeatureOnlineStoreRequest {
34267    fn typename() -> &'static str {
34268        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteFeatureOnlineStoreRequest"
34269    }
34270}
34271
34272/// Request message for
34273/// [FeatureOnlineStoreAdminService.CreateFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.CreateFeatureView].
34274///
34275/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.CreateFeatureView]: crate::client::FeatureOnlineStoreAdminService::create_feature_view
34276#[cfg(feature = "feature-online-store-admin-service")]
34277#[derive(Clone, Default, PartialEq)]
34278#[non_exhaustive]
34279pub struct CreateFeatureViewRequest {
34280    /// Required. The resource name of the FeatureOnlineStore to create
34281    /// FeatureViews. Format:
34282    /// `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
34283    pub parent: std::string::String,
34284
34285    /// Required. The FeatureView to create.
34286    pub feature_view: std::option::Option<crate::model::FeatureView>,
34287
34288    /// Required. The ID to use for the FeatureView, which will become the final
34289    /// component of the FeatureView's resource name.
34290    ///
34291    /// This value may be up to 60 characters, and valid characters are
34292    /// `[a-z0-9_]`. The first character cannot be a number.
34293    ///
34294    /// The value must be unique within a FeatureOnlineStore.
34295    pub feature_view_id: std::string::String,
34296
34297    /// Immutable. If set to true, one on demand sync will be run immediately,
34298    /// regardless whether the
34299    /// [FeatureView.sync_config][google.cloud.aiplatform.v1.FeatureView.sync_config]
34300    /// is configured or not.
34301    ///
34302    /// [google.cloud.aiplatform.v1.FeatureView.sync_config]: crate::model::FeatureView::sync_config
34303    pub run_sync_immediately: bool,
34304
34305    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34306}
34307
34308#[cfg(feature = "feature-online-store-admin-service")]
34309impl CreateFeatureViewRequest {
34310    pub fn new() -> Self {
34311        std::default::Default::default()
34312    }
34313
34314    /// Sets the value of [parent][crate::model::CreateFeatureViewRequest::parent].
34315    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34316        self.parent = v.into();
34317        self
34318    }
34319
34320    /// Sets the value of [feature_view][crate::model::CreateFeatureViewRequest::feature_view].
34321    pub fn set_feature_view<T>(mut self, v: T) -> Self
34322    where
34323        T: std::convert::Into<crate::model::FeatureView>,
34324    {
34325        self.feature_view = std::option::Option::Some(v.into());
34326        self
34327    }
34328
34329    /// Sets or clears the value of [feature_view][crate::model::CreateFeatureViewRequest::feature_view].
34330    pub fn set_or_clear_feature_view<T>(mut self, v: std::option::Option<T>) -> Self
34331    where
34332        T: std::convert::Into<crate::model::FeatureView>,
34333    {
34334        self.feature_view = v.map(|x| x.into());
34335        self
34336    }
34337
34338    /// Sets the value of [feature_view_id][crate::model::CreateFeatureViewRequest::feature_view_id].
34339    pub fn set_feature_view_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34340        self.feature_view_id = v.into();
34341        self
34342    }
34343
34344    /// Sets the value of [run_sync_immediately][crate::model::CreateFeatureViewRequest::run_sync_immediately].
34345    pub fn set_run_sync_immediately<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
34346        self.run_sync_immediately = v.into();
34347        self
34348    }
34349}
34350
34351#[cfg(feature = "feature-online-store-admin-service")]
34352impl wkt::message::Message for CreateFeatureViewRequest {
34353    fn typename() -> &'static str {
34354        "type.googleapis.com/google.cloud.aiplatform.v1.CreateFeatureViewRequest"
34355    }
34356}
34357
34358/// Request message for
34359/// [FeatureOnlineStoreAdminService.GetFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureView].
34360///
34361/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureView]: crate::client::FeatureOnlineStoreAdminService::get_feature_view
34362#[cfg(feature = "feature-online-store-admin-service")]
34363#[derive(Clone, Default, PartialEq)]
34364#[non_exhaustive]
34365pub struct GetFeatureViewRequest {
34366    /// Required. The name of the FeatureView resource.
34367    /// Format:
34368    /// `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
34369    pub name: std::string::String,
34370
34371    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34372}
34373
34374#[cfg(feature = "feature-online-store-admin-service")]
34375impl GetFeatureViewRequest {
34376    pub fn new() -> Self {
34377        std::default::Default::default()
34378    }
34379
34380    /// Sets the value of [name][crate::model::GetFeatureViewRequest::name].
34381    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34382        self.name = v.into();
34383        self
34384    }
34385}
34386
34387#[cfg(feature = "feature-online-store-admin-service")]
34388impl wkt::message::Message for GetFeatureViewRequest {
34389    fn typename() -> &'static str {
34390        "type.googleapis.com/google.cloud.aiplatform.v1.GetFeatureViewRequest"
34391    }
34392}
34393
34394/// Request message for
34395/// [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews].
34396///
34397/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]: crate::client::FeatureOnlineStoreAdminService::list_feature_views
34398#[cfg(feature = "feature-online-store-admin-service")]
34399#[derive(Clone, Default, PartialEq)]
34400#[non_exhaustive]
34401pub struct ListFeatureViewsRequest {
34402    /// Required. The resource name of the FeatureOnlineStore to list FeatureViews.
34403    /// Format:
34404    /// `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}`
34405    pub parent: std::string::String,
34406
34407    /// Lists the FeatureViews that match the filter expression. The following
34408    /// filters are supported:
34409    ///
34410    /// * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
34411    ///   Values must be in RFC 3339 format.
34412    /// * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
34413    ///   Values must be in RFC 3339 format.
34414    /// * `labels`: Supports key-value equality as well as key presence.
34415    ///
34416    /// Examples:
34417    ///
34418    /// * `create_time > \"2020-01-31T15:30:00.000000Z\" OR
34419    ///   update_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViews
34420    ///   created or updated after 2020-01-31T15:30:00.000000Z.
34421    /// * `labels.active = yes AND labels.env = prod` --> FeatureViews having both
34422    ///   (active: yes) and (env: prod) labels.
34423    /// * `labels.env: *` --> Any FeatureView which has a label with 'env' as the
34424    ///   key.
34425    pub filter: std::string::String,
34426
34427    /// The maximum number of FeatureViews to return. The service may return fewer
34428    /// than this value. If unspecified, at most 1000 FeatureViews will be
34429    /// returned. The maximum value is 1000; any value greater than 1000 will be
34430    /// coerced to 1000.
34431    pub page_size: i32,
34432
34433    /// A page token, received from a previous
34434    /// [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
34435    /// call. Provide this to retrieve the subsequent page.
34436    ///
34437    /// When paginating, all other parameters provided to
34438    /// [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]
34439    /// must match the call that provided the page token.
34440    ///
34441    /// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]: crate::client::FeatureOnlineStoreAdminService::list_feature_views
34442    pub page_token: std::string::String,
34443
34444    /// A comma-separated list of fields to order by, sorted in ascending order.
34445    /// Use "desc" after a field name for descending.
34446    ///
34447    /// Supported fields:
34448    ///
34449    /// * `feature_view_id`
34450    /// * `create_time`
34451    /// * `update_time`
34452    pub order_by: std::string::String,
34453
34454    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34455}
34456
34457#[cfg(feature = "feature-online-store-admin-service")]
34458impl ListFeatureViewsRequest {
34459    pub fn new() -> Self {
34460        std::default::Default::default()
34461    }
34462
34463    /// Sets the value of [parent][crate::model::ListFeatureViewsRequest::parent].
34464    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34465        self.parent = v.into();
34466        self
34467    }
34468
34469    /// Sets the value of [filter][crate::model::ListFeatureViewsRequest::filter].
34470    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34471        self.filter = v.into();
34472        self
34473    }
34474
34475    /// Sets the value of [page_size][crate::model::ListFeatureViewsRequest::page_size].
34476    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
34477        self.page_size = v.into();
34478        self
34479    }
34480
34481    /// Sets the value of [page_token][crate::model::ListFeatureViewsRequest::page_token].
34482    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34483        self.page_token = v.into();
34484        self
34485    }
34486
34487    /// Sets the value of [order_by][crate::model::ListFeatureViewsRequest::order_by].
34488    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34489        self.order_by = v.into();
34490        self
34491    }
34492}
34493
34494#[cfg(feature = "feature-online-store-admin-service")]
34495impl wkt::message::Message for ListFeatureViewsRequest {
34496    fn typename() -> &'static str {
34497        "type.googleapis.com/google.cloud.aiplatform.v1.ListFeatureViewsRequest"
34498    }
34499}
34500
34501/// Response message for
34502/// [FeatureOnlineStoreAdminService.ListFeatureViews][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews].
34503///
34504/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViews]: crate::client::FeatureOnlineStoreAdminService::list_feature_views
34505#[cfg(feature = "feature-online-store-admin-service")]
34506#[derive(Clone, Default, PartialEq)]
34507#[non_exhaustive]
34508pub struct ListFeatureViewsResponse {
34509    /// The FeatureViews matching the request.
34510    pub feature_views: std::vec::Vec<crate::model::FeatureView>,
34511
34512    /// A token, which can be sent as
34513    /// [ListFeatureViewsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewsRequest.page_token]
34514    /// to retrieve the next page. If this field is omitted, there are no
34515    /// subsequent pages.
34516    ///
34517    /// [google.cloud.aiplatform.v1.ListFeatureViewsRequest.page_token]: crate::model::ListFeatureViewsRequest::page_token
34518    pub next_page_token: std::string::String,
34519
34520    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34521}
34522
34523#[cfg(feature = "feature-online-store-admin-service")]
34524impl ListFeatureViewsResponse {
34525    pub fn new() -> Self {
34526        std::default::Default::default()
34527    }
34528
34529    /// Sets the value of [feature_views][crate::model::ListFeatureViewsResponse::feature_views].
34530    pub fn set_feature_views<T, V>(mut self, v: T) -> Self
34531    where
34532        T: std::iter::IntoIterator<Item = V>,
34533        V: std::convert::Into<crate::model::FeatureView>,
34534    {
34535        use std::iter::Iterator;
34536        self.feature_views = v.into_iter().map(|i| i.into()).collect();
34537        self
34538    }
34539
34540    /// Sets the value of [next_page_token][crate::model::ListFeatureViewsResponse::next_page_token].
34541    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34542        self.next_page_token = v.into();
34543        self
34544    }
34545}
34546
34547#[cfg(feature = "feature-online-store-admin-service")]
34548impl wkt::message::Message for ListFeatureViewsResponse {
34549    fn typename() -> &'static str {
34550        "type.googleapis.com/google.cloud.aiplatform.v1.ListFeatureViewsResponse"
34551    }
34552}
34553
34554#[cfg(feature = "feature-online-store-admin-service")]
34555#[doc(hidden)]
34556impl gax::paginator::internal::PageableResponse for ListFeatureViewsResponse {
34557    type PageItem = crate::model::FeatureView;
34558
34559    fn items(self) -> std::vec::Vec<Self::PageItem> {
34560        self.feature_views
34561    }
34562
34563    fn next_page_token(&self) -> std::string::String {
34564        use std::clone::Clone;
34565        self.next_page_token.clone()
34566    }
34567}
34568
34569/// Request message for
34570/// [FeatureOnlineStoreAdminService.UpdateFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.UpdateFeatureView].
34571///
34572/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.UpdateFeatureView]: crate::client::FeatureOnlineStoreAdminService::update_feature_view
34573#[cfg(feature = "feature-online-store-admin-service")]
34574#[derive(Clone, Default, PartialEq)]
34575#[non_exhaustive]
34576pub struct UpdateFeatureViewRequest {
34577    /// Required. The FeatureView's `name` field is used to identify the
34578    /// FeatureView to be updated. Format:
34579    /// `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
34580    pub feature_view: std::option::Option<crate::model::FeatureView>,
34581
34582    /// Field mask is used to specify the fields to be overwritten in the
34583    /// FeatureView resource by the update.
34584    /// The fields specified in the update_mask are relative to the resource, not
34585    /// the full request. A field will be overwritten if it is in the mask. If the
34586    /// user does not provide a mask then only the non-empty fields present in the
34587    /// request will be overwritten. Set the update_mask to `*` to override all
34588    /// fields.
34589    ///
34590    /// Updatable fields:
34591    ///
34592    /// * `labels`
34593    /// * `service_agent_type`
34594    /// * `big_query_source`
34595    /// * `big_query_source.uri`
34596    /// * `big_query_source.entity_id_columns`
34597    /// * `feature_registry_source`
34598    /// * `feature_registry_source.feature_groups`
34599    /// * `sync_config`
34600    /// * `sync_config.cron`
34601    /// * `optimized_config.automatic_resources`
34602    pub update_mask: std::option::Option<wkt::FieldMask>,
34603
34604    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34605}
34606
34607#[cfg(feature = "feature-online-store-admin-service")]
34608impl UpdateFeatureViewRequest {
34609    pub fn new() -> Self {
34610        std::default::Default::default()
34611    }
34612
34613    /// Sets the value of [feature_view][crate::model::UpdateFeatureViewRequest::feature_view].
34614    pub fn set_feature_view<T>(mut self, v: T) -> Self
34615    where
34616        T: std::convert::Into<crate::model::FeatureView>,
34617    {
34618        self.feature_view = std::option::Option::Some(v.into());
34619        self
34620    }
34621
34622    /// Sets or clears the value of [feature_view][crate::model::UpdateFeatureViewRequest::feature_view].
34623    pub fn set_or_clear_feature_view<T>(mut self, v: std::option::Option<T>) -> Self
34624    where
34625        T: std::convert::Into<crate::model::FeatureView>,
34626    {
34627        self.feature_view = v.map(|x| x.into());
34628        self
34629    }
34630
34631    /// Sets the value of [update_mask][crate::model::UpdateFeatureViewRequest::update_mask].
34632    pub fn set_update_mask<T>(mut self, v: T) -> Self
34633    where
34634        T: std::convert::Into<wkt::FieldMask>,
34635    {
34636        self.update_mask = std::option::Option::Some(v.into());
34637        self
34638    }
34639
34640    /// Sets or clears the value of [update_mask][crate::model::UpdateFeatureViewRequest::update_mask].
34641    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
34642    where
34643        T: std::convert::Into<wkt::FieldMask>,
34644    {
34645        self.update_mask = v.map(|x| x.into());
34646        self
34647    }
34648}
34649
34650#[cfg(feature = "feature-online-store-admin-service")]
34651impl wkt::message::Message for UpdateFeatureViewRequest {
34652    fn typename() -> &'static str {
34653        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateFeatureViewRequest"
34654    }
34655}
34656
34657/// Request message for
34658/// [FeatureOnlineStoreAdminService.DeleteFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.DeleteFeatureView].
34659///
34660/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.DeleteFeatureView]: crate::client::FeatureOnlineStoreAdminService::delete_feature_view
34661#[cfg(feature = "feature-online-store-admin-service")]
34662#[derive(Clone, Default, PartialEq)]
34663#[non_exhaustive]
34664pub struct DeleteFeatureViewRequest {
34665    /// Required. The name of the FeatureView to be deleted.
34666    /// Format:
34667    /// `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
34668    pub name: std::string::String,
34669
34670    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34671}
34672
34673#[cfg(feature = "feature-online-store-admin-service")]
34674impl DeleteFeatureViewRequest {
34675    pub fn new() -> Self {
34676        std::default::Default::default()
34677    }
34678
34679    /// Sets the value of [name][crate::model::DeleteFeatureViewRequest::name].
34680    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34681        self.name = v.into();
34682        self
34683    }
34684}
34685
34686#[cfg(feature = "feature-online-store-admin-service")]
34687impl wkt::message::Message for DeleteFeatureViewRequest {
34688    fn typename() -> &'static str {
34689        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteFeatureViewRequest"
34690    }
34691}
34692
34693/// Details of operations that perform create FeatureOnlineStore.
34694#[cfg(feature = "feature-online-store-admin-service")]
34695#[derive(Clone, Default, PartialEq)]
34696#[non_exhaustive]
34697pub struct CreateFeatureOnlineStoreOperationMetadata {
34698    /// Operation metadata for FeatureOnlineStore.
34699    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
34700
34701    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34702}
34703
34704#[cfg(feature = "feature-online-store-admin-service")]
34705impl CreateFeatureOnlineStoreOperationMetadata {
34706    pub fn new() -> Self {
34707        std::default::Default::default()
34708    }
34709
34710    /// Sets the value of [generic_metadata][crate::model::CreateFeatureOnlineStoreOperationMetadata::generic_metadata].
34711    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
34712    where
34713        T: std::convert::Into<crate::model::GenericOperationMetadata>,
34714    {
34715        self.generic_metadata = std::option::Option::Some(v.into());
34716        self
34717    }
34718
34719    /// Sets or clears the value of [generic_metadata][crate::model::CreateFeatureOnlineStoreOperationMetadata::generic_metadata].
34720    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
34721    where
34722        T: std::convert::Into<crate::model::GenericOperationMetadata>,
34723    {
34724        self.generic_metadata = v.map(|x| x.into());
34725        self
34726    }
34727}
34728
34729#[cfg(feature = "feature-online-store-admin-service")]
34730impl wkt::message::Message for CreateFeatureOnlineStoreOperationMetadata {
34731    fn typename() -> &'static str {
34732        "type.googleapis.com/google.cloud.aiplatform.v1.CreateFeatureOnlineStoreOperationMetadata"
34733    }
34734}
34735
34736/// Details of operations that perform update FeatureOnlineStore.
34737#[cfg(feature = "feature-online-store-admin-service")]
34738#[derive(Clone, Default, PartialEq)]
34739#[non_exhaustive]
34740pub struct UpdateFeatureOnlineStoreOperationMetadata {
34741    /// Operation metadata for FeatureOnlineStore.
34742    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
34743
34744    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34745}
34746
34747#[cfg(feature = "feature-online-store-admin-service")]
34748impl UpdateFeatureOnlineStoreOperationMetadata {
34749    pub fn new() -> Self {
34750        std::default::Default::default()
34751    }
34752
34753    /// Sets the value of [generic_metadata][crate::model::UpdateFeatureOnlineStoreOperationMetadata::generic_metadata].
34754    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
34755    where
34756        T: std::convert::Into<crate::model::GenericOperationMetadata>,
34757    {
34758        self.generic_metadata = std::option::Option::Some(v.into());
34759        self
34760    }
34761
34762    /// Sets or clears the value of [generic_metadata][crate::model::UpdateFeatureOnlineStoreOperationMetadata::generic_metadata].
34763    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
34764    where
34765        T: std::convert::Into<crate::model::GenericOperationMetadata>,
34766    {
34767        self.generic_metadata = v.map(|x| x.into());
34768        self
34769    }
34770}
34771
34772#[cfg(feature = "feature-online-store-admin-service")]
34773impl wkt::message::Message for UpdateFeatureOnlineStoreOperationMetadata {
34774    fn typename() -> &'static str {
34775        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata"
34776    }
34777}
34778
34779/// Details of operations that perform create FeatureView.
34780#[cfg(feature = "feature-online-store-admin-service")]
34781#[derive(Clone, Default, PartialEq)]
34782#[non_exhaustive]
34783pub struct CreateFeatureViewOperationMetadata {
34784    /// Operation metadata for FeatureView Create.
34785    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
34786
34787    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34788}
34789
34790#[cfg(feature = "feature-online-store-admin-service")]
34791impl CreateFeatureViewOperationMetadata {
34792    pub fn new() -> Self {
34793        std::default::Default::default()
34794    }
34795
34796    /// Sets the value of [generic_metadata][crate::model::CreateFeatureViewOperationMetadata::generic_metadata].
34797    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
34798    where
34799        T: std::convert::Into<crate::model::GenericOperationMetadata>,
34800    {
34801        self.generic_metadata = std::option::Option::Some(v.into());
34802        self
34803    }
34804
34805    /// Sets or clears the value of [generic_metadata][crate::model::CreateFeatureViewOperationMetadata::generic_metadata].
34806    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
34807    where
34808        T: std::convert::Into<crate::model::GenericOperationMetadata>,
34809    {
34810        self.generic_metadata = v.map(|x| x.into());
34811        self
34812    }
34813}
34814
34815#[cfg(feature = "feature-online-store-admin-service")]
34816impl wkt::message::Message for CreateFeatureViewOperationMetadata {
34817    fn typename() -> &'static str {
34818        "type.googleapis.com/google.cloud.aiplatform.v1.CreateFeatureViewOperationMetadata"
34819    }
34820}
34821
34822/// Details of operations that perform update FeatureView.
34823#[cfg(feature = "feature-online-store-admin-service")]
34824#[derive(Clone, Default, PartialEq)]
34825#[non_exhaustive]
34826pub struct UpdateFeatureViewOperationMetadata {
34827    /// Operation metadata for FeatureView Update.
34828    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
34829
34830    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34831}
34832
34833#[cfg(feature = "feature-online-store-admin-service")]
34834impl UpdateFeatureViewOperationMetadata {
34835    pub fn new() -> Self {
34836        std::default::Default::default()
34837    }
34838
34839    /// Sets the value of [generic_metadata][crate::model::UpdateFeatureViewOperationMetadata::generic_metadata].
34840    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
34841    where
34842        T: std::convert::Into<crate::model::GenericOperationMetadata>,
34843    {
34844        self.generic_metadata = std::option::Option::Some(v.into());
34845        self
34846    }
34847
34848    /// Sets or clears the value of [generic_metadata][crate::model::UpdateFeatureViewOperationMetadata::generic_metadata].
34849    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
34850    where
34851        T: std::convert::Into<crate::model::GenericOperationMetadata>,
34852    {
34853        self.generic_metadata = v.map(|x| x.into());
34854        self
34855    }
34856}
34857
34858#[cfg(feature = "feature-online-store-admin-service")]
34859impl wkt::message::Message for UpdateFeatureViewOperationMetadata {
34860    fn typename() -> &'static str {
34861        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateFeatureViewOperationMetadata"
34862    }
34863}
34864
34865/// Request message for
34866/// [FeatureOnlineStoreAdminService.SyncFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.SyncFeatureView].
34867///
34868/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.SyncFeatureView]: crate::client::FeatureOnlineStoreAdminService::sync_feature_view
34869#[cfg(feature = "feature-online-store-admin-service")]
34870#[derive(Clone, Default, PartialEq)]
34871#[non_exhaustive]
34872pub struct SyncFeatureViewRequest {
34873    /// Required. Format:
34874    /// `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
34875    pub feature_view: std::string::String,
34876
34877    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34878}
34879
34880#[cfg(feature = "feature-online-store-admin-service")]
34881impl SyncFeatureViewRequest {
34882    pub fn new() -> Self {
34883        std::default::Default::default()
34884    }
34885
34886    /// Sets the value of [feature_view][crate::model::SyncFeatureViewRequest::feature_view].
34887    pub fn set_feature_view<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34888        self.feature_view = v.into();
34889        self
34890    }
34891}
34892
34893#[cfg(feature = "feature-online-store-admin-service")]
34894impl wkt::message::Message for SyncFeatureViewRequest {
34895    fn typename() -> &'static str {
34896        "type.googleapis.com/google.cloud.aiplatform.v1.SyncFeatureViewRequest"
34897    }
34898}
34899
34900/// Response message for
34901/// [FeatureOnlineStoreAdminService.SyncFeatureView][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.SyncFeatureView].
34902///
34903/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.SyncFeatureView]: crate::client::FeatureOnlineStoreAdminService::sync_feature_view
34904#[cfg(feature = "feature-online-store-admin-service")]
34905#[derive(Clone, Default, PartialEq)]
34906#[non_exhaustive]
34907pub struct SyncFeatureViewResponse {
34908    /// Format:
34909    /// `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
34910    pub feature_view_sync: std::string::String,
34911
34912    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34913}
34914
34915#[cfg(feature = "feature-online-store-admin-service")]
34916impl SyncFeatureViewResponse {
34917    pub fn new() -> Self {
34918        std::default::Default::default()
34919    }
34920
34921    /// Sets the value of [feature_view_sync][crate::model::SyncFeatureViewResponse::feature_view_sync].
34922    pub fn set_feature_view_sync<T: std::convert::Into<std::string::String>>(
34923        mut self,
34924        v: T,
34925    ) -> Self {
34926        self.feature_view_sync = v.into();
34927        self
34928    }
34929}
34930
34931#[cfg(feature = "feature-online-store-admin-service")]
34932impl wkt::message::Message for SyncFeatureViewResponse {
34933    fn typename() -> &'static str {
34934        "type.googleapis.com/google.cloud.aiplatform.v1.SyncFeatureViewResponse"
34935    }
34936}
34937
34938/// Request message for
34939/// [FeatureOnlineStoreAdminService.GetFeatureViewSync][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureViewSync].
34940///
34941/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.GetFeatureViewSync]: crate::client::FeatureOnlineStoreAdminService::get_feature_view_sync
34942#[cfg(feature = "feature-online-store-admin-service")]
34943#[derive(Clone, Default, PartialEq)]
34944#[non_exhaustive]
34945pub struct GetFeatureViewSyncRequest {
34946    /// Required. The name of the FeatureViewSync resource.
34947    /// Format:
34948    /// `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
34949    pub name: std::string::String,
34950
34951    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34952}
34953
34954#[cfg(feature = "feature-online-store-admin-service")]
34955impl GetFeatureViewSyncRequest {
34956    pub fn new() -> Self {
34957        std::default::Default::default()
34958    }
34959
34960    /// Sets the value of [name][crate::model::GetFeatureViewSyncRequest::name].
34961    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34962        self.name = v.into();
34963        self
34964    }
34965}
34966
34967#[cfg(feature = "feature-online-store-admin-service")]
34968impl wkt::message::Message for GetFeatureViewSyncRequest {
34969    fn typename() -> &'static str {
34970        "type.googleapis.com/google.cloud.aiplatform.v1.GetFeatureViewSyncRequest"
34971    }
34972}
34973
34974/// Request message for
34975/// [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs].
34976///
34977/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]: crate::client::FeatureOnlineStoreAdminService::list_feature_view_syncs
34978#[cfg(feature = "feature-online-store-admin-service")]
34979#[derive(Clone, Default, PartialEq)]
34980#[non_exhaustive]
34981pub struct ListFeatureViewSyncsRequest {
34982    /// Required. The resource name of the FeatureView to list FeatureViewSyncs.
34983    /// Format:
34984    /// `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
34985    pub parent: std::string::String,
34986
34987    /// Lists the FeatureViewSyncs that match the filter expression. The following
34988    /// filters are supported:
34989    ///
34990    /// * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
34991    ///   Values must be in RFC 3339 format.
34992    ///
34993    /// Examples:
34994    ///
34995    /// * `create_time > \"2020-01-31T15:30:00.000000Z\"` --> FeatureViewSyncs
34996    ///   created after 2020-01-31T15:30:00.000000Z.
34997    pub filter: std::string::String,
34998
34999    /// The maximum number of FeatureViewSyncs to return. The service may return
35000    /// fewer than this value. If unspecified, at most 1000 FeatureViewSyncs will
35001    /// be returned. The maximum value is 1000; any value greater than 1000 will be
35002    /// coerced to 1000.
35003    pub page_size: i32,
35004
35005    /// A page token, received from a previous
35006    /// [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
35007    /// call. Provide this to retrieve the subsequent page.
35008    ///
35009    /// When paginating, all other parameters provided to
35010    /// [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]
35011    /// must match the call that provided the page token.
35012    ///
35013    /// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]: crate::client::FeatureOnlineStoreAdminService::list_feature_view_syncs
35014    pub page_token: std::string::String,
35015
35016    /// A comma-separated list of fields to order by, sorted in ascending order.
35017    /// Use "desc" after a field name for descending.
35018    ///
35019    /// Supported fields:
35020    ///
35021    /// * `create_time`
35022    pub order_by: std::string::String,
35023
35024    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35025}
35026
35027#[cfg(feature = "feature-online-store-admin-service")]
35028impl ListFeatureViewSyncsRequest {
35029    pub fn new() -> Self {
35030        std::default::Default::default()
35031    }
35032
35033    /// Sets the value of [parent][crate::model::ListFeatureViewSyncsRequest::parent].
35034    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35035        self.parent = v.into();
35036        self
35037    }
35038
35039    /// Sets the value of [filter][crate::model::ListFeatureViewSyncsRequest::filter].
35040    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35041        self.filter = v.into();
35042        self
35043    }
35044
35045    /// Sets the value of [page_size][crate::model::ListFeatureViewSyncsRequest::page_size].
35046    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
35047        self.page_size = v.into();
35048        self
35049    }
35050
35051    /// Sets the value of [page_token][crate::model::ListFeatureViewSyncsRequest::page_token].
35052    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35053        self.page_token = v.into();
35054        self
35055    }
35056
35057    /// Sets the value of [order_by][crate::model::ListFeatureViewSyncsRequest::order_by].
35058    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35059        self.order_by = v.into();
35060        self
35061    }
35062}
35063
35064#[cfg(feature = "feature-online-store-admin-service")]
35065impl wkt::message::Message for ListFeatureViewSyncsRequest {
35066    fn typename() -> &'static str {
35067        "type.googleapis.com/google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest"
35068    }
35069}
35070
35071/// Response message for
35072/// [FeatureOnlineStoreAdminService.ListFeatureViewSyncs][google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs].
35073///
35074/// [google.cloud.aiplatform.v1.FeatureOnlineStoreAdminService.ListFeatureViewSyncs]: crate::client::FeatureOnlineStoreAdminService::list_feature_view_syncs
35075#[cfg(feature = "feature-online-store-admin-service")]
35076#[derive(Clone, Default, PartialEq)]
35077#[non_exhaustive]
35078pub struct ListFeatureViewSyncsResponse {
35079    /// The FeatureViewSyncs matching the request.
35080    pub feature_view_syncs: std::vec::Vec<crate::model::FeatureViewSync>,
35081
35082    /// A token, which can be sent as
35083    /// [ListFeatureViewSyncsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.page_token]
35084    /// to retrieve the next page. If this field is omitted, there are no
35085    /// subsequent pages.
35086    ///
35087    /// [google.cloud.aiplatform.v1.ListFeatureViewSyncsRequest.page_token]: crate::model::ListFeatureViewSyncsRequest::page_token
35088    pub next_page_token: std::string::String,
35089
35090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35091}
35092
35093#[cfg(feature = "feature-online-store-admin-service")]
35094impl ListFeatureViewSyncsResponse {
35095    pub fn new() -> Self {
35096        std::default::Default::default()
35097    }
35098
35099    /// Sets the value of [feature_view_syncs][crate::model::ListFeatureViewSyncsResponse::feature_view_syncs].
35100    pub fn set_feature_view_syncs<T, V>(mut self, v: T) -> Self
35101    where
35102        T: std::iter::IntoIterator<Item = V>,
35103        V: std::convert::Into<crate::model::FeatureViewSync>,
35104    {
35105        use std::iter::Iterator;
35106        self.feature_view_syncs = v.into_iter().map(|i| i.into()).collect();
35107        self
35108    }
35109
35110    /// Sets the value of [next_page_token][crate::model::ListFeatureViewSyncsResponse::next_page_token].
35111    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35112        self.next_page_token = v.into();
35113        self
35114    }
35115}
35116
35117#[cfg(feature = "feature-online-store-admin-service")]
35118impl wkt::message::Message for ListFeatureViewSyncsResponse {
35119    fn typename() -> &'static str {
35120        "type.googleapis.com/google.cloud.aiplatform.v1.ListFeatureViewSyncsResponse"
35121    }
35122}
35123
35124#[cfg(feature = "feature-online-store-admin-service")]
35125#[doc(hidden)]
35126impl gax::paginator::internal::PageableResponse for ListFeatureViewSyncsResponse {
35127    type PageItem = crate::model::FeatureViewSync;
35128
35129    fn items(self) -> std::vec::Vec<Self::PageItem> {
35130        self.feature_view_syncs
35131    }
35132
35133    fn next_page_token(&self) -> std::string::String {
35134        use std::clone::Clone;
35135        self.next_page_token.clone()
35136    }
35137}
35138
35139/// Lookup key for a feature view.
35140#[cfg(feature = "feature-online-store-service")]
35141#[derive(Clone, Default, PartialEq)]
35142#[non_exhaustive]
35143pub struct FeatureViewDataKey {
35144    pub key_oneof: std::option::Option<crate::model::feature_view_data_key::KeyOneof>,
35145
35146    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35147}
35148
35149#[cfg(feature = "feature-online-store-service")]
35150impl FeatureViewDataKey {
35151    pub fn new() -> Self {
35152        std::default::Default::default()
35153    }
35154
35155    /// Sets the value of [key_oneof][crate::model::FeatureViewDataKey::key_oneof].
35156    ///
35157    /// Note that all the setters affecting `key_oneof` are mutually
35158    /// exclusive.
35159    pub fn set_key_oneof<
35160        T: std::convert::Into<std::option::Option<crate::model::feature_view_data_key::KeyOneof>>,
35161    >(
35162        mut self,
35163        v: T,
35164    ) -> Self {
35165        self.key_oneof = v.into();
35166        self
35167    }
35168
35169    /// The value of [key_oneof][crate::model::FeatureViewDataKey::key_oneof]
35170    /// if it holds a `Key`, `None` if the field is not set or
35171    /// holds a different branch.
35172    pub fn key(&self) -> std::option::Option<&std::string::String> {
35173        #[allow(unreachable_patterns)]
35174        self.key_oneof.as_ref().and_then(|v| match v {
35175            crate::model::feature_view_data_key::KeyOneof::Key(v) => std::option::Option::Some(v),
35176            _ => std::option::Option::None,
35177        })
35178    }
35179
35180    /// Sets the value of [key_oneof][crate::model::FeatureViewDataKey::key_oneof]
35181    /// to hold a `Key`.
35182    ///
35183    /// Note that all the setters affecting `key_oneof` are
35184    /// mutually exclusive.
35185    pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35186        self.key_oneof =
35187            std::option::Option::Some(crate::model::feature_view_data_key::KeyOneof::Key(v.into()));
35188        self
35189    }
35190
35191    /// The value of [key_oneof][crate::model::FeatureViewDataKey::key_oneof]
35192    /// if it holds a `CompositeKey`, `None` if the field is not set or
35193    /// holds a different branch.
35194    pub fn composite_key(
35195        &self,
35196    ) -> std::option::Option<&std::boxed::Box<crate::model::feature_view_data_key::CompositeKey>>
35197    {
35198        #[allow(unreachable_patterns)]
35199        self.key_oneof.as_ref().and_then(|v| match v {
35200            crate::model::feature_view_data_key::KeyOneof::CompositeKey(v) => {
35201                std::option::Option::Some(v)
35202            }
35203            _ => std::option::Option::None,
35204        })
35205    }
35206
35207    /// Sets the value of [key_oneof][crate::model::FeatureViewDataKey::key_oneof]
35208    /// to hold a `CompositeKey`.
35209    ///
35210    /// Note that all the setters affecting `key_oneof` are
35211    /// mutually exclusive.
35212    pub fn set_composite_key<
35213        T: std::convert::Into<std::boxed::Box<crate::model::feature_view_data_key::CompositeKey>>,
35214    >(
35215        mut self,
35216        v: T,
35217    ) -> Self {
35218        self.key_oneof = std::option::Option::Some(
35219            crate::model::feature_view_data_key::KeyOneof::CompositeKey(v.into()),
35220        );
35221        self
35222    }
35223}
35224
35225#[cfg(feature = "feature-online-store-service")]
35226impl wkt::message::Message for FeatureViewDataKey {
35227    fn typename() -> &'static str {
35228        "type.googleapis.com/google.cloud.aiplatform.v1.FeatureViewDataKey"
35229    }
35230}
35231
35232/// Defines additional types related to [FeatureViewDataKey].
35233#[cfg(feature = "feature-online-store-service")]
35234pub mod feature_view_data_key {
35235    #[allow(unused_imports)]
35236    use super::*;
35237
35238    /// ID that is comprised from several parts (columns).
35239    #[cfg(feature = "feature-online-store-service")]
35240    #[derive(Clone, Default, PartialEq)]
35241    #[non_exhaustive]
35242    pub struct CompositeKey {
35243        /// Parts to construct Entity ID. Should match with the same ID columns as
35244        /// defined in FeatureView in the same order.
35245        pub parts: std::vec::Vec<std::string::String>,
35246
35247        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35248    }
35249
35250    #[cfg(feature = "feature-online-store-service")]
35251    impl CompositeKey {
35252        pub fn new() -> Self {
35253            std::default::Default::default()
35254        }
35255
35256        /// Sets the value of [parts][crate::model::feature_view_data_key::CompositeKey::parts].
35257        pub fn set_parts<T, V>(mut self, v: T) -> Self
35258        where
35259            T: std::iter::IntoIterator<Item = V>,
35260            V: std::convert::Into<std::string::String>,
35261        {
35262            use std::iter::Iterator;
35263            self.parts = v.into_iter().map(|i| i.into()).collect();
35264            self
35265        }
35266    }
35267
35268    #[cfg(feature = "feature-online-store-service")]
35269    impl wkt::message::Message for CompositeKey {
35270        fn typename() -> &'static str {
35271            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureViewDataKey.CompositeKey"
35272        }
35273    }
35274
35275    #[cfg(feature = "feature-online-store-service")]
35276    #[derive(Clone, Debug, PartialEq)]
35277    #[non_exhaustive]
35278    pub enum KeyOneof {
35279        /// String key to use for lookup.
35280        Key(std::string::String),
35281        /// The actual Entity ID will be composed from this struct. This should match
35282        /// with the way ID is defined in the FeatureView spec.
35283        CompositeKey(std::boxed::Box<crate::model::feature_view_data_key::CompositeKey>),
35284    }
35285}
35286
35287/// Request message for
35288/// [FeatureOnlineStoreService.FetchFeatureValues][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FetchFeatureValues].
35289/// All the features under the requested feature view will be returned.
35290///
35291/// [google.cloud.aiplatform.v1.FeatureOnlineStoreService.FetchFeatureValues]: crate::client::FeatureOnlineStoreService::fetch_feature_values
35292#[cfg(feature = "feature-online-store-service")]
35293#[derive(Clone, Default, PartialEq)]
35294#[non_exhaustive]
35295pub struct FetchFeatureValuesRequest {
35296    /// Required. FeatureView resource format
35297    /// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
35298    pub feature_view: std::string::String,
35299
35300    /// Optional. The request key to fetch feature values for.
35301    pub data_key: std::option::Option<crate::model::FeatureViewDataKey>,
35302
35303    /// Optional. Response data format. If not set,
35304    /// [FeatureViewDataFormat.KEY_VALUE][google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]
35305    /// will be used.
35306    ///
35307    /// [google.cloud.aiplatform.v1.FeatureViewDataFormat.KEY_VALUE]: crate::model::FeatureViewDataFormat::KeyValue
35308    pub data_format: crate::model::FeatureViewDataFormat,
35309
35310    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35311}
35312
35313#[cfg(feature = "feature-online-store-service")]
35314impl FetchFeatureValuesRequest {
35315    pub fn new() -> Self {
35316        std::default::Default::default()
35317    }
35318
35319    /// Sets the value of [feature_view][crate::model::FetchFeatureValuesRequest::feature_view].
35320    pub fn set_feature_view<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35321        self.feature_view = v.into();
35322        self
35323    }
35324
35325    /// Sets the value of [data_key][crate::model::FetchFeatureValuesRequest::data_key].
35326    pub fn set_data_key<T>(mut self, v: T) -> Self
35327    where
35328        T: std::convert::Into<crate::model::FeatureViewDataKey>,
35329    {
35330        self.data_key = std::option::Option::Some(v.into());
35331        self
35332    }
35333
35334    /// Sets or clears the value of [data_key][crate::model::FetchFeatureValuesRequest::data_key].
35335    pub fn set_or_clear_data_key<T>(mut self, v: std::option::Option<T>) -> Self
35336    where
35337        T: std::convert::Into<crate::model::FeatureViewDataKey>,
35338    {
35339        self.data_key = v.map(|x| x.into());
35340        self
35341    }
35342
35343    /// Sets the value of [data_format][crate::model::FetchFeatureValuesRequest::data_format].
35344    pub fn set_data_format<T: std::convert::Into<crate::model::FeatureViewDataFormat>>(
35345        mut self,
35346        v: T,
35347    ) -> Self {
35348        self.data_format = v.into();
35349        self
35350    }
35351}
35352
35353#[cfg(feature = "feature-online-store-service")]
35354impl wkt::message::Message for FetchFeatureValuesRequest {
35355    fn typename() -> &'static str {
35356        "type.googleapis.com/google.cloud.aiplatform.v1.FetchFeatureValuesRequest"
35357    }
35358}
35359
35360/// Response message for
35361/// [FeatureOnlineStoreService.FetchFeatureValues][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FetchFeatureValues]
35362///
35363/// [google.cloud.aiplatform.v1.FeatureOnlineStoreService.FetchFeatureValues]: crate::client::FeatureOnlineStoreService::fetch_feature_values
35364#[cfg(feature = "feature-online-store-service")]
35365#[derive(Clone, Default, PartialEq)]
35366#[non_exhaustive]
35367pub struct FetchFeatureValuesResponse {
35368    /// The data key associated with this response.
35369    /// Will only be populated for
35370    /// [FeatureOnlineStoreService.StreamingFetchFeatureValues][] RPCs.
35371    pub data_key: std::option::Option<crate::model::FeatureViewDataKey>,
35372
35373    pub format: std::option::Option<crate::model::fetch_feature_values_response::Format>,
35374
35375    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35376}
35377
35378#[cfg(feature = "feature-online-store-service")]
35379impl FetchFeatureValuesResponse {
35380    pub fn new() -> Self {
35381        std::default::Default::default()
35382    }
35383
35384    /// Sets the value of [data_key][crate::model::FetchFeatureValuesResponse::data_key].
35385    pub fn set_data_key<T>(mut self, v: T) -> Self
35386    where
35387        T: std::convert::Into<crate::model::FeatureViewDataKey>,
35388    {
35389        self.data_key = std::option::Option::Some(v.into());
35390        self
35391    }
35392
35393    /// Sets or clears the value of [data_key][crate::model::FetchFeatureValuesResponse::data_key].
35394    pub fn set_or_clear_data_key<T>(mut self, v: std::option::Option<T>) -> Self
35395    where
35396        T: std::convert::Into<crate::model::FeatureViewDataKey>,
35397    {
35398        self.data_key = v.map(|x| x.into());
35399        self
35400    }
35401
35402    /// Sets the value of [format][crate::model::FetchFeatureValuesResponse::format].
35403    ///
35404    /// Note that all the setters affecting `format` are mutually
35405    /// exclusive.
35406    pub fn set_format<
35407        T: std::convert::Into<
35408                std::option::Option<crate::model::fetch_feature_values_response::Format>,
35409            >,
35410    >(
35411        mut self,
35412        v: T,
35413    ) -> Self {
35414        self.format = v.into();
35415        self
35416    }
35417
35418    /// The value of [format][crate::model::FetchFeatureValuesResponse::format]
35419    /// if it holds a `KeyValues`, `None` if the field is not set or
35420    /// holds a different branch.
35421    pub fn key_values(
35422        &self,
35423    ) -> std::option::Option<
35424        &std::boxed::Box<crate::model::fetch_feature_values_response::FeatureNameValuePairList>,
35425    > {
35426        #[allow(unreachable_patterns)]
35427        self.format.as_ref().and_then(|v| match v {
35428            crate::model::fetch_feature_values_response::Format::KeyValues(v) => {
35429                std::option::Option::Some(v)
35430            }
35431            _ => std::option::Option::None,
35432        })
35433    }
35434
35435    /// Sets the value of [format][crate::model::FetchFeatureValuesResponse::format]
35436    /// to hold a `KeyValues`.
35437    ///
35438    /// Note that all the setters affecting `format` are
35439    /// mutually exclusive.
35440    pub fn set_key_values<
35441        T: std::convert::Into<
35442                std::boxed::Box<
35443                    crate::model::fetch_feature_values_response::FeatureNameValuePairList,
35444                >,
35445            >,
35446    >(
35447        mut self,
35448        v: T,
35449    ) -> Self {
35450        self.format = std::option::Option::Some(
35451            crate::model::fetch_feature_values_response::Format::KeyValues(v.into()),
35452        );
35453        self
35454    }
35455
35456    /// The value of [format][crate::model::FetchFeatureValuesResponse::format]
35457    /// if it holds a `ProtoStruct`, `None` if the field is not set or
35458    /// holds a different branch.
35459    pub fn proto_struct(&self) -> std::option::Option<&std::boxed::Box<wkt::Struct>> {
35460        #[allow(unreachable_patterns)]
35461        self.format.as_ref().and_then(|v| match v {
35462            crate::model::fetch_feature_values_response::Format::ProtoStruct(v) => {
35463                std::option::Option::Some(v)
35464            }
35465            _ => std::option::Option::None,
35466        })
35467    }
35468
35469    /// Sets the value of [format][crate::model::FetchFeatureValuesResponse::format]
35470    /// to hold a `ProtoStruct`.
35471    ///
35472    /// Note that all the setters affecting `format` are
35473    /// mutually exclusive.
35474    pub fn set_proto_struct<T: std::convert::Into<std::boxed::Box<wkt::Struct>>>(
35475        mut self,
35476        v: T,
35477    ) -> Self {
35478        self.format = std::option::Option::Some(
35479            crate::model::fetch_feature_values_response::Format::ProtoStruct(v.into()),
35480        );
35481        self
35482    }
35483}
35484
35485#[cfg(feature = "feature-online-store-service")]
35486impl wkt::message::Message for FetchFeatureValuesResponse {
35487    fn typename() -> &'static str {
35488        "type.googleapis.com/google.cloud.aiplatform.v1.FetchFeatureValuesResponse"
35489    }
35490}
35491
35492/// Defines additional types related to [FetchFeatureValuesResponse].
35493#[cfg(feature = "feature-online-store-service")]
35494pub mod fetch_feature_values_response {
35495    #[allow(unused_imports)]
35496    use super::*;
35497
35498    /// Response structure in the format of key (feature name) and (feature) value
35499    /// pair.
35500    #[cfg(feature = "feature-online-store-service")]
35501    #[derive(Clone, Default, PartialEq)]
35502    #[non_exhaustive]
35503    pub struct FeatureNameValuePairList {
35504
35505        /// List of feature names and values.
35506        pub features: std::vec::Vec<crate::model::fetch_feature_values_response::feature_name_value_pair_list::FeatureNameValuePair>,
35507
35508        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35509    }
35510
35511    #[cfg(feature = "feature-online-store-service")]
35512    impl FeatureNameValuePairList {
35513        pub fn new() -> Self {
35514            std::default::Default::default()
35515        }
35516
35517        /// Sets the value of [features][crate::model::fetch_feature_values_response::FeatureNameValuePairList::features].
35518        pub fn set_features<T, V>(mut self, v: T) -> Self
35519        where
35520            T: std::iter::IntoIterator<Item = V>,
35521            V: std::convert::Into<crate::model::fetch_feature_values_response::feature_name_value_pair_list::FeatureNameValuePair>
35522        {
35523            use std::iter::Iterator;
35524            self.features = v.into_iter().map(|i| i.into()).collect();
35525            self
35526        }
35527    }
35528
35529    #[cfg(feature = "feature-online-store-service")]
35530    impl wkt::message::Message for FeatureNameValuePairList {
35531        fn typename() -> &'static str {
35532            "type.googleapis.com/google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList"
35533        }
35534    }
35535
35536    /// Defines additional types related to [FeatureNameValuePairList].
35537    #[cfg(feature = "feature-online-store-service")]
35538    pub mod feature_name_value_pair_list {
35539        #[allow(unused_imports)]
35540        use super::*;
35541
35542        /// Feature name & value pair.
35543        #[cfg(feature = "feature-online-store-service")]
35544        #[derive(Clone, Default, PartialEq)]
35545        #[non_exhaustive]
35546        pub struct FeatureNameValuePair {
35547
35548            /// Feature short name.
35549            pub name: std::string::String,
35550
35551            pub data: std::option::Option<crate::model::fetch_feature_values_response::feature_name_value_pair_list::feature_name_value_pair::Data>,
35552
35553            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35554        }
35555
35556        #[cfg(feature = "feature-online-store-service")]
35557        impl FeatureNameValuePair {
35558            pub fn new() -> Self {
35559                std::default::Default::default()
35560            }
35561
35562            /// Sets the value of [name][crate::model::fetch_feature_values_response::feature_name_value_pair_list::FeatureNameValuePair::name].
35563            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35564                self.name = v.into();
35565                self
35566            }
35567
35568            /// Sets the value of [data][crate::model::fetch_feature_values_response::feature_name_value_pair_list::FeatureNameValuePair::data].
35569            ///
35570            /// Note that all the setters affecting `data` are mutually
35571            /// exclusive.
35572            pub fn set_data<T: std::convert::Into<std::option::Option<crate::model::fetch_feature_values_response::feature_name_value_pair_list::feature_name_value_pair::Data>>>(mut self, v: T) -> Self
35573            {
35574                self.data = v.into();
35575                self
35576            }
35577
35578            /// The value of [data][crate::model::fetch_feature_values_response::feature_name_value_pair_list::FeatureNameValuePair::data]
35579            /// if it holds a `Value`, `None` if the field is not set or
35580            /// holds a different branch.
35581            pub fn value(
35582                &self,
35583            ) -> std::option::Option<&std::boxed::Box<crate::model::FeatureValue>> {
35584                #[allow(unreachable_patterns)]
35585                self.data.as_ref().and_then(|v| match v {
35586                    crate::model::fetch_feature_values_response::feature_name_value_pair_list::feature_name_value_pair::Data::Value(v) => std::option::Option::Some(v),
35587                    _ => std::option::Option::None,
35588                })
35589            }
35590
35591            /// Sets the value of [data][crate::model::fetch_feature_values_response::feature_name_value_pair_list::FeatureNameValuePair::data]
35592            /// to hold a `Value`.
35593            ///
35594            /// Note that all the setters affecting `data` are
35595            /// mutually exclusive.
35596            pub fn set_value<T: std::convert::Into<std::boxed::Box<crate::model::FeatureValue>>>(
35597                mut self,
35598                v: T,
35599            ) -> Self {
35600                self.data = std::option::Option::Some(
35601                    crate::model::fetch_feature_values_response::feature_name_value_pair_list::feature_name_value_pair::Data::Value(
35602                        v.into()
35603                    )
35604                );
35605                self
35606            }
35607        }
35608
35609        #[cfg(feature = "feature-online-store-service")]
35610        impl wkt::message::Message for FeatureNameValuePair {
35611            fn typename() -> &'static str {
35612                "type.googleapis.com/google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.FeatureNameValuePair"
35613            }
35614        }
35615
35616        /// Defines additional types related to [FeatureNameValuePair].
35617        #[cfg(feature = "feature-online-store-service")]
35618        pub mod feature_name_value_pair {
35619            #[allow(unused_imports)]
35620            use super::*;
35621
35622            #[cfg(feature = "feature-online-store-service")]
35623            #[derive(Clone, Debug, PartialEq)]
35624            #[non_exhaustive]
35625            pub enum Data {
35626                /// Feature value.
35627                Value(std::boxed::Box<crate::model::FeatureValue>),
35628            }
35629        }
35630    }
35631
35632    #[cfg(feature = "feature-online-store-service")]
35633    #[derive(Clone, Debug, PartialEq)]
35634    #[non_exhaustive]
35635    pub enum Format {
35636        /// Feature values in KeyValue format.
35637        KeyValues(
35638            std::boxed::Box<crate::model::fetch_feature_values_response::FeatureNameValuePairList>,
35639        ),
35640        /// Feature values in proto Struct format.
35641        ProtoStruct(std::boxed::Box<wkt::Struct>),
35642    }
35643}
35644
35645/// A query to find a number of similar entities.
35646#[cfg(feature = "feature-online-store-service")]
35647#[derive(Clone, Default, PartialEq)]
35648#[non_exhaustive]
35649pub struct NearestNeighborQuery {
35650    /// Optional. The number of similar entities to be retrieved from feature view
35651    /// for each query.
35652    pub neighbor_count: i32,
35653
35654    /// Optional. The list of string filters.
35655    pub string_filters: std::vec::Vec<crate::model::nearest_neighbor_query::StringFilter>,
35656
35657    /// Optional. The list of numeric filters.
35658    pub numeric_filters: std::vec::Vec<crate::model::nearest_neighbor_query::NumericFilter>,
35659
35660    /// Optional. Crowding is a constraint on a neighbor list produced by nearest
35661    /// neighbor search requiring that no more than
35662    /// sper_crowding_attribute_neighbor_count of the k neighbors returned have the
35663    /// same value of crowding_attribute. It's used for improving result diversity.
35664    pub per_crowding_attribute_neighbor_count: i32,
35665
35666    /// Optional. Parameters that can be set to tune query on the fly.
35667    pub parameters: std::option::Option<crate::model::nearest_neighbor_query::Parameters>,
35668
35669    pub instance: std::option::Option<crate::model::nearest_neighbor_query::Instance>,
35670
35671    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35672}
35673
35674#[cfg(feature = "feature-online-store-service")]
35675impl NearestNeighborQuery {
35676    pub fn new() -> Self {
35677        std::default::Default::default()
35678    }
35679
35680    /// Sets the value of [neighbor_count][crate::model::NearestNeighborQuery::neighbor_count].
35681    pub fn set_neighbor_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
35682        self.neighbor_count = v.into();
35683        self
35684    }
35685
35686    /// Sets the value of [string_filters][crate::model::NearestNeighborQuery::string_filters].
35687    pub fn set_string_filters<T, V>(mut self, v: T) -> Self
35688    where
35689        T: std::iter::IntoIterator<Item = V>,
35690        V: std::convert::Into<crate::model::nearest_neighbor_query::StringFilter>,
35691    {
35692        use std::iter::Iterator;
35693        self.string_filters = v.into_iter().map(|i| i.into()).collect();
35694        self
35695    }
35696
35697    /// Sets the value of [numeric_filters][crate::model::NearestNeighborQuery::numeric_filters].
35698    pub fn set_numeric_filters<T, V>(mut self, v: T) -> Self
35699    where
35700        T: std::iter::IntoIterator<Item = V>,
35701        V: std::convert::Into<crate::model::nearest_neighbor_query::NumericFilter>,
35702    {
35703        use std::iter::Iterator;
35704        self.numeric_filters = v.into_iter().map(|i| i.into()).collect();
35705        self
35706    }
35707
35708    /// Sets the value of [per_crowding_attribute_neighbor_count][crate::model::NearestNeighborQuery::per_crowding_attribute_neighbor_count].
35709    pub fn set_per_crowding_attribute_neighbor_count<T: std::convert::Into<i32>>(
35710        mut self,
35711        v: T,
35712    ) -> Self {
35713        self.per_crowding_attribute_neighbor_count = v.into();
35714        self
35715    }
35716
35717    /// Sets the value of [parameters][crate::model::NearestNeighborQuery::parameters].
35718    pub fn set_parameters<T>(mut self, v: T) -> Self
35719    where
35720        T: std::convert::Into<crate::model::nearest_neighbor_query::Parameters>,
35721    {
35722        self.parameters = std::option::Option::Some(v.into());
35723        self
35724    }
35725
35726    /// Sets or clears the value of [parameters][crate::model::NearestNeighborQuery::parameters].
35727    pub fn set_or_clear_parameters<T>(mut self, v: std::option::Option<T>) -> Self
35728    where
35729        T: std::convert::Into<crate::model::nearest_neighbor_query::Parameters>,
35730    {
35731        self.parameters = v.map(|x| x.into());
35732        self
35733    }
35734
35735    /// Sets the value of [instance][crate::model::NearestNeighborQuery::instance].
35736    ///
35737    /// Note that all the setters affecting `instance` are mutually
35738    /// exclusive.
35739    pub fn set_instance<
35740        T: std::convert::Into<std::option::Option<crate::model::nearest_neighbor_query::Instance>>,
35741    >(
35742        mut self,
35743        v: T,
35744    ) -> Self {
35745        self.instance = v.into();
35746        self
35747    }
35748
35749    /// The value of [instance][crate::model::NearestNeighborQuery::instance]
35750    /// if it holds a `EntityId`, `None` if the field is not set or
35751    /// holds a different branch.
35752    pub fn entity_id(&self) -> std::option::Option<&std::string::String> {
35753        #[allow(unreachable_patterns)]
35754        self.instance.as_ref().and_then(|v| match v {
35755            crate::model::nearest_neighbor_query::Instance::EntityId(v) => {
35756                std::option::Option::Some(v)
35757            }
35758            _ => std::option::Option::None,
35759        })
35760    }
35761
35762    /// Sets the value of [instance][crate::model::NearestNeighborQuery::instance]
35763    /// to hold a `EntityId`.
35764    ///
35765    /// Note that all the setters affecting `instance` are
35766    /// mutually exclusive.
35767    pub fn set_entity_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35768        self.instance = std::option::Option::Some(
35769            crate::model::nearest_neighbor_query::Instance::EntityId(v.into()),
35770        );
35771        self
35772    }
35773
35774    /// The value of [instance][crate::model::NearestNeighborQuery::instance]
35775    /// if it holds a `Embedding`, `None` if the field is not set or
35776    /// holds a different branch.
35777    pub fn embedding(
35778        &self,
35779    ) -> std::option::Option<&std::boxed::Box<crate::model::nearest_neighbor_query::Embedding>>
35780    {
35781        #[allow(unreachable_patterns)]
35782        self.instance.as_ref().and_then(|v| match v {
35783            crate::model::nearest_neighbor_query::Instance::Embedding(v) => {
35784                std::option::Option::Some(v)
35785            }
35786            _ => std::option::Option::None,
35787        })
35788    }
35789
35790    /// Sets the value of [instance][crate::model::NearestNeighborQuery::instance]
35791    /// to hold a `Embedding`.
35792    ///
35793    /// Note that all the setters affecting `instance` are
35794    /// mutually exclusive.
35795    pub fn set_embedding<
35796        T: std::convert::Into<std::boxed::Box<crate::model::nearest_neighbor_query::Embedding>>,
35797    >(
35798        mut self,
35799        v: T,
35800    ) -> Self {
35801        self.instance = std::option::Option::Some(
35802            crate::model::nearest_neighbor_query::Instance::Embedding(v.into()),
35803        );
35804        self
35805    }
35806}
35807
35808#[cfg(feature = "feature-online-store-service")]
35809impl wkt::message::Message for NearestNeighborQuery {
35810    fn typename() -> &'static str {
35811        "type.googleapis.com/google.cloud.aiplatform.v1.NearestNeighborQuery"
35812    }
35813}
35814
35815/// Defines additional types related to [NearestNeighborQuery].
35816#[cfg(feature = "feature-online-store-service")]
35817pub mod nearest_neighbor_query {
35818    #[allow(unused_imports)]
35819    use super::*;
35820
35821    /// The embedding vector.
35822    #[cfg(feature = "feature-online-store-service")]
35823    #[derive(Clone, Default, PartialEq)]
35824    #[non_exhaustive]
35825    pub struct Embedding {
35826        /// Optional. Individual value in the embedding.
35827        pub value: std::vec::Vec<f32>,
35828
35829        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35830    }
35831
35832    #[cfg(feature = "feature-online-store-service")]
35833    impl Embedding {
35834        pub fn new() -> Self {
35835            std::default::Default::default()
35836        }
35837
35838        /// Sets the value of [value][crate::model::nearest_neighbor_query::Embedding::value].
35839        pub fn set_value<T, V>(mut self, v: T) -> Self
35840        where
35841            T: std::iter::IntoIterator<Item = V>,
35842            V: std::convert::Into<f32>,
35843        {
35844            use std::iter::Iterator;
35845            self.value = v.into_iter().map(|i| i.into()).collect();
35846            self
35847        }
35848    }
35849
35850    #[cfg(feature = "feature-online-store-service")]
35851    impl wkt::message::Message for Embedding {
35852        fn typename() -> &'static str {
35853            "type.googleapis.com/google.cloud.aiplatform.v1.NearestNeighborQuery.Embedding"
35854        }
35855    }
35856
35857    /// String filter is used to search a subset of the entities by using boolean
35858    /// rules on string columns.
35859    /// For example: if a query specifies string filter
35860    /// with 'name = color, allow_tokens = {red, blue}, deny_tokens = {purple}','
35861    /// then that query will match entities that are red or blue, but if those
35862    /// points are also purple, then they will be excluded even if they are
35863    /// red/blue. Only string filter is supported for now, numeric filter will be
35864    /// supported in the near future.
35865    #[cfg(feature = "feature-online-store-service")]
35866    #[derive(Clone, Default, PartialEq)]
35867    #[non_exhaustive]
35868    pub struct StringFilter {
35869        /// Required. Column names in BigQuery that used as filters.
35870        pub name: std::string::String,
35871
35872        /// Optional. The allowed tokens.
35873        pub allow_tokens: std::vec::Vec<std::string::String>,
35874
35875        /// Optional. The denied tokens.
35876        pub deny_tokens: std::vec::Vec<std::string::String>,
35877
35878        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35879    }
35880
35881    #[cfg(feature = "feature-online-store-service")]
35882    impl StringFilter {
35883        pub fn new() -> Self {
35884            std::default::Default::default()
35885        }
35886
35887        /// Sets the value of [name][crate::model::nearest_neighbor_query::StringFilter::name].
35888        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35889            self.name = v.into();
35890            self
35891        }
35892
35893        /// Sets the value of [allow_tokens][crate::model::nearest_neighbor_query::StringFilter::allow_tokens].
35894        pub fn set_allow_tokens<T, V>(mut self, v: T) -> Self
35895        where
35896            T: std::iter::IntoIterator<Item = V>,
35897            V: std::convert::Into<std::string::String>,
35898        {
35899            use std::iter::Iterator;
35900            self.allow_tokens = v.into_iter().map(|i| i.into()).collect();
35901            self
35902        }
35903
35904        /// Sets the value of [deny_tokens][crate::model::nearest_neighbor_query::StringFilter::deny_tokens].
35905        pub fn set_deny_tokens<T, V>(mut self, v: T) -> Self
35906        where
35907            T: std::iter::IntoIterator<Item = V>,
35908            V: std::convert::Into<std::string::String>,
35909        {
35910            use std::iter::Iterator;
35911            self.deny_tokens = v.into_iter().map(|i| i.into()).collect();
35912            self
35913        }
35914    }
35915
35916    #[cfg(feature = "feature-online-store-service")]
35917    impl wkt::message::Message for StringFilter {
35918        fn typename() -> &'static str {
35919            "type.googleapis.com/google.cloud.aiplatform.v1.NearestNeighborQuery.StringFilter"
35920        }
35921    }
35922
35923    /// Numeric filter is used to search a subset of the entities by using boolean
35924    /// rules on numeric columns.
35925    /// For example:
35926    /// Database Point 0: {name: "a" value_int: 42} {name: "b" value_float: 1.0}
35927    /// Database Point 1:  {name: "a" value_int: 10} {name: "b" value_float: 2.0}
35928    /// Database Point 2: {name: "a" value_int: -1} {name: "b" value_float: 3.0}
35929    /// Query: {name: "a" value_int: 12 operator: LESS}    // Matches Point 1, 2
35930    /// {name: "b" value_float: 2.0 operator: EQUAL} // Matches Point 1
35931    #[cfg(feature = "feature-online-store-service")]
35932    #[derive(Clone, Default, PartialEq)]
35933    #[non_exhaustive]
35934    pub struct NumericFilter {
35935        /// Required. Column name in BigQuery that used as filters.
35936        pub name: std::string::String,
35937
35938        /// Optional. This MUST be specified for queries and must NOT be specified
35939        /// for database points.
35940        pub op: std::option::Option<crate::model::nearest_neighbor_query::numeric_filter::Operator>,
35941
35942        /// The type of Value must be consistent for all datapoints with a given
35943        /// name.  This is verified at runtime.
35944        pub value: std::option::Option<crate::model::nearest_neighbor_query::numeric_filter::Value>,
35945
35946        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35947    }
35948
35949    #[cfg(feature = "feature-online-store-service")]
35950    impl NumericFilter {
35951        pub fn new() -> Self {
35952            std::default::Default::default()
35953        }
35954
35955        /// Sets the value of [name][crate::model::nearest_neighbor_query::NumericFilter::name].
35956        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35957            self.name = v.into();
35958            self
35959        }
35960
35961        /// Sets the value of [op][crate::model::nearest_neighbor_query::NumericFilter::op].
35962        pub fn set_op<T>(mut self, v: T) -> Self
35963        where
35964            T: std::convert::Into<crate::model::nearest_neighbor_query::numeric_filter::Operator>,
35965        {
35966            self.op = std::option::Option::Some(v.into());
35967            self
35968        }
35969
35970        /// Sets or clears the value of [op][crate::model::nearest_neighbor_query::NumericFilter::op].
35971        pub fn set_or_clear_op<T>(mut self, v: std::option::Option<T>) -> Self
35972        where
35973            T: std::convert::Into<crate::model::nearest_neighbor_query::numeric_filter::Operator>,
35974        {
35975            self.op = v.map(|x| x.into());
35976            self
35977        }
35978
35979        /// Sets the value of [value][crate::model::nearest_neighbor_query::NumericFilter::value].
35980        ///
35981        /// Note that all the setters affecting `value` are mutually
35982        /// exclusive.
35983        pub fn set_value<
35984            T: std::convert::Into<
35985                    std::option::Option<
35986                        crate::model::nearest_neighbor_query::numeric_filter::Value,
35987                    >,
35988                >,
35989        >(
35990            mut self,
35991            v: T,
35992        ) -> Self {
35993            self.value = v.into();
35994            self
35995        }
35996
35997        /// The value of [value][crate::model::nearest_neighbor_query::NumericFilter::value]
35998        /// if it holds a `ValueInt`, `None` if the field is not set or
35999        /// holds a different branch.
36000        pub fn value_int(&self) -> std::option::Option<&i64> {
36001            #[allow(unreachable_patterns)]
36002            self.value.as_ref().and_then(|v| match v {
36003                crate::model::nearest_neighbor_query::numeric_filter::Value::ValueInt(v) => {
36004                    std::option::Option::Some(v)
36005                }
36006                _ => std::option::Option::None,
36007            })
36008        }
36009
36010        /// Sets the value of [value][crate::model::nearest_neighbor_query::NumericFilter::value]
36011        /// to hold a `ValueInt`.
36012        ///
36013        /// Note that all the setters affecting `value` are
36014        /// mutually exclusive.
36015        pub fn set_value_int<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
36016            self.value = std::option::Option::Some(
36017                crate::model::nearest_neighbor_query::numeric_filter::Value::ValueInt(v.into()),
36018            );
36019            self
36020        }
36021
36022        /// The value of [value][crate::model::nearest_neighbor_query::NumericFilter::value]
36023        /// if it holds a `ValueFloat`, `None` if the field is not set or
36024        /// holds a different branch.
36025        pub fn value_float(&self) -> std::option::Option<&f32> {
36026            #[allow(unreachable_patterns)]
36027            self.value.as_ref().and_then(|v| match v {
36028                crate::model::nearest_neighbor_query::numeric_filter::Value::ValueFloat(v) => {
36029                    std::option::Option::Some(v)
36030                }
36031                _ => std::option::Option::None,
36032            })
36033        }
36034
36035        /// Sets the value of [value][crate::model::nearest_neighbor_query::NumericFilter::value]
36036        /// to hold a `ValueFloat`.
36037        ///
36038        /// Note that all the setters affecting `value` are
36039        /// mutually exclusive.
36040        pub fn set_value_float<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
36041            self.value = std::option::Option::Some(
36042                crate::model::nearest_neighbor_query::numeric_filter::Value::ValueFloat(v.into()),
36043            );
36044            self
36045        }
36046
36047        /// The value of [value][crate::model::nearest_neighbor_query::NumericFilter::value]
36048        /// if it holds a `ValueDouble`, `None` if the field is not set or
36049        /// holds a different branch.
36050        pub fn value_double(&self) -> std::option::Option<&f64> {
36051            #[allow(unreachable_patterns)]
36052            self.value.as_ref().and_then(|v| match v {
36053                crate::model::nearest_neighbor_query::numeric_filter::Value::ValueDouble(v) => {
36054                    std::option::Option::Some(v)
36055                }
36056                _ => std::option::Option::None,
36057            })
36058        }
36059
36060        /// Sets the value of [value][crate::model::nearest_neighbor_query::NumericFilter::value]
36061        /// to hold a `ValueDouble`.
36062        ///
36063        /// Note that all the setters affecting `value` are
36064        /// mutually exclusive.
36065        pub fn set_value_double<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
36066            self.value = std::option::Option::Some(
36067                crate::model::nearest_neighbor_query::numeric_filter::Value::ValueDouble(v.into()),
36068            );
36069            self
36070        }
36071    }
36072
36073    #[cfg(feature = "feature-online-store-service")]
36074    impl wkt::message::Message for NumericFilter {
36075        fn typename() -> &'static str {
36076            "type.googleapis.com/google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilter"
36077        }
36078    }
36079
36080    /// Defines additional types related to [NumericFilter].
36081    #[cfg(feature = "feature-online-store-service")]
36082    pub mod numeric_filter {
36083        #[allow(unused_imports)]
36084        use super::*;
36085
36086        /// Datapoints for which Operator is true relative to the query's Value
36087        /// field will be allowlisted.
36088        ///
36089        /// # Working with unknown values
36090        ///
36091        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
36092        /// additional enum variants at any time. Adding new variants is not considered
36093        /// a breaking change. Applications should write their code in anticipation of:
36094        ///
36095        /// - New values appearing in future releases of the client library, **and**
36096        /// - New values received dynamically, without application changes.
36097        ///
36098        /// Please consult the [Working with enums] section in the user guide for some
36099        /// guidelines.
36100        ///
36101        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
36102        #[cfg(feature = "feature-online-store-service")]
36103        #[derive(Clone, Debug, PartialEq)]
36104        #[non_exhaustive]
36105        pub enum Operator {
36106            /// Unspecified operator.
36107            Unspecified,
36108            /// Entities are eligible if their value is < the query's.
36109            Less,
36110            /// Entities are eligible if their value is <= the query's.
36111            LessEqual,
36112            /// Entities are eligible if their value is == the query's.
36113            Equal,
36114            /// Entities are eligible if their value is >= the query's.
36115            GreaterEqual,
36116            /// Entities are eligible if their value is > the query's.
36117            Greater,
36118            /// Entities are eligible if their value is != the query's.
36119            NotEqual,
36120            /// If set, the enum was initialized with an unknown value.
36121            ///
36122            /// Applications can examine the value using [Operator::value] or
36123            /// [Operator::name].
36124            UnknownValue(operator::UnknownValue),
36125        }
36126
36127        #[doc(hidden)]
36128        #[cfg(feature = "feature-online-store-service")]
36129        pub mod operator {
36130            #[allow(unused_imports)]
36131            use super::*;
36132            #[derive(Clone, Debug, PartialEq)]
36133            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36134        }
36135
36136        #[cfg(feature = "feature-online-store-service")]
36137        impl Operator {
36138            /// Gets the enum value.
36139            ///
36140            /// Returns `None` if the enum contains an unknown value deserialized from
36141            /// the string representation of enums.
36142            pub fn value(&self) -> std::option::Option<i32> {
36143                match self {
36144                    Self::Unspecified => std::option::Option::Some(0),
36145                    Self::Less => std::option::Option::Some(1),
36146                    Self::LessEqual => std::option::Option::Some(2),
36147                    Self::Equal => std::option::Option::Some(3),
36148                    Self::GreaterEqual => std::option::Option::Some(4),
36149                    Self::Greater => std::option::Option::Some(5),
36150                    Self::NotEqual => std::option::Option::Some(6),
36151                    Self::UnknownValue(u) => u.0.value(),
36152                }
36153            }
36154
36155            /// Gets the enum value as a string.
36156            ///
36157            /// Returns `None` if the enum contains an unknown value deserialized from
36158            /// the integer representation of enums.
36159            pub fn name(&self) -> std::option::Option<&str> {
36160                match self {
36161                    Self::Unspecified => std::option::Option::Some("OPERATOR_UNSPECIFIED"),
36162                    Self::Less => std::option::Option::Some("LESS"),
36163                    Self::LessEqual => std::option::Option::Some("LESS_EQUAL"),
36164                    Self::Equal => std::option::Option::Some("EQUAL"),
36165                    Self::GreaterEqual => std::option::Option::Some("GREATER_EQUAL"),
36166                    Self::Greater => std::option::Option::Some("GREATER"),
36167                    Self::NotEqual => std::option::Option::Some("NOT_EQUAL"),
36168                    Self::UnknownValue(u) => u.0.name(),
36169                }
36170            }
36171        }
36172
36173        #[cfg(feature = "feature-online-store-service")]
36174        impl std::default::Default for Operator {
36175            fn default() -> Self {
36176                use std::convert::From;
36177                Self::from(0)
36178            }
36179        }
36180
36181        #[cfg(feature = "feature-online-store-service")]
36182        impl std::fmt::Display for Operator {
36183            fn fmt(
36184                &self,
36185                f: &mut std::fmt::Formatter<'_>,
36186            ) -> std::result::Result<(), std::fmt::Error> {
36187                wkt::internal::display_enum(f, self.name(), self.value())
36188            }
36189        }
36190
36191        #[cfg(feature = "feature-online-store-service")]
36192        impl std::convert::From<i32> for Operator {
36193            fn from(value: i32) -> Self {
36194                match value {
36195                    0 => Self::Unspecified,
36196                    1 => Self::Less,
36197                    2 => Self::LessEqual,
36198                    3 => Self::Equal,
36199                    4 => Self::GreaterEqual,
36200                    5 => Self::Greater,
36201                    6 => Self::NotEqual,
36202                    _ => Self::UnknownValue(operator::UnknownValue(
36203                        wkt::internal::UnknownEnumValue::Integer(value),
36204                    )),
36205                }
36206            }
36207        }
36208
36209        #[cfg(feature = "feature-online-store-service")]
36210        impl std::convert::From<&str> for Operator {
36211            fn from(value: &str) -> Self {
36212                use std::string::ToString;
36213                match value {
36214                    "OPERATOR_UNSPECIFIED" => Self::Unspecified,
36215                    "LESS" => Self::Less,
36216                    "LESS_EQUAL" => Self::LessEqual,
36217                    "EQUAL" => Self::Equal,
36218                    "GREATER_EQUAL" => Self::GreaterEqual,
36219                    "GREATER" => Self::Greater,
36220                    "NOT_EQUAL" => Self::NotEqual,
36221                    _ => Self::UnknownValue(operator::UnknownValue(
36222                        wkt::internal::UnknownEnumValue::String(value.to_string()),
36223                    )),
36224                }
36225            }
36226        }
36227
36228        #[cfg(feature = "feature-online-store-service")]
36229        impl serde::ser::Serialize for Operator {
36230            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36231            where
36232                S: serde::Serializer,
36233            {
36234                match self {
36235                    Self::Unspecified => serializer.serialize_i32(0),
36236                    Self::Less => serializer.serialize_i32(1),
36237                    Self::LessEqual => serializer.serialize_i32(2),
36238                    Self::Equal => serializer.serialize_i32(3),
36239                    Self::GreaterEqual => serializer.serialize_i32(4),
36240                    Self::Greater => serializer.serialize_i32(5),
36241                    Self::NotEqual => serializer.serialize_i32(6),
36242                    Self::UnknownValue(u) => u.0.serialize(serializer),
36243                }
36244            }
36245        }
36246
36247        #[cfg(feature = "feature-online-store-service")]
36248        impl<'de> serde::de::Deserialize<'de> for Operator {
36249            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36250            where
36251                D: serde::Deserializer<'de>,
36252            {
36253                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Operator>::new(
36254                    ".google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilter.Operator",
36255                ))
36256            }
36257        }
36258
36259        /// The type of Value must be consistent for all datapoints with a given
36260        /// name.  This is verified at runtime.
36261        #[cfg(feature = "feature-online-store-service")]
36262        #[derive(Clone, Debug, PartialEq)]
36263        #[non_exhaustive]
36264        pub enum Value {
36265            /// int value type.
36266            ValueInt(i64),
36267            /// float value type.
36268            ValueFloat(f32),
36269            /// double value type.
36270            ValueDouble(f64),
36271        }
36272    }
36273
36274    /// Parameters that can be overrided in each query to tune query latency and
36275    /// recall.
36276    #[cfg(feature = "feature-online-store-service")]
36277    #[derive(Clone, Default, PartialEq)]
36278    #[non_exhaustive]
36279    pub struct Parameters {
36280        /// Optional. The number of neighbors to find via approximate search before
36281        /// exact reordering is performed; if set, this value must be >
36282        /// neighbor_count.
36283        pub approximate_neighbor_candidates: i32,
36284
36285        /// Optional. The fraction of the number of leaves to search, set at query
36286        /// time allows user to tune search performance. This value increase result
36287        /// in both search accuracy and latency increase. The value should be between
36288        /// 0.0 and 1.0.
36289        pub leaf_nodes_search_fraction: f64,
36290
36291        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36292    }
36293
36294    #[cfg(feature = "feature-online-store-service")]
36295    impl Parameters {
36296        pub fn new() -> Self {
36297            std::default::Default::default()
36298        }
36299
36300        /// Sets the value of [approximate_neighbor_candidates][crate::model::nearest_neighbor_query::Parameters::approximate_neighbor_candidates].
36301        pub fn set_approximate_neighbor_candidates<T: std::convert::Into<i32>>(
36302            mut self,
36303            v: T,
36304        ) -> Self {
36305            self.approximate_neighbor_candidates = v.into();
36306            self
36307        }
36308
36309        /// Sets the value of [leaf_nodes_search_fraction][crate::model::nearest_neighbor_query::Parameters::leaf_nodes_search_fraction].
36310        pub fn set_leaf_nodes_search_fraction<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
36311            self.leaf_nodes_search_fraction = v.into();
36312            self
36313        }
36314    }
36315
36316    #[cfg(feature = "feature-online-store-service")]
36317    impl wkt::message::Message for Parameters {
36318        fn typename() -> &'static str {
36319            "type.googleapis.com/google.cloud.aiplatform.v1.NearestNeighborQuery.Parameters"
36320        }
36321    }
36322
36323    #[cfg(feature = "feature-online-store-service")]
36324    #[derive(Clone, Debug, PartialEq)]
36325    #[non_exhaustive]
36326    pub enum Instance {
36327        /// Optional. The entity id whose similar entities should be searched for.
36328        /// If embedding is set, search will use embedding instead of
36329        /// entity_id.
36330        EntityId(std::string::String),
36331        /// Optional. The embedding vector that be used for similar search.
36332        Embedding(std::boxed::Box<crate::model::nearest_neighbor_query::Embedding>),
36333    }
36334}
36335
36336/// The request message for
36337/// [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1.FeatureOnlineStoreService.SearchNearestEntities].
36338///
36339/// [google.cloud.aiplatform.v1.FeatureOnlineStoreService.SearchNearestEntities]: crate::client::FeatureOnlineStoreService::search_nearest_entities
36340#[cfg(feature = "feature-online-store-service")]
36341#[derive(Clone, Default, PartialEq)]
36342#[non_exhaustive]
36343pub struct SearchNearestEntitiesRequest {
36344    /// Required. FeatureView resource format
36345    /// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
36346    pub feature_view: std::string::String,
36347
36348    /// Required. The query.
36349    pub query: std::option::Option<crate::model::NearestNeighborQuery>,
36350
36351    /// Optional. If set to true, the full entities (including all vector values
36352    /// and metadata) of the nearest neighbors are returned; otherwise only entity
36353    /// id of the nearest neighbors will be returned. Note that returning full
36354    /// entities will significantly increase the latency and cost of the query.
36355    pub return_full_entity: bool,
36356
36357    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36358}
36359
36360#[cfg(feature = "feature-online-store-service")]
36361impl SearchNearestEntitiesRequest {
36362    pub fn new() -> Self {
36363        std::default::Default::default()
36364    }
36365
36366    /// Sets the value of [feature_view][crate::model::SearchNearestEntitiesRequest::feature_view].
36367    pub fn set_feature_view<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36368        self.feature_view = v.into();
36369        self
36370    }
36371
36372    /// Sets the value of [query][crate::model::SearchNearestEntitiesRequest::query].
36373    pub fn set_query<T>(mut self, v: T) -> Self
36374    where
36375        T: std::convert::Into<crate::model::NearestNeighborQuery>,
36376    {
36377        self.query = std::option::Option::Some(v.into());
36378        self
36379    }
36380
36381    /// Sets or clears the value of [query][crate::model::SearchNearestEntitiesRequest::query].
36382    pub fn set_or_clear_query<T>(mut self, v: std::option::Option<T>) -> Self
36383    where
36384        T: std::convert::Into<crate::model::NearestNeighborQuery>,
36385    {
36386        self.query = v.map(|x| x.into());
36387        self
36388    }
36389
36390    /// Sets the value of [return_full_entity][crate::model::SearchNearestEntitiesRequest::return_full_entity].
36391    pub fn set_return_full_entity<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
36392        self.return_full_entity = v.into();
36393        self
36394    }
36395}
36396
36397#[cfg(feature = "feature-online-store-service")]
36398impl wkt::message::Message for SearchNearestEntitiesRequest {
36399    fn typename() -> &'static str {
36400        "type.googleapis.com/google.cloud.aiplatform.v1.SearchNearestEntitiesRequest"
36401    }
36402}
36403
36404/// Nearest neighbors for one query.
36405#[cfg(feature = "feature-online-store-service")]
36406#[derive(Clone, Default, PartialEq)]
36407#[non_exhaustive]
36408pub struct NearestNeighbors {
36409    /// All its neighbors.
36410    pub neighbors: std::vec::Vec<crate::model::nearest_neighbors::Neighbor>,
36411
36412    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36413}
36414
36415#[cfg(feature = "feature-online-store-service")]
36416impl NearestNeighbors {
36417    pub fn new() -> Self {
36418        std::default::Default::default()
36419    }
36420
36421    /// Sets the value of [neighbors][crate::model::NearestNeighbors::neighbors].
36422    pub fn set_neighbors<T, V>(mut self, v: T) -> Self
36423    where
36424        T: std::iter::IntoIterator<Item = V>,
36425        V: std::convert::Into<crate::model::nearest_neighbors::Neighbor>,
36426    {
36427        use std::iter::Iterator;
36428        self.neighbors = v.into_iter().map(|i| i.into()).collect();
36429        self
36430    }
36431}
36432
36433#[cfg(feature = "feature-online-store-service")]
36434impl wkt::message::Message for NearestNeighbors {
36435    fn typename() -> &'static str {
36436        "type.googleapis.com/google.cloud.aiplatform.v1.NearestNeighbors"
36437    }
36438}
36439
36440/// Defines additional types related to [NearestNeighbors].
36441#[cfg(feature = "feature-online-store-service")]
36442pub mod nearest_neighbors {
36443    #[allow(unused_imports)]
36444    use super::*;
36445
36446    /// A neighbor of the query vector.
36447    #[cfg(feature = "feature-online-store-service")]
36448    #[derive(Clone, Default, PartialEq)]
36449    #[non_exhaustive]
36450    pub struct Neighbor {
36451        /// The id of the similar entity.
36452        pub entity_id: std::string::String,
36453
36454        /// The distance between the neighbor and the query vector.
36455        pub distance: f64,
36456
36457        /// The attributes of the neighbor, e.g. filters, crowding and metadata
36458        /// Note that full entities are returned only when "return_full_entity"
36459        /// is set to true. Otherwise, only the "entity_id" and "distance" fields
36460        /// are populated.
36461        pub entity_key_values: std::option::Option<crate::model::FetchFeatureValuesResponse>,
36462
36463        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36464    }
36465
36466    #[cfg(feature = "feature-online-store-service")]
36467    impl Neighbor {
36468        pub fn new() -> Self {
36469            std::default::Default::default()
36470        }
36471
36472        /// Sets the value of [entity_id][crate::model::nearest_neighbors::Neighbor::entity_id].
36473        pub fn set_entity_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36474            self.entity_id = v.into();
36475            self
36476        }
36477
36478        /// Sets the value of [distance][crate::model::nearest_neighbors::Neighbor::distance].
36479        pub fn set_distance<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
36480            self.distance = v.into();
36481            self
36482        }
36483
36484        /// Sets the value of [entity_key_values][crate::model::nearest_neighbors::Neighbor::entity_key_values].
36485        pub fn set_entity_key_values<T>(mut self, v: T) -> Self
36486        where
36487            T: std::convert::Into<crate::model::FetchFeatureValuesResponse>,
36488        {
36489            self.entity_key_values = std::option::Option::Some(v.into());
36490            self
36491        }
36492
36493        /// Sets or clears the value of [entity_key_values][crate::model::nearest_neighbors::Neighbor::entity_key_values].
36494        pub fn set_or_clear_entity_key_values<T>(mut self, v: std::option::Option<T>) -> Self
36495        where
36496            T: std::convert::Into<crate::model::FetchFeatureValuesResponse>,
36497        {
36498            self.entity_key_values = v.map(|x| x.into());
36499            self
36500        }
36501    }
36502
36503    #[cfg(feature = "feature-online-store-service")]
36504    impl wkt::message::Message for Neighbor {
36505        fn typename() -> &'static str {
36506            "type.googleapis.com/google.cloud.aiplatform.v1.NearestNeighbors.Neighbor"
36507        }
36508    }
36509}
36510
36511/// Response message for
36512/// [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1.FeatureOnlineStoreService.SearchNearestEntities]
36513///
36514/// [google.cloud.aiplatform.v1.FeatureOnlineStoreService.SearchNearestEntities]: crate::client::FeatureOnlineStoreService::search_nearest_entities
36515#[cfg(feature = "feature-online-store-service")]
36516#[derive(Clone, Default, PartialEq)]
36517#[non_exhaustive]
36518pub struct SearchNearestEntitiesResponse {
36519    /// The nearest neighbors of the query entity.
36520    pub nearest_neighbors: std::option::Option<crate::model::NearestNeighbors>,
36521
36522    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36523}
36524
36525#[cfg(feature = "feature-online-store-service")]
36526impl SearchNearestEntitiesResponse {
36527    pub fn new() -> Self {
36528        std::default::Default::default()
36529    }
36530
36531    /// Sets the value of [nearest_neighbors][crate::model::SearchNearestEntitiesResponse::nearest_neighbors].
36532    pub fn set_nearest_neighbors<T>(mut self, v: T) -> Self
36533    where
36534        T: std::convert::Into<crate::model::NearestNeighbors>,
36535    {
36536        self.nearest_neighbors = std::option::Option::Some(v.into());
36537        self
36538    }
36539
36540    /// Sets or clears the value of [nearest_neighbors][crate::model::SearchNearestEntitiesResponse::nearest_neighbors].
36541    pub fn set_or_clear_nearest_neighbors<T>(mut self, v: std::option::Option<T>) -> Self
36542    where
36543        T: std::convert::Into<crate::model::NearestNeighbors>,
36544    {
36545        self.nearest_neighbors = v.map(|x| x.into());
36546        self
36547    }
36548}
36549
36550#[cfg(feature = "feature-online-store-service")]
36551impl wkt::message::Message for SearchNearestEntitiesResponse {
36552    fn typename() -> &'static str {
36553        "type.googleapis.com/google.cloud.aiplatform.v1.SearchNearestEntitiesResponse"
36554    }
36555}
36556
36557/// Request message for
36558/// [FeatureOnlineStoreService.FeatureViewDirectWrite][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FeatureViewDirectWrite].
36559#[cfg(feature = "feature-online-store-service")]
36560#[derive(Clone, Default, PartialEq)]
36561#[non_exhaustive]
36562pub struct FeatureViewDirectWriteRequest {
36563    /// FeatureView resource format
36564    /// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
36565    pub feature_view: std::string::String,
36566
36567    /// Required. The data keys and associated feature values.
36568    pub data_key_and_feature_values:
36569        std::vec::Vec<crate::model::feature_view_direct_write_request::DataKeyAndFeatureValues>,
36570
36571    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36572}
36573
36574#[cfg(feature = "feature-online-store-service")]
36575impl FeatureViewDirectWriteRequest {
36576    pub fn new() -> Self {
36577        std::default::Default::default()
36578    }
36579
36580    /// Sets the value of [feature_view][crate::model::FeatureViewDirectWriteRequest::feature_view].
36581    pub fn set_feature_view<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36582        self.feature_view = v.into();
36583        self
36584    }
36585
36586    /// Sets the value of [data_key_and_feature_values][crate::model::FeatureViewDirectWriteRequest::data_key_and_feature_values].
36587    pub fn set_data_key_and_feature_values<T, V>(mut self, v: T) -> Self
36588    where
36589        T: std::iter::IntoIterator<Item = V>,
36590        V: std::convert::Into<
36591                crate::model::feature_view_direct_write_request::DataKeyAndFeatureValues,
36592            >,
36593    {
36594        use std::iter::Iterator;
36595        self.data_key_and_feature_values = v.into_iter().map(|i| i.into()).collect();
36596        self
36597    }
36598}
36599
36600#[cfg(feature = "feature-online-store-service")]
36601impl wkt::message::Message for FeatureViewDirectWriteRequest {
36602    fn typename() -> &'static str {
36603        "type.googleapis.com/google.cloud.aiplatform.v1.FeatureViewDirectWriteRequest"
36604    }
36605}
36606
36607/// Defines additional types related to [FeatureViewDirectWriteRequest].
36608#[cfg(feature = "feature-online-store-service")]
36609pub mod feature_view_direct_write_request {
36610    #[allow(unused_imports)]
36611    use super::*;
36612
36613    /// A data key and associated feature values to write to the feature view.
36614    #[cfg(feature = "feature-online-store-service")]
36615    #[derive(Clone, Default, PartialEq)]
36616    #[non_exhaustive]
36617    pub struct DataKeyAndFeatureValues {
36618        /// The data key.
36619        pub data_key: std::option::Option<crate::model::FeatureViewDataKey>,
36620
36621        /// List of features to write.
36622        pub features: std::vec::Vec<
36623            crate::model::feature_view_direct_write_request::data_key_and_feature_values::Feature,
36624        >,
36625
36626        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36627    }
36628
36629    #[cfg(feature = "feature-online-store-service")]
36630    impl DataKeyAndFeatureValues {
36631        pub fn new() -> Self {
36632            std::default::Default::default()
36633        }
36634
36635        /// Sets the value of [data_key][crate::model::feature_view_direct_write_request::DataKeyAndFeatureValues::data_key].
36636        pub fn set_data_key<T>(mut self, v: T) -> Self
36637        where
36638            T: std::convert::Into<crate::model::FeatureViewDataKey>,
36639        {
36640            self.data_key = std::option::Option::Some(v.into());
36641            self
36642        }
36643
36644        /// Sets or clears the value of [data_key][crate::model::feature_view_direct_write_request::DataKeyAndFeatureValues::data_key].
36645        pub fn set_or_clear_data_key<T>(mut self, v: std::option::Option<T>) -> Self
36646        where
36647            T: std::convert::Into<crate::model::FeatureViewDataKey>,
36648        {
36649            self.data_key = v.map(|x| x.into());
36650            self
36651        }
36652
36653        /// Sets the value of [features][crate::model::feature_view_direct_write_request::DataKeyAndFeatureValues::features].
36654        pub fn set_features<T, V>(mut self, v: T) -> Self
36655        where
36656            T: std::iter::IntoIterator<Item = V>,
36657            V: std::convert::Into<crate::model::feature_view_direct_write_request::data_key_and_feature_values::Feature>
36658        {
36659            use std::iter::Iterator;
36660            self.features = v.into_iter().map(|i| i.into()).collect();
36661            self
36662        }
36663    }
36664
36665    #[cfg(feature = "feature-online-store-service")]
36666    impl wkt::message::Message for DataKeyAndFeatureValues {
36667        fn typename() -> &'static str {
36668            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureViewDirectWriteRequest.DataKeyAndFeatureValues"
36669        }
36670    }
36671
36672    /// Defines additional types related to [DataKeyAndFeatureValues].
36673    #[cfg(feature = "feature-online-store-service")]
36674    pub mod data_key_and_feature_values {
36675        #[allow(unused_imports)]
36676        use super::*;
36677
36678        /// Feature name & value pair.
36679        #[cfg(feature = "feature-online-store-service")]
36680        #[derive(Clone, Default, PartialEq)]
36681        #[non_exhaustive]
36682        pub struct Feature {
36683
36684            /// Feature short name.
36685            pub name: std::string::String,
36686
36687            /// Feature value data to write.
36688            pub data_oneof: std::option::Option<crate::model::feature_view_direct_write_request::data_key_and_feature_values::feature::DataOneof>,
36689
36690            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36691        }
36692
36693        #[cfg(feature = "feature-online-store-service")]
36694        impl Feature {
36695            pub fn new() -> Self {
36696                std::default::Default::default()
36697            }
36698
36699            /// Sets the value of [name][crate::model::feature_view_direct_write_request::data_key_and_feature_values::Feature::name].
36700            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36701                self.name = v.into();
36702                self
36703            }
36704
36705            /// Sets the value of [data_oneof][crate::model::feature_view_direct_write_request::data_key_and_feature_values::Feature::data_oneof].
36706            ///
36707            /// Note that all the setters affecting `data_oneof` are mutually
36708            /// exclusive.
36709            pub fn set_data_oneof<T: std::convert::Into<std::option::Option<crate::model::feature_view_direct_write_request::data_key_and_feature_values::feature::DataOneof>>>(mut self, v: T) -> Self
36710            {
36711                self.data_oneof = v.into();
36712                self
36713            }
36714
36715            /// The value of [data_oneof][crate::model::feature_view_direct_write_request::data_key_and_feature_values::Feature::data_oneof]
36716            /// if it holds a `Value`, `None` if the field is not set or
36717            /// holds a different branch.
36718            pub fn value(
36719                &self,
36720            ) -> std::option::Option<&std::boxed::Box<crate::model::FeatureValue>> {
36721                #[allow(unreachable_patterns)]
36722                self.data_oneof.as_ref().and_then(|v| match v {
36723                    crate::model::feature_view_direct_write_request::data_key_and_feature_values::feature::DataOneof::Value(v) => std::option::Option::Some(v),
36724                    _ => std::option::Option::None,
36725                })
36726            }
36727
36728            /// Sets the value of [data_oneof][crate::model::feature_view_direct_write_request::data_key_and_feature_values::Feature::data_oneof]
36729            /// to hold a `Value`.
36730            ///
36731            /// Note that all the setters affecting `data_oneof` are
36732            /// mutually exclusive.
36733            pub fn set_value<T: std::convert::Into<std::boxed::Box<crate::model::FeatureValue>>>(
36734                mut self,
36735                v: T,
36736            ) -> Self {
36737                self.data_oneof = std::option::Option::Some(
36738                    crate::model::feature_view_direct_write_request::data_key_and_feature_values::feature::DataOneof::Value(
36739                        v.into()
36740                    )
36741                );
36742                self
36743            }
36744        }
36745
36746        #[cfg(feature = "feature-online-store-service")]
36747        impl wkt::message::Message for Feature {
36748            fn typename() -> &'static str {
36749                "type.googleapis.com/google.cloud.aiplatform.v1.FeatureViewDirectWriteRequest.DataKeyAndFeatureValues.Feature"
36750            }
36751        }
36752
36753        /// Defines additional types related to [Feature].
36754        #[cfg(feature = "feature-online-store-service")]
36755        pub mod feature {
36756            #[allow(unused_imports)]
36757            use super::*;
36758
36759            /// Feature value data to write.
36760            #[cfg(feature = "feature-online-store-service")]
36761            #[derive(Clone, Debug, PartialEq)]
36762            #[non_exhaustive]
36763            pub enum DataOneof {
36764                /// Feature value. A user provided timestamp may be set in the
36765                /// `FeatureValue.metadata.generate_time` field.
36766                Value(std::boxed::Box<crate::model::FeatureValue>),
36767            }
36768        }
36769    }
36770}
36771
36772/// Response message for
36773/// [FeatureOnlineStoreService.FeatureViewDirectWrite][google.cloud.aiplatform.v1.FeatureOnlineStoreService.FeatureViewDirectWrite].
36774#[cfg(feature = "feature-online-store-service")]
36775#[derive(Clone, Default, PartialEq)]
36776#[non_exhaustive]
36777pub struct FeatureViewDirectWriteResponse {
36778    /// Response status for the keys listed in
36779    /// [FeatureViewDirectWriteResponse.write_responses][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.write_responses].
36780    ///
36781    /// The error only applies to the
36782    /// listed data keys - the stream will remain open for further
36783    /// [FeatureOnlineStoreService.FeatureViewDirectWriteRequest][] requests.
36784    ///
36785    /// Partial failures (e.g. if the first 10 keys of a request fail, but the
36786    /// rest succeed) from a single request may result in multiple responses -
36787    /// there will be one response for the successful request keys and one response
36788    /// for the failing request keys.
36789    ///
36790    /// [google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.write_responses]: crate::model::FeatureViewDirectWriteResponse::write_responses
36791    pub status: std::option::Option<rpc::model::Status>,
36792
36793    /// Details about write for each key. If status is not OK,
36794    /// [WriteResponse.data_key][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse.data_key]
36795    /// will have the key with error, but
36796    /// [WriteResponse.online_store_write_time][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse.online_store_write_time]
36797    /// will not be present.
36798    ///
36799    /// [google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse.data_key]: crate::model::feature_view_direct_write_response::WriteResponse::data_key
36800    /// [google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse.online_store_write_time]: crate::model::feature_view_direct_write_response::WriteResponse::online_store_write_time
36801    pub write_responses:
36802        std::vec::Vec<crate::model::feature_view_direct_write_response::WriteResponse>,
36803
36804    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36805}
36806
36807#[cfg(feature = "feature-online-store-service")]
36808impl FeatureViewDirectWriteResponse {
36809    pub fn new() -> Self {
36810        std::default::Default::default()
36811    }
36812
36813    /// Sets the value of [status][crate::model::FeatureViewDirectWriteResponse::status].
36814    pub fn set_status<T>(mut self, v: T) -> Self
36815    where
36816        T: std::convert::Into<rpc::model::Status>,
36817    {
36818        self.status = std::option::Option::Some(v.into());
36819        self
36820    }
36821
36822    /// Sets or clears the value of [status][crate::model::FeatureViewDirectWriteResponse::status].
36823    pub fn set_or_clear_status<T>(mut self, v: std::option::Option<T>) -> Self
36824    where
36825        T: std::convert::Into<rpc::model::Status>,
36826    {
36827        self.status = v.map(|x| x.into());
36828        self
36829    }
36830
36831    /// Sets the value of [write_responses][crate::model::FeatureViewDirectWriteResponse::write_responses].
36832    pub fn set_write_responses<T, V>(mut self, v: T) -> Self
36833    where
36834        T: std::iter::IntoIterator<Item = V>,
36835        V: std::convert::Into<crate::model::feature_view_direct_write_response::WriteResponse>,
36836    {
36837        use std::iter::Iterator;
36838        self.write_responses = v.into_iter().map(|i| i.into()).collect();
36839        self
36840    }
36841}
36842
36843#[cfg(feature = "feature-online-store-service")]
36844impl wkt::message::Message for FeatureViewDirectWriteResponse {
36845    fn typename() -> &'static str {
36846        "type.googleapis.com/google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse"
36847    }
36848}
36849
36850/// Defines additional types related to [FeatureViewDirectWriteResponse].
36851#[cfg(feature = "feature-online-store-service")]
36852pub mod feature_view_direct_write_response {
36853    #[allow(unused_imports)]
36854    use super::*;
36855
36856    /// Details about the write for each key.
36857    #[cfg(feature = "feature-online-store-service")]
36858    #[derive(Clone, Default, PartialEq)]
36859    #[non_exhaustive]
36860    pub struct WriteResponse {
36861        /// What key is this write response associated with.
36862        pub data_key: std::option::Option<crate::model::FeatureViewDataKey>,
36863
36864        /// When the feature values were written to the online store.
36865        /// If
36866        /// [FeatureViewDirectWriteResponse.status][google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.status]
36867        /// is not OK, this field is not populated.
36868        ///
36869        /// [google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.status]: crate::model::FeatureViewDirectWriteResponse::status
36870        pub online_store_write_time: std::option::Option<wkt::Timestamp>,
36871
36872        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36873    }
36874
36875    #[cfg(feature = "feature-online-store-service")]
36876    impl WriteResponse {
36877        pub fn new() -> Self {
36878            std::default::Default::default()
36879        }
36880
36881        /// Sets the value of [data_key][crate::model::feature_view_direct_write_response::WriteResponse::data_key].
36882        pub fn set_data_key<T>(mut self, v: T) -> Self
36883        where
36884            T: std::convert::Into<crate::model::FeatureViewDataKey>,
36885        {
36886            self.data_key = std::option::Option::Some(v.into());
36887            self
36888        }
36889
36890        /// Sets or clears the value of [data_key][crate::model::feature_view_direct_write_response::WriteResponse::data_key].
36891        pub fn set_or_clear_data_key<T>(mut self, v: std::option::Option<T>) -> Self
36892        where
36893            T: std::convert::Into<crate::model::FeatureViewDataKey>,
36894        {
36895            self.data_key = v.map(|x| x.into());
36896            self
36897        }
36898
36899        /// Sets the value of [online_store_write_time][crate::model::feature_view_direct_write_response::WriteResponse::online_store_write_time].
36900        pub fn set_online_store_write_time<T>(mut self, v: T) -> Self
36901        where
36902            T: std::convert::Into<wkt::Timestamp>,
36903        {
36904            self.online_store_write_time = std::option::Option::Some(v.into());
36905            self
36906        }
36907
36908        /// Sets or clears the value of [online_store_write_time][crate::model::feature_view_direct_write_response::WriteResponse::online_store_write_time].
36909        pub fn set_or_clear_online_store_write_time<T>(mut self, v: std::option::Option<T>) -> Self
36910        where
36911            T: std::convert::Into<wkt::Timestamp>,
36912        {
36913            self.online_store_write_time = v.map(|x| x.into());
36914            self
36915        }
36916    }
36917
36918    #[cfg(feature = "feature-online-store-service")]
36919    impl wkt::message::Message for WriteResponse {
36920        fn typename() -> &'static str {
36921            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureViewDirectWriteResponse.WriteResponse"
36922        }
36923    }
36924}
36925
36926/// Request message for
36927/// [FeatureRegistryService.CreateFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.CreateFeatureGroup].
36928///
36929/// [google.cloud.aiplatform.v1.FeatureRegistryService.CreateFeatureGroup]: crate::client::FeatureRegistryService::create_feature_group
36930#[cfg(feature = "feature-registry-service")]
36931#[derive(Clone, Default, PartialEq)]
36932#[non_exhaustive]
36933pub struct CreateFeatureGroupRequest {
36934    /// Required. The resource name of the Location to create FeatureGroups.
36935    /// Format:
36936    /// `projects/{project}/locations/{location}`
36937    pub parent: std::string::String,
36938
36939    /// Required. The FeatureGroup to create.
36940    pub feature_group: std::option::Option<crate::model::FeatureGroup>,
36941
36942    /// Required. The ID to use for this FeatureGroup, which will become the final
36943    /// component of the FeatureGroup's resource name.
36944    ///
36945    /// This value may be up to 128 characters, and valid characters are
36946    /// `[a-z0-9_]`. The first character cannot be a number.
36947    ///
36948    /// The value must be unique within the project and location.
36949    pub feature_group_id: std::string::String,
36950
36951    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
36952}
36953
36954#[cfg(feature = "feature-registry-service")]
36955impl CreateFeatureGroupRequest {
36956    pub fn new() -> Self {
36957        std::default::Default::default()
36958    }
36959
36960    /// Sets the value of [parent][crate::model::CreateFeatureGroupRequest::parent].
36961    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
36962        self.parent = v.into();
36963        self
36964    }
36965
36966    /// Sets the value of [feature_group][crate::model::CreateFeatureGroupRequest::feature_group].
36967    pub fn set_feature_group<T>(mut self, v: T) -> Self
36968    where
36969        T: std::convert::Into<crate::model::FeatureGroup>,
36970    {
36971        self.feature_group = std::option::Option::Some(v.into());
36972        self
36973    }
36974
36975    /// Sets or clears the value of [feature_group][crate::model::CreateFeatureGroupRequest::feature_group].
36976    pub fn set_or_clear_feature_group<T>(mut self, v: std::option::Option<T>) -> Self
36977    where
36978        T: std::convert::Into<crate::model::FeatureGroup>,
36979    {
36980        self.feature_group = v.map(|x| x.into());
36981        self
36982    }
36983
36984    /// Sets the value of [feature_group_id][crate::model::CreateFeatureGroupRequest::feature_group_id].
36985    pub fn set_feature_group_id<T: std::convert::Into<std::string::String>>(
36986        mut self,
36987        v: T,
36988    ) -> Self {
36989        self.feature_group_id = v.into();
36990        self
36991    }
36992}
36993
36994#[cfg(feature = "feature-registry-service")]
36995impl wkt::message::Message for CreateFeatureGroupRequest {
36996    fn typename() -> &'static str {
36997        "type.googleapis.com/google.cloud.aiplatform.v1.CreateFeatureGroupRequest"
36998    }
36999}
37000
37001/// Request message for
37002/// [FeatureRegistryService.GetFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.GetFeatureGroup].
37003///
37004/// [google.cloud.aiplatform.v1.FeatureRegistryService.GetFeatureGroup]: crate::client::FeatureRegistryService::get_feature_group
37005#[cfg(feature = "feature-registry-service")]
37006#[derive(Clone, Default, PartialEq)]
37007#[non_exhaustive]
37008pub struct GetFeatureGroupRequest {
37009    /// Required. The name of the FeatureGroup resource.
37010    pub name: std::string::String,
37011
37012    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37013}
37014
37015#[cfg(feature = "feature-registry-service")]
37016impl GetFeatureGroupRequest {
37017    pub fn new() -> Self {
37018        std::default::Default::default()
37019    }
37020
37021    /// Sets the value of [name][crate::model::GetFeatureGroupRequest::name].
37022    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37023        self.name = v.into();
37024        self
37025    }
37026}
37027
37028#[cfg(feature = "feature-registry-service")]
37029impl wkt::message::Message for GetFeatureGroupRequest {
37030    fn typename() -> &'static str {
37031        "type.googleapis.com/google.cloud.aiplatform.v1.GetFeatureGroupRequest"
37032    }
37033}
37034
37035/// Request message for
37036/// [FeatureRegistryService.ListFeatureGroups][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups].
37037///
37038/// [google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups]: crate::client::FeatureRegistryService::list_feature_groups
37039#[cfg(feature = "feature-registry-service")]
37040#[derive(Clone, Default, PartialEq)]
37041#[non_exhaustive]
37042pub struct ListFeatureGroupsRequest {
37043    /// Required. The resource name of the Location to list FeatureGroups.
37044    /// Format:
37045    /// `projects/{project}/locations/{location}`
37046    pub parent: std::string::String,
37047
37048    /// Lists the FeatureGroups that match the filter expression. The
37049    /// following fields are supported:
37050    ///
37051    /// * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
37052    ///   Values must be
37053    ///   in RFC 3339 format.
37054    /// * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
37055    ///   Values must be
37056    ///   in RFC 3339 format.
37057    /// * `labels`: Supports key-value equality and key presence.
37058    ///
37059    /// Examples:
37060    ///
37061    /// * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
37062    ///   FeatureGroups created or updated after 2020-01-01.
37063    /// * `labels.env = "prod"`
37064    ///   FeatureGroups with label "env" set to "prod".
37065    pub filter: std::string::String,
37066
37067    /// The maximum number of FeatureGroups to return. The service may return
37068    /// fewer than this value. If unspecified, at most 100 FeatureGroups will
37069    /// be returned. The maximum value is 100; any value greater than 100 will be
37070    /// coerced to 100.
37071    pub page_size: i32,
37072
37073    /// A page token, received from a previous
37074    /// [FeatureRegistryService.ListFeatureGroups][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups]
37075    /// call. Provide this to retrieve the subsequent page.
37076    ///
37077    /// When paginating, all other parameters provided to
37078    /// [FeatureRegistryService.ListFeatureGroups][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups]
37079    /// must match the call that provided the page token.
37080    ///
37081    /// [google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups]: crate::client::FeatureRegistryService::list_feature_groups
37082    pub page_token: std::string::String,
37083
37084    /// A comma-separated list of fields to order by, sorted in ascending order.
37085    /// Use "desc" after a field name for descending.
37086    /// Supported Fields:
37087    ///
37088    /// * `create_time`
37089    /// * `update_time`
37090    pub order_by: std::string::String,
37091
37092    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37093}
37094
37095#[cfg(feature = "feature-registry-service")]
37096impl ListFeatureGroupsRequest {
37097    pub fn new() -> Self {
37098        std::default::Default::default()
37099    }
37100
37101    /// Sets the value of [parent][crate::model::ListFeatureGroupsRequest::parent].
37102    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37103        self.parent = v.into();
37104        self
37105    }
37106
37107    /// Sets the value of [filter][crate::model::ListFeatureGroupsRequest::filter].
37108    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37109        self.filter = v.into();
37110        self
37111    }
37112
37113    /// Sets the value of [page_size][crate::model::ListFeatureGroupsRequest::page_size].
37114    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
37115        self.page_size = v.into();
37116        self
37117    }
37118
37119    /// Sets the value of [page_token][crate::model::ListFeatureGroupsRequest::page_token].
37120    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37121        self.page_token = v.into();
37122        self
37123    }
37124
37125    /// Sets the value of [order_by][crate::model::ListFeatureGroupsRequest::order_by].
37126    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37127        self.order_by = v.into();
37128        self
37129    }
37130}
37131
37132#[cfg(feature = "feature-registry-service")]
37133impl wkt::message::Message for ListFeatureGroupsRequest {
37134    fn typename() -> &'static str {
37135        "type.googleapis.com/google.cloud.aiplatform.v1.ListFeatureGroupsRequest"
37136    }
37137}
37138
37139/// Response message for
37140/// [FeatureRegistryService.ListFeatureGroups][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups].
37141///
37142/// [google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatureGroups]: crate::client::FeatureRegistryService::list_feature_groups
37143#[cfg(feature = "feature-registry-service")]
37144#[derive(Clone, Default, PartialEq)]
37145#[non_exhaustive]
37146pub struct ListFeatureGroupsResponse {
37147    /// The FeatureGroups matching the request.
37148    pub feature_groups: std::vec::Vec<crate::model::FeatureGroup>,
37149
37150    /// A token, which can be sent as
37151    /// [ListFeatureGroupsRequest.page_token][google.cloud.aiplatform.v1.ListFeatureGroupsRequest.page_token]
37152    /// to retrieve the next page. If this field is omitted, there are no
37153    /// subsequent pages.
37154    ///
37155    /// [google.cloud.aiplatform.v1.ListFeatureGroupsRequest.page_token]: crate::model::ListFeatureGroupsRequest::page_token
37156    pub next_page_token: std::string::String,
37157
37158    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37159}
37160
37161#[cfg(feature = "feature-registry-service")]
37162impl ListFeatureGroupsResponse {
37163    pub fn new() -> Self {
37164        std::default::Default::default()
37165    }
37166
37167    /// Sets the value of [feature_groups][crate::model::ListFeatureGroupsResponse::feature_groups].
37168    pub fn set_feature_groups<T, V>(mut self, v: T) -> Self
37169    where
37170        T: std::iter::IntoIterator<Item = V>,
37171        V: std::convert::Into<crate::model::FeatureGroup>,
37172    {
37173        use std::iter::Iterator;
37174        self.feature_groups = v.into_iter().map(|i| i.into()).collect();
37175        self
37176    }
37177
37178    /// Sets the value of [next_page_token][crate::model::ListFeatureGroupsResponse::next_page_token].
37179    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37180        self.next_page_token = v.into();
37181        self
37182    }
37183}
37184
37185#[cfg(feature = "feature-registry-service")]
37186impl wkt::message::Message for ListFeatureGroupsResponse {
37187    fn typename() -> &'static str {
37188        "type.googleapis.com/google.cloud.aiplatform.v1.ListFeatureGroupsResponse"
37189    }
37190}
37191
37192#[cfg(feature = "feature-registry-service")]
37193#[doc(hidden)]
37194impl gax::paginator::internal::PageableResponse for ListFeatureGroupsResponse {
37195    type PageItem = crate::model::FeatureGroup;
37196
37197    fn items(self) -> std::vec::Vec<Self::PageItem> {
37198        self.feature_groups
37199    }
37200
37201    fn next_page_token(&self) -> std::string::String {
37202        use std::clone::Clone;
37203        self.next_page_token.clone()
37204    }
37205}
37206
37207/// Request message for
37208/// [FeatureRegistryService.UpdateFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.UpdateFeatureGroup].
37209///
37210/// [google.cloud.aiplatform.v1.FeatureRegistryService.UpdateFeatureGroup]: crate::client::FeatureRegistryService::update_feature_group
37211#[cfg(feature = "feature-registry-service")]
37212#[derive(Clone, Default, PartialEq)]
37213#[non_exhaustive]
37214pub struct UpdateFeatureGroupRequest {
37215    /// Required. The FeatureGroup's `name` field is used to identify the
37216    /// FeatureGroup to be updated. Format:
37217    /// `projects/{project}/locations/{location}/featureGroups/{feature_group}`
37218    pub feature_group: std::option::Option<crate::model::FeatureGroup>,
37219
37220    /// Field mask is used to specify the fields to be overwritten in the
37221    /// FeatureGroup resource by the update.
37222    /// The fields specified in the update_mask are relative to the resource, not
37223    /// the full request. A field will be overwritten if it is in the mask. If the
37224    /// user does not provide a mask then only the non-empty fields present in the
37225    /// request will be overwritten. Set the update_mask to `*` to override all
37226    /// fields.
37227    ///
37228    /// Updatable fields:
37229    ///
37230    /// * `labels`
37231    /// * `description`
37232    /// * `big_query`
37233    /// * `big_query.entity_id_columns`
37234    pub update_mask: std::option::Option<wkt::FieldMask>,
37235
37236    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37237}
37238
37239#[cfg(feature = "feature-registry-service")]
37240impl UpdateFeatureGroupRequest {
37241    pub fn new() -> Self {
37242        std::default::Default::default()
37243    }
37244
37245    /// Sets the value of [feature_group][crate::model::UpdateFeatureGroupRequest::feature_group].
37246    pub fn set_feature_group<T>(mut self, v: T) -> Self
37247    where
37248        T: std::convert::Into<crate::model::FeatureGroup>,
37249    {
37250        self.feature_group = std::option::Option::Some(v.into());
37251        self
37252    }
37253
37254    /// Sets or clears the value of [feature_group][crate::model::UpdateFeatureGroupRequest::feature_group].
37255    pub fn set_or_clear_feature_group<T>(mut self, v: std::option::Option<T>) -> Self
37256    where
37257        T: std::convert::Into<crate::model::FeatureGroup>,
37258    {
37259        self.feature_group = v.map(|x| x.into());
37260        self
37261    }
37262
37263    /// Sets the value of [update_mask][crate::model::UpdateFeatureGroupRequest::update_mask].
37264    pub fn set_update_mask<T>(mut self, v: T) -> Self
37265    where
37266        T: std::convert::Into<wkt::FieldMask>,
37267    {
37268        self.update_mask = std::option::Option::Some(v.into());
37269        self
37270    }
37271
37272    /// Sets or clears the value of [update_mask][crate::model::UpdateFeatureGroupRequest::update_mask].
37273    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
37274    where
37275        T: std::convert::Into<wkt::FieldMask>,
37276    {
37277        self.update_mask = v.map(|x| x.into());
37278        self
37279    }
37280}
37281
37282#[cfg(feature = "feature-registry-service")]
37283impl wkt::message::Message for UpdateFeatureGroupRequest {
37284    fn typename() -> &'static str {
37285        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateFeatureGroupRequest"
37286    }
37287}
37288
37289/// Request message for
37290/// [FeatureRegistryService.DeleteFeatureGroup][google.cloud.aiplatform.v1.FeatureRegistryService.DeleteFeatureGroup].
37291///
37292/// [google.cloud.aiplatform.v1.FeatureRegistryService.DeleteFeatureGroup]: crate::client::FeatureRegistryService::delete_feature_group
37293#[cfg(feature = "feature-registry-service")]
37294#[derive(Clone, Default, PartialEq)]
37295#[non_exhaustive]
37296pub struct DeleteFeatureGroupRequest {
37297    /// Required. The name of the FeatureGroup to be deleted.
37298    /// Format:
37299    /// `projects/{project}/locations/{location}/featureGroups/{feature_group}`
37300    pub name: std::string::String,
37301
37302    /// If set to true, any Features under this FeatureGroup
37303    /// will also be deleted. (Otherwise, the request will only work if the
37304    /// FeatureGroup has no Features.)
37305    pub force: bool,
37306
37307    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37308}
37309
37310#[cfg(feature = "feature-registry-service")]
37311impl DeleteFeatureGroupRequest {
37312    pub fn new() -> Self {
37313        std::default::Default::default()
37314    }
37315
37316    /// Sets the value of [name][crate::model::DeleteFeatureGroupRequest::name].
37317    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37318        self.name = v.into();
37319        self
37320    }
37321
37322    /// Sets the value of [force][crate::model::DeleteFeatureGroupRequest::force].
37323    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
37324        self.force = v.into();
37325        self
37326    }
37327}
37328
37329#[cfg(feature = "feature-registry-service")]
37330impl wkt::message::Message for DeleteFeatureGroupRequest {
37331    fn typename() -> &'static str {
37332        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteFeatureGroupRequest"
37333    }
37334}
37335
37336/// Details of operations that perform create FeatureGroup.
37337#[cfg(feature = "feature-registry-service")]
37338#[derive(Clone, Default, PartialEq)]
37339#[non_exhaustive]
37340pub struct CreateFeatureGroupOperationMetadata {
37341    /// Operation metadata for FeatureGroup.
37342    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
37343
37344    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37345}
37346
37347#[cfg(feature = "feature-registry-service")]
37348impl CreateFeatureGroupOperationMetadata {
37349    pub fn new() -> Self {
37350        std::default::Default::default()
37351    }
37352
37353    /// Sets the value of [generic_metadata][crate::model::CreateFeatureGroupOperationMetadata::generic_metadata].
37354    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
37355    where
37356        T: std::convert::Into<crate::model::GenericOperationMetadata>,
37357    {
37358        self.generic_metadata = std::option::Option::Some(v.into());
37359        self
37360    }
37361
37362    /// Sets or clears the value of [generic_metadata][crate::model::CreateFeatureGroupOperationMetadata::generic_metadata].
37363    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
37364    where
37365        T: std::convert::Into<crate::model::GenericOperationMetadata>,
37366    {
37367        self.generic_metadata = v.map(|x| x.into());
37368        self
37369    }
37370}
37371
37372#[cfg(feature = "feature-registry-service")]
37373impl wkt::message::Message for CreateFeatureGroupOperationMetadata {
37374    fn typename() -> &'static str {
37375        "type.googleapis.com/google.cloud.aiplatform.v1.CreateFeatureGroupOperationMetadata"
37376    }
37377}
37378
37379/// Details of operations that perform update FeatureGroup.
37380#[cfg(feature = "feature-registry-service")]
37381#[derive(Clone, Default, PartialEq)]
37382#[non_exhaustive]
37383pub struct UpdateFeatureGroupOperationMetadata {
37384    /// Operation metadata for FeatureGroup.
37385    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
37386
37387    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37388}
37389
37390#[cfg(feature = "feature-registry-service")]
37391impl UpdateFeatureGroupOperationMetadata {
37392    pub fn new() -> Self {
37393        std::default::Default::default()
37394    }
37395
37396    /// Sets the value of [generic_metadata][crate::model::UpdateFeatureGroupOperationMetadata::generic_metadata].
37397    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
37398    where
37399        T: std::convert::Into<crate::model::GenericOperationMetadata>,
37400    {
37401        self.generic_metadata = std::option::Option::Some(v.into());
37402        self
37403    }
37404
37405    /// Sets or clears the value of [generic_metadata][crate::model::UpdateFeatureGroupOperationMetadata::generic_metadata].
37406    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
37407    where
37408        T: std::convert::Into<crate::model::GenericOperationMetadata>,
37409    {
37410        self.generic_metadata = v.map(|x| x.into());
37411        self
37412    }
37413}
37414
37415#[cfg(feature = "feature-registry-service")]
37416impl wkt::message::Message for UpdateFeatureGroupOperationMetadata {
37417    fn typename() -> &'static str {
37418        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateFeatureGroupOperationMetadata"
37419    }
37420}
37421
37422/// Details of operations that perform create FeatureGroup.
37423#[cfg(all(
37424    feature = "data-foundry-service",
37425    feature = "dataset-service",
37426    feature = "deployment-resource-pool-service",
37427    feature = "endpoint-service",
37428    feature = "evaluation-service",
37429    feature = "feature-online-store-admin-service",
37430    feature = "feature-online-store-service",
37431    feature = "feature-registry-service",
37432    feature = "featurestore-online-serving-service",
37433    feature = "featurestore-service",
37434    feature = "gen-ai-cache-service",
37435    feature = "gen-ai-tuning-service",
37436    feature = "index-endpoint-service",
37437    feature = "index-service",
37438    feature = "job-service",
37439    feature = "llm-utility-service",
37440    feature = "match-service",
37441    feature = "metadata-service",
37442    feature = "migration-service",
37443    feature = "model-garden-service",
37444    feature = "model-service",
37445    feature = "notebook-service",
37446    feature = "persistent-resource-service",
37447    feature = "pipeline-service",
37448    feature = "prediction-service",
37449    feature = "reasoning-engine-execution-service",
37450    feature = "reasoning-engine-service",
37451    feature = "schedule-service",
37452    feature = "specialist-pool-service",
37453    feature = "tensorboard-service",
37454    feature = "vertex-rag-data-service",
37455    feature = "vertex-rag-service",
37456    feature = "vizier-service",
37457))]
37458#[derive(Clone, Default, PartialEq)]
37459#[non_exhaustive]
37460pub struct CreateRegistryFeatureOperationMetadata {
37461    /// Operation metadata for Feature.
37462    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
37463
37464    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37465}
37466
37467#[cfg(all(
37468    feature = "data-foundry-service",
37469    feature = "dataset-service",
37470    feature = "deployment-resource-pool-service",
37471    feature = "endpoint-service",
37472    feature = "evaluation-service",
37473    feature = "feature-online-store-admin-service",
37474    feature = "feature-online-store-service",
37475    feature = "feature-registry-service",
37476    feature = "featurestore-online-serving-service",
37477    feature = "featurestore-service",
37478    feature = "gen-ai-cache-service",
37479    feature = "gen-ai-tuning-service",
37480    feature = "index-endpoint-service",
37481    feature = "index-service",
37482    feature = "job-service",
37483    feature = "llm-utility-service",
37484    feature = "match-service",
37485    feature = "metadata-service",
37486    feature = "migration-service",
37487    feature = "model-garden-service",
37488    feature = "model-service",
37489    feature = "notebook-service",
37490    feature = "persistent-resource-service",
37491    feature = "pipeline-service",
37492    feature = "prediction-service",
37493    feature = "reasoning-engine-execution-service",
37494    feature = "reasoning-engine-service",
37495    feature = "schedule-service",
37496    feature = "specialist-pool-service",
37497    feature = "tensorboard-service",
37498    feature = "vertex-rag-data-service",
37499    feature = "vertex-rag-service",
37500    feature = "vizier-service",
37501))]
37502impl CreateRegistryFeatureOperationMetadata {
37503    pub fn new() -> Self {
37504        std::default::Default::default()
37505    }
37506
37507    /// Sets the value of [generic_metadata][crate::model::CreateRegistryFeatureOperationMetadata::generic_metadata].
37508    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
37509    where
37510        T: std::convert::Into<crate::model::GenericOperationMetadata>,
37511    {
37512        self.generic_metadata = std::option::Option::Some(v.into());
37513        self
37514    }
37515
37516    /// Sets or clears the value of [generic_metadata][crate::model::CreateRegistryFeatureOperationMetadata::generic_metadata].
37517    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
37518    where
37519        T: std::convert::Into<crate::model::GenericOperationMetadata>,
37520    {
37521        self.generic_metadata = v.map(|x| x.into());
37522        self
37523    }
37524}
37525
37526#[cfg(all(
37527    feature = "data-foundry-service",
37528    feature = "dataset-service",
37529    feature = "deployment-resource-pool-service",
37530    feature = "endpoint-service",
37531    feature = "evaluation-service",
37532    feature = "feature-online-store-admin-service",
37533    feature = "feature-online-store-service",
37534    feature = "feature-registry-service",
37535    feature = "featurestore-online-serving-service",
37536    feature = "featurestore-service",
37537    feature = "gen-ai-cache-service",
37538    feature = "gen-ai-tuning-service",
37539    feature = "index-endpoint-service",
37540    feature = "index-service",
37541    feature = "job-service",
37542    feature = "llm-utility-service",
37543    feature = "match-service",
37544    feature = "metadata-service",
37545    feature = "migration-service",
37546    feature = "model-garden-service",
37547    feature = "model-service",
37548    feature = "notebook-service",
37549    feature = "persistent-resource-service",
37550    feature = "pipeline-service",
37551    feature = "prediction-service",
37552    feature = "reasoning-engine-execution-service",
37553    feature = "reasoning-engine-service",
37554    feature = "schedule-service",
37555    feature = "specialist-pool-service",
37556    feature = "tensorboard-service",
37557    feature = "vertex-rag-data-service",
37558    feature = "vertex-rag-service",
37559    feature = "vizier-service",
37560))]
37561impl wkt::message::Message for CreateRegistryFeatureOperationMetadata {
37562    fn typename() -> &'static str {
37563        "type.googleapis.com/google.cloud.aiplatform.v1.CreateRegistryFeatureOperationMetadata"
37564    }
37565}
37566
37567/// Details of operations that perform update Feature.
37568#[cfg(feature = "feature-registry-service")]
37569#[derive(Clone, Default, PartialEq)]
37570#[non_exhaustive]
37571pub struct UpdateFeatureOperationMetadata {
37572    /// Operation metadata for Feature Update.
37573    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
37574
37575    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37576}
37577
37578#[cfg(feature = "feature-registry-service")]
37579impl UpdateFeatureOperationMetadata {
37580    pub fn new() -> Self {
37581        std::default::Default::default()
37582    }
37583
37584    /// Sets the value of [generic_metadata][crate::model::UpdateFeatureOperationMetadata::generic_metadata].
37585    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
37586    where
37587        T: std::convert::Into<crate::model::GenericOperationMetadata>,
37588    {
37589        self.generic_metadata = std::option::Option::Some(v.into());
37590        self
37591    }
37592
37593    /// Sets or clears the value of [generic_metadata][crate::model::UpdateFeatureOperationMetadata::generic_metadata].
37594    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
37595    where
37596        T: std::convert::Into<crate::model::GenericOperationMetadata>,
37597    {
37598        self.generic_metadata = v.map(|x| x.into());
37599        self
37600    }
37601}
37602
37603#[cfg(feature = "feature-registry-service")]
37604impl wkt::message::Message for UpdateFeatureOperationMetadata {
37605    fn typename() -> &'static str {
37606        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateFeatureOperationMetadata"
37607    }
37608}
37609
37610/// Matcher for Features of an EntityType by Feature ID.
37611#[cfg(any(
37612    feature = "featurestore-online-serving-service",
37613    feature = "featurestore-service",
37614))]
37615#[derive(Clone, Default, PartialEq)]
37616#[non_exhaustive]
37617pub struct IdMatcher {
37618    /// Required. The following are accepted as `ids`:
37619    ///
37620    /// * A single-element list containing only `*`, which selects all Features
37621    ///   in the target EntityType, or
37622    /// * A list containing only Feature IDs, which selects only Features with
37623    ///   those IDs in the target EntityType.
37624    pub ids: std::vec::Vec<std::string::String>,
37625
37626    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37627}
37628
37629#[cfg(any(
37630    feature = "featurestore-online-serving-service",
37631    feature = "featurestore-service",
37632))]
37633impl IdMatcher {
37634    pub fn new() -> Self {
37635        std::default::Default::default()
37636    }
37637
37638    /// Sets the value of [ids][crate::model::IdMatcher::ids].
37639    pub fn set_ids<T, V>(mut self, v: T) -> Self
37640    where
37641        T: std::iter::IntoIterator<Item = V>,
37642        V: std::convert::Into<std::string::String>,
37643    {
37644        use std::iter::Iterator;
37645        self.ids = v.into_iter().map(|i| i.into()).collect();
37646        self
37647    }
37648}
37649
37650#[cfg(any(
37651    feature = "featurestore-online-serving-service",
37652    feature = "featurestore-service",
37653))]
37654impl wkt::message::Message for IdMatcher {
37655    fn typename() -> &'static str {
37656        "type.googleapis.com/google.cloud.aiplatform.v1.IdMatcher"
37657    }
37658}
37659
37660/// Selector for Features of an EntityType.
37661#[cfg(any(
37662    feature = "featurestore-online-serving-service",
37663    feature = "featurestore-service",
37664))]
37665#[derive(Clone, Default, PartialEq)]
37666#[non_exhaustive]
37667pub struct FeatureSelector {
37668    /// Required. Matches Features based on ID.
37669    pub id_matcher: std::option::Option<crate::model::IdMatcher>,
37670
37671    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37672}
37673
37674#[cfg(any(
37675    feature = "featurestore-online-serving-service",
37676    feature = "featurestore-service",
37677))]
37678impl FeatureSelector {
37679    pub fn new() -> Self {
37680        std::default::Default::default()
37681    }
37682
37683    /// Sets the value of [id_matcher][crate::model::FeatureSelector::id_matcher].
37684    pub fn set_id_matcher<T>(mut self, v: T) -> Self
37685    where
37686        T: std::convert::Into<crate::model::IdMatcher>,
37687    {
37688        self.id_matcher = std::option::Option::Some(v.into());
37689        self
37690    }
37691
37692    /// Sets or clears the value of [id_matcher][crate::model::FeatureSelector::id_matcher].
37693    pub fn set_or_clear_id_matcher<T>(mut self, v: std::option::Option<T>) -> Self
37694    where
37695        T: std::convert::Into<crate::model::IdMatcher>,
37696    {
37697        self.id_matcher = v.map(|x| x.into());
37698        self
37699    }
37700}
37701
37702#[cfg(any(
37703    feature = "featurestore-online-serving-service",
37704    feature = "featurestore-service",
37705))]
37706impl wkt::message::Message for FeatureSelector {
37707    fn typename() -> &'static str {
37708        "type.googleapis.com/google.cloud.aiplatform.v1.FeatureSelector"
37709    }
37710}
37711
37712/// FeatureView is representation of values that the FeatureOnlineStore will
37713/// serve based on its syncConfig.
37714#[cfg(feature = "feature-online-store-admin-service")]
37715#[derive(Clone, Default, PartialEq)]
37716#[non_exhaustive]
37717pub struct FeatureView {
37718    /// Identifier. Name of the FeatureView. Format:
37719    /// `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
37720    pub name: std::string::String,
37721
37722    /// Output only. Timestamp when this FeatureView was created.
37723    pub create_time: std::option::Option<wkt::Timestamp>,
37724
37725    /// Output only. Timestamp when this FeatureView was last updated.
37726    pub update_time: std::option::Option<wkt::Timestamp>,
37727
37728    /// Optional. Used to perform consistent read-modify-write updates. If not set,
37729    /// a blind "overwrite" update happens.
37730    pub etag: std::string::String,
37731
37732    /// Optional. The labels with user-defined metadata to organize your
37733    /// FeatureViews.
37734    ///
37735    /// Label keys and values can be no longer than 64 characters
37736    /// (Unicode codepoints), can only contain lowercase letters, numeric
37737    /// characters, underscores and dashes. International characters are allowed.
37738    ///
37739    /// See <https://goo.gl/xmQnxf> for more information on and examples of labels.
37740    /// No more than 64 user labels can be associated with one
37741    /// FeatureOnlineStore(System labels are excluded)." System reserved label keys
37742    /// are prefixed with "aiplatform.googleapis.com/" and are immutable.
37743    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
37744
37745    /// Configures when data is to be synced/updated for this FeatureView. At the
37746    /// end of the sync the latest featureValues for each entityId of this
37747    /// FeatureView are made ready for online serving.
37748    pub sync_config: std::option::Option<crate::model::feature_view::SyncConfig>,
37749
37750    /// Optional. Configuration for index preparation for vector search. It
37751    /// contains the required configurations to create an index from source data,
37752    /// so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
37753    /// performed during online serving.
37754    pub index_config: std::option::Option<crate::model::feature_view::IndexConfig>,
37755
37756    /// Optional. Configuration for FeatureView created under Optimized
37757    /// FeatureOnlineStore.
37758    pub optimized_config: std::option::Option<crate::model::feature_view::OptimizedConfig>,
37759
37760    /// Optional. Service agent type used during data sync. By default, the Vertex
37761    /// AI Service Agent is used. When using an IAM Policy to isolate this
37762    /// FeatureView within a project, a separate service account should be
37763    /// provisioned by setting this field to `SERVICE_AGENT_TYPE_FEATURE_VIEW`.
37764    /// This will generate a separate service account to access the BigQuery source
37765    /// table.
37766    pub service_agent_type: crate::model::feature_view::ServiceAgentType,
37767
37768    /// Output only. A Service Account unique to this FeatureView. The role
37769    /// bigquery.dataViewer should be granted to this service account to allow
37770    /// Vertex AI Feature Store to sync data to the online store.
37771    pub service_account_email: std::string::String,
37772
37773    /// Output only. Reserved for future use.
37774    pub satisfies_pzs: bool,
37775
37776    /// Output only. Reserved for future use.
37777    pub satisfies_pzi: bool,
37778
37779    pub source: std::option::Option<crate::model::feature_view::Source>,
37780
37781    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
37782}
37783
37784#[cfg(feature = "feature-online-store-admin-service")]
37785impl FeatureView {
37786    pub fn new() -> Self {
37787        std::default::Default::default()
37788    }
37789
37790    /// Sets the value of [name][crate::model::FeatureView::name].
37791    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37792        self.name = v.into();
37793        self
37794    }
37795
37796    /// Sets the value of [create_time][crate::model::FeatureView::create_time].
37797    pub fn set_create_time<T>(mut self, v: T) -> Self
37798    where
37799        T: std::convert::Into<wkt::Timestamp>,
37800    {
37801        self.create_time = std::option::Option::Some(v.into());
37802        self
37803    }
37804
37805    /// Sets or clears the value of [create_time][crate::model::FeatureView::create_time].
37806    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
37807    where
37808        T: std::convert::Into<wkt::Timestamp>,
37809    {
37810        self.create_time = v.map(|x| x.into());
37811        self
37812    }
37813
37814    /// Sets the value of [update_time][crate::model::FeatureView::update_time].
37815    pub fn set_update_time<T>(mut self, v: T) -> Self
37816    where
37817        T: std::convert::Into<wkt::Timestamp>,
37818    {
37819        self.update_time = std::option::Option::Some(v.into());
37820        self
37821    }
37822
37823    /// Sets or clears the value of [update_time][crate::model::FeatureView::update_time].
37824    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
37825    where
37826        T: std::convert::Into<wkt::Timestamp>,
37827    {
37828        self.update_time = v.map(|x| x.into());
37829        self
37830    }
37831
37832    /// Sets the value of [etag][crate::model::FeatureView::etag].
37833    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
37834        self.etag = v.into();
37835        self
37836    }
37837
37838    /// Sets the value of [labels][crate::model::FeatureView::labels].
37839    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
37840    where
37841        T: std::iter::IntoIterator<Item = (K, V)>,
37842        K: std::convert::Into<std::string::String>,
37843        V: std::convert::Into<std::string::String>,
37844    {
37845        use std::iter::Iterator;
37846        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
37847        self
37848    }
37849
37850    /// Sets the value of [sync_config][crate::model::FeatureView::sync_config].
37851    pub fn set_sync_config<T>(mut self, v: T) -> Self
37852    where
37853        T: std::convert::Into<crate::model::feature_view::SyncConfig>,
37854    {
37855        self.sync_config = std::option::Option::Some(v.into());
37856        self
37857    }
37858
37859    /// Sets or clears the value of [sync_config][crate::model::FeatureView::sync_config].
37860    pub fn set_or_clear_sync_config<T>(mut self, v: std::option::Option<T>) -> Self
37861    where
37862        T: std::convert::Into<crate::model::feature_view::SyncConfig>,
37863    {
37864        self.sync_config = v.map(|x| x.into());
37865        self
37866    }
37867
37868    /// Sets the value of [index_config][crate::model::FeatureView::index_config].
37869    pub fn set_index_config<T>(mut self, v: T) -> Self
37870    where
37871        T: std::convert::Into<crate::model::feature_view::IndexConfig>,
37872    {
37873        self.index_config = std::option::Option::Some(v.into());
37874        self
37875    }
37876
37877    /// Sets or clears the value of [index_config][crate::model::FeatureView::index_config].
37878    pub fn set_or_clear_index_config<T>(mut self, v: std::option::Option<T>) -> Self
37879    where
37880        T: std::convert::Into<crate::model::feature_view::IndexConfig>,
37881    {
37882        self.index_config = v.map(|x| x.into());
37883        self
37884    }
37885
37886    /// Sets the value of [optimized_config][crate::model::FeatureView::optimized_config].
37887    pub fn set_optimized_config<T>(mut self, v: T) -> Self
37888    where
37889        T: std::convert::Into<crate::model::feature_view::OptimizedConfig>,
37890    {
37891        self.optimized_config = std::option::Option::Some(v.into());
37892        self
37893    }
37894
37895    /// Sets or clears the value of [optimized_config][crate::model::FeatureView::optimized_config].
37896    pub fn set_or_clear_optimized_config<T>(mut self, v: std::option::Option<T>) -> Self
37897    where
37898        T: std::convert::Into<crate::model::feature_view::OptimizedConfig>,
37899    {
37900        self.optimized_config = v.map(|x| x.into());
37901        self
37902    }
37903
37904    /// Sets the value of [service_agent_type][crate::model::FeatureView::service_agent_type].
37905    pub fn set_service_agent_type<
37906        T: std::convert::Into<crate::model::feature_view::ServiceAgentType>,
37907    >(
37908        mut self,
37909        v: T,
37910    ) -> Self {
37911        self.service_agent_type = v.into();
37912        self
37913    }
37914
37915    /// Sets the value of [service_account_email][crate::model::FeatureView::service_account_email].
37916    pub fn set_service_account_email<T: std::convert::Into<std::string::String>>(
37917        mut self,
37918        v: T,
37919    ) -> Self {
37920        self.service_account_email = v.into();
37921        self
37922    }
37923
37924    /// Sets the value of [satisfies_pzs][crate::model::FeatureView::satisfies_pzs].
37925    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
37926        self.satisfies_pzs = v.into();
37927        self
37928    }
37929
37930    /// Sets the value of [satisfies_pzi][crate::model::FeatureView::satisfies_pzi].
37931    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
37932        self.satisfies_pzi = v.into();
37933        self
37934    }
37935
37936    /// Sets the value of [source][crate::model::FeatureView::source].
37937    ///
37938    /// Note that all the setters affecting `source` are mutually
37939    /// exclusive.
37940    pub fn set_source<
37941        T: std::convert::Into<std::option::Option<crate::model::feature_view::Source>>,
37942    >(
37943        mut self,
37944        v: T,
37945    ) -> Self {
37946        self.source = v.into();
37947        self
37948    }
37949
37950    /// The value of [source][crate::model::FeatureView::source]
37951    /// if it holds a `BigQuerySource`, `None` if the field is not set or
37952    /// holds a different branch.
37953    pub fn big_query_source(
37954        &self,
37955    ) -> std::option::Option<&std::boxed::Box<crate::model::feature_view::BigQuerySource>> {
37956        #[allow(unreachable_patterns)]
37957        self.source.as_ref().and_then(|v| match v {
37958            crate::model::feature_view::Source::BigQuerySource(v) => std::option::Option::Some(v),
37959            _ => std::option::Option::None,
37960        })
37961    }
37962
37963    /// Sets the value of [source][crate::model::FeatureView::source]
37964    /// to hold a `BigQuerySource`.
37965    ///
37966    /// Note that all the setters affecting `source` are
37967    /// mutually exclusive.
37968    pub fn set_big_query_source<
37969        T: std::convert::Into<std::boxed::Box<crate::model::feature_view::BigQuerySource>>,
37970    >(
37971        mut self,
37972        v: T,
37973    ) -> Self {
37974        self.source =
37975            std::option::Option::Some(crate::model::feature_view::Source::BigQuerySource(v.into()));
37976        self
37977    }
37978
37979    /// The value of [source][crate::model::FeatureView::source]
37980    /// if it holds a `FeatureRegistrySource`, `None` if the field is not set or
37981    /// holds a different branch.
37982    pub fn feature_registry_source(
37983        &self,
37984    ) -> std::option::Option<&std::boxed::Box<crate::model::feature_view::FeatureRegistrySource>>
37985    {
37986        #[allow(unreachable_patterns)]
37987        self.source.as_ref().and_then(|v| match v {
37988            crate::model::feature_view::Source::FeatureRegistrySource(v) => {
37989                std::option::Option::Some(v)
37990            }
37991            _ => std::option::Option::None,
37992        })
37993    }
37994
37995    /// Sets the value of [source][crate::model::FeatureView::source]
37996    /// to hold a `FeatureRegistrySource`.
37997    ///
37998    /// Note that all the setters affecting `source` are
37999    /// mutually exclusive.
38000    pub fn set_feature_registry_source<
38001        T: std::convert::Into<std::boxed::Box<crate::model::feature_view::FeatureRegistrySource>>,
38002    >(
38003        mut self,
38004        v: T,
38005    ) -> Self {
38006        self.source = std::option::Option::Some(
38007            crate::model::feature_view::Source::FeatureRegistrySource(v.into()),
38008        );
38009        self
38010    }
38011
38012    /// The value of [source][crate::model::FeatureView::source]
38013    /// if it holds a `VertexRagSource`, `None` if the field is not set or
38014    /// holds a different branch.
38015    pub fn vertex_rag_source(
38016        &self,
38017    ) -> std::option::Option<&std::boxed::Box<crate::model::feature_view::VertexRagSource>> {
38018        #[allow(unreachable_patterns)]
38019        self.source.as_ref().and_then(|v| match v {
38020            crate::model::feature_view::Source::VertexRagSource(v) => std::option::Option::Some(v),
38021            _ => std::option::Option::None,
38022        })
38023    }
38024
38025    /// Sets the value of [source][crate::model::FeatureView::source]
38026    /// to hold a `VertexRagSource`.
38027    ///
38028    /// Note that all the setters affecting `source` are
38029    /// mutually exclusive.
38030    pub fn set_vertex_rag_source<
38031        T: std::convert::Into<std::boxed::Box<crate::model::feature_view::VertexRagSource>>,
38032    >(
38033        mut self,
38034        v: T,
38035    ) -> Self {
38036        self.source = std::option::Option::Some(
38037            crate::model::feature_view::Source::VertexRagSource(v.into()),
38038        );
38039        self
38040    }
38041}
38042
38043#[cfg(feature = "feature-online-store-admin-service")]
38044impl wkt::message::Message for FeatureView {
38045    fn typename() -> &'static str {
38046        "type.googleapis.com/google.cloud.aiplatform.v1.FeatureView"
38047    }
38048}
38049
38050/// Defines additional types related to [FeatureView].
38051#[cfg(feature = "feature-online-store-admin-service")]
38052pub mod feature_view {
38053    #[allow(unused_imports)]
38054    use super::*;
38055
38056    #[cfg(feature = "feature-online-store-admin-service")]
38057    #[derive(Clone, Default, PartialEq)]
38058    #[non_exhaustive]
38059    pub struct BigQuerySource {
38060        /// Required. The BigQuery view URI that will be materialized on each sync
38061        /// trigger based on FeatureView.SyncConfig.
38062        pub uri: std::string::String,
38063
38064        /// Required. Columns to construct entity_id / row keys.
38065        pub entity_id_columns: std::vec::Vec<std::string::String>,
38066
38067        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38068    }
38069
38070    #[cfg(feature = "feature-online-store-admin-service")]
38071    impl BigQuerySource {
38072        pub fn new() -> Self {
38073            std::default::Default::default()
38074        }
38075
38076        /// Sets the value of [uri][crate::model::feature_view::BigQuerySource::uri].
38077        pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
38078            self.uri = v.into();
38079            self
38080        }
38081
38082        /// Sets the value of [entity_id_columns][crate::model::feature_view::BigQuerySource::entity_id_columns].
38083        pub fn set_entity_id_columns<T, V>(mut self, v: T) -> Self
38084        where
38085            T: std::iter::IntoIterator<Item = V>,
38086            V: std::convert::Into<std::string::String>,
38087        {
38088            use std::iter::Iterator;
38089            self.entity_id_columns = v.into_iter().map(|i| i.into()).collect();
38090            self
38091        }
38092    }
38093
38094    #[cfg(feature = "feature-online-store-admin-service")]
38095    impl wkt::message::Message for BigQuerySource {
38096        fn typename() -> &'static str {
38097            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureView.BigQuerySource"
38098        }
38099    }
38100
38101    /// Configuration for Sync. Only one option is set.
38102    #[cfg(feature = "feature-online-store-admin-service")]
38103    #[derive(Clone, Default, PartialEq)]
38104    #[non_exhaustive]
38105    pub struct SyncConfig {
38106        /// Cron schedule (<https://en.wikipedia.org/wiki/Cron>) to launch scheduled
38107        /// runs. To explicitly set a timezone to the cron tab, apply a prefix in
38108        /// the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
38109        /// The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
38110        /// database. For example, "CRON_TZ=America/New_York 1 * * * *", or
38111        /// "TZ=America/New_York 1 * * * *".
38112        pub cron: std::string::String,
38113
38114        /// Optional. If true, syncs the FeatureView in a continuous manner to Online
38115        /// Store.
38116        pub continuous: bool,
38117
38118        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38119    }
38120
38121    #[cfg(feature = "feature-online-store-admin-service")]
38122    impl SyncConfig {
38123        pub fn new() -> Self {
38124            std::default::Default::default()
38125        }
38126
38127        /// Sets the value of [cron][crate::model::feature_view::SyncConfig::cron].
38128        pub fn set_cron<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
38129            self.cron = v.into();
38130            self
38131        }
38132
38133        /// Sets the value of [continuous][crate::model::feature_view::SyncConfig::continuous].
38134        pub fn set_continuous<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
38135            self.continuous = v.into();
38136            self
38137        }
38138    }
38139
38140    #[cfg(feature = "feature-online-store-admin-service")]
38141    impl wkt::message::Message for SyncConfig {
38142        fn typename() -> &'static str {
38143            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureView.SyncConfig"
38144        }
38145    }
38146
38147    /// Configuration for vector indexing.
38148    #[cfg(feature = "feature-online-store-admin-service")]
38149    #[derive(Clone, Default, PartialEq)]
38150    #[non_exhaustive]
38151    pub struct IndexConfig {
38152        /// Optional. Column of embedding. This column contains the source data to
38153        /// create index for vector search. embedding_column must be set when using
38154        /// vector search.
38155        pub embedding_column: std::string::String,
38156
38157        /// Optional. Columns of features that're used to filter vector search
38158        /// results.
38159        pub filter_columns: std::vec::Vec<std::string::String>,
38160
38161        /// Optional. Column of crowding. This column contains crowding attribute
38162        /// which is a constraint on a neighbor list produced by
38163        /// [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1.FeatureOnlineStoreService.SearchNearestEntities]
38164        /// to diversify search results. If
38165        /// [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
38166        /// is set to K in
38167        /// [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1.SearchNearestEntitiesRequest],
38168        /// it's guaranteed that no more than K entities of the same crowding
38169        /// attribute are returned in the response.
38170        ///
38171        /// [google.cloud.aiplatform.v1.FeatureOnlineStoreService.SearchNearestEntities]: crate::client::FeatureOnlineStoreService::search_nearest_entities
38172        /// [google.cloud.aiplatform.v1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]: crate::model::NearestNeighborQuery::per_crowding_attribute_neighbor_count
38173        /// [google.cloud.aiplatform.v1.SearchNearestEntitiesRequest]: crate::model::SearchNearestEntitiesRequest
38174        pub crowding_column: std::string::String,
38175
38176        /// Optional. The number of dimensions of the input embedding.
38177        pub embedding_dimension: std::option::Option<i32>,
38178
38179        /// Optional. The distance measure used in nearest neighbor search.
38180        pub distance_measure_type: crate::model::feature_view::index_config::DistanceMeasureType,
38181
38182        /// The configuration with regard to the algorithms used for efficient
38183        /// search.
38184        pub algorithm_config:
38185            std::option::Option<crate::model::feature_view::index_config::AlgorithmConfig>,
38186
38187        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38188    }
38189
38190    #[cfg(feature = "feature-online-store-admin-service")]
38191    impl IndexConfig {
38192        pub fn new() -> Self {
38193            std::default::Default::default()
38194        }
38195
38196        /// Sets the value of [embedding_column][crate::model::feature_view::IndexConfig::embedding_column].
38197        pub fn set_embedding_column<T: std::convert::Into<std::string::String>>(
38198            mut self,
38199            v: T,
38200        ) -> Self {
38201            self.embedding_column = v.into();
38202            self
38203        }
38204
38205        /// Sets the value of [filter_columns][crate::model::feature_view::IndexConfig::filter_columns].
38206        pub fn set_filter_columns<T, V>(mut self, v: T) -> Self
38207        where
38208            T: std::iter::IntoIterator<Item = V>,
38209            V: std::convert::Into<std::string::String>,
38210        {
38211            use std::iter::Iterator;
38212            self.filter_columns = v.into_iter().map(|i| i.into()).collect();
38213            self
38214        }
38215
38216        /// Sets the value of [crowding_column][crate::model::feature_view::IndexConfig::crowding_column].
38217        pub fn set_crowding_column<T: std::convert::Into<std::string::String>>(
38218            mut self,
38219            v: T,
38220        ) -> Self {
38221            self.crowding_column = v.into();
38222            self
38223        }
38224
38225        /// Sets the value of [embedding_dimension][crate::model::feature_view::IndexConfig::embedding_dimension].
38226        pub fn set_embedding_dimension<T>(mut self, v: T) -> Self
38227        where
38228            T: std::convert::Into<i32>,
38229        {
38230            self.embedding_dimension = std::option::Option::Some(v.into());
38231            self
38232        }
38233
38234        /// Sets or clears the value of [embedding_dimension][crate::model::feature_view::IndexConfig::embedding_dimension].
38235        pub fn set_or_clear_embedding_dimension<T>(mut self, v: std::option::Option<T>) -> Self
38236        where
38237            T: std::convert::Into<i32>,
38238        {
38239            self.embedding_dimension = v.map(|x| x.into());
38240            self
38241        }
38242
38243        /// Sets the value of [distance_measure_type][crate::model::feature_view::IndexConfig::distance_measure_type].
38244        pub fn set_distance_measure_type<
38245            T: std::convert::Into<crate::model::feature_view::index_config::DistanceMeasureType>,
38246        >(
38247            mut self,
38248            v: T,
38249        ) -> Self {
38250            self.distance_measure_type = v.into();
38251            self
38252        }
38253
38254        /// Sets the value of [algorithm_config][crate::model::feature_view::IndexConfig::algorithm_config].
38255        ///
38256        /// Note that all the setters affecting `algorithm_config` are mutually
38257        /// exclusive.
38258        pub fn set_algorithm_config<
38259            T: std::convert::Into<
38260                    std::option::Option<crate::model::feature_view::index_config::AlgorithmConfig>,
38261                >,
38262        >(
38263            mut self,
38264            v: T,
38265        ) -> Self {
38266            self.algorithm_config = v.into();
38267            self
38268        }
38269
38270        /// The value of [algorithm_config][crate::model::feature_view::IndexConfig::algorithm_config]
38271        /// if it holds a `TreeAhConfig`, `None` if the field is not set or
38272        /// holds a different branch.
38273        pub fn tree_ah_config(
38274            &self,
38275        ) -> std::option::Option<
38276            &std::boxed::Box<crate::model::feature_view::index_config::TreeAHConfig>,
38277        > {
38278            #[allow(unreachable_patterns)]
38279            self.algorithm_config.as_ref().and_then(|v| match v {
38280                crate::model::feature_view::index_config::AlgorithmConfig::TreeAhConfig(v) => {
38281                    std::option::Option::Some(v)
38282                }
38283                _ => std::option::Option::None,
38284            })
38285        }
38286
38287        /// Sets the value of [algorithm_config][crate::model::feature_view::IndexConfig::algorithm_config]
38288        /// to hold a `TreeAhConfig`.
38289        ///
38290        /// Note that all the setters affecting `algorithm_config` are
38291        /// mutually exclusive.
38292        pub fn set_tree_ah_config<
38293            T: std::convert::Into<
38294                    std::boxed::Box<crate::model::feature_view::index_config::TreeAHConfig>,
38295                >,
38296        >(
38297            mut self,
38298            v: T,
38299        ) -> Self {
38300            self.algorithm_config = std::option::Option::Some(
38301                crate::model::feature_view::index_config::AlgorithmConfig::TreeAhConfig(v.into()),
38302            );
38303            self
38304        }
38305
38306        /// The value of [algorithm_config][crate::model::feature_view::IndexConfig::algorithm_config]
38307        /// if it holds a `BruteForceConfig`, `None` if the field is not set or
38308        /// holds a different branch.
38309        pub fn brute_force_config(
38310            &self,
38311        ) -> std::option::Option<
38312            &std::boxed::Box<crate::model::feature_view::index_config::BruteForceConfig>,
38313        > {
38314            #[allow(unreachable_patterns)]
38315            self.algorithm_config.as_ref().and_then(|v| match v {
38316                crate::model::feature_view::index_config::AlgorithmConfig::BruteForceConfig(v) => {
38317                    std::option::Option::Some(v)
38318                }
38319                _ => std::option::Option::None,
38320            })
38321        }
38322
38323        /// Sets the value of [algorithm_config][crate::model::feature_view::IndexConfig::algorithm_config]
38324        /// to hold a `BruteForceConfig`.
38325        ///
38326        /// Note that all the setters affecting `algorithm_config` are
38327        /// mutually exclusive.
38328        pub fn set_brute_force_config<
38329            T: std::convert::Into<
38330                    std::boxed::Box<crate::model::feature_view::index_config::BruteForceConfig>,
38331                >,
38332        >(
38333            mut self,
38334            v: T,
38335        ) -> Self {
38336            self.algorithm_config = std::option::Option::Some(
38337                crate::model::feature_view::index_config::AlgorithmConfig::BruteForceConfig(
38338                    v.into(),
38339                ),
38340            );
38341            self
38342        }
38343    }
38344
38345    #[cfg(feature = "feature-online-store-admin-service")]
38346    impl wkt::message::Message for IndexConfig {
38347        fn typename() -> &'static str {
38348            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureView.IndexConfig"
38349        }
38350    }
38351
38352    /// Defines additional types related to [IndexConfig].
38353    #[cfg(feature = "feature-online-store-admin-service")]
38354    pub mod index_config {
38355        #[allow(unused_imports)]
38356        use super::*;
38357
38358        /// Configuration options for using brute force search.
38359        #[cfg(feature = "feature-online-store-admin-service")]
38360        #[derive(Clone, Default, PartialEq)]
38361        #[non_exhaustive]
38362        pub struct BruteForceConfig {
38363            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38364        }
38365
38366        #[cfg(feature = "feature-online-store-admin-service")]
38367        impl BruteForceConfig {
38368            pub fn new() -> Self {
38369                std::default::Default::default()
38370            }
38371        }
38372
38373        #[cfg(feature = "feature-online-store-admin-service")]
38374        impl wkt::message::Message for BruteForceConfig {
38375            fn typename() -> &'static str {
38376                "type.googleapis.com/google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig"
38377            }
38378        }
38379
38380        /// Configuration options for the tree-AH algorithm.
38381        #[cfg(feature = "feature-online-store-admin-service")]
38382        #[derive(Clone, Default, PartialEq)]
38383        #[non_exhaustive]
38384        pub struct TreeAHConfig {
38385            /// Optional. Number of embeddings on each leaf node. The default value is
38386            /// 1000 if not set.
38387            pub leaf_node_embedding_count: std::option::Option<i64>,
38388
38389            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38390        }
38391
38392        #[cfg(feature = "feature-online-store-admin-service")]
38393        impl TreeAHConfig {
38394            pub fn new() -> Self {
38395                std::default::Default::default()
38396            }
38397
38398            /// Sets the value of [leaf_node_embedding_count][crate::model::feature_view::index_config::TreeAHConfig::leaf_node_embedding_count].
38399            pub fn set_leaf_node_embedding_count<T>(mut self, v: T) -> Self
38400            where
38401                T: std::convert::Into<i64>,
38402            {
38403                self.leaf_node_embedding_count = std::option::Option::Some(v.into());
38404                self
38405            }
38406
38407            /// Sets or clears the value of [leaf_node_embedding_count][crate::model::feature_view::index_config::TreeAHConfig::leaf_node_embedding_count].
38408            pub fn set_or_clear_leaf_node_embedding_count<T>(
38409                mut self,
38410                v: std::option::Option<T>,
38411            ) -> Self
38412            where
38413                T: std::convert::Into<i64>,
38414            {
38415                self.leaf_node_embedding_count = v.map(|x| x.into());
38416                self
38417            }
38418        }
38419
38420        #[cfg(feature = "feature-online-store-admin-service")]
38421        impl wkt::message::Message for TreeAHConfig {
38422            fn typename() -> &'static str {
38423                "type.googleapis.com/google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig"
38424            }
38425        }
38426
38427        /// The distance measure used in nearest neighbor search.
38428        ///
38429        /// # Working with unknown values
38430        ///
38431        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
38432        /// additional enum variants at any time. Adding new variants is not considered
38433        /// a breaking change. Applications should write their code in anticipation of:
38434        ///
38435        /// - New values appearing in future releases of the client library, **and**
38436        /// - New values received dynamically, without application changes.
38437        ///
38438        /// Please consult the [Working with enums] section in the user guide for some
38439        /// guidelines.
38440        ///
38441        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
38442        #[cfg(feature = "feature-online-store-admin-service")]
38443        #[derive(Clone, Debug, PartialEq)]
38444        #[non_exhaustive]
38445        pub enum DistanceMeasureType {
38446            /// Should not be set.
38447            Unspecified,
38448            /// Euclidean (L_2) Distance.
38449            SquaredL2Distance,
38450            /// Cosine Distance. Defined as 1 - cosine similarity.
38451            ///
38452            /// We strongly suggest using DOT_PRODUCT_DISTANCE + UNIT_L2_NORM instead
38453            /// of COSINE distance. Our algorithms have been more optimized for
38454            /// DOT_PRODUCT distance which, when combined with UNIT_L2_NORM, is
38455            /// mathematically equivalent to COSINE distance and results in the same
38456            /// ranking.
38457            CosineDistance,
38458            /// Dot Product Distance. Defined as a negative of the dot product.
38459            DotProductDistance,
38460            /// If set, the enum was initialized with an unknown value.
38461            ///
38462            /// Applications can examine the value using [DistanceMeasureType::value] or
38463            /// [DistanceMeasureType::name].
38464            UnknownValue(distance_measure_type::UnknownValue),
38465        }
38466
38467        #[doc(hidden)]
38468        #[cfg(feature = "feature-online-store-admin-service")]
38469        pub mod distance_measure_type {
38470            #[allow(unused_imports)]
38471            use super::*;
38472            #[derive(Clone, Debug, PartialEq)]
38473            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
38474        }
38475
38476        #[cfg(feature = "feature-online-store-admin-service")]
38477        impl DistanceMeasureType {
38478            /// Gets the enum value.
38479            ///
38480            /// Returns `None` if the enum contains an unknown value deserialized from
38481            /// the string representation of enums.
38482            pub fn value(&self) -> std::option::Option<i32> {
38483                match self {
38484                    Self::Unspecified => std::option::Option::Some(0),
38485                    Self::SquaredL2Distance => std::option::Option::Some(1),
38486                    Self::CosineDistance => std::option::Option::Some(2),
38487                    Self::DotProductDistance => std::option::Option::Some(3),
38488                    Self::UnknownValue(u) => u.0.value(),
38489                }
38490            }
38491
38492            /// Gets the enum value as a string.
38493            ///
38494            /// Returns `None` if the enum contains an unknown value deserialized from
38495            /// the integer representation of enums.
38496            pub fn name(&self) -> std::option::Option<&str> {
38497                match self {
38498                    Self::Unspecified => {
38499                        std::option::Option::Some("DISTANCE_MEASURE_TYPE_UNSPECIFIED")
38500                    }
38501                    Self::SquaredL2Distance => std::option::Option::Some("SQUARED_L2_DISTANCE"),
38502                    Self::CosineDistance => std::option::Option::Some("COSINE_DISTANCE"),
38503                    Self::DotProductDistance => std::option::Option::Some("DOT_PRODUCT_DISTANCE"),
38504                    Self::UnknownValue(u) => u.0.name(),
38505                }
38506            }
38507        }
38508
38509        #[cfg(feature = "feature-online-store-admin-service")]
38510        impl std::default::Default for DistanceMeasureType {
38511            fn default() -> Self {
38512                use std::convert::From;
38513                Self::from(0)
38514            }
38515        }
38516
38517        #[cfg(feature = "feature-online-store-admin-service")]
38518        impl std::fmt::Display for DistanceMeasureType {
38519            fn fmt(
38520                &self,
38521                f: &mut std::fmt::Formatter<'_>,
38522            ) -> std::result::Result<(), std::fmt::Error> {
38523                wkt::internal::display_enum(f, self.name(), self.value())
38524            }
38525        }
38526
38527        #[cfg(feature = "feature-online-store-admin-service")]
38528        impl std::convert::From<i32> for DistanceMeasureType {
38529            fn from(value: i32) -> Self {
38530                match value {
38531                    0 => Self::Unspecified,
38532                    1 => Self::SquaredL2Distance,
38533                    2 => Self::CosineDistance,
38534                    3 => Self::DotProductDistance,
38535                    _ => Self::UnknownValue(distance_measure_type::UnknownValue(
38536                        wkt::internal::UnknownEnumValue::Integer(value),
38537                    )),
38538                }
38539            }
38540        }
38541
38542        #[cfg(feature = "feature-online-store-admin-service")]
38543        impl std::convert::From<&str> for DistanceMeasureType {
38544            fn from(value: &str) -> Self {
38545                use std::string::ToString;
38546                match value {
38547                    "DISTANCE_MEASURE_TYPE_UNSPECIFIED" => Self::Unspecified,
38548                    "SQUARED_L2_DISTANCE" => Self::SquaredL2Distance,
38549                    "COSINE_DISTANCE" => Self::CosineDistance,
38550                    "DOT_PRODUCT_DISTANCE" => Self::DotProductDistance,
38551                    _ => Self::UnknownValue(distance_measure_type::UnknownValue(
38552                        wkt::internal::UnknownEnumValue::String(value.to_string()),
38553                    )),
38554                }
38555            }
38556        }
38557
38558        #[cfg(feature = "feature-online-store-admin-service")]
38559        impl serde::ser::Serialize for DistanceMeasureType {
38560            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
38561            where
38562                S: serde::Serializer,
38563            {
38564                match self {
38565                    Self::Unspecified => serializer.serialize_i32(0),
38566                    Self::SquaredL2Distance => serializer.serialize_i32(1),
38567                    Self::CosineDistance => serializer.serialize_i32(2),
38568                    Self::DotProductDistance => serializer.serialize_i32(3),
38569                    Self::UnknownValue(u) => u.0.serialize(serializer),
38570                }
38571            }
38572        }
38573
38574        #[cfg(feature = "feature-online-store-admin-service")]
38575        impl<'de> serde::de::Deserialize<'de> for DistanceMeasureType {
38576            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
38577            where
38578                D: serde::Deserializer<'de>,
38579            {
38580                deserializer.deserialize_any(
38581                    wkt::internal::EnumVisitor::<DistanceMeasureType>::new(
38582                        ".google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType",
38583                    ),
38584                )
38585            }
38586        }
38587
38588        /// The configuration with regard to the algorithms used for efficient
38589        /// search.
38590        #[cfg(feature = "feature-online-store-admin-service")]
38591        #[derive(Clone, Debug, PartialEq)]
38592        #[non_exhaustive]
38593        pub enum AlgorithmConfig {
38594            /// Optional. Configuration options for the tree-AH algorithm (Shallow tree
38595            ///
38596            /// + Asymmetric Hashing). Please refer to this paper for more details:
38597            ///   <https://arxiv.org/abs/1908.10396>
38598            TreeAhConfig(std::boxed::Box<crate::model::feature_view::index_config::TreeAHConfig>),
38599            /// Optional. Configuration options for using brute force search, which
38600            /// simply implements the standard linear search in the database for each
38601            /// query. It is primarily meant for benchmarking and to generate the
38602            /// ground truth for approximate search.
38603            BruteForceConfig(
38604                std::boxed::Box<crate::model::feature_view::index_config::BruteForceConfig>,
38605            ),
38606        }
38607    }
38608
38609    /// A Feature Registry source for features that need to be synced to Online
38610    /// Store.
38611    #[cfg(feature = "feature-online-store-admin-service")]
38612    #[derive(Clone, Default, PartialEq)]
38613    #[non_exhaustive]
38614    pub struct FeatureRegistrySource {
38615        /// Required. List of features that need to be synced to Online Store.
38616        pub feature_groups:
38617            std::vec::Vec<crate::model::feature_view::feature_registry_source::FeatureGroup>,
38618
38619        /// Optional. The project number of the parent project of the Feature Groups.
38620        pub project_number: std::option::Option<i64>,
38621
38622        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38623    }
38624
38625    #[cfg(feature = "feature-online-store-admin-service")]
38626    impl FeatureRegistrySource {
38627        pub fn new() -> Self {
38628            std::default::Default::default()
38629        }
38630
38631        /// Sets the value of [feature_groups][crate::model::feature_view::FeatureRegistrySource::feature_groups].
38632        pub fn set_feature_groups<T, V>(mut self, v: T) -> Self
38633        where
38634            T: std::iter::IntoIterator<Item = V>,
38635            V: std::convert::Into<
38636                    crate::model::feature_view::feature_registry_source::FeatureGroup,
38637                >,
38638        {
38639            use std::iter::Iterator;
38640            self.feature_groups = v.into_iter().map(|i| i.into()).collect();
38641            self
38642        }
38643
38644        /// Sets the value of [project_number][crate::model::feature_view::FeatureRegistrySource::project_number].
38645        pub fn set_project_number<T>(mut self, v: T) -> Self
38646        where
38647            T: std::convert::Into<i64>,
38648        {
38649            self.project_number = std::option::Option::Some(v.into());
38650            self
38651        }
38652
38653        /// Sets or clears the value of [project_number][crate::model::feature_view::FeatureRegistrySource::project_number].
38654        pub fn set_or_clear_project_number<T>(mut self, v: std::option::Option<T>) -> Self
38655        where
38656            T: std::convert::Into<i64>,
38657        {
38658            self.project_number = v.map(|x| x.into());
38659            self
38660        }
38661    }
38662
38663    #[cfg(feature = "feature-online-store-admin-service")]
38664    impl wkt::message::Message for FeatureRegistrySource {
38665        fn typename() -> &'static str {
38666            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource"
38667        }
38668    }
38669
38670    /// Defines additional types related to [FeatureRegistrySource].
38671    #[cfg(feature = "feature-online-store-admin-service")]
38672    pub mod feature_registry_source {
38673        #[allow(unused_imports)]
38674        use super::*;
38675
38676        /// Features belonging to a single feature group that will be
38677        /// synced to Online Store.
38678        #[cfg(feature = "feature-online-store-admin-service")]
38679        #[derive(Clone, Default, PartialEq)]
38680        #[non_exhaustive]
38681        pub struct FeatureGroup {
38682            /// Required. Identifier of the feature group.
38683            pub feature_group_id: std::string::String,
38684
38685            /// Required. Identifiers of features under the feature group.
38686            pub feature_ids: std::vec::Vec<std::string::String>,
38687
38688            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38689        }
38690
38691        #[cfg(feature = "feature-online-store-admin-service")]
38692        impl FeatureGroup {
38693            pub fn new() -> Self {
38694                std::default::Default::default()
38695            }
38696
38697            /// Sets the value of [feature_group_id][crate::model::feature_view::feature_registry_source::FeatureGroup::feature_group_id].
38698            pub fn set_feature_group_id<T: std::convert::Into<std::string::String>>(
38699                mut self,
38700                v: T,
38701            ) -> Self {
38702                self.feature_group_id = v.into();
38703                self
38704            }
38705
38706            /// Sets the value of [feature_ids][crate::model::feature_view::feature_registry_source::FeatureGroup::feature_ids].
38707            pub fn set_feature_ids<T, V>(mut self, v: T) -> Self
38708            where
38709                T: std::iter::IntoIterator<Item = V>,
38710                V: std::convert::Into<std::string::String>,
38711            {
38712                use std::iter::Iterator;
38713                self.feature_ids = v.into_iter().map(|i| i.into()).collect();
38714                self
38715            }
38716        }
38717
38718        #[cfg(feature = "feature-online-store-admin-service")]
38719        impl wkt::message::Message for FeatureGroup {
38720            fn typename() -> &'static str {
38721                "type.googleapis.com/google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.FeatureGroup"
38722            }
38723        }
38724    }
38725
38726    /// A Vertex Rag source for features that need to be synced to Online
38727    /// Store.
38728    #[cfg(feature = "feature-online-store-admin-service")]
38729    #[derive(Clone, Default, PartialEq)]
38730    #[non_exhaustive]
38731    pub struct VertexRagSource {
38732        /// Required. The BigQuery view/table URI that will be materialized on each
38733        /// manual sync trigger. The table/view is expected to have the following
38734        /// columns and types at least:
38735        ///
38736        /// - `corpus_id` (STRING, NULLABLE/REQUIRED)
38737        /// - `file_id` (STRING, NULLABLE/REQUIRED)
38738        /// - `chunk_id` (STRING, NULLABLE/REQUIRED)
38739        /// - `chunk_data_type` (STRING, NULLABLE/REQUIRED)
38740        /// - `chunk_data` (STRING, NULLABLE/REQUIRED)
38741        /// - `embeddings` (FLOAT, REPEATED)
38742        /// - `file_original_uri` (STRING, NULLABLE/REQUIRED)
38743        pub uri: std::string::String,
38744
38745        /// Optional. The RAG corpus id corresponding to this FeatureView.
38746        pub rag_corpus_id: i64,
38747
38748        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38749    }
38750
38751    #[cfg(feature = "feature-online-store-admin-service")]
38752    impl VertexRagSource {
38753        pub fn new() -> Self {
38754            std::default::Default::default()
38755        }
38756
38757        /// Sets the value of [uri][crate::model::feature_view::VertexRagSource::uri].
38758        pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
38759            self.uri = v.into();
38760            self
38761        }
38762
38763        /// Sets the value of [rag_corpus_id][crate::model::feature_view::VertexRagSource::rag_corpus_id].
38764        pub fn set_rag_corpus_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
38765            self.rag_corpus_id = v.into();
38766            self
38767        }
38768    }
38769
38770    #[cfg(feature = "feature-online-store-admin-service")]
38771    impl wkt::message::Message for VertexRagSource {
38772        fn typename() -> &'static str {
38773            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureView.VertexRagSource"
38774        }
38775    }
38776
38777    /// Configuration for FeatureViews created in Optimized FeatureOnlineStore.
38778    #[cfg(feature = "feature-online-store-admin-service")]
38779    #[derive(Clone, Default, PartialEq)]
38780    #[non_exhaustive]
38781    pub struct OptimizedConfig {
38782        /// Optional. A description of resources that the FeatureView uses, which to
38783        /// large degree are decided by Vertex AI, and optionally allows only a
38784        /// modest additional configuration. If min_replica_count is not set, the
38785        /// default value is 2. If max_replica_count is not set, the default value
38786        /// is 6. The max allowed replica count is 1000.
38787        pub automatic_resources: std::option::Option<crate::model::AutomaticResources>,
38788
38789        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
38790    }
38791
38792    #[cfg(feature = "feature-online-store-admin-service")]
38793    impl OptimizedConfig {
38794        pub fn new() -> Self {
38795            std::default::Default::default()
38796        }
38797
38798        /// Sets the value of [automatic_resources][crate::model::feature_view::OptimizedConfig::automatic_resources].
38799        pub fn set_automatic_resources<T>(mut self, v: T) -> Self
38800        where
38801            T: std::convert::Into<crate::model::AutomaticResources>,
38802        {
38803            self.automatic_resources = std::option::Option::Some(v.into());
38804            self
38805        }
38806
38807        /// Sets or clears the value of [automatic_resources][crate::model::feature_view::OptimizedConfig::automatic_resources].
38808        pub fn set_or_clear_automatic_resources<T>(mut self, v: std::option::Option<T>) -> Self
38809        where
38810            T: std::convert::Into<crate::model::AutomaticResources>,
38811        {
38812            self.automatic_resources = v.map(|x| x.into());
38813            self
38814        }
38815    }
38816
38817    #[cfg(feature = "feature-online-store-admin-service")]
38818    impl wkt::message::Message for OptimizedConfig {
38819        fn typename() -> &'static str {
38820            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureView.OptimizedConfig"
38821        }
38822    }
38823
38824    /// Service agent type used during data sync.
38825    ///
38826    /// # Working with unknown values
38827    ///
38828    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
38829    /// additional enum variants at any time. Adding new variants is not considered
38830    /// a breaking change. Applications should write their code in anticipation of:
38831    ///
38832    /// - New values appearing in future releases of the client library, **and**
38833    /// - New values received dynamically, without application changes.
38834    ///
38835    /// Please consult the [Working with enums] section in the user guide for some
38836    /// guidelines.
38837    ///
38838    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
38839    #[cfg(feature = "feature-online-store-admin-service")]
38840    #[derive(Clone, Debug, PartialEq)]
38841    #[non_exhaustive]
38842    pub enum ServiceAgentType {
38843        /// By default, the project-level Vertex AI Service Agent is enabled.
38844        Unspecified,
38845        /// Indicates the project-level Vertex AI Service Agent
38846        /// (<https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents>)
38847        /// will be used during sync jobs.
38848        Project,
38849        /// Enable a FeatureView service account to be created by Vertex AI and
38850        /// output in the field `service_account_email`. This service account will
38851        /// be used to read from the source BigQuery table during sync.
38852        FeatureView,
38853        /// If set, the enum was initialized with an unknown value.
38854        ///
38855        /// Applications can examine the value using [ServiceAgentType::value] or
38856        /// [ServiceAgentType::name].
38857        UnknownValue(service_agent_type::UnknownValue),
38858    }
38859
38860    #[doc(hidden)]
38861    #[cfg(feature = "feature-online-store-admin-service")]
38862    pub mod service_agent_type {
38863        #[allow(unused_imports)]
38864        use super::*;
38865        #[derive(Clone, Debug, PartialEq)]
38866        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
38867    }
38868
38869    #[cfg(feature = "feature-online-store-admin-service")]
38870    impl ServiceAgentType {
38871        /// Gets the enum value.
38872        ///
38873        /// Returns `None` if the enum contains an unknown value deserialized from
38874        /// the string representation of enums.
38875        pub fn value(&self) -> std::option::Option<i32> {
38876            match self {
38877                Self::Unspecified => std::option::Option::Some(0),
38878                Self::Project => std::option::Option::Some(1),
38879                Self::FeatureView => std::option::Option::Some(2),
38880                Self::UnknownValue(u) => u.0.value(),
38881            }
38882        }
38883
38884        /// Gets the enum value as a string.
38885        ///
38886        /// Returns `None` if the enum contains an unknown value deserialized from
38887        /// the integer representation of enums.
38888        pub fn name(&self) -> std::option::Option<&str> {
38889            match self {
38890                Self::Unspecified => std::option::Option::Some("SERVICE_AGENT_TYPE_UNSPECIFIED"),
38891                Self::Project => std::option::Option::Some("SERVICE_AGENT_TYPE_PROJECT"),
38892                Self::FeatureView => std::option::Option::Some("SERVICE_AGENT_TYPE_FEATURE_VIEW"),
38893                Self::UnknownValue(u) => u.0.name(),
38894            }
38895        }
38896    }
38897
38898    #[cfg(feature = "feature-online-store-admin-service")]
38899    impl std::default::Default for ServiceAgentType {
38900        fn default() -> Self {
38901            use std::convert::From;
38902            Self::from(0)
38903        }
38904    }
38905
38906    #[cfg(feature = "feature-online-store-admin-service")]
38907    impl std::fmt::Display for ServiceAgentType {
38908        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
38909            wkt::internal::display_enum(f, self.name(), self.value())
38910        }
38911    }
38912
38913    #[cfg(feature = "feature-online-store-admin-service")]
38914    impl std::convert::From<i32> for ServiceAgentType {
38915        fn from(value: i32) -> Self {
38916            match value {
38917                0 => Self::Unspecified,
38918                1 => Self::Project,
38919                2 => Self::FeatureView,
38920                _ => Self::UnknownValue(service_agent_type::UnknownValue(
38921                    wkt::internal::UnknownEnumValue::Integer(value),
38922                )),
38923            }
38924        }
38925    }
38926
38927    #[cfg(feature = "feature-online-store-admin-service")]
38928    impl std::convert::From<&str> for ServiceAgentType {
38929        fn from(value: &str) -> Self {
38930            use std::string::ToString;
38931            match value {
38932                "SERVICE_AGENT_TYPE_UNSPECIFIED" => Self::Unspecified,
38933                "SERVICE_AGENT_TYPE_PROJECT" => Self::Project,
38934                "SERVICE_AGENT_TYPE_FEATURE_VIEW" => Self::FeatureView,
38935                _ => Self::UnknownValue(service_agent_type::UnknownValue(
38936                    wkt::internal::UnknownEnumValue::String(value.to_string()),
38937                )),
38938            }
38939        }
38940    }
38941
38942    #[cfg(feature = "feature-online-store-admin-service")]
38943    impl serde::ser::Serialize for ServiceAgentType {
38944        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
38945        where
38946            S: serde::Serializer,
38947        {
38948            match self {
38949                Self::Unspecified => serializer.serialize_i32(0),
38950                Self::Project => serializer.serialize_i32(1),
38951                Self::FeatureView => serializer.serialize_i32(2),
38952                Self::UnknownValue(u) => u.0.serialize(serializer),
38953            }
38954        }
38955    }
38956
38957    #[cfg(feature = "feature-online-store-admin-service")]
38958    impl<'de> serde::de::Deserialize<'de> for ServiceAgentType {
38959        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
38960        where
38961            D: serde::Deserializer<'de>,
38962        {
38963            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ServiceAgentType>::new(
38964                ".google.cloud.aiplatform.v1.FeatureView.ServiceAgentType",
38965            ))
38966        }
38967    }
38968
38969    #[cfg(feature = "feature-online-store-admin-service")]
38970    #[derive(Clone, Debug, PartialEq)]
38971    #[non_exhaustive]
38972    pub enum Source {
38973        /// Optional. Configures how data is supposed to be extracted from a BigQuery
38974        /// source to be loaded onto the FeatureOnlineStore.
38975        BigQuerySource(std::boxed::Box<crate::model::feature_view::BigQuerySource>),
38976        /// Optional. Configures the features from a Feature Registry source that
38977        /// need to be loaded onto the FeatureOnlineStore.
38978        FeatureRegistrySource(std::boxed::Box<crate::model::feature_view::FeatureRegistrySource>),
38979        /// Optional. The Vertex RAG Source that the FeatureView is linked to.
38980        VertexRagSource(std::boxed::Box<crate::model::feature_view::VertexRagSource>),
38981    }
38982}
38983
38984/// FeatureViewSync is a representation of sync operation which copies data from
38985/// data source to Feature View in Online Store.
38986#[cfg(feature = "feature-online-store-admin-service")]
38987#[derive(Clone, Default, PartialEq)]
38988#[non_exhaustive]
38989pub struct FeatureViewSync {
38990    /// Identifier. Name of the FeatureViewSync. Format:
38991    /// `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
38992    pub name: std::string::String,
38993
38994    /// Output only. Time when this FeatureViewSync is created. Creation of a
38995    /// FeatureViewSync means that the job is pending / waiting for sufficient
38996    /// resources but may not have started the actual data transfer yet.
38997    pub create_time: std::option::Option<wkt::Timestamp>,
38998
38999    /// Output only. Time when this FeatureViewSync is finished.
39000    pub run_time: std::option::Option<gtype::model::Interval>,
39001
39002    /// Output only. Final status of the FeatureViewSync.
39003    pub final_status: std::option::Option<rpc::model::Status>,
39004
39005    /// Output only. Summary of the sync job.
39006    pub sync_summary: std::option::Option<crate::model::feature_view_sync::SyncSummary>,
39007
39008    /// Output only. Reserved for future use.
39009    pub satisfies_pzs: bool,
39010
39011    /// Output only. Reserved for future use.
39012    pub satisfies_pzi: bool,
39013
39014    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39015}
39016
39017#[cfg(feature = "feature-online-store-admin-service")]
39018impl FeatureViewSync {
39019    pub fn new() -> Self {
39020        std::default::Default::default()
39021    }
39022
39023    /// Sets the value of [name][crate::model::FeatureViewSync::name].
39024    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
39025        self.name = v.into();
39026        self
39027    }
39028
39029    /// Sets the value of [create_time][crate::model::FeatureViewSync::create_time].
39030    pub fn set_create_time<T>(mut self, v: T) -> Self
39031    where
39032        T: std::convert::Into<wkt::Timestamp>,
39033    {
39034        self.create_time = std::option::Option::Some(v.into());
39035        self
39036    }
39037
39038    /// Sets or clears the value of [create_time][crate::model::FeatureViewSync::create_time].
39039    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
39040    where
39041        T: std::convert::Into<wkt::Timestamp>,
39042    {
39043        self.create_time = v.map(|x| x.into());
39044        self
39045    }
39046
39047    /// Sets the value of [run_time][crate::model::FeatureViewSync::run_time].
39048    pub fn set_run_time<T>(mut self, v: T) -> Self
39049    where
39050        T: std::convert::Into<gtype::model::Interval>,
39051    {
39052        self.run_time = std::option::Option::Some(v.into());
39053        self
39054    }
39055
39056    /// Sets or clears the value of [run_time][crate::model::FeatureViewSync::run_time].
39057    pub fn set_or_clear_run_time<T>(mut self, v: std::option::Option<T>) -> Self
39058    where
39059        T: std::convert::Into<gtype::model::Interval>,
39060    {
39061        self.run_time = v.map(|x| x.into());
39062        self
39063    }
39064
39065    /// Sets the value of [final_status][crate::model::FeatureViewSync::final_status].
39066    pub fn set_final_status<T>(mut self, v: T) -> Self
39067    where
39068        T: std::convert::Into<rpc::model::Status>,
39069    {
39070        self.final_status = std::option::Option::Some(v.into());
39071        self
39072    }
39073
39074    /// Sets or clears the value of [final_status][crate::model::FeatureViewSync::final_status].
39075    pub fn set_or_clear_final_status<T>(mut self, v: std::option::Option<T>) -> Self
39076    where
39077        T: std::convert::Into<rpc::model::Status>,
39078    {
39079        self.final_status = v.map(|x| x.into());
39080        self
39081    }
39082
39083    /// Sets the value of [sync_summary][crate::model::FeatureViewSync::sync_summary].
39084    pub fn set_sync_summary<T>(mut self, v: T) -> Self
39085    where
39086        T: std::convert::Into<crate::model::feature_view_sync::SyncSummary>,
39087    {
39088        self.sync_summary = std::option::Option::Some(v.into());
39089        self
39090    }
39091
39092    /// Sets or clears the value of [sync_summary][crate::model::FeatureViewSync::sync_summary].
39093    pub fn set_or_clear_sync_summary<T>(mut self, v: std::option::Option<T>) -> Self
39094    where
39095        T: std::convert::Into<crate::model::feature_view_sync::SyncSummary>,
39096    {
39097        self.sync_summary = v.map(|x| x.into());
39098        self
39099    }
39100
39101    /// Sets the value of [satisfies_pzs][crate::model::FeatureViewSync::satisfies_pzs].
39102    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
39103        self.satisfies_pzs = v.into();
39104        self
39105    }
39106
39107    /// Sets the value of [satisfies_pzi][crate::model::FeatureViewSync::satisfies_pzi].
39108    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
39109        self.satisfies_pzi = v.into();
39110        self
39111    }
39112}
39113
39114#[cfg(feature = "feature-online-store-admin-service")]
39115impl wkt::message::Message for FeatureViewSync {
39116    fn typename() -> &'static str {
39117        "type.googleapis.com/google.cloud.aiplatform.v1.FeatureViewSync"
39118    }
39119}
39120
39121/// Defines additional types related to [FeatureViewSync].
39122#[cfg(feature = "feature-online-store-admin-service")]
39123pub mod feature_view_sync {
39124    #[allow(unused_imports)]
39125    use super::*;
39126
39127    /// Summary from the Sync job. For continuous syncs, the summary is updated
39128    /// periodically. For batch syncs, it gets updated on completion of the sync.
39129    #[cfg(feature = "feature-online-store-admin-service")]
39130    #[derive(Clone, Default, PartialEq)]
39131    #[non_exhaustive]
39132    pub struct SyncSummary {
39133        /// Output only. Total number of rows synced.
39134        pub row_synced: i64,
39135
39136        /// Output only. BigQuery slot milliseconds consumed for the sync job.
39137        pub total_slot: i64,
39138
39139        /// Lower bound of the system time watermark for the sync job. This is only
39140        /// set for continuously syncing feature views.
39141        pub system_watermark_time: std::option::Option<wkt::Timestamp>,
39142
39143        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39144    }
39145
39146    #[cfg(feature = "feature-online-store-admin-service")]
39147    impl SyncSummary {
39148        pub fn new() -> Self {
39149            std::default::Default::default()
39150        }
39151
39152        /// Sets the value of [row_synced][crate::model::feature_view_sync::SyncSummary::row_synced].
39153        pub fn set_row_synced<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
39154            self.row_synced = v.into();
39155            self
39156        }
39157
39158        /// Sets the value of [total_slot][crate::model::feature_view_sync::SyncSummary::total_slot].
39159        pub fn set_total_slot<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
39160            self.total_slot = v.into();
39161            self
39162        }
39163
39164        /// Sets the value of [system_watermark_time][crate::model::feature_view_sync::SyncSummary::system_watermark_time].
39165        pub fn set_system_watermark_time<T>(mut self, v: T) -> Self
39166        where
39167            T: std::convert::Into<wkt::Timestamp>,
39168        {
39169            self.system_watermark_time = std::option::Option::Some(v.into());
39170            self
39171        }
39172
39173        /// Sets or clears the value of [system_watermark_time][crate::model::feature_view_sync::SyncSummary::system_watermark_time].
39174        pub fn set_or_clear_system_watermark_time<T>(mut self, v: std::option::Option<T>) -> Self
39175        where
39176            T: std::convert::Into<wkt::Timestamp>,
39177        {
39178            self.system_watermark_time = v.map(|x| x.into());
39179            self
39180        }
39181    }
39182
39183    #[cfg(feature = "feature-online-store-admin-service")]
39184    impl wkt::message::Message for SyncSummary {
39185        fn typename() -> &'static str {
39186            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureViewSync.SyncSummary"
39187        }
39188    }
39189}
39190
39191/// Vertex AI Feature Store provides a centralized repository for organizing,
39192/// storing, and serving ML features. The Featurestore is a top-level container
39193/// for your features and their values.
39194#[cfg(feature = "featurestore-service")]
39195#[derive(Clone, Default, PartialEq)]
39196#[non_exhaustive]
39197pub struct Featurestore {
39198    /// Output only. Name of the Featurestore. Format:
39199    /// `projects/{project}/locations/{location}/featurestores/{featurestore}`
39200    pub name: std::string::String,
39201
39202    /// Output only. Timestamp when this Featurestore was created.
39203    pub create_time: std::option::Option<wkt::Timestamp>,
39204
39205    /// Output only. Timestamp when this Featurestore was last updated.
39206    pub update_time: std::option::Option<wkt::Timestamp>,
39207
39208    /// Optional. Used to perform consistent read-modify-write updates. If not set,
39209    /// a blind "overwrite" update happens.
39210    pub etag: std::string::String,
39211
39212    /// Optional. The labels with user-defined metadata to organize your
39213    /// Featurestore.
39214    ///
39215    /// Label keys and values can be no longer than 64 characters
39216    /// (Unicode codepoints), can only contain lowercase letters, numeric
39217    /// characters, underscores and dashes. International characters are allowed.
39218    ///
39219    /// See <https://goo.gl/xmQnxf> for more information on and examples of labels.
39220    /// No more than 64 user labels can be associated with one Featurestore(System
39221    /// labels are excluded)."
39222    /// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
39223    /// and are immutable.
39224    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
39225
39226    /// Optional. Config for online storage resources. The field should not
39227    /// co-exist with the field of `OnlineStoreReplicationConfig`. If both of it
39228    /// and OnlineStoreReplicationConfig are unset, the feature store will not have
39229    /// an online store and cannot be used for online serving.
39230    pub online_serving_config: std::option::Option<crate::model::featurestore::OnlineServingConfig>,
39231
39232    /// Output only. State of the featurestore.
39233    pub state: crate::model::featurestore::State,
39234
39235    /// Optional. TTL in days for feature values that will be stored in online
39236    /// serving storage. The Feature Store online storage periodically removes
39237    /// obsolete feature values older than `online_storage_ttl_days` since the
39238    /// feature generation time. Note that `online_storage_ttl_days` should be less
39239    /// than or equal to `offline_storage_ttl_days` for each EntityType under a
39240    /// featurestore. If not set, default to 4000 days
39241    pub online_storage_ttl_days: i32,
39242
39243    /// Optional. Customer-managed encryption key spec for data storage. If set,
39244    /// both of the online and offline data storage will be secured by this key.
39245    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
39246
39247    /// Output only. Reserved for future use.
39248    pub satisfies_pzs: bool,
39249
39250    /// Output only. Reserved for future use.
39251    pub satisfies_pzi: bool,
39252
39253    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39254}
39255
39256#[cfg(feature = "featurestore-service")]
39257impl Featurestore {
39258    pub fn new() -> Self {
39259        std::default::Default::default()
39260    }
39261
39262    /// Sets the value of [name][crate::model::Featurestore::name].
39263    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
39264        self.name = v.into();
39265        self
39266    }
39267
39268    /// Sets the value of [create_time][crate::model::Featurestore::create_time].
39269    pub fn set_create_time<T>(mut self, v: T) -> Self
39270    where
39271        T: std::convert::Into<wkt::Timestamp>,
39272    {
39273        self.create_time = std::option::Option::Some(v.into());
39274        self
39275    }
39276
39277    /// Sets or clears the value of [create_time][crate::model::Featurestore::create_time].
39278    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
39279    where
39280        T: std::convert::Into<wkt::Timestamp>,
39281    {
39282        self.create_time = v.map(|x| x.into());
39283        self
39284    }
39285
39286    /// Sets the value of [update_time][crate::model::Featurestore::update_time].
39287    pub fn set_update_time<T>(mut self, v: T) -> Self
39288    where
39289        T: std::convert::Into<wkt::Timestamp>,
39290    {
39291        self.update_time = std::option::Option::Some(v.into());
39292        self
39293    }
39294
39295    /// Sets or clears the value of [update_time][crate::model::Featurestore::update_time].
39296    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
39297    where
39298        T: std::convert::Into<wkt::Timestamp>,
39299    {
39300        self.update_time = v.map(|x| x.into());
39301        self
39302    }
39303
39304    /// Sets the value of [etag][crate::model::Featurestore::etag].
39305    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
39306        self.etag = v.into();
39307        self
39308    }
39309
39310    /// Sets the value of [labels][crate::model::Featurestore::labels].
39311    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
39312    where
39313        T: std::iter::IntoIterator<Item = (K, V)>,
39314        K: std::convert::Into<std::string::String>,
39315        V: std::convert::Into<std::string::String>,
39316    {
39317        use std::iter::Iterator;
39318        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
39319        self
39320    }
39321
39322    /// Sets the value of [online_serving_config][crate::model::Featurestore::online_serving_config].
39323    pub fn set_online_serving_config<T>(mut self, v: T) -> Self
39324    where
39325        T: std::convert::Into<crate::model::featurestore::OnlineServingConfig>,
39326    {
39327        self.online_serving_config = std::option::Option::Some(v.into());
39328        self
39329    }
39330
39331    /// Sets or clears the value of [online_serving_config][crate::model::Featurestore::online_serving_config].
39332    pub fn set_or_clear_online_serving_config<T>(mut self, v: std::option::Option<T>) -> Self
39333    where
39334        T: std::convert::Into<crate::model::featurestore::OnlineServingConfig>,
39335    {
39336        self.online_serving_config = v.map(|x| x.into());
39337        self
39338    }
39339
39340    /// Sets the value of [state][crate::model::Featurestore::state].
39341    pub fn set_state<T: std::convert::Into<crate::model::featurestore::State>>(
39342        mut self,
39343        v: T,
39344    ) -> Self {
39345        self.state = v.into();
39346        self
39347    }
39348
39349    /// Sets the value of [online_storage_ttl_days][crate::model::Featurestore::online_storage_ttl_days].
39350    pub fn set_online_storage_ttl_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
39351        self.online_storage_ttl_days = v.into();
39352        self
39353    }
39354
39355    /// Sets the value of [encryption_spec][crate::model::Featurestore::encryption_spec].
39356    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
39357    where
39358        T: std::convert::Into<crate::model::EncryptionSpec>,
39359    {
39360        self.encryption_spec = std::option::Option::Some(v.into());
39361        self
39362    }
39363
39364    /// Sets or clears the value of [encryption_spec][crate::model::Featurestore::encryption_spec].
39365    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
39366    where
39367        T: std::convert::Into<crate::model::EncryptionSpec>,
39368    {
39369        self.encryption_spec = v.map(|x| x.into());
39370        self
39371    }
39372
39373    /// Sets the value of [satisfies_pzs][crate::model::Featurestore::satisfies_pzs].
39374    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
39375        self.satisfies_pzs = v.into();
39376        self
39377    }
39378
39379    /// Sets the value of [satisfies_pzi][crate::model::Featurestore::satisfies_pzi].
39380    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
39381        self.satisfies_pzi = v.into();
39382        self
39383    }
39384}
39385
39386#[cfg(feature = "featurestore-service")]
39387impl wkt::message::Message for Featurestore {
39388    fn typename() -> &'static str {
39389        "type.googleapis.com/google.cloud.aiplatform.v1.Featurestore"
39390    }
39391}
39392
39393/// Defines additional types related to [Featurestore].
39394#[cfg(feature = "featurestore-service")]
39395pub mod featurestore {
39396    #[allow(unused_imports)]
39397    use super::*;
39398
39399    /// OnlineServingConfig specifies the details for provisioning online serving
39400    /// resources.
39401    #[cfg(feature = "featurestore-service")]
39402    #[derive(Clone, Default, PartialEq)]
39403    #[non_exhaustive]
39404    pub struct OnlineServingConfig {
39405        /// The number of nodes for the online store. The number of nodes doesn't
39406        /// scale automatically, but you can manually update the number of
39407        /// nodes. If set to 0, the featurestore will not have an
39408        /// online store and cannot be used for online serving.
39409        pub fixed_node_count: i32,
39410
39411        /// Online serving scaling configuration.
39412        /// Only one of `fixed_node_count` and `scaling` can be set. Setting one will
39413        /// reset the other.
39414        pub scaling:
39415            std::option::Option<crate::model::featurestore::online_serving_config::Scaling>,
39416
39417        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39418    }
39419
39420    #[cfg(feature = "featurestore-service")]
39421    impl OnlineServingConfig {
39422        pub fn new() -> Self {
39423            std::default::Default::default()
39424        }
39425
39426        /// Sets the value of [fixed_node_count][crate::model::featurestore::OnlineServingConfig::fixed_node_count].
39427        pub fn set_fixed_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
39428            self.fixed_node_count = v.into();
39429            self
39430        }
39431
39432        /// Sets the value of [scaling][crate::model::featurestore::OnlineServingConfig::scaling].
39433        pub fn set_scaling<T>(mut self, v: T) -> Self
39434        where
39435            T: std::convert::Into<crate::model::featurestore::online_serving_config::Scaling>,
39436        {
39437            self.scaling = std::option::Option::Some(v.into());
39438            self
39439        }
39440
39441        /// Sets or clears the value of [scaling][crate::model::featurestore::OnlineServingConfig::scaling].
39442        pub fn set_or_clear_scaling<T>(mut self, v: std::option::Option<T>) -> Self
39443        where
39444            T: std::convert::Into<crate::model::featurestore::online_serving_config::Scaling>,
39445        {
39446            self.scaling = v.map(|x| x.into());
39447            self
39448        }
39449    }
39450
39451    #[cfg(feature = "featurestore-service")]
39452    impl wkt::message::Message for OnlineServingConfig {
39453        fn typename() -> &'static str {
39454            "type.googleapis.com/google.cloud.aiplatform.v1.Featurestore.OnlineServingConfig"
39455        }
39456    }
39457
39458    /// Defines additional types related to [OnlineServingConfig].
39459    #[cfg(feature = "featurestore-service")]
39460    pub mod online_serving_config {
39461        #[allow(unused_imports)]
39462        use super::*;
39463
39464        /// Online serving scaling configuration. If min_node_count and
39465        /// max_node_count are set to the same value, the cluster will be configured
39466        /// with the fixed number of node (no auto-scaling).
39467        #[cfg(feature = "featurestore-service")]
39468        #[derive(Clone, Default, PartialEq)]
39469        #[non_exhaustive]
39470        pub struct Scaling {
39471            /// Required. The minimum number of nodes to scale down to. Must be greater
39472            /// than or equal to 1.
39473            pub min_node_count: i32,
39474
39475            /// The maximum number of nodes to scale up to. Must be greater than
39476            /// min_node_count, and less than or equal to 10 times of 'min_node_count'.
39477            pub max_node_count: i32,
39478
39479            /// Optional. The cpu utilization that the Autoscaler should be trying to
39480            /// achieve. This number is on a scale from 0 (no utilization) to 100
39481            /// (total utilization), and is limited between 10 and 80. When a cluster's
39482            /// CPU utilization exceeds the target that you have set, Bigtable
39483            /// immediately adds nodes to the cluster. When CPU utilization is
39484            /// substantially lower than the target, Bigtable removes nodes. If not set
39485            /// or set to 0, default to 50.
39486            pub cpu_utilization_target: i32,
39487
39488            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39489        }
39490
39491        #[cfg(feature = "featurestore-service")]
39492        impl Scaling {
39493            pub fn new() -> Self {
39494                std::default::Default::default()
39495            }
39496
39497            /// Sets the value of [min_node_count][crate::model::featurestore::online_serving_config::Scaling::min_node_count].
39498            pub fn set_min_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
39499                self.min_node_count = v.into();
39500                self
39501            }
39502
39503            /// Sets the value of [max_node_count][crate::model::featurestore::online_serving_config::Scaling::max_node_count].
39504            pub fn set_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
39505                self.max_node_count = v.into();
39506                self
39507            }
39508
39509            /// Sets the value of [cpu_utilization_target][crate::model::featurestore::online_serving_config::Scaling::cpu_utilization_target].
39510            pub fn set_cpu_utilization_target<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
39511                self.cpu_utilization_target = v.into();
39512                self
39513            }
39514        }
39515
39516        #[cfg(feature = "featurestore-service")]
39517        impl wkt::message::Message for Scaling {
39518            fn typename() -> &'static str {
39519                "type.googleapis.com/google.cloud.aiplatform.v1.Featurestore.OnlineServingConfig.Scaling"
39520            }
39521        }
39522    }
39523
39524    /// Possible states a featurestore can have.
39525    ///
39526    /// # Working with unknown values
39527    ///
39528    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
39529    /// additional enum variants at any time. Adding new variants is not considered
39530    /// a breaking change. Applications should write their code in anticipation of:
39531    ///
39532    /// - New values appearing in future releases of the client library, **and**
39533    /// - New values received dynamically, without application changes.
39534    ///
39535    /// Please consult the [Working with enums] section in the user guide for some
39536    /// guidelines.
39537    ///
39538    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
39539    #[cfg(feature = "featurestore-service")]
39540    #[derive(Clone, Debug, PartialEq)]
39541    #[non_exhaustive]
39542    pub enum State {
39543        /// Default value. This value is unused.
39544        Unspecified,
39545        /// State when the featurestore configuration is not being updated and the
39546        /// fields reflect the current configuration of the featurestore. The
39547        /// featurestore is usable in this state.
39548        Stable,
39549        /// The state of the featurestore configuration when it is being updated.
39550        /// During an update, the fields reflect either the original configuration
39551        /// or the updated configuration of the featurestore. For example,
39552        /// `online_serving_config.fixed_node_count` can take minutes to update.
39553        /// While the update is in progress, the featurestore is in the UPDATING
39554        /// state, and the value of `fixed_node_count` can be the original value or
39555        /// the updated value, depending on the progress of the operation. Until the
39556        /// update completes, the actual number of nodes can still be the original
39557        /// value of `fixed_node_count`. The featurestore is still usable in this
39558        /// state.
39559        Updating,
39560        /// If set, the enum was initialized with an unknown value.
39561        ///
39562        /// Applications can examine the value using [State::value] or
39563        /// [State::name].
39564        UnknownValue(state::UnknownValue),
39565    }
39566
39567    #[doc(hidden)]
39568    #[cfg(feature = "featurestore-service")]
39569    pub mod state {
39570        #[allow(unused_imports)]
39571        use super::*;
39572        #[derive(Clone, Debug, PartialEq)]
39573        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
39574    }
39575
39576    #[cfg(feature = "featurestore-service")]
39577    impl State {
39578        /// Gets the enum value.
39579        ///
39580        /// Returns `None` if the enum contains an unknown value deserialized from
39581        /// the string representation of enums.
39582        pub fn value(&self) -> std::option::Option<i32> {
39583            match self {
39584                Self::Unspecified => std::option::Option::Some(0),
39585                Self::Stable => std::option::Option::Some(1),
39586                Self::Updating => std::option::Option::Some(2),
39587                Self::UnknownValue(u) => u.0.value(),
39588            }
39589        }
39590
39591        /// Gets the enum value as a string.
39592        ///
39593        /// Returns `None` if the enum contains an unknown value deserialized from
39594        /// the integer representation of enums.
39595        pub fn name(&self) -> std::option::Option<&str> {
39596            match self {
39597                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
39598                Self::Stable => std::option::Option::Some("STABLE"),
39599                Self::Updating => std::option::Option::Some("UPDATING"),
39600                Self::UnknownValue(u) => u.0.name(),
39601            }
39602        }
39603    }
39604
39605    #[cfg(feature = "featurestore-service")]
39606    impl std::default::Default for State {
39607        fn default() -> Self {
39608            use std::convert::From;
39609            Self::from(0)
39610        }
39611    }
39612
39613    #[cfg(feature = "featurestore-service")]
39614    impl std::fmt::Display for State {
39615        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
39616            wkt::internal::display_enum(f, self.name(), self.value())
39617        }
39618    }
39619
39620    #[cfg(feature = "featurestore-service")]
39621    impl std::convert::From<i32> for State {
39622        fn from(value: i32) -> Self {
39623            match value {
39624                0 => Self::Unspecified,
39625                1 => Self::Stable,
39626                2 => Self::Updating,
39627                _ => Self::UnknownValue(state::UnknownValue(
39628                    wkt::internal::UnknownEnumValue::Integer(value),
39629                )),
39630            }
39631        }
39632    }
39633
39634    #[cfg(feature = "featurestore-service")]
39635    impl std::convert::From<&str> for State {
39636        fn from(value: &str) -> Self {
39637            use std::string::ToString;
39638            match value {
39639                "STATE_UNSPECIFIED" => Self::Unspecified,
39640                "STABLE" => Self::Stable,
39641                "UPDATING" => Self::Updating,
39642                _ => Self::UnknownValue(state::UnknownValue(
39643                    wkt::internal::UnknownEnumValue::String(value.to_string()),
39644                )),
39645            }
39646        }
39647    }
39648
39649    #[cfg(feature = "featurestore-service")]
39650    impl serde::ser::Serialize for State {
39651        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
39652        where
39653            S: serde::Serializer,
39654        {
39655            match self {
39656                Self::Unspecified => serializer.serialize_i32(0),
39657                Self::Stable => serializer.serialize_i32(1),
39658                Self::Updating => serializer.serialize_i32(2),
39659                Self::UnknownValue(u) => u.0.serialize(serializer),
39660            }
39661        }
39662    }
39663
39664    #[cfg(feature = "featurestore-service")]
39665    impl<'de> serde::de::Deserialize<'de> for State {
39666        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
39667        where
39668            D: serde::Deserializer<'de>,
39669        {
39670            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
39671                ".google.cloud.aiplatform.v1.Featurestore.State",
39672            ))
39673        }
39674    }
39675}
39676
39677/// Configuration of how features in Featurestore are monitored.
39678#[cfg(feature = "featurestore-service")]
39679#[derive(Clone, Default, PartialEq)]
39680#[non_exhaustive]
39681pub struct FeaturestoreMonitoringConfig {
39682    /// The config for Snapshot Analysis Based Feature Monitoring.
39683    pub snapshot_analysis:
39684        std::option::Option<crate::model::featurestore_monitoring_config::SnapshotAnalysis>,
39685
39686    /// The config for ImportFeatures Analysis Based Feature Monitoring.
39687    pub import_features_analysis:
39688        std::option::Option<crate::model::featurestore_monitoring_config::ImportFeaturesAnalysis>,
39689
39690    /// Threshold for numerical features of anomaly detection.
39691    /// This is shared by all objectives of Featurestore Monitoring for numerical
39692    /// features (i.e. Features with type
39693    /// ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) DOUBLE
39694    /// or INT64).
39695    ///
39696    /// [google.cloud.aiplatform.v1.Feature.ValueType]: crate::model::feature::ValueType
39697    pub numerical_threshold_config:
39698        std::option::Option<crate::model::featurestore_monitoring_config::ThresholdConfig>,
39699
39700    /// Threshold for categorical features of anomaly detection.
39701    /// This is shared by all types of Featurestore Monitoring for categorical
39702    /// features (i.e. Features with type
39703    /// ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) BOOL or
39704    /// STRING).
39705    ///
39706    /// [google.cloud.aiplatform.v1.Feature.ValueType]: crate::model::feature::ValueType
39707    pub categorical_threshold_config:
39708        std::option::Option<crate::model::featurestore_monitoring_config::ThresholdConfig>,
39709
39710    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39711}
39712
39713#[cfg(feature = "featurestore-service")]
39714impl FeaturestoreMonitoringConfig {
39715    pub fn new() -> Self {
39716        std::default::Default::default()
39717    }
39718
39719    /// Sets the value of [snapshot_analysis][crate::model::FeaturestoreMonitoringConfig::snapshot_analysis].
39720    pub fn set_snapshot_analysis<T>(mut self, v: T) -> Self
39721    where
39722        T: std::convert::Into<crate::model::featurestore_monitoring_config::SnapshotAnalysis>,
39723    {
39724        self.snapshot_analysis = std::option::Option::Some(v.into());
39725        self
39726    }
39727
39728    /// Sets or clears the value of [snapshot_analysis][crate::model::FeaturestoreMonitoringConfig::snapshot_analysis].
39729    pub fn set_or_clear_snapshot_analysis<T>(mut self, v: std::option::Option<T>) -> Self
39730    where
39731        T: std::convert::Into<crate::model::featurestore_monitoring_config::SnapshotAnalysis>,
39732    {
39733        self.snapshot_analysis = v.map(|x| x.into());
39734        self
39735    }
39736
39737    /// Sets the value of [import_features_analysis][crate::model::FeaturestoreMonitoringConfig::import_features_analysis].
39738    pub fn set_import_features_analysis<T>(mut self, v: T) -> Self
39739    where
39740        T: std::convert::Into<crate::model::featurestore_monitoring_config::ImportFeaturesAnalysis>,
39741    {
39742        self.import_features_analysis = std::option::Option::Some(v.into());
39743        self
39744    }
39745
39746    /// Sets or clears the value of [import_features_analysis][crate::model::FeaturestoreMonitoringConfig::import_features_analysis].
39747    pub fn set_or_clear_import_features_analysis<T>(mut self, v: std::option::Option<T>) -> Self
39748    where
39749        T: std::convert::Into<crate::model::featurestore_monitoring_config::ImportFeaturesAnalysis>,
39750    {
39751        self.import_features_analysis = v.map(|x| x.into());
39752        self
39753    }
39754
39755    /// Sets the value of [numerical_threshold_config][crate::model::FeaturestoreMonitoringConfig::numerical_threshold_config].
39756    pub fn set_numerical_threshold_config<T>(mut self, v: T) -> Self
39757    where
39758        T: std::convert::Into<crate::model::featurestore_monitoring_config::ThresholdConfig>,
39759    {
39760        self.numerical_threshold_config = std::option::Option::Some(v.into());
39761        self
39762    }
39763
39764    /// Sets or clears the value of [numerical_threshold_config][crate::model::FeaturestoreMonitoringConfig::numerical_threshold_config].
39765    pub fn set_or_clear_numerical_threshold_config<T>(mut self, v: std::option::Option<T>) -> Self
39766    where
39767        T: std::convert::Into<crate::model::featurestore_monitoring_config::ThresholdConfig>,
39768    {
39769        self.numerical_threshold_config = v.map(|x| x.into());
39770        self
39771    }
39772
39773    /// Sets the value of [categorical_threshold_config][crate::model::FeaturestoreMonitoringConfig::categorical_threshold_config].
39774    pub fn set_categorical_threshold_config<T>(mut self, v: T) -> Self
39775    where
39776        T: std::convert::Into<crate::model::featurestore_monitoring_config::ThresholdConfig>,
39777    {
39778        self.categorical_threshold_config = std::option::Option::Some(v.into());
39779        self
39780    }
39781
39782    /// Sets or clears the value of [categorical_threshold_config][crate::model::FeaturestoreMonitoringConfig::categorical_threshold_config].
39783    pub fn set_or_clear_categorical_threshold_config<T>(mut self, v: std::option::Option<T>) -> Self
39784    where
39785        T: std::convert::Into<crate::model::featurestore_monitoring_config::ThresholdConfig>,
39786    {
39787        self.categorical_threshold_config = v.map(|x| x.into());
39788        self
39789    }
39790}
39791
39792#[cfg(feature = "featurestore-service")]
39793impl wkt::message::Message for FeaturestoreMonitoringConfig {
39794    fn typename() -> &'static str {
39795        "type.googleapis.com/google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig"
39796    }
39797}
39798
39799/// Defines additional types related to [FeaturestoreMonitoringConfig].
39800#[cfg(feature = "featurestore-service")]
39801pub mod featurestore_monitoring_config {
39802    #[allow(unused_imports)]
39803    use super::*;
39804
39805    /// Configuration of the Featurestore's Snapshot Analysis Based Monitoring.
39806    /// This type of analysis generates statistics for each Feature based on a
39807    /// snapshot of the latest feature value of each entities every
39808    /// monitoring_interval.
39809    #[cfg(feature = "featurestore-service")]
39810    #[derive(Clone, Default, PartialEq)]
39811    #[non_exhaustive]
39812    pub struct SnapshotAnalysis {
39813        /// The monitoring schedule for snapshot analysis.
39814        /// For EntityType-level config:
39815        /// unset / disabled = true indicates disabled by
39816        /// default for Features under it; otherwise by default enable snapshot
39817        /// analysis monitoring with monitoring_interval for Features under it.
39818        /// Feature-level config:
39819        /// disabled = true indicates disabled regardless of the EntityType-level
39820        /// config; unset monitoring_interval indicates going with EntityType-level
39821        /// config; otherwise run snapshot analysis monitoring with
39822        /// monitoring_interval regardless of the EntityType-level config.
39823        /// Explicitly Disable the snapshot analysis based monitoring.
39824        pub disabled: bool,
39825
39826        /// Configuration of the snapshot analysis based monitoring pipeline
39827        /// running interval. The value indicates number of days.
39828        pub monitoring_interval_days: i32,
39829
39830        /// Customized export features time window for snapshot analysis. Unit is one
39831        /// day. Default value is 3 weeks. Minimum value is 1 day. Maximum value is
39832        /// 4000 days.
39833        pub staleness_days: i32,
39834
39835        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39836    }
39837
39838    #[cfg(feature = "featurestore-service")]
39839    impl SnapshotAnalysis {
39840        pub fn new() -> Self {
39841            std::default::Default::default()
39842        }
39843
39844        /// Sets the value of [disabled][crate::model::featurestore_monitoring_config::SnapshotAnalysis::disabled].
39845        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
39846            self.disabled = v.into();
39847            self
39848        }
39849
39850        /// Sets the value of [monitoring_interval_days][crate::model::featurestore_monitoring_config::SnapshotAnalysis::monitoring_interval_days].
39851        pub fn set_monitoring_interval_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
39852            self.monitoring_interval_days = v.into();
39853            self
39854        }
39855
39856        /// Sets the value of [staleness_days][crate::model::featurestore_monitoring_config::SnapshotAnalysis::staleness_days].
39857        pub fn set_staleness_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
39858            self.staleness_days = v.into();
39859            self
39860        }
39861    }
39862
39863    #[cfg(feature = "featurestore-service")]
39864    impl wkt::message::Message for SnapshotAnalysis {
39865        fn typename() -> &'static str {
39866            "type.googleapis.com/google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis"
39867        }
39868    }
39869
39870    /// Configuration of the Featurestore's ImportFeature Analysis Based
39871    /// Monitoring. This type of analysis generates statistics for values of each
39872    /// Feature imported by every
39873    /// [ImportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues]
39874    /// operation.
39875    ///
39876    /// [google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues]: crate::client::FeaturestoreService::import_feature_values
39877    #[cfg(feature = "featurestore-service")]
39878    #[derive(Clone, Default, PartialEq)]
39879    #[non_exhaustive]
39880    pub struct ImportFeaturesAnalysis {
39881        /// Whether to enable / disable / inherite default hebavior for import
39882        /// features analysis.
39883        pub state: crate::model::featurestore_monitoring_config::import_features_analysis::State,
39884
39885        /// The baseline used to do anomaly detection for the statistics generated by
39886        /// import features analysis.
39887        pub anomaly_detection_baseline:
39888            crate::model::featurestore_monitoring_config::import_features_analysis::Baseline,
39889
39890        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
39891    }
39892
39893    #[cfg(feature = "featurestore-service")]
39894    impl ImportFeaturesAnalysis {
39895        pub fn new() -> Self {
39896            std::default::Default::default()
39897        }
39898
39899        /// Sets the value of [state][crate::model::featurestore_monitoring_config::ImportFeaturesAnalysis::state].
39900        pub fn set_state<
39901            T: std::convert::Into<
39902                    crate::model::featurestore_monitoring_config::import_features_analysis::State,
39903                >,
39904        >(
39905            mut self,
39906            v: T,
39907        ) -> Self {
39908            self.state = v.into();
39909            self
39910        }
39911
39912        /// Sets the value of [anomaly_detection_baseline][crate::model::featurestore_monitoring_config::ImportFeaturesAnalysis::anomaly_detection_baseline].
39913        pub fn set_anomaly_detection_baseline<T: std::convert::Into<crate::model::featurestore_monitoring_config::import_features_analysis::Baseline>>(mut self, v: T) -> Self{
39914            self.anomaly_detection_baseline = v.into();
39915            self
39916        }
39917    }
39918
39919    #[cfg(feature = "featurestore-service")]
39920    impl wkt::message::Message for ImportFeaturesAnalysis {
39921        fn typename() -> &'static str {
39922            "type.googleapis.com/google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.ImportFeaturesAnalysis"
39923        }
39924    }
39925
39926    /// Defines additional types related to [ImportFeaturesAnalysis].
39927    #[cfg(feature = "featurestore-service")]
39928    pub mod import_features_analysis {
39929        #[allow(unused_imports)]
39930        use super::*;
39931
39932        /// The state defines whether to enable ImportFeature analysis.
39933        ///
39934        /// # Working with unknown values
39935        ///
39936        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
39937        /// additional enum variants at any time. Adding new variants is not considered
39938        /// a breaking change. Applications should write their code in anticipation of:
39939        ///
39940        /// - New values appearing in future releases of the client library, **and**
39941        /// - New values received dynamically, without application changes.
39942        ///
39943        /// Please consult the [Working with enums] section in the user guide for some
39944        /// guidelines.
39945        ///
39946        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
39947        #[cfg(feature = "featurestore-service")]
39948        #[derive(Clone, Debug, PartialEq)]
39949        #[non_exhaustive]
39950        pub enum State {
39951            /// Should not be used.
39952            Unspecified,
39953            /// The default behavior of whether to enable the monitoring.
39954            /// EntityType-level config: disabled.
39955            /// Feature-level config: inherited from the configuration of EntityType
39956            /// this Feature belongs to.
39957            Default,
39958            /// Explicitly enables import features analysis.
39959            /// EntityType-level config: by default enables import features analysis
39960            /// for all Features under it. Feature-level config: enables import
39961            /// features analysis regardless of the EntityType-level config.
39962            Enabled,
39963            /// Explicitly disables import features analysis.
39964            /// EntityType-level config: by default disables import features analysis
39965            /// for all Features under it. Feature-level config: disables import
39966            /// features analysis regardless of the EntityType-level config.
39967            Disabled,
39968            /// If set, the enum was initialized with an unknown value.
39969            ///
39970            /// Applications can examine the value using [State::value] or
39971            /// [State::name].
39972            UnknownValue(state::UnknownValue),
39973        }
39974
39975        #[doc(hidden)]
39976        #[cfg(feature = "featurestore-service")]
39977        pub mod state {
39978            #[allow(unused_imports)]
39979            use super::*;
39980            #[derive(Clone, Debug, PartialEq)]
39981            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
39982        }
39983
39984        #[cfg(feature = "featurestore-service")]
39985        impl State {
39986            /// Gets the enum value.
39987            ///
39988            /// Returns `None` if the enum contains an unknown value deserialized from
39989            /// the string representation of enums.
39990            pub fn value(&self) -> std::option::Option<i32> {
39991                match self {
39992                    Self::Unspecified => std::option::Option::Some(0),
39993                    Self::Default => std::option::Option::Some(1),
39994                    Self::Enabled => std::option::Option::Some(2),
39995                    Self::Disabled => std::option::Option::Some(3),
39996                    Self::UnknownValue(u) => u.0.value(),
39997                }
39998            }
39999
40000            /// Gets the enum value as a string.
40001            ///
40002            /// Returns `None` if the enum contains an unknown value deserialized from
40003            /// the integer representation of enums.
40004            pub fn name(&self) -> std::option::Option<&str> {
40005                match self {
40006                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
40007                    Self::Default => std::option::Option::Some("DEFAULT"),
40008                    Self::Enabled => std::option::Option::Some("ENABLED"),
40009                    Self::Disabled => std::option::Option::Some("DISABLED"),
40010                    Self::UnknownValue(u) => u.0.name(),
40011                }
40012            }
40013        }
40014
40015        #[cfg(feature = "featurestore-service")]
40016        impl std::default::Default for State {
40017            fn default() -> Self {
40018                use std::convert::From;
40019                Self::from(0)
40020            }
40021        }
40022
40023        #[cfg(feature = "featurestore-service")]
40024        impl std::fmt::Display for State {
40025            fn fmt(
40026                &self,
40027                f: &mut std::fmt::Formatter<'_>,
40028            ) -> std::result::Result<(), std::fmt::Error> {
40029                wkt::internal::display_enum(f, self.name(), self.value())
40030            }
40031        }
40032
40033        #[cfg(feature = "featurestore-service")]
40034        impl std::convert::From<i32> for State {
40035            fn from(value: i32) -> Self {
40036                match value {
40037                    0 => Self::Unspecified,
40038                    1 => Self::Default,
40039                    2 => Self::Enabled,
40040                    3 => Self::Disabled,
40041                    _ => Self::UnknownValue(state::UnknownValue(
40042                        wkt::internal::UnknownEnumValue::Integer(value),
40043                    )),
40044                }
40045            }
40046        }
40047
40048        #[cfg(feature = "featurestore-service")]
40049        impl std::convert::From<&str> for State {
40050            fn from(value: &str) -> Self {
40051                use std::string::ToString;
40052                match value {
40053                    "STATE_UNSPECIFIED" => Self::Unspecified,
40054                    "DEFAULT" => Self::Default,
40055                    "ENABLED" => Self::Enabled,
40056                    "DISABLED" => Self::Disabled,
40057                    _ => Self::UnknownValue(state::UnknownValue(
40058                        wkt::internal::UnknownEnumValue::String(value.to_string()),
40059                    )),
40060                }
40061            }
40062        }
40063
40064        #[cfg(feature = "featurestore-service")]
40065        impl serde::ser::Serialize for State {
40066            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
40067            where
40068                S: serde::Serializer,
40069            {
40070                match self {
40071                    Self::Unspecified => serializer.serialize_i32(0),
40072                    Self::Default => serializer.serialize_i32(1),
40073                    Self::Enabled => serializer.serialize_i32(2),
40074                    Self::Disabled => serializer.serialize_i32(3),
40075                    Self::UnknownValue(u) => u.0.serialize(serializer),
40076                }
40077            }
40078        }
40079
40080        #[cfg(feature = "featurestore-service")]
40081        impl<'de> serde::de::Deserialize<'de> for State {
40082            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
40083            where
40084                D: serde::Deserializer<'de>,
40085            {
40086                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
40087                    ".google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.ImportFeaturesAnalysis.State"))
40088            }
40089        }
40090
40091        /// Defines the baseline to do anomaly detection for feature values imported
40092        /// by each
40093        /// [ImportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues]
40094        /// operation.
40095        ///
40096        /// [google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues]: crate::client::FeaturestoreService::import_feature_values
40097        ///
40098        /// # Working with unknown values
40099        ///
40100        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
40101        /// additional enum variants at any time. Adding new variants is not considered
40102        /// a breaking change. Applications should write their code in anticipation of:
40103        ///
40104        /// - New values appearing in future releases of the client library, **and**
40105        /// - New values received dynamically, without application changes.
40106        ///
40107        /// Please consult the [Working with enums] section in the user guide for some
40108        /// guidelines.
40109        ///
40110        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
40111        #[cfg(feature = "featurestore-service")]
40112        #[derive(Clone, Debug, PartialEq)]
40113        #[non_exhaustive]
40114        pub enum Baseline {
40115            /// Should not be used.
40116            Unspecified,
40117            /// Choose the later one statistics generated by either most recent
40118            /// snapshot analysis or previous import features analysis. If non of them
40119            /// exists, skip anomaly detection and only generate a statistics.
40120            LatestStats,
40121            /// Use the statistics generated by the most recent snapshot analysis if
40122            /// exists.
40123            MostRecentSnapshotStats,
40124            /// Use the statistics generated by the previous import features analysis
40125            /// if exists.
40126            PreviousImportFeaturesStats,
40127            /// If set, the enum was initialized with an unknown value.
40128            ///
40129            /// Applications can examine the value using [Baseline::value] or
40130            /// [Baseline::name].
40131            UnknownValue(baseline::UnknownValue),
40132        }
40133
40134        #[doc(hidden)]
40135        #[cfg(feature = "featurestore-service")]
40136        pub mod baseline {
40137            #[allow(unused_imports)]
40138            use super::*;
40139            #[derive(Clone, Debug, PartialEq)]
40140            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
40141        }
40142
40143        #[cfg(feature = "featurestore-service")]
40144        impl Baseline {
40145            /// Gets the enum value.
40146            ///
40147            /// Returns `None` if the enum contains an unknown value deserialized from
40148            /// the string representation of enums.
40149            pub fn value(&self) -> std::option::Option<i32> {
40150                match self {
40151                    Self::Unspecified => std::option::Option::Some(0),
40152                    Self::LatestStats => std::option::Option::Some(1),
40153                    Self::MostRecentSnapshotStats => std::option::Option::Some(2),
40154                    Self::PreviousImportFeaturesStats => std::option::Option::Some(3),
40155                    Self::UnknownValue(u) => u.0.value(),
40156                }
40157            }
40158
40159            /// Gets the enum value as a string.
40160            ///
40161            /// Returns `None` if the enum contains an unknown value deserialized from
40162            /// the integer representation of enums.
40163            pub fn name(&self) -> std::option::Option<&str> {
40164                match self {
40165                    Self::Unspecified => std::option::Option::Some("BASELINE_UNSPECIFIED"),
40166                    Self::LatestStats => std::option::Option::Some("LATEST_STATS"),
40167                    Self::MostRecentSnapshotStats => {
40168                        std::option::Option::Some("MOST_RECENT_SNAPSHOT_STATS")
40169                    }
40170                    Self::PreviousImportFeaturesStats => {
40171                        std::option::Option::Some("PREVIOUS_IMPORT_FEATURES_STATS")
40172                    }
40173                    Self::UnknownValue(u) => u.0.name(),
40174                }
40175            }
40176        }
40177
40178        #[cfg(feature = "featurestore-service")]
40179        impl std::default::Default for Baseline {
40180            fn default() -> Self {
40181                use std::convert::From;
40182                Self::from(0)
40183            }
40184        }
40185
40186        #[cfg(feature = "featurestore-service")]
40187        impl std::fmt::Display for Baseline {
40188            fn fmt(
40189                &self,
40190                f: &mut std::fmt::Formatter<'_>,
40191            ) -> std::result::Result<(), std::fmt::Error> {
40192                wkt::internal::display_enum(f, self.name(), self.value())
40193            }
40194        }
40195
40196        #[cfg(feature = "featurestore-service")]
40197        impl std::convert::From<i32> for Baseline {
40198            fn from(value: i32) -> Self {
40199                match value {
40200                    0 => Self::Unspecified,
40201                    1 => Self::LatestStats,
40202                    2 => Self::MostRecentSnapshotStats,
40203                    3 => Self::PreviousImportFeaturesStats,
40204                    _ => Self::UnknownValue(baseline::UnknownValue(
40205                        wkt::internal::UnknownEnumValue::Integer(value),
40206                    )),
40207                }
40208            }
40209        }
40210
40211        #[cfg(feature = "featurestore-service")]
40212        impl std::convert::From<&str> for Baseline {
40213            fn from(value: &str) -> Self {
40214                use std::string::ToString;
40215                match value {
40216                    "BASELINE_UNSPECIFIED" => Self::Unspecified,
40217                    "LATEST_STATS" => Self::LatestStats,
40218                    "MOST_RECENT_SNAPSHOT_STATS" => Self::MostRecentSnapshotStats,
40219                    "PREVIOUS_IMPORT_FEATURES_STATS" => Self::PreviousImportFeaturesStats,
40220                    _ => Self::UnknownValue(baseline::UnknownValue(
40221                        wkt::internal::UnknownEnumValue::String(value.to_string()),
40222                    )),
40223                }
40224            }
40225        }
40226
40227        #[cfg(feature = "featurestore-service")]
40228        impl serde::ser::Serialize for Baseline {
40229            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
40230            where
40231                S: serde::Serializer,
40232            {
40233                match self {
40234                    Self::Unspecified => serializer.serialize_i32(0),
40235                    Self::LatestStats => serializer.serialize_i32(1),
40236                    Self::MostRecentSnapshotStats => serializer.serialize_i32(2),
40237                    Self::PreviousImportFeaturesStats => serializer.serialize_i32(3),
40238                    Self::UnknownValue(u) => u.0.serialize(serializer),
40239                }
40240            }
40241        }
40242
40243        #[cfg(feature = "featurestore-service")]
40244        impl<'de> serde::de::Deserialize<'de> for Baseline {
40245            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
40246            where
40247                D: serde::Deserializer<'de>,
40248            {
40249                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Baseline>::new(
40250                    ".google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.ImportFeaturesAnalysis.Baseline"))
40251            }
40252        }
40253    }
40254
40255    /// The config for Featurestore Monitoring threshold.
40256    #[cfg(feature = "featurestore-service")]
40257    #[derive(Clone, Default, PartialEq)]
40258    #[non_exhaustive]
40259    pub struct ThresholdConfig {
40260        pub threshold: std::option::Option<
40261            crate::model::featurestore_monitoring_config::threshold_config::Threshold,
40262        >,
40263
40264        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40265    }
40266
40267    #[cfg(feature = "featurestore-service")]
40268    impl ThresholdConfig {
40269        pub fn new() -> Self {
40270            std::default::Default::default()
40271        }
40272
40273        /// Sets the value of [threshold][crate::model::featurestore_monitoring_config::ThresholdConfig::threshold].
40274        ///
40275        /// Note that all the setters affecting `threshold` are mutually
40276        /// exclusive.
40277        pub fn set_threshold<
40278            T: std::convert::Into<
40279                    std::option::Option<
40280                        crate::model::featurestore_monitoring_config::threshold_config::Threshold,
40281                    >,
40282                >,
40283        >(
40284            mut self,
40285            v: T,
40286        ) -> Self {
40287            self.threshold = v.into();
40288            self
40289        }
40290
40291        /// The value of [threshold][crate::model::featurestore_monitoring_config::ThresholdConfig::threshold]
40292        /// if it holds a `Value`, `None` if the field is not set or
40293        /// holds a different branch.
40294        pub fn value(&self) -> std::option::Option<&f64> {
40295            #[allow(unreachable_patterns)]
40296            self.threshold.as_ref().and_then(|v| match v {
40297                crate::model::featurestore_monitoring_config::threshold_config::Threshold::Value(v) => std::option::Option::Some(v),
40298                _ => std::option::Option::None,
40299            })
40300        }
40301
40302        /// Sets the value of [threshold][crate::model::featurestore_monitoring_config::ThresholdConfig::threshold]
40303        /// to hold a `Value`.
40304        ///
40305        /// Note that all the setters affecting `threshold` are
40306        /// mutually exclusive.
40307        pub fn set_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
40308            self.threshold = std::option::Option::Some(
40309                crate::model::featurestore_monitoring_config::threshold_config::Threshold::Value(
40310                    v.into(),
40311                ),
40312            );
40313            self
40314        }
40315    }
40316
40317    #[cfg(feature = "featurestore-service")]
40318    impl wkt::message::Message for ThresholdConfig {
40319        fn typename() -> &'static str {
40320            "type.googleapis.com/google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.ThresholdConfig"
40321        }
40322    }
40323
40324    /// Defines additional types related to [ThresholdConfig].
40325    #[cfg(feature = "featurestore-service")]
40326    pub mod threshold_config {
40327        #[allow(unused_imports)]
40328        use super::*;
40329
40330        #[cfg(feature = "featurestore-service")]
40331        #[derive(Clone, Debug, PartialEq)]
40332        #[non_exhaustive]
40333        pub enum Threshold {
40334            /// Specify a threshold value that can trigger the alert.
40335            ///
40336            /// 1. For categorical feature, the distribution distance is calculated by
40337            ///    L-inifinity norm.
40338            /// 1. For numerical feature, the distribution distance is calculated by
40339            ///    Jensen–Shannon divergence. Each feature must have a non-zero threshold
40340            ///    if they need to be monitored. Otherwise no alert will be triggered for
40341            ///    that feature.
40342            Value(f64),
40343        }
40344    }
40345}
40346
40347/// Request message for
40348/// [FeaturestoreOnlineServingService.WriteFeatureValues][google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.WriteFeatureValues].
40349///
40350/// [google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.WriteFeatureValues]: crate::client::FeaturestoreOnlineServingService::write_feature_values
40351#[cfg(feature = "featurestore-online-serving-service")]
40352#[derive(Clone, Default, PartialEq)]
40353#[non_exhaustive]
40354pub struct WriteFeatureValuesRequest {
40355    /// Required. The resource name of the EntityType for the entities being
40356    /// written. Value format:
40357    /// `projects/{project}/locations/{location}/featurestores/
40358    /// {featurestore}/entityTypes/{entityType}`. For example,
40359    /// for a machine learning model predicting user clicks on a website, an
40360    /// EntityType ID could be `user`.
40361    pub entity_type: std::string::String,
40362
40363    /// Required. The entities to be written. Up to 100,000 feature values can be
40364    /// written across all `payloads`.
40365    pub payloads: std::vec::Vec<crate::model::WriteFeatureValuesPayload>,
40366
40367    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40368}
40369
40370#[cfg(feature = "featurestore-online-serving-service")]
40371impl WriteFeatureValuesRequest {
40372    pub fn new() -> Self {
40373        std::default::Default::default()
40374    }
40375
40376    /// Sets the value of [entity_type][crate::model::WriteFeatureValuesRequest::entity_type].
40377    pub fn set_entity_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40378        self.entity_type = v.into();
40379        self
40380    }
40381
40382    /// Sets the value of [payloads][crate::model::WriteFeatureValuesRequest::payloads].
40383    pub fn set_payloads<T, V>(mut self, v: T) -> Self
40384    where
40385        T: std::iter::IntoIterator<Item = V>,
40386        V: std::convert::Into<crate::model::WriteFeatureValuesPayload>,
40387    {
40388        use std::iter::Iterator;
40389        self.payloads = v.into_iter().map(|i| i.into()).collect();
40390        self
40391    }
40392}
40393
40394#[cfg(feature = "featurestore-online-serving-service")]
40395impl wkt::message::Message for WriteFeatureValuesRequest {
40396    fn typename() -> &'static str {
40397        "type.googleapis.com/google.cloud.aiplatform.v1.WriteFeatureValuesRequest"
40398    }
40399}
40400
40401/// Contains Feature values to be written for a specific entity.
40402#[cfg(feature = "featurestore-online-serving-service")]
40403#[derive(Clone, Default, PartialEq)]
40404#[non_exhaustive]
40405pub struct WriteFeatureValuesPayload {
40406    /// Required. The ID of the entity.
40407    pub entity_id: std::string::String,
40408
40409    /// Required. Feature values to be written, mapping from Feature ID to value.
40410    /// Up to 100,000 `feature_values` entries may be written across all payloads.
40411    /// The feature generation time, aligned by days, must be no older than five
40412    /// years (1825 days) and no later than one year (366 days) in the future.
40413    pub feature_values: std::collections::HashMap<std::string::String, crate::model::FeatureValue>,
40414
40415    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40416}
40417
40418#[cfg(feature = "featurestore-online-serving-service")]
40419impl WriteFeatureValuesPayload {
40420    pub fn new() -> Self {
40421        std::default::Default::default()
40422    }
40423
40424    /// Sets the value of [entity_id][crate::model::WriteFeatureValuesPayload::entity_id].
40425    pub fn set_entity_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40426        self.entity_id = v.into();
40427        self
40428    }
40429
40430    /// Sets the value of [feature_values][crate::model::WriteFeatureValuesPayload::feature_values].
40431    pub fn set_feature_values<T, K, V>(mut self, v: T) -> Self
40432    where
40433        T: std::iter::IntoIterator<Item = (K, V)>,
40434        K: std::convert::Into<std::string::String>,
40435        V: std::convert::Into<crate::model::FeatureValue>,
40436    {
40437        use std::iter::Iterator;
40438        self.feature_values = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
40439        self
40440    }
40441}
40442
40443#[cfg(feature = "featurestore-online-serving-service")]
40444impl wkt::message::Message for WriteFeatureValuesPayload {
40445    fn typename() -> &'static str {
40446        "type.googleapis.com/google.cloud.aiplatform.v1.WriteFeatureValuesPayload"
40447    }
40448}
40449
40450/// Response message for
40451/// [FeaturestoreOnlineServingService.WriteFeatureValues][google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.WriteFeatureValues].
40452///
40453/// [google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.WriteFeatureValues]: crate::client::FeaturestoreOnlineServingService::write_feature_values
40454#[cfg(feature = "featurestore-online-serving-service")]
40455#[derive(Clone, Default, PartialEq)]
40456#[non_exhaustive]
40457pub struct WriteFeatureValuesResponse {
40458    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40459}
40460
40461#[cfg(feature = "featurestore-online-serving-service")]
40462impl WriteFeatureValuesResponse {
40463    pub fn new() -> Self {
40464        std::default::Default::default()
40465    }
40466}
40467
40468#[cfg(feature = "featurestore-online-serving-service")]
40469impl wkt::message::Message for WriteFeatureValuesResponse {
40470    fn typename() -> &'static str {
40471        "type.googleapis.com/google.cloud.aiplatform.v1.WriteFeatureValuesResponse"
40472    }
40473}
40474
40475/// Request message for
40476/// [FeaturestoreOnlineServingService.ReadFeatureValues][google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.ReadFeatureValues].
40477///
40478/// [google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.ReadFeatureValues]: crate::client::FeaturestoreOnlineServingService::read_feature_values
40479#[cfg(feature = "featurestore-online-serving-service")]
40480#[derive(Clone, Default, PartialEq)]
40481#[non_exhaustive]
40482pub struct ReadFeatureValuesRequest {
40483    /// Required. The resource name of the EntityType for the entity being read.
40484    /// Value format:
40485    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`.
40486    /// For example, for a machine learning model predicting user clicks on a
40487    /// website, an EntityType ID could be `user`.
40488    pub entity_type: std::string::String,
40489
40490    /// Required. ID for a specific entity. For example,
40491    /// for a machine learning model predicting user clicks on a website, an entity
40492    /// ID could be `user_123`.
40493    pub entity_id: std::string::String,
40494
40495    /// Required. Selector choosing Features of the target EntityType.
40496    pub feature_selector: std::option::Option<crate::model::FeatureSelector>,
40497
40498    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40499}
40500
40501#[cfg(feature = "featurestore-online-serving-service")]
40502impl ReadFeatureValuesRequest {
40503    pub fn new() -> Self {
40504        std::default::Default::default()
40505    }
40506
40507    /// Sets the value of [entity_type][crate::model::ReadFeatureValuesRequest::entity_type].
40508    pub fn set_entity_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40509        self.entity_type = v.into();
40510        self
40511    }
40512
40513    /// Sets the value of [entity_id][crate::model::ReadFeatureValuesRequest::entity_id].
40514    pub fn set_entity_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40515        self.entity_id = v.into();
40516        self
40517    }
40518
40519    /// Sets the value of [feature_selector][crate::model::ReadFeatureValuesRequest::feature_selector].
40520    pub fn set_feature_selector<T>(mut self, v: T) -> Self
40521    where
40522        T: std::convert::Into<crate::model::FeatureSelector>,
40523    {
40524        self.feature_selector = std::option::Option::Some(v.into());
40525        self
40526    }
40527
40528    /// Sets or clears the value of [feature_selector][crate::model::ReadFeatureValuesRequest::feature_selector].
40529    pub fn set_or_clear_feature_selector<T>(mut self, v: std::option::Option<T>) -> Self
40530    where
40531        T: std::convert::Into<crate::model::FeatureSelector>,
40532    {
40533        self.feature_selector = v.map(|x| x.into());
40534        self
40535    }
40536}
40537
40538#[cfg(feature = "featurestore-online-serving-service")]
40539impl wkt::message::Message for ReadFeatureValuesRequest {
40540    fn typename() -> &'static str {
40541        "type.googleapis.com/google.cloud.aiplatform.v1.ReadFeatureValuesRequest"
40542    }
40543}
40544
40545/// Response message for
40546/// [FeaturestoreOnlineServingService.ReadFeatureValues][google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.ReadFeatureValues].
40547///
40548/// [google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.ReadFeatureValues]: crate::client::FeaturestoreOnlineServingService::read_feature_values
40549#[cfg(feature = "featurestore-online-serving-service")]
40550#[derive(Clone, Default, PartialEq)]
40551#[non_exhaustive]
40552pub struct ReadFeatureValuesResponse {
40553    /// Response header.
40554    pub header: std::option::Option<crate::model::read_feature_values_response::Header>,
40555
40556    /// Entity view with Feature values. This may be the entity in the
40557    /// Featurestore if values for all Features were requested, or a projection
40558    /// of the entity in the Featurestore if values for only some Features were
40559    /// requested.
40560    pub entity_view: std::option::Option<crate::model::read_feature_values_response::EntityView>,
40561
40562    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40563}
40564
40565#[cfg(feature = "featurestore-online-serving-service")]
40566impl ReadFeatureValuesResponse {
40567    pub fn new() -> Self {
40568        std::default::Default::default()
40569    }
40570
40571    /// Sets the value of [header][crate::model::ReadFeatureValuesResponse::header].
40572    pub fn set_header<T>(mut self, v: T) -> Self
40573    where
40574        T: std::convert::Into<crate::model::read_feature_values_response::Header>,
40575    {
40576        self.header = std::option::Option::Some(v.into());
40577        self
40578    }
40579
40580    /// Sets or clears the value of [header][crate::model::ReadFeatureValuesResponse::header].
40581    pub fn set_or_clear_header<T>(mut self, v: std::option::Option<T>) -> Self
40582    where
40583        T: std::convert::Into<crate::model::read_feature_values_response::Header>,
40584    {
40585        self.header = v.map(|x| x.into());
40586        self
40587    }
40588
40589    /// Sets the value of [entity_view][crate::model::ReadFeatureValuesResponse::entity_view].
40590    pub fn set_entity_view<T>(mut self, v: T) -> Self
40591    where
40592        T: std::convert::Into<crate::model::read_feature_values_response::EntityView>,
40593    {
40594        self.entity_view = std::option::Option::Some(v.into());
40595        self
40596    }
40597
40598    /// Sets or clears the value of [entity_view][crate::model::ReadFeatureValuesResponse::entity_view].
40599    pub fn set_or_clear_entity_view<T>(mut self, v: std::option::Option<T>) -> Self
40600    where
40601        T: std::convert::Into<crate::model::read_feature_values_response::EntityView>,
40602    {
40603        self.entity_view = v.map(|x| x.into());
40604        self
40605    }
40606}
40607
40608#[cfg(feature = "featurestore-online-serving-service")]
40609impl wkt::message::Message for ReadFeatureValuesResponse {
40610    fn typename() -> &'static str {
40611        "type.googleapis.com/google.cloud.aiplatform.v1.ReadFeatureValuesResponse"
40612    }
40613}
40614
40615/// Defines additional types related to [ReadFeatureValuesResponse].
40616#[cfg(feature = "featurestore-online-serving-service")]
40617pub mod read_feature_values_response {
40618    #[allow(unused_imports)]
40619    use super::*;
40620
40621    /// Metadata for requested Features.
40622    #[cfg(feature = "featurestore-online-serving-service")]
40623    #[derive(Clone, Default, PartialEq)]
40624    #[non_exhaustive]
40625    pub struct FeatureDescriptor {
40626        /// Feature ID.
40627        pub id: std::string::String,
40628
40629        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40630    }
40631
40632    #[cfg(feature = "featurestore-online-serving-service")]
40633    impl FeatureDescriptor {
40634        pub fn new() -> Self {
40635            std::default::Default::default()
40636        }
40637
40638        /// Sets the value of [id][crate::model::read_feature_values_response::FeatureDescriptor::id].
40639        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40640            self.id = v.into();
40641            self
40642        }
40643    }
40644
40645    #[cfg(feature = "featurestore-online-serving-service")]
40646    impl wkt::message::Message for FeatureDescriptor {
40647        fn typename() -> &'static str {
40648            "type.googleapis.com/google.cloud.aiplatform.v1.ReadFeatureValuesResponse.FeatureDescriptor"
40649        }
40650    }
40651
40652    /// Response header with metadata for the requested
40653    /// [ReadFeatureValuesRequest.entity_type][google.cloud.aiplatform.v1.ReadFeatureValuesRequest.entity_type]
40654    /// and Features.
40655    ///
40656    /// [google.cloud.aiplatform.v1.ReadFeatureValuesRequest.entity_type]: crate::model::ReadFeatureValuesRequest::entity_type
40657    #[cfg(feature = "featurestore-online-serving-service")]
40658    #[derive(Clone, Default, PartialEq)]
40659    #[non_exhaustive]
40660    pub struct Header {
40661        /// The resource name of the EntityType from the
40662        /// [ReadFeatureValuesRequest][google.cloud.aiplatform.v1.ReadFeatureValuesRequest].
40663        /// Value format:
40664        /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`.
40665        ///
40666        /// [google.cloud.aiplatform.v1.ReadFeatureValuesRequest]: crate::model::ReadFeatureValuesRequest
40667        pub entity_type: std::string::String,
40668
40669        /// List of Feature metadata corresponding to each piece of
40670        /// [ReadFeatureValuesResponse.EntityView.data][google.cloud.aiplatform.v1.ReadFeatureValuesResponse.EntityView.data].
40671        ///
40672        /// [google.cloud.aiplatform.v1.ReadFeatureValuesResponse.EntityView.data]: crate::model::read_feature_values_response::EntityView::data
40673        pub feature_descriptors:
40674            std::vec::Vec<crate::model::read_feature_values_response::FeatureDescriptor>,
40675
40676        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40677    }
40678
40679    #[cfg(feature = "featurestore-online-serving-service")]
40680    impl Header {
40681        pub fn new() -> Self {
40682            std::default::Default::default()
40683        }
40684
40685        /// Sets the value of [entity_type][crate::model::read_feature_values_response::Header::entity_type].
40686        pub fn set_entity_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40687            self.entity_type = v.into();
40688            self
40689        }
40690
40691        /// Sets the value of [feature_descriptors][crate::model::read_feature_values_response::Header::feature_descriptors].
40692        pub fn set_feature_descriptors<T, V>(mut self, v: T) -> Self
40693        where
40694            T: std::iter::IntoIterator<Item = V>,
40695            V: std::convert::Into<crate::model::read_feature_values_response::FeatureDescriptor>,
40696        {
40697            use std::iter::Iterator;
40698            self.feature_descriptors = v.into_iter().map(|i| i.into()).collect();
40699            self
40700        }
40701    }
40702
40703    #[cfg(feature = "featurestore-online-serving-service")]
40704    impl wkt::message::Message for Header {
40705        fn typename() -> &'static str {
40706            "type.googleapis.com/google.cloud.aiplatform.v1.ReadFeatureValuesResponse.Header"
40707        }
40708    }
40709
40710    /// Entity view with Feature values.
40711    #[cfg(feature = "featurestore-online-serving-service")]
40712    #[derive(Clone, Default, PartialEq)]
40713    #[non_exhaustive]
40714    pub struct EntityView {
40715        /// ID of the requested entity.
40716        pub entity_id: std::string::String,
40717
40718        /// Each piece of data holds the k
40719        /// requested values for one requested Feature. If no values
40720        /// for the requested Feature exist, the corresponding cell will be empty.
40721        /// This has the same size and is in the same order as the features from the
40722        /// header
40723        /// [ReadFeatureValuesResponse.header][google.cloud.aiplatform.v1.ReadFeatureValuesResponse.header].
40724        ///
40725        /// [google.cloud.aiplatform.v1.ReadFeatureValuesResponse.header]: crate::model::ReadFeatureValuesResponse::header
40726        pub data: std::vec::Vec<crate::model::read_feature_values_response::entity_view::Data>,
40727
40728        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40729    }
40730
40731    #[cfg(feature = "featurestore-online-serving-service")]
40732    impl EntityView {
40733        pub fn new() -> Self {
40734            std::default::Default::default()
40735        }
40736
40737        /// Sets the value of [entity_id][crate::model::read_feature_values_response::EntityView::entity_id].
40738        pub fn set_entity_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40739            self.entity_id = v.into();
40740            self
40741        }
40742
40743        /// Sets the value of [data][crate::model::read_feature_values_response::EntityView::data].
40744        pub fn set_data<T, V>(mut self, v: T) -> Self
40745        where
40746            T: std::iter::IntoIterator<Item = V>,
40747            V: std::convert::Into<crate::model::read_feature_values_response::entity_view::Data>,
40748        {
40749            use std::iter::Iterator;
40750            self.data = v.into_iter().map(|i| i.into()).collect();
40751            self
40752        }
40753    }
40754
40755    #[cfg(feature = "featurestore-online-serving-service")]
40756    impl wkt::message::Message for EntityView {
40757        fn typename() -> &'static str {
40758            "type.googleapis.com/google.cloud.aiplatform.v1.ReadFeatureValuesResponse.EntityView"
40759        }
40760    }
40761
40762    /// Defines additional types related to [EntityView].
40763    #[cfg(feature = "featurestore-online-serving-service")]
40764    pub mod entity_view {
40765        #[allow(unused_imports)]
40766        use super::*;
40767
40768        /// Container to hold value(s), successive in time, for one Feature from the
40769        /// request.
40770        #[cfg(feature = "featurestore-online-serving-service")]
40771        #[derive(Clone, Default, PartialEq)]
40772        #[non_exhaustive]
40773        pub struct Data {
40774            pub data: std::option::Option<
40775                crate::model::read_feature_values_response::entity_view::data::Data,
40776            >,
40777
40778            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40779        }
40780
40781        #[cfg(feature = "featurestore-online-serving-service")]
40782        impl Data {
40783            pub fn new() -> Self {
40784                std::default::Default::default()
40785            }
40786
40787            /// Sets the value of [data][crate::model::read_feature_values_response::entity_view::Data::data].
40788            ///
40789            /// Note that all the setters affecting `data` are mutually
40790            /// exclusive.
40791            pub fn set_data<
40792                T: std::convert::Into<
40793                        std::option::Option<
40794                            crate::model::read_feature_values_response::entity_view::data::Data,
40795                        >,
40796                    >,
40797            >(
40798                mut self,
40799                v: T,
40800            ) -> Self {
40801                self.data = v.into();
40802                self
40803            }
40804
40805            /// The value of [data][crate::model::read_feature_values_response::entity_view::Data::data]
40806            /// if it holds a `Value`, `None` if the field is not set or
40807            /// holds a different branch.
40808            pub fn value(
40809                &self,
40810            ) -> std::option::Option<&std::boxed::Box<crate::model::FeatureValue>> {
40811                #[allow(unreachable_patterns)]
40812                self.data.as_ref().and_then(|v| match v {
40813                    crate::model::read_feature_values_response::entity_view::data::Data::Value(
40814                        v,
40815                    ) => std::option::Option::Some(v),
40816                    _ => std::option::Option::None,
40817                })
40818            }
40819
40820            /// Sets the value of [data][crate::model::read_feature_values_response::entity_view::Data::data]
40821            /// to hold a `Value`.
40822            ///
40823            /// Note that all the setters affecting `data` are
40824            /// mutually exclusive.
40825            pub fn set_value<T: std::convert::Into<std::boxed::Box<crate::model::FeatureValue>>>(
40826                mut self,
40827                v: T,
40828            ) -> Self {
40829                self.data = std::option::Option::Some(
40830                    crate::model::read_feature_values_response::entity_view::data::Data::Value(
40831                        v.into(),
40832                    ),
40833                );
40834                self
40835            }
40836
40837            /// The value of [data][crate::model::read_feature_values_response::entity_view::Data::data]
40838            /// if it holds a `Values`, `None` if the field is not set or
40839            /// holds a different branch.
40840            pub fn values(
40841                &self,
40842            ) -> std::option::Option<&std::boxed::Box<crate::model::FeatureValueList>> {
40843                #[allow(unreachable_patterns)]
40844                self.data.as_ref().and_then(|v| match v {
40845                    crate::model::read_feature_values_response::entity_view::data::Data::Values(
40846                        v,
40847                    ) => std::option::Option::Some(v),
40848                    _ => std::option::Option::None,
40849                })
40850            }
40851
40852            /// Sets the value of [data][crate::model::read_feature_values_response::entity_view::Data::data]
40853            /// to hold a `Values`.
40854            ///
40855            /// Note that all the setters affecting `data` are
40856            /// mutually exclusive.
40857            pub fn set_values<
40858                T: std::convert::Into<std::boxed::Box<crate::model::FeatureValueList>>,
40859            >(
40860                mut self,
40861                v: T,
40862            ) -> Self {
40863                self.data = std::option::Option::Some(
40864                    crate::model::read_feature_values_response::entity_view::data::Data::Values(
40865                        v.into(),
40866                    ),
40867                );
40868                self
40869            }
40870        }
40871
40872        #[cfg(feature = "featurestore-online-serving-service")]
40873        impl wkt::message::Message for Data {
40874            fn typename() -> &'static str {
40875                "type.googleapis.com/google.cloud.aiplatform.v1.ReadFeatureValuesResponse.EntityView.Data"
40876            }
40877        }
40878
40879        /// Defines additional types related to [Data].
40880        #[cfg(feature = "featurestore-online-serving-service")]
40881        pub mod data {
40882            #[allow(unused_imports)]
40883            use super::*;
40884
40885            #[cfg(feature = "featurestore-online-serving-service")]
40886            #[derive(Clone, Debug, PartialEq)]
40887            #[non_exhaustive]
40888            pub enum Data {
40889                /// Feature value if a single value is requested.
40890                Value(std::boxed::Box<crate::model::FeatureValue>),
40891                /// Feature values list if values, successive in time, are requested.
40892                /// If the requested number of values is greater than the number of
40893                /// existing Feature values, nonexistent values are omitted instead of
40894                /// being returned as empty.
40895                Values(std::boxed::Box<crate::model::FeatureValueList>),
40896            }
40897        }
40898    }
40899}
40900
40901/// Request message for
40902/// [FeaturestoreOnlineServingService.StreamingReadFeatureValues][google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.StreamingReadFeatureValues].
40903#[cfg(feature = "featurestore-online-serving-service")]
40904#[derive(Clone, Default, PartialEq)]
40905#[non_exhaustive]
40906pub struct StreamingReadFeatureValuesRequest {
40907    /// Required. The resource name of the entities' type.
40908    /// Value format:
40909    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`.
40910    /// For example,
40911    /// for a machine learning model predicting user clicks on a website, an
40912    /// EntityType ID could be `user`.
40913    pub entity_type: std::string::String,
40914
40915    /// Required. IDs of entities to read Feature values of. The maximum number of
40916    /// IDs is 100. For example, for a machine learning model predicting user
40917    /// clicks on a website, an entity ID could be `user_123`.
40918    pub entity_ids: std::vec::Vec<std::string::String>,
40919
40920    /// Required. Selector choosing Features of the target EntityType. Feature IDs
40921    /// will be deduplicated.
40922    pub feature_selector: std::option::Option<crate::model::FeatureSelector>,
40923
40924    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40925}
40926
40927#[cfg(feature = "featurestore-online-serving-service")]
40928impl StreamingReadFeatureValuesRequest {
40929    pub fn new() -> Self {
40930        std::default::Default::default()
40931    }
40932
40933    /// Sets the value of [entity_type][crate::model::StreamingReadFeatureValuesRequest::entity_type].
40934    pub fn set_entity_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
40935        self.entity_type = v.into();
40936        self
40937    }
40938
40939    /// Sets the value of [entity_ids][crate::model::StreamingReadFeatureValuesRequest::entity_ids].
40940    pub fn set_entity_ids<T, V>(mut self, v: T) -> Self
40941    where
40942        T: std::iter::IntoIterator<Item = V>,
40943        V: std::convert::Into<std::string::String>,
40944    {
40945        use std::iter::Iterator;
40946        self.entity_ids = v.into_iter().map(|i| i.into()).collect();
40947        self
40948    }
40949
40950    /// Sets the value of [feature_selector][crate::model::StreamingReadFeatureValuesRequest::feature_selector].
40951    pub fn set_feature_selector<T>(mut self, v: T) -> Self
40952    where
40953        T: std::convert::Into<crate::model::FeatureSelector>,
40954    {
40955        self.feature_selector = std::option::Option::Some(v.into());
40956        self
40957    }
40958
40959    /// Sets or clears the value of [feature_selector][crate::model::StreamingReadFeatureValuesRequest::feature_selector].
40960    pub fn set_or_clear_feature_selector<T>(mut self, v: std::option::Option<T>) -> Self
40961    where
40962        T: std::convert::Into<crate::model::FeatureSelector>,
40963    {
40964        self.feature_selector = v.map(|x| x.into());
40965        self
40966    }
40967}
40968
40969#[cfg(feature = "featurestore-online-serving-service")]
40970impl wkt::message::Message for StreamingReadFeatureValuesRequest {
40971    fn typename() -> &'static str {
40972        "type.googleapis.com/google.cloud.aiplatform.v1.StreamingReadFeatureValuesRequest"
40973    }
40974}
40975
40976/// Value for a feature.
40977#[cfg(any(
40978    feature = "feature-online-store-service",
40979    feature = "featurestore-online-serving-service",
40980))]
40981#[derive(Clone, Default, PartialEq)]
40982#[non_exhaustive]
40983pub struct FeatureValue {
40984    /// Metadata of feature value.
40985    pub metadata: std::option::Option<crate::model::feature_value::Metadata>,
40986
40987    /// Value for the feature.
40988    pub value: std::option::Option<crate::model::feature_value::Value>,
40989
40990    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
40991}
40992
40993#[cfg(any(
40994    feature = "feature-online-store-service",
40995    feature = "featurestore-online-serving-service",
40996))]
40997impl FeatureValue {
40998    pub fn new() -> Self {
40999        std::default::Default::default()
41000    }
41001
41002    /// Sets the value of [metadata][crate::model::FeatureValue::metadata].
41003    pub fn set_metadata<T>(mut self, v: T) -> Self
41004    where
41005        T: std::convert::Into<crate::model::feature_value::Metadata>,
41006    {
41007        self.metadata = std::option::Option::Some(v.into());
41008        self
41009    }
41010
41011    /// Sets or clears the value of [metadata][crate::model::FeatureValue::metadata].
41012    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
41013    where
41014        T: std::convert::Into<crate::model::feature_value::Metadata>,
41015    {
41016        self.metadata = v.map(|x| x.into());
41017        self
41018    }
41019
41020    /// Sets the value of [value][crate::model::FeatureValue::value].
41021    ///
41022    /// Note that all the setters affecting `value` are mutually
41023    /// exclusive.
41024    pub fn set_value<
41025        T: std::convert::Into<std::option::Option<crate::model::feature_value::Value>>,
41026    >(
41027        mut self,
41028        v: T,
41029    ) -> Self {
41030        self.value = v.into();
41031        self
41032    }
41033
41034    /// The value of [value][crate::model::FeatureValue::value]
41035    /// if it holds a `BoolValue`, `None` if the field is not set or
41036    /// holds a different branch.
41037    pub fn bool_value(&self) -> std::option::Option<&bool> {
41038        #[allow(unreachable_patterns)]
41039        self.value.as_ref().and_then(|v| match v {
41040            crate::model::feature_value::Value::BoolValue(v) => std::option::Option::Some(v),
41041            _ => std::option::Option::None,
41042        })
41043    }
41044
41045    /// Sets the value of [value][crate::model::FeatureValue::value]
41046    /// to hold a `BoolValue`.
41047    ///
41048    /// Note that all the setters affecting `value` are
41049    /// mutually exclusive.
41050    pub fn set_bool_value<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
41051        self.value =
41052            std::option::Option::Some(crate::model::feature_value::Value::BoolValue(v.into()));
41053        self
41054    }
41055
41056    /// The value of [value][crate::model::FeatureValue::value]
41057    /// if it holds a `DoubleValue`, `None` if the field is not set or
41058    /// holds a different branch.
41059    pub fn double_value(&self) -> std::option::Option<&f64> {
41060        #[allow(unreachable_patterns)]
41061        self.value.as_ref().and_then(|v| match v {
41062            crate::model::feature_value::Value::DoubleValue(v) => std::option::Option::Some(v),
41063            _ => std::option::Option::None,
41064        })
41065    }
41066
41067    /// Sets the value of [value][crate::model::FeatureValue::value]
41068    /// to hold a `DoubleValue`.
41069    ///
41070    /// Note that all the setters affecting `value` are
41071    /// mutually exclusive.
41072    pub fn set_double_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
41073        self.value =
41074            std::option::Option::Some(crate::model::feature_value::Value::DoubleValue(v.into()));
41075        self
41076    }
41077
41078    /// The value of [value][crate::model::FeatureValue::value]
41079    /// if it holds a `Int64Value`, `None` if the field is not set or
41080    /// holds a different branch.
41081    pub fn int64_value(&self) -> std::option::Option<&i64> {
41082        #[allow(unreachable_patterns)]
41083        self.value.as_ref().and_then(|v| match v {
41084            crate::model::feature_value::Value::Int64Value(v) => std::option::Option::Some(v),
41085            _ => std::option::Option::None,
41086        })
41087    }
41088
41089    /// Sets the value of [value][crate::model::FeatureValue::value]
41090    /// to hold a `Int64Value`.
41091    ///
41092    /// Note that all the setters affecting `value` are
41093    /// mutually exclusive.
41094    pub fn set_int64_value<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
41095        self.value =
41096            std::option::Option::Some(crate::model::feature_value::Value::Int64Value(v.into()));
41097        self
41098    }
41099
41100    /// The value of [value][crate::model::FeatureValue::value]
41101    /// if it holds a `StringValue`, `None` if the field is not set or
41102    /// holds a different branch.
41103    pub fn string_value(&self) -> std::option::Option<&std::string::String> {
41104        #[allow(unreachable_patterns)]
41105        self.value.as_ref().and_then(|v| match v {
41106            crate::model::feature_value::Value::StringValue(v) => std::option::Option::Some(v),
41107            _ => std::option::Option::None,
41108        })
41109    }
41110
41111    /// Sets the value of [value][crate::model::FeatureValue::value]
41112    /// to hold a `StringValue`.
41113    ///
41114    /// Note that all the setters affecting `value` are
41115    /// mutually exclusive.
41116    pub fn set_string_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41117        self.value =
41118            std::option::Option::Some(crate::model::feature_value::Value::StringValue(v.into()));
41119        self
41120    }
41121
41122    /// The value of [value][crate::model::FeatureValue::value]
41123    /// if it holds a `BoolArrayValue`, `None` if the field is not set or
41124    /// holds a different branch.
41125    pub fn bool_array_value(
41126        &self,
41127    ) -> std::option::Option<&std::boxed::Box<crate::model::BoolArray>> {
41128        #[allow(unreachable_patterns)]
41129        self.value.as_ref().and_then(|v| match v {
41130            crate::model::feature_value::Value::BoolArrayValue(v) => std::option::Option::Some(v),
41131            _ => std::option::Option::None,
41132        })
41133    }
41134
41135    /// Sets the value of [value][crate::model::FeatureValue::value]
41136    /// to hold a `BoolArrayValue`.
41137    ///
41138    /// Note that all the setters affecting `value` are
41139    /// mutually exclusive.
41140    pub fn set_bool_array_value<T: std::convert::Into<std::boxed::Box<crate::model::BoolArray>>>(
41141        mut self,
41142        v: T,
41143    ) -> Self {
41144        self.value =
41145            std::option::Option::Some(crate::model::feature_value::Value::BoolArrayValue(v.into()));
41146        self
41147    }
41148
41149    /// The value of [value][crate::model::FeatureValue::value]
41150    /// if it holds a `DoubleArrayValue`, `None` if the field is not set or
41151    /// holds a different branch.
41152    pub fn double_array_value(
41153        &self,
41154    ) -> std::option::Option<&std::boxed::Box<crate::model::DoubleArray>> {
41155        #[allow(unreachable_patterns)]
41156        self.value.as_ref().and_then(|v| match v {
41157            crate::model::feature_value::Value::DoubleArrayValue(v) => std::option::Option::Some(v),
41158            _ => std::option::Option::None,
41159        })
41160    }
41161
41162    /// Sets the value of [value][crate::model::FeatureValue::value]
41163    /// to hold a `DoubleArrayValue`.
41164    ///
41165    /// Note that all the setters affecting `value` are
41166    /// mutually exclusive.
41167    pub fn set_double_array_value<
41168        T: std::convert::Into<std::boxed::Box<crate::model::DoubleArray>>,
41169    >(
41170        mut self,
41171        v: T,
41172    ) -> Self {
41173        self.value = std::option::Option::Some(
41174            crate::model::feature_value::Value::DoubleArrayValue(v.into()),
41175        );
41176        self
41177    }
41178
41179    /// The value of [value][crate::model::FeatureValue::value]
41180    /// if it holds a `Int64ArrayValue`, `None` if the field is not set or
41181    /// holds a different branch.
41182    pub fn int64_array_value(
41183        &self,
41184    ) -> std::option::Option<&std::boxed::Box<crate::model::Int64Array>> {
41185        #[allow(unreachable_patterns)]
41186        self.value.as_ref().and_then(|v| match v {
41187            crate::model::feature_value::Value::Int64ArrayValue(v) => std::option::Option::Some(v),
41188            _ => std::option::Option::None,
41189        })
41190    }
41191
41192    /// Sets the value of [value][crate::model::FeatureValue::value]
41193    /// to hold a `Int64ArrayValue`.
41194    ///
41195    /// Note that all the setters affecting `value` are
41196    /// mutually exclusive.
41197    pub fn set_int64_array_value<
41198        T: std::convert::Into<std::boxed::Box<crate::model::Int64Array>>,
41199    >(
41200        mut self,
41201        v: T,
41202    ) -> Self {
41203        self.value = std::option::Option::Some(
41204            crate::model::feature_value::Value::Int64ArrayValue(v.into()),
41205        );
41206        self
41207    }
41208
41209    /// The value of [value][crate::model::FeatureValue::value]
41210    /// if it holds a `StringArrayValue`, `None` if the field is not set or
41211    /// holds a different branch.
41212    pub fn string_array_value(
41213        &self,
41214    ) -> std::option::Option<&std::boxed::Box<crate::model::StringArray>> {
41215        #[allow(unreachable_patterns)]
41216        self.value.as_ref().and_then(|v| match v {
41217            crate::model::feature_value::Value::StringArrayValue(v) => std::option::Option::Some(v),
41218            _ => std::option::Option::None,
41219        })
41220    }
41221
41222    /// Sets the value of [value][crate::model::FeatureValue::value]
41223    /// to hold a `StringArrayValue`.
41224    ///
41225    /// Note that all the setters affecting `value` are
41226    /// mutually exclusive.
41227    pub fn set_string_array_value<
41228        T: std::convert::Into<std::boxed::Box<crate::model::StringArray>>,
41229    >(
41230        mut self,
41231        v: T,
41232    ) -> Self {
41233        self.value = std::option::Option::Some(
41234            crate::model::feature_value::Value::StringArrayValue(v.into()),
41235        );
41236        self
41237    }
41238
41239    /// The value of [value][crate::model::FeatureValue::value]
41240    /// if it holds a `BytesValue`, `None` if the field is not set or
41241    /// holds a different branch.
41242    pub fn bytes_value(&self) -> std::option::Option<&::bytes::Bytes> {
41243        #[allow(unreachable_patterns)]
41244        self.value.as_ref().and_then(|v| match v {
41245            crate::model::feature_value::Value::BytesValue(v) => std::option::Option::Some(v),
41246            _ => std::option::Option::None,
41247        })
41248    }
41249
41250    /// Sets the value of [value][crate::model::FeatureValue::value]
41251    /// to hold a `BytesValue`.
41252    ///
41253    /// Note that all the setters affecting `value` are
41254    /// mutually exclusive.
41255    pub fn set_bytes_value<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
41256        self.value =
41257            std::option::Option::Some(crate::model::feature_value::Value::BytesValue(v.into()));
41258        self
41259    }
41260
41261    /// The value of [value][crate::model::FeatureValue::value]
41262    /// if it holds a `StructValue`, `None` if the field is not set or
41263    /// holds a different branch.
41264    pub fn struct_value(&self) -> std::option::Option<&std::boxed::Box<crate::model::StructValue>> {
41265        #[allow(unreachable_patterns)]
41266        self.value.as_ref().and_then(|v| match v {
41267            crate::model::feature_value::Value::StructValue(v) => std::option::Option::Some(v),
41268            _ => std::option::Option::None,
41269        })
41270    }
41271
41272    /// Sets the value of [value][crate::model::FeatureValue::value]
41273    /// to hold a `StructValue`.
41274    ///
41275    /// Note that all the setters affecting `value` are
41276    /// mutually exclusive.
41277    pub fn set_struct_value<T: std::convert::Into<std::boxed::Box<crate::model::StructValue>>>(
41278        mut self,
41279        v: T,
41280    ) -> Self {
41281        self.value =
41282            std::option::Option::Some(crate::model::feature_value::Value::StructValue(v.into()));
41283        self
41284    }
41285}
41286
41287#[cfg(any(
41288    feature = "feature-online-store-service",
41289    feature = "featurestore-online-serving-service",
41290))]
41291impl wkt::message::Message for FeatureValue {
41292    fn typename() -> &'static str {
41293        "type.googleapis.com/google.cloud.aiplatform.v1.FeatureValue"
41294    }
41295}
41296
41297/// Defines additional types related to [FeatureValue].
41298#[cfg(any(
41299    feature = "feature-online-store-service",
41300    feature = "featurestore-online-serving-service",
41301))]
41302pub mod feature_value {
41303    #[allow(unused_imports)]
41304    use super::*;
41305
41306    /// Metadata of feature value.
41307    #[cfg(any(
41308        feature = "feature-online-store-service",
41309        feature = "featurestore-online-serving-service",
41310    ))]
41311    #[derive(Clone, Default, PartialEq)]
41312    #[non_exhaustive]
41313    pub struct Metadata {
41314        /// Feature generation timestamp. Typically, it is provided by user at
41315        /// feature ingestion time. If not, feature store
41316        /// will use the system timestamp when the data is ingested into feature
41317        /// store.
41318        ///
41319        /// Legacy Feature Store: For streaming ingestion, the time, aligned by days,
41320        /// must be no older than five years (1825 days) and no later than one year
41321        /// (366 days) in the future.
41322        pub generate_time: std::option::Option<wkt::Timestamp>,
41323
41324        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41325    }
41326
41327    #[cfg(any(
41328        feature = "feature-online-store-service",
41329        feature = "featurestore-online-serving-service",
41330    ))]
41331    impl Metadata {
41332        pub fn new() -> Self {
41333            std::default::Default::default()
41334        }
41335
41336        /// Sets the value of [generate_time][crate::model::feature_value::Metadata::generate_time].
41337        pub fn set_generate_time<T>(mut self, v: T) -> Self
41338        where
41339            T: std::convert::Into<wkt::Timestamp>,
41340        {
41341            self.generate_time = std::option::Option::Some(v.into());
41342            self
41343        }
41344
41345        /// Sets or clears the value of [generate_time][crate::model::feature_value::Metadata::generate_time].
41346        pub fn set_or_clear_generate_time<T>(mut self, v: std::option::Option<T>) -> Self
41347        where
41348            T: std::convert::Into<wkt::Timestamp>,
41349        {
41350            self.generate_time = v.map(|x| x.into());
41351            self
41352        }
41353    }
41354
41355    #[cfg(any(
41356        feature = "feature-online-store-service",
41357        feature = "featurestore-online-serving-service",
41358    ))]
41359    impl wkt::message::Message for Metadata {
41360        fn typename() -> &'static str {
41361            "type.googleapis.com/google.cloud.aiplatform.v1.FeatureValue.Metadata"
41362        }
41363    }
41364
41365    /// Value for the feature.
41366    #[cfg(any(
41367        feature = "feature-online-store-service",
41368        feature = "featurestore-online-serving-service",
41369    ))]
41370    #[derive(Clone, Debug, PartialEq)]
41371    #[non_exhaustive]
41372    pub enum Value {
41373        /// Bool type feature value.
41374        BoolValue(bool),
41375        /// Double type feature value.
41376        DoubleValue(f64),
41377        /// Int64 feature value.
41378        Int64Value(i64),
41379        /// String feature value.
41380        StringValue(std::string::String),
41381        /// A list of bool type feature value.
41382        BoolArrayValue(std::boxed::Box<crate::model::BoolArray>),
41383        /// A list of double type feature value.
41384        DoubleArrayValue(std::boxed::Box<crate::model::DoubleArray>),
41385        /// A list of int64 type feature value.
41386        Int64ArrayValue(std::boxed::Box<crate::model::Int64Array>),
41387        /// A list of string type feature value.
41388        StringArrayValue(std::boxed::Box<crate::model::StringArray>),
41389        /// Bytes feature value.
41390        BytesValue(::bytes::Bytes),
41391        /// A struct type feature value.
41392        StructValue(std::boxed::Box<crate::model::StructValue>),
41393    }
41394}
41395
41396/// Struct (or object) type feature value.
41397#[cfg(any(
41398    feature = "feature-online-store-service",
41399    feature = "featurestore-online-serving-service",
41400))]
41401#[derive(Clone, Default, PartialEq)]
41402#[non_exhaustive]
41403pub struct StructValue {
41404    /// A list of field values.
41405    pub values: std::vec::Vec<crate::model::StructFieldValue>,
41406
41407    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41408}
41409
41410#[cfg(any(
41411    feature = "feature-online-store-service",
41412    feature = "featurestore-online-serving-service",
41413))]
41414impl StructValue {
41415    pub fn new() -> Self {
41416        std::default::Default::default()
41417    }
41418
41419    /// Sets the value of [values][crate::model::StructValue::values].
41420    pub fn set_values<T, V>(mut self, v: T) -> Self
41421    where
41422        T: std::iter::IntoIterator<Item = V>,
41423        V: std::convert::Into<crate::model::StructFieldValue>,
41424    {
41425        use std::iter::Iterator;
41426        self.values = v.into_iter().map(|i| i.into()).collect();
41427        self
41428    }
41429}
41430
41431#[cfg(any(
41432    feature = "feature-online-store-service",
41433    feature = "featurestore-online-serving-service",
41434))]
41435impl wkt::message::Message for StructValue {
41436    fn typename() -> &'static str {
41437        "type.googleapis.com/google.cloud.aiplatform.v1.StructValue"
41438    }
41439}
41440
41441/// One field of a Struct (or object) type feature value.
41442#[cfg(any(
41443    feature = "feature-online-store-service",
41444    feature = "featurestore-online-serving-service",
41445))]
41446#[derive(Clone, Default, PartialEq)]
41447#[non_exhaustive]
41448pub struct StructFieldValue {
41449    /// Name of the field in the struct feature.
41450    pub name: std::string::String,
41451
41452    /// The value for this field.
41453    pub value: std::option::Option<std::boxed::Box<crate::model::FeatureValue>>,
41454
41455    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41456}
41457
41458#[cfg(any(
41459    feature = "feature-online-store-service",
41460    feature = "featurestore-online-serving-service",
41461))]
41462impl StructFieldValue {
41463    pub fn new() -> Self {
41464        std::default::Default::default()
41465    }
41466
41467    /// Sets the value of [name][crate::model::StructFieldValue::name].
41468    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41469        self.name = v.into();
41470        self
41471    }
41472
41473    /// Sets the value of [value][crate::model::StructFieldValue::value].
41474    pub fn set_value<T>(mut self, v: T) -> Self
41475    where
41476        T: std::convert::Into<crate::model::FeatureValue>,
41477    {
41478        self.value = std::option::Option::Some(std::boxed::Box::new(v.into()));
41479        self
41480    }
41481
41482    /// Sets or clears the value of [value][crate::model::StructFieldValue::value].
41483    pub fn set_or_clear_value<T>(mut self, v: std::option::Option<T>) -> Self
41484    where
41485        T: std::convert::Into<crate::model::FeatureValue>,
41486    {
41487        self.value = v.map(|x| std::boxed::Box::new(x.into()));
41488        self
41489    }
41490}
41491
41492#[cfg(any(
41493    feature = "feature-online-store-service",
41494    feature = "featurestore-online-serving-service",
41495))]
41496impl wkt::message::Message for StructFieldValue {
41497    fn typename() -> &'static str {
41498        "type.googleapis.com/google.cloud.aiplatform.v1.StructFieldValue"
41499    }
41500}
41501
41502/// Container for list of values.
41503#[cfg(feature = "featurestore-online-serving-service")]
41504#[derive(Clone, Default, PartialEq)]
41505#[non_exhaustive]
41506pub struct FeatureValueList {
41507    /// A list of feature values. All of them should be the same data type.
41508    pub values: std::vec::Vec<crate::model::FeatureValue>,
41509
41510    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41511}
41512
41513#[cfg(feature = "featurestore-online-serving-service")]
41514impl FeatureValueList {
41515    pub fn new() -> Self {
41516        std::default::Default::default()
41517    }
41518
41519    /// Sets the value of [values][crate::model::FeatureValueList::values].
41520    pub fn set_values<T, V>(mut self, v: T) -> Self
41521    where
41522        T: std::iter::IntoIterator<Item = V>,
41523        V: std::convert::Into<crate::model::FeatureValue>,
41524    {
41525        use std::iter::Iterator;
41526        self.values = v.into_iter().map(|i| i.into()).collect();
41527        self
41528    }
41529}
41530
41531#[cfg(feature = "featurestore-online-serving-service")]
41532impl wkt::message::Message for FeatureValueList {
41533    fn typename() -> &'static str {
41534        "type.googleapis.com/google.cloud.aiplatform.v1.FeatureValueList"
41535    }
41536}
41537
41538/// Request message for
41539/// [FeaturestoreService.CreateFeaturestore][google.cloud.aiplatform.v1.FeaturestoreService.CreateFeaturestore].
41540///
41541/// [google.cloud.aiplatform.v1.FeaturestoreService.CreateFeaturestore]: crate::client::FeaturestoreService::create_featurestore
41542#[cfg(feature = "featurestore-service")]
41543#[derive(Clone, Default, PartialEq)]
41544#[non_exhaustive]
41545pub struct CreateFeaturestoreRequest {
41546    /// Required. The resource name of the Location to create Featurestores.
41547    /// Format:
41548    /// `projects/{project}/locations/{location}`
41549    pub parent: std::string::String,
41550
41551    /// Required. The Featurestore to create.
41552    pub featurestore: std::option::Option<crate::model::Featurestore>,
41553
41554    /// Required. The ID to use for this Featurestore, which will become the final
41555    /// component of the Featurestore's resource name.
41556    ///
41557    /// This value may be up to 60 characters, and valid characters are
41558    /// `[a-z0-9_]`. The first character cannot be a number.
41559    ///
41560    /// The value must be unique within the project and location.
41561    pub featurestore_id: std::string::String,
41562
41563    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41564}
41565
41566#[cfg(feature = "featurestore-service")]
41567impl CreateFeaturestoreRequest {
41568    pub fn new() -> Self {
41569        std::default::Default::default()
41570    }
41571
41572    /// Sets the value of [parent][crate::model::CreateFeaturestoreRequest::parent].
41573    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41574        self.parent = v.into();
41575        self
41576    }
41577
41578    /// Sets the value of [featurestore][crate::model::CreateFeaturestoreRequest::featurestore].
41579    pub fn set_featurestore<T>(mut self, v: T) -> Self
41580    where
41581        T: std::convert::Into<crate::model::Featurestore>,
41582    {
41583        self.featurestore = std::option::Option::Some(v.into());
41584        self
41585    }
41586
41587    /// Sets or clears the value of [featurestore][crate::model::CreateFeaturestoreRequest::featurestore].
41588    pub fn set_or_clear_featurestore<T>(mut self, v: std::option::Option<T>) -> Self
41589    where
41590        T: std::convert::Into<crate::model::Featurestore>,
41591    {
41592        self.featurestore = v.map(|x| x.into());
41593        self
41594    }
41595
41596    /// Sets the value of [featurestore_id][crate::model::CreateFeaturestoreRequest::featurestore_id].
41597    pub fn set_featurestore_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41598        self.featurestore_id = v.into();
41599        self
41600    }
41601}
41602
41603#[cfg(feature = "featurestore-service")]
41604impl wkt::message::Message for CreateFeaturestoreRequest {
41605    fn typename() -> &'static str {
41606        "type.googleapis.com/google.cloud.aiplatform.v1.CreateFeaturestoreRequest"
41607    }
41608}
41609
41610/// Request message for
41611/// [FeaturestoreService.GetFeaturestore][google.cloud.aiplatform.v1.FeaturestoreService.GetFeaturestore].
41612///
41613/// [google.cloud.aiplatform.v1.FeaturestoreService.GetFeaturestore]: crate::client::FeaturestoreService::get_featurestore
41614#[cfg(feature = "featurestore-service")]
41615#[derive(Clone, Default, PartialEq)]
41616#[non_exhaustive]
41617pub struct GetFeaturestoreRequest {
41618    /// Required. The name of the Featurestore resource.
41619    pub name: std::string::String,
41620
41621    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41622}
41623
41624#[cfg(feature = "featurestore-service")]
41625impl GetFeaturestoreRequest {
41626    pub fn new() -> Self {
41627        std::default::Default::default()
41628    }
41629
41630    /// Sets the value of [name][crate::model::GetFeaturestoreRequest::name].
41631    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41632        self.name = v.into();
41633        self
41634    }
41635}
41636
41637#[cfg(feature = "featurestore-service")]
41638impl wkt::message::Message for GetFeaturestoreRequest {
41639    fn typename() -> &'static str {
41640        "type.googleapis.com/google.cloud.aiplatform.v1.GetFeaturestoreRequest"
41641    }
41642}
41643
41644/// Request message for
41645/// [FeaturestoreService.ListFeaturestores][google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores].
41646///
41647/// [google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores]: crate::client::FeaturestoreService::list_featurestores
41648#[cfg(feature = "featurestore-service")]
41649#[derive(Clone, Default, PartialEq)]
41650#[non_exhaustive]
41651pub struct ListFeaturestoresRequest {
41652    /// Required. The resource name of the Location to list Featurestores.
41653    /// Format:
41654    /// `projects/{project}/locations/{location}`
41655    pub parent: std::string::String,
41656
41657    /// Lists the featurestores that match the filter expression. The following
41658    /// fields are supported:
41659    ///
41660    /// * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
41661    ///   Values must be
41662    ///   in RFC 3339 format.
41663    /// * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
41664    ///   Values must be
41665    ///   in RFC 3339 format.
41666    /// * `online_serving_config.fixed_node_count`: Supports `=`, `!=`, `<`, `>`,
41667    ///   `<=`, and `>=` comparisons.
41668    /// * `labels`: Supports key-value equality and key presence.
41669    ///
41670    /// Examples:
41671    ///
41672    /// * `create_time > "2020-01-01" OR update_time > "2020-01-01"`
41673    ///   Featurestores created or updated after 2020-01-01.
41674    /// * `labels.env = "prod"`
41675    ///   Featurestores with label "env" set to "prod".
41676    pub filter: std::string::String,
41677
41678    /// The maximum number of Featurestores to return. The service may return fewer
41679    /// than this value. If unspecified, at most 100 Featurestores will be
41680    /// returned. The maximum value is 100; any value greater than 100 will be
41681    /// coerced to 100.
41682    pub page_size: i32,
41683
41684    /// A page token, received from a previous
41685    /// [FeaturestoreService.ListFeaturestores][google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores]
41686    /// call. Provide this to retrieve the subsequent page.
41687    ///
41688    /// When paginating, all other parameters provided to
41689    /// [FeaturestoreService.ListFeaturestores][google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores]
41690    /// must match the call that provided the page token.
41691    ///
41692    /// [google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores]: crate::client::FeaturestoreService::list_featurestores
41693    pub page_token: std::string::String,
41694
41695    /// A comma-separated list of fields to order by, sorted in ascending order.
41696    /// Use "desc" after a field name for descending.
41697    /// Supported Fields:
41698    ///
41699    /// * `create_time`
41700    /// * `update_time`
41701    /// * `online_serving_config.fixed_node_count`
41702    pub order_by: std::string::String,
41703
41704    /// Mask specifying which fields to read.
41705    pub read_mask: std::option::Option<wkt::FieldMask>,
41706
41707    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41708}
41709
41710#[cfg(feature = "featurestore-service")]
41711impl ListFeaturestoresRequest {
41712    pub fn new() -> Self {
41713        std::default::Default::default()
41714    }
41715
41716    /// Sets the value of [parent][crate::model::ListFeaturestoresRequest::parent].
41717    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41718        self.parent = v.into();
41719        self
41720    }
41721
41722    /// Sets the value of [filter][crate::model::ListFeaturestoresRequest::filter].
41723    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41724        self.filter = v.into();
41725        self
41726    }
41727
41728    /// Sets the value of [page_size][crate::model::ListFeaturestoresRequest::page_size].
41729    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
41730        self.page_size = v.into();
41731        self
41732    }
41733
41734    /// Sets the value of [page_token][crate::model::ListFeaturestoresRequest::page_token].
41735    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41736        self.page_token = v.into();
41737        self
41738    }
41739
41740    /// Sets the value of [order_by][crate::model::ListFeaturestoresRequest::order_by].
41741    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41742        self.order_by = v.into();
41743        self
41744    }
41745
41746    /// Sets the value of [read_mask][crate::model::ListFeaturestoresRequest::read_mask].
41747    pub fn set_read_mask<T>(mut self, v: T) -> Self
41748    where
41749        T: std::convert::Into<wkt::FieldMask>,
41750    {
41751        self.read_mask = std::option::Option::Some(v.into());
41752        self
41753    }
41754
41755    /// Sets or clears the value of [read_mask][crate::model::ListFeaturestoresRequest::read_mask].
41756    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
41757    where
41758        T: std::convert::Into<wkt::FieldMask>,
41759    {
41760        self.read_mask = v.map(|x| x.into());
41761        self
41762    }
41763}
41764
41765#[cfg(feature = "featurestore-service")]
41766impl wkt::message::Message for ListFeaturestoresRequest {
41767    fn typename() -> &'static str {
41768        "type.googleapis.com/google.cloud.aiplatform.v1.ListFeaturestoresRequest"
41769    }
41770}
41771
41772/// Response message for
41773/// [FeaturestoreService.ListFeaturestores][google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores].
41774///
41775/// [google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores]: crate::client::FeaturestoreService::list_featurestores
41776#[cfg(feature = "featurestore-service")]
41777#[derive(Clone, Default, PartialEq)]
41778#[non_exhaustive]
41779pub struct ListFeaturestoresResponse {
41780    /// The Featurestores matching the request.
41781    pub featurestores: std::vec::Vec<crate::model::Featurestore>,
41782
41783    /// A token, which can be sent as
41784    /// [ListFeaturestoresRequest.page_token][google.cloud.aiplatform.v1.ListFeaturestoresRequest.page_token]
41785    /// to retrieve the next page. If this field is omitted, there are no
41786    /// subsequent pages.
41787    ///
41788    /// [google.cloud.aiplatform.v1.ListFeaturestoresRequest.page_token]: crate::model::ListFeaturestoresRequest::page_token
41789    pub next_page_token: std::string::String,
41790
41791    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41792}
41793
41794#[cfg(feature = "featurestore-service")]
41795impl ListFeaturestoresResponse {
41796    pub fn new() -> Self {
41797        std::default::Default::default()
41798    }
41799
41800    /// Sets the value of [featurestores][crate::model::ListFeaturestoresResponse::featurestores].
41801    pub fn set_featurestores<T, V>(mut self, v: T) -> Self
41802    where
41803        T: std::iter::IntoIterator<Item = V>,
41804        V: std::convert::Into<crate::model::Featurestore>,
41805    {
41806        use std::iter::Iterator;
41807        self.featurestores = v.into_iter().map(|i| i.into()).collect();
41808        self
41809    }
41810
41811    /// Sets the value of [next_page_token][crate::model::ListFeaturestoresResponse::next_page_token].
41812    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41813        self.next_page_token = v.into();
41814        self
41815    }
41816}
41817
41818#[cfg(feature = "featurestore-service")]
41819impl wkt::message::Message for ListFeaturestoresResponse {
41820    fn typename() -> &'static str {
41821        "type.googleapis.com/google.cloud.aiplatform.v1.ListFeaturestoresResponse"
41822    }
41823}
41824
41825#[cfg(feature = "featurestore-service")]
41826#[doc(hidden)]
41827impl gax::paginator::internal::PageableResponse for ListFeaturestoresResponse {
41828    type PageItem = crate::model::Featurestore;
41829
41830    fn items(self) -> std::vec::Vec<Self::PageItem> {
41831        self.featurestores
41832    }
41833
41834    fn next_page_token(&self) -> std::string::String {
41835        use std::clone::Clone;
41836        self.next_page_token.clone()
41837    }
41838}
41839
41840/// Request message for
41841/// [FeaturestoreService.UpdateFeaturestore][google.cloud.aiplatform.v1.FeaturestoreService.UpdateFeaturestore].
41842///
41843/// [google.cloud.aiplatform.v1.FeaturestoreService.UpdateFeaturestore]: crate::client::FeaturestoreService::update_featurestore
41844#[cfg(feature = "featurestore-service")]
41845#[derive(Clone, Default, PartialEq)]
41846#[non_exhaustive]
41847pub struct UpdateFeaturestoreRequest {
41848    /// Required. The Featurestore's `name` field is used to identify the
41849    /// Featurestore to be updated. Format:
41850    /// `projects/{project}/locations/{location}/featurestores/{featurestore}`
41851    pub featurestore: std::option::Option<crate::model::Featurestore>,
41852
41853    /// Field mask is used to specify the fields to be overwritten in the
41854    /// Featurestore resource by the update.
41855    /// The fields specified in the update_mask are relative to the resource, not
41856    /// the full request. A field will be overwritten if it is in the mask. If the
41857    /// user does not provide a mask then only the non-empty fields present in the
41858    /// request will be overwritten. Set the update_mask to `*` to override all
41859    /// fields.
41860    ///
41861    /// Updatable fields:
41862    ///
41863    /// * `labels`
41864    /// * `online_serving_config.fixed_node_count`
41865    /// * `online_serving_config.scaling`
41866    /// * `online_storage_ttl_days`
41867    pub update_mask: std::option::Option<wkt::FieldMask>,
41868
41869    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41870}
41871
41872#[cfg(feature = "featurestore-service")]
41873impl UpdateFeaturestoreRequest {
41874    pub fn new() -> Self {
41875        std::default::Default::default()
41876    }
41877
41878    /// Sets the value of [featurestore][crate::model::UpdateFeaturestoreRequest::featurestore].
41879    pub fn set_featurestore<T>(mut self, v: T) -> Self
41880    where
41881        T: std::convert::Into<crate::model::Featurestore>,
41882    {
41883        self.featurestore = std::option::Option::Some(v.into());
41884        self
41885    }
41886
41887    /// Sets or clears the value of [featurestore][crate::model::UpdateFeaturestoreRequest::featurestore].
41888    pub fn set_or_clear_featurestore<T>(mut self, v: std::option::Option<T>) -> Self
41889    where
41890        T: std::convert::Into<crate::model::Featurestore>,
41891    {
41892        self.featurestore = v.map(|x| x.into());
41893        self
41894    }
41895
41896    /// Sets the value of [update_mask][crate::model::UpdateFeaturestoreRequest::update_mask].
41897    pub fn set_update_mask<T>(mut self, v: T) -> Self
41898    where
41899        T: std::convert::Into<wkt::FieldMask>,
41900    {
41901        self.update_mask = std::option::Option::Some(v.into());
41902        self
41903    }
41904
41905    /// Sets or clears the value of [update_mask][crate::model::UpdateFeaturestoreRequest::update_mask].
41906    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
41907    where
41908        T: std::convert::Into<wkt::FieldMask>,
41909    {
41910        self.update_mask = v.map(|x| x.into());
41911        self
41912    }
41913}
41914
41915#[cfg(feature = "featurestore-service")]
41916impl wkt::message::Message for UpdateFeaturestoreRequest {
41917    fn typename() -> &'static str {
41918        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateFeaturestoreRequest"
41919    }
41920}
41921
41922/// Request message for
41923/// [FeaturestoreService.DeleteFeaturestore][google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeaturestore].
41924///
41925/// [google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeaturestore]: crate::client::FeaturestoreService::delete_featurestore
41926#[cfg(feature = "featurestore-service")]
41927#[derive(Clone, Default, PartialEq)]
41928#[non_exhaustive]
41929pub struct DeleteFeaturestoreRequest {
41930    /// Required. The name of the Featurestore to be deleted.
41931    /// Format:
41932    /// `projects/{project}/locations/{location}/featurestores/{featurestore}`
41933    pub name: std::string::String,
41934
41935    /// If set to true, any EntityTypes and Features for this Featurestore will
41936    /// also be deleted. (Otherwise, the request will only work if the Featurestore
41937    /// has no EntityTypes.)
41938    pub force: bool,
41939
41940    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
41941}
41942
41943#[cfg(feature = "featurestore-service")]
41944impl DeleteFeaturestoreRequest {
41945    pub fn new() -> Self {
41946        std::default::Default::default()
41947    }
41948
41949    /// Sets the value of [name][crate::model::DeleteFeaturestoreRequest::name].
41950    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
41951        self.name = v.into();
41952        self
41953    }
41954
41955    /// Sets the value of [force][crate::model::DeleteFeaturestoreRequest::force].
41956    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
41957        self.force = v.into();
41958        self
41959    }
41960}
41961
41962#[cfg(feature = "featurestore-service")]
41963impl wkt::message::Message for DeleteFeaturestoreRequest {
41964    fn typename() -> &'static str {
41965        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteFeaturestoreRequest"
41966    }
41967}
41968
41969/// Request message for
41970/// [FeaturestoreService.ImportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues].
41971///
41972/// [google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues]: crate::client::FeaturestoreService::import_feature_values
41973#[cfg(feature = "featurestore-service")]
41974#[derive(Clone, Default, PartialEq)]
41975#[non_exhaustive]
41976pub struct ImportFeatureValuesRequest {
41977    /// Required. The resource name of the EntityType grouping the Features for
41978    /// which values are being imported. Format:
41979    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`
41980    pub entity_type: std::string::String,
41981
41982    /// Source column that holds entity IDs. If not provided, entity IDs are
41983    /// extracted from the column named entity_id.
41984    pub entity_id_field: std::string::String,
41985
41986    /// Required. Specifications defining which Feature values to import from the
41987    /// entity. The request fails if no feature_specs are provided, and having
41988    /// multiple feature_specs for one Feature is not allowed.
41989    pub feature_specs: std::vec::Vec<crate::model::import_feature_values_request::FeatureSpec>,
41990
41991    /// If set, data will not be imported for online serving. This
41992    /// is typically used for backfilling, where Feature generation timestamps are
41993    /// not in the timestamp range needed for online serving.
41994    pub disable_online_serving: bool,
41995
41996    /// Specifies the number of workers that are used to write data to the
41997    /// Featurestore. Consider the online serving capacity that you require to
41998    /// achieve the desired import throughput without interfering with online
41999    /// serving. The value must be positive, and less than or equal to 100.
42000    /// If not set, defaults to using 1 worker. The low count ensures minimal
42001    /// impact on online serving performance.
42002    pub worker_count: i32,
42003
42004    /// If true, API doesn't start ingestion analysis pipeline.
42005    pub disable_ingestion_analysis: bool,
42006
42007    /// Details about the source data, including the location of the storage and
42008    /// the format.
42009    pub source: std::option::Option<crate::model::import_feature_values_request::Source>,
42010
42011    /// Source of Feature timestamp for all Feature values of each entity.
42012    /// Timestamps must be millisecond-aligned.
42013    pub feature_time_source:
42014        std::option::Option<crate::model::import_feature_values_request::FeatureTimeSource>,
42015
42016    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42017}
42018
42019#[cfg(feature = "featurestore-service")]
42020impl ImportFeatureValuesRequest {
42021    pub fn new() -> Self {
42022        std::default::Default::default()
42023    }
42024
42025    /// Sets the value of [entity_type][crate::model::ImportFeatureValuesRequest::entity_type].
42026    pub fn set_entity_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42027        self.entity_type = v.into();
42028        self
42029    }
42030
42031    /// Sets the value of [entity_id_field][crate::model::ImportFeatureValuesRequest::entity_id_field].
42032    pub fn set_entity_id_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42033        self.entity_id_field = v.into();
42034        self
42035    }
42036
42037    /// Sets the value of [feature_specs][crate::model::ImportFeatureValuesRequest::feature_specs].
42038    pub fn set_feature_specs<T, V>(mut self, v: T) -> Self
42039    where
42040        T: std::iter::IntoIterator<Item = V>,
42041        V: std::convert::Into<crate::model::import_feature_values_request::FeatureSpec>,
42042    {
42043        use std::iter::Iterator;
42044        self.feature_specs = v.into_iter().map(|i| i.into()).collect();
42045        self
42046    }
42047
42048    /// Sets the value of [disable_online_serving][crate::model::ImportFeatureValuesRequest::disable_online_serving].
42049    pub fn set_disable_online_serving<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
42050        self.disable_online_serving = v.into();
42051        self
42052    }
42053
42054    /// Sets the value of [worker_count][crate::model::ImportFeatureValuesRequest::worker_count].
42055    pub fn set_worker_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
42056        self.worker_count = v.into();
42057        self
42058    }
42059
42060    /// Sets the value of [disable_ingestion_analysis][crate::model::ImportFeatureValuesRequest::disable_ingestion_analysis].
42061    pub fn set_disable_ingestion_analysis<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
42062        self.disable_ingestion_analysis = v.into();
42063        self
42064    }
42065
42066    /// Sets the value of [source][crate::model::ImportFeatureValuesRequest::source].
42067    ///
42068    /// Note that all the setters affecting `source` are mutually
42069    /// exclusive.
42070    pub fn set_source<
42071        T: std::convert::Into<
42072                std::option::Option<crate::model::import_feature_values_request::Source>,
42073            >,
42074    >(
42075        mut self,
42076        v: T,
42077    ) -> Self {
42078        self.source = v.into();
42079        self
42080    }
42081
42082    /// The value of [source][crate::model::ImportFeatureValuesRequest::source]
42083    /// if it holds a `AvroSource`, `None` if the field is not set or
42084    /// holds a different branch.
42085    pub fn avro_source(&self) -> std::option::Option<&std::boxed::Box<crate::model::AvroSource>> {
42086        #[allow(unreachable_patterns)]
42087        self.source.as_ref().and_then(|v| match v {
42088            crate::model::import_feature_values_request::Source::AvroSource(v) => {
42089                std::option::Option::Some(v)
42090            }
42091            _ => std::option::Option::None,
42092        })
42093    }
42094
42095    /// Sets the value of [source][crate::model::ImportFeatureValuesRequest::source]
42096    /// to hold a `AvroSource`.
42097    ///
42098    /// Note that all the setters affecting `source` are
42099    /// mutually exclusive.
42100    pub fn set_avro_source<T: std::convert::Into<std::boxed::Box<crate::model::AvroSource>>>(
42101        mut self,
42102        v: T,
42103    ) -> Self {
42104        self.source = std::option::Option::Some(
42105            crate::model::import_feature_values_request::Source::AvroSource(v.into()),
42106        );
42107        self
42108    }
42109
42110    /// The value of [source][crate::model::ImportFeatureValuesRequest::source]
42111    /// if it holds a `BigquerySource`, `None` if the field is not set or
42112    /// holds a different branch.
42113    pub fn bigquery_source(
42114        &self,
42115    ) -> std::option::Option<&std::boxed::Box<crate::model::BigQuerySource>> {
42116        #[allow(unreachable_patterns)]
42117        self.source.as_ref().and_then(|v| match v {
42118            crate::model::import_feature_values_request::Source::BigquerySource(v) => {
42119                std::option::Option::Some(v)
42120            }
42121            _ => std::option::Option::None,
42122        })
42123    }
42124
42125    /// Sets the value of [source][crate::model::ImportFeatureValuesRequest::source]
42126    /// to hold a `BigquerySource`.
42127    ///
42128    /// Note that all the setters affecting `source` are
42129    /// mutually exclusive.
42130    pub fn set_bigquery_source<
42131        T: std::convert::Into<std::boxed::Box<crate::model::BigQuerySource>>,
42132    >(
42133        mut self,
42134        v: T,
42135    ) -> Self {
42136        self.source = std::option::Option::Some(
42137            crate::model::import_feature_values_request::Source::BigquerySource(v.into()),
42138        );
42139        self
42140    }
42141
42142    /// The value of [source][crate::model::ImportFeatureValuesRequest::source]
42143    /// if it holds a `CsvSource`, `None` if the field is not set or
42144    /// holds a different branch.
42145    pub fn csv_source(&self) -> std::option::Option<&std::boxed::Box<crate::model::CsvSource>> {
42146        #[allow(unreachable_patterns)]
42147        self.source.as_ref().and_then(|v| match v {
42148            crate::model::import_feature_values_request::Source::CsvSource(v) => {
42149                std::option::Option::Some(v)
42150            }
42151            _ => std::option::Option::None,
42152        })
42153    }
42154
42155    /// Sets the value of [source][crate::model::ImportFeatureValuesRequest::source]
42156    /// to hold a `CsvSource`.
42157    ///
42158    /// Note that all the setters affecting `source` are
42159    /// mutually exclusive.
42160    pub fn set_csv_source<T: std::convert::Into<std::boxed::Box<crate::model::CsvSource>>>(
42161        mut self,
42162        v: T,
42163    ) -> Self {
42164        self.source = std::option::Option::Some(
42165            crate::model::import_feature_values_request::Source::CsvSource(v.into()),
42166        );
42167        self
42168    }
42169
42170    /// Sets the value of [feature_time_source][crate::model::ImportFeatureValuesRequest::feature_time_source].
42171    ///
42172    /// Note that all the setters affecting `feature_time_source` are mutually
42173    /// exclusive.
42174    pub fn set_feature_time_source<
42175        T: std::convert::Into<
42176                std::option::Option<crate::model::import_feature_values_request::FeatureTimeSource>,
42177            >,
42178    >(
42179        mut self,
42180        v: T,
42181    ) -> Self {
42182        self.feature_time_source = v.into();
42183        self
42184    }
42185
42186    /// The value of [feature_time_source][crate::model::ImportFeatureValuesRequest::feature_time_source]
42187    /// if it holds a `FeatureTimeField`, `None` if the field is not set or
42188    /// holds a different branch.
42189    pub fn feature_time_field(&self) -> std::option::Option<&std::string::String> {
42190        #[allow(unreachable_patterns)]
42191        self.feature_time_source.as_ref().and_then(|v| match v {
42192            crate::model::import_feature_values_request::FeatureTimeSource::FeatureTimeField(v) => {
42193                std::option::Option::Some(v)
42194            }
42195            _ => std::option::Option::None,
42196        })
42197    }
42198
42199    /// Sets the value of [feature_time_source][crate::model::ImportFeatureValuesRequest::feature_time_source]
42200    /// to hold a `FeatureTimeField`.
42201    ///
42202    /// Note that all the setters affecting `feature_time_source` are
42203    /// mutually exclusive.
42204    pub fn set_feature_time_field<T: std::convert::Into<std::string::String>>(
42205        mut self,
42206        v: T,
42207    ) -> Self {
42208        self.feature_time_source = std::option::Option::Some(
42209            crate::model::import_feature_values_request::FeatureTimeSource::FeatureTimeField(
42210                v.into(),
42211            ),
42212        );
42213        self
42214    }
42215
42216    /// The value of [feature_time_source][crate::model::ImportFeatureValuesRequest::feature_time_source]
42217    /// if it holds a `FeatureTime`, `None` if the field is not set or
42218    /// holds a different branch.
42219    pub fn feature_time(&self) -> std::option::Option<&std::boxed::Box<wkt::Timestamp>> {
42220        #[allow(unreachable_patterns)]
42221        self.feature_time_source.as_ref().and_then(|v| match v {
42222            crate::model::import_feature_values_request::FeatureTimeSource::FeatureTime(v) => {
42223                std::option::Option::Some(v)
42224            }
42225            _ => std::option::Option::None,
42226        })
42227    }
42228
42229    /// Sets the value of [feature_time_source][crate::model::ImportFeatureValuesRequest::feature_time_source]
42230    /// to hold a `FeatureTime`.
42231    ///
42232    /// Note that all the setters affecting `feature_time_source` are
42233    /// mutually exclusive.
42234    pub fn set_feature_time<T: std::convert::Into<std::boxed::Box<wkt::Timestamp>>>(
42235        mut self,
42236        v: T,
42237    ) -> Self {
42238        self.feature_time_source = std::option::Option::Some(
42239            crate::model::import_feature_values_request::FeatureTimeSource::FeatureTime(v.into()),
42240        );
42241        self
42242    }
42243}
42244
42245#[cfg(feature = "featurestore-service")]
42246impl wkt::message::Message for ImportFeatureValuesRequest {
42247    fn typename() -> &'static str {
42248        "type.googleapis.com/google.cloud.aiplatform.v1.ImportFeatureValuesRequest"
42249    }
42250}
42251
42252/// Defines additional types related to [ImportFeatureValuesRequest].
42253#[cfg(feature = "featurestore-service")]
42254pub mod import_feature_values_request {
42255    #[allow(unused_imports)]
42256    use super::*;
42257
42258    /// Defines the Feature value(s) to import.
42259    #[cfg(feature = "featurestore-service")]
42260    #[derive(Clone, Default, PartialEq)]
42261    #[non_exhaustive]
42262    pub struct FeatureSpec {
42263        /// Required. ID of the Feature to import values of. This Feature must exist
42264        /// in the target EntityType, or the request will fail.
42265        pub id: std::string::String,
42266
42267        /// Source column to get the Feature values from. If not set, uses the column
42268        /// with the same name as the Feature ID.
42269        pub source_field: std::string::String,
42270
42271        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42272    }
42273
42274    #[cfg(feature = "featurestore-service")]
42275    impl FeatureSpec {
42276        pub fn new() -> Self {
42277            std::default::Default::default()
42278        }
42279
42280        /// Sets the value of [id][crate::model::import_feature_values_request::FeatureSpec::id].
42281        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42282            self.id = v.into();
42283            self
42284        }
42285
42286        /// Sets the value of [source_field][crate::model::import_feature_values_request::FeatureSpec::source_field].
42287        pub fn set_source_field<T: std::convert::Into<std::string::String>>(
42288            mut self,
42289            v: T,
42290        ) -> Self {
42291            self.source_field = v.into();
42292            self
42293        }
42294    }
42295
42296    #[cfg(feature = "featurestore-service")]
42297    impl wkt::message::Message for FeatureSpec {
42298        fn typename() -> &'static str {
42299            "type.googleapis.com/google.cloud.aiplatform.v1.ImportFeatureValuesRequest.FeatureSpec"
42300        }
42301    }
42302
42303    /// Details about the source data, including the location of the storage and
42304    /// the format.
42305    #[cfg(feature = "featurestore-service")]
42306    #[derive(Clone, Debug, PartialEq)]
42307    #[non_exhaustive]
42308    pub enum Source {
42309        AvroSource(std::boxed::Box<crate::model::AvroSource>),
42310        BigquerySource(std::boxed::Box<crate::model::BigQuerySource>),
42311        CsvSource(std::boxed::Box<crate::model::CsvSource>),
42312    }
42313
42314    /// Source of Feature timestamp for all Feature values of each entity.
42315    /// Timestamps must be millisecond-aligned.
42316    #[cfg(feature = "featurestore-service")]
42317    #[derive(Clone, Debug, PartialEq)]
42318    #[non_exhaustive]
42319    pub enum FeatureTimeSource {
42320        /// Source column that holds the Feature timestamp for all Feature
42321        /// values in each entity.
42322        FeatureTimeField(std::string::String),
42323        /// Single Feature timestamp for all entities being imported. The
42324        /// timestamp must not have higher than millisecond precision.
42325        FeatureTime(std::boxed::Box<wkt::Timestamp>),
42326    }
42327}
42328
42329/// Response message for
42330/// [FeaturestoreService.ImportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues].
42331///
42332/// [google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues]: crate::client::FeaturestoreService::import_feature_values
42333#[cfg(feature = "featurestore-service")]
42334#[derive(Clone, Default, PartialEq)]
42335#[non_exhaustive]
42336pub struct ImportFeatureValuesResponse {
42337    /// Number of entities that have been imported by the operation.
42338    pub imported_entity_count: i64,
42339
42340    /// Number of Feature values that have been imported by the operation.
42341    pub imported_feature_value_count: i64,
42342
42343    /// The number of rows in input source that weren't imported due to either
42344    ///
42345    /// * Not having any featureValues.
42346    /// * Having a null entityId.
42347    /// * Having a null timestamp.
42348    /// * Not being parsable (applicable for CSV sources).
42349    pub invalid_row_count: i64,
42350
42351    /// The number rows that weren't ingested due to having feature timestamps
42352    /// outside the retention boundary.
42353    pub timestamp_outside_retention_rows_count: i64,
42354
42355    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42356}
42357
42358#[cfg(feature = "featurestore-service")]
42359impl ImportFeatureValuesResponse {
42360    pub fn new() -> Self {
42361        std::default::Default::default()
42362    }
42363
42364    /// Sets the value of [imported_entity_count][crate::model::ImportFeatureValuesResponse::imported_entity_count].
42365    pub fn set_imported_entity_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
42366        self.imported_entity_count = v.into();
42367        self
42368    }
42369
42370    /// Sets the value of [imported_feature_value_count][crate::model::ImportFeatureValuesResponse::imported_feature_value_count].
42371    pub fn set_imported_feature_value_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
42372        self.imported_feature_value_count = v.into();
42373        self
42374    }
42375
42376    /// Sets the value of [invalid_row_count][crate::model::ImportFeatureValuesResponse::invalid_row_count].
42377    pub fn set_invalid_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
42378        self.invalid_row_count = v.into();
42379        self
42380    }
42381
42382    /// Sets the value of [timestamp_outside_retention_rows_count][crate::model::ImportFeatureValuesResponse::timestamp_outside_retention_rows_count].
42383    pub fn set_timestamp_outside_retention_rows_count<T: std::convert::Into<i64>>(
42384        mut self,
42385        v: T,
42386    ) -> Self {
42387        self.timestamp_outside_retention_rows_count = v.into();
42388        self
42389    }
42390}
42391
42392#[cfg(feature = "featurestore-service")]
42393impl wkt::message::Message for ImportFeatureValuesResponse {
42394    fn typename() -> &'static str {
42395        "type.googleapis.com/google.cloud.aiplatform.v1.ImportFeatureValuesResponse"
42396    }
42397}
42398
42399/// Request message for
42400/// [FeaturestoreService.BatchReadFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.BatchReadFeatureValues].
42401///
42402/// [google.cloud.aiplatform.v1.FeaturestoreService.BatchReadFeatureValues]: crate::client::FeaturestoreService::batch_read_feature_values
42403#[cfg(feature = "featurestore-service")]
42404#[derive(Clone, Default, PartialEq)]
42405#[non_exhaustive]
42406pub struct BatchReadFeatureValuesRequest {
42407    /// Required. The resource name of the Featurestore from which to query Feature
42408    /// values. Format:
42409    /// `projects/{project}/locations/{location}/featurestores/{featurestore}`
42410    pub featurestore: std::string::String,
42411
42412    /// Required. Specifies output location and format.
42413    pub destination: std::option::Option<crate::model::FeatureValueDestination>,
42414
42415    /// When not empty, the specified fields in the *_read_instances source will be
42416    /// joined as-is in the output, in addition to those fields from the
42417    /// Featurestore Entity.
42418    ///
42419    /// For BigQuery source, the type of the pass-through values will be
42420    /// automatically inferred. For CSV source, the pass-through values will be
42421    /// passed as opaque bytes.
42422    pub pass_through_fields:
42423        std::vec::Vec<crate::model::batch_read_feature_values_request::PassThroughField>,
42424
42425    /// Required. Specifies EntityType grouping Features to read values of and
42426    /// settings.
42427    pub entity_type_specs:
42428        std::vec::Vec<crate::model::batch_read_feature_values_request::EntityTypeSpec>,
42429
42430    /// Optional. Excludes Feature values with feature generation timestamp before
42431    /// this timestamp. If not set, retrieve oldest values kept in Feature Store.
42432    /// Timestamp, if present, must not have higher than millisecond precision.
42433    pub start_time: std::option::Option<wkt::Timestamp>,
42434
42435    pub read_option:
42436        std::option::Option<crate::model::batch_read_feature_values_request::ReadOption>,
42437
42438    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42439}
42440
42441#[cfg(feature = "featurestore-service")]
42442impl BatchReadFeatureValuesRequest {
42443    pub fn new() -> Self {
42444        std::default::Default::default()
42445    }
42446
42447    /// Sets the value of [featurestore][crate::model::BatchReadFeatureValuesRequest::featurestore].
42448    pub fn set_featurestore<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42449        self.featurestore = v.into();
42450        self
42451    }
42452
42453    /// Sets the value of [destination][crate::model::BatchReadFeatureValuesRequest::destination].
42454    pub fn set_destination<T>(mut self, v: T) -> Self
42455    where
42456        T: std::convert::Into<crate::model::FeatureValueDestination>,
42457    {
42458        self.destination = std::option::Option::Some(v.into());
42459        self
42460    }
42461
42462    /// Sets or clears the value of [destination][crate::model::BatchReadFeatureValuesRequest::destination].
42463    pub fn set_or_clear_destination<T>(mut self, v: std::option::Option<T>) -> Self
42464    where
42465        T: std::convert::Into<crate::model::FeatureValueDestination>,
42466    {
42467        self.destination = v.map(|x| x.into());
42468        self
42469    }
42470
42471    /// Sets the value of [pass_through_fields][crate::model::BatchReadFeatureValuesRequest::pass_through_fields].
42472    pub fn set_pass_through_fields<T, V>(mut self, v: T) -> Self
42473    where
42474        T: std::iter::IntoIterator<Item = V>,
42475        V: std::convert::Into<crate::model::batch_read_feature_values_request::PassThroughField>,
42476    {
42477        use std::iter::Iterator;
42478        self.pass_through_fields = v.into_iter().map(|i| i.into()).collect();
42479        self
42480    }
42481
42482    /// Sets the value of [entity_type_specs][crate::model::BatchReadFeatureValuesRequest::entity_type_specs].
42483    pub fn set_entity_type_specs<T, V>(mut self, v: T) -> Self
42484    where
42485        T: std::iter::IntoIterator<Item = V>,
42486        V: std::convert::Into<crate::model::batch_read_feature_values_request::EntityTypeSpec>,
42487    {
42488        use std::iter::Iterator;
42489        self.entity_type_specs = v.into_iter().map(|i| i.into()).collect();
42490        self
42491    }
42492
42493    /// Sets the value of [start_time][crate::model::BatchReadFeatureValuesRequest::start_time].
42494    pub fn set_start_time<T>(mut self, v: T) -> Self
42495    where
42496        T: std::convert::Into<wkt::Timestamp>,
42497    {
42498        self.start_time = std::option::Option::Some(v.into());
42499        self
42500    }
42501
42502    /// Sets or clears the value of [start_time][crate::model::BatchReadFeatureValuesRequest::start_time].
42503    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
42504    where
42505        T: std::convert::Into<wkt::Timestamp>,
42506    {
42507        self.start_time = v.map(|x| x.into());
42508        self
42509    }
42510
42511    /// Sets the value of [read_option][crate::model::BatchReadFeatureValuesRequest::read_option].
42512    ///
42513    /// Note that all the setters affecting `read_option` are mutually
42514    /// exclusive.
42515    pub fn set_read_option<
42516        T: std::convert::Into<
42517                std::option::Option<crate::model::batch_read_feature_values_request::ReadOption>,
42518            >,
42519    >(
42520        mut self,
42521        v: T,
42522    ) -> Self {
42523        self.read_option = v.into();
42524        self
42525    }
42526
42527    /// The value of [read_option][crate::model::BatchReadFeatureValuesRequest::read_option]
42528    /// if it holds a `CsvReadInstances`, `None` if the field is not set or
42529    /// holds a different branch.
42530    pub fn csv_read_instances(
42531        &self,
42532    ) -> std::option::Option<&std::boxed::Box<crate::model::CsvSource>> {
42533        #[allow(unreachable_patterns)]
42534        self.read_option.as_ref().and_then(|v| match v {
42535            crate::model::batch_read_feature_values_request::ReadOption::CsvReadInstances(v) => {
42536                std::option::Option::Some(v)
42537            }
42538            _ => std::option::Option::None,
42539        })
42540    }
42541
42542    /// Sets the value of [read_option][crate::model::BatchReadFeatureValuesRequest::read_option]
42543    /// to hold a `CsvReadInstances`.
42544    ///
42545    /// Note that all the setters affecting `read_option` are
42546    /// mutually exclusive.
42547    pub fn set_csv_read_instances<
42548        T: std::convert::Into<std::boxed::Box<crate::model::CsvSource>>,
42549    >(
42550        mut self,
42551        v: T,
42552    ) -> Self {
42553        self.read_option = std::option::Option::Some(
42554            crate::model::batch_read_feature_values_request::ReadOption::CsvReadInstances(v.into()),
42555        );
42556        self
42557    }
42558
42559    /// The value of [read_option][crate::model::BatchReadFeatureValuesRequest::read_option]
42560    /// if it holds a `BigqueryReadInstances`, `None` if the field is not set or
42561    /// holds a different branch.
42562    pub fn bigquery_read_instances(
42563        &self,
42564    ) -> std::option::Option<&std::boxed::Box<crate::model::BigQuerySource>> {
42565        #[allow(unreachable_patterns)]
42566        self.read_option.as_ref().and_then(|v| match v {
42567            crate::model::batch_read_feature_values_request::ReadOption::BigqueryReadInstances(
42568                v,
42569            ) => std::option::Option::Some(v),
42570            _ => std::option::Option::None,
42571        })
42572    }
42573
42574    /// Sets the value of [read_option][crate::model::BatchReadFeatureValuesRequest::read_option]
42575    /// to hold a `BigqueryReadInstances`.
42576    ///
42577    /// Note that all the setters affecting `read_option` are
42578    /// mutually exclusive.
42579    pub fn set_bigquery_read_instances<
42580        T: std::convert::Into<std::boxed::Box<crate::model::BigQuerySource>>,
42581    >(
42582        mut self,
42583        v: T,
42584    ) -> Self {
42585        self.read_option = std::option::Option::Some(
42586            crate::model::batch_read_feature_values_request::ReadOption::BigqueryReadInstances(
42587                v.into(),
42588            ),
42589        );
42590        self
42591    }
42592}
42593
42594#[cfg(feature = "featurestore-service")]
42595impl wkt::message::Message for BatchReadFeatureValuesRequest {
42596    fn typename() -> &'static str {
42597        "type.googleapis.com/google.cloud.aiplatform.v1.BatchReadFeatureValuesRequest"
42598    }
42599}
42600
42601/// Defines additional types related to [BatchReadFeatureValuesRequest].
42602#[cfg(feature = "featurestore-service")]
42603pub mod batch_read_feature_values_request {
42604    #[allow(unused_imports)]
42605    use super::*;
42606
42607    /// Describe pass-through fields in read_instance source.
42608    #[cfg(feature = "featurestore-service")]
42609    #[derive(Clone, Default, PartialEq)]
42610    #[non_exhaustive]
42611    pub struct PassThroughField {
42612        /// Required. The name of the field in the CSV header or the name of the
42613        /// column in BigQuery table. The naming restriction is the same as
42614        /// [Feature.name][google.cloud.aiplatform.v1.Feature.name].
42615        ///
42616        /// [google.cloud.aiplatform.v1.Feature.name]: crate::model::Feature::name
42617        pub field_name: std::string::String,
42618
42619        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42620    }
42621
42622    #[cfg(feature = "featurestore-service")]
42623    impl PassThroughField {
42624        pub fn new() -> Self {
42625            std::default::Default::default()
42626        }
42627
42628        /// Sets the value of [field_name][crate::model::batch_read_feature_values_request::PassThroughField::field_name].
42629        pub fn set_field_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42630            self.field_name = v.into();
42631            self
42632        }
42633    }
42634
42635    #[cfg(feature = "featurestore-service")]
42636    impl wkt::message::Message for PassThroughField {
42637        fn typename() -> &'static str {
42638            "type.googleapis.com/google.cloud.aiplatform.v1.BatchReadFeatureValuesRequest.PassThroughField"
42639        }
42640    }
42641
42642    /// Selects Features of an EntityType to read values of and specifies read
42643    /// settings.
42644    #[cfg(feature = "featurestore-service")]
42645    #[derive(Clone, Default, PartialEq)]
42646    #[non_exhaustive]
42647    pub struct EntityTypeSpec {
42648        /// Required. ID of the EntityType to select Features. The EntityType id is
42649        /// the
42650        /// [entity_type_id][google.cloud.aiplatform.v1.CreateEntityTypeRequest.entity_type_id]
42651        /// specified during EntityType creation.
42652        ///
42653        /// [google.cloud.aiplatform.v1.CreateEntityTypeRequest.entity_type_id]: crate::model::CreateEntityTypeRequest::entity_type_id
42654        pub entity_type_id: std::string::String,
42655
42656        /// Required. Selectors choosing which Feature values to read from the
42657        /// EntityType.
42658        pub feature_selector: std::option::Option<crate::model::FeatureSelector>,
42659
42660        /// Per-Feature settings for the batch read.
42661        pub settings: std::vec::Vec<crate::model::DestinationFeatureSetting>,
42662
42663        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42664    }
42665
42666    #[cfg(feature = "featurestore-service")]
42667    impl EntityTypeSpec {
42668        pub fn new() -> Self {
42669            std::default::Default::default()
42670        }
42671
42672        /// Sets the value of [entity_type_id][crate::model::batch_read_feature_values_request::EntityTypeSpec::entity_type_id].
42673        pub fn set_entity_type_id<T: std::convert::Into<std::string::String>>(
42674            mut self,
42675            v: T,
42676        ) -> Self {
42677            self.entity_type_id = v.into();
42678            self
42679        }
42680
42681        /// Sets the value of [feature_selector][crate::model::batch_read_feature_values_request::EntityTypeSpec::feature_selector].
42682        pub fn set_feature_selector<T>(mut self, v: T) -> Self
42683        where
42684            T: std::convert::Into<crate::model::FeatureSelector>,
42685        {
42686            self.feature_selector = std::option::Option::Some(v.into());
42687            self
42688        }
42689
42690        /// Sets or clears the value of [feature_selector][crate::model::batch_read_feature_values_request::EntityTypeSpec::feature_selector].
42691        pub fn set_or_clear_feature_selector<T>(mut self, v: std::option::Option<T>) -> Self
42692        where
42693            T: std::convert::Into<crate::model::FeatureSelector>,
42694        {
42695            self.feature_selector = v.map(|x| x.into());
42696            self
42697        }
42698
42699        /// Sets the value of [settings][crate::model::batch_read_feature_values_request::EntityTypeSpec::settings].
42700        pub fn set_settings<T, V>(mut self, v: T) -> Self
42701        where
42702            T: std::iter::IntoIterator<Item = V>,
42703            V: std::convert::Into<crate::model::DestinationFeatureSetting>,
42704        {
42705            use std::iter::Iterator;
42706            self.settings = v.into_iter().map(|i| i.into()).collect();
42707            self
42708        }
42709    }
42710
42711    #[cfg(feature = "featurestore-service")]
42712    impl wkt::message::Message for EntityTypeSpec {
42713        fn typename() -> &'static str {
42714            "type.googleapis.com/google.cloud.aiplatform.v1.BatchReadFeatureValuesRequest.EntityTypeSpec"
42715        }
42716    }
42717
42718    #[cfg(feature = "featurestore-service")]
42719    #[derive(Clone, Debug, PartialEq)]
42720    #[non_exhaustive]
42721    pub enum ReadOption {
42722        /// Each read instance consists of exactly one read timestamp and one or more
42723        /// entity IDs identifying entities of the corresponding EntityTypes whose
42724        /// Features are requested.
42725        ///
42726        /// Each output instance contains Feature values of requested entities
42727        /// concatenated together as of the read time.
42728        ///
42729        /// An example read instance may be `foo_entity_id, bar_entity_id,
42730        /// 2020-01-01T10:00:00.123Z`.
42731        ///
42732        /// An example output instance may be `foo_entity_id, bar_entity_id,
42733        /// 2020-01-01T10:00:00.123Z, foo_entity_feature1_value,
42734        /// bar_entity_feature2_value`.
42735        ///
42736        /// Timestamp in each read instance must be millisecond-aligned.
42737        ///
42738        /// `csv_read_instances` are read instances stored in a plain-text CSV file.
42739        /// The header should be:
42740        /// [ENTITY_TYPE_ID1], [ENTITY_TYPE_ID2], ..., timestamp
42741        ///
42742        /// The columns can be in any order.
42743        ///
42744        /// Values in the timestamp column must use the RFC 3339 format, e.g.
42745        /// `2012-07-30T10:43:17.123Z`.
42746        CsvReadInstances(std::boxed::Box<crate::model::CsvSource>),
42747        /// Similar to csv_read_instances, but from BigQuery source.
42748        BigqueryReadInstances(std::boxed::Box<crate::model::BigQuerySource>),
42749    }
42750}
42751
42752/// Request message for
42753/// [FeaturestoreService.ExportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ExportFeatureValues].
42754///
42755/// [google.cloud.aiplatform.v1.FeaturestoreService.ExportFeatureValues]: crate::client::FeaturestoreService::export_feature_values
42756#[cfg(feature = "featurestore-service")]
42757#[derive(Clone, Default, PartialEq)]
42758#[non_exhaustive]
42759pub struct ExportFeatureValuesRequest {
42760    /// Required. The resource name of the EntityType from which to export Feature
42761    /// values. Format:
42762    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
42763    pub entity_type: std::string::String,
42764
42765    /// Required. Specifies destination location and format.
42766    pub destination: std::option::Option<crate::model::FeatureValueDestination>,
42767
42768    /// Required. Selects Features to export values of.
42769    pub feature_selector: std::option::Option<crate::model::FeatureSelector>,
42770
42771    /// Per-Feature export settings.
42772    pub settings: std::vec::Vec<crate::model::DestinationFeatureSetting>,
42773
42774    /// Required. The mode in which Feature values are exported.
42775    pub mode: std::option::Option<crate::model::export_feature_values_request::Mode>,
42776
42777    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42778}
42779
42780#[cfg(feature = "featurestore-service")]
42781impl ExportFeatureValuesRequest {
42782    pub fn new() -> Self {
42783        std::default::Default::default()
42784    }
42785
42786    /// Sets the value of [entity_type][crate::model::ExportFeatureValuesRequest::entity_type].
42787    pub fn set_entity_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
42788        self.entity_type = v.into();
42789        self
42790    }
42791
42792    /// Sets the value of [destination][crate::model::ExportFeatureValuesRequest::destination].
42793    pub fn set_destination<T>(mut self, v: T) -> Self
42794    where
42795        T: std::convert::Into<crate::model::FeatureValueDestination>,
42796    {
42797        self.destination = std::option::Option::Some(v.into());
42798        self
42799    }
42800
42801    /// Sets or clears the value of [destination][crate::model::ExportFeatureValuesRequest::destination].
42802    pub fn set_or_clear_destination<T>(mut self, v: std::option::Option<T>) -> Self
42803    where
42804        T: std::convert::Into<crate::model::FeatureValueDestination>,
42805    {
42806        self.destination = v.map(|x| x.into());
42807        self
42808    }
42809
42810    /// Sets the value of [feature_selector][crate::model::ExportFeatureValuesRequest::feature_selector].
42811    pub fn set_feature_selector<T>(mut self, v: T) -> Self
42812    where
42813        T: std::convert::Into<crate::model::FeatureSelector>,
42814    {
42815        self.feature_selector = std::option::Option::Some(v.into());
42816        self
42817    }
42818
42819    /// Sets or clears the value of [feature_selector][crate::model::ExportFeatureValuesRequest::feature_selector].
42820    pub fn set_or_clear_feature_selector<T>(mut self, v: std::option::Option<T>) -> Self
42821    where
42822        T: std::convert::Into<crate::model::FeatureSelector>,
42823    {
42824        self.feature_selector = v.map(|x| x.into());
42825        self
42826    }
42827
42828    /// Sets the value of [settings][crate::model::ExportFeatureValuesRequest::settings].
42829    pub fn set_settings<T, V>(mut self, v: T) -> Self
42830    where
42831        T: std::iter::IntoIterator<Item = V>,
42832        V: std::convert::Into<crate::model::DestinationFeatureSetting>,
42833    {
42834        use std::iter::Iterator;
42835        self.settings = v.into_iter().map(|i| i.into()).collect();
42836        self
42837    }
42838
42839    /// Sets the value of [mode][crate::model::ExportFeatureValuesRequest::mode].
42840    ///
42841    /// Note that all the setters affecting `mode` are mutually
42842    /// exclusive.
42843    pub fn set_mode<
42844        T: std::convert::Into<std::option::Option<crate::model::export_feature_values_request::Mode>>,
42845    >(
42846        mut self,
42847        v: T,
42848    ) -> Self {
42849        self.mode = v.into();
42850        self
42851    }
42852
42853    /// The value of [mode][crate::model::ExportFeatureValuesRequest::mode]
42854    /// if it holds a `SnapshotExport`, `None` if the field is not set or
42855    /// holds a different branch.
42856    pub fn snapshot_export(
42857        &self,
42858    ) -> std::option::Option<
42859        &std::boxed::Box<crate::model::export_feature_values_request::SnapshotExport>,
42860    > {
42861        #[allow(unreachable_patterns)]
42862        self.mode.as_ref().and_then(|v| match v {
42863            crate::model::export_feature_values_request::Mode::SnapshotExport(v) => {
42864                std::option::Option::Some(v)
42865            }
42866            _ => std::option::Option::None,
42867        })
42868    }
42869
42870    /// Sets the value of [mode][crate::model::ExportFeatureValuesRequest::mode]
42871    /// to hold a `SnapshotExport`.
42872    ///
42873    /// Note that all the setters affecting `mode` are
42874    /// mutually exclusive.
42875    pub fn set_snapshot_export<
42876        T: std::convert::Into<
42877                std::boxed::Box<crate::model::export_feature_values_request::SnapshotExport>,
42878            >,
42879    >(
42880        mut self,
42881        v: T,
42882    ) -> Self {
42883        self.mode = std::option::Option::Some(
42884            crate::model::export_feature_values_request::Mode::SnapshotExport(v.into()),
42885        );
42886        self
42887    }
42888
42889    /// The value of [mode][crate::model::ExportFeatureValuesRequest::mode]
42890    /// if it holds a `FullExport`, `None` if the field is not set or
42891    /// holds a different branch.
42892    pub fn full_export(
42893        &self,
42894    ) -> std::option::Option<
42895        &std::boxed::Box<crate::model::export_feature_values_request::FullExport>,
42896    > {
42897        #[allow(unreachable_patterns)]
42898        self.mode.as_ref().and_then(|v| match v {
42899            crate::model::export_feature_values_request::Mode::FullExport(v) => {
42900                std::option::Option::Some(v)
42901            }
42902            _ => std::option::Option::None,
42903        })
42904    }
42905
42906    /// Sets the value of [mode][crate::model::ExportFeatureValuesRequest::mode]
42907    /// to hold a `FullExport`.
42908    ///
42909    /// Note that all the setters affecting `mode` are
42910    /// mutually exclusive.
42911    pub fn set_full_export<
42912        T: std::convert::Into<
42913                std::boxed::Box<crate::model::export_feature_values_request::FullExport>,
42914            >,
42915    >(
42916        mut self,
42917        v: T,
42918    ) -> Self {
42919        self.mode = std::option::Option::Some(
42920            crate::model::export_feature_values_request::Mode::FullExport(v.into()),
42921        );
42922        self
42923    }
42924}
42925
42926#[cfg(feature = "featurestore-service")]
42927impl wkt::message::Message for ExportFeatureValuesRequest {
42928    fn typename() -> &'static str {
42929        "type.googleapis.com/google.cloud.aiplatform.v1.ExportFeatureValuesRequest"
42930    }
42931}
42932
42933/// Defines additional types related to [ExportFeatureValuesRequest].
42934#[cfg(feature = "featurestore-service")]
42935pub mod export_feature_values_request {
42936    #[allow(unused_imports)]
42937    use super::*;
42938
42939    /// Describes exporting the latest Feature values of all entities of the
42940    /// EntityType between [start_time, snapshot_time].
42941    #[cfg(feature = "featurestore-service")]
42942    #[derive(Clone, Default, PartialEq)]
42943    #[non_exhaustive]
42944    pub struct SnapshotExport {
42945        /// Exports Feature values as of this timestamp. If not set,
42946        /// retrieve values as of now. Timestamp, if present, must not have higher
42947        /// than millisecond precision.
42948        pub snapshot_time: std::option::Option<wkt::Timestamp>,
42949
42950        /// Excludes Feature values with feature generation timestamp before this
42951        /// timestamp. If not set, retrieve oldest values kept in Feature Store.
42952        /// Timestamp, if present, must not have higher than millisecond precision.
42953        pub start_time: std::option::Option<wkt::Timestamp>,
42954
42955        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
42956    }
42957
42958    #[cfg(feature = "featurestore-service")]
42959    impl SnapshotExport {
42960        pub fn new() -> Self {
42961            std::default::Default::default()
42962        }
42963
42964        /// Sets the value of [snapshot_time][crate::model::export_feature_values_request::SnapshotExport::snapshot_time].
42965        pub fn set_snapshot_time<T>(mut self, v: T) -> Self
42966        where
42967            T: std::convert::Into<wkt::Timestamp>,
42968        {
42969            self.snapshot_time = std::option::Option::Some(v.into());
42970            self
42971        }
42972
42973        /// Sets or clears the value of [snapshot_time][crate::model::export_feature_values_request::SnapshotExport::snapshot_time].
42974        pub fn set_or_clear_snapshot_time<T>(mut self, v: std::option::Option<T>) -> Self
42975        where
42976            T: std::convert::Into<wkt::Timestamp>,
42977        {
42978            self.snapshot_time = v.map(|x| x.into());
42979            self
42980        }
42981
42982        /// Sets the value of [start_time][crate::model::export_feature_values_request::SnapshotExport::start_time].
42983        pub fn set_start_time<T>(mut self, v: T) -> Self
42984        where
42985            T: std::convert::Into<wkt::Timestamp>,
42986        {
42987            self.start_time = std::option::Option::Some(v.into());
42988            self
42989        }
42990
42991        /// Sets or clears the value of [start_time][crate::model::export_feature_values_request::SnapshotExport::start_time].
42992        pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
42993        where
42994            T: std::convert::Into<wkt::Timestamp>,
42995        {
42996            self.start_time = v.map(|x| x.into());
42997            self
42998        }
42999    }
43000
43001    #[cfg(feature = "featurestore-service")]
43002    impl wkt::message::Message for SnapshotExport {
43003        fn typename() -> &'static str {
43004            "type.googleapis.com/google.cloud.aiplatform.v1.ExportFeatureValuesRequest.SnapshotExport"
43005        }
43006    }
43007
43008    /// Describes exporting all historical Feature values of all entities of the
43009    /// EntityType between [start_time, end_time].
43010    #[cfg(feature = "featurestore-service")]
43011    #[derive(Clone, Default, PartialEq)]
43012    #[non_exhaustive]
43013    pub struct FullExport {
43014        /// Excludes Feature values with feature generation timestamp before this
43015        /// timestamp. If not set, retrieve oldest values kept in Feature Store.
43016        /// Timestamp, if present, must not have higher than millisecond precision.
43017        pub start_time: std::option::Option<wkt::Timestamp>,
43018
43019        /// Exports Feature values as of this timestamp. If not set,
43020        /// retrieve values as of now. Timestamp, if present, must not have higher
43021        /// than millisecond precision.
43022        pub end_time: std::option::Option<wkt::Timestamp>,
43023
43024        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43025    }
43026
43027    #[cfg(feature = "featurestore-service")]
43028    impl FullExport {
43029        pub fn new() -> Self {
43030            std::default::Default::default()
43031        }
43032
43033        /// Sets the value of [start_time][crate::model::export_feature_values_request::FullExport::start_time].
43034        pub fn set_start_time<T>(mut self, v: T) -> Self
43035        where
43036            T: std::convert::Into<wkt::Timestamp>,
43037        {
43038            self.start_time = std::option::Option::Some(v.into());
43039            self
43040        }
43041
43042        /// Sets or clears the value of [start_time][crate::model::export_feature_values_request::FullExport::start_time].
43043        pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
43044        where
43045            T: std::convert::Into<wkt::Timestamp>,
43046        {
43047            self.start_time = v.map(|x| x.into());
43048            self
43049        }
43050
43051        /// Sets the value of [end_time][crate::model::export_feature_values_request::FullExport::end_time].
43052        pub fn set_end_time<T>(mut self, v: T) -> Self
43053        where
43054            T: std::convert::Into<wkt::Timestamp>,
43055        {
43056            self.end_time = std::option::Option::Some(v.into());
43057            self
43058        }
43059
43060        /// Sets or clears the value of [end_time][crate::model::export_feature_values_request::FullExport::end_time].
43061        pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
43062        where
43063            T: std::convert::Into<wkt::Timestamp>,
43064        {
43065            self.end_time = v.map(|x| x.into());
43066            self
43067        }
43068    }
43069
43070    #[cfg(feature = "featurestore-service")]
43071    impl wkt::message::Message for FullExport {
43072        fn typename() -> &'static str {
43073            "type.googleapis.com/google.cloud.aiplatform.v1.ExportFeatureValuesRequest.FullExport"
43074        }
43075    }
43076
43077    /// Required. The mode in which Feature values are exported.
43078    #[cfg(feature = "featurestore-service")]
43079    #[derive(Clone, Debug, PartialEq)]
43080    #[non_exhaustive]
43081    pub enum Mode {
43082        /// Exports the latest Feature values of all entities of the EntityType
43083        /// within a time range.
43084        SnapshotExport(
43085            std::boxed::Box<crate::model::export_feature_values_request::SnapshotExport>,
43086        ),
43087        /// Exports all historical values of all entities of the EntityType within a
43088        /// time range
43089        FullExport(std::boxed::Box<crate::model::export_feature_values_request::FullExport>),
43090    }
43091}
43092
43093#[cfg(feature = "featurestore-service")]
43094#[derive(Clone, Default, PartialEq)]
43095#[non_exhaustive]
43096pub struct DestinationFeatureSetting {
43097    /// Required. The ID of the Feature to apply the setting to.
43098    pub feature_id: std::string::String,
43099
43100    /// Specify the field name in the export destination. If not specified,
43101    /// Feature ID is used.
43102    pub destination_field: std::string::String,
43103
43104    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43105}
43106
43107#[cfg(feature = "featurestore-service")]
43108impl DestinationFeatureSetting {
43109    pub fn new() -> Self {
43110        std::default::Default::default()
43111    }
43112
43113    /// Sets the value of [feature_id][crate::model::DestinationFeatureSetting::feature_id].
43114    pub fn set_feature_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43115        self.feature_id = v.into();
43116        self
43117    }
43118
43119    /// Sets the value of [destination_field][crate::model::DestinationFeatureSetting::destination_field].
43120    pub fn set_destination_field<T: std::convert::Into<std::string::String>>(
43121        mut self,
43122        v: T,
43123    ) -> Self {
43124        self.destination_field = v.into();
43125        self
43126    }
43127}
43128
43129#[cfg(feature = "featurestore-service")]
43130impl wkt::message::Message for DestinationFeatureSetting {
43131    fn typename() -> &'static str {
43132        "type.googleapis.com/google.cloud.aiplatform.v1.DestinationFeatureSetting"
43133    }
43134}
43135
43136/// A destination location for Feature values and format.
43137#[cfg(feature = "featurestore-service")]
43138#[derive(Clone, Default, PartialEq)]
43139#[non_exhaustive]
43140pub struct FeatureValueDestination {
43141    pub destination: std::option::Option<crate::model::feature_value_destination::Destination>,
43142
43143    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43144}
43145
43146#[cfg(feature = "featurestore-service")]
43147impl FeatureValueDestination {
43148    pub fn new() -> Self {
43149        std::default::Default::default()
43150    }
43151
43152    /// Sets the value of [destination][crate::model::FeatureValueDestination::destination].
43153    ///
43154    /// Note that all the setters affecting `destination` are mutually
43155    /// exclusive.
43156    pub fn set_destination<
43157        T: std::convert::Into<
43158                std::option::Option<crate::model::feature_value_destination::Destination>,
43159            >,
43160    >(
43161        mut self,
43162        v: T,
43163    ) -> Self {
43164        self.destination = v.into();
43165        self
43166    }
43167
43168    /// The value of [destination][crate::model::FeatureValueDestination::destination]
43169    /// if it holds a `BigqueryDestination`, `None` if the field is not set or
43170    /// holds a different branch.
43171    pub fn bigquery_destination(
43172        &self,
43173    ) -> std::option::Option<&std::boxed::Box<crate::model::BigQueryDestination>> {
43174        #[allow(unreachable_patterns)]
43175        self.destination.as_ref().and_then(|v| match v {
43176            crate::model::feature_value_destination::Destination::BigqueryDestination(v) => {
43177                std::option::Option::Some(v)
43178            }
43179            _ => std::option::Option::None,
43180        })
43181    }
43182
43183    /// Sets the value of [destination][crate::model::FeatureValueDestination::destination]
43184    /// to hold a `BigqueryDestination`.
43185    ///
43186    /// Note that all the setters affecting `destination` are
43187    /// mutually exclusive.
43188    pub fn set_bigquery_destination<
43189        T: std::convert::Into<std::boxed::Box<crate::model::BigQueryDestination>>,
43190    >(
43191        mut self,
43192        v: T,
43193    ) -> Self {
43194        self.destination = std::option::Option::Some(
43195            crate::model::feature_value_destination::Destination::BigqueryDestination(v.into()),
43196        );
43197        self
43198    }
43199
43200    /// The value of [destination][crate::model::FeatureValueDestination::destination]
43201    /// if it holds a `TfrecordDestination`, `None` if the field is not set or
43202    /// holds a different branch.
43203    pub fn tfrecord_destination(
43204        &self,
43205    ) -> std::option::Option<&std::boxed::Box<crate::model::TFRecordDestination>> {
43206        #[allow(unreachable_patterns)]
43207        self.destination.as_ref().and_then(|v| match v {
43208            crate::model::feature_value_destination::Destination::TfrecordDestination(v) => {
43209                std::option::Option::Some(v)
43210            }
43211            _ => std::option::Option::None,
43212        })
43213    }
43214
43215    /// Sets the value of [destination][crate::model::FeatureValueDestination::destination]
43216    /// to hold a `TfrecordDestination`.
43217    ///
43218    /// Note that all the setters affecting `destination` are
43219    /// mutually exclusive.
43220    pub fn set_tfrecord_destination<
43221        T: std::convert::Into<std::boxed::Box<crate::model::TFRecordDestination>>,
43222    >(
43223        mut self,
43224        v: T,
43225    ) -> Self {
43226        self.destination = std::option::Option::Some(
43227            crate::model::feature_value_destination::Destination::TfrecordDestination(v.into()),
43228        );
43229        self
43230    }
43231
43232    /// The value of [destination][crate::model::FeatureValueDestination::destination]
43233    /// if it holds a `CsvDestination`, `None` if the field is not set or
43234    /// holds a different branch.
43235    pub fn csv_destination(
43236        &self,
43237    ) -> std::option::Option<&std::boxed::Box<crate::model::CsvDestination>> {
43238        #[allow(unreachable_patterns)]
43239        self.destination.as_ref().and_then(|v| match v {
43240            crate::model::feature_value_destination::Destination::CsvDestination(v) => {
43241                std::option::Option::Some(v)
43242            }
43243            _ => std::option::Option::None,
43244        })
43245    }
43246
43247    /// Sets the value of [destination][crate::model::FeatureValueDestination::destination]
43248    /// to hold a `CsvDestination`.
43249    ///
43250    /// Note that all the setters affecting `destination` are
43251    /// mutually exclusive.
43252    pub fn set_csv_destination<
43253        T: std::convert::Into<std::boxed::Box<crate::model::CsvDestination>>,
43254    >(
43255        mut self,
43256        v: T,
43257    ) -> Self {
43258        self.destination = std::option::Option::Some(
43259            crate::model::feature_value_destination::Destination::CsvDestination(v.into()),
43260        );
43261        self
43262    }
43263}
43264
43265#[cfg(feature = "featurestore-service")]
43266impl wkt::message::Message for FeatureValueDestination {
43267    fn typename() -> &'static str {
43268        "type.googleapis.com/google.cloud.aiplatform.v1.FeatureValueDestination"
43269    }
43270}
43271
43272/// Defines additional types related to [FeatureValueDestination].
43273#[cfg(feature = "featurestore-service")]
43274pub mod feature_value_destination {
43275    #[allow(unused_imports)]
43276    use super::*;
43277
43278    #[cfg(feature = "featurestore-service")]
43279    #[derive(Clone, Debug, PartialEq)]
43280    #[non_exhaustive]
43281    pub enum Destination {
43282        /// Output in BigQuery format.
43283        /// [BigQueryDestination.output_uri][google.cloud.aiplatform.v1.BigQueryDestination.output_uri]
43284        /// in
43285        /// [FeatureValueDestination.bigquery_destination][google.cloud.aiplatform.v1.FeatureValueDestination.bigquery_destination]
43286        /// must refer to a table.
43287        ///
43288        /// [google.cloud.aiplatform.v1.BigQueryDestination.output_uri]: crate::model::BigQueryDestination::output_uri
43289        /// [google.cloud.aiplatform.v1.FeatureValueDestination.bigquery_destination]: crate::model::FeatureValueDestination::destination
43290        BigqueryDestination(std::boxed::Box<crate::model::BigQueryDestination>),
43291        /// Output in TFRecord format.
43292        ///
43293        /// Below are the mapping from Feature value type
43294        /// in Featurestore to Feature value type in TFRecord:
43295        ///
43296        /// ```norust
43297        /// Value type in Featurestore                 | Value type in TFRecord
43298        /// DOUBLE, DOUBLE_ARRAY                       | FLOAT_LIST
43299        /// INT64, INT64_ARRAY                         | INT64_LIST
43300        /// STRING, STRING_ARRAY, BYTES                | BYTES_LIST
43301        /// true -> byte_string("true"), false -> byte_string("false")
43302        /// BOOL, BOOL_ARRAY (true, false)             | BYTES_LIST
43303        /// ```
43304        TfrecordDestination(std::boxed::Box<crate::model::TFRecordDestination>),
43305        /// Output in CSV format. Array Feature value types are not allowed in CSV
43306        /// format.
43307        CsvDestination(std::boxed::Box<crate::model::CsvDestination>),
43308    }
43309}
43310
43311/// Response message for
43312/// [FeaturestoreService.ExportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ExportFeatureValues].
43313///
43314/// [google.cloud.aiplatform.v1.FeaturestoreService.ExportFeatureValues]: crate::client::FeaturestoreService::export_feature_values
43315#[cfg(feature = "featurestore-service")]
43316#[derive(Clone, Default, PartialEq)]
43317#[non_exhaustive]
43318pub struct ExportFeatureValuesResponse {
43319    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43320}
43321
43322#[cfg(feature = "featurestore-service")]
43323impl ExportFeatureValuesResponse {
43324    pub fn new() -> Self {
43325        std::default::Default::default()
43326    }
43327}
43328
43329#[cfg(feature = "featurestore-service")]
43330impl wkt::message::Message for ExportFeatureValuesResponse {
43331    fn typename() -> &'static str {
43332        "type.googleapis.com/google.cloud.aiplatform.v1.ExportFeatureValuesResponse"
43333    }
43334}
43335
43336/// Response message for
43337/// [FeaturestoreService.BatchReadFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.BatchReadFeatureValues].
43338///
43339/// [google.cloud.aiplatform.v1.FeaturestoreService.BatchReadFeatureValues]: crate::client::FeaturestoreService::batch_read_feature_values
43340#[cfg(feature = "featurestore-service")]
43341#[derive(Clone, Default, PartialEq)]
43342#[non_exhaustive]
43343pub struct BatchReadFeatureValuesResponse {
43344    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43345}
43346
43347#[cfg(feature = "featurestore-service")]
43348impl BatchReadFeatureValuesResponse {
43349    pub fn new() -> Self {
43350        std::default::Default::default()
43351    }
43352}
43353
43354#[cfg(feature = "featurestore-service")]
43355impl wkt::message::Message for BatchReadFeatureValuesResponse {
43356    fn typename() -> &'static str {
43357        "type.googleapis.com/google.cloud.aiplatform.v1.BatchReadFeatureValuesResponse"
43358    }
43359}
43360
43361/// Request message for
43362/// [FeaturestoreService.CreateEntityType][google.cloud.aiplatform.v1.FeaturestoreService.CreateEntityType].
43363///
43364/// [google.cloud.aiplatform.v1.FeaturestoreService.CreateEntityType]: crate::client::FeaturestoreService::create_entity_type
43365#[cfg(feature = "featurestore-service")]
43366#[derive(Clone, Default, PartialEq)]
43367#[non_exhaustive]
43368pub struct CreateEntityTypeRequest {
43369    /// Required. The resource name of the Featurestore to create EntityTypes.
43370    /// Format:
43371    /// `projects/{project}/locations/{location}/featurestores/{featurestore}`
43372    pub parent: std::string::String,
43373
43374    /// The EntityType to create.
43375    pub entity_type: std::option::Option<crate::model::EntityType>,
43376
43377    /// Required. The ID to use for the EntityType, which will become the final
43378    /// component of the EntityType's resource name.
43379    ///
43380    /// This value may be up to 60 characters, and valid characters are
43381    /// `[a-z0-9_]`. The first character cannot be a number.
43382    ///
43383    /// The value must be unique within a featurestore.
43384    pub entity_type_id: std::string::String,
43385
43386    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43387}
43388
43389#[cfg(feature = "featurestore-service")]
43390impl CreateEntityTypeRequest {
43391    pub fn new() -> Self {
43392        std::default::Default::default()
43393    }
43394
43395    /// Sets the value of [parent][crate::model::CreateEntityTypeRequest::parent].
43396    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43397        self.parent = v.into();
43398        self
43399    }
43400
43401    /// Sets the value of [entity_type][crate::model::CreateEntityTypeRequest::entity_type].
43402    pub fn set_entity_type<T>(mut self, v: T) -> Self
43403    where
43404        T: std::convert::Into<crate::model::EntityType>,
43405    {
43406        self.entity_type = std::option::Option::Some(v.into());
43407        self
43408    }
43409
43410    /// Sets or clears the value of [entity_type][crate::model::CreateEntityTypeRequest::entity_type].
43411    pub fn set_or_clear_entity_type<T>(mut self, v: std::option::Option<T>) -> Self
43412    where
43413        T: std::convert::Into<crate::model::EntityType>,
43414    {
43415        self.entity_type = v.map(|x| x.into());
43416        self
43417    }
43418
43419    /// Sets the value of [entity_type_id][crate::model::CreateEntityTypeRequest::entity_type_id].
43420    pub fn set_entity_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43421        self.entity_type_id = v.into();
43422        self
43423    }
43424}
43425
43426#[cfg(feature = "featurestore-service")]
43427impl wkt::message::Message for CreateEntityTypeRequest {
43428    fn typename() -> &'static str {
43429        "type.googleapis.com/google.cloud.aiplatform.v1.CreateEntityTypeRequest"
43430    }
43431}
43432
43433/// Request message for
43434/// [FeaturestoreService.GetEntityType][google.cloud.aiplatform.v1.FeaturestoreService.GetEntityType].
43435///
43436/// [google.cloud.aiplatform.v1.FeaturestoreService.GetEntityType]: crate::client::FeaturestoreService::get_entity_type
43437#[cfg(feature = "featurestore-service")]
43438#[derive(Clone, Default, PartialEq)]
43439#[non_exhaustive]
43440pub struct GetEntityTypeRequest {
43441    /// Required. The name of the EntityType resource.
43442    /// Format:
43443    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
43444    pub name: std::string::String,
43445
43446    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43447}
43448
43449#[cfg(feature = "featurestore-service")]
43450impl GetEntityTypeRequest {
43451    pub fn new() -> Self {
43452        std::default::Default::default()
43453    }
43454
43455    /// Sets the value of [name][crate::model::GetEntityTypeRequest::name].
43456    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43457        self.name = v.into();
43458        self
43459    }
43460}
43461
43462#[cfg(feature = "featurestore-service")]
43463impl wkt::message::Message for GetEntityTypeRequest {
43464    fn typename() -> &'static str {
43465        "type.googleapis.com/google.cloud.aiplatform.v1.GetEntityTypeRequest"
43466    }
43467}
43468
43469/// Request message for
43470/// [FeaturestoreService.ListEntityTypes][google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes].
43471///
43472/// [google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes]: crate::client::FeaturestoreService::list_entity_types
43473#[cfg(feature = "featurestore-service")]
43474#[derive(Clone, Default, PartialEq)]
43475#[non_exhaustive]
43476pub struct ListEntityTypesRequest {
43477    /// Required. The resource name of the Featurestore to list EntityTypes.
43478    /// Format:
43479    /// `projects/{project}/locations/{location}/featurestores/{featurestore}`
43480    pub parent: std::string::String,
43481
43482    /// Lists the EntityTypes that match the filter expression. The following
43483    /// filters are supported:
43484    ///
43485    /// * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
43486    ///   Values must be in RFC 3339 format.
43487    /// * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons.
43488    ///   Values must be in RFC 3339 format.
43489    /// * `labels`: Supports key-value equality as well as key presence.
43490    ///
43491    /// Examples:
43492    ///
43493    /// * `create_time > \"2020-01-31T15:30:00.000000Z\" OR
43494    ///   update_time > \"2020-01-31T15:30:00.000000Z\"` --> EntityTypes created
43495    ///   or updated after 2020-01-31T15:30:00.000000Z.
43496    /// * `labels.active = yes AND labels.env = prod` --> EntityTypes having both
43497    ///   (active: yes) and (env: prod) labels.
43498    /// * `labels.env: *` --> Any EntityType which has a label with 'env' as the
43499    ///   key.
43500    pub filter: std::string::String,
43501
43502    /// The maximum number of EntityTypes to return. The service may return fewer
43503    /// than this value. If unspecified, at most 1000 EntityTypes will be returned.
43504    /// The maximum value is 1000; any value greater than 1000 will be coerced to
43505    /// 1000.
43506    pub page_size: i32,
43507
43508    /// A page token, received from a previous
43509    /// [FeaturestoreService.ListEntityTypes][google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes]
43510    /// call. Provide this to retrieve the subsequent page.
43511    ///
43512    /// When paginating, all other parameters provided to
43513    /// [FeaturestoreService.ListEntityTypes][google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes]
43514    /// must match the call that provided the page token.
43515    ///
43516    /// [google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes]: crate::client::FeaturestoreService::list_entity_types
43517    pub page_token: std::string::String,
43518
43519    /// A comma-separated list of fields to order by, sorted in ascending order.
43520    /// Use "desc" after a field name for descending.
43521    ///
43522    /// Supported fields:
43523    ///
43524    /// * `entity_type_id`
43525    /// * `create_time`
43526    /// * `update_time`
43527    pub order_by: std::string::String,
43528
43529    /// Mask specifying which fields to read.
43530    pub read_mask: std::option::Option<wkt::FieldMask>,
43531
43532    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43533}
43534
43535#[cfg(feature = "featurestore-service")]
43536impl ListEntityTypesRequest {
43537    pub fn new() -> Self {
43538        std::default::Default::default()
43539    }
43540
43541    /// Sets the value of [parent][crate::model::ListEntityTypesRequest::parent].
43542    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43543        self.parent = v.into();
43544        self
43545    }
43546
43547    /// Sets the value of [filter][crate::model::ListEntityTypesRequest::filter].
43548    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43549        self.filter = v.into();
43550        self
43551    }
43552
43553    /// Sets the value of [page_size][crate::model::ListEntityTypesRequest::page_size].
43554    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
43555        self.page_size = v.into();
43556        self
43557    }
43558
43559    /// Sets the value of [page_token][crate::model::ListEntityTypesRequest::page_token].
43560    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43561        self.page_token = v.into();
43562        self
43563    }
43564
43565    /// Sets the value of [order_by][crate::model::ListEntityTypesRequest::order_by].
43566    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43567        self.order_by = v.into();
43568        self
43569    }
43570
43571    /// Sets the value of [read_mask][crate::model::ListEntityTypesRequest::read_mask].
43572    pub fn set_read_mask<T>(mut self, v: T) -> Self
43573    where
43574        T: std::convert::Into<wkt::FieldMask>,
43575    {
43576        self.read_mask = std::option::Option::Some(v.into());
43577        self
43578    }
43579
43580    /// Sets or clears the value of [read_mask][crate::model::ListEntityTypesRequest::read_mask].
43581    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
43582    where
43583        T: std::convert::Into<wkt::FieldMask>,
43584    {
43585        self.read_mask = v.map(|x| x.into());
43586        self
43587    }
43588}
43589
43590#[cfg(feature = "featurestore-service")]
43591impl wkt::message::Message for ListEntityTypesRequest {
43592    fn typename() -> &'static str {
43593        "type.googleapis.com/google.cloud.aiplatform.v1.ListEntityTypesRequest"
43594    }
43595}
43596
43597/// Response message for
43598/// [FeaturestoreService.ListEntityTypes][google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes].
43599///
43600/// [google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes]: crate::client::FeaturestoreService::list_entity_types
43601#[cfg(feature = "featurestore-service")]
43602#[derive(Clone, Default, PartialEq)]
43603#[non_exhaustive]
43604pub struct ListEntityTypesResponse {
43605    /// The EntityTypes matching the request.
43606    pub entity_types: std::vec::Vec<crate::model::EntityType>,
43607
43608    /// A token, which can be sent as
43609    /// [ListEntityTypesRequest.page_token][google.cloud.aiplatform.v1.ListEntityTypesRequest.page_token]
43610    /// to retrieve the next page. If this field is omitted, there are no
43611    /// subsequent pages.
43612    ///
43613    /// [google.cloud.aiplatform.v1.ListEntityTypesRequest.page_token]: crate::model::ListEntityTypesRequest::page_token
43614    pub next_page_token: std::string::String,
43615
43616    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43617}
43618
43619#[cfg(feature = "featurestore-service")]
43620impl ListEntityTypesResponse {
43621    pub fn new() -> Self {
43622        std::default::Default::default()
43623    }
43624
43625    /// Sets the value of [entity_types][crate::model::ListEntityTypesResponse::entity_types].
43626    pub fn set_entity_types<T, V>(mut self, v: T) -> Self
43627    where
43628        T: std::iter::IntoIterator<Item = V>,
43629        V: std::convert::Into<crate::model::EntityType>,
43630    {
43631        use std::iter::Iterator;
43632        self.entity_types = v.into_iter().map(|i| i.into()).collect();
43633        self
43634    }
43635
43636    /// Sets the value of [next_page_token][crate::model::ListEntityTypesResponse::next_page_token].
43637    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43638        self.next_page_token = v.into();
43639        self
43640    }
43641}
43642
43643#[cfg(feature = "featurestore-service")]
43644impl wkt::message::Message for ListEntityTypesResponse {
43645    fn typename() -> &'static str {
43646        "type.googleapis.com/google.cloud.aiplatform.v1.ListEntityTypesResponse"
43647    }
43648}
43649
43650#[cfg(feature = "featurestore-service")]
43651#[doc(hidden)]
43652impl gax::paginator::internal::PageableResponse for ListEntityTypesResponse {
43653    type PageItem = crate::model::EntityType;
43654
43655    fn items(self) -> std::vec::Vec<Self::PageItem> {
43656        self.entity_types
43657    }
43658
43659    fn next_page_token(&self) -> std::string::String {
43660        use std::clone::Clone;
43661        self.next_page_token.clone()
43662    }
43663}
43664
43665/// Request message for
43666/// [FeaturestoreService.UpdateEntityType][google.cloud.aiplatform.v1.FeaturestoreService.UpdateEntityType].
43667///
43668/// [google.cloud.aiplatform.v1.FeaturestoreService.UpdateEntityType]: crate::client::FeaturestoreService::update_entity_type
43669#[cfg(feature = "featurestore-service")]
43670#[derive(Clone, Default, PartialEq)]
43671#[non_exhaustive]
43672pub struct UpdateEntityTypeRequest {
43673    /// Required. The EntityType's `name` field is used to identify the EntityType
43674    /// to be updated. Format:
43675    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
43676    pub entity_type: std::option::Option<crate::model::EntityType>,
43677
43678    /// Field mask is used to specify the fields to be overwritten in the
43679    /// EntityType resource by the update.
43680    /// The fields specified in the update_mask are relative to the resource, not
43681    /// the full request. A field will be overwritten if it is in the mask. If the
43682    /// user does not provide a mask then only the non-empty fields present in the
43683    /// request will be overwritten. Set the update_mask to `*` to override all
43684    /// fields.
43685    ///
43686    /// Updatable fields:
43687    ///
43688    /// * `description`
43689    /// * `labels`
43690    /// * `monitoring_config.snapshot_analysis.disabled`
43691    /// * `monitoring_config.snapshot_analysis.monitoring_interval_days`
43692    /// * `monitoring_config.snapshot_analysis.staleness_days`
43693    /// * `monitoring_config.import_features_analysis.state`
43694    /// * `monitoring_config.import_features_analysis.anomaly_detection_baseline`
43695    /// * `monitoring_config.numerical_threshold_config.value`
43696    /// * `monitoring_config.categorical_threshold_config.value`
43697    /// * `offline_storage_ttl_days`
43698    pub update_mask: std::option::Option<wkt::FieldMask>,
43699
43700    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43701}
43702
43703#[cfg(feature = "featurestore-service")]
43704impl UpdateEntityTypeRequest {
43705    pub fn new() -> Self {
43706        std::default::Default::default()
43707    }
43708
43709    /// Sets the value of [entity_type][crate::model::UpdateEntityTypeRequest::entity_type].
43710    pub fn set_entity_type<T>(mut self, v: T) -> Self
43711    where
43712        T: std::convert::Into<crate::model::EntityType>,
43713    {
43714        self.entity_type = std::option::Option::Some(v.into());
43715        self
43716    }
43717
43718    /// Sets or clears the value of [entity_type][crate::model::UpdateEntityTypeRequest::entity_type].
43719    pub fn set_or_clear_entity_type<T>(mut self, v: std::option::Option<T>) -> Self
43720    where
43721        T: std::convert::Into<crate::model::EntityType>,
43722    {
43723        self.entity_type = v.map(|x| x.into());
43724        self
43725    }
43726
43727    /// Sets the value of [update_mask][crate::model::UpdateEntityTypeRequest::update_mask].
43728    pub fn set_update_mask<T>(mut self, v: T) -> Self
43729    where
43730        T: std::convert::Into<wkt::FieldMask>,
43731    {
43732        self.update_mask = std::option::Option::Some(v.into());
43733        self
43734    }
43735
43736    /// Sets or clears the value of [update_mask][crate::model::UpdateEntityTypeRequest::update_mask].
43737    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
43738    where
43739        T: std::convert::Into<wkt::FieldMask>,
43740    {
43741        self.update_mask = v.map(|x| x.into());
43742        self
43743    }
43744}
43745
43746#[cfg(feature = "featurestore-service")]
43747impl wkt::message::Message for UpdateEntityTypeRequest {
43748    fn typename() -> &'static str {
43749        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateEntityTypeRequest"
43750    }
43751}
43752
43753/// Request message for
43754/// [FeaturestoreService.DeleteEntityType][google.cloud.aiplatform.v1.FeaturestoreService.DeleteEntityType].
43755///
43756/// [google.cloud.aiplatform.v1.FeaturestoreService.DeleteEntityType]: crate::client::FeaturestoreService::delete_entity_type
43757#[cfg(feature = "featurestore-service")]
43758#[derive(Clone, Default, PartialEq)]
43759#[non_exhaustive]
43760pub struct DeleteEntityTypeRequest {
43761    /// Required. The name of the EntityType to be deleted.
43762    /// Format:
43763    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
43764    pub name: std::string::String,
43765
43766    /// If set to true, any Features for this EntityType will also be deleted.
43767    /// (Otherwise, the request will only work if the EntityType has no Features.)
43768    pub force: bool,
43769
43770    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43771}
43772
43773#[cfg(feature = "featurestore-service")]
43774impl DeleteEntityTypeRequest {
43775    pub fn new() -> Self {
43776        std::default::Default::default()
43777    }
43778
43779    /// Sets the value of [name][crate::model::DeleteEntityTypeRequest::name].
43780    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43781        self.name = v.into();
43782        self
43783    }
43784
43785    /// Sets the value of [force][crate::model::DeleteEntityTypeRequest::force].
43786    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
43787        self.force = v.into();
43788        self
43789    }
43790}
43791
43792#[cfg(feature = "featurestore-service")]
43793impl wkt::message::Message for DeleteEntityTypeRequest {
43794    fn typename() -> &'static str {
43795        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteEntityTypeRequest"
43796    }
43797}
43798
43799/// Request message for
43800/// [FeaturestoreService.CreateFeature][google.cloud.aiplatform.v1.FeaturestoreService.CreateFeature].
43801/// Request message for
43802/// [FeatureRegistryService.CreateFeature][google.cloud.aiplatform.v1.FeatureRegistryService.CreateFeature].
43803///
43804/// [google.cloud.aiplatform.v1.FeatureRegistryService.CreateFeature]: crate::client::FeatureRegistryService::create_feature
43805/// [google.cloud.aiplatform.v1.FeaturestoreService.CreateFeature]: crate::client::FeaturestoreService::create_feature
43806#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
43807#[derive(Clone, Default, PartialEq)]
43808#[non_exhaustive]
43809pub struct CreateFeatureRequest {
43810    /// Required. The resource name of the EntityType or FeatureGroup to create a
43811    /// Feature. Format for entity_type as parent:
43812    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
43813    /// Format for feature_group as parent:
43814    /// `projects/{project}/locations/{location}/featureGroups/{feature_group}`
43815    pub parent: std::string::String,
43816
43817    /// Required. The Feature to create.
43818    pub feature: std::option::Option<crate::model::Feature>,
43819
43820    /// Required. The ID to use for the Feature, which will become the final
43821    /// component of the Feature's resource name.
43822    ///
43823    /// This value may be up to 128 characters, and valid characters are
43824    /// `[a-z0-9_]`. The first character cannot be a number.
43825    ///
43826    /// The value must be unique within an EntityType/FeatureGroup.
43827    pub feature_id: std::string::String,
43828
43829    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43830}
43831
43832#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
43833impl CreateFeatureRequest {
43834    pub fn new() -> Self {
43835        std::default::Default::default()
43836    }
43837
43838    /// Sets the value of [parent][crate::model::CreateFeatureRequest::parent].
43839    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43840        self.parent = v.into();
43841        self
43842    }
43843
43844    /// Sets the value of [feature][crate::model::CreateFeatureRequest::feature].
43845    pub fn set_feature<T>(mut self, v: T) -> Self
43846    where
43847        T: std::convert::Into<crate::model::Feature>,
43848    {
43849        self.feature = std::option::Option::Some(v.into());
43850        self
43851    }
43852
43853    /// Sets or clears the value of [feature][crate::model::CreateFeatureRequest::feature].
43854    pub fn set_or_clear_feature<T>(mut self, v: std::option::Option<T>) -> Self
43855    where
43856        T: std::convert::Into<crate::model::Feature>,
43857    {
43858        self.feature = v.map(|x| x.into());
43859        self
43860    }
43861
43862    /// Sets the value of [feature_id][crate::model::CreateFeatureRequest::feature_id].
43863    pub fn set_feature_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43864        self.feature_id = v.into();
43865        self
43866    }
43867}
43868
43869#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
43870impl wkt::message::Message for CreateFeatureRequest {
43871    fn typename() -> &'static str {
43872        "type.googleapis.com/google.cloud.aiplatform.v1.CreateFeatureRequest"
43873    }
43874}
43875
43876/// Request message for
43877/// [FeaturestoreService.BatchCreateFeatures][google.cloud.aiplatform.v1.FeaturestoreService.BatchCreateFeatures].
43878/// Request message for
43879/// [FeatureRegistryService.BatchCreateFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.BatchCreateFeatures].
43880///
43881/// [google.cloud.aiplatform.v1.FeatureRegistryService.BatchCreateFeatures]: crate::client::FeatureRegistryService::batch_create_features
43882/// [google.cloud.aiplatform.v1.FeaturestoreService.BatchCreateFeatures]: crate::client::FeaturestoreService::batch_create_features
43883#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
43884#[derive(Clone, Default, PartialEq)]
43885#[non_exhaustive]
43886pub struct BatchCreateFeaturesRequest {
43887    /// Required. The resource name of the EntityType/FeatureGroup to create the
43888    /// batch of Features under. Format:
43889    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
43890    /// `projects/{project}/locations/{location}/featureGroups/{feature_group}`
43891    pub parent: std::string::String,
43892
43893    /// Required. The request message specifying the Features to create. All
43894    /// Features must be created under the same parent EntityType / FeatureGroup.
43895    /// The `parent` field in each child request message can be omitted. If
43896    /// `parent` is set in a child request, then the value must match the `parent`
43897    /// value in this request message.
43898    pub requests: std::vec::Vec<crate::model::CreateFeatureRequest>,
43899
43900    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43901}
43902
43903#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
43904impl BatchCreateFeaturesRequest {
43905    pub fn new() -> Self {
43906        std::default::Default::default()
43907    }
43908
43909    /// Sets the value of [parent][crate::model::BatchCreateFeaturesRequest::parent].
43910    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
43911        self.parent = v.into();
43912        self
43913    }
43914
43915    /// Sets the value of [requests][crate::model::BatchCreateFeaturesRequest::requests].
43916    pub fn set_requests<T, V>(mut self, v: T) -> Self
43917    where
43918        T: std::iter::IntoIterator<Item = V>,
43919        V: std::convert::Into<crate::model::CreateFeatureRequest>,
43920    {
43921        use std::iter::Iterator;
43922        self.requests = v.into_iter().map(|i| i.into()).collect();
43923        self
43924    }
43925}
43926
43927#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
43928impl wkt::message::Message for BatchCreateFeaturesRequest {
43929    fn typename() -> &'static str {
43930        "type.googleapis.com/google.cloud.aiplatform.v1.BatchCreateFeaturesRequest"
43931    }
43932}
43933
43934/// Response message for
43935/// [FeaturestoreService.BatchCreateFeatures][google.cloud.aiplatform.v1.FeaturestoreService.BatchCreateFeatures].
43936///
43937/// [google.cloud.aiplatform.v1.FeaturestoreService.BatchCreateFeatures]: crate::client::FeaturestoreService::batch_create_features
43938#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
43939#[derive(Clone, Default, PartialEq)]
43940#[non_exhaustive]
43941pub struct BatchCreateFeaturesResponse {
43942    /// The Features created.
43943    pub features: std::vec::Vec<crate::model::Feature>,
43944
43945    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43946}
43947
43948#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
43949impl BatchCreateFeaturesResponse {
43950    pub fn new() -> Self {
43951        std::default::Default::default()
43952    }
43953
43954    /// Sets the value of [features][crate::model::BatchCreateFeaturesResponse::features].
43955    pub fn set_features<T, V>(mut self, v: T) -> Self
43956    where
43957        T: std::iter::IntoIterator<Item = V>,
43958        V: std::convert::Into<crate::model::Feature>,
43959    {
43960        use std::iter::Iterator;
43961        self.features = v.into_iter().map(|i| i.into()).collect();
43962        self
43963    }
43964}
43965
43966#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
43967impl wkt::message::Message for BatchCreateFeaturesResponse {
43968    fn typename() -> &'static str {
43969        "type.googleapis.com/google.cloud.aiplatform.v1.BatchCreateFeaturesResponse"
43970    }
43971}
43972
43973/// Request message for
43974/// [FeaturestoreService.GetFeature][google.cloud.aiplatform.v1.FeaturestoreService.GetFeature].
43975/// Request message for
43976/// [FeatureRegistryService.GetFeature][google.cloud.aiplatform.v1.FeatureRegistryService.GetFeature].
43977///
43978/// [google.cloud.aiplatform.v1.FeatureRegistryService.GetFeature]: crate::client::FeatureRegistryService::get_feature
43979/// [google.cloud.aiplatform.v1.FeaturestoreService.GetFeature]: crate::client::FeaturestoreService::get_feature
43980#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
43981#[derive(Clone, Default, PartialEq)]
43982#[non_exhaustive]
43983pub struct GetFeatureRequest {
43984    /// Required. The name of the Feature resource.
43985    /// Format for entity_type as parent:
43986    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
43987    /// Format for feature_group as parent:
43988    /// `projects/{project}/locations/{location}/featureGroups/{feature_group}`
43989    pub name: std::string::String,
43990
43991    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
43992}
43993
43994#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
43995impl GetFeatureRequest {
43996    pub fn new() -> Self {
43997        std::default::Default::default()
43998    }
43999
44000    /// Sets the value of [name][crate::model::GetFeatureRequest::name].
44001    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44002        self.name = v.into();
44003        self
44004    }
44005}
44006
44007#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44008impl wkt::message::Message for GetFeatureRequest {
44009    fn typename() -> &'static str {
44010        "type.googleapis.com/google.cloud.aiplatform.v1.GetFeatureRequest"
44011    }
44012}
44013
44014/// Request message for
44015/// [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures].
44016/// Request message for
44017/// [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures].
44018///
44019/// [google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]: crate::client::FeatureRegistryService::list_features
44020/// [google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]: crate::client::FeaturestoreService::list_features
44021#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44022#[derive(Clone, Default, PartialEq)]
44023#[non_exhaustive]
44024pub struct ListFeaturesRequest {
44025    /// Required. The resource name of the Location to list Features.
44026    /// Format for entity_type as parent:
44027    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
44028    /// Format for feature_group as parent:
44029    /// `projects/{project}/locations/{location}/featureGroups/{feature_group}`
44030    pub parent: std::string::String,
44031
44032    /// Lists the Features that match the filter expression. The following
44033    /// filters are supported:
44034    ///
44035    /// * `value_type`: Supports = and != comparisons.
44036    /// * `create_time`: Supports =, !=, <, >, >=, and <= comparisons. Values must
44037    ///   be in RFC 3339 format.
44038    /// * `update_time`: Supports =, !=, <, >, >=, and <= comparisons. Values must
44039    ///   be in RFC 3339 format.
44040    /// * `labels`: Supports key-value equality as well as key presence.
44041    ///
44042    /// Examples:
44043    ///
44044    /// * `value_type = DOUBLE` --> Features whose type is DOUBLE.
44045    /// * `create_time > \"2020-01-31T15:30:00.000000Z\" OR
44046    ///   update_time > \"2020-01-31T15:30:00.000000Z\"` --> EntityTypes created
44047    ///   or updated after 2020-01-31T15:30:00.000000Z.
44048    /// * `labels.active = yes AND labels.env = prod` --> Features having both
44049    ///   (active: yes) and (env: prod) labels.
44050    /// * `labels.env: *` --> Any Feature which has a label with 'env' as the
44051    ///   key.
44052    pub filter: std::string::String,
44053
44054    /// The maximum number of Features to return. The service may return fewer
44055    /// than this value. If unspecified, at most 1000 Features will be returned.
44056    /// The maximum value is 1000; any value greater than 1000 will be coerced to
44057    /// 1000.
44058    pub page_size: i32,
44059
44060    /// A page token, received from a previous
44061    /// [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
44062    /// call or
44063    /// [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
44064    /// call. Provide this to retrieve the subsequent page.
44065    ///
44066    /// When paginating, all other parameters provided to
44067    /// [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]
44068    /// or
44069    /// [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]
44070    /// must match the call that provided the page token.
44071    ///
44072    /// [google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]: crate::client::FeatureRegistryService::list_features
44073    /// [google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]: crate::client::FeaturestoreService::list_features
44074    pub page_token: std::string::String,
44075
44076    /// A comma-separated list of fields to order by, sorted in ascending order.
44077    /// Use "desc" after a field name for descending.
44078    /// Supported fields:
44079    ///
44080    /// * `feature_id`
44081    /// * `value_type` (Not supported for FeatureRegistry Feature)
44082    /// * `create_time`
44083    /// * `update_time`
44084    pub order_by: std::string::String,
44085
44086    /// Mask specifying which fields to read.
44087    pub read_mask: std::option::Option<wkt::FieldMask>,
44088
44089    /// Only applicable for Vertex AI Feature Store (Legacy).
44090    /// If set, return the most recent
44091    /// [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1.ListFeaturesRequest.latest_stats_count]
44092    /// of stats for each Feature in response. Valid value is [0, 10]. If number of
44093    /// stats exists <
44094    /// [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1.ListFeaturesRequest.latest_stats_count],
44095    /// return all existing stats.
44096    ///
44097    /// [google.cloud.aiplatform.v1.ListFeaturesRequest.latest_stats_count]: crate::model::ListFeaturesRequest::latest_stats_count
44098    pub latest_stats_count: i32,
44099
44100    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44101}
44102
44103#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44104impl ListFeaturesRequest {
44105    pub fn new() -> Self {
44106        std::default::Default::default()
44107    }
44108
44109    /// Sets the value of [parent][crate::model::ListFeaturesRequest::parent].
44110    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44111        self.parent = v.into();
44112        self
44113    }
44114
44115    /// Sets the value of [filter][crate::model::ListFeaturesRequest::filter].
44116    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44117        self.filter = v.into();
44118        self
44119    }
44120
44121    /// Sets the value of [page_size][crate::model::ListFeaturesRequest::page_size].
44122    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
44123        self.page_size = v.into();
44124        self
44125    }
44126
44127    /// Sets the value of [page_token][crate::model::ListFeaturesRequest::page_token].
44128    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44129        self.page_token = v.into();
44130        self
44131    }
44132
44133    /// Sets the value of [order_by][crate::model::ListFeaturesRequest::order_by].
44134    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44135        self.order_by = v.into();
44136        self
44137    }
44138
44139    /// Sets the value of [read_mask][crate::model::ListFeaturesRequest::read_mask].
44140    pub fn set_read_mask<T>(mut self, v: T) -> Self
44141    where
44142        T: std::convert::Into<wkt::FieldMask>,
44143    {
44144        self.read_mask = std::option::Option::Some(v.into());
44145        self
44146    }
44147
44148    /// Sets or clears the value of [read_mask][crate::model::ListFeaturesRequest::read_mask].
44149    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
44150    where
44151        T: std::convert::Into<wkt::FieldMask>,
44152    {
44153        self.read_mask = v.map(|x| x.into());
44154        self
44155    }
44156
44157    /// Sets the value of [latest_stats_count][crate::model::ListFeaturesRequest::latest_stats_count].
44158    pub fn set_latest_stats_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
44159        self.latest_stats_count = v.into();
44160        self
44161    }
44162}
44163
44164#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44165impl wkt::message::Message for ListFeaturesRequest {
44166    fn typename() -> &'static str {
44167        "type.googleapis.com/google.cloud.aiplatform.v1.ListFeaturesRequest"
44168    }
44169}
44170
44171/// Response message for
44172/// [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures].
44173/// Response message for
44174/// [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures].
44175///
44176/// [google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]: crate::client::FeatureRegistryService::list_features
44177/// [google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]: crate::client::FeaturestoreService::list_features
44178#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44179#[derive(Clone, Default, PartialEq)]
44180#[non_exhaustive]
44181pub struct ListFeaturesResponse {
44182    /// The Features matching the request.
44183    pub features: std::vec::Vec<crate::model::Feature>,
44184
44185    /// A token, which can be sent as
44186    /// [ListFeaturesRequest.page_token][google.cloud.aiplatform.v1.ListFeaturesRequest.page_token]
44187    /// to retrieve the next page. If this field is omitted, there are no
44188    /// subsequent pages.
44189    ///
44190    /// [google.cloud.aiplatform.v1.ListFeaturesRequest.page_token]: crate::model::ListFeaturesRequest::page_token
44191    pub next_page_token: std::string::String,
44192
44193    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44194}
44195
44196#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44197impl ListFeaturesResponse {
44198    pub fn new() -> Self {
44199        std::default::Default::default()
44200    }
44201
44202    /// Sets the value of [features][crate::model::ListFeaturesResponse::features].
44203    pub fn set_features<T, V>(mut self, v: T) -> Self
44204    where
44205        T: std::iter::IntoIterator<Item = V>,
44206        V: std::convert::Into<crate::model::Feature>,
44207    {
44208        use std::iter::Iterator;
44209        self.features = v.into_iter().map(|i| i.into()).collect();
44210        self
44211    }
44212
44213    /// Sets the value of [next_page_token][crate::model::ListFeaturesResponse::next_page_token].
44214    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44215        self.next_page_token = v.into();
44216        self
44217    }
44218}
44219
44220#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44221impl wkt::message::Message for ListFeaturesResponse {
44222    fn typename() -> &'static str {
44223        "type.googleapis.com/google.cloud.aiplatform.v1.ListFeaturesResponse"
44224    }
44225}
44226
44227#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44228#[doc(hidden)]
44229impl gax::paginator::internal::PageableResponse for ListFeaturesResponse {
44230    type PageItem = crate::model::Feature;
44231
44232    fn items(self) -> std::vec::Vec<Self::PageItem> {
44233        self.features
44234    }
44235
44236    fn next_page_token(&self) -> std::string::String {
44237        use std::clone::Clone;
44238        self.next_page_token.clone()
44239    }
44240}
44241
44242/// Request message for
44243/// [FeaturestoreService.SearchFeatures][google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures].
44244///
44245/// [google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures]: crate::client::FeaturestoreService::search_features
44246#[cfg(feature = "featurestore-service")]
44247#[derive(Clone, Default, PartialEq)]
44248#[non_exhaustive]
44249pub struct SearchFeaturesRequest {
44250    /// Required. The resource name of the Location to search Features.
44251    /// Format:
44252    /// `projects/{project}/locations/{location}`
44253    pub location: std::string::String,
44254
44255    /// Query string that is a conjunction of field-restricted queries and/or
44256    /// field-restricted filters.  Field-restricted queries and filters can be
44257    /// combined using `AND` to form a conjunction.
44258    ///
44259    /// A field query is in the form FIELD:QUERY. This implicitly checks if QUERY
44260    /// exists as a substring within Feature's FIELD. The QUERY
44261    /// and the FIELD are converted to a sequence of words (i.e. tokens) for
44262    /// comparison. This is done by:
44263    ///
44264    /// * Removing leading/trailing whitespace and tokenizing the search value.
44265    ///   Characters that are not one of alphanumeric `[a-zA-Z0-9]`, underscore
44266    ///   `_`, or asterisk `*` are treated as delimiters for tokens. `*` is treated
44267    ///   as a wildcard that matches characters within a token.
44268    /// * Ignoring case.
44269    /// * Prepending an asterisk to the first and appending an asterisk to the
44270    ///   last token in QUERY.
44271    ///
44272    /// A QUERY must be either a singular token or a phrase. A phrase is one or
44273    /// multiple words enclosed in double quotation marks ("). With phrases, the
44274    /// order of the words is important. Words in the phrase must be matching in
44275    /// order and consecutively.
44276    ///
44277    /// Supported FIELDs for field-restricted queries:
44278    ///
44279    /// * `feature_id`
44280    /// * `description`
44281    /// * `entity_type_id`
44282    ///
44283    /// Examples:
44284    ///
44285    /// * `feature_id: foo` --> Matches a Feature with ID containing the substring
44286    ///   `foo` (eg. `foo`, `foofeature`, `barfoo`).
44287    /// * `feature_id: foo*feature` --> Matches a Feature with ID containing the
44288    ///   substring `foo*feature` (eg. `foobarfeature`).
44289    /// * `feature_id: foo AND description: bar` --> Matches a Feature with ID
44290    ///   containing the substring `foo` and description containing the substring
44291    ///   `bar`.
44292    ///
44293    /// Besides field queries, the following exact-match filters are
44294    /// supported. The exact-match filters do not support wildcards. Unlike
44295    /// field-restricted queries, exact-match filters are case-sensitive.
44296    ///
44297    /// * `feature_id`: Supports = comparisons.
44298    /// * `description`: Supports = comparisons. Multi-token filters should be
44299    ///   enclosed in quotes.
44300    /// * `entity_type_id`: Supports = comparisons.
44301    /// * `value_type`: Supports = and != comparisons.
44302    /// * `labels`: Supports key-value equality as well as key presence.
44303    /// * `featurestore_id`: Supports = comparisons.
44304    ///
44305    /// Examples:
44306    ///
44307    /// * `description = "foo bar"` --> Any Feature with description exactly equal
44308    ///   to `foo bar`
44309    /// * `value_type = DOUBLE` --> Features whose type is DOUBLE.
44310    /// * `labels.active = yes AND labels.env = prod` --> Features having both
44311    ///   (active: yes) and (env: prod) labels.
44312    /// * `labels.env: *` --> Any Feature which has a label with `env` as the
44313    ///   key.
44314    pub query: std::string::String,
44315
44316    /// The maximum number of Features to return. The service may return fewer
44317    /// than this value. If unspecified, at most 100 Features will be returned.
44318    /// The maximum value is 100; any value greater than 100 will be coerced to
44319    /// 100.
44320    pub page_size: i32,
44321
44322    /// A page token, received from a previous
44323    /// [FeaturestoreService.SearchFeatures][google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures]
44324    /// call. Provide this to retrieve the subsequent page.
44325    ///
44326    /// When paginating, all other parameters provided to
44327    /// [FeaturestoreService.SearchFeatures][google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures],
44328    /// except `page_size`, must match the call that provided the page token.
44329    ///
44330    /// [google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures]: crate::client::FeaturestoreService::search_features
44331    pub page_token: std::string::String,
44332
44333    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44334}
44335
44336#[cfg(feature = "featurestore-service")]
44337impl SearchFeaturesRequest {
44338    pub fn new() -> Self {
44339        std::default::Default::default()
44340    }
44341
44342    /// Sets the value of [location][crate::model::SearchFeaturesRequest::location].
44343    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44344        self.location = v.into();
44345        self
44346    }
44347
44348    /// Sets the value of [query][crate::model::SearchFeaturesRequest::query].
44349    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44350        self.query = v.into();
44351        self
44352    }
44353
44354    /// Sets the value of [page_size][crate::model::SearchFeaturesRequest::page_size].
44355    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
44356        self.page_size = v.into();
44357        self
44358    }
44359
44360    /// Sets the value of [page_token][crate::model::SearchFeaturesRequest::page_token].
44361    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44362        self.page_token = v.into();
44363        self
44364    }
44365}
44366
44367#[cfg(feature = "featurestore-service")]
44368impl wkt::message::Message for SearchFeaturesRequest {
44369    fn typename() -> &'static str {
44370        "type.googleapis.com/google.cloud.aiplatform.v1.SearchFeaturesRequest"
44371    }
44372}
44373
44374/// Response message for
44375/// [FeaturestoreService.SearchFeatures][google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures].
44376///
44377/// [google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures]: crate::client::FeaturestoreService::search_features
44378#[cfg(feature = "featurestore-service")]
44379#[derive(Clone, Default, PartialEq)]
44380#[non_exhaustive]
44381pub struct SearchFeaturesResponse {
44382    /// The Features matching the request.
44383    ///
44384    /// Fields returned:
44385    ///
44386    /// * `name`
44387    /// * `description`
44388    /// * `labels`
44389    /// * `create_time`
44390    /// * `update_time`
44391    pub features: std::vec::Vec<crate::model::Feature>,
44392
44393    /// A token, which can be sent as
44394    /// [SearchFeaturesRequest.page_token][google.cloud.aiplatform.v1.SearchFeaturesRequest.page_token]
44395    /// to retrieve the next page. If this field is omitted, there are no
44396    /// subsequent pages.
44397    ///
44398    /// [google.cloud.aiplatform.v1.SearchFeaturesRequest.page_token]: crate::model::SearchFeaturesRequest::page_token
44399    pub next_page_token: std::string::String,
44400
44401    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44402}
44403
44404#[cfg(feature = "featurestore-service")]
44405impl SearchFeaturesResponse {
44406    pub fn new() -> Self {
44407        std::default::Default::default()
44408    }
44409
44410    /// Sets the value of [features][crate::model::SearchFeaturesResponse::features].
44411    pub fn set_features<T, V>(mut self, v: T) -> Self
44412    where
44413        T: std::iter::IntoIterator<Item = V>,
44414        V: std::convert::Into<crate::model::Feature>,
44415    {
44416        use std::iter::Iterator;
44417        self.features = v.into_iter().map(|i| i.into()).collect();
44418        self
44419    }
44420
44421    /// Sets the value of [next_page_token][crate::model::SearchFeaturesResponse::next_page_token].
44422    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44423        self.next_page_token = v.into();
44424        self
44425    }
44426}
44427
44428#[cfg(feature = "featurestore-service")]
44429impl wkt::message::Message for SearchFeaturesResponse {
44430    fn typename() -> &'static str {
44431        "type.googleapis.com/google.cloud.aiplatform.v1.SearchFeaturesResponse"
44432    }
44433}
44434
44435#[cfg(feature = "featurestore-service")]
44436#[doc(hidden)]
44437impl gax::paginator::internal::PageableResponse for SearchFeaturesResponse {
44438    type PageItem = crate::model::Feature;
44439
44440    fn items(self) -> std::vec::Vec<Self::PageItem> {
44441        self.features
44442    }
44443
44444    fn next_page_token(&self) -> std::string::String {
44445        use std::clone::Clone;
44446        self.next_page_token.clone()
44447    }
44448}
44449
44450/// Request message for
44451/// [FeaturestoreService.UpdateFeature][google.cloud.aiplatform.v1.FeaturestoreService.UpdateFeature].
44452/// Request message for
44453/// [FeatureRegistryService.UpdateFeature][google.cloud.aiplatform.v1.FeatureRegistryService.UpdateFeature].
44454///
44455/// [google.cloud.aiplatform.v1.FeatureRegistryService.UpdateFeature]: crate::client::FeatureRegistryService::update_feature
44456/// [google.cloud.aiplatform.v1.FeaturestoreService.UpdateFeature]: crate::client::FeaturestoreService::update_feature
44457#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44458#[derive(Clone, Default, PartialEq)]
44459#[non_exhaustive]
44460pub struct UpdateFeatureRequest {
44461    /// Required. The Feature's `name` field is used to identify the Feature to be
44462    /// updated.
44463    /// Format:
44464    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`
44465    /// `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`
44466    pub feature: std::option::Option<crate::model::Feature>,
44467
44468    /// Field mask is used to specify the fields to be overwritten in the
44469    /// Features resource by the update.
44470    /// The fields specified in the update_mask are relative to the resource, not
44471    /// the full request. A field will be overwritten if it is in the mask. If the
44472    /// user does not provide a mask then only the non-empty fields present in the
44473    /// request will be overwritten. Set the update_mask to `*` to override all
44474    /// fields.
44475    ///
44476    /// Updatable fields:
44477    ///
44478    /// * `description`
44479    /// * `labels`
44480    /// * `disable_monitoring` (Not supported for FeatureRegistryService Feature)
44481    /// * `point_of_contact` (Not supported for FeaturestoreService FeatureStore)
44482    pub update_mask: std::option::Option<wkt::FieldMask>,
44483
44484    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44485}
44486
44487#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44488impl UpdateFeatureRequest {
44489    pub fn new() -> Self {
44490        std::default::Default::default()
44491    }
44492
44493    /// Sets the value of [feature][crate::model::UpdateFeatureRequest::feature].
44494    pub fn set_feature<T>(mut self, v: T) -> Self
44495    where
44496        T: std::convert::Into<crate::model::Feature>,
44497    {
44498        self.feature = std::option::Option::Some(v.into());
44499        self
44500    }
44501
44502    /// Sets or clears the value of [feature][crate::model::UpdateFeatureRequest::feature].
44503    pub fn set_or_clear_feature<T>(mut self, v: std::option::Option<T>) -> Self
44504    where
44505        T: std::convert::Into<crate::model::Feature>,
44506    {
44507        self.feature = v.map(|x| x.into());
44508        self
44509    }
44510
44511    /// Sets the value of [update_mask][crate::model::UpdateFeatureRequest::update_mask].
44512    pub fn set_update_mask<T>(mut self, v: T) -> Self
44513    where
44514        T: std::convert::Into<wkt::FieldMask>,
44515    {
44516        self.update_mask = std::option::Option::Some(v.into());
44517        self
44518    }
44519
44520    /// Sets or clears the value of [update_mask][crate::model::UpdateFeatureRequest::update_mask].
44521    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
44522    where
44523        T: std::convert::Into<wkt::FieldMask>,
44524    {
44525        self.update_mask = v.map(|x| x.into());
44526        self
44527    }
44528}
44529
44530#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44531impl wkt::message::Message for UpdateFeatureRequest {
44532    fn typename() -> &'static str {
44533        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateFeatureRequest"
44534    }
44535}
44536
44537/// Request message for
44538/// [FeaturestoreService.DeleteFeature][google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeature].
44539/// Request message for
44540/// [FeatureRegistryService.DeleteFeature][google.cloud.aiplatform.v1.FeatureRegistryService.DeleteFeature].
44541///
44542/// [google.cloud.aiplatform.v1.FeatureRegistryService.DeleteFeature]: crate::client::FeatureRegistryService::delete_feature
44543/// [google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeature]: crate::client::FeaturestoreService::delete_feature
44544#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44545#[derive(Clone, Default, PartialEq)]
44546#[non_exhaustive]
44547pub struct DeleteFeatureRequest {
44548    /// Required. The name of the Features to be deleted.
44549    /// Format:
44550    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`
44551    /// `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`
44552    pub name: std::string::String,
44553
44554    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44555}
44556
44557#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44558impl DeleteFeatureRequest {
44559    pub fn new() -> Self {
44560        std::default::Default::default()
44561    }
44562
44563    /// Sets the value of [name][crate::model::DeleteFeatureRequest::name].
44564    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
44565        self.name = v.into();
44566        self
44567    }
44568}
44569
44570#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44571impl wkt::message::Message for DeleteFeatureRequest {
44572    fn typename() -> &'static str {
44573        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteFeatureRequest"
44574    }
44575}
44576
44577/// Details of operations that perform create Featurestore.
44578#[cfg(feature = "featurestore-service")]
44579#[derive(Clone, Default, PartialEq)]
44580#[non_exhaustive]
44581pub struct CreateFeaturestoreOperationMetadata {
44582    /// Operation metadata for Featurestore.
44583    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
44584
44585    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44586}
44587
44588#[cfg(feature = "featurestore-service")]
44589impl CreateFeaturestoreOperationMetadata {
44590    pub fn new() -> Self {
44591        std::default::Default::default()
44592    }
44593
44594    /// Sets the value of [generic_metadata][crate::model::CreateFeaturestoreOperationMetadata::generic_metadata].
44595    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
44596    where
44597        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44598    {
44599        self.generic_metadata = std::option::Option::Some(v.into());
44600        self
44601    }
44602
44603    /// Sets or clears the value of [generic_metadata][crate::model::CreateFeaturestoreOperationMetadata::generic_metadata].
44604    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
44605    where
44606        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44607    {
44608        self.generic_metadata = v.map(|x| x.into());
44609        self
44610    }
44611}
44612
44613#[cfg(feature = "featurestore-service")]
44614impl wkt::message::Message for CreateFeaturestoreOperationMetadata {
44615    fn typename() -> &'static str {
44616        "type.googleapis.com/google.cloud.aiplatform.v1.CreateFeaturestoreOperationMetadata"
44617    }
44618}
44619
44620/// Details of operations that perform update Featurestore.
44621#[cfg(feature = "featurestore-service")]
44622#[derive(Clone, Default, PartialEq)]
44623#[non_exhaustive]
44624pub struct UpdateFeaturestoreOperationMetadata {
44625    /// Operation metadata for Featurestore.
44626    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
44627
44628    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44629}
44630
44631#[cfg(feature = "featurestore-service")]
44632impl UpdateFeaturestoreOperationMetadata {
44633    pub fn new() -> Self {
44634        std::default::Default::default()
44635    }
44636
44637    /// Sets the value of [generic_metadata][crate::model::UpdateFeaturestoreOperationMetadata::generic_metadata].
44638    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
44639    where
44640        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44641    {
44642        self.generic_metadata = std::option::Option::Some(v.into());
44643        self
44644    }
44645
44646    /// Sets or clears the value of [generic_metadata][crate::model::UpdateFeaturestoreOperationMetadata::generic_metadata].
44647    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
44648    where
44649        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44650    {
44651        self.generic_metadata = v.map(|x| x.into());
44652        self
44653    }
44654}
44655
44656#[cfg(feature = "featurestore-service")]
44657impl wkt::message::Message for UpdateFeaturestoreOperationMetadata {
44658    fn typename() -> &'static str {
44659        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateFeaturestoreOperationMetadata"
44660    }
44661}
44662
44663/// Details of operations that perform import Feature values.
44664#[cfg(feature = "featurestore-service")]
44665#[derive(Clone, Default, PartialEq)]
44666#[non_exhaustive]
44667pub struct ImportFeatureValuesOperationMetadata {
44668    /// Operation metadata for Featurestore import Feature values.
44669    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
44670
44671    /// Number of entities that have been imported by the operation.
44672    pub imported_entity_count: i64,
44673
44674    /// Number of Feature values that have been imported by the operation.
44675    pub imported_feature_value_count: i64,
44676
44677    /// The source URI from where Feature values are imported.
44678    pub source_uris: std::vec::Vec<std::string::String>,
44679
44680    /// The number of rows in input source that weren't imported due to either
44681    ///
44682    /// * Not having any featureValues.
44683    /// * Having a null entityId.
44684    /// * Having a null timestamp.
44685    /// * Not being parsable (applicable for CSV sources).
44686    pub invalid_row_count: i64,
44687
44688    /// The number rows that weren't ingested due to having timestamps outside the
44689    /// retention boundary.
44690    pub timestamp_outside_retention_rows_count: i64,
44691
44692    /// List of ImportFeatureValues operations running under a single EntityType
44693    /// that are blocking this operation.
44694    pub blocking_operation_ids: std::vec::Vec<i64>,
44695
44696    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44697}
44698
44699#[cfg(feature = "featurestore-service")]
44700impl ImportFeatureValuesOperationMetadata {
44701    pub fn new() -> Self {
44702        std::default::Default::default()
44703    }
44704
44705    /// Sets the value of [generic_metadata][crate::model::ImportFeatureValuesOperationMetadata::generic_metadata].
44706    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
44707    where
44708        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44709    {
44710        self.generic_metadata = std::option::Option::Some(v.into());
44711        self
44712    }
44713
44714    /// Sets or clears the value of [generic_metadata][crate::model::ImportFeatureValuesOperationMetadata::generic_metadata].
44715    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
44716    where
44717        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44718    {
44719        self.generic_metadata = v.map(|x| x.into());
44720        self
44721    }
44722
44723    /// Sets the value of [imported_entity_count][crate::model::ImportFeatureValuesOperationMetadata::imported_entity_count].
44724    pub fn set_imported_entity_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
44725        self.imported_entity_count = v.into();
44726        self
44727    }
44728
44729    /// Sets the value of [imported_feature_value_count][crate::model::ImportFeatureValuesOperationMetadata::imported_feature_value_count].
44730    pub fn set_imported_feature_value_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
44731        self.imported_feature_value_count = v.into();
44732        self
44733    }
44734
44735    /// Sets the value of [source_uris][crate::model::ImportFeatureValuesOperationMetadata::source_uris].
44736    pub fn set_source_uris<T, V>(mut self, v: T) -> Self
44737    where
44738        T: std::iter::IntoIterator<Item = V>,
44739        V: std::convert::Into<std::string::String>,
44740    {
44741        use std::iter::Iterator;
44742        self.source_uris = v.into_iter().map(|i| i.into()).collect();
44743        self
44744    }
44745
44746    /// Sets the value of [invalid_row_count][crate::model::ImportFeatureValuesOperationMetadata::invalid_row_count].
44747    pub fn set_invalid_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
44748        self.invalid_row_count = v.into();
44749        self
44750    }
44751
44752    /// Sets the value of [timestamp_outside_retention_rows_count][crate::model::ImportFeatureValuesOperationMetadata::timestamp_outside_retention_rows_count].
44753    pub fn set_timestamp_outside_retention_rows_count<T: std::convert::Into<i64>>(
44754        mut self,
44755        v: T,
44756    ) -> Self {
44757        self.timestamp_outside_retention_rows_count = v.into();
44758        self
44759    }
44760
44761    /// Sets the value of [blocking_operation_ids][crate::model::ImportFeatureValuesOperationMetadata::blocking_operation_ids].
44762    pub fn set_blocking_operation_ids<T, V>(mut self, v: T) -> Self
44763    where
44764        T: std::iter::IntoIterator<Item = V>,
44765        V: std::convert::Into<i64>,
44766    {
44767        use std::iter::Iterator;
44768        self.blocking_operation_ids = v.into_iter().map(|i| i.into()).collect();
44769        self
44770    }
44771}
44772
44773#[cfg(feature = "featurestore-service")]
44774impl wkt::message::Message for ImportFeatureValuesOperationMetadata {
44775    fn typename() -> &'static str {
44776        "type.googleapis.com/google.cloud.aiplatform.v1.ImportFeatureValuesOperationMetadata"
44777    }
44778}
44779
44780/// Details of operations that exports Features values.
44781#[cfg(feature = "featurestore-service")]
44782#[derive(Clone, Default, PartialEq)]
44783#[non_exhaustive]
44784pub struct ExportFeatureValuesOperationMetadata {
44785    /// Operation metadata for Featurestore export Feature values.
44786    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
44787
44788    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44789}
44790
44791#[cfg(feature = "featurestore-service")]
44792impl ExportFeatureValuesOperationMetadata {
44793    pub fn new() -> Self {
44794        std::default::Default::default()
44795    }
44796
44797    /// Sets the value of [generic_metadata][crate::model::ExportFeatureValuesOperationMetadata::generic_metadata].
44798    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
44799    where
44800        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44801    {
44802        self.generic_metadata = std::option::Option::Some(v.into());
44803        self
44804    }
44805
44806    /// Sets or clears the value of [generic_metadata][crate::model::ExportFeatureValuesOperationMetadata::generic_metadata].
44807    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
44808    where
44809        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44810    {
44811        self.generic_metadata = v.map(|x| x.into());
44812        self
44813    }
44814}
44815
44816#[cfg(feature = "featurestore-service")]
44817impl wkt::message::Message for ExportFeatureValuesOperationMetadata {
44818    fn typename() -> &'static str {
44819        "type.googleapis.com/google.cloud.aiplatform.v1.ExportFeatureValuesOperationMetadata"
44820    }
44821}
44822
44823/// Details of operations that batch reads Feature values.
44824#[cfg(feature = "featurestore-service")]
44825#[derive(Clone, Default, PartialEq)]
44826#[non_exhaustive]
44827pub struct BatchReadFeatureValuesOperationMetadata {
44828    /// Operation metadata for Featurestore batch read Features values.
44829    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
44830
44831    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44832}
44833
44834#[cfg(feature = "featurestore-service")]
44835impl BatchReadFeatureValuesOperationMetadata {
44836    pub fn new() -> Self {
44837        std::default::Default::default()
44838    }
44839
44840    /// Sets the value of [generic_metadata][crate::model::BatchReadFeatureValuesOperationMetadata::generic_metadata].
44841    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
44842    where
44843        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44844    {
44845        self.generic_metadata = std::option::Option::Some(v.into());
44846        self
44847    }
44848
44849    /// Sets or clears the value of [generic_metadata][crate::model::BatchReadFeatureValuesOperationMetadata::generic_metadata].
44850    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
44851    where
44852        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44853    {
44854        self.generic_metadata = v.map(|x| x.into());
44855        self
44856    }
44857}
44858
44859#[cfg(feature = "featurestore-service")]
44860impl wkt::message::Message for BatchReadFeatureValuesOperationMetadata {
44861    fn typename() -> &'static str {
44862        "type.googleapis.com/google.cloud.aiplatform.v1.BatchReadFeatureValuesOperationMetadata"
44863    }
44864}
44865
44866/// Details of operations that delete Feature values.
44867#[cfg(feature = "featurestore-service")]
44868#[derive(Clone, Default, PartialEq)]
44869#[non_exhaustive]
44870pub struct DeleteFeatureValuesOperationMetadata {
44871    /// Operation metadata for Featurestore delete Features values.
44872    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
44873
44874    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44875}
44876
44877#[cfg(feature = "featurestore-service")]
44878impl DeleteFeatureValuesOperationMetadata {
44879    pub fn new() -> Self {
44880        std::default::Default::default()
44881    }
44882
44883    /// Sets the value of [generic_metadata][crate::model::DeleteFeatureValuesOperationMetadata::generic_metadata].
44884    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
44885    where
44886        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44887    {
44888        self.generic_metadata = std::option::Option::Some(v.into());
44889        self
44890    }
44891
44892    /// Sets or clears the value of [generic_metadata][crate::model::DeleteFeatureValuesOperationMetadata::generic_metadata].
44893    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
44894    where
44895        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44896    {
44897        self.generic_metadata = v.map(|x| x.into());
44898        self
44899    }
44900}
44901
44902#[cfg(feature = "featurestore-service")]
44903impl wkt::message::Message for DeleteFeatureValuesOperationMetadata {
44904    fn typename() -> &'static str {
44905        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata"
44906    }
44907}
44908
44909/// Details of operations that perform create EntityType.
44910#[cfg(feature = "featurestore-service")]
44911#[derive(Clone, Default, PartialEq)]
44912#[non_exhaustive]
44913pub struct CreateEntityTypeOperationMetadata {
44914    /// Operation metadata for EntityType.
44915    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
44916
44917    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44918}
44919
44920#[cfg(feature = "featurestore-service")]
44921impl CreateEntityTypeOperationMetadata {
44922    pub fn new() -> Self {
44923        std::default::Default::default()
44924    }
44925
44926    /// Sets the value of [generic_metadata][crate::model::CreateEntityTypeOperationMetadata::generic_metadata].
44927    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
44928    where
44929        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44930    {
44931        self.generic_metadata = std::option::Option::Some(v.into());
44932        self
44933    }
44934
44935    /// Sets or clears the value of [generic_metadata][crate::model::CreateEntityTypeOperationMetadata::generic_metadata].
44936    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
44937    where
44938        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44939    {
44940        self.generic_metadata = v.map(|x| x.into());
44941        self
44942    }
44943}
44944
44945#[cfg(feature = "featurestore-service")]
44946impl wkt::message::Message for CreateEntityTypeOperationMetadata {
44947    fn typename() -> &'static str {
44948        "type.googleapis.com/google.cloud.aiplatform.v1.CreateEntityTypeOperationMetadata"
44949    }
44950}
44951
44952/// Details of operations that perform create Feature.
44953#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44954#[derive(Clone, Default, PartialEq)]
44955#[non_exhaustive]
44956pub struct CreateFeatureOperationMetadata {
44957    /// Operation metadata for Feature.
44958    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
44959
44960    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
44961}
44962
44963#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44964impl CreateFeatureOperationMetadata {
44965    pub fn new() -> Self {
44966        std::default::Default::default()
44967    }
44968
44969    /// Sets the value of [generic_metadata][crate::model::CreateFeatureOperationMetadata::generic_metadata].
44970    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
44971    where
44972        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44973    {
44974        self.generic_metadata = std::option::Option::Some(v.into());
44975        self
44976    }
44977
44978    /// Sets or clears the value of [generic_metadata][crate::model::CreateFeatureOperationMetadata::generic_metadata].
44979    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
44980    where
44981        T: std::convert::Into<crate::model::GenericOperationMetadata>,
44982    {
44983        self.generic_metadata = v.map(|x| x.into());
44984        self
44985    }
44986}
44987
44988#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44989impl wkt::message::Message for CreateFeatureOperationMetadata {
44990    fn typename() -> &'static str {
44991        "type.googleapis.com/google.cloud.aiplatform.v1.CreateFeatureOperationMetadata"
44992    }
44993}
44994
44995/// Details of operations that perform batch create Features.
44996#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
44997#[derive(Clone, Default, PartialEq)]
44998#[non_exhaustive]
44999pub struct BatchCreateFeaturesOperationMetadata {
45000    /// Operation metadata for Feature.
45001    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
45002
45003    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45004}
45005
45006#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
45007impl BatchCreateFeaturesOperationMetadata {
45008    pub fn new() -> Self {
45009        std::default::Default::default()
45010    }
45011
45012    /// Sets the value of [generic_metadata][crate::model::BatchCreateFeaturesOperationMetadata::generic_metadata].
45013    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
45014    where
45015        T: std::convert::Into<crate::model::GenericOperationMetadata>,
45016    {
45017        self.generic_metadata = std::option::Option::Some(v.into());
45018        self
45019    }
45020
45021    /// Sets or clears the value of [generic_metadata][crate::model::BatchCreateFeaturesOperationMetadata::generic_metadata].
45022    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
45023    where
45024        T: std::convert::Into<crate::model::GenericOperationMetadata>,
45025    {
45026        self.generic_metadata = v.map(|x| x.into());
45027        self
45028    }
45029}
45030
45031#[cfg(any(feature = "feature-registry-service", feature = "featurestore-service",))]
45032impl wkt::message::Message for BatchCreateFeaturesOperationMetadata {
45033    fn typename() -> &'static str {
45034        "type.googleapis.com/google.cloud.aiplatform.v1.BatchCreateFeaturesOperationMetadata"
45035    }
45036}
45037
45038/// Request message for
45039/// [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeatureValues].
45040///
45041/// [google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeatureValues]: crate::client::FeaturestoreService::delete_feature_values
45042#[cfg(feature = "featurestore-service")]
45043#[derive(Clone, Default, PartialEq)]
45044#[non_exhaustive]
45045pub struct DeleteFeatureValuesRequest {
45046    /// Required. The resource name of the EntityType grouping the Features for
45047    /// which values are being deleted from. Format:
45048    /// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`
45049    pub entity_type: std::string::String,
45050
45051    /// Defines options to select feature values to be deleted.
45052    pub delete_option:
45053        std::option::Option<crate::model::delete_feature_values_request::DeleteOption>,
45054
45055    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45056}
45057
45058#[cfg(feature = "featurestore-service")]
45059impl DeleteFeatureValuesRequest {
45060    pub fn new() -> Self {
45061        std::default::Default::default()
45062    }
45063
45064    /// Sets the value of [entity_type][crate::model::DeleteFeatureValuesRequest::entity_type].
45065    pub fn set_entity_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45066        self.entity_type = v.into();
45067        self
45068    }
45069
45070    /// Sets the value of [delete_option][crate::model::DeleteFeatureValuesRequest::delete_option].
45071    ///
45072    /// Note that all the setters affecting `delete_option` are mutually
45073    /// exclusive.
45074    pub fn set_delete_option<
45075        T: std::convert::Into<
45076                std::option::Option<crate::model::delete_feature_values_request::DeleteOption>,
45077            >,
45078    >(
45079        mut self,
45080        v: T,
45081    ) -> Self {
45082        self.delete_option = v.into();
45083        self
45084    }
45085
45086    /// The value of [delete_option][crate::model::DeleteFeatureValuesRequest::delete_option]
45087    /// if it holds a `SelectEntity`, `None` if the field is not set or
45088    /// holds a different branch.
45089    pub fn select_entity(
45090        &self,
45091    ) -> std::option::Option<
45092        &std::boxed::Box<crate::model::delete_feature_values_request::SelectEntity>,
45093    > {
45094        #[allow(unreachable_patterns)]
45095        self.delete_option.as_ref().and_then(|v| match v {
45096            crate::model::delete_feature_values_request::DeleteOption::SelectEntity(v) => {
45097                std::option::Option::Some(v)
45098            }
45099            _ => std::option::Option::None,
45100        })
45101    }
45102
45103    /// Sets the value of [delete_option][crate::model::DeleteFeatureValuesRequest::delete_option]
45104    /// to hold a `SelectEntity`.
45105    ///
45106    /// Note that all the setters affecting `delete_option` are
45107    /// mutually exclusive.
45108    pub fn set_select_entity<
45109        T: std::convert::Into<
45110                std::boxed::Box<crate::model::delete_feature_values_request::SelectEntity>,
45111            >,
45112    >(
45113        mut self,
45114        v: T,
45115    ) -> Self {
45116        self.delete_option = std::option::Option::Some(
45117            crate::model::delete_feature_values_request::DeleteOption::SelectEntity(v.into()),
45118        );
45119        self
45120    }
45121
45122    /// The value of [delete_option][crate::model::DeleteFeatureValuesRequest::delete_option]
45123    /// if it holds a `SelectTimeRangeAndFeature`, `None` if the field is not set or
45124    /// holds a different branch.
45125    pub fn select_time_range_and_feature(
45126        &self,
45127    ) -> std::option::Option<
45128        &std::boxed::Box<crate::model::delete_feature_values_request::SelectTimeRangeAndFeature>,
45129    > {
45130        #[allow(unreachable_patterns)]
45131        self.delete_option.as_ref().and_then(|v| match v {
45132            crate::model::delete_feature_values_request::DeleteOption::SelectTimeRangeAndFeature(v) => std::option::Option::Some(v),
45133            _ => std::option::Option::None,
45134        })
45135    }
45136
45137    /// Sets the value of [delete_option][crate::model::DeleteFeatureValuesRequest::delete_option]
45138    /// to hold a `SelectTimeRangeAndFeature`.
45139    ///
45140    /// Note that all the setters affecting `delete_option` are
45141    /// mutually exclusive.
45142    pub fn set_select_time_range_and_feature<
45143        T: std::convert::Into<
45144                std::boxed::Box<
45145                    crate::model::delete_feature_values_request::SelectTimeRangeAndFeature,
45146                >,
45147            >,
45148    >(
45149        mut self,
45150        v: T,
45151    ) -> Self {
45152        self.delete_option = std::option::Option::Some(
45153            crate::model::delete_feature_values_request::DeleteOption::SelectTimeRangeAndFeature(
45154                v.into(),
45155            ),
45156        );
45157        self
45158    }
45159}
45160
45161#[cfg(feature = "featurestore-service")]
45162impl wkt::message::Message for DeleteFeatureValuesRequest {
45163    fn typename() -> &'static str {
45164        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteFeatureValuesRequest"
45165    }
45166}
45167
45168/// Defines additional types related to [DeleteFeatureValuesRequest].
45169#[cfg(feature = "featurestore-service")]
45170pub mod delete_feature_values_request {
45171    #[allow(unused_imports)]
45172    use super::*;
45173
45174    /// Message to select entity.
45175    /// If an entity id is selected, all the feature values corresponding to the
45176    /// entity id will be deleted, including the entityId.
45177    #[cfg(feature = "featurestore-service")]
45178    #[derive(Clone, Default, PartialEq)]
45179    #[non_exhaustive]
45180    pub struct SelectEntity {
45181        /// Required. Selectors choosing feature values of which entity id to be
45182        /// deleted from the EntityType.
45183        pub entity_id_selector: std::option::Option<crate::model::EntityIdSelector>,
45184
45185        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45186    }
45187
45188    #[cfg(feature = "featurestore-service")]
45189    impl SelectEntity {
45190        pub fn new() -> Self {
45191            std::default::Default::default()
45192        }
45193
45194        /// Sets the value of [entity_id_selector][crate::model::delete_feature_values_request::SelectEntity::entity_id_selector].
45195        pub fn set_entity_id_selector<T>(mut self, v: T) -> Self
45196        where
45197            T: std::convert::Into<crate::model::EntityIdSelector>,
45198        {
45199            self.entity_id_selector = std::option::Option::Some(v.into());
45200            self
45201        }
45202
45203        /// Sets or clears the value of [entity_id_selector][crate::model::delete_feature_values_request::SelectEntity::entity_id_selector].
45204        pub fn set_or_clear_entity_id_selector<T>(mut self, v: std::option::Option<T>) -> Self
45205        where
45206            T: std::convert::Into<crate::model::EntityIdSelector>,
45207        {
45208            self.entity_id_selector = v.map(|x| x.into());
45209            self
45210        }
45211    }
45212
45213    #[cfg(feature = "featurestore-service")]
45214    impl wkt::message::Message for SelectEntity {
45215        fn typename() -> &'static str {
45216            "type.googleapis.com/google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectEntity"
45217        }
45218    }
45219
45220    /// Message to select time range and feature.
45221    /// Values of the selected feature generated within an inclusive time range
45222    /// will be deleted. Using this option permanently deletes the feature values
45223    /// from the specified feature IDs within the specified time range.
45224    /// This might include data from the online storage. If you want to retain
45225    /// any deleted historical data in the online storage, you must re-ingest it.
45226    #[cfg(feature = "featurestore-service")]
45227    #[derive(Clone, Default, PartialEq)]
45228    #[non_exhaustive]
45229    pub struct SelectTimeRangeAndFeature {
45230        /// Required. Select feature generated within a half-inclusive time range.
45231        /// The time range is lower inclusive and upper exclusive.
45232        pub time_range: std::option::Option<gtype::model::Interval>,
45233
45234        /// Required. Selectors choosing which feature values to be deleted from the
45235        /// EntityType.
45236        pub feature_selector: std::option::Option<crate::model::FeatureSelector>,
45237
45238        /// If set, data will not be deleted from online storage.
45239        /// When time range is older than the data in online storage, setting this to
45240        /// be true will make the deletion have no impact on online serving.
45241        pub skip_online_storage_delete: bool,
45242
45243        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45244    }
45245
45246    #[cfg(feature = "featurestore-service")]
45247    impl SelectTimeRangeAndFeature {
45248        pub fn new() -> Self {
45249            std::default::Default::default()
45250        }
45251
45252        /// Sets the value of [time_range][crate::model::delete_feature_values_request::SelectTimeRangeAndFeature::time_range].
45253        pub fn set_time_range<T>(mut self, v: T) -> Self
45254        where
45255            T: std::convert::Into<gtype::model::Interval>,
45256        {
45257            self.time_range = std::option::Option::Some(v.into());
45258            self
45259        }
45260
45261        /// Sets or clears the value of [time_range][crate::model::delete_feature_values_request::SelectTimeRangeAndFeature::time_range].
45262        pub fn set_or_clear_time_range<T>(mut self, v: std::option::Option<T>) -> Self
45263        where
45264            T: std::convert::Into<gtype::model::Interval>,
45265        {
45266            self.time_range = v.map(|x| x.into());
45267            self
45268        }
45269
45270        /// Sets the value of [feature_selector][crate::model::delete_feature_values_request::SelectTimeRangeAndFeature::feature_selector].
45271        pub fn set_feature_selector<T>(mut self, v: T) -> Self
45272        where
45273            T: std::convert::Into<crate::model::FeatureSelector>,
45274        {
45275            self.feature_selector = std::option::Option::Some(v.into());
45276            self
45277        }
45278
45279        /// Sets or clears the value of [feature_selector][crate::model::delete_feature_values_request::SelectTimeRangeAndFeature::feature_selector].
45280        pub fn set_or_clear_feature_selector<T>(mut self, v: std::option::Option<T>) -> Self
45281        where
45282            T: std::convert::Into<crate::model::FeatureSelector>,
45283        {
45284            self.feature_selector = v.map(|x| x.into());
45285            self
45286        }
45287
45288        /// Sets the value of [skip_online_storage_delete][crate::model::delete_feature_values_request::SelectTimeRangeAndFeature::skip_online_storage_delete].
45289        pub fn set_skip_online_storage_delete<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
45290            self.skip_online_storage_delete = v.into();
45291            self
45292        }
45293    }
45294
45295    #[cfg(feature = "featurestore-service")]
45296    impl wkt::message::Message for SelectTimeRangeAndFeature {
45297        fn typename() -> &'static str {
45298            "type.googleapis.com/google.cloud.aiplatform.v1.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature"
45299        }
45300    }
45301
45302    /// Defines options to select feature values to be deleted.
45303    #[cfg(feature = "featurestore-service")]
45304    #[derive(Clone, Debug, PartialEq)]
45305    #[non_exhaustive]
45306    pub enum DeleteOption {
45307        /// Select feature values to be deleted by specifying entities.
45308        SelectEntity(std::boxed::Box<crate::model::delete_feature_values_request::SelectEntity>),
45309        /// Select feature values to be deleted by specifying time range and
45310        /// features.
45311        SelectTimeRangeAndFeature(
45312            std::boxed::Box<crate::model::delete_feature_values_request::SelectTimeRangeAndFeature>,
45313        ),
45314    }
45315}
45316
45317/// Response message for
45318/// [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeatureValues].
45319///
45320/// [google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeatureValues]: crate::client::FeaturestoreService::delete_feature_values
45321#[cfg(feature = "featurestore-service")]
45322#[derive(Clone, Default, PartialEq)]
45323#[non_exhaustive]
45324pub struct DeleteFeatureValuesResponse {
45325    /// Response based on which delete option is specified in the
45326    /// request
45327    pub response: std::option::Option<crate::model::delete_feature_values_response::Response>,
45328
45329    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45330}
45331
45332#[cfg(feature = "featurestore-service")]
45333impl DeleteFeatureValuesResponse {
45334    pub fn new() -> Self {
45335        std::default::Default::default()
45336    }
45337
45338    /// Sets the value of [response][crate::model::DeleteFeatureValuesResponse::response].
45339    ///
45340    /// Note that all the setters affecting `response` are mutually
45341    /// exclusive.
45342    pub fn set_response<
45343        T: std::convert::Into<
45344                std::option::Option<crate::model::delete_feature_values_response::Response>,
45345            >,
45346    >(
45347        mut self,
45348        v: T,
45349    ) -> Self {
45350        self.response = v.into();
45351        self
45352    }
45353
45354    /// The value of [response][crate::model::DeleteFeatureValuesResponse::response]
45355    /// if it holds a `SelectEntity`, `None` if the field is not set or
45356    /// holds a different branch.
45357    pub fn select_entity(
45358        &self,
45359    ) -> std::option::Option<
45360        &std::boxed::Box<crate::model::delete_feature_values_response::SelectEntity>,
45361    > {
45362        #[allow(unreachable_patterns)]
45363        self.response.as_ref().and_then(|v| match v {
45364            crate::model::delete_feature_values_response::Response::SelectEntity(v) => {
45365                std::option::Option::Some(v)
45366            }
45367            _ => std::option::Option::None,
45368        })
45369    }
45370
45371    /// Sets the value of [response][crate::model::DeleteFeatureValuesResponse::response]
45372    /// to hold a `SelectEntity`.
45373    ///
45374    /// Note that all the setters affecting `response` are
45375    /// mutually exclusive.
45376    pub fn set_select_entity<
45377        T: std::convert::Into<
45378                std::boxed::Box<crate::model::delete_feature_values_response::SelectEntity>,
45379            >,
45380    >(
45381        mut self,
45382        v: T,
45383    ) -> Self {
45384        self.response = std::option::Option::Some(
45385            crate::model::delete_feature_values_response::Response::SelectEntity(v.into()),
45386        );
45387        self
45388    }
45389
45390    /// The value of [response][crate::model::DeleteFeatureValuesResponse::response]
45391    /// if it holds a `SelectTimeRangeAndFeature`, `None` if the field is not set or
45392    /// holds a different branch.
45393    pub fn select_time_range_and_feature(
45394        &self,
45395    ) -> std::option::Option<
45396        &std::boxed::Box<crate::model::delete_feature_values_response::SelectTimeRangeAndFeature>,
45397    > {
45398        #[allow(unreachable_patterns)]
45399        self.response.as_ref().and_then(|v| match v {
45400            crate::model::delete_feature_values_response::Response::SelectTimeRangeAndFeature(
45401                v,
45402            ) => std::option::Option::Some(v),
45403            _ => std::option::Option::None,
45404        })
45405    }
45406
45407    /// Sets the value of [response][crate::model::DeleteFeatureValuesResponse::response]
45408    /// to hold a `SelectTimeRangeAndFeature`.
45409    ///
45410    /// Note that all the setters affecting `response` are
45411    /// mutually exclusive.
45412    pub fn set_select_time_range_and_feature<
45413        T: std::convert::Into<
45414                std::boxed::Box<
45415                    crate::model::delete_feature_values_response::SelectTimeRangeAndFeature,
45416                >,
45417            >,
45418    >(
45419        mut self,
45420        v: T,
45421    ) -> Self {
45422        self.response = std::option::Option::Some(
45423            crate::model::delete_feature_values_response::Response::SelectTimeRangeAndFeature(
45424                v.into(),
45425            ),
45426        );
45427        self
45428    }
45429}
45430
45431#[cfg(feature = "featurestore-service")]
45432impl wkt::message::Message for DeleteFeatureValuesResponse {
45433    fn typename() -> &'static str {
45434        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteFeatureValuesResponse"
45435    }
45436}
45437
45438/// Defines additional types related to [DeleteFeatureValuesResponse].
45439#[cfg(feature = "featurestore-service")]
45440pub mod delete_feature_values_response {
45441    #[allow(unused_imports)]
45442    use super::*;
45443
45444    /// Response message if the request uses the SelectEntity option.
45445    #[cfg(feature = "featurestore-service")]
45446    #[derive(Clone, Default, PartialEq)]
45447    #[non_exhaustive]
45448    pub struct SelectEntity {
45449        /// The count of deleted entity rows in the offline storage.
45450        /// Each row corresponds to the combination of an entity ID and a timestamp.
45451        /// One entity ID can have multiple rows in the offline storage.
45452        pub offline_storage_deleted_entity_row_count: i64,
45453
45454        /// The count of deleted entities in the online storage.
45455        /// Each entity ID corresponds to one entity.
45456        pub online_storage_deleted_entity_count: i64,
45457
45458        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45459    }
45460
45461    #[cfg(feature = "featurestore-service")]
45462    impl SelectEntity {
45463        pub fn new() -> Self {
45464            std::default::Default::default()
45465        }
45466
45467        /// Sets the value of [offline_storage_deleted_entity_row_count][crate::model::delete_feature_values_response::SelectEntity::offline_storage_deleted_entity_row_count].
45468        pub fn set_offline_storage_deleted_entity_row_count<T: std::convert::Into<i64>>(
45469            mut self,
45470            v: T,
45471        ) -> Self {
45472            self.offline_storage_deleted_entity_row_count = v.into();
45473            self
45474        }
45475
45476        /// Sets the value of [online_storage_deleted_entity_count][crate::model::delete_feature_values_response::SelectEntity::online_storage_deleted_entity_count].
45477        pub fn set_online_storage_deleted_entity_count<T: std::convert::Into<i64>>(
45478            mut self,
45479            v: T,
45480        ) -> Self {
45481            self.online_storage_deleted_entity_count = v.into();
45482            self
45483        }
45484    }
45485
45486    #[cfg(feature = "featurestore-service")]
45487    impl wkt::message::Message for SelectEntity {
45488        fn typename() -> &'static str {
45489            "type.googleapis.com/google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectEntity"
45490        }
45491    }
45492
45493    /// Response message if the request uses the SelectTimeRangeAndFeature option.
45494    #[cfg(feature = "featurestore-service")]
45495    #[derive(Clone, Default, PartialEq)]
45496    #[non_exhaustive]
45497    pub struct SelectTimeRangeAndFeature {
45498        /// The count of the features or columns impacted.
45499        /// This is the same as the feature count in the request.
45500        pub impacted_feature_count: i64,
45501
45502        /// The count of modified entity rows in the offline storage.
45503        /// Each row corresponds to the combination of an entity ID and a timestamp.
45504        /// One entity ID can have multiple rows in the offline storage.
45505        /// Within each row, only the features specified in the request are
45506        /// deleted.
45507        pub offline_storage_modified_entity_row_count: i64,
45508
45509        /// The count of modified entities in the online storage.
45510        /// Each entity ID corresponds to one entity.
45511        /// Within each entity, only the features specified in the request are
45512        /// deleted.
45513        pub online_storage_modified_entity_count: i64,
45514
45515        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45516    }
45517
45518    #[cfg(feature = "featurestore-service")]
45519    impl SelectTimeRangeAndFeature {
45520        pub fn new() -> Self {
45521            std::default::Default::default()
45522        }
45523
45524        /// Sets the value of [impacted_feature_count][crate::model::delete_feature_values_response::SelectTimeRangeAndFeature::impacted_feature_count].
45525        pub fn set_impacted_feature_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
45526            self.impacted_feature_count = v.into();
45527            self
45528        }
45529
45530        /// Sets the value of [offline_storage_modified_entity_row_count][crate::model::delete_feature_values_response::SelectTimeRangeAndFeature::offline_storage_modified_entity_row_count].
45531        pub fn set_offline_storage_modified_entity_row_count<T: std::convert::Into<i64>>(
45532            mut self,
45533            v: T,
45534        ) -> Self {
45535            self.offline_storage_modified_entity_row_count = v.into();
45536            self
45537        }
45538
45539        /// Sets the value of [online_storage_modified_entity_count][crate::model::delete_feature_values_response::SelectTimeRangeAndFeature::online_storage_modified_entity_count].
45540        pub fn set_online_storage_modified_entity_count<T: std::convert::Into<i64>>(
45541            mut self,
45542            v: T,
45543        ) -> Self {
45544            self.online_storage_modified_entity_count = v.into();
45545            self
45546        }
45547    }
45548
45549    #[cfg(feature = "featurestore-service")]
45550    impl wkt::message::Message for SelectTimeRangeAndFeature {
45551        fn typename() -> &'static str {
45552            "type.googleapis.com/google.cloud.aiplatform.v1.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature"
45553        }
45554    }
45555
45556    /// Response based on which delete option is specified in the
45557    /// request
45558    #[cfg(feature = "featurestore-service")]
45559    #[derive(Clone, Debug, PartialEq)]
45560    #[non_exhaustive]
45561    pub enum Response {
45562        /// Response for request specifying the entities to delete
45563        SelectEntity(std::boxed::Box<crate::model::delete_feature_values_response::SelectEntity>),
45564        /// Response for request specifying time range and feature
45565        SelectTimeRangeAndFeature(
45566            std::boxed::Box<
45567                crate::model::delete_feature_values_response::SelectTimeRangeAndFeature,
45568            >,
45569        ),
45570    }
45571}
45572
45573/// Selector for entityId. Getting ids from the given source.
45574#[cfg(feature = "featurestore-service")]
45575#[derive(Clone, Default, PartialEq)]
45576#[non_exhaustive]
45577pub struct EntityIdSelector {
45578    /// Source column that holds entity IDs. If not provided, entity IDs are
45579    /// extracted from the column named entity_id.
45580    pub entity_id_field: std::string::String,
45581
45582    /// Details about the source data, including the location of the storage and
45583    /// the format.
45584    pub entity_ids_source: std::option::Option<crate::model::entity_id_selector::EntityIdsSource>,
45585
45586    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45587}
45588
45589#[cfg(feature = "featurestore-service")]
45590impl EntityIdSelector {
45591    pub fn new() -> Self {
45592        std::default::Default::default()
45593    }
45594
45595    /// Sets the value of [entity_id_field][crate::model::EntityIdSelector::entity_id_field].
45596    pub fn set_entity_id_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45597        self.entity_id_field = v.into();
45598        self
45599    }
45600
45601    /// Sets the value of [entity_ids_source][crate::model::EntityIdSelector::entity_ids_source].
45602    ///
45603    /// Note that all the setters affecting `entity_ids_source` are mutually
45604    /// exclusive.
45605    pub fn set_entity_ids_source<
45606        T: std::convert::Into<std::option::Option<crate::model::entity_id_selector::EntityIdsSource>>,
45607    >(
45608        mut self,
45609        v: T,
45610    ) -> Self {
45611        self.entity_ids_source = v.into();
45612        self
45613    }
45614
45615    /// The value of [entity_ids_source][crate::model::EntityIdSelector::entity_ids_source]
45616    /// if it holds a `CsvSource`, `None` if the field is not set or
45617    /// holds a different branch.
45618    pub fn csv_source(&self) -> std::option::Option<&std::boxed::Box<crate::model::CsvSource>> {
45619        #[allow(unreachable_patterns)]
45620        self.entity_ids_source.as_ref().and_then(|v| match v {
45621            crate::model::entity_id_selector::EntityIdsSource::CsvSource(v) => {
45622                std::option::Option::Some(v)
45623            }
45624            _ => std::option::Option::None,
45625        })
45626    }
45627
45628    /// Sets the value of [entity_ids_source][crate::model::EntityIdSelector::entity_ids_source]
45629    /// to hold a `CsvSource`.
45630    ///
45631    /// Note that all the setters affecting `entity_ids_source` are
45632    /// mutually exclusive.
45633    pub fn set_csv_source<T: std::convert::Into<std::boxed::Box<crate::model::CsvSource>>>(
45634        mut self,
45635        v: T,
45636    ) -> Self {
45637        self.entity_ids_source = std::option::Option::Some(
45638            crate::model::entity_id_selector::EntityIdsSource::CsvSource(v.into()),
45639        );
45640        self
45641    }
45642}
45643
45644#[cfg(feature = "featurestore-service")]
45645impl wkt::message::Message for EntityIdSelector {
45646    fn typename() -> &'static str {
45647        "type.googleapis.com/google.cloud.aiplatform.v1.EntityIdSelector"
45648    }
45649}
45650
45651/// Defines additional types related to [EntityIdSelector].
45652#[cfg(feature = "featurestore-service")]
45653pub mod entity_id_selector {
45654    #[allow(unused_imports)]
45655    use super::*;
45656
45657    /// Details about the source data, including the location of the storage and
45658    /// the format.
45659    #[cfg(feature = "featurestore-service")]
45660    #[derive(Clone, Debug, PartialEq)]
45661    #[non_exhaustive]
45662    pub enum EntityIdsSource {
45663        /// Source of Csv
45664        CsvSource(std::boxed::Box<crate::model::CsvSource>),
45665    }
45666}
45667
45668/// Request message for
45669/// [GenAiCacheService.CreateCachedContent][google.cloud.aiplatform.v1.GenAiCacheService.CreateCachedContent].
45670///
45671/// [google.cloud.aiplatform.v1.GenAiCacheService.CreateCachedContent]: crate::client::GenAiCacheService::create_cached_content
45672#[cfg(feature = "gen-ai-cache-service")]
45673#[derive(Clone, Default, PartialEq)]
45674#[non_exhaustive]
45675pub struct CreateCachedContentRequest {
45676    /// Required. The parent resource where the cached content will be created
45677    pub parent: std::string::String,
45678
45679    /// Required. The cached content to create
45680    pub cached_content: std::option::Option<crate::model::CachedContent>,
45681
45682    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45683}
45684
45685#[cfg(feature = "gen-ai-cache-service")]
45686impl CreateCachedContentRequest {
45687    pub fn new() -> Self {
45688        std::default::Default::default()
45689    }
45690
45691    /// Sets the value of [parent][crate::model::CreateCachedContentRequest::parent].
45692    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45693        self.parent = v.into();
45694        self
45695    }
45696
45697    /// Sets the value of [cached_content][crate::model::CreateCachedContentRequest::cached_content].
45698    pub fn set_cached_content<T>(mut self, v: T) -> Self
45699    where
45700        T: std::convert::Into<crate::model::CachedContent>,
45701    {
45702        self.cached_content = std::option::Option::Some(v.into());
45703        self
45704    }
45705
45706    /// Sets or clears the value of [cached_content][crate::model::CreateCachedContentRequest::cached_content].
45707    pub fn set_or_clear_cached_content<T>(mut self, v: std::option::Option<T>) -> Self
45708    where
45709        T: std::convert::Into<crate::model::CachedContent>,
45710    {
45711        self.cached_content = v.map(|x| x.into());
45712        self
45713    }
45714}
45715
45716#[cfg(feature = "gen-ai-cache-service")]
45717impl wkt::message::Message for CreateCachedContentRequest {
45718    fn typename() -> &'static str {
45719        "type.googleapis.com/google.cloud.aiplatform.v1.CreateCachedContentRequest"
45720    }
45721}
45722
45723/// Request message for
45724/// [GenAiCacheService.GetCachedContent][google.cloud.aiplatform.v1.GenAiCacheService.GetCachedContent].
45725///
45726/// [google.cloud.aiplatform.v1.GenAiCacheService.GetCachedContent]: crate::client::GenAiCacheService::get_cached_content
45727#[cfg(feature = "gen-ai-cache-service")]
45728#[derive(Clone, Default, PartialEq)]
45729#[non_exhaustive]
45730pub struct GetCachedContentRequest {
45731    /// Required. The resource name referring to the cached content
45732    pub name: std::string::String,
45733
45734    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45735}
45736
45737#[cfg(feature = "gen-ai-cache-service")]
45738impl GetCachedContentRequest {
45739    pub fn new() -> Self {
45740        std::default::Default::default()
45741    }
45742
45743    /// Sets the value of [name][crate::model::GetCachedContentRequest::name].
45744    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45745        self.name = v.into();
45746        self
45747    }
45748}
45749
45750#[cfg(feature = "gen-ai-cache-service")]
45751impl wkt::message::Message for GetCachedContentRequest {
45752    fn typename() -> &'static str {
45753        "type.googleapis.com/google.cloud.aiplatform.v1.GetCachedContentRequest"
45754    }
45755}
45756
45757/// Request message for
45758/// [GenAiCacheService.UpdateCachedContent][google.cloud.aiplatform.v1.GenAiCacheService.UpdateCachedContent].
45759/// Only expire_time or ttl can be updated.
45760///
45761/// [google.cloud.aiplatform.v1.GenAiCacheService.UpdateCachedContent]: crate::client::GenAiCacheService::update_cached_content
45762#[cfg(feature = "gen-ai-cache-service")]
45763#[derive(Clone, Default, PartialEq)]
45764#[non_exhaustive]
45765pub struct UpdateCachedContentRequest {
45766    /// Required. The cached content to update
45767    pub cached_content: std::option::Option<crate::model::CachedContent>,
45768
45769    /// Required. The list of fields to update.
45770    pub update_mask: std::option::Option<wkt::FieldMask>,
45771
45772    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45773}
45774
45775#[cfg(feature = "gen-ai-cache-service")]
45776impl UpdateCachedContentRequest {
45777    pub fn new() -> Self {
45778        std::default::Default::default()
45779    }
45780
45781    /// Sets the value of [cached_content][crate::model::UpdateCachedContentRequest::cached_content].
45782    pub fn set_cached_content<T>(mut self, v: T) -> Self
45783    where
45784        T: std::convert::Into<crate::model::CachedContent>,
45785    {
45786        self.cached_content = std::option::Option::Some(v.into());
45787        self
45788    }
45789
45790    /// Sets or clears the value of [cached_content][crate::model::UpdateCachedContentRequest::cached_content].
45791    pub fn set_or_clear_cached_content<T>(mut self, v: std::option::Option<T>) -> Self
45792    where
45793        T: std::convert::Into<crate::model::CachedContent>,
45794    {
45795        self.cached_content = v.map(|x| x.into());
45796        self
45797    }
45798
45799    /// Sets the value of [update_mask][crate::model::UpdateCachedContentRequest::update_mask].
45800    pub fn set_update_mask<T>(mut self, v: T) -> Self
45801    where
45802        T: std::convert::Into<wkt::FieldMask>,
45803    {
45804        self.update_mask = std::option::Option::Some(v.into());
45805        self
45806    }
45807
45808    /// Sets or clears the value of [update_mask][crate::model::UpdateCachedContentRequest::update_mask].
45809    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
45810    where
45811        T: std::convert::Into<wkt::FieldMask>,
45812    {
45813        self.update_mask = v.map(|x| x.into());
45814        self
45815    }
45816}
45817
45818#[cfg(feature = "gen-ai-cache-service")]
45819impl wkt::message::Message for UpdateCachedContentRequest {
45820    fn typename() -> &'static str {
45821        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateCachedContentRequest"
45822    }
45823}
45824
45825/// Request message for
45826/// [GenAiCacheService.DeleteCachedContent][google.cloud.aiplatform.v1.GenAiCacheService.DeleteCachedContent].
45827///
45828/// [google.cloud.aiplatform.v1.GenAiCacheService.DeleteCachedContent]: crate::client::GenAiCacheService::delete_cached_content
45829#[cfg(feature = "gen-ai-cache-service")]
45830#[derive(Clone, Default, PartialEq)]
45831#[non_exhaustive]
45832pub struct DeleteCachedContentRequest {
45833    /// Required. The resource name referring to the cached content
45834    pub name: std::string::String,
45835
45836    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45837}
45838
45839#[cfg(feature = "gen-ai-cache-service")]
45840impl DeleteCachedContentRequest {
45841    pub fn new() -> Self {
45842        std::default::Default::default()
45843    }
45844
45845    /// Sets the value of [name][crate::model::DeleteCachedContentRequest::name].
45846    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45847        self.name = v.into();
45848        self
45849    }
45850}
45851
45852#[cfg(feature = "gen-ai-cache-service")]
45853impl wkt::message::Message for DeleteCachedContentRequest {
45854    fn typename() -> &'static str {
45855        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteCachedContentRequest"
45856    }
45857}
45858
45859/// Request to list CachedContents.
45860#[cfg(feature = "gen-ai-cache-service")]
45861#[derive(Clone, Default, PartialEq)]
45862#[non_exhaustive]
45863pub struct ListCachedContentsRequest {
45864    /// Required. The parent, which owns this collection of cached contents.
45865    pub parent: std::string::String,
45866
45867    /// Optional. The maximum number of cached contents to return. The service may
45868    /// return fewer than this value. If unspecified, some default (under maximum)
45869    /// number of items will be returned. The maximum value is 1000; values above
45870    /// 1000 will be coerced to 1000.
45871    pub page_size: i32,
45872
45873    /// Optional. A page token, received from a previous `ListCachedContents` call.
45874    /// Provide this to retrieve the subsequent page.
45875    ///
45876    /// When paginating, all other parameters provided to `ListCachedContents` must
45877    /// match the call that provided the page token.
45878    pub page_token: std::string::String,
45879
45880    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45881}
45882
45883#[cfg(feature = "gen-ai-cache-service")]
45884impl ListCachedContentsRequest {
45885    pub fn new() -> Self {
45886        std::default::Default::default()
45887    }
45888
45889    /// Sets the value of [parent][crate::model::ListCachedContentsRequest::parent].
45890    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45891        self.parent = v.into();
45892        self
45893    }
45894
45895    /// Sets the value of [page_size][crate::model::ListCachedContentsRequest::page_size].
45896    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
45897        self.page_size = v.into();
45898        self
45899    }
45900
45901    /// Sets the value of [page_token][crate::model::ListCachedContentsRequest::page_token].
45902    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45903        self.page_token = v.into();
45904        self
45905    }
45906}
45907
45908#[cfg(feature = "gen-ai-cache-service")]
45909impl wkt::message::Message for ListCachedContentsRequest {
45910    fn typename() -> &'static str {
45911        "type.googleapis.com/google.cloud.aiplatform.v1.ListCachedContentsRequest"
45912    }
45913}
45914
45915/// Response with a list of CachedContents.
45916#[cfg(feature = "gen-ai-cache-service")]
45917#[derive(Clone, Default, PartialEq)]
45918#[non_exhaustive]
45919pub struct ListCachedContentsResponse {
45920    /// List of cached contents.
45921    pub cached_contents: std::vec::Vec<crate::model::CachedContent>,
45922
45923    /// A token, which can be sent as `page_token` to retrieve the next page.
45924    /// If this field is omitted, there are no subsequent pages.
45925    pub next_page_token: std::string::String,
45926
45927    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45928}
45929
45930#[cfg(feature = "gen-ai-cache-service")]
45931impl ListCachedContentsResponse {
45932    pub fn new() -> Self {
45933        std::default::Default::default()
45934    }
45935
45936    /// Sets the value of [cached_contents][crate::model::ListCachedContentsResponse::cached_contents].
45937    pub fn set_cached_contents<T, V>(mut self, v: T) -> Self
45938    where
45939        T: std::iter::IntoIterator<Item = V>,
45940        V: std::convert::Into<crate::model::CachedContent>,
45941    {
45942        use std::iter::Iterator;
45943        self.cached_contents = v.into_iter().map(|i| i.into()).collect();
45944        self
45945    }
45946
45947    /// Sets the value of [next_page_token][crate::model::ListCachedContentsResponse::next_page_token].
45948    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
45949        self.next_page_token = v.into();
45950        self
45951    }
45952}
45953
45954#[cfg(feature = "gen-ai-cache-service")]
45955impl wkt::message::Message for ListCachedContentsResponse {
45956    fn typename() -> &'static str {
45957        "type.googleapis.com/google.cloud.aiplatform.v1.ListCachedContentsResponse"
45958    }
45959}
45960
45961#[cfg(feature = "gen-ai-cache-service")]
45962#[doc(hidden)]
45963impl gax::paginator::internal::PageableResponse for ListCachedContentsResponse {
45964    type PageItem = crate::model::CachedContent;
45965
45966    fn items(self) -> std::vec::Vec<Self::PageItem> {
45967        self.cached_contents
45968    }
45969
45970    fn next_page_token(&self) -> std::string::String {
45971        use std::clone::Clone;
45972        self.next_page_token.clone()
45973    }
45974}
45975
45976/// Request message for
45977/// [GenAiTuningService.CreateTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.CreateTuningJob].
45978///
45979/// [google.cloud.aiplatform.v1.GenAiTuningService.CreateTuningJob]: crate::client::GenAiTuningService::create_tuning_job
45980#[cfg(feature = "gen-ai-tuning-service")]
45981#[derive(Clone, Default, PartialEq)]
45982#[non_exhaustive]
45983pub struct CreateTuningJobRequest {
45984    /// Required. The resource name of the Location to create the TuningJob in.
45985    /// Format: `projects/{project}/locations/{location}`
45986    pub parent: std::string::String,
45987
45988    /// Required. The TuningJob to create.
45989    pub tuning_job: std::option::Option<crate::model::TuningJob>,
45990
45991    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
45992}
45993
45994#[cfg(feature = "gen-ai-tuning-service")]
45995impl CreateTuningJobRequest {
45996    pub fn new() -> Self {
45997        std::default::Default::default()
45998    }
45999
46000    /// Sets the value of [parent][crate::model::CreateTuningJobRequest::parent].
46001    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46002        self.parent = v.into();
46003        self
46004    }
46005
46006    /// Sets the value of [tuning_job][crate::model::CreateTuningJobRequest::tuning_job].
46007    pub fn set_tuning_job<T>(mut self, v: T) -> Self
46008    where
46009        T: std::convert::Into<crate::model::TuningJob>,
46010    {
46011        self.tuning_job = std::option::Option::Some(v.into());
46012        self
46013    }
46014
46015    /// Sets or clears the value of [tuning_job][crate::model::CreateTuningJobRequest::tuning_job].
46016    pub fn set_or_clear_tuning_job<T>(mut self, v: std::option::Option<T>) -> Self
46017    where
46018        T: std::convert::Into<crate::model::TuningJob>,
46019    {
46020        self.tuning_job = v.map(|x| x.into());
46021        self
46022    }
46023}
46024
46025#[cfg(feature = "gen-ai-tuning-service")]
46026impl wkt::message::Message for CreateTuningJobRequest {
46027    fn typename() -> &'static str {
46028        "type.googleapis.com/google.cloud.aiplatform.v1.CreateTuningJobRequest"
46029    }
46030}
46031
46032/// Request message for
46033/// [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob].
46034///
46035/// [google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]: crate::client::GenAiTuningService::get_tuning_job
46036#[cfg(feature = "gen-ai-tuning-service")]
46037#[derive(Clone, Default, PartialEq)]
46038#[non_exhaustive]
46039pub struct GetTuningJobRequest {
46040    /// Required. The name of the TuningJob resource. Format:
46041    /// `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
46042    pub name: std::string::String,
46043
46044    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
46045}
46046
46047#[cfg(feature = "gen-ai-tuning-service")]
46048impl GetTuningJobRequest {
46049    pub fn new() -> Self {
46050        std::default::Default::default()
46051    }
46052
46053    /// Sets the value of [name][crate::model::GetTuningJobRequest::name].
46054    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46055        self.name = v.into();
46056        self
46057    }
46058}
46059
46060#[cfg(feature = "gen-ai-tuning-service")]
46061impl wkt::message::Message for GetTuningJobRequest {
46062    fn typename() -> &'static str {
46063        "type.googleapis.com/google.cloud.aiplatform.v1.GetTuningJobRequest"
46064    }
46065}
46066
46067/// Request message for
46068/// [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs].
46069///
46070/// [google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs]: crate::client::GenAiTuningService::list_tuning_jobs
46071#[cfg(feature = "gen-ai-tuning-service")]
46072#[derive(Clone, Default, PartialEq)]
46073#[non_exhaustive]
46074pub struct ListTuningJobsRequest {
46075    /// Required. The resource name of the Location to list the TuningJobs from.
46076    /// Format: `projects/{project}/locations/{location}`
46077    pub parent: std::string::String,
46078
46079    /// Optional. The standard list filter.
46080    pub filter: std::string::String,
46081
46082    /// Optional. The standard list page size.
46083    pub page_size: i32,
46084
46085    /// Optional. The standard list page token.
46086    /// Typically obtained via
46087    /// [ListTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListTuningJobsResponse.next_page_token]
46088    /// of the previous GenAiTuningService.ListTuningJob][] call.
46089    ///
46090    /// [google.cloud.aiplatform.v1.ListTuningJobsResponse.next_page_token]: crate::model::ListTuningJobsResponse::next_page_token
46091    pub page_token: std::string::String,
46092
46093    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
46094}
46095
46096#[cfg(feature = "gen-ai-tuning-service")]
46097impl ListTuningJobsRequest {
46098    pub fn new() -> Self {
46099        std::default::Default::default()
46100    }
46101
46102    /// Sets the value of [parent][crate::model::ListTuningJobsRequest::parent].
46103    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46104        self.parent = v.into();
46105        self
46106    }
46107
46108    /// Sets the value of [filter][crate::model::ListTuningJobsRequest::filter].
46109    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46110        self.filter = v.into();
46111        self
46112    }
46113
46114    /// Sets the value of [page_size][crate::model::ListTuningJobsRequest::page_size].
46115    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
46116        self.page_size = v.into();
46117        self
46118    }
46119
46120    /// Sets the value of [page_token][crate::model::ListTuningJobsRequest::page_token].
46121    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46122        self.page_token = v.into();
46123        self
46124    }
46125}
46126
46127#[cfg(feature = "gen-ai-tuning-service")]
46128impl wkt::message::Message for ListTuningJobsRequest {
46129    fn typename() -> &'static str {
46130        "type.googleapis.com/google.cloud.aiplatform.v1.ListTuningJobsRequest"
46131    }
46132}
46133
46134/// Response message for
46135/// [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs]
46136///
46137/// [google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs]: crate::client::GenAiTuningService::list_tuning_jobs
46138#[cfg(feature = "gen-ai-tuning-service")]
46139#[derive(Clone, Default, PartialEq)]
46140#[non_exhaustive]
46141pub struct ListTuningJobsResponse {
46142    /// List of TuningJobs in the requested page.
46143    pub tuning_jobs: std::vec::Vec<crate::model::TuningJob>,
46144
46145    /// A token to retrieve the next page of results.
46146    /// Pass to
46147    /// [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token]
46148    /// to obtain that page.
46149    ///
46150    /// [google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token]: crate::model::ListTuningJobsRequest::page_token
46151    pub next_page_token: std::string::String,
46152
46153    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
46154}
46155
46156#[cfg(feature = "gen-ai-tuning-service")]
46157impl ListTuningJobsResponse {
46158    pub fn new() -> Self {
46159        std::default::Default::default()
46160    }
46161
46162    /// Sets the value of [tuning_jobs][crate::model::ListTuningJobsResponse::tuning_jobs].
46163    pub fn set_tuning_jobs<T, V>(mut self, v: T) -> Self
46164    where
46165        T: std::iter::IntoIterator<Item = V>,
46166        V: std::convert::Into<crate::model::TuningJob>,
46167    {
46168        use std::iter::Iterator;
46169        self.tuning_jobs = v.into_iter().map(|i| i.into()).collect();
46170        self
46171    }
46172
46173    /// Sets the value of [next_page_token][crate::model::ListTuningJobsResponse::next_page_token].
46174    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46175        self.next_page_token = v.into();
46176        self
46177    }
46178}
46179
46180#[cfg(feature = "gen-ai-tuning-service")]
46181impl wkt::message::Message for ListTuningJobsResponse {
46182    fn typename() -> &'static str {
46183        "type.googleapis.com/google.cloud.aiplatform.v1.ListTuningJobsResponse"
46184    }
46185}
46186
46187#[cfg(feature = "gen-ai-tuning-service")]
46188#[doc(hidden)]
46189impl gax::paginator::internal::PageableResponse for ListTuningJobsResponse {
46190    type PageItem = crate::model::TuningJob;
46191
46192    fn items(self) -> std::vec::Vec<Self::PageItem> {
46193        self.tuning_jobs
46194    }
46195
46196    fn next_page_token(&self) -> std::string::String {
46197        use std::clone::Clone;
46198        self.next_page_token.clone()
46199    }
46200}
46201
46202/// Request message for
46203/// [GenAiTuningService.CancelTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.CancelTuningJob].
46204///
46205/// [google.cloud.aiplatform.v1.GenAiTuningService.CancelTuningJob]: crate::client::GenAiTuningService::cancel_tuning_job
46206#[cfg(feature = "gen-ai-tuning-service")]
46207#[derive(Clone, Default, PartialEq)]
46208#[non_exhaustive]
46209pub struct CancelTuningJobRequest {
46210    /// Required. The name of the TuningJob to cancel. Format:
46211    /// `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
46212    pub name: std::string::String,
46213
46214    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
46215}
46216
46217#[cfg(feature = "gen-ai-tuning-service")]
46218impl CancelTuningJobRequest {
46219    pub fn new() -> Self {
46220        std::default::Default::default()
46221    }
46222
46223    /// Sets the value of [name][crate::model::CancelTuningJobRequest::name].
46224    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46225        self.name = v.into();
46226        self
46227    }
46228}
46229
46230#[cfg(feature = "gen-ai-tuning-service")]
46231impl wkt::message::Message for CancelTuningJobRequest {
46232    fn typename() -> &'static str {
46233        "type.googleapis.com/google.cloud.aiplatform.v1.CancelTuningJobRequest"
46234    }
46235}
46236
46237/// Request message for
46238/// [GenAiTuningService.RebaseTunedModel][google.cloud.aiplatform.v1.GenAiTuningService.RebaseTunedModel].
46239///
46240/// [google.cloud.aiplatform.v1.GenAiTuningService.RebaseTunedModel]: crate::client::GenAiTuningService::rebase_tuned_model
46241#[cfg(feature = "gen-ai-tuning-service")]
46242#[derive(Clone, Default, PartialEq)]
46243#[non_exhaustive]
46244pub struct RebaseTunedModelRequest {
46245    /// Required. The resource name of the Location into which to rebase the Model.
46246    /// Format: `projects/{project}/locations/{location}`
46247    pub parent: std::string::String,
46248
46249    /// Required. TunedModel reference to retrieve the legacy model information.
46250    pub tuned_model_ref: std::option::Option<crate::model::TunedModelRef>,
46251
46252    /// Optional. The TuningJob to be updated. Users can use this TuningJob field
46253    /// to overwrite tuning configs.
46254    pub tuning_job: std::option::Option<crate::model::TuningJob>,
46255
46256    /// Optional. The Google Cloud Storage location to write the artifacts.
46257    pub artifact_destination: std::option::Option<crate::model::GcsDestination>,
46258
46259    /// Optional. By default, bison to gemini migration will always create new
46260    /// model/endpoint, but for gemini-1.0 to gemini-1.5 migration, we default
46261    /// deploy to the same endpoint. See details in this Section.
46262    pub deploy_to_same_endpoint: bool,
46263
46264    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
46265}
46266
46267#[cfg(feature = "gen-ai-tuning-service")]
46268impl RebaseTunedModelRequest {
46269    pub fn new() -> Self {
46270        std::default::Default::default()
46271    }
46272
46273    /// Sets the value of [parent][crate::model::RebaseTunedModelRequest::parent].
46274    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46275        self.parent = v.into();
46276        self
46277    }
46278
46279    /// Sets the value of [tuned_model_ref][crate::model::RebaseTunedModelRequest::tuned_model_ref].
46280    pub fn set_tuned_model_ref<T>(mut self, v: T) -> Self
46281    where
46282        T: std::convert::Into<crate::model::TunedModelRef>,
46283    {
46284        self.tuned_model_ref = std::option::Option::Some(v.into());
46285        self
46286    }
46287
46288    /// Sets or clears the value of [tuned_model_ref][crate::model::RebaseTunedModelRequest::tuned_model_ref].
46289    pub fn set_or_clear_tuned_model_ref<T>(mut self, v: std::option::Option<T>) -> Self
46290    where
46291        T: std::convert::Into<crate::model::TunedModelRef>,
46292    {
46293        self.tuned_model_ref = v.map(|x| x.into());
46294        self
46295    }
46296
46297    /// Sets the value of [tuning_job][crate::model::RebaseTunedModelRequest::tuning_job].
46298    pub fn set_tuning_job<T>(mut self, v: T) -> Self
46299    where
46300        T: std::convert::Into<crate::model::TuningJob>,
46301    {
46302        self.tuning_job = std::option::Option::Some(v.into());
46303        self
46304    }
46305
46306    /// Sets or clears the value of [tuning_job][crate::model::RebaseTunedModelRequest::tuning_job].
46307    pub fn set_or_clear_tuning_job<T>(mut self, v: std::option::Option<T>) -> Self
46308    where
46309        T: std::convert::Into<crate::model::TuningJob>,
46310    {
46311        self.tuning_job = v.map(|x| x.into());
46312        self
46313    }
46314
46315    /// Sets the value of [artifact_destination][crate::model::RebaseTunedModelRequest::artifact_destination].
46316    pub fn set_artifact_destination<T>(mut self, v: T) -> Self
46317    where
46318        T: std::convert::Into<crate::model::GcsDestination>,
46319    {
46320        self.artifact_destination = std::option::Option::Some(v.into());
46321        self
46322    }
46323
46324    /// Sets or clears the value of [artifact_destination][crate::model::RebaseTunedModelRequest::artifact_destination].
46325    pub fn set_or_clear_artifact_destination<T>(mut self, v: std::option::Option<T>) -> Self
46326    where
46327        T: std::convert::Into<crate::model::GcsDestination>,
46328    {
46329        self.artifact_destination = v.map(|x| x.into());
46330        self
46331    }
46332
46333    /// Sets the value of [deploy_to_same_endpoint][crate::model::RebaseTunedModelRequest::deploy_to_same_endpoint].
46334    pub fn set_deploy_to_same_endpoint<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
46335        self.deploy_to_same_endpoint = v.into();
46336        self
46337    }
46338}
46339
46340#[cfg(feature = "gen-ai-tuning-service")]
46341impl wkt::message::Message for RebaseTunedModelRequest {
46342    fn typename() -> &'static str {
46343        "type.googleapis.com/google.cloud.aiplatform.v1.RebaseTunedModelRequest"
46344    }
46345}
46346
46347/// Runtime operation information for
46348/// [GenAiTuningService.RebaseTunedModel][google.cloud.aiplatform.v1.GenAiTuningService.RebaseTunedModel].
46349///
46350/// [google.cloud.aiplatform.v1.GenAiTuningService.RebaseTunedModel]: crate::client::GenAiTuningService::rebase_tuned_model
46351#[cfg(feature = "gen-ai-tuning-service")]
46352#[derive(Clone, Default, PartialEq)]
46353#[non_exhaustive]
46354pub struct RebaseTunedModelOperationMetadata {
46355    /// The common part of the operation generic information.
46356    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
46357
46358    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
46359}
46360
46361#[cfg(feature = "gen-ai-tuning-service")]
46362impl RebaseTunedModelOperationMetadata {
46363    pub fn new() -> Self {
46364        std::default::Default::default()
46365    }
46366
46367    /// Sets the value of [generic_metadata][crate::model::RebaseTunedModelOperationMetadata::generic_metadata].
46368    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
46369    where
46370        T: std::convert::Into<crate::model::GenericOperationMetadata>,
46371    {
46372        self.generic_metadata = std::option::Option::Some(v.into());
46373        self
46374    }
46375
46376    /// Sets or clears the value of [generic_metadata][crate::model::RebaseTunedModelOperationMetadata::generic_metadata].
46377    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
46378    where
46379        T: std::convert::Into<crate::model::GenericOperationMetadata>,
46380    {
46381        self.generic_metadata = v.map(|x| x.into());
46382        self
46383    }
46384}
46385
46386#[cfg(feature = "gen-ai-tuning-service")]
46387impl wkt::message::Message for RebaseTunedModelOperationMetadata {
46388    fn typename() -> &'static str {
46389        "type.googleapis.com/google.cloud.aiplatform.v1.RebaseTunedModelOperationMetadata"
46390    }
46391}
46392
46393/// Represents a HyperparameterTuningJob. A HyperparameterTuningJob
46394/// has a Study specification and multiple CustomJobs with identical
46395/// CustomJob specification.
46396#[cfg(feature = "job-service")]
46397#[derive(Clone, Default, PartialEq)]
46398#[non_exhaustive]
46399pub struct HyperparameterTuningJob {
46400    /// Output only. Resource name of the HyperparameterTuningJob.
46401    pub name: std::string::String,
46402
46403    /// Required. The display name of the HyperparameterTuningJob.
46404    /// The name can be up to 128 characters long and can consist of any UTF-8
46405    /// characters.
46406    pub display_name: std::string::String,
46407
46408    /// Required. Study configuration of the HyperparameterTuningJob.
46409    pub study_spec: std::option::Option<crate::model::StudySpec>,
46410
46411    /// Required. The desired total number of Trials.
46412    pub max_trial_count: i32,
46413
46414    /// Required. The desired number of Trials to run in parallel.
46415    pub parallel_trial_count: i32,
46416
46417    /// The number of failed Trials that need to be seen before failing
46418    /// the HyperparameterTuningJob.
46419    ///
46420    /// If set to 0, Vertex AI decides how many Trials must fail
46421    /// before the whole job fails.
46422    pub max_failed_trial_count: i32,
46423
46424    /// Required. The spec of a trial job. The same spec applies to the CustomJobs
46425    /// created in all the trials.
46426    pub trial_job_spec: std::option::Option<crate::model::CustomJobSpec>,
46427
46428    /// Output only. Trials of the HyperparameterTuningJob.
46429    pub trials: std::vec::Vec<crate::model::Trial>,
46430
46431    /// Output only. The detailed state of the job.
46432    pub state: crate::model::JobState,
46433
46434    /// Output only. Time when the HyperparameterTuningJob was created.
46435    pub create_time: std::option::Option<wkt::Timestamp>,
46436
46437    /// Output only. Time when the HyperparameterTuningJob for the first time
46438    /// entered the `JOB_STATE_RUNNING` state.
46439    pub start_time: std::option::Option<wkt::Timestamp>,
46440
46441    /// Output only. Time when the HyperparameterTuningJob entered any of the
46442    /// following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
46443    /// `JOB_STATE_CANCELLED`.
46444    pub end_time: std::option::Option<wkt::Timestamp>,
46445
46446    /// Output only. Time when the HyperparameterTuningJob was most recently
46447    /// updated.
46448    pub update_time: std::option::Option<wkt::Timestamp>,
46449
46450    /// Output only. Only populated when job's state is JOB_STATE_FAILED or
46451    /// JOB_STATE_CANCELLED.
46452    pub error: std::option::Option<rpc::model::Status>,
46453
46454    /// The labels with user-defined metadata to organize HyperparameterTuningJobs.
46455    ///
46456    /// Label keys and values can be no longer than 64 characters
46457    /// (Unicode codepoints), can only contain lowercase letters, numeric
46458    /// characters, underscores and dashes. International characters are allowed.
46459    ///
46460    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
46461    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
46462
46463    /// Customer-managed encryption key options for a HyperparameterTuningJob.
46464    /// If this is set, then all resources created by the HyperparameterTuningJob
46465    /// will be encrypted with the provided encryption key.
46466    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
46467
46468    /// Output only. Reserved for future use.
46469    pub satisfies_pzs: bool,
46470
46471    /// Output only. Reserved for future use.
46472    pub satisfies_pzi: bool,
46473
46474    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
46475}
46476
46477#[cfg(feature = "job-service")]
46478impl HyperparameterTuningJob {
46479    pub fn new() -> Self {
46480        std::default::Default::default()
46481    }
46482
46483    /// Sets the value of [name][crate::model::HyperparameterTuningJob::name].
46484    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46485        self.name = v.into();
46486        self
46487    }
46488
46489    /// Sets the value of [display_name][crate::model::HyperparameterTuningJob::display_name].
46490    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46491        self.display_name = v.into();
46492        self
46493    }
46494
46495    /// Sets the value of [study_spec][crate::model::HyperparameterTuningJob::study_spec].
46496    pub fn set_study_spec<T>(mut self, v: T) -> Self
46497    where
46498        T: std::convert::Into<crate::model::StudySpec>,
46499    {
46500        self.study_spec = std::option::Option::Some(v.into());
46501        self
46502    }
46503
46504    /// Sets or clears the value of [study_spec][crate::model::HyperparameterTuningJob::study_spec].
46505    pub fn set_or_clear_study_spec<T>(mut self, v: std::option::Option<T>) -> Self
46506    where
46507        T: std::convert::Into<crate::model::StudySpec>,
46508    {
46509        self.study_spec = v.map(|x| x.into());
46510        self
46511    }
46512
46513    /// Sets the value of [max_trial_count][crate::model::HyperparameterTuningJob::max_trial_count].
46514    pub fn set_max_trial_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
46515        self.max_trial_count = v.into();
46516        self
46517    }
46518
46519    /// Sets the value of [parallel_trial_count][crate::model::HyperparameterTuningJob::parallel_trial_count].
46520    pub fn set_parallel_trial_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
46521        self.parallel_trial_count = v.into();
46522        self
46523    }
46524
46525    /// Sets the value of [max_failed_trial_count][crate::model::HyperparameterTuningJob::max_failed_trial_count].
46526    pub fn set_max_failed_trial_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
46527        self.max_failed_trial_count = v.into();
46528        self
46529    }
46530
46531    /// Sets the value of [trial_job_spec][crate::model::HyperparameterTuningJob::trial_job_spec].
46532    pub fn set_trial_job_spec<T>(mut self, v: T) -> Self
46533    where
46534        T: std::convert::Into<crate::model::CustomJobSpec>,
46535    {
46536        self.trial_job_spec = std::option::Option::Some(v.into());
46537        self
46538    }
46539
46540    /// Sets or clears the value of [trial_job_spec][crate::model::HyperparameterTuningJob::trial_job_spec].
46541    pub fn set_or_clear_trial_job_spec<T>(mut self, v: std::option::Option<T>) -> Self
46542    where
46543        T: std::convert::Into<crate::model::CustomJobSpec>,
46544    {
46545        self.trial_job_spec = v.map(|x| x.into());
46546        self
46547    }
46548
46549    /// Sets the value of [trials][crate::model::HyperparameterTuningJob::trials].
46550    pub fn set_trials<T, V>(mut self, v: T) -> Self
46551    where
46552        T: std::iter::IntoIterator<Item = V>,
46553        V: std::convert::Into<crate::model::Trial>,
46554    {
46555        use std::iter::Iterator;
46556        self.trials = v.into_iter().map(|i| i.into()).collect();
46557        self
46558    }
46559
46560    /// Sets the value of [state][crate::model::HyperparameterTuningJob::state].
46561    pub fn set_state<T: std::convert::Into<crate::model::JobState>>(mut self, v: T) -> Self {
46562        self.state = v.into();
46563        self
46564    }
46565
46566    /// Sets the value of [create_time][crate::model::HyperparameterTuningJob::create_time].
46567    pub fn set_create_time<T>(mut self, v: T) -> Self
46568    where
46569        T: std::convert::Into<wkt::Timestamp>,
46570    {
46571        self.create_time = std::option::Option::Some(v.into());
46572        self
46573    }
46574
46575    /// Sets or clears the value of [create_time][crate::model::HyperparameterTuningJob::create_time].
46576    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
46577    where
46578        T: std::convert::Into<wkt::Timestamp>,
46579    {
46580        self.create_time = v.map(|x| x.into());
46581        self
46582    }
46583
46584    /// Sets the value of [start_time][crate::model::HyperparameterTuningJob::start_time].
46585    pub fn set_start_time<T>(mut self, v: T) -> Self
46586    where
46587        T: std::convert::Into<wkt::Timestamp>,
46588    {
46589        self.start_time = std::option::Option::Some(v.into());
46590        self
46591    }
46592
46593    /// Sets or clears the value of [start_time][crate::model::HyperparameterTuningJob::start_time].
46594    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
46595    where
46596        T: std::convert::Into<wkt::Timestamp>,
46597    {
46598        self.start_time = v.map(|x| x.into());
46599        self
46600    }
46601
46602    /// Sets the value of [end_time][crate::model::HyperparameterTuningJob::end_time].
46603    pub fn set_end_time<T>(mut self, v: T) -> Self
46604    where
46605        T: std::convert::Into<wkt::Timestamp>,
46606    {
46607        self.end_time = std::option::Option::Some(v.into());
46608        self
46609    }
46610
46611    /// Sets or clears the value of [end_time][crate::model::HyperparameterTuningJob::end_time].
46612    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
46613    where
46614        T: std::convert::Into<wkt::Timestamp>,
46615    {
46616        self.end_time = v.map(|x| x.into());
46617        self
46618    }
46619
46620    /// Sets the value of [update_time][crate::model::HyperparameterTuningJob::update_time].
46621    pub fn set_update_time<T>(mut self, v: T) -> Self
46622    where
46623        T: std::convert::Into<wkt::Timestamp>,
46624    {
46625        self.update_time = std::option::Option::Some(v.into());
46626        self
46627    }
46628
46629    /// Sets or clears the value of [update_time][crate::model::HyperparameterTuningJob::update_time].
46630    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
46631    where
46632        T: std::convert::Into<wkt::Timestamp>,
46633    {
46634        self.update_time = v.map(|x| x.into());
46635        self
46636    }
46637
46638    /// Sets the value of [error][crate::model::HyperparameterTuningJob::error].
46639    pub fn set_error<T>(mut self, v: T) -> Self
46640    where
46641        T: std::convert::Into<rpc::model::Status>,
46642    {
46643        self.error = std::option::Option::Some(v.into());
46644        self
46645    }
46646
46647    /// Sets or clears the value of [error][crate::model::HyperparameterTuningJob::error].
46648    pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
46649    where
46650        T: std::convert::Into<rpc::model::Status>,
46651    {
46652        self.error = v.map(|x| x.into());
46653        self
46654    }
46655
46656    /// Sets the value of [labels][crate::model::HyperparameterTuningJob::labels].
46657    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
46658    where
46659        T: std::iter::IntoIterator<Item = (K, V)>,
46660        K: std::convert::Into<std::string::String>,
46661        V: std::convert::Into<std::string::String>,
46662    {
46663        use std::iter::Iterator;
46664        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
46665        self
46666    }
46667
46668    /// Sets the value of [encryption_spec][crate::model::HyperparameterTuningJob::encryption_spec].
46669    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
46670    where
46671        T: std::convert::Into<crate::model::EncryptionSpec>,
46672    {
46673        self.encryption_spec = std::option::Option::Some(v.into());
46674        self
46675    }
46676
46677    /// Sets or clears the value of [encryption_spec][crate::model::HyperparameterTuningJob::encryption_spec].
46678    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
46679    where
46680        T: std::convert::Into<crate::model::EncryptionSpec>,
46681    {
46682        self.encryption_spec = v.map(|x| x.into());
46683        self
46684    }
46685
46686    /// Sets the value of [satisfies_pzs][crate::model::HyperparameterTuningJob::satisfies_pzs].
46687    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
46688        self.satisfies_pzs = v.into();
46689        self
46690    }
46691
46692    /// Sets the value of [satisfies_pzi][crate::model::HyperparameterTuningJob::satisfies_pzi].
46693    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
46694        self.satisfies_pzi = v.into();
46695        self
46696    }
46697}
46698
46699#[cfg(feature = "job-service")]
46700impl wkt::message::Message for HyperparameterTuningJob {
46701    fn typename() -> &'static str {
46702        "type.googleapis.com/google.cloud.aiplatform.v1.HyperparameterTuningJob"
46703    }
46704}
46705
46706/// A representation of a collection of database items organized in a way that
46707/// allows for approximate nearest neighbor (a.k.a ANN) algorithms search.
46708#[cfg(feature = "index-service")]
46709#[derive(Clone, Default, PartialEq)]
46710#[non_exhaustive]
46711pub struct Index {
46712    /// Output only. The resource name of the Index.
46713    pub name: std::string::String,
46714
46715    /// Required. The display name of the Index.
46716    /// The name can be up to 128 characters long and can consist of any UTF-8
46717    /// characters.
46718    pub display_name: std::string::String,
46719
46720    /// The description of the Index.
46721    pub description: std::string::String,
46722
46723    /// Immutable. Points to a YAML file stored on Google Cloud Storage describing
46724    /// additional information about the Index, that is specific to it. Unset if
46725    /// the Index does not have any additional information. The schema is defined
46726    /// as an OpenAPI 3.0.2 [Schema
46727    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
46728    /// Note: The URI given on output will be immutable and probably different,
46729    /// including the URI scheme, than the one given on input. The output URI will
46730    /// point to a location where the user only has a read access.
46731    pub metadata_schema_uri: std::string::String,
46732
46733    /// An additional information about the Index; the schema of the metadata can
46734    /// be found in
46735    /// [metadata_schema][google.cloud.aiplatform.v1.Index.metadata_schema_uri].
46736    ///
46737    /// [google.cloud.aiplatform.v1.Index.metadata_schema_uri]: crate::model::Index::metadata_schema_uri
46738    pub metadata: std::option::Option<wkt::Value>,
46739
46740    /// Output only. The pointers to DeployedIndexes created from this Index.
46741    /// An Index can be only deleted if all its DeployedIndexes had been undeployed
46742    /// first.
46743    pub deployed_indexes: std::vec::Vec<crate::model::DeployedIndexRef>,
46744
46745    /// Used to perform consistent read-modify-write updates. If not set, a blind
46746    /// "overwrite" update happens.
46747    pub etag: std::string::String,
46748
46749    /// The labels with user-defined metadata to organize your Indexes.
46750    ///
46751    /// Label keys and values can be no longer than 64 characters
46752    /// (Unicode codepoints), can only contain lowercase letters, numeric
46753    /// characters, underscores and dashes. International characters are allowed.
46754    ///
46755    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
46756    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
46757
46758    /// Output only. Timestamp when this Index was created.
46759    pub create_time: std::option::Option<wkt::Timestamp>,
46760
46761    /// Output only. Timestamp when this Index was most recently updated.
46762    /// This also includes any update to the contents of the Index.
46763    /// Note that Operations working on this Index may have their
46764    /// [Operations.metadata.generic_metadata.update_time]
46765    /// [google.cloud.aiplatform.v1.GenericOperationMetadata.update_time] a little
46766    /// after the value of this timestamp, yet that does not mean their results are
46767    /// not already reflected in the Index. Result of any successfully completed
46768    /// Operation on the Index is reflected in it.
46769    pub update_time: std::option::Option<wkt::Timestamp>,
46770
46771    /// Output only. Stats of the index resource.
46772    pub index_stats: std::option::Option<crate::model::IndexStats>,
46773
46774    /// Immutable. The update method to use with this Index. If not set,
46775    /// BATCH_UPDATE will be used by default.
46776    pub index_update_method: crate::model::index::IndexUpdateMethod,
46777
46778    /// Immutable. Customer-managed encryption key spec for an Index. If set, this
46779    /// Index and all sub-resources of this Index will be secured by this key.
46780    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
46781
46782    /// Output only. Reserved for future use.
46783    pub satisfies_pzs: bool,
46784
46785    /// Output only. Reserved for future use.
46786    pub satisfies_pzi: bool,
46787
46788    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
46789}
46790
46791#[cfg(feature = "index-service")]
46792impl Index {
46793    pub fn new() -> Self {
46794        std::default::Default::default()
46795    }
46796
46797    /// Sets the value of [name][crate::model::Index::name].
46798    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46799        self.name = v.into();
46800        self
46801    }
46802
46803    /// Sets the value of [display_name][crate::model::Index::display_name].
46804    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46805        self.display_name = v.into();
46806        self
46807    }
46808
46809    /// Sets the value of [description][crate::model::Index::description].
46810    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46811        self.description = v.into();
46812        self
46813    }
46814
46815    /// Sets the value of [metadata_schema_uri][crate::model::Index::metadata_schema_uri].
46816    pub fn set_metadata_schema_uri<T: std::convert::Into<std::string::String>>(
46817        mut self,
46818        v: T,
46819    ) -> Self {
46820        self.metadata_schema_uri = v.into();
46821        self
46822    }
46823
46824    /// Sets the value of [metadata][crate::model::Index::metadata].
46825    pub fn set_metadata<T>(mut self, v: T) -> Self
46826    where
46827        T: std::convert::Into<wkt::Value>,
46828    {
46829        self.metadata = std::option::Option::Some(v.into());
46830        self
46831    }
46832
46833    /// Sets or clears the value of [metadata][crate::model::Index::metadata].
46834    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
46835    where
46836        T: std::convert::Into<wkt::Value>,
46837    {
46838        self.metadata = v.map(|x| x.into());
46839        self
46840    }
46841
46842    /// Sets the value of [deployed_indexes][crate::model::Index::deployed_indexes].
46843    pub fn set_deployed_indexes<T, V>(mut self, v: T) -> Self
46844    where
46845        T: std::iter::IntoIterator<Item = V>,
46846        V: std::convert::Into<crate::model::DeployedIndexRef>,
46847    {
46848        use std::iter::Iterator;
46849        self.deployed_indexes = v.into_iter().map(|i| i.into()).collect();
46850        self
46851    }
46852
46853    /// Sets the value of [etag][crate::model::Index::etag].
46854    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
46855        self.etag = v.into();
46856        self
46857    }
46858
46859    /// Sets the value of [labels][crate::model::Index::labels].
46860    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
46861    where
46862        T: std::iter::IntoIterator<Item = (K, V)>,
46863        K: std::convert::Into<std::string::String>,
46864        V: std::convert::Into<std::string::String>,
46865    {
46866        use std::iter::Iterator;
46867        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
46868        self
46869    }
46870
46871    /// Sets the value of [create_time][crate::model::Index::create_time].
46872    pub fn set_create_time<T>(mut self, v: T) -> Self
46873    where
46874        T: std::convert::Into<wkt::Timestamp>,
46875    {
46876        self.create_time = std::option::Option::Some(v.into());
46877        self
46878    }
46879
46880    /// Sets or clears the value of [create_time][crate::model::Index::create_time].
46881    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
46882    where
46883        T: std::convert::Into<wkt::Timestamp>,
46884    {
46885        self.create_time = v.map(|x| x.into());
46886        self
46887    }
46888
46889    /// Sets the value of [update_time][crate::model::Index::update_time].
46890    pub fn set_update_time<T>(mut self, v: T) -> Self
46891    where
46892        T: std::convert::Into<wkt::Timestamp>,
46893    {
46894        self.update_time = std::option::Option::Some(v.into());
46895        self
46896    }
46897
46898    /// Sets or clears the value of [update_time][crate::model::Index::update_time].
46899    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
46900    where
46901        T: std::convert::Into<wkt::Timestamp>,
46902    {
46903        self.update_time = v.map(|x| x.into());
46904        self
46905    }
46906
46907    /// Sets the value of [index_stats][crate::model::Index::index_stats].
46908    pub fn set_index_stats<T>(mut self, v: T) -> Self
46909    where
46910        T: std::convert::Into<crate::model::IndexStats>,
46911    {
46912        self.index_stats = std::option::Option::Some(v.into());
46913        self
46914    }
46915
46916    /// Sets or clears the value of [index_stats][crate::model::Index::index_stats].
46917    pub fn set_or_clear_index_stats<T>(mut self, v: std::option::Option<T>) -> Self
46918    where
46919        T: std::convert::Into<crate::model::IndexStats>,
46920    {
46921        self.index_stats = v.map(|x| x.into());
46922        self
46923    }
46924
46925    /// Sets the value of [index_update_method][crate::model::Index::index_update_method].
46926    pub fn set_index_update_method<
46927        T: std::convert::Into<crate::model::index::IndexUpdateMethod>,
46928    >(
46929        mut self,
46930        v: T,
46931    ) -> Self {
46932        self.index_update_method = v.into();
46933        self
46934    }
46935
46936    /// Sets the value of [encryption_spec][crate::model::Index::encryption_spec].
46937    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
46938    where
46939        T: std::convert::Into<crate::model::EncryptionSpec>,
46940    {
46941        self.encryption_spec = std::option::Option::Some(v.into());
46942        self
46943    }
46944
46945    /// Sets or clears the value of [encryption_spec][crate::model::Index::encryption_spec].
46946    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
46947    where
46948        T: std::convert::Into<crate::model::EncryptionSpec>,
46949    {
46950        self.encryption_spec = v.map(|x| x.into());
46951        self
46952    }
46953
46954    /// Sets the value of [satisfies_pzs][crate::model::Index::satisfies_pzs].
46955    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
46956        self.satisfies_pzs = v.into();
46957        self
46958    }
46959
46960    /// Sets the value of [satisfies_pzi][crate::model::Index::satisfies_pzi].
46961    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
46962        self.satisfies_pzi = v.into();
46963        self
46964    }
46965}
46966
46967#[cfg(feature = "index-service")]
46968impl wkt::message::Message for Index {
46969    fn typename() -> &'static str {
46970        "type.googleapis.com/google.cloud.aiplatform.v1.Index"
46971    }
46972}
46973
46974/// Defines additional types related to [Index].
46975#[cfg(feature = "index-service")]
46976pub mod index {
46977    #[allow(unused_imports)]
46978    use super::*;
46979
46980    /// The update method of an Index.
46981    ///
46982    /// # Working with unknown values
46983    ///
46984    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
46985    /// additional enum variants at any time. Adding new variants is not considered
46986    /// a breaking change. Applications should write their code in anticipation of:
46987    ///
46988    /// - New values appearing in future releases of the client library, **and**
46989    /// - New values received dynamically, without application changes.
46990    ///
46991    /// Please consult the [Working with enums] section in the user guide for some
46992    /// guidelines.
46993    ///
46994    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
46995    #[cfg(feature = "index-service")]
46996    #[derive(Clone, Debug, PartialEq)]
46997    #[non_exhaustive]
46998    pub enum IndexUpdateMethod {
46999        /// Should not be used.
47000        Unspecified,
47001        /// BatchUpdate: user can call UpdateIndex with files on Cloud Storage of
47002        /// Datapoints to update.
47003        BatchUpdate,
47004        /// StreamUpdate: user can call UpsertDatapoints/DeleteDatapoints to update
47005        /// the Index and the updates will be applied in corresponding
47006        /// DeployedIndexes in nearly real-time.
47007        StreamUpdate,
47008        /// If set, the enum was initialized with an unknown value.
47009        ///
47010        /// Applications can examine the value using [IndexUpdateMethod::value] or
47011        /// [IndexUpdateMethod::name].
47012        UnknownValue(index_update_method::UnknownValue),
47013    }
47014
47015    #[doc(hidden)]
47016    #[cfg(feature = "index-service")]
47017    pub mod index_update_method {
47018        #[allow(unused_imports)]
47019        use super::*;
47020        #[derive(Clone, Debug, PartialEq)]
47021        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
47022    }
47023
47024    #[cfg(feature = "index-service")]
47025    impl IndexUpdateMethod {
47026        /// Gets the enum value.
47027        ///
47028        /// Returns `None` if the enum contains an unknown value deserialized from
47029        /// the string representation of enums.
47030        pub fn value(&self) -> std::option::Option<i32> {
47031            match self {
47032                Self::Unspecified => std::option::Option::Some(0),
47033                Self::BatchUpdate => std::option::Option::Some(1),
47034                Self::StreamUpdate => std::option::Option::Some(2),
47035                Self::UnknownValue(u) => u.0.value(),
47036            }
47037        }
47038
47039        /// Gets the enum value as a string.
47040        ///
47041        /// Returns `None` if the enum contains an unknown value deserialized from
47042        /// the integer representation of enums.
47043        pub fn name(&self) -> std::option::Option<&str> {
47044            match self {
47045                Self::Unspecified => std::option::Option::Some("INDEX_UPDATE_METHOD_UNSPECIFIED"),
47046                Self::BatchUpdate => std::option::Option::Some("BATCH_UPDATE"),
47047                Self::StreamUpdate => std::option::Option::Some("STREAM_UPDATE"),
47048                Self::UnknownValue(u) => u.0.name(),
47049            }
47050        }
47051    }
47052
47053    #[cfg(feature = "index-service")]
47054    impl std::default::Default for IndexUpdateMethod {
47055        fn default() -> Self {
47056            use std::convert::From;
47057            Self::from(0)
47058        }
47059    }
47060
47061    #[cfg(feature = "index-service")]
47062    impl std::fmt::Display for IndexUpdateMethod {
47063        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
47064            wkt::internal::display_enum(f, self.name(), self.value())
47065        }
47066    }
47067
47068    #[cfg(feature = "index-service")]
47069    impl std::convert::From<i32> for IndexUpdateMethod {
47070        fn from(value: i32) -> Self {
47071            match value {
47072                0 => Self::Unspecified,
47073                1 => Self::BatchUpdate,
47074                2 => Self::StreamUpdate,
47075                _ => Self::UnknownValue(index_update_method::UnknownValue(
47076                    wkt::internal::UnknownEnumValue::Integer(value),
47077                )),
47078            }
47079        }
47080    }
47081
47082    #[cfg(feature = "index-service")]
47083    impl std::convert::From<&str> for IndexUpdateMethod {
47084        fn from(value: &str) -> Self {
47085            use std::string::ToString;
47086            match value {
47087                "INDEX_UPDATE_METHOD_UNSPECIFIED" => Self::Unspecified,
47088                "BATCH_UPDATE" => Self::BatchUpdate,
47089                "STREAM_UPDATE" => Self::StreamUpdate,
47090                _ => Self::UnknownValue(index_update_method::UnknownValue(
47091                    wkt::internal::UnknownEnumValue::String(value.to_string()),
47092                )),
47093            }
47094        }
47095    }
47096
47097    #[cfg(feature = "index-service")]
47098    impl serde::ser::Serialize for IndexUpdateMethod {
47099        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
47100        where
47101            S: serde::Serializer,
47102        {
47103            match self {
47104                Self::Unspecified => serializer.serialize_i32(0),
47105                Self::BatchUpdate => serializer.serialize_i32(1),
47106                Self::StreamUpdate => serializer.serialize_i32(2),
47107                Self::UnknownValue(u) => u.0.serialize(serializer),
47108            }
47109        }
47110    }
47111
47112    #[cfg(feature = "index-service")]
47113    impl<'de> serde::de::Deserialize<'de> for IndexUpdateMethod {
47114        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
47115        where
47116            D: serde::Deserializer<'de>,
47117        {
47118            deserializer.deserialize_any(wkt::internal::EnumVisitor::<IndexUpdateMethod>::new(
47119                ".google.cloud.aiplatform.v1.Index.IndexUpdateMethod",
47120            ))
47121        }
47122    }
47123}
47124
47125/// A datapoint of Index.
47126#[cfg(any(feature = "index-service", feature = "match-service",))]
47127#[derive(Clone, Default, PartialEq)]
47128#[non_exhaustive]
47129pub struct IndexDatapoint {
47130    /// Required. Unique identifier of the datapoint.
47131    pub datapoint_id: std::string::String,
47132
47133    /// Required. Feature embedding vector for dense index. An array of numbers
47134    /// with the length of [NearestNeighborSearchConfig.dimensions].
47135    pub feature_vector: std::vec::Vec<f32>,
47136
47137    /// Optional. Feature embedding vector for sparse index.
47138    pub sparse_embedding: std::option::Option<crate::model::index_datapoint::SparseEmbedding>,
47139
47140    /// Optional. List of Restrict of the datapoint, used to perform "restricted
47141    /// searches" where boolean rule are used to filter the subset of the database
47142    /// eligible for matching. This uses categorical tokens. See:
47143    /// <https://cloud.google.com/vertex-ai/docs/matching-engine/filtering>
47144    pub restricts: std::vec::Vec<crate::model::index_datapoint::Restriction>,
47145
47146    /// Optional. List of Restrict of the datapoint, used to perform "restricted
47147    /// searches" where boolean rule are used to filter the subset of the database
47148    /// eligible for matching. This uses numeric comparisons.
47149    pub numeric_restricts: std::vec::Vec<crate::model::index_datapoint::NumericRestriction>,
47150
47151    /// Optional. CrowdingTag of the datapoint, the number of neighbors to return
47152    /// in each crowding can be configured during query.
47153    pub crowding_tag: std::option::Option<crate::model::index_datapoint::CrowdingTag>,
47154
47155    /// Optional. The key-value map of additional metadata for the datapoint.
47156    pub embedding_metadata: std::option::Option<wkt::Struct>,
47157
47158    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
47159}
47160
47161#[cfg(any(feature = "index-service", feature = "match-service",))]
47162impl IndexDatapoint {
47163    pub fn new() -> Self {
47164        std::default::Default::default()
47165    }
47166
47167    /// Sets the value of [datapoint_id][crate::model::IndexDatapoint::datapoint_id].
47168    pub fn set_datapoint_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
47169        self.datapoint_id = v.into();
47170        self
47171    }
47172
47173    /// Sets the value of [feature_vector][crate::model::IndexDatapoint::feature_vector].
47174    pub fn set_feature_vector<T, V>(mut self, v: T) -> Self
47175    where
47176        T: std::iter::IntoIterator<Item = V>,
47177        V: std::convert::Into<f32>,
47178    {
47179        use std::iter::Iterator;
47180        self.feature_vector = v.into_iter().map(|i| i.into()).collect();
47181        self
47182    }
47183
47184    /// Sets the value of [sparse_embedding][crate::model::IndexDatapoint::sparse_embedding].
47185    pub fn set_sparse_embedding<T>(mut self, v: T) -> Self
47186    where
47187        T: std::convert::Into<crate::model::index_datapoint::SparseEmbedding>,
47188    {
47189        self.sparse_embedding = std::option::Option::Some(v.into());
47190        self
47191    }
47192
47193    /// Sets or clears the value of [sparse_embedding][crate::model::IndexDatapoint::sparse_embedding].
47194    pub fn set_or_clear_sparse_embedding<T>(mut self, v: std::option::Option<T>) -> Self
47195    where
47196        T: std::convert::Into<crate::model::index_datapoint::SparseEmbedding>,
47197    {
47198        self.sparse_embedding = v.map(|x| x.into());
47199        self
47200    }
47201
47202    /// Sets the value of [restricts][crate::model::IndexDatapoint::restricts].
47203    pub fn set_restricts<T, V>(mut self, v: T) -> Self
47204    where
47205        T: std::iter::IntoIterator<Item = V>,
47206        V: std::convert::Into<crate::model::index_datapoint::Restriction>,
47207    {
47208        use std::iter::Iterator;
47209        self.restricts = v.into_iter().map(|i| i.into()).collect();
47210        self
47211    }
47212
47213    /// Sets the value of [numeric_restricts][crate::model::IndexDatapoint::numeric_restricts].
47214    pub fn set_numeric_restricts<T, V>(mut self, v: T) -> Self
47215    where
47216        T: std::iter::IntoIterator<Item = V>,
47217        V: std::convert::Into<crate::model::index_datapoint::NumericRestriction>,
47218    {
47219        use std::iter::Iterator;
47220        self.numeric_restricts = v.into_iter().map(|i| i.into()).collect();
47221        self
47222    }
47223
47224    /// Sets the value of [crowding_tag][crate::model::IndexDatapoint::crowding_tag].
47225    pub fn set_crowding_tag<T>(mut self, v: T) -> Self
47226    where
47227        T: std::convert::Into<crate::model::index_datapoint::CrowdingTag>,
47228    {
47229        self.crowding_tag = std::option::Option::Some(v.into());
47230        self
47231    }
47232
47233    /// Sets or clears the value of [crowding_tag][crate::model::IndexDatapoint::crowding_tag].
47234    pub fn set_or_clear_crowding_tag<T>(mut self, v: std::option::Option<T>) -> Self
47235    where
47236        T: std::convert::Into<crate::model::index_datapoint::CrowdingTag>,
47237    {
47238        self.crowding_tag = v.map(|x| x.into());
47239        self
47240    }
47241
47242    /// Sets the value of [embedding_metadata][crate::model::IndexDatapoint::embedding_metadata].
47243    pub fn set_embedding_metadata<T>(mut self, v: T) -> Self
47244    where
47245        T: std::convert::Into<wkt::Struct>,
47246    {
47247        self.embedding_metadata = std::option::Option::Some(v.into());
47248        self
47249    }
47250
47251    /// Sets or clears the value of [embedding_metadata][crate::model::IndexDatapoint::embedding_metadata].
47252    pub fn set_or_clear_embedding_metadata<T>(mut self, v: std::option::Option<T>) -> Self
47253    where
47254        T: std::convert::Into<wkt::Struct>,
47255    {
47256        self.embedding_metadata = v.map(|x| x.into());
47257        self
47258    }
47259}
47260
47261#[cfg(any(feature = "index-service", feature = "match-service",))]
47262impl wkt::message::Message for IndexDatapoint {
47263    fn typename() -> &'static str {
47264        "type.googleapis.com/google.cloud.aiplatform.v1.IndexDatapoint"
47265    }
47266}
47267
47268/// Defines additional types related to [IndexDatapoint].
47269#[cfg(any(feature = "index-service", feature = "match-service",))]
47270pub mod index_datapoint {
47271    #[allow(unused_imports)]
47272    use super::*;
47273
47274    /// Feature embedding vector for sparse index. An array of numbers whose values
47275    /// are located in the specified dimensions.
47276    #[cfg(any(feature = "index-service", feature = "match-service",))]
47277    #[derive(Clone, Default, PartialEq)]
47278    #[non_exhaustive]
47279    pub struct SparseEmbedding {
47280        /// Required. The list of embedding values of the sparse vector.
47281        pub values: std::vec::Vec<f32>,
47282
47283        /// Required. The list of indexes for the embedding values of the sparse
47284        /// vector.
47285        pub dimensions: std::vec::Vec<i64>,
47286
47287        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
47288    }
47289
47290    #[cfg(any(feature = "index-service", feature = "match-service",))]
47291    impl SparseEmbedding {
47292        pub fn new() -> Self {
47293            std::default::Default::default()
47294        }
47295
47296        /// Sets the value of [values][crate::model::index_datapoint::SparseEmbedding::values].
47297        pub fn set_values<T, V>(mut self, v: T) -> Self
47298        where
47299            T: std::iter::IntoIterator<Item = V>,
47300            V: std::convert::Into<f32>,
47301        {
47302            use std::iter::Iterator;
47303            self.values = v.into_iter().map(|i| i.into()).collect();
47304            self
47305        }
47306
47307        /// Sets the value of [dimensions][crate::model::index_datapoint::SparseEmbedding::dimensions].
47308        pub fn set_dimensions<T, V>(mut self, v: T) -> Self
47309        where
47310            T: std::iter::IntoIterator<Item = V>,
47311            V: std::convert::Into<i64>,
47312        {
47313            use std::iter::Iterator;
47314            self.dimensions = v.into_iter().map(|i| i.into()).collect();
47315            self
47316        }
47317    }
47318
47319    #[cfg(any(feature = "index-service", feature = "match-service",))]
47320    impl wkt::message::Message for SparseEmbedding {
47321        fn typename() -> &'static str {
47322            "type.googleapis.com/google.cloud.aiplatform.v1.IndexDatapoint.SparseEmbedding"
47323        }
47324    }
47325
47326    /// Restriction of a datapoint which describe its attributes(tokens) from each
47327    /// of several attribute categories(namespaces).
47328    #[cfg(any(feature = "index-service", feature = "match-service",))]
47329    #[derive(Clone, Default, PartialEq)]
47330    #[non_exhaustive]
47331    pub struct Restriction {
47332        /// The namespace of this restriction. e.g.: color.
47333        pub namespace: std::string::String,
47334
47335        /// The attributes to allow in this namespace. e.g.: 'red'
47336        pub allow_list: std::vec::Vec<std::string::String>,
47337
47338        /// The attributes to deny in this namespace. e.g.: 'blue'
47339        pub deny_list: std::vec::Vec<std::string::String>,
47340
47341        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
47342    }
47343
47344    #[cfg(any(feature = "index-service", feature = "match-service",))]
47345    impl Restriction {
47346        pub fn new() -> Self {
47347            std::default::Default::default()
47348        }
47349
47350        /// Sets the value of [namespace][crate::model::index_datapoint::Restriction::namespace].
47351        pub fn set_namespace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
47352            self.namespace = v.into();
47353            self
47354        }
47355
47356        /// Sets the value of [allow_list][crate::model::index_datapoint::Restriction::allow_list].
47357        pub fn set_allow_list<T, V>(mut self, v: T) -> Self
47358        where
47359            T: std::iter::IntoIterator<Item = V>,
47360            V: std::convert::Into<std::string::String>,
47361        {
47362            use std::iter::Iterator;
47363            self.allow_list = v.into_iter().map(|i| i.into()).collect();
47364            self
47365        }
47366
47367        /// Sets the value of [deny_list][crate::model::index_datapoint::Restriction::deny_list].
47368        pub fn set_deny_list<T, V>(mut self, v: T) -> Self
47369        where
47370            T: std::iter::IntoIterator<Item = V>,
47371            V: std::convert::Into<std::string::String>,
47372        {
47373            use std::iter::Iterator;
47374            self.deny_list = v.into_iter().map(|i| i.into()).collect();
47375            self
47376        }
47377    }
47378
47379    #[cfg(any(feature = "index-service", feature = "match-service",))]
47380    impl wkt::message::Message for Restriction {
47381        fn typename() -> &'static str {
47382            "type.googleapis.com/google.cloud.aiplatform.v1.IndexDatapoint.Restriction"
47383        }
47384    }
47385
47386    /// This field allows restricts to be based on numeric comparisons rather
47387    /// than categorical tokens.
47388    #[cfg(any(feature = "index-service", feature = "match-service",))]
47389    #[derive(Clone, Default, PartialEq)]
47390    #[non_exhaustive]
47391    pub struct NumericRestriction {
47392        /// The namespace of this restriction. e.g.: cost.
47393        pub namespace: std::string::String,
47394
47395        /// This MUST be specified for queries and must NOT be specified for
47396        /// datapoints.
47397        pub op: crate::model::index_datapoint::numeric_restriction::Operator,
47398
47399        /// The type of Value must be consistent for all datapoints with a given
47400        /// namespace name. This is verified at runtime.
47401        pub value: std::option::Option<crate::model::index_datapoint::numeric_restriction::Value>,
47402
47403        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
47404    }
47405
47406    #[cfg(any(feature = "index-service", feature = "match-service",))]
47407    impl NumericRestriction {
47408        pub fn new() -> Self {
47409            std::default::Default::default()
47410        }
47411
47412        /// Sets the value of [namespace][crate::model::index_datapoint::NumericRestriction::namespace].
47413        pub fn set_namespace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
47414            self.namespace = v.into();
47415            self
47416        }
47417
47418        /// Sets the value of [op][crate::model::index_datapoint::NumericRestriction::op].
47419        pub fn set_op<
47420            T: std::convert::Into<crate::model::index_datapoint::numeric_restriction::Operator>,
47421        >(
47422            mut self,
47423            v: T,
47424        ) -> Self {
47425            self.op = v.into();
47426            self
47427        }
47428
47429        /// Sets the value of [value][crate::model::index_datapoint::NumericRestriction::value].
47430        ///
47431        /// Note that all the setters affecting `value` are mutually
47432        /// exclusive.
47433        pub fn set_value<
47434            T: std::convert::Into<
47435                    std::option::Option<crate::model::index_datapoint::numeric_restriction::Value>,
47436                >,
47437        >(
47438            mut self,
47439            v: T,
47440        ) -> Self {
47441            self.value = v.into();
47442            self
47443        }
47444
47445        /// The value of [value][crate::model::index_datapoint::NumericRestriction::value]
47446        /// if it holds a `ValueInt`, `None` if the field is not set or
47447        /// holds a different branch.
47448        pub fn value_int(&self) -> std::option::Option<&i64> {
47449            #[allow(unreachable_patterns)]
47450            self.value.as_ref().and_then(|v| match v {
47451                crate::model::index_datapoint::numeric_restriction::Value::ValueInt(v) => {
47452                    std::option::Option::Some(v)
47453                }
47454                _ => std::option::Option::None,
47455            })
47456        }
47457
47458        /// Sets the value of [value][crate::model::index_datapoint::NumericRestriction::value]
47459        /// to hold a `ValueInt`.
47460        ///
47461        /// Note that all the setters affecting `value` are
47462        /// mutually exclusive.
47463        pub fn set_value_int<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
47464            self.value = std::option::Option::Some(
47465                crate::model::index_datapoint::numeric_restriction::Value::ValueInt(v.into()),
47466            );
47467            self
47468        }
47469
47470        /// The value of [value][crate::model::index_datapoint::NumericRestriction::value]
47471        /// if it holds a `ValueFloat`, `None` if the field is not set or
47472        /// holds a different branch.
47473        pub fn value_float(&self) -> std::option::Option<&f32> {
47474            #[allow(unreachable_patterns)]
47475            self.value.as_ref().and_then(|v| match v {
47476                crate::model::index_datapoint::numeric_restriction::Value::ValueFloat(v) => {
47477                    std::option::Option::Some(v)
47478                }
47479                _ => std::option::Option::None,
47480            })
47481        }
47482
47483        /// Sets the value of [value][crate::model::index_datapoint::NumericRestriction::value]
47484        /// to hold a `ValueFloat`.
47485        ///
47486        /// Note that all the setters affecting `value` are
47487        /// mutually exclusive.
47488        pub fn set_value_float<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
47489            self.value = std::option::Option::Some(
47490                crate::model::index_datapoint::numeric_restriction::Value::ValueFloat(v.into()),
47491            );
47492            self
47493        }
47494
47495        /// The value of [value][crate::model::index_datapoint::NumericRestriction::value]
47496        /// if it holds a `ValueDouble`, `None` if the field is not set or
47497        /// holds a different branch.
47498        pub fn value_double(&self) -> std::option::Option<&f64> {
47499            #[allow(unreachable_patterns)]
47500            self.value.as_ref().and_then(|v| match v {
47501                crate::model::index_datapoint::numeric_restriction::Value::ValueDouble(v) => {
47502                    std::option::Option::Some(v)
47503                }
47504                _ => std::option::Option::None,
47505            })
47506        }
47507
47508        /// Sets the value of [value][crate::model::index_datapoint::NumericRestriction::value]
47509        /// to hold a `ValueDouble`.
47510        ///
47511        /// Note that all the setters affecting `value` are
47512        /// mutually exclusive.
47513        pub fn set_value_double<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
47514            self.value = std::option::Option::Some(
47515                crate::model::index_datapoint::numeric_restriction::Value::ValueDouble(v.into()),
47516            );
47517            self
47518        }
47519    }
47520
47521    #[cfg(any(feature = "index-service", feature = "match-service",))]
47522    impl wkt::message::Message for NumericRestriction {
47523        fn typename() -> &'static str {
47524            "type.googleapis.com/google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction"
47525        }
47526    }
47527
47528    /// Defines additional types related to [NumericRestriction].
47529    #[cfg(any(feature = "index-service", feature = "match-service",))]
47530    pub mod numeric_restriction {
47531        #[allow(unused_imports)]
47532        use super::*;
47533
47534        /// Which comparison operator to use.  Should be specified for queries only;
47535        /// specifying this for a datapoint is an error.
47536        ///
47537        /// Datapoints for which Operator is true relative to the query's Value
47538        /// field will be allowlisted.
47539        ///
47540        /// # Working with unknown values
47541        ///
47542        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
47543        /// additional enum variants at any time. Adding new variants is not considered
47544        /// a breaking change. Applications should write their code in anticipation of:
47545        ///
47546        /// - New values appearing in future releases of the client library, **and**
47547        /// - New values received dynamically, without application changes.
47548        ///
47549        /// Please consult the [Working with enums] section in the user guide for some
47550        /// guidelines.
47551        ///
47552        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
47553        #[cfg(any(feature = "index-service", feature = "match-service",))]
47554        #[derive(Clone, Debug, PartialEq)]
47555        #[non_exhaustive]
47556        pub enum Operator {
47557            /// Default value of the enum.
47558            Unspecified,
47559            /// Datapoints are eligible iff their value is < the query's.
47560            Less,
47561            /// Datapoints are eligible iff their value is <= the query's.
47562            LessEqual,
47563            /// Datapoints are eligible iff their value is == the query's.
47564            Equal,
47565            /// Datapoints are eligible iff their value is >= the query's.
47566            GreaterEqual,
47567            /// Datapoints are eligible iff their value is > the query's.
47568            Greater,
47569            /// Datapoints are eligible iff their value is != the query's.
47570            NotEqual,
47571            /// If set, the enum was initialized with an unknown value.
47572            ///
47573            /// Applications can examine the value using [Operator::value] or
47574            /// [Operator::name].
47575            UnknownValue(operator::UnknownValue),
47576        }
47577
47578        #[doc(hidden)]
47579        #[cfg(any(feature = "index-service", feature = "match-service",))]
47580        pub mod operator {
47581            #[allow(unused_imports)]
47582            use super::*;
47583            #[derive(Clone, Debug, PartialEq)]
47584            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
47585        }
47586
47587        #[cfg(any(feature = "index-service", feature = "match-service",))]
47588        impl Operator {
47589            /// Gets the enum value.
47590            ///
47591            /// Returns `None` if the enum contains an unknown value deserialized from
47592            /// the string representation of enums.
47593            pub fn value(&self) -> std::option::Option<i32> {
47594                match self {
47595                    Self::Unspecified => std::option::Option::Some(0),
47596                    Self::Less => std::option::Option::Some(1),
47597                    Self::LessEqual => std::option::Option::Some(2),
47598                    Self::Equal => std::option::Option::Some(3),
47599                    Self::GreaterEqual => std::option::Option::Some(4),
47600                    Self::Greater => std::option::Option::Some(5),
47601                    Self::NotEqual => std::option::Option::Some(6),
47602                    Self::UnknownValue(u) => u.0.value(),
47603                }
47604            }
47605
47606            /// Gets the enum value as a string.
47607            ///
47608            /// Returns `None` if the enum contains an unknown value deserialized from
47609            /// the integer representation of enums.
47610            pub fn name(&self) -> std::option::Option<&str> {
47611                match self {
47612                    Self::Unspecified => std::option::Option::Some("OPERATOR_UNSPECIFIED"),
47613                    Self::Less => std::option::Option::Some("LESS"),
47614                    Self::LessEqual => std::option::Option::Some("LESS_EQUAL"),
47615                    Self::Equal => std::option::Option::Some("EQUAL"),
47616                    Self::GreaterEqual => std::option::Option::Some("GREATER_EQUAL"),
47617                    Self::Greater => std::option::Option::Some("GREATER"),
47618                    Self::NotEqual => std::option::Option::Some("NOT_EQUAL"),
47619                    Self::UnknownValue(u) => u.0.name(),
47620                }
47621            }
47622        }
47623
47624        #[cfg(any(feature = "index-service", feature = "match-service",))]
47625        impl std::default::Default for Operator {
47626            fn default() -> Self {
47627                use std::convert::From;
47628                Self::from(0)
47629            }
47630        }
47631
47632        #[cfg(any(feature = "index-service", feature = "match-service",))]
47633        impl std::fmt::Display for Operator {
47634            fn fmt(
47635                &self,
47636                f: &mut std::fmt::Formatter<'_>,
47637            ) -> std::result::Result<(), std::fmt::Error> {
47638                wkt::internal::display_enum(f, self.name(), self.value())
47639            }
47640        }
47641
47642        #[cfg(any(feature = "index-service", feature = "match-service",))]
47643        impl std::convert::From<i32> for Operator {
47644            fn from(value: i32) -> Self {
47645                match value {
47646                    0 => Self::Unspecified,
47647                    1 => Self::Less,
47648                    2 => Self::LessEqual,
47649                    3 => Self::Equal,
47650                    4 => Self::GreaterEqual,
47651                    5 => Self::Greater,
47652                    6 => Self::NotEqual,
47653                    _ => Self::UnknownValue(operator::UnknownValue(
47654                        wkt::internal::UnknownEnumValue::Integer(value),
47655                    )),
47656                }
47657            }
47658        }
47659
47660        #[cfg(any(feature = "index-service", feature = "match-service",))]
47661        impl std::convert::From<&str> for Operator {
47662            fn from(value: &str) -> Self {
47663                use std::string::ToString;
47664                match value {
47665                    "OPERATOR_UNSPECIFIED" => Self::Unspecified,
47666                    "LESS" => Self::Less,
47667                    "LESS_EQUAL" => Self::LessEqual,
47668                    "EQUAL" => Self::Equal,
47669                    "GREATER_EQUAL" => Self::GreaterEqual,
47670                    "GREATER" => Self::Greater,
47671                    "NOT_EQUAL" => Self::NotEqual,
47672                    _ => Self::UnknownValue(operator::UnknownValue(
47673                        wkt::internal::UnknownEnumValue::String(value.to_string()),
47674                    )),
47675                }
47676            }
47677        }
47678
47679        #[cfg(any(feature = "index-service", feature = "match-service",))]
47680        impl serde::ser::Serialize for Operator {
47681            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
47682            where
47683                S: serde::Serializer,
47684            {
47685                match self {
47686                    Self::Unspecified => serializer.serialize_i32(0),
47687                    Self::Less => serializer.serialize_i32(1),
47688                    Self::LessEqual => serializer.serialize_i32(2),
47689                    Self::Equal => serializer.serialize_i32(3),
47690                    Self::GreaterEqual => serializer.serialize_i32(4),
47691                    Self::Greater => serializer.serialize_i32(5),
47692                    Self::NotEqual => serializer.serialize_i32(6),
47693                    Self::UnknownValue(u) => u.0.serialize(serializer),
47694                }
47695            }
47696        }
47697
47698        #[cfg(any(feature = "index-service", feature = "match-service",))]
47699        impl<'de> serde::de::Deserialize<'de> for Operator {
47700            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
47701            where
47702                D: serde::Deserializer<'de>,
47703            {
47704                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Operator>::new(
47705                    ".google.cloud.aiplatform.v1.IndexDatapoint.NumericRestriction.Operator",
47706                ))
47707            }
47708        }
47709
47710        /// The type of Value must be consistent for all datapoints with a given
47711        /// namespace name. This is verified at runtime.
47712        #[cfg(any(feature = "index-service", feature = "match-service",))]
47713        #[derive(Clone, Debug, PartialEq)]
47714        #[non_exhaustive]
47715        pub enum Value {
47716            /// Represents 64 bit integer.
47717            ValueInt(i64),
47718            /// Represents 32 bit float.
47719            ValueFloat(f32),
47720            /// Represents 64 bit float.
47721            ValueDouble(f64),
47722        }
47723    }
47724
47725    /// Crowding tag is a constraint on a neighbor list produced by nearest
47726    /// neighbor search requiring that no more than some value k' of the k
47727    /// neighbors returned have the same value of crowding_attribute.
47728    #[cfg(any(feature = "index-service", feature = "match-service",))]
47729    #[derive(Clone, Default, PartialEq)]
47730    #[non_exhaustive]
47731    pub struct CrowdingTag {
47732        /// The attribute value used for crowding.  The maximum number of neighbors
47733        /// to return per crowding attribute value
47734        /// (per_crowding_attribute_num_neighbors) is configured per-query. This
47735        /// field is ignored if per_crowding_attribute_num_neighbors is larger than
47736        /// the total number of neighbors to return for a given query.
47737        pub crowding_attribute: std::string::String,
47738
47739        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
47740    }
47741
47742    #[cfg(any(feature = "index-service", feature = "match-service",))]
47743    impl CrowdingTag {
47744        pub fn new() -> Self {
47745            std::default::Default::default()
47746        }
47747
47748        /// Sets the value of [crowding_attribute][crate::model::index_datapoint::CrowdingTag::crowding_attribute].
47749        pub fn set_crowding_attribute<T: std::convert::Into<std::string::String>>(
47750            mut self,
47751            v: T,
47752        ) -> Self {
47753            self.crowding_attribute = v.into();
47754            self
47755        }
47756    }
47757
47758    #[cfg(any(feature = "index-service", feature = "match-service",))]
47759    impl wkt::message::Message for CrowdingTag {
47760        fn typename() -> &'static str {
47761            "type.googleapis.com/google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag"
47762        }
47763    }
47764}
47765
47766/// Stats of the Index.
47767#[cfg(feature = "index-service")]
47768#[derive(Clone, Default, PartialEq)]
47769#[non_exhaustive]
47770pub struct IndexStats {
47771    /// Output only. The number of dense vectors in the Index.
47772    pub vectors_count: i64,
47773
47774    /// Output only. The number of sparse vectors in the Index.
47775    pub sparse_vectors_count: i64,
47776
47777    /// Output only. The number of shards in the Index.
47778    pub shards_count: i32,
47779
47780    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
47781}
47782
47783#[cfg(feature = "index-service")]
47784impl IndexStats {
47785    pub fn new() -> Self {
47786        std::default::Default::default()
47787    }
47788
47789    /// Sets the value of [vectors_count][crate::model::IndexStats::vectors_count].
47790    pub fn set_vectors_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
47791        self.vectors_count = v.into();
47792        self
47793    }
47794
47795    /// Sets the value of [sparse_vectors_count][crate::model::IndexStats::sparse_vectors_count].
47796    pub fn set_sparse_vectors_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
47797        self.sparse_vectors_count = v.into();
47798        self
47799    }
47800
47801    /// Sets the value of [shards_count][crate::model::IndexStats::shards_count].
47802    pub fn set_shards_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
47803        self.shards_count = v.into();
47804        self
47805    }
47806}
47807
47808#[cfg(feature = "index-service")]
47809impl wkt::message::Message for IndexStats {
47810    fn typename() -> &'static str {
47811        "type.googleapis.com/google.cloud.aiplatform.v1.IndexStats"
47812    }
47813}
47814
47815/// Indexes are deployed into it. An IndexEndpoint can have multiple
47816/// DeployedIndexes.
47817#[cfg(feature = "index-endpoint-service")]
47818#[derive(Clone, Default, PartialEq)]
47819#[non_exhaustive]
47820pub struct IndexEndpoint {
47821    /// Output only. The resource name of the IndexEndpoint.
47822    pub name: std::string::String,
47823
47824    /// Required. The display name of the IndexEndpoint.
47825    /// The name can be up to 128 characters long and can consist of any UTF-8
47826    /// characters.
47827    pub display_name: std::string::String,
47828
47829    /// The description of the IndexEndpoint.
47830    pub description: std::string::String,
47831
47832    /// Output only. The indexes deployed in this endpoint.
47833    pub deployed_indexes: std::vec::Vec<crate::model::DeployedIndex>,
47834
47835    /// Used to perform consistent read-modify-write updates. If not set, a blind
47836    /// "overwrite" update happens.
47837    pub etag: std::string::String,
47838
47839    /// The labels with user-defined metadata to organize your IndexEndpoints.
47840    ///
47841    /// Label keys and values can be no longer than 64 characters
47842    /// (Unicode codepoints), can only contain lowercase letters, numeric
47843    /// characters, underscores and dashes. International characters are allowed.
47844    ///
47845    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
47846    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
47847
47848    /// Output only. Timestamp when this IndexEndpoint was created.
47849    pub create_time: std::option::Option<wkt::Timestamp>,
47850
47851    /// Output only. Timestamp when this IndexEndpoint was last updated.
47852    /// This timestamp is not updated when the endpoint's DeployedIndexes are
47853    /// updated, e.g. due to updates of the original Indexes they are the
47854    /// deployments of.
47855    pub update_time: std::option::Option<wkt::Timestamp>,
47856
47857    /// Optional. The full name of the Google Compute Engine
47858    /// [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks)
47859    /// to which the IndexEndpoint should be peered.
47860    ///
47861    /// Private services access must already be configured for the network. If left
47862    /// unspecified, the Endpoint is not peered with any network.
47863    ///
47864    /// [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
47865    /// [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
47866    /// are mutually exclusive.
47867    ///
47868    /// [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert):
47869    /// `projects/{project}/global/networks/{network}`.
47870    /// Where {project} is a project number, as in '12345', and {network} is
47871    /// network name.
47872    ///
47873    /// [google.cloud.aiplatform.v1.IndexEndpoint.network]: crate::model::IndexEndpoint::network
47874    /// [google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]: crate::model::IndexEndpoint::private_service_connect_config
47875    pub network: std::string::String,
47876
47877    /// Optional. Deprecated: If true, expose the IndexEndpoint via private service
47878    /// connect.
47879    ///
47880    /// Only one of the fields,
47881    /// [network][google.cloud.aiplatform.v1.IndexEndpoint.network] or
47882    /// [enable_private_service_connect][google.cloud.aiplatform.v1.IndexEndpoint.enable_private_service_connect],
47883    /// can be set.
47884    ///
47885    /// [google.cloud.aiplatform.v1.IndexEndpoint.enable_private_service_connect]: crate::model::IndexEndpoint::enable_private_service_connect
47886    /// [google.cloud.aiplatform.v1.IndexEndpoint.network]: crate::model::IndexEndpoint::network
47887    #[deprecated]
47888    pub enable_private_service_connect: bool,
47889
47890    /// Optional. Configuration for private service connect.
47891    ///
47892    /// [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
47893    /// [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
47894    /// are mutually exclusive.
47895    ///
47896    /// [google.cloud.aiplatform.v1.IndexEndpoint.network]: crate::model::IndexEndpoint::network
47897    /// [google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]: crate::model::IndexEndpoint::private_service_connect_config
47898    pub private_service_connect_config:
47899        std::option::Option<crate::model::PrivateServiceConnectConfig>,
47900
47901    /// Optional. If true, the deployed index will be accessible through public
47902    /// endpoint.
47903    pub public_endpoint_enabled: bool,
47904
47905    /// Output only. If
47906    /// [public_endpoint_enabled][google.cloud.aiplatform.v1.IndexEndpoint.public_endpoint_enabled]
47907    /// is true, this field will be populated with the domain name to use for this
47908    /// index endpoint.
47909    ///
47910    /// [google.cloud.aiplatform.v1.IndexEndpoint.public_endpoint_enabled]: crate::model::IndexEndpoint::public_endpoint_enabled
47911    pub public_endpoint_domain_name: std::string::String,
47912
47913    /// Immutable. Customer-managed encryption key spec for an IndexEndpoint. If
47914    /// set, this IndexEndpoint and all sub-resources of this IndexEndpoint will be
47915    /// secured by this key.
47916    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
47917
47918    /// Output only. Reserved for future use.
47919    pub satisfies_pzs: bool,
47920
47921    /// Output only. Reserved for future use.
47922    pub satisfies_pzi: bool,
47923
47924    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
47925}
47926
47927#[cfg(feature = "index-endpoint-service")]
47928impl IndexEndpoint {
47929    pub fn new() -> Self {
47930        std::default::Default::default()
47931    }
47932
47933    /// Sets the value of [name][crate::model::IndexEndpoint::name].
47934    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
47935        self.name = v.into();
47936        self
47937    }
47938
47939    /// Sets the value of [display_name][crate::model::IndexEndpoint::display_name].
47940    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
47941        self.display_name = v.into();
47942        self
47943    }
47944
47945    /// Sets the value of [description][crate::model::IndexEndpoint::description].
47946    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
47947        self.description = v.into();
47948        self
47949    }
47950
47951    /// Sets the value of [deployed_indexes][crate::model::IndexEndpoint::deployed_indexes].
47952    pub fn set_deployed_indexes<T, V>(mut self, v: T) -> Self
47953    where
47954        T: std::iter::IntoIterator<Item = V>,
47955        V: std::convert::Into<crate::model::DeployedIndex>,
47956    {
47957        use std::iter::Iterator;
47958        self.deployed_indexes = v.into_iter().map(|i| i.into()).collect();
47959        self
47960    }
47961
47962    /// Sets the value of [etag][crate::model::IndexEndpoint::etag].
47963    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
47964        self.etag = v.into();
47965        self
47966    }
47967
47968    /// Sets the value of [labels][crate::model::IndexEndpoint::labels].
47969    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
47970    where
47971        T: std::iter::IntoIterator<Item = (K, V)>,
47972        K: std::convert::Into<std::string::String>,
47973        V: std::convert::Into<std::string::String>,
47974    {
47975        use std::iter::Iterator;
47976        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
47977        self
47978    }
47979
47980    /// Sets the value of [create_time][crate::model::IndexEndpoint::create_time].
47981    pub fn set_create_time<T>(mut self, v: T) -> Self
47982    where
47983        T: std::convert::Into<wkt::Timestamp>,
47984    {
47985        self.create_time = std::option::Option::Some(v.into());
47986        self
47987    }
47988
47989    /// Sets or clears the value of [create_time][crate::model::IndexEndpoint::create_time].
47990    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
47991    where
47992        T: std::convert::Into<wkt::Timestamp>,
47993    {
47994        self.create_time = v.map(|x| x.into());
47995        self
47996    }
47997
47998    /// Sets the value of [update_time][crate::model::IndexEndpoint::update_time].
47999    pub fn set_update_time<T>(mut self, v: T) -> Self
48000    where
48001        T: std::convert::Into<wkt::Timestamp>,
48002    {
48003        self.update_time = std::option::Option::Some(v.into());
48004        self
48005    }
48006
48007    /// Sets or clears the value of [update_time][crate::model::IndexEndpoint::update_time].
48008    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
48009    where
48010        T: std::convert::Into<wkt::Timestamp>,
48011    {
48012        self.update_time = v.map(|x| x.into());
48013        self
48014    }
48015
48016    /// Sets the value of [network][crate::model::IndexEndpoint::network].
48017    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
48018        self.network = v.into();
48019        self
48020    }
48021
48022    /// Sets the value of [enable_private_service_connect][crate::model::IndexEndpoint::enable_private_service_connect].
48023    #[deprecated]
48024    pub fn set_enable_private_service_connect<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
48025        self.enable_private_service_connect = v.into();
48026        self
48027    }
48028
48029    /// Sets the value of [private_service_connect_config][crate::model::IndexEndpoint::private_service_connect_config].
48030    pub fn set_private_service_connect_config<T>(mut self, v: T) -> Self
48031    where
48032        T: std::convert::Into<crate::model::PrivateServiceConnectConfig>,
48033    {
48034        self.private_service_connect_config = std::option::Option::Some(v.into());
48035        self
48036    }
48037
48038    /// Sets or clears the value of [private_service_connect_config][crate::model::IndexEndpoint::private_service_connect_config].
48039    pub fn set_or_clear_private_service_connect_config<T>(
48040        mut self,
48041        v: std::option::Option<T>,
48042    ) -> Self
48043    where
48044        T: std::convert::Into<crate::model::PrivateServiceConnectConfig>,
48045    {
48046        self.private_service_connect_config = v.map(|x| x.into());
48047        self
48048    }
48049
48050    /// Sets the value of [public_endpoint_enabled][crate::model::IndexEndpoint::public_endpoint_enabled].
48051    pub fn set_public_endpoint_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
48052        self.public_endpoint_enabled = v.into();
48053        self
48054    }
48055
48056    /// Sets the value of [public_endpoint_domain_name][crate::model::IndexEndpoint::public_endpoint_domain_name].
48057    pub fn set_public_endpoint_domain_name<T: std::convert::Into<std::string::String>>(
48058        mut self,
48059        v: T,
48060    ) -> Self {
48061        self.public_endpoint_domain_name = v.into();
48062        self
48063    }
48064
48065    /// Sets the value of [encryption_spec][crate::model::IndexEndpoint::encryption_spec].
48066    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
48067    where
48068        T: std::convert::Into<crate::model::EncryptionSpec>,
48069    {
48070        self.encryption_spec = std::option::Option::Some(v.into());
48071        self
48072    }
48073
48074    /// Sets or clears the value of [encryption_spec][crate::model::IndexEndpoint::encryption_spec].
48075    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
48076    where
48077        T: std::convert::Into<crate::model::EncryptionSpec>,
48078    {
48079        self.encryption_spec = v.map(|x| x.into());
48080        self
48081    }
48082
48083    /// Sets the value of [satisfies_pzs][crate::model::IndexEndpoint::satisfies_pzs].
48084    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
48085        self.satisfies_pzs = v.into();
48086        self
48087    }
48088
48089    /// Sets the value of [satisfies_pzi][crate::model::IndexEndpoint::satisfies_pzi].
48090    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
48091        self.satisfies_pzi = v.into();
48092        self
48093    }
48094}
48095
48096#[cfg(feature = "index-endpoint-service")]
48097impl wkt::message::Message for IndexEndpoint {
48098    fn typename() -> &'static str {
48099        "type.googleapis.com/google.cloud.aiplatform.v1.IndexEndpoint"
48100    }
48101}
48102
48103/// A deployment of an Index. IndexEndpoints contain one or more DeployedIndexes.
48104#[cfg(feature = "index-endpoint-service")]
48105#[derive(Clone, Default, PartialEq)]
48106#[non_exhaustive]
48107pub struct DeployedIndex {
48108    /// Required. The user specified ID of the DeployedIndex.
48109    /// The ID can be up to 128 characters long and must start with a letter and
48110    /// only contain letters, numbers, and underscores.
48111    /// The ID must be unique within the project it is created in.
48112    pub id: std::string::String,
48113
48114    /// Required. The name of the Index this is the deployment of.
48115    /// We may refer to this Index as the DeployedIndex's "original" Index.
48116    pub index: std::string::String,
48117
48118    /// The display name of the DeployedIndex. If not provided upon creation,
48119    /// the Index's display_name is used.
48120    pub display_name: std::string::String,
48121
48122    /// Output only. Timestamp when the DeployedIndex was created.
48123    pub create_time: std::option::Option<wkt::Timestamp>,
48124
48125    /// Output only. Provides paths for users to send requests directly to the
48126    /// deployed index services running on Cloud via private services access. This
48127    /// field is populated if
48128    /// [network][google.cloud.aiplatform.v1.IndexEndpoint.network] is configured.
48129    ///
48130    /// [google.cloud.aiplatform.v1.IndexEndpoint.network]: crate::model::IndexEndpoint::network
48131    pub private_endpoints: std::option::Option<crate::model::IndexPrivateEndpoints>,
48132
48133    /// Output only. The DeployedIndex may depend on various data on its original
48134    /// Index. Additionally when certain changes to the original Index are being
48135    /// done (e.g. when what the Index contains is being changed) the DeployedIndex
48136    /// may be asynchronously updated in the background to reflect these changes.
48137    /// If this timestamp's value is at least the
48138    /// [Index.update_time][google.cloud.aiplatform.v1.Index.update_time] of the
48139    /// original Index, it means that this DeployedIndex and the original Index are
48140    /// in sync. If this timestamp is older, then to see which updates this
48141    /// DeployedIndex already contains (and which it does not), one must
48142    /// [list][google.longrunning.Operations.ListOperations] the operations that
48143    /// are running on the original Index. Only the successfully completed
48144    /// Operations with
48145    /// [update_time][google.cloud.aiplatform.v1.GenericOperationMetadata.update_time]
48146    /// equal or before this sync time are contained in this DeployedIndex.
48147    ///
48148    /// [google.cloud.aiplatform.v1.GenericOperationMetadata.update_time]: crate::model::GenericOperationMetadata::update_time
48149    /// [google.cloud.aiplatform.v1.Index.update_time]: crate::model::Index::update_time
48150    pub index_sync_time: std::option::Option<wkt::Timestamp>,
48151
48152    /// Optional. A description of resources that the DeployedIndex uses, which to
48153    /// large degree are decided by Vertex AI, and optionally allows only a modest
48154    /// additional configuration.
48155    /// If min_replica_count is not set, the default value is 2 (we don't provide
48156    /// SLA when min_replica_count=1). If max_replica_count is not set, the
48157    /// default value is min_replica_count. The max allowed replica count is
48158    /// 1000.
48159    pub automatic_resources: std::option::Option<crate::model::AutomaticResources>,
48160
48161    /// Optional. A description of resources that are dedicated to the
48162    /// DeployedIndex, and that need a higher degree of manual configuration. The
48163    /// field min_replica_count must be set to a value strictly greater than 0, or
48164    /// else validation will fail. We don't provide SLA when min_replica_count=1.
48165    /// If max_replica_count is not set, the default value is min_replica_count.
48166    /// The max allowed replica count is 1000.
48167    ///
48168    /// Available machine types for SMALL shard:
48169    /// e2-standard-2 and all machine types available for MEDIUM and LARGE shard.
48170    ///
48171    /// Available machine types for MEDIUM shard:
48172    /// e2-standard-16 and all machine types available for LARGE shard.
48173    ///
48174    /// Available machine types for LARGE shard:
48175    /// e2-highmem-16, n2d-standard-32.
48176    ///
48177    /// n1-standard-16 and n1-standard-32 are still available, but we recommend
48178    /// e2-standard-16 and e2-highmem-16 for cost efficiency.
48179    pub dedicated_resources: std::option::Option<crate::model::DedicatedResources>,
48180
48181    /// Optional. If true, private endpoint's access logs are sent to Cloud
48182    /// Logging.
48183    ///
48184    /// These logs are like standard server access logs, containing
48185    /// information like timestamp and latency for each MatchRequest.
48186    ///
48187    /// Note that logs may incur a cost, especially if the deployed
48188    /// index receives a high queries per second rate (QPS).
48189    /// Estimate your costs before enabling this option.
48190    pub enable_access_logging: bool,
48191
48192    /// Optional. If true, logs to Cloud Logging errors relating to datapoint
48193    /// upserts.
48194    ///
48195    /// Under normal operation conditions, these log entries should be very rare.
48196    /// However, if incompatible datapoint updates are being uploaded to an index,
48197    /// a high volume of log entries may be generated in a short period of time.
48198    ///
48199    /// Note that logs may incur a cost, especially if the deployed index receives
48200    /// a high volume of datapoint upserts. Estimate your costs before enabling
48201    /// this option.
48202    pub enable_datapoint_upsert_logging: bool,
48203
48204    /// Optional. If set, the authentication is enabled for the private endpoint.
48205    pub deployed_index_auth_config: std::option::Option<crate::model::DeployedIndexAuthConfig>,
48206
48207    /// Optional. A list of reserved ip ranges under the VPC network that can be
48208    /// used for this DeployedIndex.
48209    ///
48210    /// If set, we will deploy the index within the provided ip ranges. Otherwise,
48211    /// the index might be deployed to any ip ranges under the provided VPC
48212    /// network.
48213    ///
48214    /// The value should be the name of the address
48215    /// (<https://cloud.google.com/compute/docs/reference/rest/v1/addresses>)
48216    /// Example: ['vertex-ai-ip-range'].
48217    ///
48218    /// For more information about subnets and network IP ranges, please see
48219    /// <https://cloud.google.com/vpc/docs/subnets#manually_created_subnet_ip_ranges>.
48220    pub reserved_ip_ranges: std::vec::Vec<std::string::String>,
48221
48222    /// Optional. The deployment group can be no longer than 64 characters (eg:
48223    /// 'test', 'prod'). If not set, we will use the 'default' deployment group.
48224    ///
48225    /// Creating `deployment_groups` with `reserved_ip_ranges` is a recommended
48226    /// practice when the peered network has multiple peering ranges. This creates
48227    /// your deployments from predictable IP spaces for easier traffic
48228    /// administration. Also, one deployment_group (except 'default') can only be
48229    /// used with the same reserved_ip_ranges which means if the deployment_group
48230    /// has been used with reserved_ip_ranges: [a, b, c], using it with [a, b] or
48231    /// [d, e] is disallowed.
48232    ///
48233    /// Note: we only support up to 5 deployment groups(not including 'default').
48234    pub deployment_group: std::string::String,
48235
48236    /// Optional. The deployment tier that the index is deployed to.
48237    /// DEPLOYMENT_TIER_UNSPECIFIED will use a system-chosen default tier.
48238    pub deployment_tier: crate::model::deployed_index::DeploymentTier,
48239
48240    /// Optional. If set for PSC deployed index, PSC connection will be
48241    /// automatically created after deployment is done and the endpoint information
48242    /// is populated in private_endpoints.psc_automated_endpoints.
48243    pub psc_automation_configs: std::vec::Vec<crate::model::PSCAutomationConfig>,
48244
48245    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
48246}
48247
48248#[cfg(feature = "index-endpoint-service")]
48249impl DeployedIndex {
48250    pub fn new() -> Self {
48251        std::default::Default::default()
48252    }
48253
48254    /// Sets the value of [id][crate::model::DeployedIndex::id].
48255    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
48256        self.id = v.into();
48257        self
48258    }
48259
48260    /// Sets the value of [index][crate::model::DeployedIndex::index].
48261    pub fn set_index<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
48262        self.index = v.into();
48263        self
48264    }
48265
48266    /// Sets the value of [display_name][crate::model::DeployedIndex::display_name].
48267    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
48268        self.display_name = v.into();
48269        self
48270    }
48271
48272    /// Sets the value of [create_time][crate::model::DeployedIndex::create_time].
48273    pub fn set_create_time<T>(mut self, v: T) -> Self
48274    where
48275        T: std::convert::Into<wkt::Timestamp>,
48276    {
48277        self.create_time = std::option::Option::Some(v.into());
48278        self
48279    }
48280
48281    /// Sets or clears the value of [create_time][crate::model::DeployedIndex::create_time].
48282    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
48283    where
48284        T: std::convert::Into<wkt::Timestamp>,
48285    {
48286        self.create_time = v.map(|x| x.into());
48287        self
48288    }
48289
48290    /// Sets the value of [private_endpoints][crate::model::DeployedIndex::private_endpoints].
48291    pub fn set_private_endpoints<T>(mut self, v: T) -> Self
48292    where
48293        T: std::convert::Into<crate::model::IndexPrivateEndpoints>,
48294    {
48295        self.private_endpoints = std::option::Option::Some(v.into());
48296        self
48297    }
48298
48299    /// Sets or clears the value of [private_endpoints][crate::model::DeployedIndex::private_endpoints].
48300    pub fn set_or_clear_private_endpoints<T>(mut self, v: std::option::Option<T>) -> Self
48301    where
48302        T: std::convert::Into<crate::model::IndexPrivateEndpoints>,
48303    {
48304        self.private_endpoints = v.map(|x| x.into());
48305        self
48306    }
48307
48308    /// Sets the value of [index_sync_time][crate::model::DeployedIndex::index_sync_time].
48309    pub fn set_index_sync_time<T>(mut self, v: T) -> Self
48310    where
48311        T: std::convert::Into<wkt::Timestamp>,
48312    {
48313        self.index_sync_time = std::option::Option::Some(v.into());
48314        self
48315    }
48316
48317    /// Sets or clears the value of [index_sync_time][crate::model::DeployedIndex::index_sync_time].
48318    pub fn set_or_clear_index_sync_time<T>(mut self, v: std::option::Option<T>) -> Self
48319    where
48320        T: std::convert::Into<wkt::Timestamp>,
48321    {
48322        self.index_sync_time = v.map(|x| x.into());
48323        self
48324    }
48325
48326    /// Sets the value of [automatic_resources][crate::model::DeployedIndex::automatic_resources].
48327    pub fn set_automatic_resources<T>(mut self, v: T) -> Self
48328    where
48329        T: std::convert::Into<crate::model::AutomaticResources>,
48330    {
48331        self.automatic_resources = std::option::Option::Some(v.into());
48332        self
48333    }
48334
48335    /// Sets or clears the value of [automatic_resources][crate::model::DeployedIndex::automatic_resources].
48336    pub fn set_or_clear_automatic_resources<T>(mut self, v: std::option::Option<T>) -> Self
48337    where
48338        T: std::convert::Into<crate::model::AutomaticResources>,
48339    {
48340        self.automatic_resources = v.map(|x| x.into());
48341        self
48342    }
48343
48344    /// Sets the value of [dedicated_resources][crate::model::DeployedIndex::dedicated_resources].
48345    pub fn set_dedicated_resources<T>(mut self, v: T) -> Self
48346    where
48347        T: std::convert::Into<crate::model::DedicatedResources>,
48348    {
48349        self.dedicated_resources = std::option::Option::Some(v.into());
48350        self
48351    }
48352
48353    /// Sets or clears the value of [dedicated_resources][crate::model::DeployedIndex::dedicated_resources].
48354    pub fn set_or_clear_dedicated_resources<T>(mut self, v: std::option::Option<T>) -> Self
48355    where
48356        T: std::convert::Into<crate::model::DedicatedResources>,
48357    {
48358        self.dedicated_resources = v.map(|x| x.into());
48359        self
48360    }
48361
48362    /// Sets the value of [enable_access_logging][crate::model::DeployedIndex::enable_access_logging].
48363    pub fn set_enable_access_logging<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
48364        self.enable_access_logging = v.into();
48365        self
48366    }
48367
48368    /// Sets the value of [enable_datapoint_upsert_logging][crate::model::DeployedIndex::enable_datapoint_upsert_logging].
48369    pub fn set_enable_datapoint_upsert_logging<T: std::convert::Into<bool>>(
48370        mut self,
48371        v: T,
48372    ) -> Self {
48373        self.enable_datapoint_upsert_logging = v.into();
48374        self
48375    }
48376
48377    /// Sets the value of [deployed_index_auth_config][crate::model::DeployedIndex::deployed_index_auth_config].
48378    pub fn set_deployed_index_auth_config<T>(mut self, v: T) -> Self
48379    where
48380        T: std::convert::Into<crate::model::DeployedIndexAuthConfig>,
48381    {
48382        self.deployed_index_auth_config = std::option::Option::Some(v.into());
48383        self
48384    }
48385
48386    /// Sets or clears the value of [deployed_index_auth_config][crate::model::DeployedIndex::deployed_index_auth_config].
48387    pub fn set_or_clear_deployed_index_auth_config<T>(mut self, v: std::option::Option<T>) -> Self
48388    where
48389        T: std::convert::Into<crate::model::DeployedIndexAuthConfig>,
48390    {
48391        self.deployed_index_auth_config = v.map(|x| x.into());
48392        self
48393    }
48394
48395    /// Sets the value of [reserved_ip_ranges][crate::model::DeployedIndex::reserved_ip_ranges].
48396    pub fn set_reserved_ip_ranges<T, V>(mut self, v: T) -> Self
48397    where
48398        T: std::iter::IntoIterator<Item = V>,
48399        V: std::convert::Into<std::string::String>,
48400    {
48401        use std::iter::Iterator;
48402        self.reserved_ip_ranges = v.into_iter().map(|i| i.into()).collect();
48403        self
48404    }
48405
48406    /// Sets the value of [deployment_group][crate::model::DeployedIndex::deployment_group].
48407    pub fn set_deployment_group<T: std::convert::Into<std::string::String>>(
48408        mut self,
48409        v: T,
48410    ) -> Self {
48411        self.deployment_group = v.into();
48412        self
48413    }
48414
48415    /// Sets the value of [deployment_tier][crate::model::DeployedIndex::deployment_tier].
48416    pub fn set_deployment_tier<
48417        T: std::convert::Into<crate::model::deployed_index::DeploymentTier>,
48418    >(
48419        mut self,
48420        v: T,
48421    ) -> Self {
48422        self.deployment_tier = v.into();
48423        self
48424    }
48425
48426    /// Sets the value of [psc_automation_configs][crate::model::DeployedIndex::psc_automation_configs].
48427    pub fn set_psc_automation_configs<T, V>(mut self, v: T) -> Self
48428    where
48429        T: std::iter::IntoIterator<Item = V>,
48430        V: std::convert::Into<crate::model::PSCAutomationConfig>,
48431    {
48432        use std::iter::Iterator;
48433        self.psc_automation_configs = v.into_iter().map(|i| i.into()).collect();
48434        self
48435    }
48436}
48437
48438#[cfg(feature = "index-endpoint-service")]
48439impl wkt::message::Message for DeployedIndex {
48440    fn typename() -> &'static str {
48441        "type.googleapis.com/google.cloud.aiplatform.v1.DeployedIndex"
48442    }
48443}
48444
48445/// Defines additional types related to [DeployedIndex].
48446#[cfg(feature = "index-endpoint-service")]
48447pub mod deployed_index {
48448    #[allow(unused_imports)]
48449    use super::*;
48450
48451    /// Tiers encapsulate serving time attributes like latency and throughput.
48452    ///
48453    /// # Working with unknown values
48454    ///
48455    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
48456    /// additional enum variants at any time. Adding new variants is not considered
48457    /// a breaking change. Applications should write their code in anticipation of:
48458    ///
48459    /// - New values appearing in future releases of the client library, **and**
48460    /// - New values received dynamically, without application changes.
48461    ///
48462    /// Please consult the [Working with enums] section in the user guide for some
48463    /// guidelines.
48464    ///
48465    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
48466    #[cfg(feature = "index-endpoint-service")]
48467    #[derive(Clone, Debug, PartialEq)]
48468    #[non_exhaustive]
48469    pub enum DeploymentTier {
48470        /// Default deployment tier.
48471        Unspecified,
48472        /// Optimized for costs.
48473        Storage,
48474        /// If set, the enum was initialized with an unknown value.
48475        ///
48476        /// Applications can examine the value using [DeploymentTier::value] or
48477        /// [DeploymentTier::name].
48478        UnknownValue(deployment_tier::UnknownValue),
48479    }
48480
48481    #[doc(hidden)]
48482    #[cfg(feature = "index-endpoint-service")]
48483    pub mod deployment_tier {
48484        #[allow(unused_imports)]
48485        use super::*;
48486        #[derive(Clone, Debug, PartialEq)]
48487        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
48488    }
48489
48490    #[cfg(feature = "index-endpoint-service")]
48491    impl DeploymentTier {
48492        /// Gets the enum value.
48493        ///
48494        /// Returns `None` if the enum contains an unknown value deserialized from
48495        /// the string representation of enums.
48496        pub fn value(&self) -> std::option::Option<i32> {
48497            match self {
48498                Self::Unspecified => std::option::Option::Some(0),
48499                Self::Storage => std::option::Option::Some(2),
48500                Self::UnknownValue(u) => u.0.value(),
48501            }
48502        }
48503
48504        /// Gets the enum value as a string.
48505        ///
48506        /// Returns `None` if the enum contains an unknown value deserialized from
48507        /// the integer representation of enums.
48508        pub fn name(&self) -> std::option::Option<&str> {
48509            match self {
48510                Self::Unspecified => std::option::Option::Some("DEPLOYMENT_TIER_UNSPECIFIED"),
48511                Self::Storage => std::option::Option::Some("STORAGE"),
48512                Self::UnknownValue(u) => u.0.name(),
48513            }
48514        }
48515    }
48516
48517    #[cfg(feature = "index-endpoint-service")]
48518    impl std::default::Default for DeploymentTier {
48519        fn default() -> Self {
48520            use std::convert::From;
48521            Self::from(0)
48522        }
48523    }
48524
48525    #[cfg(feature = "index-endpoint-service")]
48526    impl std::fmt::Display for DeploymentTier {
48527        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
48528            wkt::internal::display_enum(f, self.name(), self.value())
48529        }
48530    }
48531
48532    #[cfg(feature = "index-endpoint-service")]
48533    impl std::convert::From<i32> for DeploymentTier {
48534        fn from(value: i32) -> Self {
48535            match value {
48536                0 => Self::Unspecified,
48537                2 => Self::Storage,
48538                _ => Self::UnknownValue(deployment_tier::UnknownValue(
48539                    wkt::internal::UnknownEnumValue::Integer(value),
48540                )),
48541            }
48542        }
48543    }
48544
48545    #[cfg(feature = "index-endpoint-service")]
48546    impl std::convert::From<&str> for DeploymentTier {
48547        fn from(value: &str) -> Self {
48548            use std::string::ToString;
48549            match value {
48550                "DEPLOYMENT_TIER_UNSPECIFIED" => Self::Unspecified,
48551                "STORAGE" => Self::Storage,
48552                _ => Self::UnknownValue(deployment_tier::UnknownValue(
48553                    wkt::internal::UnknownEnumValue::String(value.to_string()),
48554                )),
48555            }
48556        }
48557    }
48558
48559    #[cfg(feature = "index-endpoint-service")]
48560    impl serde::ser::Serialize for DeploymentTier {
48561        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
48562        where
48563            S: serde::Serializer,
48564        {
48565            match self {
48566                Self::Unspecified => serializer.serialize_i32(0),
48567                Self::Storage => serializer.serialize_i32(2),
48568                Self::UnknownValue(u) => u.0.serialize(serializer),
48569            }
48570        }
48571    }
48572
48573    #[cfg(feature = "index-endpoint-service")]
48574    impl<'de> serde::de::Deserialize<'de> for DeploymentTier {
48575        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
48576        where
48577            D: serde::Deserializer<'de>,
48578        {
48579            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DeploymentTier>::new(
48580                ".google.cloud.aiplatform.v1.DeployedIndex.DeploymentTier",
48581            ))
48582        }
48583    }
48584}
48585
48586/// Used to set up the auth on the DeployedIndex's private endpoint.
48587#[cfg(feature = "index-endpoint-service")]
48588#[derive(Clone, Default, PartialEq)]
48589#[non_exhaustive]
48590pub struct DeployedIndexAuthConfig {
48591    /// Defines the authentication provider that the DeployedIndex uses.
48592    pub auth_provider: std::option::Option<crate::model::deployed_index_auth_config::AuthProvider>,
48593
48594    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
48595}
48596
48597#[cfg(feature = "index-endpoint-service")]
48598impl DeployedIndexAuthConfig {
48599    pub fn new() -> Self {
48600        std::default::Default::default()
48601    }
48602
48603    /// Sets the value of [auth_provider][crate::model::DeployedIndexAuthConfig::auth_provider].
48604    pub fn set_auth_provider<T>(mut self, v: T) -> Self
48605    where
48606        T: std::convert::Into<crate::model::deployed_index_auth_config::AuthProvider>,
48607    {
48608        self.auth_provider = std::option::Option::Some(v.into());
48609        self
48610    }
48611
48612    /// Sets or clears the value of [auth_provider][crate::model::DeployedIndexAuthConfig::auth_provider].
48613    pub fn set_or_clear_auth_provider<T>(mut self, v: std::option::Option<T>) -> Self
48614    where
48615        T: std::convert::Into<crate::model::deployed_index_auth_config::AuthProvider>,
48616    {
48617        self.auth_provider = v.map(|x| x.into());
48618        self
48619    }
48620}
48621
48622#[cfg(feature = "index-endpoint-service")]
48623impl wkt::message::Message for DeployedIndexAuthConfig {
48624    fn typename() -> &'static str {
48625        "type.googleapis.com/google.cloud.aiplatform.v1.DeployedIndexAuthConfig"
48626    }
48627}
48628
48629/// Defines additional types related to [DeployedIndexAuthConfig].
48630#[cfg(feature = "index-endpoint-service")]
48631pub mod deployed_index_auth_config {
48632    #[allow(unused_imports)]
48633    use super::*;
48634
48635    /// Configuration for an authentication provider, including support for
48636    /// [JSON Web Token
48637    /// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
48638    #[cfg(feature = "index-endpoint-service")]
48639    #[derive(Clone, Default, PartialEq)]
48640    #[non_exhaustive]
48641    pub struct AuthProvider {
48642        /// The list of JWT
48643        /// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
48644        /// that are allowed to access. A JWT containing any of these audiences will
48645        /// be accepted.
48646        pub audiences: std::vec::Vec<std::string::String>,
48647
48648        /// A list of allowed JWT issuers. Each entry must be a valid Google
48649        /// service account, in the following format:
48650        ///
48651        /// `service-account-name@project-id.iam.gserviceaccount.com`
48652        pub allowed_issuers: std::vec::Vec<std::string::String>,
48653
48654        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
48655    }
48656
48657    #[cfg(feature = "index-endpoint-service")]
48658    impl AuthProvider {
48659        pub fn new() -> Self {
48660            std::default::Default::default()
48661        }
48662
48663        /// Sets the value of [audiences][crate::model::deployed_index_auth_config::AuthProvider::audiences].
48664        pub fn set_audiences<T, V>(mut self, v: T) -> Self
48665        where
48666            T: std::iter::IntoIterator<Item = V>,
48667            V: std::convert::Into<std::string::String>,
48668        {
48669            use std::iter::Iterator;
48670            self.audiences = v.into_iter().map(|i| i.into()).collect();
48671            self
48672        }
48673
48674        /// Sets the value of [allowed_issuers][crate::model::deployed_index_auth_config::AuthProvider::allowed_issuers].
48675        pub fn set_allowed_issuers<T, V>(mut self, v: T) -> Self
48676        where
48677            T: std::iter::IntoIterator<Item = V>,
48678            V: std::convert::Into<std::string::String>,
48679        {
48680            use std::iter::Iterator;
48681            self.allowed_issuers = v.into_iter().map(|i| i.into()).collect();
48682            self
48683        }
48684    }
48685
48686    #[cfg(feature = "index-endpoint-service")]
48687    impl wkt::message::Message for AuthProvider {
48688        fn typename() -> &'static str {
48689            "type.googleapis.com/google.cloud.aiplatform.v1.DeployedIndexAuthConfig.AuthProvider"
48690        }
48691    }
48692}
48693
48694/// IndexPrivateEndpoints proto is used to provide paths for users to send
48695/// requests via private endpoints (e.g. private service access, private service
48696/// connect).
48697/// To send request via private service access, use match_grpc_address.
48698/// To send request via private service connect, use service_attachment.
48699#[cfg(feature = "index-endpoint-service")]
48700#[derive(Clone, Default, PartialEq)]
48701#[non_exhaustive]
48702pub struct IndexPrivateEndpoints {
48703    /// Output only. The ip address used to send match gRPC requests.
48704    pub match_grpc_address: std::string::String,
48705
48706    /// Output only. The name of the service attachment resource. Populated if
48707    /// private service connect is enabled.
48708    pub service_attachment: std::string::String,
48709
48710    /// Output only. PscAutomatedEndpoints is populated if private service connect
48711    /// is enabled if PscAutomatedConfig is set.
48712    pub psc_automated_endpoints: std::vec::Vec<crate::model::PscAutomatedEndpoints>,
48713
48714    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
48715}
48716
48717#[cfg(feature = "index-endpoint-service")]
48718impl IndexPrivateEndpoints {
48719    pub fn new() -> Self {
48720        std::default::Default::default()
48721    }
48722
48723    /// Sets the value of [match_grpc_address][crate::model::IndexPrivateEndpoints::match_grpc_address].
48724    pub fn set_match_grpc_address<T: std::convert::Into<std::string::String>>(
48725        mut self,
48726        v: T,
48727    ) -> Self {
48728        self.match_grpc_address = v.into();
48729        self
48730    }
48731
48732    /// Sets the value of [service_attachment][crate::model::IndexPrivateEndpoints::service_attachment].
48733    pub fn set_service_attachment<T: std::convert::Into<std::string::String>>(
48734        mut self,
48735        v: T,
48736    ) -> Self {
48737        self.service_attachment = v.into();
48738        self
48739    }
48740
48741    /// Sets the value of [psc_automated_endpoints][crate::model::IndexPrivateEndpoints::psc_automated_endpoints].
48742    pub fn set_psc_automated_endpoints<T, V>(mut self, v: T) -> Self
48743    where
48744        T: std::iter::IntoIterator<Item = V>,
48745        V: std::convert::Into<crate::model::PscAutomatedEndpoints>,
48746    {
48747        use std::iter::Iterator;
48748        self.psc_automated_endpoints = v.into_iter().map(|i| i.into()).collect();
48749        self
48750    }
48751}
48752
48753#[cfg(feature = "index-endpoint-service")]
48754impl wkt::message::Message for IndexPrivateEndpoints {
48755    fn typename() -> &'static str {
48756        "type.googleapis.com/google.cloud.aiplatform.v1.IndexPrivateEndpoints"
48757    }
48758}
48759
48760/// Request message for
48761/// [IndexEndpointService.CreateIndexEndpoint][google.cloud.aiplatform.v1.IndexEndpointService.CreateIndexEndpoint].
48762///
48763/// [google.cloud.aiplatform.v1.IndexEndpointService.CreateIndexEndpoint]: crate::client::IndexEndpointService::create_index_endpoint
48764#[cfg(feature = "index-endpoint-service")]
48765#[derive(Clone, Default, PartialEq)]
48766#[non_exhaustive]
48767pub struct CreateIndexEndpointRequest {
48768    /// Required. The resource name of the Location to create the IndexEndpoint in.
48769    /// Format: `projects/{project}/locations/{location}`
48770    pub parent: std::string::String,
48771
48772    /// Required. The IndexEndpoint to create.
48773    pub index_endpoint: std::option::Option<crate::model::IndexEndpoint>,
48774
48775    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
48776}
48777
48778#[cfg(feature = "index-endpoint-service")]
48779impl CreateIndexEndpointRequest {
48780    pub fn new() -> Self {
48781        std::default::Default::default()
48782    }
48783
48784    /// Sets the value of [parent][crate::model::CreateIndexEndpointRequest::parent].
48785    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
48786        self.parent = v.into();
48787        self
48788    }
48789
48790    /// Sets the value of [index_endpoint][crate::model::CreateIndexEndpointRequest::index_endpoint].
48791    pub fn set_index_endpoint<T>(mut self, v: T) -> Self
48792    where
48793        T: std::convert::Into<crate::model::IndexEndpoint>,
48794    {
48795        self.index_endpoint = std::option::Option::Some(v.into());
48796        self
48797    }
48798
48799    /// Sets or clears the value of [index_endpoint][crate::model::CreateIndexEndpointRequest::index_endpoint].
48800    pub fn set_or_clear_index_endpoint<T>(mut self, v: std::option::Option<T>) -> Self
48801    where
48802        T: std::convert::Into<crate::model::IndexEndpoint>,
48803    {
48804        self.index_endpoint = v.map(|x| x.into());
48805        self
48806    }
48807}
48808
48809#[cfg(feature = "index-endpoint-service")]
48810impl wkt::message::Message for CreateIndexEndpointRequest {
48811    fn typename() -> &'static str {
48812        "type.googleapis.com/google.cloud.aiplatform.v1.CreateIndexEndpointRequest"
48813    }
48814}
48815
48816/// Runtime operation information for
48817/// [IndexEndpointService.CreateIndexEndpoint][google.cloud.aiplatform.v1.IndexEndpointService.CreateIndexEndpoint].
48818///
48819/// [google.cloud.aiplatform.v1.IndexEndpointService.CreateIndexEndpoint]: crate::client::IndexEndpointService::create_index_endpoint
48820#[cfg(feature = "index-endpoint-service")]
48821#[derive(Clone, Default, PartialEq)]
48822#[non_exhaustive]
48823pub struct CreateIndexEndpointOperationMetadata {
48824    /// The operation generic information.
48825    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
48826
48827    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
48828}
48829
48830#[cfg(feature = "index-endpoint-service")]
48831impl CreateIndexEndpointOperationMetadata {
48832    pub fn new() -> Self {
48833        std::default::Default::default()
48834    }
48835
48836    /// Sets the value of [generic_metadata][crate::model::CreateIndexEndpointOperationMetadata::generic_metadata].
48837    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
48838    where
48839        T: std::convert::Into<crate::model::GenericOperationMetadata>,
48840    {
48841        self.generic_metadata = std::option::Option::Some(v.into());
48842        self
48843    }
48844
48845    /// Sets or clears the value of [generic_metadata][crate::model::CreateIndexEndpointOperationMetadata::generic_metadata].
48846    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
48847    where
48848        T: std::convert::Into<crate::model::GenericOperationMetadata>,
48849    {
48850        self.generic_metadata = v.map(|x| x.into());
48851        self
48852    }
48853}
48854
48855#[cfg(feature = "index-endpoint-service")]
48856impl wkt::message::Message for CreateIndexEndpointOperationMetadata {
48857    fn typename() -> &'static str {
48858        "type.googleapis.com/google.cloud.aiplatform.v1.CreateIndexEndpointOperationMetadata"
48859    }
48860}
48861
48862/// Request message for
48863/// [IndexEndpointService.GetIndexEndpoint][google.cloud.aiplatform.v1.IndexEndpointService.GetIndexEndpoint]
48864///
48865/// [google.cloud.aiplatform.v1.IndexEndpointService.GetIndexEndpoint]: crate::client::IndexEndpointService::get_index_endpoint
48866#[cfg(feature = "index-endpoint-service")]
48867#[derive(Clone, Default, PartialEq)]
48868#[non_exhaustive]
48869pub struct GetIndexEndpointRequest {
48870    /// Required. The name of the IndexEndpoint resource.
48871    /// Format:
48872    /// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
48873    pub name: std::string::String,
48874
48875    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
48876}
48877
48878#[cfg(feature = "index-endpoint-service")]
48879impl GetIndexEndpointRequest {
48880    pub fn new() -> Self {
48881        std::default::Default::default()
48882    }
48883
48884    /// Sets the value of [name][crate::model::GetIndexEndpointRequest::name].
48885    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
48886        self.name = v.into();
48887        self
48888    }
48889}
48890
48891#[cfg(feature = "index-endpoint-service")]
48892impl wkt::message::Message for GetIndexEndpointRequest {
48893    fn typename() -> &'static str {
48894        "type.googleapis.com/google.cloud.aiplatform.v1.GetIndexEndpointRequest"
48895    }
48896}
48897
48898/// Request message for
48899/// [IndexEndpointService.ListIndexEndpoints][google.cloud.aiplatform.v1.IndexEndpointService.ListIndexEndpoints].
48900///
48901/// [google.cloud.aiplatform.v1.IndexEndpointService.ListIndexEndpoints]: crate::client::IndexEndpointService::list_index_endpoints
48902#[cfg(feature = "index-endpoint-service")]
48903#[derive(Clone, Default, PartialEq)]
48904#[non_exhaustive]
48905pub struct ListIndexEndpointsRequest {
48906    /// Required. The resource name of the Location from which to list the
48907    /// IndexEndpoints. Format: `projects/{project}/locations/{location}`
48908    pub parent: std::string::String,
48909
48910    /// Optional. An expression for filtering the results of the request. For field
48911    /// names both snake_case and camelCase are supported.
48912    ///
48913    /// * `index_endpoint` supports = and !=. `index_endpoint` represents the
48914    ///   IndexEndpoint ID, ie. the last segment of the IndexEndpoint's
48915    ///   [resourcename][google.cloud.aiplatform.v1.IndexEndpoint.name].
48916    /// * `display_name` supports =, != and regex()
48917    ///   (uses [re2](https://github.com/google/re2/wiki/Syntax) syntax)
48918    /// * `labels` supports general map functions that is:
48919    ///   `labels.key=value` - key:value equality
48920    ///   `labels.key:* or labels:key - key existence
48921    ///   A key including a space must be quoted. `labels."a key"`.
48922    ///
48923    /// Some examples:
48924    ///
48925    /// * `index_endpoint="1"`
48926    /// * `display_name="myDisplayName"`
48927    /// * `regex(display_name, "^A") -> The display name starts with an A.
48928    /// * `labels.myKey="myValue"`
48929    ///
48930    /// [google.cloud.aiplatform.v1.IndexEndpoint.name]: crate::model::IndexEndpoint::name
48931    pub filter: std::string::String,
48932
48933    /// Optional. The standard list page size.
48934    pub page_size: i32,
48935
48936    /// Optional. The standard list page token.
48937    /// Typically obtained via
48938    /// [ListIndexEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListIndexEndpointsResponse.next_page_token]
48939    /// of the previous
48940    /// [IndexEndpointService.ListIndexEndpoints][google.cloud.aiplatform.v1.IndexEndpointService.ListIndexEndpoints]
48941    /// call.
48942    ///
48943    /// [google.cloud.aiplatform.v1.IndexEndpointService.ListIndexEndpoints]: crate::client::IndexEndpointService::list_index_endpoints
48944    /// [google.cloud.aiplatform.v1.ListIndexEndpointsResponse.next_page_token]: crate::model::ListIndexEndpointsResponse::next_page_token
48945    pub page_token: std::string::String,
48946
48947    /// Optional. Mask specifying which fields to read.
48948    pub read_mask: std::option::Option<wkt::FieldMask>,
48949
48950    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
48951}
48952
48953#[cfg(feature = "index-endpoint-service")]
48954impl ListIndexEndpointsRequest {
48955    pub fn new() -> Self {
48956        std::default::Default::default()
48957    }
48958
48959    /// Sets the value of [parent][crate::model::ListIndexEndpointsRequest::parent].
48960    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
48961        self.parent = v.into();
48962        self
48963    }
48964
48965    /// Sets the value of [filter][crate::model::ListIndexEndpointsRequest::filter].
48966    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
48967        self.filter = v.into();
48968        self
48969    }
48970
48971    /// Sets the value of [page_size][crate::model::ListIndexEndpointsRequest::page_size].
48972    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
48973        self.page_size = v.into();
48974        self
48975    }
48976
48977    /// Sets the value of [page_token][crate::model::ListIndexEndpointsRequest::page_token].
48978    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
48979        self.page_token = v.into();
48980        self
48981    }
48982
48983    /// Sets the value of [read_mask][crate::model::ListIndexEndpointsRequest::read_mask].
48984    pub fn set_read_mask<T>(mut self, v: T) -> Self
48985    where
48986        T: std::convert::Into<wkt::FieldMask>,
48987    {
48988        self.read_mask = std::option::Option::Some(v.into());
48989        self
48990    }
48991
48992    /// Sets or clears the value of [read_mask][crate::model::ListIndexEndpointsRequest::read_mask].
48993    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
48994    where
48995        T: std::convert::Into<wkt::FieldMask>,
48996    {
48997        self.read_mask = v.map(|x| x.into());
48998        self
48999    }
49000}
49001
49002#[cfg(feature = "index-endpoint-service")]
49003impl wkt::message::Message for ListIndexEndpointsRequest {
49004    fn typename() -> &'static str {
49005        "type.googleapis.com/google.cloud.aiplatform.v1.ListIndexEndpointsRequest"
49006    }
49007}
49008
49009/// Response message for
49010/// [IndexEndpointService.ListIndexEndpoints][google.cloud.aiplatform.v1.IndexEndpointService.ListIndexEndpoints].
49011///
49012/// [google.cloud.aiplatform.v1.IndexEndpointService.ListIndexEndpoints]: crate::client::IndexEndpointService::list_index_endpoints
49013#[cfg(feature = "index-endpoint-service")]
49014#[derive(Clone, Default, PartialEq)]
49015#[non_exhaustive]
49016pub struct ListIndexEndpointsResponse {
49017    /// List of IndexEndpoints in the requested page.
49018    pub index_endpoints: std::vec::Vec<crate::model::IndexEndpoint>,
49019
49020    /// A token to retrieve next page of results.
49021    /// Pass to
49022    /// [ListIndexEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListIndexEndpointsRequest.page_token]
49023    /// to obtain that page.
49024    ///
49025    /// [google.cloud.aiplatform.v1.ListIndexEndpointsRequest.page_token]: crate::model::ListIndexEndpointsRequest::page_token
49026    pub next_page_token: std::string::String,
49027
49028    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49029}
49030
49031#[cfg(feature = "index-endpoint-service")]
49032impl ListIndexEndpointsResponse {
49033    pub fn new() -> Self {
49034        std::default::Default::default()
49035    }
49036
49037    /// Sets the value of [index_endpoints][crate::model::ListIndexEndpointsResponse::index_endpoints].
49038    pub fn set_index_endpoints<T, V>(mut self, v: T) -> Self
49039    where
49040        T: std::iter::IntoIterator<Item = V>,
49041        V: std::convert::Into<crate::model::IndexEndpoint>,
49042    {
49043        use std::iter::Iterator;
49044        self.index_endpoints = v.into_iter().map(|i| i.into()).collect();
49045        self
49046    }
49047
49048    /// Sets the value of [next_page_token][crate::model::ListIndexEndpointsResponse::next_page_token].
49049    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
49050        self.next_page_token = v.into();
49051        self
49052    }
49053}
49054
49055#[cfg(feature = "index-endpoint-service")]
49056impl wkt::message::Message for ListIndexEndpointsResponse {
49057    fn typename() -> &'static str {
49058        "type.googleapis.com/google.cloud.aiplatform.v1.ListIndexEndpointsResponse"
49059    }
49060}
49061
49062#[cfg(feature = "index-endpoint-service")]
49063#[doc(hidden)]
49064impl gax::paginator::internal::PageableResponse for ListIndexEndpointsResponse {
49065    type PageItem = crate::model::IndexEndpoint;
49066
49067    fn items(self) -> std::vec::Vec<Self::PageItem> {
49068        self.index_endpoints
49069    }
49070
49071    fn next_page_token(&self) -> std::string::String {
49072        use std::clone::Clone;
49073        self.next_page_token.clone()
49074    }
49075}
49076
49077/// Request message for
49078/// [IndexEndpointService.UpdateIndexEndpoint][google.cloud.aiplatform.v1.IndexEndpointService.UpdateIndexEndpoint].
49079///
49080/// [google.cloud.aiplatform.v1.IndexEndpointService.UpdateIndexEndpoint]: crate::client::IndexEndpointService::update_index_endpoint
49081#[cfg(feature = "index-endpoint-service")]
49082#[derive(Clone, Default, PartialEq)]
49083#[non_exhaustive]
49084pub struct UpdateIndexEndpointRequest {
49085    /// Required. The IndexEndpoint which replaces the resource on the server.
49086    pub index_endpoint: std::option::Option<crate::model::IndexEndpoint>,
49087
49088    /// Required. The update mask applies to the resource. See
49089    /// [google.protobuf.FieldMask][google.protobuf.FieldMask].
49090    ///
49091    /// [google.protobuf.FieldMask]: wkt::FieldMask
49092    pub update_mask: std::option::Option<wkt::FieldMask>,
49093
49094    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49095}
49096
49097#[cfg(feature = "index-endpoint-service")]
49098impl UpdateIndexEndpointRequest {
49099    pub fn new() -> Self {
49100        std::default::Default::default()
49101    }
49102
49103    /// Sets the value of [index_endpoint][crate::model::UpdateIndexEndpointRequest::index_endpoint].
49104    pub fn set_index_endpoint<T>(mut self, v: T) -> Self
49105    where
49106        T: std::convert::Into<crate::model::IndexEndpoint>,
49107    {
49108        self.index_endpoint = std::option::Option::Some(v.into());
49109        self
49110    }
49111
49112    /// Sets or clears the value of [index_endpoint][crate::model::UpdateIndexEndpointRequest::index_endpoint].
49113    pub fn set_or_clear_index_endpoint<T>(mut self, v: std::option::Option<T>) -> Self
49114    where
49115        T: std::convert::Into<crate::model::IndexEndpoint>,
49116    {
49117        self.index_endpoint = v.map(|x| x.into());
49118        self
49119    }
49120
49121    /// Sets the value of [update_mask][crate::model::UpdateIndexEndpointRequest::update_mask].
49122    pub fn set_update_mask<T>(mut self, v: T) -> Self
49123    where
49124        T: std::convert::Into<wkt::FieldMask>,
49125    {
49126        self.update_mask = std::option::Option::Some(v.into());
49127        self
49128    }
49129
49130    /// Sets or clears the value of [update_mask][crate::model::UpdateIndexEndpointRequest::update_mask].
49131    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
49132    where
49133        T: std::convert::Into<wkt::FieldMask>,
49134    {
49135        self.update_mask = v.map(|x| x.into());
49136        self
49137    }
49138}
49139
49140#[cfg(feature = "index-endpoint-service")]
49141impl wkt::message::Message for UpdateIndexEndpointRequest {
49142    fn typename() -> &'static str {
49143        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateIndexEndpointRequest"
49144    }
49145}
49146
49147/// Request message for
49148/// [IndexEndpointService.DeleteIndexEndpoint][google.cloud.aiplatform.v1.IndexEndpointService.DeleteIndexEndpoint].
49149///
49150/// [google.cloud.aiplatform.v1.IndexEndpointService.DeleteIndexEndpoint]: crate::client::IndexEndpointService::delete_index_endpoint
49151#[cfg(feature = "index-endpoint-service")]
49152#[derive(Clone, Default, PartialEq)]
49153#[non_exhaustive]
49154pub struct DeleteIndexEndpointRequest {
49155    /// Required. The name of the IndexEndpoint resource to be deleted.
49156    /// Format:
49157    /// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
49158    pub name: std::string::String,
49159
49160    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49161}
49162
49163#[cfg(feature = "index-endpoint-service")]
49164impl DeleteIndexEndpointRequest {
49165    pub fn new() -> Self {
49166        std::default::Default::default()
49167    }
49168
49169    /// Sets the value of [name][crate::model::DeleteIndexEndpointRequest::name].
49170    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
49171        self.name = v.into();
49172        self
49173    }
49174}
49175
49176#[cfg(feature = "index-endpoint-service")]
49177impl wkt::message::Message for DeleteIndexEndpointRequest {
49178    fn typename() -> &'static str {
49179        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteIndexEndpointRequest"
49180    }
49181}
49182
49183/// Request message for
49184/// [IndexEndpointService.DeployIndex][google.cloud.aiplatform.v1.IndexEndpointService.DeployIndex].
49185///
49186/// [google.cloud.aiplatform.v1.IndexEndpointService.DeployIndex]: crate::client::IndexEndpointService::deploy_index
49187#[cfg(feature = "index-endpoint-service")]
49188#[derive(Clone, Default, PartialEq)]
49189#[non_exhaustive]
49190pub struct DeployIndexRequest {
49191    /// Required. The name of the IndexEndpoint resource into which to deploy an
49192    /// Index. Format:
49193    /// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
49194    pub index_endpoint: std::string::String,
49195
49196    /// Required. The DeployedIndex to be created within the IndexEndpoint.
49197    pub deployed_index: std::option::Option<crate::model::DeployedIndex>,
49198
49199    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49200}
49201
49202#[cfg(feature = "index-endpoint-service")]
49203impl DeployIndexRequest {
49204    pub fn new() -> Self {
49205        std::default::Default::default()
49206    }
49207
49208    /// Sets the value of [index_endpoint][crate::model::DeployIndexRequest::index_endpoint].
49209    pub fn set_index_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
49210        self.index_endpoint = v.into();
49211        self
49212    }
49213
49214    /// Sets the value of [deployed_index][crate::model::DeployIndexRequest::deployed_index].
49215    pub fn set_deployed_index<T>(mut self, v: T) -> Self
49216    where
49217        T: std::convert::Into<crate::model::DeployedIndex>,
49218    {
49219        self.deployed_index = std::option::Option::Some(v.into());
49220        self
49221    }
49222
49223    /// Sets or clears the value of [deployed_index][crate::model::DeployIndexRequest::deployed_index].
49224    pub fn set_or_clear_deployed_index<T>(mut self, v: std::option::Option<T>) -> Self
49225    where
49226        T: std::convert::Into<crate::model::DeployedIndex>,
49227    {
49228        self.deployed_index = v.map(|x| x.into());
49229        self
49230    }
49231}
49232
49233#[cfg(feature = "index-endpoint-service")]
49234impl wkt::message::Message for DeployIndexRequest {
49235    fn typename() -> &'static str {
49236        "type.googleapis.com/google.cloud.aiplatform.v1.DeployIndexRequest"
49237    }
49238}
49239
49240/// Response message for
49241/// [IndexEndpointService.DeployIndex][google.cloud.aiplatform.v1.IndexEndpointService.DeployIndex].
49242///
49243/// [google.cloud.aiplatform.v1.IndexEndpointService.DeployIndex]: crate::client::IndexEndpointService::deploy_index
49244#[cfg(feature = "index-endpoint-service")]
49245#[derive(Clone, Default, PartialEq)]
49246#[non_exhaustive]
49247pub struct DeployIndexResponse {
49248    /// The DeployedIndex that had been deployed in the IndexEndpoint.
49249    pub deployed_index: std::option::Option<crate::model::DeployedIndex>,
49250
49251    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49252}
49253
49254#[cfg(feature = "index-endpoint-service")]
49255impl DeployIndexResponse {
49256    pub fn new() -> Self {
49257        std::default::Default::default()
49258    }
49259
49260    /// Sets the value of [deployed_index][crate::model::DeployIndexResponse::deployed_index].
49261    pub fn set_deployed_index<T>(mut self, v: T) -> Self
49262    where
49263        T: std::convert::Into<crate::model::DeployedIndex>,
49264    {
49265        self.deployed_index = std::option::Option::Some(v.into());
49266        self
49267    }
49268
49269    /// Sets or clears the value of [deployed_index][crate::model::DeployIndexResponse::deployed_index].
49270    pub fn set_or_clear_deployed_index<T>(mut self, v: std::option::Option<T>) -> Self
49271    where
49272        T: std::convert::Into<crate::model::DeployedIndex>,
49273    {
49274        self.deployed_index = v.map(|x| x.into());
49275        self
49276    }
49277}
49278
49279#[cfg(feature = "index-endpoint-service")]
49280impl wkt::message::Message for DeployIndexResponse {
49281    fn typename() -> &'static str {
49282        "type.googleapis.com/google.cloud.aiplatform.v1.DeployIndexResponse"
49283    }
49284}
49285
49286/// Runtime operation information for
49287/// [IndexEndpointService.DeployIndex][google.cloud.aiplatform.v1.IndexEndpointService.DeployIndex].
49288///
49289/// [google.cloud.aiplatform.v1.IndexEndpointService.DeployIndex]: crate::client::IndexEndpointService::deploy_index
49290#[cfg(feature = "index-endpoint-service")]
49291#[derive(Clone, Default, PartialEq)]
49292#[non_exhaustive]
49293pub struct DeployIndexOperationMetadata {
49294    /// The operation generic information.
49295    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
49296
49297    /// The unique index id specified by user
49298    pub deployed_index_id: std::string::String,
49299
49300    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49301}
49302
49303#[cfg(feature = "index-endpoint-service")]
49304impl DeployIndexOperationMetadata {
49305    pub fn new() -> Self {
49306        std::default::Default::default()
49307    }
49308
49309    /// Sets the value of [generic_metadata][crate::model::DeployIndexOperationMetadata::generic_metadata].
49310    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
49311    where
49312        T: std::convert::Into<crate::model::GenericOperationMetadata>,
49313    {
49314        self.generic_metadata = std::option::Option::Some(v.into());
49315        self
49316    }
49317
49318    /// Sets or clears the value of [generic_metadata][crate::model::DeployIndexOperationMetadata::generic_metadata].
49319    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
49320    where
49321        T: std::convert::Into<crate::model::GenericOperationMetadata>,
49322    {
49323        self.generic_metadata = v.map(|x| x.into());
49324        self
49325    }
49326
49327    /// Sets the value of [deployed_index_id][crate::model::DeployIndexOperationMetadata::deployed_index_id].
49328    pub fn set_deployed_index_id<T: std::convert::Into<std::string::String>>(
49329        mut self,
49330        v: T,
49331    ) -> Self {
49332        self.deployed_index_id = v.into();
49333        self
49334    }
49335}
49336
49337#[cfg(feature = "index-endpoint-service")]
49338impl wkt::message::Message for DeployIndexOperationMetadata {
49339    fn typename() -> &'static str {
49340        "type.googleapis.com/google.cloud.aiplatform.v1.DeployIndexOperationMetadata"
49341    }
49342}
49343
49344/// Request message for
49345/// [IndexEndpointService.UndeployIndex][google.cloud.aiplatform.v1.IndexEndpointService.UndeployIndex].
49346///
49347/// [google.cloud.aiplatform.v1.IndexEndpointService.UndeployIndex]: crate::client::IndexEndpointService::undeploy_index
49348#[cfg(feature = "index-endpoint-service")]
49349#[derive(Clone, Default, PartialEq)]
49350#[non_exhaustive]
49351pub struct UndeployIndexRequest {
49352    /// Required. The name of the IndexEndpoint resource from which to undeploy an
49353    /// Index. Format:
49354    /// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
49355    pub index_endpoint: std::string::String,
49356
49357    /// Required. The ID of the DeployedIndex to be undeployed from the
49358    /// IndexEndpoint.
49359    pub deployed_index_id: std::string::String,
49360
49361    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49362}
49363
49364#[cfg(feature = "index-endpoint-service")]
49365impl UndeployIndexRequest {
49366    pub fn new() -> Self {
49367        std::default::Default::default()
49368    }
49369
49370    /// Sets the value of [index_endpoint][crate::model::UndeployIndexRequest::index_endpoint].
49371    pub fn set_index_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
49372        self.index_endpoint = v.into();
49373        self
49374    }
49375
49376    /// Sets the value of [deployed_index_id][crate::model::UndeployIndexRequest::deployed_index_id].
49377    pub fn set_deployed_index_id<T: std::convert::Into<std::string::String>>(
49378        mut self,
49379        v: T,
49380    ) -> Self {
49381        self.deployed_index_id = v.into();
49382        self
49383    }
49384}
49385
49386#[cfg(feature = "index-endpoint-service")]
49387impl wkt::message::Message for UndeployIndexRequest {
49388    fn typename() -> &'static str {
49389        "type.googleapis.com/google.cloud.aiplatform.v1.UndeployIndexRequest"
49390    }
49391}
49392
49393/// Response message for
49394/// [IndexEndpointService.UndeployIndex][google.cloud.aiplatform.v1.IndexEndpointService.UndeployIndex].
49395///
49396/// [google.cloud.aiplatform.v1.IndexEndpointService.UndeployIndex]: crate::client::IndexEndpointService::undeploy_index
49397#[cfg(feature = "index-endpoint-service")]
49398#[derive(Clone, Default, PartialEq)]
49399#[non_exhaustive]
49400pub struct UndeployIndexResponse {
49401    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49402}
49403
49404#[cfg(feature = "index-endpoint-service")]
49405impl UndeployIndexResponse {
49406    pub fn new() -> Self {
49407        std::default::Default::default()
49408    }
49409}
49410
49411#[cfg(feature = "index-endpoint-service")]
49412impl wkt::message::Message for UndeployIndexResponse {
49413    fn typename() -> &'static str {
49414        "type.googleapis.com/google.cloud.aiplatform.v1.UndeployIndexResponse"
49415    }
49416}
49417
49418/// Runtime operation information for
49419/// [IndexEndpointService.UndeployIndex][google.cloud.aiplatform.v1.IndexEndpointService.UndeployIndex].
49420///
49421/// [google.cloud.aiplatform.v1.IndexEndpointService.UndeployIndex]: crate::client::IndexEndpointService::undeploy_index
49422#[cfg(feature = "index-endpoint-service")]
49423#[derive(Clone, Default, PartialEq)]
49424#[non_exhaustive]
49425pub struct UndeployIndexOperationMetadata {
49426    /// The operation generic information.
49427    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
49428
49429    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49430}
49431
49432#[cfg(feature = "index-endpoint-service")]
49433impl UndeployIndexOperationMetadata {
49434    pub fn new() -> Self {
49435        std::default::Default::default()
49436    }
49437
49438    /// Sets the value of [generic_metadata][crate::model::UndeployIndexOperationMetadata::generic_metadata].
49439    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
49440    where
49441        T: std::convert::Into<crate::model::GenericOperationMetadata>,
49442    {
49443        self.generic_metadata = std::option::Option::Some(v.into());
49444        self
49445    }
49446
49447    /// Sets or clears the value of [generic_metadata][crate::model::UndeployIndexOperationMetadata::generic_metadata].
49448    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
49449    where
49450        T: std::convert::Into<crate::model::GenericOperationMetadata>,
49451    {
49452        self.generic_metadata = v.map(|x| x.into());
49453        self
49454    }
49455}
49456
49457#[cfg(feature = "index-endpoint-service")]
49458impl wkt::message::Message for UndeployIndexOperationMetadata {
49459    fn typename() -> &'static str {
49460        "type.googleapis.com/google.cloud.aiplatform.v1.UndeployIndexOperationMetadata"
49461    }
49462}
49463
49464/// Request message for
49465/// [IndexEndpointService.MutateDeployedIndex][google.cloud.aiplatform.v1.IndexEndpointService.MutateDeployedIndex].
49466///
49467/// [google.cloud.aiplatform.v1.IndexEndpointService.MutateDeployedIndex]: crate::client::IndexEndpointService::mutate_deployed_index
49468#[cfg(feature = "index-endpoint-service")]
49469#[derive(Clone, Default, PartialEq)]
49470#[non_exhaustive]
49471pub struct MutateDeployedIndexRequest {
49472    /// Required. The name of the IndexEndpoint resource into which to deploy an
49473    /// Index. Format:
49474    /// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
49475    pub index_endpoint: std::string::String,
49476
49477    /// Required. The DeployedIndex to be updated within the IndexEndpoint.
49478    /// Currently, the updatable fields are
49479    /// [DeployedIndex.automatic_resources][google.cloud.aiplatform.v1.DeployedIndex.automatic_resources]
49480    /// and
49481    /// [DeployedIndex.dedicated_resources][google.cloud.aiplatform.v1.DeployedIndex.dedicated_resources]
49482    ///
49483    /// [google.cloud.aiplatform.v1.DeployedIndex.automatic_resources]: crate::model::DeployedIndex::automatic_resources
49484    /// [google.cloud.aiplatform.v1.DeployedIndex.dedicated_resources]: crate::model::DeployedIndex::dedicated_resources
49485    pub deployed_index: std::option::Option<crate::model::DeployedIndex>,
49486
49487    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49488}
49489
49490#[cfg(feature = "index-endpoint-service")]
49491impl MutateDeployedIndexRequest {
49492    pub fn new() -> Self {
49493        std::default::Default::default()
49494    }
49495
49496    /// Sets the value of [index_endpoint][crate::model::MutateDeployedIndexRequest::index_endpoint].
49497    pub fn set_index_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
49498        self.index_endpoint = v.into();
49499        self
49500    }
49501
49502    /// Sets the value of [deployed_index][crate::model::MutateDeployedIndexRequest::deployed_index].
49503    pub fn set_deployed_index<T>(mut self, v: T) -> Self
49504    where
49505        T: std::convert::Into<crate::model::DeployedIndex>,
49506    {
49507        self.deployed_index = std::option::Option::Some(v.into());
49508        self
49509    }
49510
49511    /// Sets or clears the value of [deployed_index][crate::model::MutateDeployedIndexRequest::deployed_index].
49512    pub fn set_or_clear_deployed_index<T>(mut self, v: std::option::Option<T>) -> Self
49513    where
49514        T: std::convert::Into<crate::model::DeployedIndex>,
49515    {
49516        self.deployed_index = v.map(|x| x.into());
49517        self
49518    }
49519}
49520
49521#[cfg(feature = "index-endpoint-service")]
49522impl wkt::message::Message for MutateDeployedIndexRequest {
49523    fn typename() -> &'static str {
49524        "type.googleapis.com/google.cloud.aiplatform.v1.MutateDeployedIndexRequest"
49525    }
49526}
49527
49528/// Response message for
49529/// [IndexEndpointService.MutateDeployedIndex][google.cloud.aiplatform.v1.IndexEndpointService.MutateDeployedIndex].
49530///
49531/// [google.cloud.aiplatform.v1.IndexEndpointService.MutateDeployedIndex]: crate::client::IndexEndpointService::mutate_deployed_index
49532#[cfg(feature = "index-endpoint-service")]
49533#[derive(Clone, Default, PartialEq)]
49534#[non_exhaustive]
49535pub struct MutateDeployedIndexResponse {
49536    /// The DeployedIndex that had been updated in the IndexEndpoint.
49537    pub deployed_index: std::option::Option<crate::model::DeployedIndex>,
49538
49539    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49540}
49541
49542#[cfg(feature = "index-endpoint-service")]
49543impl MutateDeployedIndexResponse {
49544    pub fn new() -> Self {
49545        std::default::Default::default()
49546    }
49547
49548    /// Sets the value of [deployed_index][crate::model::MutateDeployedIndexResponse::deployed_index].
49549    pub fn set_deployed_index<T>(mut self, v: T) -> Self
49550    where
49551        T: std::convert::Into<crate::model::DeployedIndex>,
49552    {
49553        self.deployed_index = std::option::Option::Some(v.into());
49554        self
49555    }
49556
49557    /// Sets or clears the value of [deployed_index][crate::model::MutateDeployedIndexResponse::deployed_index].
49558    pub fn set_or_clear_deployed_index<T>(mut self, v: std::option::Option<T>) -> Self
49559    where
49560        T: std::convert::Into<crate::model::DeployedIndex>,
49561    {
49562        self.deployed_index = v.map(|x| x.into());
49563        self
49564    }
49565}
49566
49567#[cfg(feature = "index-endpoint-service")]
49568impl wkt::message::Message for MutateDeployedIndexResponse {
49569    fn typename() -> &'static str {
49570        "type.googleapis.com/google.cloud.aiplatform.v1.MutateDeployedIndexResponse"
49571    }
49572}
49573
49574/// Runtime operation information for
49575/// [IndexEndpointService.MutateDeployedIndex][google.cloud.aiplatform.v1.IndexEndpointService.MutateDeployedIndex].
49576///
49577/// [google.cloud.aiplatform.v1.IndexEndpointService.MutateDeployedIndex]: crate::client::IndexEndpointService::mutate_deployed_index
49578#[cfg(feature = "index-endpoint-service")]
49579#[derive(Clone, Default, PartialEq)]
49580#[non_exhaustive]
49581pub struct MutateDeployedIndexOperationMetadata {
49582    /// The operation generic information.
49583    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
49584
49585    /// The unique index id specified by user
49586    pub deployed_index_id: std::string::String,
49587
49588    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49589}
49590
49591#[cfg(feature = "index-endpoint-service")]
49592impl MutateDeployedIndexOperationMetadata {
49593    pub fn new() -> Self {
49594        std::default::Default::default()
49595    }
49596
49597    /// Sets the value of [generic_metadata][crate::model::MutateDeployedIndexOperationMetadata::generic_metadata].
49598    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
49599    where
49600        T: std::convert::Into<crate::model::GenericOperationMetadata>,
49601    {
49602        self.generic_metadata = std::option::Option::Some(v.into());
49603        self
49604    }
49605
49606    /// Sets or clears the value of [generic_metadata][crate::model::MutateDeployedIndexOperationMetadata::generic_metadata].
49607    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
49608    where
49609        T: std::convert::Into<crate::model::GenericOperationMetadata>,
49610    {
49611        self.generic_metadata = v.map(|x| x.into());
49612        self
49613    }
49614
49615    /// Sets the value of [deployed_index_id][crate::model::MutateDeployedIndexOperationMetadata::deployed_index_id].
49616    pub fn set_deployed_index_id<T: std::convert::Into<std::string::String>>(
49617        mut self,
49618        v: T,
49619    ) -> Self {
49620        self.deployed_index_id = v.into();
49621        self
49622    }
49623}
49624
49625#[cfg(feature = "index-endpoint-service")]
49626impl wkt::message::Message for MutateDeployedIndexOperationMetadata {
49627    fn typename() -> &'static str {
49628        "type.googleapis.com/google.cloud.aiplatform.v1.MutateDeployedIndexOperationMetadata"
49629    }
49630}
49631
49632/// Request message for
49633/// [IndexService.CreateIndex][google.cloud.aiplatform.v1.IndexService.CreateIndex].
49634///
49635/// [google.cloud.aiplatform.v1.IndexService.CreateIndex]: crate::client::IndexService::create_index
49636#[cfg(feature = "index-service")]
49637#[derive(Clone, Default, PartialEq)]
49638#[non_exhaustive]
49639pub struct CreateIndexRequest {
49640    /// Required. The resource name of the Location to create the Index in.
49641    /// Format: `projects/{project}/locations/{location}`
49642    pub parent: std::string::String,
49643
49644    /// Required. The Index to create.
49645    pub index: std::option::Option<crate::model::Index>,
49646
49647    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49648}
49649
49650#[cfg(feature = "index-service")]
49651impl CreateIndexRequest {
49652    pub fn new() -> Self {
49653        std::default::Default::default()
49654    }
49655
49656    /// Sets the value of [parent][crate::model::CreateIndexRequest::parent].
49657    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
49658        self.parent = v.into();
49659        self
49660    }
49661
49662    /// Sets the value of [index][crate::model::CreateIndexRequest::index].
49663    pub fn set_index<T>(mut self, v: T) -> Self
49664    where
49665        T: std::convert::Into<crate::model::Index>,
49666    {
49667        self.index = std::option::Option::Some(v.into());
49668        self
49669    }
49670
49671    /// Sets or clears the value of [index][crate::model::CreateIndexRequest::index].
49672    pub fn set_or_clear_index<T>(mut self, v: std::option::Option<T>) -> Self
49673    where
49674        T: std::convert::Into<crate::model::Index>,
49675    {
49676        self.index = v.map(|x| x.into());
49677        self
49678    }
49679}
49680
49681#[cfg(feature = "index-service")]
49682impl wkt::message::Message for CreateIndexRequest {
49683    fn typename() -> &'static str {
49684        "type.googleapis.com/google.cloud.aiplatform.v1.CreateIndexRequest"
49685    }
49686}
49687
49688/// Runtime operation information for
49689/// [IndexService.CreateIndex][google.cloud.aiplatform.v1.IndexService.CreateIndex].
49690///
49691/// [google.cloud.aiplatform.v1.IndexService.CreateIndex]: crate::client::IndexService::create_index
49692#[cfg(feature = "index-service")]
49693#[derive(Clone, Default, PartialEq)]
49694#[non_exhaustive]
49695pub struct CreateIndexOperationMetadata {
49696    /// The operation generic information.
49697    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
49698
49699    /// The operation metadata with regard to Matching Engine Index operation.
49700    pub nearest_neighbor_search_operation_metadata:
49701        std::option::Option<crate::model::NearestNeighborSearchOperationMetadata>,
49702
49703    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49704}
49705
49706#[cfg(feature = "index-service")]
49707impl CreateIndexOperationMetadata {
49708    pub fn new() -> Self {
49709        std::default::Default::default()
49710    }
49711
49712    /// Sets the value of [generic_metadata][crate::model::CreateIndexOperationMetadata::generic_metadata].
49713    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
49714    where
49715        T: std::convert::Into<crate::model::GenericOperationMetadata>,
49716    {
49717        self.generic_metadata = std::option::Option::Some(v.into());
49718        self
49719    }
49720
49721    /// Sets or clears the value of [generic_metadata][crate::model::CreateIndexOperationMetadata::generic_metadata].
49722    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
49723    where
49724        T: std::convert::Into<crate::model::GenericOperationMetadata>,
49725    {
49726        self.generic_metadata = v.map(|x| x.into());
49727        self
49728    }
49729
49730    /// Sets the value of [nearest_neighbor_search_operation_metadata][crate::model::CreateIndexOperationMetadata::nearest_neighbor_search_operation_metadata].
49731    pub fn set_nearest_neighbor_search_operation_metadata<T>(mut self, v: T) -> Self
49732    where
49733        T: std::convert::Into<crate::model::NearestNeighborSearchOperationMetadata>,
49734    {
49735        self.nearest_neighbor_search_operation_metadata = std::option::Option::Some(v.into());
49736        self
49737    }
49738
49739    /// Sets or clears the value of [nearest_neighbor_search_operation_metadata][crate::model::CreateIndexOperationMetadata::nearest_neighbor_search_operation_metadata].
49740    pub fn set_or_clear_nearest_neighbor_search_operation_metadata<T>(
49741        mut self,
49742        v: std::option::Option<T>,
49743    ) -> Self
49744    where
49745        T: std::convert::Into<crate::model::NearestNeighborSearchOperationMetadata>,
49746    {
49747        self.nearest_neighbor_search_operation_metadata = v.map(|x| x.into());
49748        self
49749    }
49750}
49751
49752#[cfg(feature = "index-service")]
49753impl wkt::message::Message for CreateIndexOperationMetadata {
49754    fn typename() -> &'static str {
49755        "type.googleapis.com/google.cloud.aiplatform.v1.CreateIndexOperationMetadata"
49756    }
49757}
49758
49759/// Request message for
49760/// [IndexService.GetIndex][google.cloud.aiplatform.v1.IndexService.GetIndex]
49761///
49762/// [google.cloud.aiplatform.v1.IndexService.GetIndex]: crate::client::IndexService::get_index
49763#[cfg(feature = "index-service")]
49764#[derive(Clone, Default, PartialEq)]
49765#[non_exhaustive]
49766pub struct GetIndexRequest {
49767    /// Required. The name of the Index resource.
49768    /// Format:
49769    /// `projects/{project}/locations/{location}/indexes/{index}`
49770    pub name: std::string::String,
49771
49772    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49773}
49774
49775#[cfg(feature = "index-service")]
49776impl GetIndexRequest {
49777    pub fn new() -> Self {
49778        std::default::Default::default()
49779    }
49780
49781    /// Sets the value of [name][crate::model::GetIndexRequest::name].
49782    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
49783        self.name = v.into();
49784        self
49785    }
49786}
49787
49788#[cfg(feature = "index-service")]
49789impl wkt::message::Message for GetIndexRequest {
49790    fn typename() -> &'static str {
49791        "type.googleapis.com/google.cloud.aiplatform.v1.GetIndexRequest"
49792    }
49793}
49794
49795/// Request message for
49796/// [IndexService.ListIndexes][google.cloud.aiplatform.v1.IndexService.ListIndexes].
49797///
49798/// [google.cloud.aiplatform.v1.IndexService.ListIndexes]: crate::client::IndexService::list_indexes
49799#[cfg(feature = "index-service")]
49800#[derive(Clone, Default, PartialEq)]
49801#[non_exhaustive]
49802pub struct ListIndexesRequest {
49803    /// Required. The resource name of the Location from which to list the Indexes.
49804    /// Format: `projects/{project}/locations/{location}`
49805    pub parent: std::string::String,
49806
49807    /// The standard list filter.
49808    pub filter: std::string::String,
49809
49810    /// The standard list page size.
49811    pub page_size: i32,
49812
49813    /// The standard list page token.
49814    /// Typically obtained via
49815    /// [ListIndexesResponse.next_page_token][google.cloud.aiplatform.v1.ListIndexesResponse.next_page_token]
49816    /// of the previous
49817    /// [IndexService.ListIndexes][google.cloud.aiplatform.v1.IndexService.ListIndexes]
49818    /// call.
49819    ///
49820    /// [google.cloud.aiplatform.v1.IndexService.ListIndexes]: crate::client::IndexService::list_indexes
49821    /// [google.cloud.aiplatform.v1.ListIndexesResponse.next_page_token]: crate::model::ListIndexesResponse::next_page_token
49822    pub page_token: std::string::String,
49823
49824    /// Mask specifying which fields to read.
49825    pub read_mask: std::option::Option<wkt::FieldMask>,
49826
49827    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49828}
49829
49830#[cfg(feature = "index-service")]
49831impl ListIndexesRequest {
49832    pub fn new() -> Self {
49833        std::default::Default::default()
49834    }
49835
49836    /// Sets the value of [parent][crate::model::ListIndexesRequest::parent].
49837    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
49838        self.parent = v.into();
49839        self
49840    }
49841
49842    /// Sets the value of [filter][crate::model::ListIndexesRequest::filter].
49843    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
49844        self.filter = v.into();
49845        self
49846    }
49847
49848    /// Sets the value of [page_size][crate::model::ListIndexesRequest::page_size].
49849    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
49850        self.page_size = v.into();
49851        self
49852    }
49853
49854    /// Sets the value of [page_token][crate::model::ListIndexesRequest::page_token].
49855    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
49856        self.page_token = v.into();
49857        self
49858    }
49859
49860    /// Sets the value of [read_mask][crate::model::ListIndexesRequest::read_mask].
49861    pub fn set_read_mask<T>(mut self, v: T) -> Self
49862    where
49863        T: std::convert::Into<wkt::FieldMask>,
49864    {
49865        self.read_mask = std::option::Option::Some(v.into());
49866        self
49867    }
49868
49869    /// Sets or clears the value of [read_mask][crate::model::ListIndexesRequest::read_mask].
49870    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
49871    where
49872        T: std::convert::Into<wkt::FieldMask>,
49873    {
49874        self.read_mask = v.map(|x| x.into());
49875        self
49876    }
49877}
49878
49879#[cfg(feature = "index-service")]
49880impl wkt::message::Message for ListIndexesRequest {
49881    fn typename() -> &'static str {
49882        "type.googleapis.com/google.cloud.aiplatform.v1.ListIndexesRequest"
49883    }
49884}
49885
49886/// Response message for
49887/// [IndexService.ListIndexes][google.cloud.aiplatform.v1.IndexService.ListIndexes].
49888///
49889/// [google.cloud.aiplatform.v1.IndexService.ListIndexes]: crate::client::IndexService::list_indexes
49890#[cfg(feature = "index-service")]
49891#[derive(Clone, Default, PartialEq)]
49892#[non_exhaustive]
49893pub struct ListIndexesResponse {
49894    /// List of indexes in the requested page.
49895    pub indexes: std::vec::Vec<crate::model::Index>,
49896
49897    /// A token to retrieve next page of results.
49898    /// Pass to
49899    /// [ListIndexesRequest.page_token][google.cloud.aiplatform.v1.ListIndexesRequest.page_token]
49900    /// to obtain that page.
49901    ///
49902    /// [google.cloud.aiplatform.v1.ListIndexesRequest.page_token]: crate::model::ListIndexesRequest::page_token
49903    pub next_page_token: std::string::String,
49904
49905    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49906}
49907
49908#[cfg(feature = "index-service")]
49909impl ListIndexesResponse {
49910    pub fn new() -> Self {
49911        std::default::Default::default()
49912    }
49913
49914    /// Sets the value of [indexes][crate::model::ListIndexesResponse::indexes].
49915    pub fn set_indexes<T, V>(mut self, v: T) -> Self
49916    where
49917        T: std::iter::IntoIterator<Item = V>,
49918        V: std::convert::Into<crate::model::Index>,
49919    {
49920        use std::iter::Iterator;
49921        self.indexes = v.into_iter().map(|i| i.into()).collect();
49922        self
49923    }
49924
49925    /// Sets the value of [next_page_token][crate::model::ListIndexesResponse::next_page_token].
49926    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
49927        self.next_page_token = v.into();
49928        self
49929    }
49930}
49931
49932#[cfg(feature = "index-service")]
49933impl wkt::message::Message for ListIndexesResponse {
49934    fn typename() -> &'static str {
49935        "type.googleapis.com/google.cloud.aiplatform.v1.ListIndexesResponse"
49936    }
49937}
49938
49939#[cfg(feature = "index-service")]
49940#[doc(hidden)]
49941impl gax::paginator::internal::PageableResponse for ListIndexesResponse {
49942    type PageItem = crate::model::Index;
49943
49944    fn items(self) -> std::vec::Vec<Self::PageItem> {
49945        self.indexes
49946    }
49947
49948    fn next_page_token(&self) -> std::string::String {
49949        use std::clone::Clone;
49950        self.next_page_token.clone()
49951    }
49952}
49953
49954/// Request message for
49955/// [IndexService.UpdateIndex][google.cloud.aiplatform.v1.IndexService.UpdateIndex].
49956///
49957/// [google.cloud.aiplatform.v1.IndexService.UpdateIndex]: crate::client::IndexService::update_index
49958#[cfg(feature = "index-service")]
49959#[derive(Clone, Default, PartialEq)]
49960#[non_exhaustive]
49961pub struct UpdateIndexRequest {
49962    /// Required. The Index which updates the resource on the server.
49963    pub index: std::option::Option<crate::model::Index>,
49964
49965    /// The update mask applies to the resource.
49966    /// For the `FieldMask` definition, see
49967    /// [google.protobuf.FieldMask][google.protobuf.FieldMask].
49968    ///
49969    /// [google.protobuf.FieldMask]: wkt::FieldMask
49970    pub update_mask: std::option::Option<wkt::FieldMask>,
49971
49972    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49973}
49974
49975#[cfg(feature = "index-service")]
49976impl UpdateIndexRequest {
49977    pub fn new() -> Self {
49978        std::default::Default::default()
49979    }
49980
49981    /// Sets the value of [index][crate::model::UpdateIndexRequest::index].
49982    pub fn set_index<T>(mut self, v: T) -> Self
49983    where
49984        T: std::convert::Into<crate::model::Index>,
49985    {
49986        self.index = std::option::Option::Some(v.into());
49987        self
49988    }
49989
49990    /// Sets or clears the value of [index][crate::model::UpdateIndexRequest::index].
49991    pub fn set_or_clear_index<T>(mut self, v: std::option::Option<T>) -> Self
49992    where
49993        T: std::convert::Into<crate::model::Index>,
49994    {
49995        self.index = v.map(|x| x.into());
49996        self
49997    }
49998
49999    /// Sets the value of [update_mask][crate::model::UpdateIndexRequest::update_mask].
50000    pub fn set_update_mask<T>(mut self, v: T) -> Self
50001    where
50002        T: std::convert::Into<wkt::FieldMask>,
50003    {
50004        self.update_mask = std::option::Option::Some(v.into());
50005        self
50006    }
50007
50008    /// Sets or clears the value of [update_mask][crate::model::UpdateIndexRequest::update_mask].
50009    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
50010    where
50011        T: std::convert::Into<wkt::FieldMask>,
50012    {
50013        self.update_mask = v.map(|x| x.into());
50014        self
50015    }
50016}
50017
50018#[cfg(feature = "index-service")]
50019impl wkt::message::Message for UpdateIndexRequest {
50020    fn typename() -> &'static str {
50021        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateIndexRequest"
50022    }
50023}
50024
50025/// Runtime operation information for
50026/// [IndexService.UpdateIndex][google.cloud.aiplatform.v1.IndexService.UpdateIndex].
50027///
50028/// [google.cloud.aiplatform.v1.IndexService.UpdateIndex]: crate::client::IndexService::update_index
50029#[cfg(feature = "index-service")]
50030#[derive(Clone, Default, PartialEq)]
50031#[non_exhaustive]
50032pub struct UpdateIndexOperationMetadata {
50033    /// The operation generic information.
50034    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
50035
50036    /// The operation metadata with regard to Matching Engine Index operation.
50037    pub nearest_neighbor_search_operation_metadata:
50038        std::option::Option<crate::model::NearestNeighborSearchOperationMetadata>,
50039
50040    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50041}
50042
50043#[cfg(feature = "index-service")]
50044impl UpdateIndexOperationMetadata {
50045    pub fn new() -> Self {
50046        std::default::Default::default()
50047    }
50048
50049    /// Sets the value of [generic_metadata][crate::model::UpdateIndexOperationMetadata::generic_metadata].
50050    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
50051    where
50052        T: std::convert::Into<crate::model::GenericOperationMetadata>,
50053    {
50054        self.generic_metadata = std::option::Option::Some(v.into());
50055        self
50056    }
50057
50058    /// Sets or clears the value of [generic_metadata][crate::model::UpdateIndexOperationMetadata::generic_metadata].
50059    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
50060    where
50061        T: std::convert::Into<crate::model::GenericOperationMetadata>,
50062    {
50063        self.generic_metadata = v.map(|x| x.into());
50064        self
50065    }
50066
50067    /// Sets the value of [nearest_neighbor_search_operation_metadata][crate::model::UpdateIndexOperationMetadata::nearest_neighbor_search_operation_metadata].
50068    pub fn set_nearest_neighbor_search_operation_metadata<T>(mut self, v: T) -> Self
50069    where
50070        T: std::convert::Into<crate::model::NearestNeighborSearchOperationMetadata>,
50071    {
50072        self.nearest_neighbor_search_operation_metadata = std::option::Option::Some(v.into());
50073        self
50074    }
50075
50076    /// Sets or clears the value of [nearest_neighbor_search_operation_metadata][crate::model::UpdateIndexOperationMetadata::nearest_neighbor_search_operation_metadata].
50077    pub fn set_or_clear_nearest_neighbor_search_operation_metadata<T>(
50078        mut self,
50079        v: std::option::Option<T>,
50080    ) -> Self
50081    where
50082        T: std::convert::Into<crate::model::NearestNeighborSearchOperationMetadata>,
50083    {
50084        self.nearest_neighbor_search_operation_metadata = v.map(|x| x.into());
50085        self
50086    }
50087}
50088
50089#[cfg(feature = "index-service")]
50090impl wkt::message::Message for UpdateIndexOperationMetadata {
50091    fn typename() -> &'static str {
50092        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateIndexOperationMetadata"
50093    }
50094}
50095
50096/// Request message for
50097/// [IndexService.DeleteIndex][google.cloud.aiplatform.v1.IndexService.DeleteIndex].
50098///
50099/// [google.cloud.aiplatform.v1.IndexService.DeleteIndex]: crate::client::IndexService::delete_index
50100#[cfg(feature = "index-service")]
50101#[derive(Clone, Default, PartialEq)]
50102#[non_exhaustive]
50103pub struct DeleteIndexRequest {
50104    /// Required. The name of the Index resource to be deleted.
50105    /// Format:
50106    /// `projects/{project}/locations/{location}/indexes/{index}`
50107    pub name: std::string::String,
50108
50109    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50110}
50111
50112#[cfg(feature = "index-service")]
50113impl DeleteIndexRequest {
50114    pub fn new() -> Self {
50115        std::default::Default::default()
50116    }
50117
50118    /// Sets the value of [name][crate::model::DeleteIndexRequest::name].
50119    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
50120        self.name = v.into();
50121        self
50122    }
50123}
50124
50125#[cfg(feature = "index-service")]
50126impl wkt::message::Message for DeleteIndexRequest {
50127    fn typename() -> &'static str {
50128        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteIndexRequest"
50129    }
50130}
50131
50132/// Request message for
50133/// [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1.IndexService.UpsertDatapoints]
50134///
50135/// [google.cloud.aiplatform.v1.IndexService.UpsertDatapoints]: crate::client::IndexService::upsert_datapoints
50136#[cfg(feature = "index-service")]
50137#[derive(Clone, Default, PartialEq)]
50138#[non_exhaustive]
50139pub struct UpsertDatapointsRequest {
50140    /// Required. The name of the Index resource to be updated.
50141    /// Format:
50142    /// `projects/{project}/locations/{location}/indexes/{index}`
50143    pub index: std::string::String,
50144
50145    /// A list of datapoints to be created/updated.
50146    pub datapoints: std::vec::Vec<crate::model::IndexDatapoint>,
50147
50148    /// Optional. Update mask is used to specify the fields to be overwritten in
50149    /// the datapoints by the update. The fields specified in the update_mask are
50150    /// relative to each IndexDatapoint inside datapoints, not the full request.
50151    ///
50152    /// Updatable fields:
50153    ///
50154    /// * Use `all_restricts` to update both restricts and numeric_restricts.
50155    pub update_mask: std::option::Option<wkt::FieldMask>,
50156
50157    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50158}
50159
50160#[cfg(feature = "index-service")]
50161impl UpsertDatapointsRequest {
50162    pub fn new() -> Self {
50163        std::default::Default::default()
50164    }
50165
50166    /// Sets the value of [index][crate::model::UpsertDatapointsRequest::index].
50167    pub fn set_index<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
50168        self.index = v.into();
50169        self
50170    }
50171
50172    /// Sets the value of [datapoints][crate::model::UpsertDatapointsRequest::datapoints].
50173    pub fn set_datapoints<T, V>(mut self, v: T) -> Self
50174    where
50175        T: std::iter::IntoIterator<Item = V>,
50176        V: std::convert::Into<crate::model::IndexDatapoint>,
50177    {
50178        use std::iter::Iterator;
50179        self.datapoints = v.into_iter().map(|i| i.into()).collect();
50180        self
50181    }
50182
50183    /// Sets the value of [update_mask][crate::model::UpsertDatapointsRequest::update_mask].
50184    pub fn set_update_mask<T>(mut self, v: T) -> Self
50185    where
50186        T: std::convert::Into<wkt::FieldMask>,
50187    {
50188        self.update_mask = std::option::Option::Some(v.into());
50189        self
50190    }
50191
50192    /// Sets or clears the value of [update_mask][crate::model::UpsertDatapointsRequest::update_mask].
50193    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
50194    where
50195        T: std::convert::Into<wkt::FieldMask>,
50196    {
50197        self.update_mask = v.map(|x| x.into());
50198        self
50199    }
50200}
50201
50202#[cfg(feature = "index-service")]
50203impl wkt::message::Message for UpsertDatapointsRequest {
50204    fn typename() -> &'static str {
50205        "type.googleapis.com/google.cloud.aiplatform.v1.UpsertDatapointsRequest"
50206    }
50207}
50208
50209/// Response message for
50210/// [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1.IndexService.UpsertDatapoints]
50211///
50212/// [google.cloud.aiplatform.v1.IndexService.UpsertDatapoints]: crate::client::IndexService::upsert_datapoints
50213#[cfg(feature = "index-service")]
50214#[derive(Clone, Default, PartialEq)]
50215#[non_exhaustive]
50216pub struct UpsertDatapointsResponse {
50217    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50218}
50219
50220#[cfg(feature = "index-service")]
50221impl UpsertDatapointsResponse {
50222    pub fn new() -> Self {
50223        std::default::Default::default()
50224    }
50225}
50226
50227#[cfg(feature = "index-service")]
50228impl wkt::message::Message for UpsertDatapointsResponse {
50229    fn typename() -> &'static str {
50230        "type.googleapis.com/google.cloud.aiplatform.v1.UpsertDatapointsResponse"
50231    }
50232}
50233
50234/// Request message for
50235/// [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1.IndexService.RemoveDatapoints]
50236///
50237/// [google.cloud.aiplatform.v1.IndexService.RemoveDatapoints]: crate::client::IndexService::remove_datapoints
50238#[cfg(feature = "index-service")]
50239#[derive(Clone, Default, PartialEq)]
50240#[non_exhaustive]
50241pub struct RemoveDatapointsRequest {
50242    /// Required. The name of the Index resource to be updated.
50243    /// Format:
50244    /// `projects/{project}/locations/{location}/indexes/{index}`
50245    pub index: std::string::String,
50246
50247    /// A list of datapoint ids to be deleted.
50248    pub datapoint_ids: std::vec::Vec<std::string::String>,
50249
50250    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50251}
50252
50253#[cfg(feature = "index-service")]
50254impl RemoveDatapointsRequest {
50255    pub fn new() -> Self {
50256        std::default::Default::default()
50257    }
50258
50259    /// Sets the value of [index][crate::model::RemoveDatapointsRequest::index].
50260    pub fn set_index<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
50261        self.index = v.into();
50262        self
50263    }
50264
50265    /// Sets the value of [datapoint_ids][crate::model::RemoveDatapointsRequest::datapoint_ids].
50266    pub fn set_datapoint_ids<T, V>(mut self, v: T) -> Self
50267    where
50268        T: std::iter::IntoIterator<Item = V>,
50269        V: std::convert::Into<std::string::String>,
50270    {
50271        use std::iter::Iterator;
50272        self.datapoint_ids = v.into_iter().map(|i| i.into()).collect();
50273        self
50274    }
50275}
50276
50277#[cfg(feature = "index-service")]
50278impl wkt::message::Message for RemoveDatapointsRequest {
50279    fn typename() -> &'static str {
50280        "type.googleapis.com/google.cloud.aiplatform.v1.RemoveDatapointsRequest"
50281    }
50282}
50283
50284/// Response message for
50285/// [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1.IndexService.RemoveDatapoints]
50286///
50287/// [google.cloud.aiplatform.v1.IndexService.RemoveDatapoints]: crate::client::IndexService::remove_datapoints
50288#[cfg(feature = "index-service")]
50289#[derive(Clone, Default, PartialEq)]
50290#[non_exhaustive]
50291pub struct RemoveDatapointsResponse {
50292    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50293}
50294
50295#[cfg(feature = "index-service")]
50296impl RemoveDatapointsResponse {
50297    pub fn new() -> Self {
50298        std::default::Default::default()
50299    }
50300}
50301
50302#[cfg(feature = "index-service")]
50303impl wkt::message::Message for RemoveDatapointsResponse {
50304    fn typename() -> &'static str {
50305        "type.googleapis.com/google.cloud.aiplatform.v1.RemoveDatapointsResponse"
50306    }
50307}
50308
50309/// Runtime operation metadata with regard to Matching Engine Index.
50310#[cfg(feature = "index-service")]
50311#[derive(Clone, Default, PartialEq)]
50312#[non_exhaustive]
50313pub struct NearestNeighborSearchOperationMetadata {
50314    /// The validation stats of the content (per file) to be inserted or
50315    /// updated on the Matching Engine Index resource. Populated if
50316    /// contentsDeltaUri is provided as part of
50317    /// [Index.metadata][google.cloud.aiplatform.v1.Index.metadata]. Please note
50318    /// that, currently for those files that are broken or has unsupported file
50319    /// format, we will not have the stats for those files.
50320    ///
50321    /// [google.cloud.aiplatform.v1.Index.metadata]: crate::model::Index::metadata
50322    pub content_validation_stats: std::vec::Vec<
50323        crate::model::nearest_neighbor_search_operation_metadata::ContentValidationStats,
50324    >,
50325
50326    /// The ingested data size in bytes.
50327    pub data_bytes_count: i64,
50328
50329    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50330}
50331
50332#[cfg(feature = "index-service")]
50333impl NearestNeighborSearchOperationMetadata {
50334    pub fn new() -> Self {
50335        std::default::Default::default()
50336    }
50337
50338    /// Sets the value of [content_validation_stats][crate::model::NearestNeighborSearchOperationMetadata::content_validation_stats].
50339    pub fn set_content_validation_stats<T, V>(mut self, v: T) -> Self
50340    where
50341        T: std::iter::IntoIterator<Item = V>,
50342        V: std::convert::Into<
50343                crate::model::nearest_neighbor_search_operation_metadata::ContentValidationStats,
50344            >,
50345    {
50346        use std::iter::Iterator;
50347        self.content_validation_stats = v.into_iter().map(|i| i.into()).collect();
50348        self
50349    }
50350
50351    /// Sets the value of [data_bytes_count][crate::model::NearestNeighborSearchOperationMetadata::data_bytes_count].
50352    pub fn set_data_bytes_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
50353        self.data_bytes_count = v.into();
50354        self
50355    }
50356}
50357
50358#[cfg(feature = "index-service")]
50359impl wkt::message::Message for NearestNeighborSearchOperationMetadata {
50360    fn typename() -> &'static str {
50361        "type.googleapis.com/google.cloud.aiplatform.v1.NearestNeighborSearchOperationMetadata"
50362    }
50363}
50364
50365/// Defines additional types related to [NearestNeighborSearchOperationMetadata].
50366#[cfg(feature = "index-service")]
50367pub mod nearest_neighbor_search_operation_metadata {
50368    #[allow(unused_imports)]
50369    use super::*;
50370
50371    #[cfg(feature = "index-service")]
50372    #[derive(Clone, Default, PartialEq)]
50373    #[non_exhaustive]
50374    pub struct RecordError {
50375        /// The error type of this record.
50376        pub error_type:
50377            crate::model::nearest_neighbor_search_operation_metadata::record_error::RecordErrorType,
50378
50379        /// A human-readable message that is shown to the user to help them fix the
50380        /// error. Note that this message may change from time to time, your code
50381        /// should check against error_type as the source of truth.
50382        pub error_message: std::string::String,
50383
50384        /// Cloud Storage URI pointing to the original file in user's bucket.
50385        pub source_gcs_uri: std::string::String,
50386
50387        /// Empty if the embedding id is failed to parse.
50388        pub embedding_id: std::string::String,
50389
50390        /// The original content of this record.
50391        pub raw_record: std::string::String,
50392
50393        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50394    }
50395
50396    #[cfg(feature = "index-service")]
50397    impl RecordError {
50398        pub fn new() -> Self {
50399            std::default::Default::default()
50400        }
50401
50402        /// Sets the value of [error_type][crate::model::nearest_neighbor_search_operation_metadata::RecordError::error_type].
50403        pub fn set_error_type<T: std::convert::Into<crate::model::nearest_neighbor_search_operation_metadata::record_error::RecordErrorType>>(mut self, v: T) -> Self{
50404            self.error_type = v.into();
50405            self
50406        }
50407
50408        /// Sets the value of [error_message][crate::model::nearest_neighbor_search_operation_metadata::RecordError::error_message].
50409        pub fn set_error_message<T: std::convert::Into<std::string::String>>(
50410            mut self,
50411            v: T,
50412        ) -> Self {
50413            self.error_message = v.into();
50414            self
50415        }
50416
50417        /// Sets the value of [source_gcs_uri][crate::model::nearest_neighbor_search_operation_metadata::RecordError::source_gcs_uri].
50418        pub fn set_source_gcs_uri<T: std::convert::Into<std::string::String>>(
50419            mut self,
50420            v: T,
50421        ) -> Self {
50422            self.source_gcs_uri = v.into();
50423            self
50424        }
50425
50426        /// Sets the value of [embedding_id][crate::model::nearest_neighbor_search_operation_metadata::RecordError::embedding_id].
50427        pub fn set_embedding_id<T: std::convert::Into<std::string::String>>(
50428            mut self,
50429            v: T,
50430        ) -> Self {
50431            self.embedding_id = v.into();
50432            self
50433        }
50434
50435        /// Sets the value of [raw_record][crate::model::nearest_neighbor_search_operation_metadata::RecordError::raw_record].
50436        pub fn set_raw_record<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
50437            self.raw_record = v.into();
50438            self
50439        }
50440    }
50441
50442    #[cfg(feature = "index-service")]
50443    impl wkt::message::Message for RecordError {
50444        fn typename() -> &'static str {
50445            "type.googleapis.com/google.cloud.aiplatform.v1.NearestNeighborSearchOperationMetadata.RecordError"
50446        }
50447    }
50448
50449    /// Defines additional types related to [RecordError].
50450    #[cfg(feature = "index-service")]
50451    pub mod record_error {
50452        #[allow(unused_imports)]
50453        use super::*;
50454
50455        ///
50456        /// # Working with unknown values
50457        ///
50458        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
50459        /// additional enum variants at any time. Adding new variants is not considered
50460        /// a breaking change. Applications should write their code in anticipation of:
50461        ///
50462        /// - New values appearing in future releases of the client library, **and**
50463        /// - New values received dynamically, without application changes.
50464        ///
50465        /// Please consult the [Working with enums] section in the user guide for some
50466        /// guidelines.
50467        ///
50468        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
50469        #[cfg(feature = "index-service")]
50470        #[derive(Clone, Debug, PartialEq)]
50471        #[non_exhaustive]
50472        pub enum RecordErrorType {
50473            /// Default, shall not be used.
50474            ErrorTypeUnspecified,
50475            /// The record is empty.
50476            EmptyLine,
50477            /// Invalid json format.
50478            InvalidJsonSyntax,
50479            /// Invalid csv format.
50480            InvalidCsvSyntax,
50481            /// Invalid avro format.
50482            InvalidAvroSyntax,
50483            /// The embedding id is not valid.
50484            InvalidEmbeddingId,
50485            /// The size of the dense embedding vectors does not match with the
50486            /// specified dimension.
50487            EmbeddingSizeMismatch,
50488            /// The `namespace` field is missing.
50489            NamespaceMissing,
50490            /// Generic catch-all error. Only used for validation failure where the
50491            /// root cause cannot be easily retrieved programmatically.
50492            ParsingError,
50493            /// There are multiple restricts with the same `namespace` value.
50494            DuplicateNamespace,
50495            /// Numeric restrict has operator specified in datapoint.
50496            OpInDatapoint,
50497            /// Numeric restrict has multiple values specified.
50498            MultipleValues,
50499            /// Numeric restrict has invalid numeric value specified.
50500            InvalidNumericValue,
50501            /// File is not in UTF_8 format.
50502            InvalidEncoding,
50503            /// Error parsing sparse dimensions field.
50504            InvalidSparseDimensions,
50505            /// Token restrict value is invalid.
50506            InvalidTokenValue,
50507            /// Invalid sparse embedding.
50508            InvalidSparseEmbedding,
50509            /// Invalid dense embedding.
50510            InvalidEmbedding,
50511            /// If set, the enum was initialized with an unknown value.
50512            ///
50513            /// Applications can examine the value using [RecordErrorType::value] or
50514            /// [RecordErrorType::name].
50515            UnknownValue(record_error_type::UnknownValue),
50516        }
50517
50518        #[doc(hidden)]
50519        #[cfg(feature = "index-service")]
50520        pub mod record_error_type {
50521            #[allow(unused_imports)]
50522            use super::*;
50523            #[derive(Clone, Debug, PartialEq)]
50524            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
50525        }
50526
50527        #[cfg(feature = "index-service")]
50528        impl RecordErrorType {
50529            /// Gets the enum value.
50530            ///
50531            /// Returns `None` if the enum contains an unknown value deserialized from
50532            /// the string representation of enums.
50533            pub fn value(&self) -> std::option::Option<i32> {
50534                match self {
50535                    Self::ErrorTypeUnspecified => std::option::Option::Some(0),
50536                    Self::EmptyLine => std::option::Option::Some(1),
50537                    Self::InvalidJsonSyntax => std::option::Option::Some(2),
50538                    Self::InvalidCsvSyntax => std::option::Option::Some(3),
50539                    Self::InvalidAvroSyntax => std::option::Option::Some(4),
50540                    Self::InvalidEmbeddingId => std::option::Option::Some(5),
50541                    Self::EmbeddingSizeMismatch => std::option::Option::Some(6),
50542                    Self::NamespaceMissing => std::option::Option::Some(7),
50543                    Self::ParsingError => std::option::Option::Some(8),
50544                    Self::DuplicateNamespace => std::option::Option::Some(9),
50545                    Self::OpInDatapoint => std::option::Option::Some(10),
50546                    Self::MultipleValues => std::option::Option::Some(11),
50547                    Self::InvalidNumericValue => std::option::Option::Some(12),
50548                    Self::InvalidEncoding => std::option::Option::Some(13),
50549                    Self::InvalidSparseDimensions => std::option::Option::Some(14),
50550                    Self::InvalidTokenValue => std::option::Option::Some(15),
50551                    Self::InvalidSparseEmbedding => std::option::Option::Some(16),
50552                    Self::InvalidEmbedding => std::option::Option::Some(17),
50553                    Self::UnknownValue(u) => u.0.value(),
50554                }
50555            }
50556
50557            /// Gets the enum value as a string.
50558            ///
50559            /// Returns `None` if the enum contains an unknown value deserialized from
50560            /// the integer representation of enums.
50561            pub fn name(&self) -> std::option::Option<&str> {
50562                match self {
50563                    Self::ErrorTypeUnspecified => {
50564                        std::option::Option::Some("ERROR_TYPE_UNSPECIFIED")
50565                    }
50566                    Self::EmptyLine => std::option::Option::Some("EMPTY_LINE"),
50567                    Self::InvalidJsonSyntax => std::option::Option::Some("INVALID_JSON_SYNTAX"),
50568                    Self::InvalidCsvSyntax => std::option::Option::Some("INVALID_CSV_SYNTAX"),
50569                    Self::InvalidAvroSyntax => std::option::Option::Some("INVALID_AVRO_SYNTAX"),
50570                    Self::InvalidEmbeddingId => std::option::Option::Some("INVALID_EMBEDDING_ID"),
50571                    Self::EmbeddingSizeMismatch => {
50572                        std::option::Option::Some("EMBEDDING_SIZE_MISMATCH")
50573                    }
50574                    Self::NamespaceMissing => std::option::Option::Some("NAMESPACE_MISSING"),
50575                    Self::ParsingError => std::option::Option::Some("PARSING_ERROR"),
50576                    Self::DuplicateNamespace => std::option::Option::Some("DUPLICATE_NAMESPACE"),
50577                    Self::OpInDatapoint => std::option::Option::Some("OP_IN_DATAPOINT"),
50578                    Self::MultipleValues => std::option::Option::Some("MULTIPLE_VALUES"),
50579                    Self::InvalidNumericValue => std::option::Option::Some("INVALID_NUMERIC_VALUE"),
50580                    Self::InvalidEncoding => std::option::Option::Some("INVALID_ENCODING"),
50581                    Self::InvalidSparseDimensions => {
50582                        std::option::Option::Some("INVALID_SPARSE_DIMENSIONS")
50583                    }
50584                    Self::InvalidTokenValue => std::option::Option::Some("INVALID_TOKEN_VALUE"),
50585                    Self::InvalidSparseEmbedding => {
50586                        std::option::Option::Some("INVALID_SPARSE_EMBEDDING")
50587                    }
50588                    Self::InvalidEmbedding => std::option::Option::Some("INVALID_EMBEDDING"),
50589                    Self::UnknownValue(u) => u.0.name(),
50590                }
50591            }
50592        }
50593
50594        #[cfg(feature = "index-service")]
50595        impl std::default::Default for RecordErrorType {
50596            fn default() -> Self {
50597                use std::convert::From;
50598                Self::from(0)
50599            }
50600        }
50601
50602        #[cfg(feature = "index-service")]
50603        impl std::fmt::Display for RecordErrorType {
50604            fn fmt(
50605                &self,
50606                f: &mut std::fmt::Formatter<'_>,
50607            ) -> std::result::Result<(), std::fmt::Error> {
50608                wkt::internal::display_enum(f, self.name(), self.value())
50609            }
50610        }
50611
50612        #[cfg(feature = "index-service")]
50613        impl std::convert::From<i32> for RecordErrorType {
50614            fn from(value: i32) -> Self {
50615                match value {
50616                    0 => Self::ErrorTypeUnspecified,
50617                    1 => Self::EmptyLine,
50618                    2 => Self::InvalidJsonSyntax,
50619                    3 => Self::InvalidCsvSyntax,
50620                    4 => Self::InvalidAvroSyntax,
50621                    5 => Self::InvalidEmbeddingId,
50622                    6 => Self::EmbeddingSizeMismatch,
50623                    7 => Self::NamespaceMissing,
50624                    8 => Self::ParsingError,
50625                    9 => Self::DuplicateNamespace,
50626                    10 => Self::OpInDatapoint,
50627                    11 => Self::MultipleValues,
50628                    12 => Self::InvalidNumericValue,
50629                    13 => Self::InvalidEncoding,
50630                    14 => Self::InvalidSparseDimensions,
50631                    15 => Self::InvalidTokenValue,
50632                    16 => Self::InvalidSparseEmbedding,
50633                    17 => Self::InvalidEmbedding,
50634                    _ => Self::UnknownValue(record_error_type::UnknownValue(
50635                        wkt::internal::UnknownEnumValue::Integer(value),
50636                    )),
50637                }
50638            }
50639        }
50640
50641        #[cfg(feature = "index-service")]
50642        impl std::convert::From<&str> for RecordErrorType {
50643            fn from(value: &str) -> Self {
50644                use std::string::ToString;
50645                match value {
50646                    "ERROR_TYPE_UNSPECIFIED" => Self::ErrorTypeUnspecified,
50647                    "EMPTY_LINE" => Self::EmptyLine,
50648                    "INVALID_JSON_SYNTAX" => Self::InvalidJsonSyntax,
50649                    "INVALID_CSV_SYNTAX" => Self::InvalidCsvSyntax,
50650                    "INVALID_AVRO_SYNTAX" => Self::InvalidAvroSyntax,
50651                    "INVALID_EMBEDDING_ID" => Self::InvalidEmbeddingId,
50652                    "EMBEDDING_SIZE_MISMATCH" => Self::EmbeddingSizeMismatch,
50653                    "NAMESPACE_MISSING" => Self::NamespaceMissing,
50654                    "PARSING_ERROR" => Self::ParsingError,
50655                    "DUPLICATE_NAMESPACE" => Self::DuplicateNamespace,
50656                    "OP_IN_DATAPOINT" => Self::OpInDatapoint,
50657                    "MULTIPLE_VALUES" => Self::MultipleValues,
50658                    "INVALID_NUMERIC_VALUE" => Self::InvalidNumericValue,
50659                    "INVALID_ENCODING" => Self::InvalidEncoding,
50660                    "INVALID_SPARSE_DIMENSIONS" => Self::InvalidSparseDimensions,
50661                    "INVALID_TOKEN_VALUE" => Self::InvalidTokenValue,
50662                    "INVALID_SPARSE_EMBEDDING" => Self::InvalidSparseEmbedding,
50663                    "INVALID_EMBEDDING" => Self::InvalidEmbedding,
50664                    _ => Self::UnknownValue(record_error_type::UnknownValue(
50665                        wkt::internal::UnknownEnumValue::String(value.to_string()),
50666                    )),
50667                }
50668            }
50669        }
50670
50671        #[cfg(feature = "index-service")]
50672        impl serde::ser::Serialize for RecordErrorType {
50673            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
50674            where
50675                S: serde::Serializer,
50676            {
50677                match self {
50678                    Self::ErrorTypeUnspecified => serializer.serialize_i32(0),
50679                    Self::EmptyLine => serializer.serialize_i32(1),
50680                    Self::InvalidJsonSyntax => serializer.serialize_i32(2),
50681                    Self::InvalidCsvSyntax => serializer.serialize_i32(3),
50682                    Self::InvalidAvroSyntax => serializer.serialize_i32(4),
50683                    Self::InvalidEmbeddingId => serializer.serialize_i32(5),
50684                    Self::EmbeddingSizeMismatch => serializer.serialize_i32(6),
50685                    Self::NamespaceMissing => serializer.serialize_i32(7),
50686                    Self::ParsingError => serializer.serialize_i32(8),
50687                    Self::DuplicateNamespace => serializer.serialize_i32(9),
50688                    Self::OpInDatapoint => serializer.serialize_i32(10),
50689                    Self::MultipleValues => serializer.serialize_i32(11),
50690                    Self::InvalidNumericValue => serializer.serialize_i32(12),
50691                    Self::InvalidEncoding => serializer.serialize_i32(13),
50692                    Self::InvalidSparseDimensions => serializer.serialize_i32(14),
50693                    Self::InvalidTokenValue => serializer.serialize_i32(15),
50694                    Self::InvalidSparseEmbedding => serializer.serialize_i32(16),
50695                    Self::InvalidEmbedding => serializer.serialize_i32(17),
50696                    Self::UnknownValue(u) => u.0.serialize(serializer),
50697                }
50698            }
50699        }
50700
50701        #[cfg(feature = "index-service")]
50702        impl<'de> serde::de::Deserialize<'de> for RecordErrorType {
50703            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
50704            where
50705                D: serde::Deserializer<'de>,
50706            {
50707                deserializer.deserialize_any(wkt::internal::EnumVisitor::<RecordErrorType>::new(
50708                    ".google.cloud.aiplatform.v1.NearestNeighborSearchOperationMetadata.RecordError.RecordErrorType"))
50709            }
50710        }
50711    }
50712
50713    #[cfg(feature = "index-service")]
50714    #[derive(Clone, Default, PartialEq)]
50715    #[non_exhaustive]
50716    pub struct ContentValidationStats {
50717        /// Cloud Storage URI pointing to the original file in user's bucket.
50718        pub source_gcs_uri: std::string::String,
50719
50720        /// Number of records in this file that were successfully processed.
50721        pub valid_record_count: i64,
50722
50723        /// Number of records in this file we skipped due to validate errors.
50724        pub invalid_record_count: i64,
50725
50726        /// The detail information of the partial failures encountered for those
50727        /// invalid records that couldn't be parsed.
50728        /// Up to 50 partial errors will be reported.
50729        pub partial_errors:
50730            std::vec::Vec<crate::model::nearest_neighbor_search_operation_metadata::RecordError>,
50731
50732        /// Number of sparse records in this file that were successfully processed.
50733        pub valid_sparse_record_count: i64,
50734
50735        /// Number of sparse records in this file we skipped due to validate errors.
50736        pub invalid_sparse_record_count: i64,
50737
50738        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50739    }
50740
50741    #[cfg(feature = "index-service")]
50742    impl ContentValidationStats {
50743        pub fn new() -> Self {
50744            std::default::Default::default()
50745        }
50746
50747        /// Sets the value of [source_gcs_uri][crate::model::nearest_neighbor_search_operation_metadata::ContentValidationStats::source_gcs_uri].
50748        pub fn set_source_gcs_uri<T: std::convert::Into<std::string::String>>(
50749            mut self,
50750            v: T,
50751        ) -> Self {
50752            self.source_gcs_uri = v.into();
50753            self
50754        }
50755
50756        /// Sets the value of [valid_record_count][crate::model::nearest_neighbor_search_operation_metadata::ContentValidationStats::valid_record_count].
50757        pub fn set_valid_record_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
50758            self.valid_record_count = v.into();
50759            self
50760        }
50761
50762        /// Sets the value of [invalid_record_count][crate::model::nearest_neighbor_search_operation_metadata::ContentValidationStats::invalid_record_count].
50763        pub fn set_invalid_record_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
50764            self.invalid_record_count = v.into();
50765            self
50766        }
50767
50768        /// Sets the value of [partial_errors][crate::model::nearest_neighbor_search_operation_metadata::ContentValidationStats::partial_errors].
50769        pub fn set_partial_errors<T, V>(mut self, v: T) -> Self
50770        where
50771            T: std::iter::IntoIterator<Item = V>,
50772            V: std::convert::Into<
50773                    crate::model::nearest_neighbor_search_operation_metadata::RecordError,
50774                >,
50775        {
50776            use std::iter::Iterator;
50777            self.partial_errors = v.into_iter().map(|i| i.into()).collect();
50778            self
50779        }
50780
50781        /// Sets the value of [valid_sparse_record_count][crate::model::nearest_neighbor_search_operation_metadata::ContentValidationStats::valid_sparse_record_count].
50782        pub fn set_valid_sparse_record_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
50783            self.valid_sparse_record_count = v.into();
50784            self
50785        }
50786
50787        /// Sets the value of [invalid_sparse_record_count][crate::model::nearest_neighbor_search_operation_metadata::ContentValidationStats::invalid_sparse_record_count].
50788        pub fn set_invalid_sparse_record_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
50789            self.invalid_sparse_record_count = v.into();
50790            self
50791        }
50792    }
50793
50794    #[cfg(feature = "index-service")]
50795    impl wkt::message::Message for ContentValidationStats {
50796        fn typename() -> &'static str {
50797            "type.googleapis.com/google.cloud.aiplatform.v1.NearestNeighborSearchOperationMetadata.ContentValidationStats"
50798        }
50799    }
50800}
50801
50802/// The storage details for Avro input content.
50803#[cfg(feature = "featurestore-service")]
50804#[derive(Clone, Default, PartialEq)]
50805#[non_exhaustive]
50806pub struct AvroSource {
50807    /// Required. Google Cloud Storage location.
50808    pub gcs_source: std::option::Option<crate::model::GcsSource>,
50809
50810    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50811}
50812
50813#[cfg(feature = "featurestore-service")]
50814impl AvroSource {
50815    pub fn new() -> Self {
50816        std::default::Default::default()
50817    }
50818
50819    /// Sets the value of [gcs_source][crate::model::AvroSource::gcs_source].
50820    pub fn set_gcs_source<T>(mut self, v: T) -> Self
50821    where
50822        T: std::convert::Into<crate::model::GcsSource>,
50823    {
50824        self.gcs_source = std::option::Option::Some(v.into());
50825        self
50826    }
50827
50828    /// Sets or clears the value of [gcs_source][crate::model::AvroSource::gcs_source].
50829    pub fn set_or_clear_gcs_source<T>(mut self, v: std::option::Option<T>) -> Self
50830    where
50831        T: std::convert::Into<crate::model::GcsSource>,
50832    {
50833        self.gcs_source = v.map(|x| x.into());
50834        self
50835    }
50836}
50837
50838#[cfg(feature = "featurestore-service")]
50839impl wkt::message::Message for AvroSource {
50840    fn typename() -> &'static str {
50841        "type.googleapis.com/google.cloud.aiplatform.v1.AvroSource"
50842    }
50843}
50844
50845/// The storage details for CSV input content.
50846#[cfg(feature = "featurestore-service")]
50847#[derive(Clone, Default, PartialEq)]
50848#[non_exhaustive]
50849pub struct CsvSource {
50850    /// Required. Google Cloud Storage location.
50851    pub gcs_source: std::option::Option<crate::model::GcsSource>,
50852
50853    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50854}
50855
50856#[cfg(feature = "featurestore-service")]
50857impl CsvSource {
50858    pub fn new() -> Self {
50859        std::default::Default::default()
50860    }
50861
50862    /// Sets the value of [gcs_source][crate::model::CsvSource::gcs_source].
50863    pub fn set_gcs_source<T>(mut self, v: T) -> Self
50864    where
50865        T: std::convert::Into<crate::model::GcsSource>,
50866    {
50867        self.gcs_source = std::option::Option::Some(v.into());
50868        self
50869    }
50870
50871    /// Sets or clears the value of [gcs_source][crate::model::CsvSource::gcs_source].
50872    pub fn set_or_clear_gcs_source<T>(mut self, v: std::option::Option<T>) -> Self
50873    where
50874        T: std::convert::Into<crate::model::GcsSource>,
50875    {
50876        self.gcs_source = v.map(|x| x.into());
50877        self
50878    }
50879}
50880
50881#[cfg(feature = "featurestore-service")]
50882impl wkt::message::Message for CsvSource {
50883    fn typename() -> &'static str {
50884        "type.googleapis.com/google.cloud.aiplatform.v1.CsvSource"
50885    }
50886}
50887
50888/// The Google Cloud Storage location for the input content.
50889#[cfg(any(
50890    feature = "dataset-service",
50891    feature = "deployment-resource-pool-service",
50892    feature = "endpoint-service",
50893    feature = "featurestore-service",
50894    feature = "job-service",
50895    feature = "model-service",
50896    feature = "pipeline-service",
50897    feature = "prediction-service",
50898    feature = "vertex-rag-data-service",
50899))]
50900#[derive(Clone, Default, PartialEq)]
50901#[non_exhaustive]
50902pub struct GcsSource {
50903    /// Required. Google Cloud Storage URI(-s) to the input file(s). May contain
50904    /// wildcards. For more information on wildcards, see
50905    /// <https://cloud.google.com/storage/docs/wildcards>.
50906    pub uris: std::vec::Vec<std::string::String>,
50907
50908    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50909}
50910
50911#[cfg(any(
50912    feature = "dataset-service",
50913    feature = "deployment-resource-pool-service",
50914    feature = "endpoint-service",
50915    feature = "featurestore-service",
50916    feature = "job-service",
50917    feature = "model-service",
50918    feature = "pipeline-service",
50919    feature = "prediction-service",
50920    feature = "vertex-rag-data-service",
50921))]
50922impl GcsSource {
50923    pub fn new() -> Self {
50924        std::default::Default::default()
50925    }
50926
50927    /// Sets the value of [uris][crate::model::GcsSource::uris].
50928    pub fn set_uris<T, V>(mut self, v: T) -> Self
50929    where
50930        T: std::iter::IntoIterator<Item = V>,
50931        V: std::convert::Into<std::string::String>,
50932    {
50933        use std::iter::Iterator;
50934        self.uris = v.into_iter().map(|i| i.into()).collect();
50935        self
50936    }
50937}
50938
50939#[cfg(any(
50940    feature = "dataset-service",
50941    feature = "deployment-resource-pool-service",
50942    feature = "endpoint-service",
50943    feature = "featurestore-service",
50944    feature = "job-service",
50945    feature = "model-service",
50946    feature = "pipeline-service",
50947    feature = "prediction-service",
50948    feature = "vertex-rag-data-service",
50949))]
50950impl wkt::message::Message for GcsSource {
50951    fn typename() -> &'static str {
50952        "type.googleapis.com/google.cloud.aiplatform.v1.GcsSource"
50953    }
50954}
50955
50956/// The Google Cloud Storage location where the output is to be written to.
50957#[cfg(any(
50958    feature = "dataset-service",
50959    feature = "featurestore-service",
50960    feature = "gen-ai-tuning-service",
50961    feature = "job-service",
50962    feature = "model-service",
50963    feature = "pipeline-service",
50964    feature = "vertex-rag-data-service",
50965))]
50966#[derive(Clone, Default, PartialEq)]
50967#[non_exhaustive]
50968pub struct GcsDestination {
50969    /// Required. Google Cloud Storage URI to output directory. If the uri doesn't
50970    /// end with
50971    /// '/', a '/' will be automatically appended. The directory is created if it
50972    /// doesn't exist.
50973    pub output_uri_prefix: std::string::String,
50974
50975    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50976}
50977
50978#[cfg(any(
50979    feature = "dataset-service",
50980    feature = "featurestore-service",
50981    feature = "gen-ai-tuning-service",
50982    feature = "job-service",
50983    feature = "model-service",
50984    feature = "pipeline-service",
50985    feature = "vertex-rag-data-service",
50986))]
50987impl GcsDestination {
50988    pub fn new() -> Self {
50989        std::default::Default::default()
50990    }
50991
50992    /// Sets the value of [output_uri_prefix][crate::model::GcsDestination::output_uri_prefix].
50993    pub fn set_output_uri_prefix<T: std::convert::Into<std::string::String>>(
50994        mut self,
50995        v: T,
50996    ) -> Self {
50997        self.output_uri_prefix = v.into();
50998        self
50999    }
51000}
51001
51002#[cfg(any(
51003    feature = "dataset-service",
51004    feature = "featurestore-service",
51005    feature = "gen-ai-tuning-service",
51006    feature = "job-service",
51007    feature = "model-service",
51008    feature = "pipeline-service",
51009    feature = "vertex-rag-data-service",
51010))]
51011impl wkt::message::Message for GcsDestination {
51012    fn typename() -> &'static str {
51013        "type.googleapis.com/google.cloud.aiplatform.v1.GcsDestination"
51014    }
51015}
51016
51017/// The BigQuery location for the input content.
51018#[cfg(any(
51019    feature = "feature-registry-service",
51020    feature = "featurestore-service",
51021    feature = "job-service",
51022))]
51023#[derive(Clone, Default, PartialEq)]
51024#[non_exhaustive]
51025pub struct BigQuerySource {
51026    /// Required. BigQuery URI to a table, up to 2000 characters long.
51027    /// Accepted forms:
51028    ///
51029    /// * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
51030    pub input_uri: std::string::String,
51031
51032    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51033}
51034
51035#[cfg(any(
51036    feature = "feature-registry-service",
51037    feature = "featurestore-service",
51038    feature = "job-service",
51039))]
51040impl BigQuerySource {
51041    pub fn new() -> Self {
51042        std::default::Default::default()
51043    }
51044
51045    /// Sets the value of [input_uri][crate::model::BigQuerySource::input_uri].
51046    pub fn set_input_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
51047        self.input_uri = v.into();
51048        self
51049    }
51050}
51051
51052#[cfg(any(
51053    feature = "feature-registry-service",
51054    feature = "featurestore-service",
51055    feature = "job-service",
51056))]
51057impl wkt::message::Message for BigQuerySource {
51058    fn typename() -> &'static str {
51059        "type.googleapis.com/google.cloud.aiplatform.v1.BigQuerySource"
51060    }
51061}
51062
51063/// The BigQuery location for the output content.
51064#[cfg(any(
51065    feature = "endpoint-service",
51066    feature = "featurestore-service",
51067    feature = "job-service",
51068    feature = "pipeline-service",
51069    feature = "vertex-rag-data-service",
51070))]
51071#[derive(Clone, Default, PartialEq)]
51072#[non_exhaustive]
51073pub struct BigQueryDestination {
51074    /// Required. BigQuery URI to a project or table, up to 2000 characters long.
51075    ///
51076    /// When only the project is specified, the Dataset and Table is created.
51077    /// When the full table reference is specified, the Dataset must exist and
51078    /// table must not exist.
51079    ///
51080    /// Accepted forms:
51081    ///
51082    /// * BigQuery path. For example:
51083    ///   `bq://projectId` or `bq://projectId.bqDatasetId` or
51084    ///   `bq://projectId.bqDatasetId.bqTableId`.
51085    pub output_uri: std::string::String,
51086
51087    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51088}
51089
51090#[cfg(any(
51091    feature = "endpoint-service",
51092    feature = "featurestore-service",
51093    feature = "job-service",
51094    feature = "pipeline-service",
51095    feature = "vertex-rag-data-service",
51096))]
51097impl BigQueryDestination {
51098    pub fn new() -> Self {
51099        std::default::Default::default()
51100    }
51101
51102    /// Sets the value of [output_uri][crate::model::BigQueryDestination::output_uri].
51103    pub fn set_output_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
51104        self.output_uri = v.into();
51105        self
51106    }
51107}
51108
51109#[cfg(any(
51110    feature = "endpoint-service",
51111    feature = "featurestore-service",
51112    feature = "job-service",
51113    feature = "pipeline-service",
51114    feature = "vertex-rag-data-service",
51115))]
51116impl wkt::message::Message for BigQueryDestination {
51117    fn typename() -> &'static str {
51118        "type.googleapis.com/google.cloud.aiplatform.v1.BigQueryDestination"
51119    }
51120}
51121
51122/// The storage details for CSV output content.
51123#[cfg(feature = "featurestore-service")]
51124#[derive(Clone, Default, PartialEq)]
51125#[non_exhaustive]
51126pub struct CsvDestination {
51127    /// Required. Google Cloud Storage location.
51128    pub gcs_destination: std::option::Option<crate::model::GcsDestination>,
51129
51130    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51131}
51132
51133#[cfg(feature = "featurestore-service")]
51134impl CsvDestination {
51135    pub fn new() -> Self {
51136        std::default::Default::default()
51137    }
51138
51139    /// Sets the value of [gcs_destination][crate::model::CsvDestination::gcs_destination].
51140    pub fn set_gcs_destination<T>(mut self, v: T) -> Self
51141    where
51142        T: std::convert::Into<crate::model::GcsDestination>,
51143    {
51144        self.gcs_destination = std::option::Option::Some(v.into());
51145        self
51146    }
51147
51148    /// Sets or clears the value of [gcs_destination][crate::model::CsvDestination::gcs_destination].
51149    pub fn set_or_clear_gcs_destination<T>(mut self, v: std::option::Option<T>) -> Self
51150    where
51151        T: std::convert::Into<crate::model::GcsDestination>,
51152    {
51153        self.gcs_destination = v.map(|x| x.into());
51154        self
51155    }
51156}
51157
51158#[cfg(feature = "featurestore-service")]
51159impl wkt::message::Message for CsvDestination {
51160    fn typename() -> &'static str {
51161        "type.googleapis.com/google.cloud.aiplatform.v1.CsvDestination"
51162    }
51163}
51164
51165/// The storage details for TFRecord output content.
51166#[cfg(feature = "featurestore-service")]
51167#[derive(Clone, Default, PartialEq)]
51168#[non_exhaustive]
51169pub struct TFRecordDestination {
51170    /// Required. Google Cloud Storage location.
51171    pub gcs_destination: std::option::Option<crate::model::GcsDestination>,
51172
51173    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51174}
51175
51176#[cfg(feature = "featurestore-service")]
51177impl TFRecordDestination {
51178    pub fn new() -> Self {
51179        std::default::Default::default()
51180    }
51181
51182    /// Sets the value of [gcs_destination][crate::model::TFRecordDestination::gcs_destination].
51183    pub fn set_gcs_destination<T>(mut self, v: T) -> Self
51184    where
51185        T: std::convert::Into<crate::model::GcsDestination>,
51186    {
51187        self.gcs_destination = std::option::Option::Some(v.into());
51188        self
51189    }
51190
51191    /// Sets or clears the value of [gcs_destination][crate::model::TFRecordDestination::gcs_destination].
51192    pub fn set_or_clear_gcs_destination<T>(mut self, v: std::option::Option<T>) -> Self
51193    where
51194        T: std::convert::Into<crate::model::GcsDestination>,
51195    {
51196        self.gcs_destination = v.map(|x| x.into());
51197        self
51198    }
51199}
51200
51201#[cfg(feature = "featurestore-service")]
51202impl wkt::message::Message for TFRecordDestination {
51203    fn typename() -> &'static str {
51204        "type.googleapis.com/google.cloud.aiplatform.v1.TFRecordDestination"
51205    }
51206}
51207
51208/// The Container Registry location for the container image.
51209#[cfg(feature = "model-service")]
51210#[derive(Clone, Default, PartialEq)]
51211#[non_exhaustive]
51212pub struct ContainerRegistryDestination {
51213    /// Required. Container Registry URI of a container image.
51214    /// Only Google Container Registry and Artifact Registry are supported now.
51215    /// Accepted forms:
51216    ///
51217    /// * Google Container Registry path. For example:
51218    ///   `gcr.io/projectId/imageName:tag`.
51219    ///
51220    /// * Artifact Registry path. For example:
51221    ///   `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
51222    ///
51223    ///
51224    /// If a tag is not specified, "latest" will be used as the default tag.
51225    pub output_uri: std::string::String,
51226
51227    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51228}
51229
51230#[cfg(feature = "model-service")]
51231impl ContainerRegistryDestination {
51232    pub fn new() -> Self {
51233        std::default::Default::default()
51234    }
51235
51236    /// Sets the value of [output_uri][crate::model::ContainerRegistryDestination::output_uri].
51237    pub fn set_output_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
51238        self.output_uri = v.into();
51239        self
51240    }
51241}
51242
51243#[cfg(feature = "model-service")]
51244impl wkt::message::Message for ContainerRegistryDestination {
51245    fn typename() -> &'static str {
51246        "type.googleapis.com/google.cloud.aiplatform.v1.ContainerRegistryDestination"
51247    }
51248}
51249
51250/// The Google Drive location for the input content.
51251#[cfg(feature = "vertex-rag-data-service")]
51252#[derive(Clone, Default, PartialEq)]
51253#[non_exhaustive]
51254pub struct GoogleDriveSource {
51255    /// Required. Google Drive resource IDs.
51256    pub resource_ids: std::vec::Vec<crate::model::google_drive_source::ResourceId>,
51257
51258    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51259}
51260
51261#[cfg(feature = "vertex-rag-data-service")]
51262impl GoogleDriveSource {
51263    pub fn new() -> Self {
51264        std::default::Default::default()
51265    }
51266
51267    /// Sets the value of [resource_ids][crate::model::GoogleDriveSource::resource_ids].
51268    pub fn set_resource_ids<T, V>(mut self, v: T) -> Self
51269    where
51270        T: std::iter::IntoIterator<Item = V>,
51271        V: std::convert::Into<crate::model::google_drive_source::ResourceId>,
51272    {
51273        use std::iter::Iterator;
51274        self.resource_ids = v.into_iter().map(|i| i.into()).collect();
51275        self
51276    }
51277}
51278
51279#[cfg(feature = "vertex-rag-data-service")]
51280impl wkt::message::Message for GoogleDriveSource {
51281    fn typename() -> &'static str {
51282        "type.googleapis.com/google.cloud.aiplatform.v1.GoogleDriveSource"
51283    }
51284}
51285
51286/// Defines additional types related to [GoogleDriveSource].
51287#[cfg(feature = "vertex-rag-data-service")]
51288pub mod google_drive_source {
51289    #[allow(unused_imports)]
51290    use super::*;
51291
51292    /// The type and ID of the Google Drive resource.
51293    #[cfg(feature = "vertex-rag-data-service")]
51294    #[derive(Clone, Default, PartialEq)]
51295    #[non_exhaustive]
51296    pub struct ResourceId {
51297        /// Required. The type of the Google Drive resource.
51298        pub resource_type: crate::model::google_drive_source::resource_id::ResourceType,
51299
51300        /// Required. The ID of the Google Drive resource.
51301        pub resource_id: std::string::String,
51302
51303        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51304    }
51305
51306    #[cfg(feature = "vertex-rag-data-service")]
51307    impl ResourceId {
51308        pub fn new() -> Self {
51309            std::default::Default::default()
51310        }
51311
51312        /// Sets the value of [resource_type][crate::model::google_drive_source::ResourceId::resource_type].
51313        pub fn set_resource_type<
51314            T: std::convert::Into<crate::model::google_drive_source::resource_id::ResourceType>,
51315        >(
51316            mut self,
51317            v: T,
51318        ) -> Self {
51319            self.resource_type = v.into();
51320            self
51321        }
51322
51323        /// Sets the value of [resource_id][crate::model::google_drive_source::ResourceId::resource_id].
51324        pub fn set_resource_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
51325            self.resource_id = v.into();
51326            self
51327        }
51328    }
51329
51330    #[cfg(feature = "vertex-rag-data-service")]
51331    impl wkt::message::Message for ResourceId {
51332        fn typename() -> &'static str {
51333            "type.googleapis.com/google.cloud.aiplatform.v1.GoogleDriveSource.ResourceId"
51334        }
51335    }
51336
51337    /// Defines additional types related to [ResourceId].
51338    #[cfg(feature = "vertex-rag-data-service")]
51339    pub mod resource_id {
51340        #[allow(unused_imports)]
51341        use super::*;
51342
51343        /// The type of the Google Drive resource.
51344        ///
51345        /// # Working with unknown values
51346        ///
51347        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
51348        /// additional enum variants at any time. Adding new variants is not considered
51349        /// a breaking change. Applications should write their code in anticipation of:
51350        ///
51351        /// - New values appearing in future releases of the client library, **and**
51352        /// - New values received dynamically, without application changes.
51353        ///
51354        /// Please consult the [Working with enums] section in the user guide for some
51355        /// guidelines.
51356        ///
51357        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
51358        #[cfg(feature = "vertex-rag-data-service")]
51359        #[derive(Clone, Debug, PartialEq)]
51360        #[non_exhaustive]
51361        pub enum ResourceType {
51362            /// Unspecified resource type.
51363            Unspecified,
51364            /// File resource type.
51365            File,
51366            /// Folder resource type.
51367            Folder,
51368            /// If set, the enum was initialized with an unknown value.
51369            ///
51370            /// Applications can examine the value using [ResourceType::value] or
51371            /// [ResourceType::name].
51372            UnknownValue(resource_type::UnknownValue),
51373        }
51374
51375        #[doc(hidden)]
51376        #[cfg(feature = "vertex-rag-data-service")]
51377        pub mod resource_type {
51378            #[allow(unused_imports)]
51379            use super::*;
51380            #[derive(Clone, Debug, PartialEq)]
51381            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
51382        }
51383
51384        #[cfg(feature = "vertex-rag-data-service")]
51385        impl ResourceType {
51386            /// Gets the enum value.
51387            ///
51388            /// Returns `None` if the enum contains an unknown value deserialized from
51389            /// the string representation of enums.
51390            pub fn value(&self) -> std::option::Option<i32> {
51391                match self {
51392                    Self::Unspecified => std::option::Option::Some(0),
51393                    Self::File => std::option::Option::Some(1),
51394                    Self::Folder => std::option::Option::Some(2),
51395                    Self::UnknownValue(u) => u.0.value(),
51396                }
51397            }
51398
51399            /// Gets the enum value as a string.
51400            ///
51401            /// Returns `None` if the enum contains an unknown value deserialized from
51402            /// the integer representation of enums.
51403            pub fn name(&self) -> std::option::Option<&str> {
51404                match self {
51405                    Self::Unspecified => std::option::Option::Some("RESOURCE_TYPE_UNSPECIFIED"),
51406                    Self::File => std::option::Option::Some("RESOURCE_TYPE_FILE"),
51407                    Self::Folder => std::option::Option::Some("RESOURCE_TYPE_FOLDER"),
51408                    Self::UnknownValue(u) => u.0.name(),
51409                }
51410            }
51411        }
51412
51413        #[cfg(feature = "vertex-rag-data-service")]
51414        impl std::default::Default for ResourceType {
51415            fn default() -> Self {
51416                use std::convert::From;
51417                Self::from(0)
51418            }
51419        }
51420
51421        #[cfg(feature = "vertex-rag-data-service")]
51422        impl std::fmt::Display for ResourceType {
51423            fn fmt(
51424                &self,
51425                f: &mut std::fmt::Formatter<'_>,
51426            ) -> std::result::Result<(), std::fmt::Error> {
51427                wkt::internal::display_enum(f, self.name(), self.value())
51428            }
51429        }
51430
51431        #[cfg(feature = "vertex-rag-data-service")]
51432        impl std::convert::From<i32> for ResourceType {
51433            fn from(value: i32) -> Self {
51434                match value {
51435                    0 => Self::Unspecified,
51436                    1 => Self::File,
51437                    2 => Self::Folder,
51438                    _ => Self::UnknownValue(resource_type::UnknownValue(
51439                        wkt::internal::UnknownEnumValue::Integer(value),
51440                    )),
51441                }
51442            }
51443        }
51444
51445        #[cfg(feature = "vertex-rag-data-service")]
51446        impl std::convert::From<&str> for ResourceType {
51447            fn from(value: &str) -> Self {
51448                use std::string::ToString;
51449                match value {
51450                    "RESOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
51451                    "RESOURCE_TYPE_FILE" => Self::File,
51452                    "RESOURCE_TYPE_FOLDER" => Self::Folder,
51453                    _ => Self::UnknownValue(resource_type::UnknownValue(
51454                        wkt::internal::UnknownEnumValue::String(value.to_string()),
51455                    )),
51456                }
51457            }
51458        }
51459
51460        #[cfg(feature = "vertex-rag-data-service")]
51461        impl serde::ser::Serialize for ResourceType {
51462            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
51463            where
51464                S: serde::Serializer,
51465            {
51466                match self {
51467                    Self::Unspecified => serializer.serialize_i32(0),
51468                    Self::File => serializer.serialize_i32(1),
51469                    Self::Folder => serializer.serialize_i32(2),
51470                    Self::UnknownValue(u) => u.0.serialize(serializer),
51471                }
51472            }
51473        }
51474
51475        #[cfg(feature = "vertex-rag-data-service")]
51476        impl<'de> serde::de::Deserialize<'de> for ResourceType {
51477            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
51478            where
51479                D: serde::Deserializer<'de>,
51480            {
51481                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResourceType>::new(
51482                    ".google.cloud.aiplatform.v1.GoogleDriveSource.ResourceId.ResourceType",
51483                ))
51484            }
51485        }
51486    }
51487}
51488
51489/// The input content is encapsulated and uploaded in the request.
51490#[cfg(feature = "vertex-rag-data-service")]
51491#[derive(Clone, Default, PartialEq)]
51492#[non_exhaustive]
51493pub struct DirectUploadSource {
51494    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51495}
51496
51497#[cfg(feature = "vertex-rag-data-service")]
51498impl DirectUploadSource {
51499    pub fn new() -> Self {
51500        std::default::Default::default()
51501    }
51502}
51503
51504#[cfg(feature = "vertex-rag-data-service")]
51505impl wkt::message::Message for DirectUploadSource {
51506    fn typename() -> &'static str {
51507        "type.googleapis.com/google.cloud.aiplatform.v1.DirectUploadSource"
51508    }
51509}
51510
51511/// The Slack source for the ImportRagFilesRequest.
51512#[cfg(feature = "vertex-rag-data-service")]
51513#[derive(Clone, Default, PartialEq)]
51514#[non_exhaustive]
51515pub struct SlackSource {
51516    /// Required. The Slack channels.
51517    pub channels: std::vec::Vec<crate::model::slack_source::SlackChannels>,
51518
51519    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51520}
51521
51522#[cfg(feature = "vertex-rag-data-service")]
51523impl SlackSource {
51524    pub fn new() -> Self {
51525        std::default::Default::default()
51526    }
51527
51528    /// Sets the value of [channels][crate::model::SlackSource::channels].
51529    pub fn set_channels<T, V>(mut self, v: T) -> Self
51530    where
51531        T: std::iter::IntoIterator<Item = V>,
51532        V: std::convert::Into<crate::model::slack_source::SlackChannels>,
51533    {
51534        use std::iter::Iterator;
51535        self.channels = v.into_iter().map(|i| i.into()).collect();
51536        self
51537    }
51538}
51539
51540#[cfg(feature = "vertex-rag-data-service")]
51541impl wkt::message::Message for SlackSource {
51542    fn typename() -> &'static str {
51543        "type.googleapis.com/google.cloud.aiplatform.v1.SlackSource"
51544    }
51545}
51546
51547/// Defines additional types related to [SlackSource].
51548#[cfg(feature = "vertex-rag-data-service")]
51549pub mod slack_source {
51550    #[allow(unused_imports)]
51551    use super::*;
51552
51553    /// SlackChannels contains the Slack channels and corresponding access token.
51554    #[cfg(feature = "vertex-rag-data-service")]
51555    #[derive(Clone, Default, PartialEq)]
51556    #[non_exhaustive]
51557    pub struct SlackChannels {
51558        /// Required. The Slack channel IDs.
51559        pub channels: std::vec::Vec<crate::model::slack_source::slack_channels::SlackChannel>,
51560
51561        /// Required. The SecretManager secret version resource name (e.g.
51562        /// projects/{project}/secrets/{secret}/versions/{version}) storing the
51563        /// Slack channel access token that has access to the slack channel IDs.
51564        /// See: <https://api.slack.com/tutorials/tracks/getting-a-token>.
51565        pub api_key_config: std::option::Option<crate::model::api_auth::ApiKeyConfig>,
51566
51567        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51568    }
51569
51570    #[cfg(feature = "vertex-rag-data-service")]
51571    impl SlackChannels {
51572        pub fn new() -> Self {
51573            std::default::Default::default()
51574        }
51575
51576        /// Sets the value of [channels][crate::model::slack_source::SlackChannels::channels].
51577        pub fn set_channels<T, V>(mut self, v: T) -> Self
51578        where
51579            T: std::iter::IntoIterator<Item = V>,
51580            V: std::convert::Into<crate::model::slack_source::slack_channels::SlackChannel>,
51581        {
51582            use std::iter::Iterator;
51583            self.channels = v.into_iter().map(|i| i.into()).collect();
51584            self
51585        }
51586
51587        /// Sets the value of [api_key_config][crate::model::slack_source::SlackChannels::api_key_config].
51588        pub fn set_api_key_config<T>(mut self, v: T) -> Self
51589        where
51590            T: std::convert::Into<crate::model::api_auth::ApiKeyConfig>,
51591        {
51592            self.api_key_config = std::option::Option::Some(v.into());
51593            self
51594        }
51595
51596        /// Sets or clears the value of [api_key_config][crate::model::slack_source::SlackChannels::api_key_config].
51597        pub fn set_or_clear_api_key_config<T>(mut self, v: std::option::Option<T>) -> Self
51598        where
51599            T: std::convert::Into<crate::model::api_auth::ApiKeyConfig>,
51600        {
51601            self.api_key_config = v.map(|x| x.into());
51602            self
51603        }
51604    }
51605
51606    #[cfg(feature = "vertex-rag-data-service")]
51607    impl wkt::message::Message for SlackChannels {
51608        fn typename() -> &'static str {
51609            "type.googleapis.com/google.cloud.aiplatform.v1.SlackSource.SlackChannels"
51610        }
51611    }
51612
51613    /// Defines additional types related to [SlackChannels].
51614    #[cfg(feature = "vertex-rag-data-service")]
51615    pub mod slack_channels {
51616        #[allow(unused_imports)]
51617        use super::*;
51618
51619        /// SlackChannel contains the Slack channel ID and the time range to import.
51620        #[cfg(feature = "vertex-rag-data-service")]
51621        #[derive(Clone, Default, PartialEq)]
51622        #[non_exhaustive]
51623        pub struct SlackChannel {
51624            /// Required. The Slack channel ID.
51625            pub channel_id: std::string::String,
51626
51627            /// Optional. The starting timestamp for messages to import.
51628            pub start_time: std::option::Option<wkt::Timestamp>,
51629
51630            /// Optional. The ending timestamp for messages to import.
51631            pub end_time: std::option::Option<wkt::Timestamp>,
51632
51633            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51634        }
51635
51636        #[cfg(feature = "vertex-rag-data-service")]
51637        impl SlackChannel {
51638            pub fn new() -> Self {
51639                std::default::Default::default()
51640            }
51641
51642            /// Sets the value of [channel_id][crate::model::slack_source::slack_channels::SlackChannel::channel_id].
51643            pub fn set_channel_id<T: std::convert::Into<std::string::String>>(
51644                mut self,
51645                v: T,
51646            ) -> Self {
51647                self.channel_id = v.into();
51648                self
51649            }
51650
51651            /// Sets the value of [start_time][crate::model::slack_source::slack_channels::SlackChannel::start_time].
51652            pub fn set_start_time<T>(mut self, v: T) -> Self
51653            where
51654                T: std::convert::Into<wkt::Timestamp>,
51655            {
51656                self.start_time = std::option::Option::Some(v.into());
51657                self
51658            }
51659
51660            /// Sets or clears the value of [start_time][crate::model::slack_source::slack_channels::SlackChannel::start_time].
51661            pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
51662            where
51663                T: std::convert::Into<wkt::Timestamp>,
51664            {
51665                self.start_time = v.map(|x| x.into());
51666                self
51667            }
51668
51669            /// Sets the value of [end_time][crate::model::slack_source::slack_channels::SlackChannel::end_time].
51670            pub fn set_end_time<T>(mut self, v: T) -> Self
51671            where
51672                T: std::convert::Into<wkt::Timestamp>,
51673            {
51674                self.end_time = std::option::Option::Some(v.into());
51675                self
51676            }
51677
51678            /// Sets or clears the value of [end_time][crate::model::slack_source::slack_channels::SlackChannel::end_time].
51679            pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
51680            where
51681                T: std::convert::Into<wkt::Timestamp>,
51682            {
51683                self.end_time = v.map(|x| x.into());
51684                self
51685            }
51686        }
51687
51688        #[cfg(feature = "vertex-rag-data-service")]
51689        impl wkt::message::Message for SlackChannel {
51690            fn typename() -> &'static str {
51691                "type.googleapis.com/google.cloud.aiplatform.v1.SlackSource.SlackChannels.SlackChannel"
51692            }
51693        }
51694    }
51695}
51696
51697/// The Jira source for the ImportRagFilesRequest.
51698#[cfg(feature = "vertex-rag-data-service")]
51699#[derive(Clone, Default, PartialEq)]
51700#[non_exhaustive]
51701pub struct JiraSource {
51702    /// Required. The Jira queries.
51703    pub jira_queries: std::vec::Vec<crate::model::jira_source::JiraQueries>,
51704
51705    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51706}
51707
51708#[cfg(feature = "vertex-rag-data-service")]
51709impl JiraSource {
51710    pub fn new() -> Self {
51711        std::default::Default::default()
51712    }
51713
51714    /// Sets the value of [jira_queries][crate::model::JiraSource::jira_queries].
51715    pub fn set_jira_queries<T, V>(mut self, v: T) -> Self
51716    where
51717        T: std::iter::IntoIterator<Item = V>,
51718        V: std::convert::Into<crate::model::jira_source::JiraQueries>,
51719    {
51720        use std::iter::Iterator;
51721        self.jira_queries = v.into_iter().map(|i| i.into()).collect();
51722        self
51723    }
51724}
51725
51726#[cfg(feature = "vertex-rag-data-service")]
51727impl wkt::message::Message for JiraSource {
51728    fn typename() -> &'static str {
51729        "type.googleapis.com/google.cloud.aiplatform.v1.JiraSource"
51730    }
51731}
51732
51733/// Defines additional types related to [JiraSource].
51734#[cfg(feature = "vertex-rag-data-service")]
51735pub mod jira_source {
51736    #[allow(unused_imports)]
51737    use super::*;
51738
51739    /// JiraQueries contains the Jira queries and corresponding authentication.
51740    #[cfg(feature = "vertex-rag-data-service")]
51741    #[derive(Clone, Default, PartialEq)]
51742    #[non_exhaustive]
51743    pub struct JiraQueries {
51744        /// A list of Jira projects to import in their entirety.
51745        pub projects: std::vec::Vec<std::string::String>,
51746
51747        /// A list of custom Jira queries to import. For information about JQL (Jira
51748        /// Query Language), see
51749        /// <https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/>
51750        pub custom_queries: std::vec::Vec<std::string::String>,
51751
51752        /// Required. The Jira email address.
51753        pub email: std::string::String,
51754
51755        /// Required. The Jira server URI.
51756        pub server_uri: std::string::String,
51757
51758        /// Required. The SecretManager secret version resource name (e.g.
51759        /// projects/{project}/secrets/{secret}/versions/{version}) storing the
51760        /// Jira API key. See [Manage API tokens for your Atlassian
51761        /// account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
51762        pub api_key_config: std::option::Option<crate::model::api_auth::ApiKeyConfig>,
51763
51764        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51765    }
51766
51767    #[cfg(feature = "vertex-rag-data-service")]
51768    impl JiraQueries {
51769        pub fn new() -> Self {
51770            std::default::Default::default()
51771        }
51772
51773        /// Sets the value of [projects][crate::model::jira_source::JiraQueries::projects].
51774        pub fn set_projects<T, V>(mut self, v: T) -> Self
51775        where
51776            T: std::iter::IntoIterator<Item = V>,
51777            V: std::convert::Into<std::string::String>,
51778        {
51779            use std::iter::Iterator;
51780            self.projects = v.into_iter().map(|i| i.into()).collect();
51781            self
51782        }
51783
51784        /// Sets the value of [custom_queries][crate::model::jira_source::JiraQueries::custom_queries].
51785        pub fn set_custom_queries<T, V>(mut self, v: T) -> Self
51786        where
51787            T: std::iter::IntoIterator<Item = V>,
51788            V: std::convert::Into<std::string::String>,
51789        {
51790            use std::iter::Iterator;
51791            self.custom_queries = v.into_iter().map(|i| i.into()).collect();
51792            self
51793        }
51794
51795        /// Sets the value of [email][crate::model::jira_source::JiraQueries::email].
51796        pub fn set_email<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
51797            self.email = v.into();
51798            self
51799        }
51800
51801        /// Sets the value of [server_uri][crate::model::jira_source::JiraQueries::server_uri].
51802        pub fn set_server_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
51803            self.server_uri = v.into();
51804            self
51805        }
51806
51807        /// Sets the value of [api_key_config][crate::model::jira_source::JiraQueries::api_key_config].
51808        pub fn set_api_key_config<T>(mut self, v: T) -> Self
51809        where
51810            T: std::convert::Into<crate::model::api_auth::ApiKeyConfig>,
51811        {
51812            self.api_key_config = std::option::Option::Some(v.into());
51813            self
51814        }
51815
51816        /// Sets or clears the value of [api_key_config][crate::model::jira_source::JiraQueries::api_key_config].
51817        pub fn set_or_clear_api_key_config<T>(mut self, v: std::option::Option<T>) -> Self
51818        where
51819            T: std::convert::Into<crate::model::api_auth::ApiKeyConfig>,
51820        {
51821            self.api_key_config = v.map(|x| x.into());
51822            self
51823        }
51824    }
51825
51826    #[cfg(feature = "vertex-rag-data-service")]
51827    impl wkt::message::Message for JiraQueries {
51828        fn typename() -> &'static str {
51829            "type.googleapis.com/google.cloud.aiplatform.v1.JiraSource.JiraQueries"
51830        }
51831    }
51832}
51833
51834/// The SharePointSources to pass to ImportRagFiles.
51835#[cfg(feature = "vertex-rag-data-service")]
51836#[derive(Clone, Default, PartialEq)]
51837#[non_exhaustive]
51838pub struct SharePointSources {
51839    /// The SharePoint sources.
51840    pub share_point_sources: std::vec::Vec<crate::model::share_point_sources::SharePointSource>,
51841
51842    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51843}
51844
51845#[cfg(feature = "vertex-rag-data-service")]
51846impl SharePointSources {
51847    pub fn new() -> Self {
51848        std::default::Default::default()
51849    }
51850
51851    /// Sets the value of [share_point_sources][crate::model::SharePointSources::share_point_sources].
51852    pub fn set_share_point_sources<T, V>(mut self, v: T) -> Self
51853    where
51854        T: std::iter::IntoIterator<Item = V>,
51855        V: std::convert::Into<crate::model::share_point_sources::SharePointSource>,
51856    {
51857        use std::iter::Iterator;
51858        self.share_point_sources = v.into_iter().map(|i| i.into()).collect();
51859        self
51860    }
51861}
51862
51863#[cfg(feature = "vertex-rag-data-service")]
51864impl wkt::message::Message for SharePointSources {
51865    fn typename() -> &'static str {
51866        "type.googleapis.com/google.cloud.aiplatform.v1.SharePointSources"
51867    }
51868}
51869
51870/// Defines additional types related to [SharePointSources].
51871#[cfg(feature = "vertex-rag-data-service")]
51872pub mod share_point_sources {
51873    #[allow(unused_imports)]
51874    use super::*;
51875
51876    /// An individual SharePointSource.
51877    #[cfg(feature = "vertex-rag-data-service")]
51878    #[derive(Clone, Default, PartialEq)]
51879    #[non_exhaustive]
51880    pub struct SharePointSource {
51881        /// The Application ID for the app registered in Microsoft Azure Portal.
51882        /// The application must also be configured with MS Graph permissions
51883        /// "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All.
51884        pub client_id: std::string::String,
51885
51886        /// The application secret for the app registered in Azure.
51887        pub client_secret: std::option::Option<crate::model::api_auth::ApiKeyConfig>,
51888
51889        /// Unique identifier of the Azure Active Directory Instance.
51890        pub tenant_id: std::string::String,
51891
51892        /// The name of the SharePoint site to download from. This can be the site
51893        /// name or the site id.
51894        pub sharepoint_site_name: std::string::String,
51895
51896        /// Output only. The SharePoint file id. Output only.
51897        pub file_id: std::string::String,
51898
51899        /// The SharePoint folder source. If not provided, uses "root".
51900        pub folder_source: std::option::Option<
51901            crate::model::share_point_sources::share_point_source::FolderSource,
51902        >,
51903
51904        /// The SharePoint drive source.
51905        pub drive_source:
51906            std::option::Option<crate::model::share_point_sources::share_point_source::DriveSource>,
51907
51908        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
51909    }
51910
51911    #[cfg(feature = "vertex-rag-data-service")]
51912    impl SharePointSource {
51913        pub fn new() -> Self {
51914            std::default::Default::default()
51915        }
51916
51917        /// Sets the value of [client_id][crate::model::share_point_sources::SharePointSource::client_id].
51918        pub fn set_client_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
51919            self.client_id = v.into();
51920            self
51921        }
51922
51923        /// Sets the value of [client_secret][crate::model::share_point_sources::SharePointSource::client_secret].
51924        pub fn set_client_secret<T>(mut self, v: T) -> Self
51925        where
51926            T: std::convert::Into<crate::model::api_auth::ApiKeyConfig>,
51927        {
51928            self.client_secret = std::option::Option::Some(v.into());
51929            self
51930        }
51931
51932        /// Sets or clears the value of [client_secret][crate::model::share_point_sources::SharePointSource::client_secret].
51933        pub fn set_or_clear_client_secret<T>(mut self, v: std::option::Option<T>) -> Self
51934        where
51935            T: std::convert::Into<crate::model::api_auth::ApiKeyConfig>,
51936        {
51937            self.client_secret = v.map(|x| x.into());
51938            self
51939        }
51940
51941        /// Sets the value of [tenant_id][crate::model::share_point_sources::SharePointSource::tenant_id].
51942        pub fn set_tenant_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
51943            self.tenant_id = v.into();
51944            self
51945        }
51946
51947        /// Sets the value of [sharepoint_site_name][crate::model::share_point_sources::SharePointSource::sharepoint_site_name].
51948        pub fn set_sharepoint_site_name<T: std::convert::Into<std::string::String>>(
51949            mut self,
51950            v: T,
51951        ) -> Self {
51952            self.sharepoint_site_name = v.into();
51953            self
51954        }
51955
51956        /// Sets the value of [file_id][crate::model::share_point_sources::SharePointSource::file_id].
51957        pub fn set_file_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
51958            self.file_id = v.into();
51959            self
51960        }
51961
51962        /// Sets the value of [folder_source][crate::model::share_point_sources::SharePointSource::folder_source].
51963        ///
51964        /// Note that all the setters affecting `folder_source` are mutually
51965        /// exclusive.
51966        pub fn set_folder_source<
51967            T: std::convert::Into<
51968                    std::option::Option<
51969                        crate::model::share_point_sources::share_point_source::FolderSource,
51970                    >,
51971                >,
51972        >(
51973            mut self,
51974            v: T,
51975        ) -> Self {
51976            self.folder_source = v.into();
51977            self
51978        }
51979
51980        /// The value of [folder_source][crate::model::share_point_sources::SharePointSource::folder_source]
51981        /// if it holds a `SharepointFolderPath`, `None` if the field is not set or
51982        /// holds a different branch.
51983        pub fn sharepoint_folder_path(&self) -> std::option::Option<&std::string::String> {
51984            #[allow(unreachable_patterns)]
51985            self.folder_source.as_ref().and_then(|v| match v {
51986                crate::model::share_point_sources::share_point_source::FolderSource::SharepointFolderPath(v) => std::option::Option::Some(v),
51987                _ => std::option::Option::None,
51988            })
51989        }
51990
51991        /// Sets the value of [folder_source][crate::model::share_point_sources::SharePointSource::folder_source]
51992        /// to hold a `SharepointFolderPath`.
51993        ///
51994        /// Note that all the setters affecting `folder_source` are
51995        /// mutually exclusive.
51996        pub fn set_sharepoint_folder_path<T: std::convert::Into<std::string::String>>(
51997            mut self,
51998            v: T,
51999        ) -> Self {
52000            self.folder_source = std::option::Option::Some(
52001                crate::model::share_point_sources::share_point_source::FolderSource::SharepointFolderPath(
52002                    v.into()
52003                )
52004            );
52005            self
52006        }
52007
52008        /// The value of [folder_source][crate::model::share_point_sources::SharePointSource::folder_source]
52009        /// if it holds a `SharepointFolderId`, `None` if the field is not set or
52010        /// holds a different branch.
52011        pub fn sharepoint_folder_id(&self) -> std::option::Option<&std::string::String> {
52012            #[allow(unreachable_patterns)]
52013            self.folder_source.as_ref().and_then(|v| match v {
52014                crate::model::share_point_sources::share_point_source::FolderSource::SharepointFolderId(v) => std::option::Option::Some(v),
52015                _ => std::option::Option::None,
52016            })
52017        }
52018
52019        /// Sets the value of [folder_source][crate::model::share_point_sources::SharePointSource::folder_source]
52020        /// to hold a `SharepointFolderId`.
52021        ///
52022        /// Note that all the setters affecting `folder_source` are
52023        /// mutually exclusive.
52024        pub fn set_sharepoint_folder_id<T: std::convert::Into<std::string::String>>(
52025            mut self,
52026            v: T,
52027        ) -> Self {
52028            self.folder_source = std::option::Option::Some(
52029                crate::model::share_point_sources::share_point_source::FolderSource::SharepointFolderId(
52030                    v.into()
52031                )
52032            );
52033            self
52034        }
52035
52036        /// Sets the value of [drive_source][crate::model::share_point_sources::SharePointSource::drive_source].
52037        ///
52038        /// Note that all the setters affecting `drive_source` are mutually
52039        /// exclusive.
52040        pub fn set_drive_source<
52041            T: std::convert::Into<
52042                    std::option::Option<
52043                        crate::model::share_point_sources::share_point_source::DriveSource,
52044                    >,
52045                >,
52046        >(
52047            mut self,
52048            v: T,
52049        ) -> Self {
52050            self.drive_source = v.into();
52051            self
52052        }
52053
52054        /// The value of [drive_source][crate::model::share_point_sources::SharePointSource::drive_source]
52055        /// if it holds a `DriveName`, `None` if the field is not set or
52056        /// holds a different branch.
52057        pub fn drive_name(&self) -> std::option::Option<&std::string::String> {
52058            #[allow(unreachable_patterns)]
52059            self.drive_source.as_ref().and_then(|v| match v {
52060                crate::model::share_point_sources::share_point_source::DriveSource::DriveName(
52061                    v,
52062                ) => std::option::Option::Some(v),
52063                _ => std::option::Option::None,
52064            })
52065        }
52066
52067        /// Sets the value of [drive_source][crate::model::share_point_sources::SharePointSource::drive_source]
52068        /// to hold a `DriveName`.
52069        ///
52070        /// Note that all the setters affecting `drive_source` are
52071        /// mutually exclusive.
52072        pub fn set_drive_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52073            self.drive_source = std::option::Option::Some(
52074                crate::model::share_point_sources::share_point_source::DriveSource::DriveName(
52075                    v.into(),
52076                ),
52077            );
52078            self
52079        }
52080
52081        /// The value of [drive_source][crate::model::share_point_sources::SharePointSource::drive_source]
52082        /// if it holds a `DriveId`, `None` if the field is not set or
52083        /// holds a different branch.
52084        pub fn drive_id(&self) -> std::option::Option<&std::string::String> {
52085            #[allow(unreachable_patterns)]
52086            self.drive_source.as_ref().and_then(|v| match v {
52087                crate::model::share_point_sources::share_point_source::DriveSource::DriveId(v) => {
52088                    std::option::Option::Some(v)
52089                }
52090                _ => std::option::Option::None,
52091            })
52092        }
52093
52094        /// Sets the value of [drive_source][crate::model::share_point_sources::SharePointSource::drive_source]
52095        /// to hold a `DriveId`.
52096        ///
52097        /// Note that all the setters affecting `drive_source` are
52098        /// mutually exclusive.
52099        pub fn set_drive_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52100            self.drive_source = std::option::Option::Some(
52101                crate::model::share_point_sources::share_point_source::DriveSource::DriveId(
52102                    v.into(),
52103                ),
52104            );
52105            self
52106        }
52107    }
52108
52109    #[cfg(feature = "vertex-rag-data-service")]
52110    impl wkt::message::Message for SharePointSource {
52111        fn typename() -> &'static str {
52112            "type.googleapis.com/google.cloud.aiplatform.v1.SharePointSources.SharePointSource"
52113        }
52114    }
52115
52116    /// Defines additional types related to [SharePointSource].
52117    #[cfg(feature = "vertex-rag-data-service")]
52118    pub mod share_point_source {
52119        #[allow(unused_imports)]
52120        use super::*;
52121
52122        /// The SharePoint folder source. If not provided, uses "root".
52123        #[cfg(feature = "vertex-rag-data-service")]
52124        #[derive(Clone, Debug, PartialEq)]
52125        #[non_exhaustive]
52126        pub enum FolderSource {
52127            /// The path of the SharePoint folder to download from.
52128            SharepointFolderPath(std::string::String),
52129            /// The ID of the SharePoint folder to download from.
52130            SharepointFolderId(std::string::String),
52131        }
52132
52133        /// The SharePoint drive source.
52134        #[cfg(feature = "vertex-rag-data-service")]
52135        #[derive(Clone, Debug, PartialEq)]
52136        #[non_exhaustive]
52137        pub enum DriveSource {
52138            /// The name of the drive to download from.
52139            DriveName(std::string::String),
52140            /// The ID of the drive to download from.
52141            DriveId(std::string::String),
52142        }
52143    }
52144}
52145
52146/// Request message for
52147/// [JobService.CreateCustomJob][google.cloud.aiplatform.v1.JobService.CreateCustomJob].
52148///
52149/// [google.cloud.aiplatform.v1.JobService.CreateCustomJob]: crate::client::JobService::create_custom_job
52150#[cfg(feature = "job-service")]
52151#[derive(Clone, Default, PartialEq)]
52152#[non_exhaustive]
52153pub struct CreateCustomJobRequest {
52154    /// Required. The resource name of the Location to create the CustomJob in.
52155    /// Format: `projects/{project}/locations/{location}`
52156    pub parent: std::string::String,
52157
52158    /// Required. The CustomJob to create.
52159    pub custom_job: std::option::Option<crate::model::CustomJob>,
52160
52161    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52162}
52163
52164#[cfg(feature = "job-service")]
52165impl CreateCustomJobRequest {
52166    pub fn new() -> Self {
52167        std::default::Default::default()
52168    }
52169
52170    /// Sets the value of [parent][crate::model::CreateCustomJobRequest::parent].
52171    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52172        self.parent = v.into();
52173        self
52174    }
52175
52176    /// Sets the value of [custom_job][crate::model::CreateCustomJobRequest::custom_job].
52177    pub fn set_custom_job<T>(mut self, v: T) -> Self
52178    where
52179        T: std::convert::Into<crate::model::CustomJob>,
52180    {
52181        self.custom_job = std::option::Option::Some(v.into());
52182        self
52183    }
52184
52185    /// Sets or clears the value of [custom_job][crate::model::CreateCustomJobRequest::custom_job].
52186    pub fn set_or_clear_custom_job<T>(mut self, v: std::option::Option<T>) -> Self
52187    where
52188        T: std::convert::Into<crate::model::CustomJob>,
52189    {
52190        self.custom_job = v.map(|x| x.into());
52191        self
52192    }
52193}
52194
52195#[cfg(feature = "job-service")]
52196impl wkt::message::Message for CreateCustomJobRequest {
52197    fn typename() -> &'static str {
52198        "type.googleapis.com/google.cloud.aiplatform.v1.CreateCustomJobRequest"
52199    }
52200}
52201
52202/// Request message for
52203/// [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob].
52204///
52205/// [google.cloud.aiplatform.v1.JobService.GetCustomJob]: crate::client::JobService::get_custom_job
52206#[cfg(feature = "job-service")]
52207#[derive(Clone, Default, PartialEq)]
52208#[non_exhaustive]
52209pub struct GetCustomJobRequest {
52210    /// Required. The name of the CustomJob resource.
52211    /// Format:
52212    /// `projects/{project}/locations/{location}/customJobs/{custom_job}`
52213    pub name: std::string::String,
52214
52215    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52216}
52217
52218#[cfg(feature = "job-service")]
52219impl GetCustomJobRequest {
52220    pub fn new() -> Self {
52221        std::default::Default::default()
52222    }
52223
52224    /// Sets the value of [name][crate::model::GetCustomJobRequest::name].
52225    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52226        self.name = v.into();
52227        self
52228    }
52229}
52230
52231#[cfg(feature = "job-service")]
52232impl wkt::message::Message for GetCustomJobRequest {
52233    fn typename() -> &'static str {
52234        "type.googleapis.com/google.cloud.aiplatform.v1.GetCustomJobRequest"
52235    }
52236}
52237
52238/// Request message for
52239/// [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs].
52240///
52241/// [google.cloud.aiplatform.v1.JobService.ListCustomJobs]: crate::client::JobService::list_custom_jobs
52242#[cfg(feature = "job-service")]
52243#[derive(Clone, Default, PartialEq)]
52244#[non_exhaustive]
52245pub struct ListCustomJobsRequest {
52246    /// Required. The resource name of the Location to list the CustomJobs from.
52247    /// Format: `projects/{project}/locations/{location}`
52248    pub parent: std::string::String,
52249
52250    /// The standard list filter.
52251    ///
52252    /// Supported fields:
52253    ///
52254    /// * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
52255    /// * `state` supports `=`, `!=` comparisons.
52256    /// * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
52257    ///   `create_time` must be in RFC 3339 format.
52258    /// * `labels` supports general map functions that is:
52259    ///   `labels.key=value` - key:value equality
52260    ///   `labels.key:* - key existence
52261    ///
52262    /// Some examples of using the filter are:
52263    ///
52264    /// * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
52265    /// * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
52266    /// * `NOT display_name="my_job"`
52267    /// * `create_time>"2021-05-18T00:00:00Z"`
52268    /// * `labels.keyA=valueA`
52269    /// * `labels.keyB:*`
52270    pub filter: std::string::String,
52271
52272    /// The standard list page size.
52273    pub page_size: i32,
52274
52275    /// The standard list page token.
52276    /// Typically obtained via
52277    /// [ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token]
52278    /// of the previous
52279    /// [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs]
52280    /// call.
52281    ///
52282    /// [google.cloud.aiplatform.v1.JobService.ListCustomJobs]: crate::client::JobService::list_custom_jobs
52283    /// [google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token]: crate::model::ListCustomJobsResponse::next_page_token
52284    pub page_token: std::string::String,
52285
52286    /// Mask specifying which fields to read.
52287    pub read_mask: std::option::Option<wkt::FieldMask>,
52288
52289    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52290}
52291
52292#[cfg(feature = "job-service")]
52293impl ListCustomJobsRequest {
52294    pub fn new() -> Self {
52295        std::default::Default::default()
52296    }
52297
52298    /// Sets the value of [parent][crate::model::ListCustomJobsRequest::parent].
52299    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52300        self.parent = v.into();
52301        self
52302    }
52303
52304    /// Sets the value of [filter][crate::model::ListCustomJobsRequest::filter].
52305    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52306        self.filter = v.into();
52307        self
52308    }
52309
52310    /// Sets the value of [page_size][crate::model::ListCustomJobsRequest::page_size].
52311    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
52312        self.page_size = v.into();
52313        self
52314    }
52315
52316    /// Sets the value of [page_token][crate::model::ListCustomJobsRequest::page_token].
52317    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52318        self.page_token = v.into();
52319        self
52320    }
52321
52322    /// Sets the value of [read_mask][crate::model::ListCustomJobsRequest::read_mask].
52323    pub fn set_read_mask<T>(mut self, v: T) -> Self
52324    where
52325        T: std::convert::Into<wkt::FieldMask>,
52326    {
52327        self.read_mask = std::option::Option::Some(v.into());
52328        self
52329    }
52330
52331    /// Sets or clears the value of [read_mask][crate::model::ListCustomJobsRequest::read_mask].
52332    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
52333    where
52334        T: std::convert::Into<wkt::FieldMask>,
52335    {
52336        self.read_mask = v.map(|x| x.into());
52337        self
52338    }
52339}
52340
52341#[cfg(feature = "job-service")]
52342impl wkt::message::Message for ListCustomJobsRequest {
52343    fn typename() -> &'static str {
52344        "type.googleapis.com/google.cloud.aiplatform.v1.ListCustomJobsRequest"
52345    }
52346}
52347
52348/// Response message for
52349/// [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs]
52350///
52351/// [google.cloud.aiplatform.v1.JobService.ListCustomJobs]: crate::client::JobService::list_custom_jobs
52352#[cfg(feature = "job-service")]
52353#[derive(Clone, Default, PartialEq)]
52354#[non_exhaustive]
52355pub struct ListCustomJobsResponse {
52356    /// List of CustomJobs in the requested page.
52357    pub custom_jobs: std::vec::Vec<crate::model::CustomJob>,
52358
52359    /// A token to retrieve the next page of results.
52360    /// Pass to
52361    /// [ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token]
52362    /// to obtain that page.
52363    ///
52364    /// [google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token]: crate::model::ListCustomJobsRequest::page_token
52365    pub next_page_token: std::string::String,
52366
52367    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52368}
52369
52370#[cfg(feature = "job-service")]
52371impl ListCustomJobsResponse {
52372    pub fn new() -> Self {
52373        std::default::Default::default()
52374    }
52375
52376    /// Sets the value of [custom_jobs][crate::model::ListCustomJobsResponse::custom_jobs].
52377    pub fn set_custom_jobs<T, V>(mut self, v: T) -> Self
52378    where
52379        T: std::iter::IntoIterator<Item = V>,
52380        V: std::convert::Into<crate::model::CustomJob>,
52381    {
52382        use std::iter::Iterator;
52383        self.custom_jobs = v.into_iter().map(|i| i.into()).collect();
52384        self
52385    }
52386
52387    /// Sets the value of [next_page_token][crate::model::ListCustomJobsResponse::next_page_token].
52388    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52389        self.next_page_token = v.into();
52390        self
52391    }
52392}
52393
52394#[cfg(feature = "job-service")]
52395impl wkt::message::Message for ListCustomJobsResponse {
52396    fn typename() -> &'static str {
52397        "type.googleapis.com/google.cloud.aiplatform.v1.ListCustomJobsResponse"
52398    }
52399}
52400
52401#[cfg(feature = "job-service")]
52402#[doc(hidden)]
52403impl gax::paginator::internal::PageableResponse for ListCustomJobsResponse {
52404    type PageItem = crate::model::CustomJob;
52405
52406    fn items(self) -> std::vec::Vec<Self::PageItem> {
52407        self.custom_jobs
52408    }
52409
52410    fn next_page_token(&self) -> std::string::String {
52411        use std::clone::Clone;
52412        self.next_page_token.clone()
52413    }
52414}
52415
52416/// Request message for
52417/// [JobService.DeleteCustomJob][google.cloud.aiplatform.v1.JobService.DeleteCustomJob].
52418///
52419/// [google.cloud.aiplatform.v1.JobService.DeleteCustomJob]: crate::client::JobService::delete_custom_job
52420#[cfg(feature = "job-service")]
52421#[derive(Clone, Default, PartialEq)]
52422#[non_exhaustive]
52423pub struct DeleteCustomJobRequest {
52424    /// Required. The name of the CustomJob resource to be deleted.
52425    /// Format:
52426    /// `projects/{project}/locations/{location}/customJobs/{custom_job}`
52427    pub name: std::string::String,
52428
52429    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52430}
52431
52432#[cfg(feature = "job-service")]
52433impl DeleteCustomJobRequest {
52434    pub fn new() -> Self {
52435        std::default::Default::default()
52436    }
52437
52438    /// Sets the value of [name][crate::model::DeleteCustomJobRequest::name].
52439    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52440        self.name = v.into();
52441        self
52442    }
52443}
52444
52445#[cfg(feature = "job-service")]
52446impl wkt::message::Message for DeleteCustomJobRequest {
52447    fn typename() -> &'static str {
52448        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteCustomJobRequest"
52449    }
52450}
52451
52452/// Request message for
52453/// [JobService.CancelCustomJob][google.cloud.aiplatform.v1.JobService.CancelCustomJob].
52454///
52455/// [google.cloud.aiplatform.v1.JobService.CancelCustomJob]: crate::client::JobService::cancel_custom_job
52456#[cfg(feature = "job-service")]
52457#[derive(Clone, Default, PartialEq)]
52458#[non_exhaustive]
52459pub struct CancelCustomJobRequest {
52460    /// Required. The name of the CustomJob to cancel.
52461    /// Format:
52462    /// `projects/{project}/locations/{location}/customJobs/{custom_job}`
52463    pub name: std::string::String,
52464
52465    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52466}
52467
52468#[cfg(feature = "job-service")]
52469impl CancelCustomJobRequest {
52470    pub fn new() -> Self {
52471        std::default::Default::default()
52472    }
52473
52474    /// Sets the value of [name][crate::model::CancelCustomJobRequest::name].
52475    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52476        self.name = v.into();
52477        self
52478    }
52479}
52480
52481#[cfg(feature = "job-service")]
52482impl wkt::message::Message for CancelCustomJobRequest {
52483    fn typename() -> &'static str {
52484        "type.googleapis.com/google.cloud.aiplatform.v1.CancelCustomJobRequest"
52485    }
52486}
52487
52488/// Request message for
52489/// [JobService.CreateDataLabelingJob][google.cloud.aiplatform.v1.JobService.CreateDataLabelingJob].
52490///
52491/// [google.cloud.aiplatform.v1.JobService.CreateDataLabelingJob]: crate::client::JobService::create_data_labeling_job
52492#[cfg(feature = "job-service")]
52493#[derive(Clone, Default, PartialEq)]
52494#[non_exhaustive]
52495pub struct CreateDataLabelingJobRequest {
52496    /// Required. The parent of the DataLabelingJob.
52497    /// Format: `projects/{project}/locations/{location}`
52498    pub parent: std::string::String,
52499
52500    /// Required. The DataLabelingJob to create.
52501    pub data_labeling_job: std::option::Option<crate::model::DataLabelingJob>,
52502
52503    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52504}
52505
52506#[cfg(feature = "job-service")]
52507impl CreateDataLabelingJobRequest {
52508    pub fn new() -> Self {
52509        std::default::Default::default()
52510    }
52511
52512    /// Sets the value of [parent][crate::model::CreateDataLabelingJobRequest::parent].
52513    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52514        self.parent = v.into();
52515        self
52516    }
52517
52518    /// Sets the value of [data_labeling_job][crate::model::CreateDataLabelingJobRequest::data_labeling_job].
52519    pub fn set_data_labeling_job<T>(mut self, v: T) -> Self
52520    where
52521        T: std::convert::Into<crate::model::DataLabelingJob>,
52522    {
52523        self.data_labeling_job = std::option::Option::Some(v.into());
52524        self
52525    }
52526
52527    /// Sets or clears the value of [data_labeling_job][crate::model::CreateDataLabelingJobRequest::data_labeling_job].
52528    pub fn set_or_clear_data_labeling_job<T>(mut self, v: std::option::Option<T>) -> Self
52529    where
52530        T: std::convert::Into<crate::model::DataLabelingJob>,
52531    {
52532        self.data_labeling_job = v.map(|x| x.into());
52533        self
52534    }
52535}
52536
52537#[cfg(feature = "job-service")]
52538impl wkt::message::Message for CreateDataLabelingJobRequest {
52539    fn typename() -> &'static str {
52540        "type.googleapis.com/google.cloud.aiplatform.v1.CreateDataLabelingJobRequest"
52541    }
52542}
52543
52544/// Request message for
52545/// [JobService.GetDataLabelingJob][google.cloud.aiplatform.v1.JobService.GetDataLabelingJob].
52546///
52547/// [google.cloud.aiplatform.v1.JobService.GetDataLabelingJob]: crate::client::JobService::get_data_labeling_job
52548#[cfg(feature = "job-service")]
52549#[derive(Clone, Default, PartialEq)]
52550#[non_exhaustive]
52551pub struct GetDataLabelingJobRequest {
52552    /// Required. The name of the DataLabelingJob.
52553    /// Format:
52554    /// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
52555    pub name: std::string::String,
52556
52557    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52558}
52559
52560#[cfg(feature = "job-service")]
52561impl GetDataLabelingJobRequest {
52562    pub fn new() -> Self {
52563        std::default::Default::default()
52564    }
52565
52566    /// Sets the value of [name][crate::model::GetDataLabelingJobRequest::name].
52567    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52568        self.name = v.into();
52569        self
52570    }
52571}
52572
52573#[cfg(feature = "job-service")]
52574impl wkt::message::Message for GetDataLabelingJobRequest {
52575    fn typename() -> &'static str {
52576        "type.googleapis.com/google.cloud.aiplatform.v1.GetDataLabelingJobRequest"
52577    }
52578}
52579
52580/// Request message for
52581/// [JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs].
52582///
52583/// [google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs]: crate::client::JobService::list_data_labeling_jobs
52584#[cfg(feature = "job-service")]
52585#[derive(Clone, Default, PartialEq)]
52586#[non_exhaustive]
52587pub struct ListDataLabelingJobsRequest {
52588    /// Required. The parent of the DataLabelingJob.
52589    /// Format: `projects/{project}/locations/{location}`
52590    pub parent: std::string::String,
52591
52592    /// The standard list filter.
52593    ///
52594    /// Supported fields:
52595    ///
52596    /// * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
52597    /// * `state` supports `=`, `!=` comparisons.
52598    /// * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
52599    ///   `create_time` must be in RFC 3339 format.
52600    /// * `labels` supports general map functions that is:
52601    ///   `labels.key=value` - key:value equality
52602    ///   `labels.key:* - key existence
52603    ///
52604    /// Some examples of using the filter are:
52605    ///
52606    /// * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
52607    /// * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
52608    /// * `NOT display_name="my_job"`
52609    /// * `create_time>"2021-05-18T00:00:00Z"`
52610    /// * `labels.keyA=valueA`
52611    /// * `labels.keyB:*`
52612    pub filter: std::string::String,
52613
52614    /// The standard list page size.
52615    pub page_size: i32,
52616
52617    /// The standard list page token.
52618    pub page_token: std::string::String,
52619
52620    /// Mask specifying which fields to read. FieldMask represents a set of
52621    /// symbolic field paths. For example, the mask can be `paths: "name"`. The
52622    /// "name" here is a field in DataLabelingJob.
52623    /// If this field is not set, all fields of the DataLabelingJob are returned.
52624    pub read_mask: std::option::Option<wkt::FieldMask>,
52625
52626    /// A comma-separated list of fields to order by, sorted in ascending order by
52627    /// default.
52628    /// Use `desc` after a field name for descending.
52629    pub order_by: std::string::String,
52630
52631    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52632}
52633
52634#[cfg(feature = "job-service")]
52635impl ListDataLabelingJobsRequest {
52636    pub fn new() -> Self {
52637        std::default::Default::default()
52638    }
52639
52640    /// Sets the value of [parent][crate::model::ListDataLabelingJobsRequest::parent].
52641    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52642        self.parent = v.into();
52643        self
52644    }
52645
52646    /// Sets the value of [filter][crate::model::ListDataLabelingJobsRequest::filter].
52647    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52648        self.filter = v.into();
52649        self
52650    }
52651
52652    /// Sets the value of [page_size][crate::model::ListDataLabelingJobsRequest::page_size].
52653    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
52654        self.page_size = v.into();
52655        self
52656    }
52657
52658    /// Sets the value of [page_token][crate::model::ListDataLabelingJobsRequest::page_token].
52659    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52660        self.page_token = v.into();
52661        self
52662    }
52663
52664    /// Sets the value of [read_mask][crate::model::ListDataLabelingJobsRequest::read_mask].
52665    pub fn set_read_mask<T>(mut self, v: T) -> Self
52666    where
52667        T: std::convert::Into<wkt::FieldMask>,
52668    {
52669        self.read_mask = std::option::Option::Some(v.into());
52670        self
52671    }
52672
52673    /// Sets or clears the value of [read_mask][crate::model::ListDataLabelingJobsRequest::read_mask].
52674    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
52675    where
52676        T: std::convert::Into<wkt::FieldMask>,
52677    {
52678        self.read_mask = v.map(|x| x.into());
52679        self
52680    }
52681
52682    /// Sets the value of [order_by][crate::model::ListDataLabelingJobsRequest::order_by].
52683    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52684        self.order_by = v.into();
52685        self
52686    }
52687}
52688
52689#[cfg(feature = "job-service")]
52690impl wkt::message::Message for ListDataLabelingJobsRequest {
52691    fn typename() -> &'static str {
52692        "type.googleapis.com/google.cloud.aiplatform.v1.ListDataLabelingJobsRequest"
52693    }
52694}
52695
52696/// Response message for
52697/// [JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs].
52698///
52699/// [google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs]: crate::client::JobService::list_data_labeling_jobs
52700#[cfg(feature = "job-service")]
52701#[derive(Clone, Default, PartialEq)]
52702#[non_exhaustive]
52703pub struct ListDataLabelingJobsResponse {
52704    /// A list of DataLabelingJobs that matches the specified filter in the
52705    /// request.
52706    pub data_labeling_jobs: std::vec::Vec<crate::model::DataLabelingJob>,
52707
52708    /// The standard List next-page token.
52709    pub next_page_token: std::string::String,
52710
52711    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52712}
52713
52714#[cfg(feature = "job-service")]
52715impl ListDataLabelingJobsResponse {
52716    pub fn new() -> Self {
52717        std::default::Default::default()
52718    }
52719
52720    /// Sets the value of [data_labeling_jobs][crate::model::ListDataLabelingJobsResponse::data_labeling_jobs].
52721    pub fn set_data_labeling_jobs<T, V>(mut self, v: T) -> Self
52722    where
52723        T: std::iter::IntoIterator<Item = V>,
52724        V: std::convert::Into<crate::model::DataLabelingJob>,
52725    {
52726        use std::iter::Iterator;
52727        self.data_labeling_jobs = v.into_iter().map(|i| i.into()).collect();
52728        self
52729    }
52730
52731    /// Sets the value of [next_page_token][crate::model::ListDataLabelingJobsResponse::next_page_token].
52732    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52733        self.next_page_token = v.into();
52734        self
52735    }
52736}
52737
52738#[cfg(feature = "job-service")]
52739impl wkt::message::Message for ListDataLabelingJobsResponse {
52740    fn typename() -> &'static str {
52741        "type.googleapis.com/google.cloud.aiplatform.v1.ListDataLabelingJobsResponse"
52742    }
52743}
52744
52745#[cfg(feature = "job-service")]
52746#[doc(hidden)]
52747impl gax::paginator::internal::PageableResponse for ListDataLabelingJobsResponse {
52748    type PageItem = crate::model::DataLabelingJob;
52749
52750    fn items(self) -> std::vec::Vec<Self::PageItem> {
52751        self.data_labeling_jobs
52752    }
52753
52754    fn next_page_token(&self) -> std::string::String {
52755        use std::clone::Clone;
52756        self.next_page_token.clone()
52757    }
52758}
52759
52760/// Request message for
52761/// [JobService.DeleteDataLabelingJob][google.cloud.aiplatform.v1.JobService.DeleteDataLabelingJob].
52762///
52763/// [google.cloud.aiplatform.v1.JobService.DeleteDataLabelingJob]: crate::client::JobService::delete_data_labeling_job
52764#[cfg(feature = "job-service")]
52765#[derive(Clone, Default, PartialEq)]
52766#[non_exhaustive]
52767pub struct DeleteDataLabelingJobRequest {
52768    /// Required. The name of the DataLabelingJob to be deleted.
52769    /// Format:
52770    /// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
52771    pub name: std::string::String,
52772
52773    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52774}
52775
52776#[cfg(feature = "job-service")]
52777impl DeleteDataLabelingJobRequest {
52778    pub fn new() -> Self {
52779        std::default::Default::default()
52780    }
52781
52782    /// Sets the value of [name][crate::model::DeleteDataLabelingJobRequest::name].
52783    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52784        self.name = v.into();
52785        self
52786    }
52787}
52788
52789#[cfg(feature = "job-service")]
52790impl wkt::message::Message for DeleteDataLabelingJobRequest {
52791    fn typename() -> &'static str {
52792        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest"
52793    }
52794}
52795
52796/// Request message for
52797/// [JobService.CancelDataLabelingJob][google.cloud.aiplatform.v1.JobService.CancelDataLabelingJob].
52798///
52799/// [google.cloud.aiplatform.v1.JobService.CancelDataLabelingJob]: crate::client::JobService::cancel_data_labeling_job
52800#[cfg(feature = "job-service")]
52801#[derive(Clone, Default, PartialEq)]
52802#[non_exhaustive]
52803pub struct CancelDataLabelingJobRequest {
52804    /// Required. The name of the DataLabelingJob.
52805    /// Format:
52806    /// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
52807    pub name: std::string::String,
52808
52809    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52810}
52811
52812#[cfg(feature = "job-service")]
52813impl CancelDataLabelingJobRequest {
52814    pub fn new() -> Self {
52815        std::default::Default::default()
52816    }
52817
52818    /// Sets the value of [name][crate::model::CancelDataLabelingJobRequest::name].
52819    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52820        self.name = v.into();
52821        self
52822    }
52823}
52824
52825#[cfg(feature = "job-service")]
52826impl wkt::message::Message for CancelDataLabelingJobRequest {
52827    fn typename() -> &'static str {
52828        "type.googleapis.com/google.cloud.aiplatform.v1.CancelDataLabelingJobRequest"
52829    }
52830}
52831
52832/// Request message for
52833/// [JobService.CreateHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CreateHyperparameterTuningJob].
52834///
52835/// [google.cloud.aiplatform.v1.JobService.CreateHyperparameterTuningJob]: crate::client::JobService::create_hyperparameter_tuning_job
52836#[cfg(feature = "job-service")]
52837#[derive(Clone, Default, PartialEq)]
52838#[non_exhaustive]
52839pub struct CreateHyperparameterTuningJobRequest {
52840    /// Required. The resource name of the Location to create the
52841    /// HyperparameterTuningJob in. Format:
52842    /// `projects/{project}/locations/{location}`
52843    pub parent: std::string::String,
52844
52845    /// Required. The HyperparameterTuningJob to create.
52846    pub hyperparameter_tuning_job: std::option::Option<crate::model::HyperparameterTuningJob>,
52847
52848    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52849}
52850
52851#[cfg(feature = "job-service")]
52852impl CreateHyperparameterTuningJobRequest {
52853    pub fn new() -> Self {
52854        std::default::Default::default()
52855    }
52856
52857    /// Sets the value of [parent][crate::model::CreateHyperparameterTuningJobRequest::parent].
52858    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52859        self.parent = v.into();
52860        self
52861    }
52862
52863    /// Sets the value of [hyperparameter_tuning_job][crate::model::CreateHyperparameterTuningJobRequest::hyperparameter_tuning_job].
52864    pub fn set_hyperparameter_tuning_job<T>(mut self, v: T) -> Self
52865    where
52866        T: std::convert::Into<crate::model::HyperparameterTuningJob>,
52867    {
52868        self.hyperparameter_tuning_job = std::option::Option::Some(v.into());
52869        self
52870    }
52871
52872    /// Sets or clears the value of [hyperparameter_tuning_job][crate::model::CreateHyperparameterTuningJobRequest::hyperparameter_tuning_job].
52873    pub fn set_or_clear_hyperparameter_tuning_job<T>(mut self, v: std::option::Option<T>) -> Self
52874    where
52875        T: std::convert::Into<crate::model::HyperparameterTuningJob>,
52876    {
52877        self.hyperparameter_tuning_job = v.map(|x| x.into());
52878        self
52879    }
52880}
52881
52882#[cfg(feature = "job-service")]
52883impl wkt::message::Message for CreateHyperparameterTuningJobRequest {
52884    fn typename() -> &'static str {
52885        "type.googleapis.com/google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest"
52886    }
52887}
52888
52889/// Request message for
52890/// [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob].
52891///
52892/// [google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob]: crate::client::JobService::get_hyperparameter_tuning_job
52893#[cfg(feature = "job-service")]
52894#[derive(Clone, Default, PartialEq)]
52895#[non_exhaustive]
52896pub struct GetHyperparameterTuningJobRequest {
52897    /// Required. The name of the HyperparameterTuningJob resource.
52898    /// Format:
52899    /// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
52900    pub name: std::string::String,
52901
52902    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52903}
52904
52905#[cfg(feature = "job-service")]
52906impl GetHyperparameterTuningJobRequest {
52907    pub fn new() -> Self {
52908        std::default::Default::default()
52909    }
52910
52911    /// Sets the value of [name][crate::model::GetHyperparameterTuningJobRequest::name].
52912    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52913        self.name = v.into();
52914        self
52915    }
52916}
52917
52918#[cfg(feature = "job-service")]
52919impl wkt::message::Message for GetHyperparameterTuningJobRequest {
52920    fn typename() -> &'static str {
52921        "type.googleapis.com/google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest"
52922    }
52923}
52924
52925/// Request message for
52926/// [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs].
52927///
52928/// [google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs]: crate::client::JobService::list_hyperparameter_tuning_jobs
52929#[cfg(feature = "job-service")]
52930#[derive(Clone, Default, PartialEq)]
52931#[non_exhaustive]
52932pub struct ListHyperparameterTuningJobsRequest {
52933    /// Required. The resource name of the Location to list the
52934    /// HyperparameterTuningJobs from. Format:
52935    /// `projects/{project}/locations/{location}`
52936    pub parent: std::string::String,
52937
52938    /// The standard list filter.
52939    ///
52940    /// Supported fields:
52941    ///
52942    /// * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
52943    /// * `state` supports `=`, `!=` comparisons.
52944    /// * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
52945    ///   `create_time` must be in RFC 3339 format.
52946    /// * `labels` supports general map functions that is:
52947    ///   `labels.key=value` - key:value equality
52948    ///   `labels.key:* - key existence
52949    ///
52950    /// Some examples of using the filter are:
52951    ///
52952    /// * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
52953    /// * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
52954    /// * `NOT display_name="my_job"`
52955    /// * `create_time>"2021-05-18T00:00:00Z"`
52956    /// * `labels.keyA=valueA`
52957    /// * `labels.keyB:*`
52958    pub filter: std::string::String,
52959
52960    /// The standard list page size.
52961    pub page_size: i32,
52962
52963    /// The standard list page token.
52964    /// Typically obtained via
52965    /// [ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token]
52966    /// of the previous
52967    /// [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs]
52968    /// call.
52969    ///
52970    /// [google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs]: crate::client::JobService::list_hyperparameter_tuning_jobs
52971    /// [google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token]: crate::model::ListHyperparameterTuningJobsResponse::next_page_token
52972    pub page_token: std::string::String,
52973
52974    /// Mask specifying which fields to read.
52975    pub read_mask: std::option::Option<wkt::FieldMask>,
52976
52977    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52978}
52979
52980#[cfg(feature = "job-service")]
52981impl ListHyperparameterTuningJobsRequest {
52982    pub fn new() -> Self {
52983        std::default::Default::default()
52984    }
52985
52986    /// Sets the value of [parent][crate::model::ListHyperparameterTuningJobsRequest::parent].
52987    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52988        self.parent = v.into();
52989        self
52990    }
52991
52992    /// Sets the value of [filter][crate::model::ListHyperparameterTuningJobsRequest::filter].
52993    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
52994        self.filter = v.into();
52995        self
52996    }
52997
52998    /// Sets the value of [page_size][crate::model::ListHyperparameterTuningJobsRequest::page_size].
52999    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
53000        self.page_size = v.into();
53001        self
53002    }
53003
53004    /// Sets the value of [page_token][crate::model::ListHyperparameterTuningJobsRequest::page_token].
53005    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53006        self.page_token = v.into();
53007        self
53008    }
53009
53010    /// Sets the value of [read_mask][crate::model::ListHyperparameterTuningJobsRequest::read_mask].
53011    pub fn set_read_mask<T>(mut self, v: T) -> Self
53012    where
53013        T: std::convert::Into<wkt::FieldMask>,
53014    {
53015        self.read_mask = std::option::Option::Some(v.into());
53016        self
53017    }
53018
53019    /// Sets or clears the value of [read_mask][crate::model::ListHyperparameterTuningJobsRequest::read_mask].
53020    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
53021    where
53022        T: std::convert::Into<wkt::FieldMask>,
53023    {
53024        self.read_mask = v.map(|x| x.into());
53025        self
53026    }
53027}
53028
53029#[cfg(feature = "job-service")]
53030impl wkt::message::Message for ListHyperparameterTuningJobsRequest {
53031    fn typename() -> &'static str {
53032        "type.googleapis.com/google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest"
53033    }
53034}
53035
53036/// Response message for
53037/// [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs]
53038///
53039/// [google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs]: crate::client::JobService::list_hyperparameter_tuning_jobs
53040#[cfg(feature = "job-service")]
53041#[derive(Clone, Default, PartialEq)]
53042#[non_exhaustive]
53043pub struct ListHyperparameterTuningJobsResponse {
53044    /// List of HyperparameterTuningJobs in the requested page.
53045    /// [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials]
53046    /// of the jobs will be not be returned.
53047    ///
53048    /// [google.cloud.aiplatform.v1.HyperparameterTuningJob.trials]: crate::model::HyperparameterTuningJob::trials
53049    pub hyperparameter_tuning_jobs: std::vec::Vec<crate::model::HyperparameterTuningJob>,
53050
53051    /// A token to retrieve the next page of results.
53052    /// Pass to
53053    /// [ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token]
53054    /// to obtain that page.
53055    ///
53056    /// [google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token]: crate::model::ListHyperparameterTuningJobsRequest::page_token
53057    pub next_page_token: std::string::String,
53058
53059    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53060}
53061
53062#[cfg(feature = "job-service")]
53063impl ListHyperparameterTuningJobsResponse {
53064    pub fn new() -> Self {
53065        std::default::Default::default()
53066    }
53067
53068    /// Sets the value of [hyperparameter_tuning_jobs][crate::model::ListHyperparameterTuningJobsResponse::hyperparameter_tuning_jobs].
53069    pub fn set_hyperparameter_tuning_jobs<T, V>(mut self, v: T) -> Self
53070    where
53071        T: std::iter::IntoIterator<Item = V>,
53072        V: std::convert::Into<crate::model::HyperparameterTuningJob>,
53073    {
53074        use std::iter::Iterator;
53075        self.hyperparameter_tuning_jobs = v.into_iter().map(|i| i.into()).collect();
53076        self
53077    }
53078
53079    /// Sets the value of [next_page_token][crate::model::ListHyperparameterTuningJobsResponse::next_page_token].
53080    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53081        self.next_page_token = v.into();
53082        self
53083    }
53084}
53085
53086#[cfg(feature = "job-service")]
53087impl wkt::message::Message for ListHyperparameterTuningJobsResponse {
53088    fn typename() -> &'static str {
53089        "type.googleapis.com/google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse"
53090    }
53091}
53092
53093#[cfg(feature = "job-service")]
53094#[doc(hidden)]
53095impl gax::paginator::internal::PageableResponse for ListHyperparameterTuningJobsResponse {
53096    type PageItem = crate::model::HyperparameterTuningJob;
53097
53098    fn items(self) -> std::vec::Vec<Self::PageItem> {
53099        self.hyperparameter_tuning_jobs
53100    }
53101
53102    fn next_page_token(&self) -> std::string::String {
53103        use std::clone::Clone;
53104        self.next_page_token.clone()
53105    }
53106}
53107
53108/// Request message for
53109/// [JobService.DeleteHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.DeleteHyperparameterTuningJob].
53110///
53111/// [google.cloud.aiplatform.v1.JobService.DeleteHyperparameterTuningJob]: crate::client::JobService::delete_hyperparameter_tuning_job
53112#[cfg(feature = "job-service")]
53113#[derive(Clone, Default, PartialEq)]
53114#[non_exhaustive]
53115pub struct DeleteHyperparameterTuningJobRequest {
53116    /// Required. The name of the HyperparameterTuningJob resource to be deleted.
53117    /// Format:
53118    /// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
53119    pub name: std::string::String,
53120
53121    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53122}
53123
53124#[cfg(feature = "job-service")]
53125impl DeleteHyperparameterTuningJobRequest {
53126    pub fn new() -> Self {
53127        std::default::Default::default()
53128    }
53129
53130    /// Sets the value of [name][crate::model::DeleteHyperparameterTuningJobRequest::name].
53131    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53132        self.name = v.into();
53133        self
53134    }
53135}
53136
53137#[cfg(feature = "job-service")]
53138impl wkt::message::Message for DeleteHyperparameterTuningJobRequest {
53139    fn typename() -> &'static str {
53140        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest"
53141    }
53142}
53143
53144/// Request message for
53145/// [JobService.CancelHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CancelHyperparameterTuningJob].
53146///
53147/// [google.cloud.aiplatform.v1.JobService.CancelHyperparameterTuningJob]: crate::client::JobService::cancel_hyperparameter_tuning_job
53148#[cfg(feature = "job-service")]
53149#[derive(Clone, Default, PartialEq)]
53150#[non_exhaustive]
53151pub struct CancelHyperparameterTuningJobRequest {
53152    /// Required. The name of the HyperparameterTuningJob to cancel.
53153    /// Format:
53154    /// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
53155    pub name: std::string::String,
53156
53157    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53158}
53159
53160#[cfg(feature = "job-service")]
53161impl CancelHyperparameterTuningJobRequest {
53162    pub fn new() -> Self {
53163        std::default::Default::default()
53164    }
53165
53166    /// Sets the value of [name][crate::model::CancelHyperparameterTuningJobRequest::name].
53167    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53168        self.name = v.into();
53169        self
53170    }
53171}
53172
53173#[cfg(feature = "job-service")]
53174impl wkt::message::Message for CancelHyperparameterTuningJobRequest {
53175    fn typename() -> &'static str {
53176        "type.googleapis.com/google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest"
53177    }
53178}
53179
53180/// Request message for
53181/// [JobService.CreateNasJob][google.cloud.aiplatform.v1.JobService.CreateNasJob].
53182///
53183/// [google.cloud.aiplatform.v1.JobService.CreateNasJob]: crate::client::JobService::create_nas_job
53184#[cfg(feature = "job-service")]
53185#[derive(Clone, Default, PartialEq)]
53186#[non_exhaustive]
53187pub struct CreateNasJobRequest {
53188    /// Required. The resource name of the Location to create the NasJob in.
53189    /// Format: `projects/{project}/locations/{location}`
53190    pub parent: std::string::String,
53191
53192    /// Required. The NasJob to create.
53193    pub nas_job: std::option::Option<crate::model::NasJob>,
53194
53195    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53196}
53197
53198#[cfg(feature = "job-service")]
53199impl CreateNasJobRequest {
53200    pub fn new() -> Self {
53201        std::default::Default::default()
53202    }
53203
53204    /// Sets the value of [parent][crate::model::CreateNasJobRequest::parent].
53205    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53206        self.parent = v.into();
53207        self
53208    }
53209
53210    /// Sets the value of [nas_job][crate::model::CreateNasJobRequest::nas_job].
53211    pub fn set_nas_job<T>(mut self, v: T) -> Self
53212    where
53213        T: std::convert::Into<crate::model::NasJob>,
53214    {
53215        self.nas_job = std::option::Option::Some(v.into());
53216        self
53217    }
53218
53219    /// Sets or clears the value of [nas_job][crate::model::CreateNasJobRequest::nas_job].
53220    pub fn set_or_clear_nas_job<T>(mut self, v: std::option::Option<T>) -> Self
53221    where
53222        T: std::convert::Into<crate::model::NasJob>,
53223    {
53224        self.nas_job = v.map(|x| x.into());
53225        self
53226    }
53227}
53228
53229#[cfg(feature = "job-service")]
53230impl wkt::message::Message for CreateNasJobRequest {
53231    fn typename() -> &'static str {
53232        "type.googleapis.com/google.cloud.aiplatform.v1.CreateNasJobRequest"
53233    }
53234}
53235
53236/// Request message for
53237/// [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob].
53238///
53239/// [google.cloud.aiplatform.v1.JobService.GetNasJob]: crate::client::JobService::get_nas_job
53240#[cfg(feature = "job-service")]
53241#[derive(Clone, Default, PartialEq)]
53242#[non_exhaustive]
53243pub struct GetNasJobRequest {
53244    /// Required. The name of the NasJob resource.
53245    /// Format:
53246    /// `projects/{project}/locations/{location}/nasJobs/{nas_job}`
53247    pub name: std::string::String,
53248
53249    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53250}
53251
53252#[cfg(feature = "job-service")]
53253impl GetNasJobRequest {
53254    pub fn new() -> Self {
53255        std::default::Default::default()
53256    }
53257
53258    /// Sets the value of [name][crate::model::GetNasJobRequest::name].
53259    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53260        self.name = v.into();
53261        self
53262    }
53263}
53264
53265#[cfg(feature = "job-service")]
53266impl wkt::message::Message for GetNasJobRequest {
53267    fn typename() -> &'static str {
53268        "type.googleapis.com/google.cloud.aiplatform.v1.GetNasJobRequest"
53269    }
53270}
53271
53272/// Request message for
53273/// [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs].
53274///
53275/// [google.cloud.aiplatform.v1.JobService.ListNasJobs]: crate::client::JobService::list_nas_jobs
53276#[cfg(feature = "job-service")]
53277#[derive(Clone, Default, PartialEq)]
53278#[non_exhaustive]
53279pub struct ListNasJobsRequest {
53280    /// Required. The resource name of the Location to list the NasJobs
53281    /// from. Format: `projects/{project}/locations/{location}`
53282    pub parent: std::string::String,
53283
53284    /// The standard list filter.
53285    ///
53286    /// Supported fields:
53287    ///
53288    /// * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
53289    /// * `state` supports `=`, `!=` comparisons.
53290    /// * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
53291    ///   `create_time` must be in RFC 3339 format.
53292    /// * `labels` supports general map functions that is:
53293    ///   `labels.key=value` - key:value equality
53294    ///   `labels.key:* - key existence
53295    ///
53296    /// Some examples of using the filter are:
53297    ///
53298    /// * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
53299    /// * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
53300    /// * `NOT display_name="my_job"`
53301    /// * `create_time>"2021-05-18T00:00:00Z"`
53302    /// * `labels.keyA=valueA`
53303    /// * `labels.keyB:*`
53304    pub filter: std::string::String,
53305
53306    /// The standard list page size.
53307    pub page_size: i32,
53308
53309    /// The standard list page token.
53310    /// Typically obtained via
53311    /// [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasJobsResponse.next_page_token]
53312    /// of the previous
53313    /// [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]
53314    /// call.
53315    ///
53316    /// [google.cloud.aiplatform.v1.JobService.ListNasJobs]: crate::client::JobService::list_nas_jobs
53317    /// [google.cloud.aiplatform.v1.ListNasJobsResponse.next_page_token]: crate::model::ListNasJobsResponse::next_page_token
53318    pub page_token: std::string::String,
53319
53320    /// Mask specifying which fields to read.
53321    pub read_mask: std::option::Option<wkt::FieldMask>,
53322
53323    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53324}
53325
53326#[cfg(feature = "job-service")]
53327impl ListNasJobsRequest {
53328    pub fn new() -> Self {
53329        std::default::Default::default()
53330    }
53331
53332    /// Sets the value of [parent][crate::model::ListNasJobsRequest::parent].
53333    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53334        self.parent = v.into();
53335        self
53336    }
53337
53338    /// Sets the value of [filter][crate::model::ListNasJobsRequest::filter].
53339    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53340        self.filter = v.into();
53341        self
53342    }
53343
53344    /// Sets the value of [page_size][crate::model::ListNasJobsRequest::page_size].
53345    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
53346        self.page_size = v.into();
53347        self
53348    }
53349
53350    /// Sets the value of [page_token][crate::model::ListNasJobsRequest::page_token].
53351    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53352        self.page_token = v.into();
53353        self
53354    }
53355
53356    /// Sets the value of [read_mask][crate::model::ListNasJobsRequest::read_mask].
53357    pub fn set_read_mask<T>(mut self, v: T) -> Self
53358    where
53359        T: std::convert::Into<wkt::FieldMask>,
53360    {
53361        self.read_mask = std::option::Option::Some(v.into());
53362        self
53363    }
53364
53365    /// Sets or clears the value of [read_mask][crate::model::ListNasJobsRequest::read_mask].
53366    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
53367    where
53368        T: std::convert::Into<wkt::FieldMask>,
53369    {
53370        self.read_mask = v.map(|x| x.into());
53371        self
53372    }
53373}
53374
53375#[cfg(feature = "job-service")]
53376impl wkt::message::Message for ListNasJobsRequest {
53377    fn typename() -> &'static str {
53378        "type.googleapis.com/google.cloud.aiplatform.v1.ListNasJobsRequest"
53379    }
53380}
53381
53382/// Response message for
53383/// [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]
53384///
53385/// [google.cloud.aiplatform.v1.JobService.ListNasJobs]: crate::client::JobService::list_nas_jobs
53386#[cfg(feature = "job-service")]
53387#[derive(Clone, Default, PartialEq)]
53388#[non_exhaustive]
53389pub struct ListNasJobsResponse {
53390    /// List of NasJobs in the requested page.
53391    /// [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
53392    /// of the jobs will not be returned.
53393    ///
53394    /// [google.cloud.aiplatform.v1.NasJob.nas_job_output]: crate::model::NasJob::nas_job_output
53395    pub nas_jobs: std::vec::Vec<crate::model::NasJob>,
53396
53397    /// A token to retrieve the next page of results.
53398    /// Pass to
53399    /// [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1.ListNasJobsRequest.page_token]
53400    /// to obtain that page.
53401    ///
53402    /// [google.cloud.aiplatform.v1.ListNasJobsRequest.page_token]: crate::model::ListNasJobsRequest::page_token
53403    pub next_page_token: std::string::String,
53404
53405    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53406}
53407
53408#[cfg(feature = "job-service")]
53409impl ListNasJobsResponse {
53410    pub fn new() -> Self {
53411        std::default::Default::default()
53412    }
53413
53414    /// Sets the value of [nas_jobs][crate::model::ListNasJobsResponse::nas_jobs].
53415    pub fn set_nas_jobs<T, V>(mut self, v: T) -> Self
53416    where
53417        T: std::iter::IntoIterator<Item = V>,
53418        V: std::convert::Into<crate::model::NasJob>,
53419    {
53420        use std::iter::Iterator;
53421        self.nas_jobs = v.into_iter().map(|i| i.into()).collect();
53422        self
53423    }
53424
53425    /// Sets the value of [next_page_token][crate::model::ListNasJobsResponse::next_page_token].
53426    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53427        self.next_page_token = v.into();
53428        self
53429    }
53430}
53431
53432#[cfg(feature = "job-service")]
53433impl wkt::message::Message for ListNasJobsResponse {
53434    fn typename() -> &'static str {
53435        "type.googleapis.com/google.cloud.aiplatform.v1.ListNasJobsResponse"
53436    }
53437}
53438
53439#[cfg(feature = "job-service")]
53440#[doc(hidden)]
53441impl gax::paginator::internal::PageableResponse for ListNasJobsResponse {
53442    type PageItem = crate::model::NasJob;
53443
53444    fn items(self) -> std::vec::Vec<Self::PageItem> {
53445        self.nas_jobs
53446    }
53447
53448    fn next_page_token(&self) -> std::string::String {
53449        use std::clone::Clone;
53450        self.next_page_token.clone()
53451    }
53452}
53453
53454/// Request message for
53455/// [JobService.DeleteNasJob][google.cloud.aiplatform.v1.JobService.DeleteNasJob].
53456///
53457/// [google.cloud.aiplatform.v1.JobService.DeleteNasJob]: crate::client::JobService::delete_nas_job
53458#[cfg(feature = "job-service")]
53459#[derive(Clone, Default, PartialEq)]
53460#[non_exhaustive]
53461pub struct DeleteNasJobRequest {
53462    /// Required. The name of the NasJob resource to be deleted.
53463    /// Format:
53464    /// `projects/{project}/locations/{location}/nasJobs/{nas_job}`
53465    pub name: std::string::String,
53466
53467    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53468}
53469
53470#[cfg(feature = "job-service")]
53471impl DeleteNasJobRequest {
53472    pub fn new() -> Self {
53473        std::default::Default::default()
53474    }
53475
53476    /// Sets the value of [name][crate::model::DeleteNasJobRequest::name].
53477    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53478        self.name = v.into();
53479        self
53480    }
53481}
53482
53483#[cfg(feature = "job-service")]
53484impl wkt::message::Message for DeleteNasJobRequest {
53485    fn typename() -> &'static str {
53486        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteNasJobRequest"
53487    }
53488}
53489
53490/// Request message for
53491/// [JobService.CancelNasJob][google.cloud.aiplatform.v1.JobService.CancelNasJob].
53492///
53493/// [google.cloud.aiplatform.v1.JobService.CancelNasJob]: crate::client::JobService::cancel_nas_job
53494#[cfg(feature = "job-service")]
53495#[derive(Clone, Default, PartialEq)]
53496#[non_exhaustive]
53497pub struct CancelNasJobRequest {
53498    /// Required. The name of the NasJob to cancel.
53499    /// Format:
53500    /// `projects/{project}/locations/{location}/nasJobs/{nas_job}`
53501    pub name: std::string::String,
53502
53503    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53504}
53505
53506#[cfg(feature = "job-service")]
53507impl CancelNasJobRequest {
53508    pub fn new() -> Self {
53509        std::default::Default::default()
53510    }
53511
53512    /// Sets the value of [name][crate::model::CancelNasJobRequest::name].
53513    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53514        self.name = v.into();
53515        self
53516    }
53517}
53518
53519#[cfg(feature = "job-service")]
53520impl wkt::message::Message for CancelNasJobRequest {
53521    fn typename() -> &'static str {
53522        "type.googleapis.com/google.cloud.aiplatform.v1.CancelNasJobRequest"
53523    }
53524}
53525
53526/// Request message for
53527/// [JobService.GetNasTrialDetail][google.cloud.aiplatform.v1.JobService.GetNasTrialDetail].
53528///
53529/// [google.cloud.aiplatform.v1.JobService.GetNasTrialDetail]: crate::client::JobService::get_nas_trial_detail
53530#[cfg(feature = "job-service")]
53531#[derive(Clone, Default, PartialEq)]
53532#[non_exhaustive]
53533pub struct GetNasTrialDetailRequest {
53534    /// Required. The name of the NasTrialDetail resource.
53535    /// Format:
53536    /// `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
53537    pub name: std::string::String,
53538
53539    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53540}
53541
53542#[cfg(feature = "job-service")]
53543impl GetNasTrialDetailRequest {
53544    pub fn new() -> Self {
53545        std::default::Default::default()
53546    }
53547
53548    /// Sets the value of [name][crate::model::GetNasTrialDetailRequest::name].
53549    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53550        self.name = v.into();
53551        self
53552    }
53553}
53554
53555#[cfg(feature = "job-service")]
53556impl wkt::message::Message for GetNasTrialDetailRequest {
53557    fn typename() -> &'static str {
53558        "type.googleapis.com/google.cloud.aiplatform.v1.GetNasTrialDetailRequest"
53559    }
53560}
53561
53562/// Request message for
53563/// [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails].
53564///
53565/// [google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]: crate::client::JobService::list_nas_trial_details
53566#[cfg(feature = "job-service")]
53567#[derive(Clone, Default, PartialEq)]
53568#[non_exhaustive]
53569pub struct ListNasTrialDetailsRequest {
53570    /// Required. The name of the NasJob resource.
53571    /// Format:
53572    /// `projects/{project}/locations/{location}/nasJobs/{nas_job}`
53573    pub parent: std::string::String,
53574
53575    /// The standard list page size.
53576    pub page_size: i32,
53577
53578    /// The standard list page token.
53579    /// Typically obtained via
53580    /// [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.next_page_token]
53581    /// of the previous
53582    /// [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]
53583    /// call.
53584    ///
53585    /// [google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]: crate::client::JobService::list_nas_trial_details
53586    /// [google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.next_page_token]: crate::model::ListNasTrialDetailsResponse::next_page_token
53587    pub page_token: std::string::String,
53588
53589    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53590}
53591
53592#[cfg(feature = "job-service")]
53593impl ListNasTrialDetailsRequest {
53594    pub fn new() -> Self {
53595        std::default::Default::default()
53596    }
53597
53598    /// Sets the value of [parent][crate::model::ListNasTrialDetailsRequest::parent].
53599    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53600        self.parent = v.into();
53601        self
53602    }
53603
53604    /// Sets the value of [page_size][crate::model::ListNasTrialDetailsRequest::page_size].
53605    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
53606        self.page_size = v.into();
53607        self
53608    }
53609
53610    /// Sets the value of [page_token][crate::model::ListNasTrialDetailsRequest::page_token].
53611    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53612        self.page_token = v.into();
53613        self
53614    }
53615}
53616
53617#[cfg(feature = "job-service")]
53618impl wkt::message::Message for ListNasTrialDetailsRequest {
53619    fn typename() -> &'static str {
53620        "type.googleapis.com/google.cloud.aiplatform.v1.ListNasTrialDetailsRequest"
53621    }
53622}
53623
53624/// Response message for
53625/// [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]
53626///
53627/// [google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]: crate::client::JobService::list_nas_trial_details
53628#[cfg(feature = "job-service")]
53629#[derive(Clone, Default, PartialEq)]
53630#[non_exhaustive]
53631pub struct ListNasTrialDetailsResponse {
53632    /// List of top NasTrials in the requested page.
53633    pub nas_trial_details: std::vec::Vec<crate::model::NasTrialDetail>,
53634
53635    /// A token to retrieve the next page of results.
53636    /// Pass to
53637    /// [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.page_token]
53638    /// to obtain that page.
53639    ///
53640    /// [google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.page_token]: crate::model::ListNasTrialDetailsRequest::page_token
53641    pub next_page_token: std::string::String,
53642
53643    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53644}
53645
53646#[cfg(feature = "job-service")]
53647impl ListNasTrialDetailsResponse {
53648    pub fn new() -> Self {
53649        std::default::Default::default()
53650    }
53651
53652    /// Sets the value of [nas_trial_details][crate::model::ListNasTrialDetailsResponse::nas_trial_details].
53653    pub fn set_nas_trial_details<T, V>(mut self, v: T) -> Self
53654    where
53655        T: std::iter::IntoIterator<Item = V>,
53656        V: std::convert::Into<crate::model::NasTrialDetail>,
53657    {
53658        use std::iter::Iterator;
53659        self.nas_trial_details = v.into_iter().map(|i| i.into()).collect();
53660        self
53661    }
53662
53663    /// Sets the value of [next_page_token][crate::model::ListNasTrialDetailsResponse::next_page_token].
53664    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53665        self.next_page_token = v.into();
53666        self
53667    }
53668}
53669
53670#[cfg(feature = "job-service")]
53671impl wkt::message::Message for ListNasTrialDetailsResponse {
53672    fn typename() -> &'static str {
53673        "type.googleapis.com/google.cloud.aiplatform.v1.ListNasTrialDetailsResponse"
53674    }
53675}
53676
53677#[cfg(feature = "job-service")]
53678#[doc(hidden)]
53679impl gax::paginator::internal::PageableResponse for ListNasTrialDetailsResponse {
53680    type PageItem = crate::model::NasTrialDetail;
53681
53682    fn items(self) -> std::vec::Vec<Self::PageItem> {
53683        self.nas_trial_details
53684    }
53685
53686    fn next_page_token(&self) -> std::string::String {
53687        use std::clone::Clone;
53688        self.next_page_token.clone()
53689    }
53690}
53691
53692/// Request message for
53693/// [JobService.CreateBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CreateBatchPredictionJob].
53694///
53695/// [google.cloud.aiplatform.v1.JobService.CreateBatchPredictionJob]: crate::client::JobService::create_batch_prediction_job
53696#[cfg(feature = "job-service")]
53697#[derive(Clone, Default, PartialEq)]
53698#[non_exhaustive]
53699pub struct CreateBatchPredictionJobRequest {
53700    /// Required. The resource name of the Location to create the
53701    /// BatchPredictionJob in. Format: `projects/{project}/locations/{location}`
53702    pub parent: std::string::String,
53703
53704    /// Required. The BatchPredictionJob to create.
53705    pub batch_prediction_job: std::option::Option<crate::model::BatchPredictionJob>,
53706
53707    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53708}
53709
53710#[cfg(feature = "job-service")]
53711impl CreateBatchPredictionJobRequest {
53712    pub fn new() -> Self {
53713        std::default::Default::default()
53714    }
53715
53716    /// Sets the value of [parent][crate::model::CreateBatchPredictionJobRequest::parent].
53717    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53718        self.parent = v.into();
53719        self
53720    }
53721
53722    /// Sets the value of [batch_prediction_job][crate::model::CreateBatchPredictionJobRequest::batch_prediction_job].
53723    pub fn set_batch_prediction_job<T>(mut self, v: T) -> Self
53724    where
53725        T: std::convert::Into<crate::model::BatchPredictionJob>,
53726    {
53727        self.batch_prediction_job = std::option::Option::Some(v.into());
53728        self
53729    }
53730
53731    /// Sets or clears the value of [batch_prediction_job][crate::model::CreateBatchPredictionJobRequest::batch_prediction_job].
53732    pub fn set_or_clear_batch_prediction_job<T>(mut self, v: std::option::Option<T>) -> Self
53733    where
53734        T: std::convert::Into<crate::model::BatchPredictionJob>,
53735    {
53736        self.batch_prediction_job = v.map(|x| x.into());
53737        self
53738    }
53739}
53740
53741#[cfg(feature = "job-service")]
53742impl wkt::message::Message for CreateBatchPredictionJobRequest {
53743    fn typename() -> &'static str {
53744        "type.googleapis.com/google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest"
53745    }
53746}
53747
53748/// Request message for
53749/// [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob].
53750///
53751/// [google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob]: crate::client::JobService::get_batch_prediction_job
53752#[cfg(feature = "job-service")]
53753#[derive(Clone, Default, PartialEq)]
53754#[non_exhaustive]
53755pub struct GetBatchPredictionJobRequest {
53756    /// Required. The name of the BatchPredictionJob resource.
53757    /// Format:
53758    /// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
53759    pub name: std::string::String,
53760
53761    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53762}
53763
53764#[cfg(feature = "job-service")]
53765impl GetBatchPredictionJobRequest {
53766    pub fn new() -> Self {
53767        std::default::Default::default()
53768    }
53769
53770    /// Sets the value of [name][crate::model::GetBatchPredictionJobRequest::name].
53771    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53772        self.name = v.into();
53773        self
53774    }
53775}
53776
53777#[cfg(feature = "job-service")]
53778impl wkt::message::Message for GetBatchPredictionJobRequest {
53779    fn typename() -> &'static str {
53780        "type.googleapis.com/google.cloud.aiplatform.v1.GetBatchPredictionJobRequest"
53781    }
53782}
53783
53784/// Request message for
53785/// [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs].
53786///
53787/// [google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs]: crate::client::JobService::list_batch_prediction_jobs
53788#[cfg(feature = "job-service")]
53789#[derive(Clone, Default, PartialEq)]
53790#[non_exhaustive]
53791pub struct ListBatchPredictionJobsRequest {
53792    /// Required. The resource name of the Location to list the BatchPredictionJobs
53793    /// from. Format: `projects/{project}/locations/{location}`
53794    pub parent: std::string::String,
53795
53796    /// The standard list filter.
53797    ///
53798    /// Supported fields:
53799    ///
53800    /// * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
53801    /// * `model_display_name` supports `=`, `!=` comparisons.
53802    /// * `state` supports `=`, `!=` comparisons.
53803    /// * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
53804    ///   `create_time` must be in RFC 3339 format.
53805    /// * `labels` supports general map functions that is:
53806    ///   `labels.key=value` - key:value equality
53807    ///   `labels.key:* - key existence
53808    ///
53809    /// Some examples of using the filter are:
53810    ///
53811    /// * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
53812    /// * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
53813    /// * `NOT display_name="my_job"`
53814    /// * `create_time>"2021-05-18T00:00:00Z"`
53815    /// * `labels.keyA=valueA`
53816    /// * `labels.keyB:*`
53817    pub filter: std::string::String,
53818
53819    /// The standard list page size.
53820    pub page_size: i32,
53821
53822    /// The standard list page token.
53823    /// Typically obtained via
53824    /// [ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token]
53825    /// of the previous
53826    /// [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs]
53827    /// call.
53828    ///
53829    /// [google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs]: crate::client::JobService::list_batch_prediction_jobs
53830    /// [google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token]: crate::model::ListBatchPredictionJobsResponse::next_page_token
53831    pub page_token: std::string::String,
53832
53833    /// Mask specifying which fields to read.
53834    pub read_mask: std::option::Option<wkt::FieldMask>,
53835
53836    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53837}
53838
53839#[cfg(feature = "job-service")]
53840impl ListBatchPredictionJobsRequest {
53841    pub fn new() -> Self {
53842        std::default::Default::default()
53843    }
53844
53845    /// Sets the value of [parent][crate::model::ListBatchPredictionJobsRequest::parent].
53846    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53847        self.parent = v.into();
53848        self
53849    }
53850
53851    /// Sets the value of [filter][crate::model::ListBatchPredictionJobsRequest::filter].
53852    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53853        self.filter = v.into();
53854        self
53855    }
53856
53857    /// Sets the value of [page_size][crate::model::ListBatchPredictionJobsRequest::page_size].
53858    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
53859        self.page_size = v.into();
53860        self
53861    }
53862
53863    /// Sets the value of [page_token][crate::model::ListBatchPredictionJobsRequest::page_token].
53864    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53865        self.page_token = v.into();
53866        self
53867    }
53868
53869    /// Sets the value of [read_mask][crate::model::ListBatchPredictionJobsRequest::read_mask].
53870    pub fn set_read_mask<T>(mut self, v: T) -> Self
53871    where
53872        T: std::convert::Into<wkt::FieldMask>,
53873    {
53874        self.read_mask = std::option::Option::Some(v.into());
53875        self
53876    }
53877
53878    /// Sets or clears the value of [read_mask][crate::model::ListBatchPredictionJobsRequest::read_mask].
53879    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
53880    where
53881        T: std::convert::Into<wkt::FieldMask>,
53882    {
53883        self.read_mask = v.map(|x| x.into());
53884        self
53885    }
53886}
53887
53888#[cfg(feature = "job-service")]
53889impl wkt::message::Message for ListBatchPredictionJobsRequest {
53890    fn typename() -> &'static str {
53891        "type.googleapis.com/google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest"
53892    }
53893}
53894
53895/// Response message for
53896/// [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs]
53897///
53898/// [google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs]: crate::client::JobService::list_batch_prediction_jobs
53899#[cfg(feature = "job-service")]
53900#[derive(Clone, Default, PartialEq)]
53901#[non_exhaustive]
53902pub struct ListBatchPredictionJobsResponse {
53903    /// List of BatchPredictionJobs in the requested page.
53904    pub batch_prediction_jobs: std::vec::Vec<crate::model::BatchPredictionJob>,
53905
53906    /// A token to retrieve the next page of results.
53907    /// Pass to
53908    /// [ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token]
53909    /// to obtain that page.
53910    ///
53911    /// [google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token]: crate::model::ListBatchPredictionJobsRequest::page_token
53912    pub next_page_token: std::string::String,
53913
53914    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53915}
53916
53917#[cfg(feature = "job-service")]
53918impl ListBatchPredictionJobsResponse {
53919    pub fn new() -> Self {
53920        std::default::Default::default()
53921    }
53922
53923    /// Sets the value of [batch_prediction_jobs][crate::model::ListBatchPredictionJobsResponse::batch_prediction_jobs].
53924    pub fn set_batch_prediction_jobs<T, V>(mut self, v: T) -> Self
53925    where
53926        T: std::iter::IntoIterator<Item = V>,
53927        V: std::convert::Into<crate::model::BatchPredictionJob>,
53928    {
53929        use std::iter::Iterator;
53930        self.batch_prediction_jobs = v.into_iter().map(|i| i.into()).collect();
53931        self
53932    }
53933
53934    /// Sets the value of [next_page_token][crate::model::ListBatchPredictionJobsResponse::next_page_token].
53935    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53936        self.next_page_token = v.into();
53937        self
53938    }
53939}
53940
53941#[cfg(feature = "job-service")]
53942impl wkt::message::Message for ListBatchPredictionJobsResponse {
53943    fn typename() -> &'static str {
53944        "type.googleapis.com/google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse"
53945    }
53946}
53947
53948#[cfg(feature = "job-service")]
53949#[doc(hidden)]
53950impl gax::paginator::internal::PageableResponse for ListBatchPredictionJobsResponse {
53951    type PageItem = crate::model::BatchPredictionJob;
53952
53953    fn items(self) -> std::vec::Vec<Self::PageItem> {
53954        self.batch_prediction_jobs
53955    }
53956
53957    fn next_page_token(&self) -> std::string::String {
53958        use std::clone::Clone;
53959        self.next_page_token.clone()
53960    }
53961}
53962
53963/// Request message for
53964/// [JobService.DeleteBatchPredictionJob][google.cloud.aiplatform.v1.JobService.DeleteBatchPredictionJob].
53965///
53966/// [google.cloud.aiplatform.v1.JobService.DeleteBatchPredictionJob]: crate::client::JobService::delete_batch_prediction_job
53967#[cfg(feature = "job-service")]
53968#[derive(Clone, Default, PartialEq)]
53969#[non_exhaustive]
53970pub struct DeleteBatchPredictionJobRequest {
53971    /// Required. The name of the BatchPredictionJob resource to be deleted.
53972    /// Format:
53973    /// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
53974    pub name: std::string::String,
53975
53976    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
53977}
53978
53979#[cfg(feature = "job-service")]
53980impl DeleteBatchPredictionJobRequest {
53981    pub fn new() -> Self {
53982        std::default::Default::default()
53983    }
53984
53985    /// Sets the value of [name][crate::model::DeleteBatchPredictionJobRequest::name].
53986    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
53987        self.name = v.into();
53988        self
53989    }
53990}
53991
53992#[cfg(feature = "job-service")]
53993impl wkt::message::Message for DeleteBatchPredictionJobRequest {
53994    fn typename() -> &'static str {
53995        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest"
53996    }
53997}
53998
53999/// Request message for
54000/// [JobService.CancelBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CancelBatchPredictionJob].
54001///
54002/// [google.cloud.aiplatform.v1.JobService.CancelBatchPredictionJob]: crate::client::JobService::cancel_batch_prediction_job
54003#[cfg(feature = "job-service")]
54004#[derive(Clone, Default, PartialEq)]
54005#[non_exhaustive]
54006pub struct CancelBatchPredictionJobRequest {
54007    /// Required. The name of the BatchPredictionJob to cancel.
54008    /// Format:
54009    /// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
54010    pub name: std::string::String,
54011
54012    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54013}
54014
54015#[cfg(feature = "job-service")]
54016impl CancelBatchPredictionJobRequest {
54017    pub fn new() -> Self {
54018        std::default::Default::default()
54019    }
54020
54021    /// Sets the value of [name][crate::model::CancelBatchPredictionJobRequest::name].
54022    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
54023        self.name = v.into();
54024        self
54025    }
54026}
54027
54028#[cfg(feature = "job-service")]
54029impl wkt::message::Message for CancelBatchPredictionJobRequest {
54030    fn typename() -> &'static str {
54031        "type.googleapis.com/google.cloud.aiplatform.v1.CancelBatchPredictionJobRequest"
54032    }
54033}
54034
54035/// Request message for
54036/// [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob].
54037///
54038/// [google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob]: crate::client::JobService::create_model_deployment_monitoring_job
54039#[cfg(feature = "job-service")]
54040#[derive(Clone, Default, PartialEq)]
54041#[non_exhaustive]
54042pub struct CreateModelDeploymentMonitoringJobRequest {
54043    /// Required. The parent of the ModelDeploymentMonitoringJob.
54044    /// Format: `projects/{project}/locations/{location}`
54045    pub parent: std::string::String,
54046
54047    /// Required. The ModelDeploymentMonitoringJob to create
54048    pub model_deployment_monitoring_job:
54049        std::option::Option<crate::model::ModelDeploymentMonitoringJob>,
54050
54051    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54052}
54053
54054#[cfg(feature = "job-service")]
54055impl CreateModelDeploymentMonitoringJobRequest {
54056    pub fn new() -> Self {
54057        std::default::Default::default()
54058    }
54059
54060    /// Sets the value of [parent][crate::model::CreateModelDeploymentMonitoringJobRequest::parent].
54061    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
54062        self.parent = v.into();
54063        self
54064    }
54065
54066    /// Sets the value of [model_deployment_monitoring_job][crate::model::CreateModelDeploymentMonitoringJobRequest::model_deployment_monitoring_job].
54067    pub fn set_model_deployment_monitoring_job<T>(mut self, v: T) -> Self
54068    where
54069        T: std::convert::Into<crate::model::ModelDeploymentMonitoringJob>,
54070    {
54071        self.model_deployment_monitoring_job = std::option::Option::Some(v.into());
54072        self
54073    }
54074
54075    /// Sets or clears the value of [model_deployment_monitoring_job][crate::model::CreateModelDeploymentMonitoringJobRequest::model_deployment_monitoring_job].
54076    pub fn set_or_clear_model_deployment_monitoring_job<T>(
54077        mut self,
54078        v: std::option::Option<T>,
54079    ) -> Self
54080    where
54081        T: std::convert::Into<crate::model::ModelDeploymentMonitoringJob>,
54082    {
54083        self.model_deployment_monitoring_job = v.map(|x| x.into());
54084        self
54085    }
54086}
54087
54088#[cfg(feature = "job-service")]
54089impl wkt::message::Message for CreateModelDeploymentMonitoringJobRequest {
54090    fn typename() -> &'static str {
54091        "type.googleapis.com/google.cloud.aiplatform.v1.CreateModelDeploymentMonitoringJobRequest"
54092    }
54093}
54094
54095/// Request message for
54096/// [JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies].
54097///
54098/// [google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies]: crate::client::JobService::search_model_deployment_monitoring_stats_anomalies
54099#[cfg(feature = "job-service")]
54100#[derive(Clone, Default, PartialEq)]
54101#[non_exhaustive]
54102pub struct SearchModelDeploymentMonitoringStatsAnomaliesRequest {
54103
54104    /// Required. ModelDeploymentMonitoring Job resource name.
54105    /// Format:
54106    /// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
54107    pub model_deployment_monitoring_job: std::string::String,
54108
54109    /// Required. The DeployedModel ID of the
54110    /// [ModelDeploymentMonitoringObjectiveConfig.deployed_model_id].
54111    pub deployed_model_id: std::string::String,
54112
54113    /// The feature display name. If specified, only return the stats belonging to
54114    /// this feature. Format:
54115    /// [ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.feature_display_name][google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.feature_display_name],
54116    /// example: "user_destination".
54117    ///
54118    /// [google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.feature_display_name]: crate::model::model_monitoring_stats_anomalies::FeatureHistoricStatsAnomalies::feature_display_name
54119    pub feature_display_name: std::string::String,
54120
54121    /// Required. Objectives of the stats to retrieve.
54122    pub objectives: std::vec::Vec<crate::model::search_model_deployment_monitoring_stats_anomalies_request::StatsAnomaliesObjective>,
54123
54124    /// The standard list page size.
54125    pub page_size: i32,
54126
54127    /// A page token received from a previous
54128    /// [JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies]
54129    /// call.
54130    ///
54131    /// [google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies]: crate::client::JobService::search_model_deployment_monitoring_stats_anomalies
54132    pub page_token: std::string::String,
54133
54134    /// The earliest timestamp of stats being generated.
54135    /// If not set, indicates fetching stats till the earliest possible one.
54136    pub start_time: std::option::Option<wkt::Timestamp>,
54137
54138    /// The latest timestamp of stats being generated.
54139    /// If not set, indicates feching stats till the latest possible one.
54140    pub end_time: std::option::Option<wkt::Timestamp>,
54141
54142    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54143}
54144
54145#[cfg(feature = "job-service")]
54146impl SearchModelDeploymentMonitoringStatsAnomaliesRequest {
54147    pub fn new() -> Self {
54148        std::default::Default::default()
54149    }
54150
54151    /// Sets the value of [model_deployment_monitoring_job][crate::model::SearchModelDeploymentMonitoringStatsAnomaliesRequest::model_deployment_monitoring_job].
54152    pub fn set_model_deployment_monitoring_job<T: std::convert::Into<std::string::String>>(
54153        mut self,
54154        v: T,
54155    ) -> Self {
54156        self.model_deployment_monitoring_job = v.into();
54157        self
54158    }
54159
54160    /// Sets the value of [deployed_model_id][crate::model::SearchModelDeploymentMonitoringStatsAnomaliesRequest::deployed_model_id].
54161    pub fn set_deployed_model_id<T: std::convert::Into<std::string::String>>(
54162        mut self,
54163        v: T,
54164    ) -> Self {
54165        self.deployed_model_id = v.into();
54166        self
54167    }
54168
54169    /// Sets the value of [feature_display_name][crate::model::SearchModelDeploymentMonitoringStatsAnomaliesRequest::feature_display_name].
54170    pub fn set_feature_display_name<T: std::convert::Into<std::string::String>>(
54171        mut self,
54172        v: T,
54173    ) -> Self {
54174        self.feature_display_name = v.into();
54175        self
54176    }
54177
54178    /// Sets the value of [objectives][crate::model::SearchModelDeploymentMonitoringStatsAnomaliesRequest::objectives].
54179    pub fn set_objectives<T, V>(mut self, v: T) -> Self
54180    where
54181        T: std::iter::IntoIterator<Item = V>,
54182        V: std::convert::Into<crate::model::search_model_deployment_monitoring_stats_anomalies_request::StatsAnomaliesObjective>
54183    {
54184        use std::iter::Iterator;
54185        self.objectives = v.into_iter().map(|i| i.into()).collect();
54186        self
54187    }
54188
54189    /// Sets the value of [page_size][crate::model::SearchModelDeploymentMonitoringStatsAnomaliesRequest::page_size].
54190    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
54191        self.page_size = v.into();
54192        self
54193    }
54194
54195    /// Sets the value of [page_token][crate::model::SearchModelDeploymentMonitoringStatsAnomaliesRequest::page_token].
54196    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
54197        self.page_token = v.into();
54198        self
54199    }
54200
54201    /// Sets the value of [start_time][crate::model::SearchModelDeploymentMonitoringStatsAnomaliesRequest::start_time].
54202    pub fn set_start_time<T>(mut self, v: T) -> Self
54203    where
54204        T: std::convert::Into<wkt::Timestamp>,
54205    {
54206        self.start_time = std::option::Option::Some(v.into());
54207        self
54208    }
54209
54210    /// Sets or clears the value of [start_time][crate::model::SearchModelDeploymentMonitoringStatsAnomaliesRequest::start_time].
54211    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
54212    where
54213        T: std::convert::Into<wkt::Timestamp>,
54214    {
54215        self.start_time = v.map(|x| x.into());
54216        self
54217    }
54218
54219    /// Sets the value of [end_time][crate::model::SearchModelDeploymentMonitoringStatsAnomaliesRequest::end_time].
54220    pub fn set_end_time<T>(mut self, v: T) -> Self
54221    where
54222        T: std::convert::Into<wkt::Timestamp>,
54223    {
54224        self.end_time = std::option::Option::Some(v.into());
54225        self
54226    }
54227
54228    /// Sets or clears the value of [end_time][crate::model::SearchModelDeploymentMonitoringStatsAnomaliesRequest::end_time].
54229    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
54230    where
54231        T: std::convert::Into<wkt::Timestamp>,
54232    {
54233        self.end_time = v.map(|x| x.into());
54234        self
54235    }
54236}
54237
54238#[cfg(feature = "job-service")]
54239impl wkt::message::Message for SearchModelDeploymentMonitoringStatsAnomaliesRequest {
54240    fn typename() -> &'static str {
54241        "type.googleapis.com/google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest"
54242    }
54243}
54244
54245/// Defines additional types related to [SearchModelDeploymentMonitoringStatsAnomaliesRequest].
54246#[cfg(feature = "job-service")]
54247pub mod search_model_deployment_monitoring_stats_anomalies_request {
54248    #[allow(unused_imports)]
54249    use super::*;
54250
54251    /// Stats requested for specific objective.
54252    #[cfg(feature = "job-service")]
54253    #[derive(Clone, Default, PartialEq)]
54254    #[non_exhaustive]
54255    pub struct StatsAnomaliesObjective {
54256        pub r#type: crate::model::ModelDeploymentMonitoringObjectiveType,
54257
54258        /// If set, all attribution scores between
54259        /// [SearchModelDeploymentMonitoringStatsAnomaliesRequest.start_time][google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest.start_time]
54260        /// and
54261        /// [SearchModelDeploymentMonitoringStatsAnomaliesRequest.end_time][google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest.end_time]
54262        /// are fetched, and page token doesn't take effect in this case. Only used
54263        /// to retrieve attribution score for the top Features which has the highest
54264        /// attribution score in the latest monitoring run.
54265        ///
54266        /// [google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest.end_time]: crate::model::SearchModelDeploymentMonitoringStatsAnomaliesRequest::end_time
54267        /// [google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest.start_time]: crate::model::SearchModelDeploymentMonitoringStatsAnomaliesRequest::start_time
54268        pub top_feature_count: i32,
54269
54270        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54271    }
54272
54273    #[cfg(feature = "job-service")]
54274    impl StatsAnomaliesObjective {
54275        pub fn new() -> Self {
54276            std::default::Default::default()
54277        }
54278
54279        /// Sets the value of [r#type][crate::model::search_model_deployment_monitoring_stats_anomalies_request::StatsAnomaliesObjective::type].
54280        pub fn set_type<
54281            T: std::convert::Into<crate::model::ModelDeploymentMonitoringObjectiveType>,
54282        >(
54283            mut self,
54284            v: T,
54285        ) -> Self {
54286            self.r#type = v.into();
54287            self
54288        }
54289
54290        /// Sets the value of [top_feature_count][crate::model::search_model_deployment_monitoring_stats_anomalies_request::StatsAnomaliesObjective::top_feature_count].
54291        pub fn set_top_feature_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
54292            self.top_feature_count = v.into();
54293            self
54294        }
54295    }
54296
54297    #[cfg(feature = "job-service")]
54298    impl wkt::message::Message for StatsAnomaliesObjective {
54299        fn typename() -> &'static str {
54300            "type.googleapis.com/google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest.StatsAnomaliesObjective"
54301        }
54302    }
54303}
54304
54305/// Response message for
54306/// [JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies].
54307///
54308/// [google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies]: crate::client::JobService::search_model_deployment_monitoring_stats_anomalies
54309#[cfg(feature = "job-service")]
54310#[derive(Clone, Default, PartialEq)]
54311#[non_exhaustive]
54312pub struct SearchModelDeploymentMonitoringStatsAnomaliesResponse {
54313    /// Stats retrieved for requested objectives.
54314    /// There are at most 1000
54315    /// [ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.prediction_stats][google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.prediction_stats]
54316    /// in the response.
54317    ///
54318    /// [google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.prediction_stats]: crate::model::model_monitoring_stats_anomalies::FeatureHistoricStatsAnomalies::prediction_stats
54319    pub monitoring_stats: std::vec::Vec<crate::model::ModelMonitoringStatsAnomalies>,
54320
54321    /// The page token that can be used by the next
54322    /// [JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies]
54323    /// call.
54324    ///
54325    /// [google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies]: crate::client::JobService::search_model_deployment_monitoring_stats_anomalies
54326    pub next_page_token: std::string::String,
54327
54328    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54329}
54330
54331#[cfg(feature = "job-service")]
54332impl SearchModelDeploymentMonitoringStatsAnomaliesResponse {
54333    pub fn new() -> Self {
54334        std::default::Default::default()
54335    }
54336
54337    /// Sets the value of [monitoring_stats][crate::model::SearchModelDeploymentMonitoringStatsAnomaliesResponse::monitoring_stats].
54338    pub fn set_monitoring_stats<T, V>(mut self, v: T) -> Self
54339    where
54340        T: std::iter::IntoIterator<Item = V>,
54341        V: std::convert::Into<crate::model::ModelMonitoringStatsAnomalies>,
54342    {
54343        use std::iter::Iterator;
54344        self.monitoring_stats = v.into_iter().map(|i| i.into()).collect();
54345        self
54346    }
54347
54348    /// Sets the value of [next_page_token][crate::model::SearchModelDeploymentMonitoringStatsAnomaliesResponse::next_page_token].
54349    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
54350        self.next_page_token = v.into();
54351        self
54352    }
54353}
54354
54355#[cfg(feature = "job-service")]
54356impl wkt::message::Message for SearchModelDeploymentMonitoringStatsAnomaliesResponse {
54357    fn typename() -> &'static str {
54358        "type.googleapis.com/google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesResponse"
54359    }
54360}
54361
54362#[cfg(feature = "job-service")]
54363#[doc(hidden)]
54364impl gax::paginator::internal::PageableResponse
54365    for SearchModelDeploymentMonitoringStatsAnomaliesResponse
54366{
54367    type PageItem = crate::model::ModelMonitoringStatsAnomalies;
54368
54369    fn items(self) -> std::vec::Vec<Self::PageItem> {
54370        self.monitoring_stats
54371    }
54372
54373    fn next_page_token(&self) -> std::string::String {
54374        use std::clone::Clone;
54375        self.next_page_token.clone()
54376    }
54377}
54378
54379/// Request message for
54380/// [JobService.GetModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.GetModelDeploymentMonitoringJob].
54381///
54382/// [google.cloud.aiplatform.v1.JobService.GetModelDeploymentMonitoringJob]: crate::client::JobService::get_model_deployment_monitoring_job
54383#[cfg(feature = "job-service")]
54384#[derive(Clone, Default, PartialEq)]
54385#[non_exhaustive]
54386pub struct GetModelDeploymentMonitoringJobRequest {
54387    /// Required. The resource name of the ModelDeploymentMonitoringJob.
54388    /// Format:
54389    /// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
54390    pub name: std::string::String,
54391
54392    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54393}
54394
54395#[cfg(feature = "job-service")]
54396impl GetModelDeploymentMonitoringJobRequest {
54397    pub fn new() -> Self {
54398        std::default::Default::default()
54399    }
54400
54401    /// Sets the value of [name][crate::model::GetModelDeploymentMonitoringJobRequest::name].
54402    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
54403        self.name = v.into();
54404        self
54405    }
54406}
54407
54408#[cfg(feature = "job-service")]
54409impl wkt::message::Message for GetModelDeploymentMonitoringJobRequest {
54410    fn typename() -> &'static str {
54411        "type.googleapis.com/google.cloud.aiplatform.v1.GetModelDeploymentMonitoringJobRequest"
54412    }
54413}
54414
54415/// Request message for
54416/// [JobService.ListModelDeploymentMonitoringJobs][google.cloud.aiplatform.v1.JobService.ListModelDeploymentMonitoringJobs].
54417///
54418/// [google.cloud.aiplatform.v1.JobService.ListModelDeploymentMonitoringJobs]: crate::client::JobService::list_model_deployment_monitoring_jobs
54419#[cfg(feature = "job-service")]
54420#[derive(Clone, Default, PartialEq)]
54421#[non_exhaustive]
54422pub struct ListModelDeploymentMonitoringJobsRequest {
54423    /// Required. The parent of the ModelDeploymentMonitoringJob.
54424    /// Format: `projects/{project}/locations/{location}`
54425    pub parent: std::string::String,
54426
54427    /// The standard list filter.
54428    ///
54429    /// Supported fields:
54430    ///
54431    /// * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
54432    /// * `state` supports `=`, `!=` comparisons.
54433    /// * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
54434    ///   `create_time` must be in RFC 3339 format.
54435    /// * `labels` supports general map functions that is:
54436    ///   `labels.key=value` - key:value equality
54437    ///   `labels.key:* - key existence
54438    ///
54439    /// Some examples of using the filter are:
54440    ///
54441    /// * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
54442    /// * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
54443    /// * `NOT display_name="my_job"`
54444    /// * `create_time>"2021-05-18T00:00:00Z"`
54445    /// * `labels.keyA=valueA`
54446    /// * `labels.keyB:*`
54447    pub filter: std::string::String,
54448
54449    /// The standard list page size.
54450    pub page_size: i32,
54451
54452    /// The standard list page token.
54453    pub page_token: std::string::String,
54454
54455    /// Mask specifying which fields to read
54456    pub read_mask: std::option::Option<wkt::FieldMask>,
54457
54458    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54459}
54460
54461#[cfg(feature = "job-service")]
54462impl ListModelDeploymentMonitoringJobsRequest {
54463    pub fn new() -> Self {
54464        std::default::Default::default()
54465    }
54466
54467    /// Sets the value of [parent][crate::model::ListModelDeploymentMonitoringJobsRequest::parent].
54468    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
54469        self.parent = v.into();
54470        self
54471    }
54472
54473    /// Sets the value of [filter][crate::model::ListModelDeploymentMonitoringJobsRequest::filter].
54474    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
54475        self.filter = v.into();
54476        self
54477    }
54478
54479    /// Sets the value of [page_size][crate::model::ListModelDeploymentMonitoringJobsRequest::page_size].
54480    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
54481        self.page_size = v.into();
54482        self
54483    }
54484
54485    /// Sets the value of [page_token][crate::model::ListModelDeploymentMonitoringJobsRequest::page_token].
54486    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
54487        self.page_token = v.into();
54488        self
54489    }
54490
54491    /// Sets the value of [read_mask][crate::model::ListModelDeploymentMonitoringJobsRequest::read_mask].
54492    pub fn set_read_mask<T>(mut self, v: T) -> Self
54493    where
54494        T: std::convert::Into<wkt::FieldMask>,
54495    {
54496        self.read_mask = std::option::Option::Some(v.into());
54497        self
54498    }
54499
54500    /// Sets or clears the value of [read_mask][crate::model::ListModelDeploymentMonitoringJobsRequest::read_mask].
54501    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
54502    where
54503        T: std::convert::Into<wkt::FieldMask>,
54504    {
54505        self.read_mask = v.map(|x| x.into());
54506        self
54507    }
54508}
54509
54510#[cfg(feature = "job-service")]
54511impl wkt::message::Message for ListModelDeploymentMonitoringJobsRequest {
54512    fn typename() -> &'static str {
54513        "type.googleapis.com/google.cloud.aiplatform.v1.ListModelDeploymentMonitoringJobsRequest"
54514    }
54515}
54516
54517/// Response message for
54518/// [JobService.ListModelDeploymentMonitoringJobs][google.cloud.aiplatform.v1.JobService.ListModelDeploymentMonitoringJobs].
54519///
54520/// [google.cloud.aiplatform.v1.JobService.ListModelDeploymentMonitoringJobs]: crate::client::JobService::list_model_deployment_monitoring_jobs
54521#[cfg(feature = "job-service")]
54522#[derive(Clone, Default, PartialEq)]
54523#[non_exhaustive]
54524pub struct ListModelDeploymentMonitoringJobsResponse {
54525    /// A list of ModelDeploymentMonitoringJobs that matches the specified filter
54526    /// in the request.
54527    pub model_deployment_monitoring_jobs: std::vec::Vec<crate::model::ModelDeploymentMonitoringJob>,
54528
54529    /// The standard List next-page token.
54530    pub next_page_token: std::string::String,
54531
54532    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54533}
54534
54535#[cfg(feature = "job-service")]
54536impl ListModelDeploymentMonitoringJobsResponse {
54537    pub fn new() -> Self {
54538        std::default::Default::default()
54539    }
54540
54541    /// Sets the value of [model_deployment_monitoring_jobs][crate::model::ListModelDeploymentMonitoringJobsResponse::model_deployment_monitoring_jobs].
54542    pub fn set_model_deployment_monitoring_jobs<T, V>(mut self, v: T) -> Self
54543    where
54544        T: std::iter::IntoIterator<Item = V>,
54545        V: std::convert::Into<crate::model::ModelDeploymentMonitoringJob>,
54546    {
54547        use std::iter::Iterator;
54548        self.model_deployment_monitoring_jobs = v.into_iter().map(|i| i.into()).collect();
54549        self
54550    }
54551
54552    /// Sets the value of [next_page_token][crate::model::ListModelDeploymentMonitoringJobsResponse::next_page_token].
54553    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
54554        self.next_page_token = v.into();
54555        self
54556    }
54557}
54558
54559#[cfg(feature = "job-service")]
54560impl wkt::message::Message for ListModelDeploymentMonitoringJobsResponse {
54561    fn typename() -> &'static str {
54562        "type.googleapis.com/google.cloud.aiplatform.v1.ListModelDeploymentMonitoringJobsResponse"
54563    }
54564}
54565
54566#[cfg(feature = "job-service")]
54567#[doc(hidden)]
54568impl gax::paginator::internal::PageableResponse for ListModelDeploymentMonitoringJobsResponse {
54569    type PageItem = crate::model::ModelDeploymentMonitoringJob;
54570
54571    fn items(self) -> std::vec::Vec<Self::PageItem> {
54572        self.model_deployment_monitoring_jobs
54573    }
54574
54575    fn next_page_token(&self) -> std::string::String {
54576        use std::clone::Clone;
54577        self.next_page_token.clone()
54578    }
54579}
54580
54581/// Request message for
54582/// [JobService.UpdateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.UpdateModelDeploymentMonitoringJob].
54583///
54584/// [google.cloud.aiplatform.v1.JobService.UpdateModelDeploymentMonitoringJob]: crate::client::JobService::update_model_deployment_monitoring_job
54585#[cfg(feature = "job-service")]
54586#[derive(Clone, Default, PartialEq)]
54587#[non_exhaustive]
54588pub struct UpdateModelDeploymentMonitoringJobRequest {
54589    /// Required. The model monitoring configuration which replaces the resource on
54590    /// the server.
54591    pub model_deployment_monitoring_job:
54592        std::option::Option<crate::model::ModelDeploymentMonitoringJob>,
54593
54594    /// Required. The update mask is used to specify the fields to be overwritten
54595    /// in the ModelDeploymentMonitoringJob resource by the update. The fields
54596    /// specified in the update_mask are relative to the resource, not the full
54597    /// request. A field will be overwritten if it is in the mask. If the user does
54598    /// not provide a mask then only the non-empty fields present in the request
54599    /// will be overwritten. Set the update_mask to `*` to override all fields. For
54600    /// the objective config, the user can either provide the update mask for
54601    /// model_deployment_monitoring_objective_configs or any combination of its
54602    /// nested fields, such as:
54603    /// model_deployment_monitoring_objective_configs.objective_config.training_dataset.
54604    ///
54605    /// Updatable fields:
54606    ///
54607    /// * `display_name`
54608    /// * `model_deployment_monitoring_schedule_config`
54609    /// * `model_monitoring_alert_config`
54610    /// * `logging_sampling_strategy`
54611    /// * `labels`
54612    /// * `log_ttl`
54613    /// * `enable_monitoring_pipeline_logs`
54614    ///   .  and
54615    /// * `model_deployment_monitoring_objective_configs`
54616    ///   .  or
54617    /// * `model_deployment_monitoring_objective_configs.objective_config.training_dataset`
54618    /// * `model_deployment_monitoring_objective_configs.objective_config.training_prediction_skew_detection_config`
54619    /// * `model_deployment_monitoring_objective_configs.objective_config.prediction_drift_detection_config`
54620    pub update_mask: std::option::Option<wkt::FieldMask>,
54621
54622    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54623}
54624
54625#[cfg(feature = "job-service")]
54626impl UpdateModelDeploymentMonitoringJobRequest {
54627    pub fn new() -> Self {
54628        std::default::Default::default()
54629    }
54630
54631    /// Sets the value of [model_deployment_monitoring_job][crate::model::UpdateModelDeploymentMonitoringJobRequest::model_deployment_monitoring_job].
54632    pub fn set_model_deployment_monitoring_job<T>(mut self, v: T) -> Self
54633    where
54634        T: std::convert::Into<crate::model::ModelDeploymentMonitoringJob>,
54635    {
54636        self.model_deployment_monitoring_job = std::option::Option::Some(v.into());
54637        self
54638    }
54639
54640    /// Sets or clears the value of [model_deployment_monitoring_job][crate::model::UpdateModelDeploymentMonitoringJobRequest::model_deployment_monitoring_job].
54641    pub fn set_or_clear_model_deployment_monitoring_job<T>(
54642        mut self,
54643        v: std::option::Option<T>,
54644    ) -> Self
54645    where
54646        T: std::convert::Into<crate::model::ModelDeploymentMonitoringJob>,
54647    {
54648        self.model_deployment_monitoring_job = v.map(|x| x.into());
54649        self
54650    }
54651
54652    /// Sets the value of [update_mask][crate::model::UpdateModelDeploymentMonitoringJobRequest::update_mask].
54653    pub fn set_update_mask<T>(mut self, v: T) -> Self
54654    where
54655        T: std::convert::Into<wkt::FieldMask>,
54656    {
54657        self.update_mask = std::option::Option::Some(v.into());
54658        self
54659    }
54660
54661    /// Sets or clears the value of [update_mask][crate::model::UpdateModelDeploymentMonitoringJobRequest::update_mask].
54662    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
54663    where
54664        T: std::convert::Into<wkt::FieldMask>,
54665    {
54666        self.update_mask = v.map(|x| x.into());
54667        self
54668    }
54669}
54670
54671#[cfg(feature = "job-service")]
54672impl wkt::message::Message for UpdateModelDeploymentMonitoringJobRequest {
54673    fn typename() -> &'static str {
54674        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateModelDeploymentMonitoringJobRequest"
54675    }
54676}
54677
54678/// Request message for
54679/// [JobService.DeleteModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.DeleteModelDeploymentMonitoringJob].
54680///
54681/// [google.cloud.aiplatform.v1.JobService.DeleteModelDeploymentMonitoringJob]: crate::client::JobService::delete_model_deployment_monitoring_job
54682#[cfg(feature = "job-service")]
54683#[derive(Clone, Default, PartialEq)]
54684#[non_exhaustive]
54685pub struct DeleteModelDeploymentMonitoringJobRequest {
54686    /// Required. The resource name of the model monitoring job to delete.
54687    /// Format:
54688    /// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
54689    pub name: std::string::String,
54690
54691    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54692}
54693
54694#[cfg(feature = "job-service")]
54695impl DeleteModelDeploymentMonitoringJobRequest {
54696    pub fn new() -> Self {
54697        std::default::Default::default()
54698    }
54699
54700    /// Sets the value of [name][crate::model::DeleteModelDeploymentMonitoringJobRequest::name].
54701    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
54702        self.name = v.into();
54703        self
54704    }
54705}
54706
54707#[cfg(feature = "job-service")]
54708impl wkt::message::Message for DeleteModelDeploymentMonitoringJobRequest {
54709    fn typename() -> &'static str {
54710        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteModelDeploymentMonitoringJobRequest"
54711    }
54712}
54713
54714/// Request message for
54715/// [JobService.PauseModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.PauseModelDeploymentMonitoringJob].
54716///
54717/// [google.cloud.aiplatform.v1.JobService.PauseModelDeploymentMonitoringJob]: crate::client::JobService::pause_model_deployment_monitoring_job
54718#[cfg(feature = "job-service")]
54719#[derive(Clone, Default, PartialEq)]
54720#[non_exhaustive]
54721pub struct PauseModelDeploymentMonitoringJobRequest {
54722    /// Required. The resource name of the ModelDeploymentMonitoringJob to pause.
54723    /// Format:
54724    /// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
54725    pub name: std::string::String,
54726
54727    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54728}
54729
54730#[cfg(feature = "job-service")]
54731impl PauseModelDeploymentMonitoringJobRequest {
54732    pub fn new() -> Self {
54733        std::default::Default::default()
54734    }
54735
54736    /// Sets the value of [name][crate::model::PauseModelDeploymentMonitoringJobRequest::name].
54737    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
54738        self.name = v.into();
54739        self
54740    }
54741}
54742
54743#[cfg(feature = "job-service")]
54744impl wkt::message::Message for PauseModelDeploymentMonitoringJobRequest {
54745    fn typename() -> &'static str {
54746        "type.googleapis.com/google.cloud.aiplatform.v1.PauseModelDeploymentMonitoringJobRequest"
54747    }
54748}
54749
54750/// Request message for
54751/// [JobService.ResumeModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.ResumeModelDeploymentMonitoringJob].
54752///
54753/// [google.cloud.aiplatform.v1.JobService.ResumeModelDeploymentMonitoringJob]: crate::client::JobService::resume_model_deployment_monitoring_job
54754#[cfg(feature = "job-service")]
54755#[derive(Clone, Default, PartialEq)]
54756#[non_exhaustive]
54757pub struct ResumeModelDeploymentMonitoringJobRequest {
54758    /// Required. The resource name of the ModelDeploymentMonitoringJob to resume.
54759    /// Format:
54760    /// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
54761    pub name: std::string::String,
54762
54763    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54764}
54765
54766#[cfg(feature = "job-service")]
54767impl ResumeModelDeploymentMonitoringJobRequest {
54768    pub fn new() -> Self {
54769        std::default::Default::default()
54770    }
54771
54772    /// Sets the value of [name][crate::model::ResumeModelDeploymentMonitoringJobRequest::name].
54773    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
54774        self.name = v.into();
54775        self
54776    }
54777}
54778
54779#[cfg(feature = "job-service")]
54780impl wkt::message::Message for ResumeModelDeploymentMonitoringJobRequest {
54781    fn typename() -> &'static str {
54782        "type.googleapis.com/google.cloud.aiplatform.v1.ResumeModelDeploymentMonitoringJobRequest"
54783    }
54784}
54785
54786/// Runtime operation information for
54787/// [JobService.UpdateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.UpdateModelDeploymentMonitoringJob].
54788///
54789/// [google.cloud.aiplatform.v1.JobService.UpdateModelDeploymentMonitoringJob]: crate::client::JobService::update_model_deployment_monitoring_job
54790#[cfg(feature = "job-service")]
54791#[derive(Clone, Default, PartialEq)]
54792#[non_exhaustive]
54793pub struct UpdateModelDeploymentMonitoringJobOperationMetadata {
54794    /// The operation generic information.
54795    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
54796
54797    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54798}
54799
54800#[cfg(feature = "job-service")]
54801impl UpdateModelDeploymentMonitoringJobOperationMetadata {
54802    pub fn new() -> Self {
54803        std::default::Default::default()
54804    }
54805
54806    /// Sets the value of [generic_metadata][crate::model::UpdateModelDeploymentMonitoringJobOperationMetadata::generic_metadata].
54807    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
54808    where
54809        T: std::convert::Into<crate::model::GenericOperationMetadata>,
54810    {
54811        self.generic_metadata = std::option::Option::Some(v.into());
54812        self
54813    }
54814
54815    /// Sets or clears the value of [generic_metadata][crate::model::UpdateModelDeploymentMonitoringJobOperationMetadata::generic_metadata].
54816    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
54817    where
54818        T: std::convert::Into<crate::model::GenericOperationMetadata>,
54819    {
54820        self.generic_metadata = v.map(|x| x.into());
54821        self
54822    }
54823}
54824
54825#[cfg(feature = "job-service")]
54826impl wkt::message::Message for UpdateModelDeploymentMonitoringJobOperationMetadata {
54827    fn typename() -> &'static str {
54828        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateModelDeploymentMonitoringJobOperationMetadata"
54829    }
54830}
54831
54832/// A subgraph of the overall lineage graph. Event edges connect Artifact and
54833/// Execution nodes.
54834#[cfg(feature = "metadata-service")]
54835#[derive(Clone, Default, PartialEq)]
54836#[non_exhaustive]
54837pub struct LineageSubgraph {
54838    /// The Artifact nodes in the subgraph.
54839    pub artifacts: std::vec::Vec<crate::model::Artifact>,
54840
54841    /// The Execution nodes in the subgraph.
54842    pub executions: std::vec::Vec<crate::model::Execution>,
54843
54844    /// The Event edges between Artifacts and Executions in the subgraph.
54845    pub events: std::vec::Vec<crate::model::Event>,
54846
54847    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54848}
54849
54850#[cfg(feature = "metadata-service")]
54851impl LineageSubgraph {
54852    pub fn new() -> Self {
54853        std::default::Default::default()
54854    }
54855
54856    /// Sets the value of [artifacts][crate::model::LineageSubgraph::artifacts].
54857    pub fn set_artifacts<T, V>(mut self, v: T) -> Self
54858    where
54859        T: std::iter::IntoIterator<Item = V>,
54860        V: std::convert::Into<crate::model::Artifact>,
54861    {
54862        use std::iter::Iterator;
54863        self.artifacts = v.into_iter().map(|i| i.into()).collect();
54864        self
54865    }
54866
54867    /// Sets the value of [executions][crate::model::LineageSubgraph::executions].
54868    pub fn set_executions<T, V>(mut self, v: T) -> Self
54869    where
54870        T: std::iter::IntoIterator<Item = V>,
54871        V: std::convert::Into<crate::model::Execution>,
54872    {
54873        use std::iter::Iterator;
54874        self.executions = v.into_iter().map(|i| i.into()).collect();
54875        self
54876    }
54877
54878    /// Sets the value of [events][crate::model::LineageSubgraph::events].
54879    pub fn set_events<T, V>(mut self, v: T) -> Self
54880    where
54881        T: std::iter::IntoIterator<Item = V>,
54882        V: std::convert::Into<crate::model::Event>,
54883    {
54884        use std::iter::Iterator;
54885        self.events = v.into_iter().map(|i| i.into()).collect();
54886        self
54887    }
54888}
54889
54890#[cfg(feature = "metadata-service")]
54891impl wkt::message::Message for LineageSubgraph {
54892    fn typename() -> &'static str {
54893        "type.googleapis.com/google.cloud.aiplatform.v1.LineageSubgraph"
54894    }
54895}
54896
54897/// Request message for ComputeTokens RPC call.
54898#[cfg(feature = "llm-utility-service")]
54899#[derive(Clone, Default, PartialEq)]
54900#[non_exhaustive]
54901pub struct ComputeTokensRequest {
54902    /// Required. The name of the Endpoint requested to get lists of tokens and
54903    /// token ids.
54904    pub endpoint: std::string::String,
54905
54906    /// Optional. The instances that are the input to token computing API call.
54907    /// Schema is identical to the prediction schema of the text model, even for
54908    /// the non-text models, like chat models, or Codey models.
54909    pub instances: std::vec::Vec<wkt::Value>,
54910
54911    /// Optional. The name of the publisher model requested to serve the
54912    /// prediction. Format:
54913    /// projects/{project}/locations/{location}/publishers/*/models/*
54914    pub model: std::string::String,
54915
54916    /// Optional. Input content.
54917    pub contents: std::vec::Vec<crate::model::Content>,
54918
54919    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54920}
54921
54922#[cfg(feature = "llm-utility-service")]
54923impl ComputeTokensRequest {
54924    pub fn new() -> Self {
54925        std::default::Default::default()
54926    }
54927
54928    /// Sets the value of [endpoint][crate::model::ComputeTokensRequest::endpoint].
54929    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
54930        self.endpoint = v.into();
54931        self
54932    }
54933
54934    /// Sets the value of [instances][crate::model::ComputeTokensRequest::instances].
54935    pub fn set_instances<T, V>(mut self, v: T) -> Self
54936    where
54937        T: std::iter::IntoIterator<Item = V>,
54938        V: std::convert::Into<wkt::Value>,
54939    {
54940        use std::iter::Iterator;
54941        self.instances = v.into_iter().map(|i| i.into()).collect();
54942        self
54943    }
54944
54945    /// Sets the value of [model][crate::model::ComputeTokensRequest::model].
54946    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
54947        self.model = v.into();
54948        self
54949    }
54950
54951    /// Sets the value of [contents][crate::model::ComputeTokensRequest::contents].
54952    pub fn set_contents<T, V>(mut self, v: T) -> Self
54953    where
54954        T: std::iter::IntoIterator<Item = V>,
54955        V: std::convert::Into<crate::model::Content>,
54956    {
54957        use std::iter::Iterator;
54958        self.contents = v.into_iter().map(|i| i.into()).collect();
54959        self
54960    }
54961}
54962
54963#[cfg(feature = "llm-utility-service")]
54964impl wkt::message::Message for ComputeTokensRequest {
54965    fn typename() -> &'static str {
54966        "type.googleapis.com/google.cloud.aiplatform.v1.ComputeTokensRequest"
54967    }
54968}
54969
54970/// Tokens info with a list of tokens and the corresponding list of token ids.
54971#[cfg(feature = "llm-utility-service")]
54972#[derive(Clone, Default, PartialEq)]
54973#[non_exhaustive]
54974pub struct TokensInfo {
54975    /// A list of tokens from the input.
54976    pub tokens: std::vec::Vec<::bytes::Bytes>,
54977
54978    /// A list of token ids from the input.
54979    pub token_ids: std::vec::Vec<i64>,
54980
54981    /// Optional. Optional fields for the role from the corresponding Content.
54982    pub role: std::string::String,
54983
54984    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
54985}
54986
54987#[cfg(feature = "llm-utility-service")]
54988impl TokensInfo {
54989    pub fn new() -> Self {
54990        std::default::Default::default()
54991    }
54992
54993    /// Sets the value of [tokens][crate::model::TokensInfo::tokens].
54994    pub fn set_tokens<T, V>(mut self, v: T) -> Self
54995    where
54996        T: std::iter::IntoIterator<Item = V>,
54997        V: std::convert::Into<::bytes::Bytes>,
54998    {
54999        use std::iter::Iterator;
55000        self.tokens = v.into_iter().map(|i| i.into()).collect();
55001        self
55002    }
55003
55004    /// Sets the value of [token_ids][crate::model::TokensInfo::token_ids].
55005    pub fn set_token_ids<T, V>(mut self, v: T) -> Self
55006    where
55007        T: std::iter::IntoIterator<Item = V>,
55008        V: std::convert::Into<i64>,
55009    {
55010        use std::iter::Iterator;
55011        self.token_ids = v.into_iter().map(|i| i.into()).collect();
55012        self
55013    }
55014
55015    /// Sets the value of [role][crate::model::TokensInfo::role].
55016    pub fn set_role<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
55017        self.role = v.into();
55018        self
55019    }
55020}
55021
55022#[cfg(feature = "llm-utility-service")]
55023impl wkt::message::Message for TokensInfo {
55024    fn typename() -> &'static str {
55025        "type.googleapis.com/google.cloud.aiplatform.v1.TokensInfo"
55026    }
55027}
55028
55029/// Response message for ComputeTokens RPC call.
55030#[cfg(feature = "llm-utility-service")]
55031#[derive(Clone, Default, PartialEq)]
55032#[non_exhaustive]
55033pub struct ComputeTokensResponse {
55034    /// Lists of tokens info from the input. A ComputeTokensRequest could have
55035    /// multiple instances with a prompt in each instance. We also need to return
55036    /// lists of tokens info for the request with multiple instances.
55037    pub tokens_info: std::vec::Vec<crate::model::TokensInfo>,
55038
55039    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
55040}
55041
55042#[cfg(feature = "llm-utility-service")]
55043impl ComputeTokensResponse {
55044    pub fn new() -> Self {
55045        std::default::Default::default()
55046    }
55047
55048    /// Sets the value of [tokens_info][crate::model::ComputeTokensResponse::tokens_info].
55049    pub fn set_tokens_info<T, V>(mut self, v: T) -> Self
55050    where
55051        T: std::iter::IntoIterator<Item = V>,
55052        V: std::convert::Into<crate::model::TokensInfo>,
55053    {
55054        use std::iter::Iterator;
55055        self.tokens_info = v.into_iter().map(|i| i.into()).collect();
55056        self
55057    }
55058}
55059
55060#[cfg(feature = "llm-utility-service")]
55061impl wkt::message::Message for ComputeTokensResponse {
55062    fn typename() -> &'static str {
55063        "type.googleapis.com/google.cloud.aiplatform.v1.ComputeTokensResponse"
55064    }
55065}
55066
55067/// Specification of a single machine.
55068#[cfg(any(
55069    feature = "deployment-resource-pool-service",
55070    feature = "endpoint-service",
55071    feature = "index-endpoint-service",
55072    feature = "job-service",
55073    feature = "model-garden-service",
55074    feature = "notebook-service",
55075    feature = "persistent-resource-service",
55076    feature = "schedule-service",
55077))]
55078#[derive(Clone, Default, PartialEq)]
55079#[non_exhaustive]
55080pub struct MachineSpec {
55081    /// Immutable. The type of the machine.
55082    ///
55083    /// See the [list of machine types supported for
55084    /// prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
55085    ///
55086    /// See the [list of machine types supported for custom
55087    /// training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
55088    ///
55089    /// For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is
55090    /// optional, and the default value is `n1-standard-2`. For
55091    /// [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as
55092    /// part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this
55093    /// field is required.
55094    ///
55095    /// [google.cloud.aiplatform.v1.BatchPredictionJob]: crate::model::BatchPredictionJob
55096    /// [google.cloud.aiplatform.v1.DeployedModel]: crate::model::DeployedModel
55097    /// [google.cloud.aiplatform.v1.WorkerPoolSpec]: crate::model::WorkerPoolSpec
55098    pub machine_type: std::string::String,
55099
55100    /// Immutable. The type of accelerator(s) that may be attached to the machine
55101    /// as per
55102    /// [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
55103    ///
55104    /// [google.cloud.aiplatform.v1.MachineSpec.accelerator_count]: crate::model::MachineSpec::accelerator_count
55105    pub accelerator_type: crate::model::AcceleratorType,
55106
55107    /// The number of accelerators to attach to the machine.
55108    pub accelerator_count: i32,
55109
55110    /// Immutable. The topology of the TPUs. Corresponds to the TPU topologies
55111    /// available from GKE. (Example: tpu_topology: "2x2x1").
55112    pub tpu_topology: std::string::String,
55113
55114    /// Optional. Immutable. Configuration controlling how this resource pool
55115    /// consumes reservation.
55116    pub reservation_affinity: std::option::Option<crate::model::ReservationAffinity>,
55117
55118    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
55119}
55120
55121#[cfg(any(
55122    feature = "deployment-resource-pool-service",
55123    feature = "endpoint-service",
55124    feature = "index-endpoint-service",
55125    feature = "job-service",
55126    feature = "model-garden-service",
55127    feature = "notebook-service",
55128    feature = "persistent-resource-service",
55129    feature = "schedule-service",
55130))]
55131impl MachineSpec {
55132    pub fn new() -> Self {
55133        std::default::Default::default()
55134    }
55135
55136    /// Sets the value of [machine_type][crate::model::MachineSpec::machine_type].
55137    pub fn set_machine_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
55138        self.machine_type = v.into();
55139        self
55140    }
55141
55142    /// Sets the value of [accelerator_type][crate::model::MachineSpec::accelerator_type].
55143    pub fn set_accelerator_type<T: std::convert::Into<crate::model::AcceleratorType>>(
55144        mut self,
55145        v: T,
55146    ) -> Self {
55147        self.accelerator_type = v.into();
55148        self
55149    }
55150
55151    /// Sets the value of [accelerator_count][crate::model::MachineSpec::accelerator_count].
55152    pub fn set_accelerator_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
55153        self.accelerator_count = v.into();
55154        self
55155    }
55156
55157    /// Sets the value of [tpu_topology][crate::model::MachineSpec::tpu_topology].
55158    pub fn set_tpu_topology<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
55159        self.tpu_topology = v.into();
55160        self
55161    }
55162
55163    /// Sets the value of [reservation_affinity][crate::model::MachineSpec::reservation_affinity].
55164    pub fn set_reservation_affinity<T>(mut self, v: T) -> Self
55165    where
55166        T: std::convert::Into<crate::model::ReservationAffinity>,
55167    {
55168        self.reservation_affinity = std::option::Option::Some(v.into());
55169        self
55170    }
55171
55172    /// Sets or clears the value of [reservation_affinity][crate::model::MachineSpec::reservation_affinity].
55173    pub fn set_or_clear_reservation_affinity<T>(mut self, v: std::option::Option<T>) -> Self
55174    where
55175        T: std::convert::Into<crate::model::ReservationAffinity>,
55176    {
55177        self.reservation_affinity = v.map(|x| x.into());
55178        self
55179    }
55180}
55181
55182#[cfg(any(
55183    feature = "deployment-resource-pool-service",
55184    feature = "endpoint-service",
55185    feature = "index-endpoint-service",
55186    feature = "job-service",
55187    feature = "model-garden-service",
55188    feature = "notebook-service",
55189    feature = "persistent-resource-service",
55190    feature = "schedule-service",
55191))]
55192impl wkt::message::Message for MachineSpec {
55193    fn typename() -> &'static str {
55194        "type.googleapis.com/google.cloud.aiplatform.v1.MachineSpec"
55195    }
55196}
55197
55198/// A description of resources that are dedicated to a DeployedModel, and
55199/// that need a higher degree of manual configuration.
55200#[cfg(any(
55201    feature = "deployment-resource-pool-service",
55202    feature = "endpoint-service",
55203    feature = "index-endpoint-service",
55204    feature = "model-garden-service",
55205))]
55206#[derive(Clone, Default, PartialEq)]
55207#[non_exhaustive]
55208pub struct DedicatedResources {
55209    /// Required. Immutable. The specification of a single machine used by the
55210    /// prediction.
55211    pub machine_spec: std::option::Option<crate::model::MachineSpec>,
55212
55213    /// Required. Immutable. The minimum number of machine replicas this
55214    /// DeployedModel will be always deployed on. This value must be greater than
55215    /// or equal to 1.
55216    ///
55217    /// If traffic against the DeployedModel increases, it may dynamically be
55218    /// deployed onto more replicas, and as traffic decreases, some of these extra
55219    /// replicas may be freed.
55220    pub min_replica_count: i32,
55221
55222    /// Immutable. The maximum number of replicas this DeployedModel may be
55223    /// deployed on when the traffic against it increases. If the requested value
55224    /// is too large, the deployment will error, but if deployment succeeds then
55225    /// the ability to scale the model to that many replicas is guaranteed (barring
55226    /// service outages). If traffic against the DeployedModel increases beyond
55227    /// what its replicas at maximum may handle, a portion of the traffic will be
55228    /// dropped. If this value is not provided, will use
55229    /// [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count]
55230    /// as the default value.
55231    ///
55232    /// The value of this field impacts the charge against Vertex CPU and GPU
55233    /// quotas. Specifically, you will be charged for (max_replica_count *
55234    /// number of cores in the selected machine type) and (max_replica_count *
55235    /// number of GPUs per replica in the selected machine type).
55236    ///
55237    /// [google.cloud.aiplatform.v1.DedicatedResources.min_replica_count]: crate::model::DedicatedResources::min_replica_count
55238    pub max_replica_count: i32,
55239
55240    /// Optional. Number of required available replicas for the deployment to
55241    /// succeed. This field is only needed when partial model deployment/mutation
55242    /// is desired. If set, the model deploy/mutate operation will succeed once
55243    /// available_replica_count reaches required_replica_count, and the rest of
55244    /// the replicas will be retried. If not set, the default
55245    /// required_replica_count will be min_replica_count.
55246    pub required_replica_count: i32,
55247
55248    /// Immutable. The metric specifications that overrides a resource
55249    /// utilization metric (CPU utilization, accelerator's duty cycle, and so on)
55250    /// target value (default to 60 if not set). At most one entry is allowed per
55251    /// metric.
55252    ///
55253    /// If
55254    /// [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
55255    /// is above 0, the autoscaling will be based on both CPU utilization and
55256    /// accelerator's duty cycle metrics and scale up when either metrics exceeds
55257    /// its target value while scale down if both metrics are under their target
55258    /// value. The default target value is 60 for both metrics.
55259    ///
55260    /// If
55261    /// [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]
55262    /// is 0, the autoscaling will be based on CPU utilization metric only with
55263    /// default target value 60 if not explicitly set.
55264    ///
55265    /// For example, in the case of Online Prediction, if you want to override
55266    /// target CPU utilization to 80, you should set
55267    /// [autoscaling_metric_specs.metric_name][google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]
55268    /// to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
55269    /// [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]
55270    /// to `80`.
55271    ///
55272    /// [google.cloud.aiplatform.v1.AutoscalingMetricSpec.metric_name]: crate::model::AutoscalingMetricSpec::metric_name
55273    /// [google.cloud.aiplatform.v1.AutoscalingMetricSpec.target]: crate::model::AutoscalingMetricSpec::target
55274    /// [google.cloud.aiplatform.v1.MachineSpec.accelerator_count]: crate::model::MachineSpec::accelerator_count
55275    pub autoscaling_metric_specs: std::vec::Vec<crate::model::AutoscalingMetricSpec>,
55276
55277    /// Optional. If true, schedule the deployment workload on [spot
55278    /// VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms).
55279    pub spot: bool,
55280
55281    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
55282}
55283
55284#[cfg(any(
55285    feature = "deployment-resource-pool-service",
55286    feature = "endpoint-service",
55287    feature = "index-endpoint-service",
55288    feature = "model-garden-service",
55289))]
55290impl DedicatedResources {
55291    pub fn new() -> Self {
55292        std::default::Default::default()
55293    }
55294
55295    /// Sets the value of [machine_spec][crate::model::DedicatedResources::machine_spec].
55296    pub fn set_machine_spec<T>(mut self, v: T) -> Self
55297    where
55298        T: std::convert::Into<crate::model::MachineSpec>,
55299    {
55300        self.machine_spec = std::option::Option::Some(v.into());
55301        self
55302    }
55303
55304    /// Sets or clears the value of [machine_spec][crate::model::DedicatedResources::machine_spec].
55305    pub fn set_or_clear_machine_spec<T>(mut self, v: std::option::Option<T>) -> Self
55306    where
55307        T: std::convert::Into<crate::model::MachineSpec>,
55308    {
55309        self.machine_spec = v.map(|x| x.into());
55310        self
55311    }
55312
55313    /// Sets the value of [min_replica_count][crate::model::DedicatedResources::min_replica_count].
55314    pub fn set_min_replica_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
55315        self.min_replica_count = v.into();
55316        self
55317    }
55318
55319    /// Sets the value of [max_replica_count][crate::model::DedicatedResources::max_replica_count].
55320    pub fn set_max_replica_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
55321        self.max_replica_count = v.into();
55322        self
55323    }
55324
55325    /// Sets the value of [required_replica_count][crate::model::DedicatedResources::required_replica_count].
55326    pub fn set_required_replica_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
55327        self.required_replica_count = v.into();
55328        self
55329    }
55330
55331    /// Sets the value of [autoscaling_metric_specs][crate::model::DedicatedResources::autoscaling_metric_specs].
55332    pub fn set_autoscaling_metric_specs<T, V>(mut self, v: T) -> Self
55333    where
55334        T: std::iter::IntoIterator<Item = V>,
55335        V: std::convert::Into<crate::model::AutoscalingMetricSpec>,
55336    {
55337        use std::iter::Iterator;
55338        self.autoscaling_metric_specs = v.into_iter().map(|i| i.into()).collect();
55339        self
55340    }
55341
55342    /// Sets the value of [spot][crate::model::DedicatedResources::spot].
55343    pub fn set_spot<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
55344        self.spot = v.into();
55345        self
55346    }
55347}
55348
55349#[cfg(any(
55350    feature = "deployment-resource-pool-service",
55351    feature = "endpoint-service",
55352    feature = "index-endpoint-service",
55353    feature = "model-garden-service",
55354))]
55355impl wkt::message::Message for DedicatedResources {
55356    fn typename() -> &'static str {
55357        "type.googleapis.com/google.cloud.aiplatform.v1.DedicatedResources"
55358    }
55359}
55360
55361/// A description of resources that to large degree are decided by Vertex AI,
55362/// and require only a modest additional configuration.
55363/// Each Model supporting these resources documents its specific guidelines.
55364#[cfg(any(
55365    feature = "deployment-resource-pool-service",
55366    feature = "endpoint-service",
55367    feature = "feature-online-store-admin-service",
55368    feature = "index-endpoint-service",
55369    feature = "model-garden-service",
55370))]
55371#[derive(Clone, Default, PartialEq)]
55372#[non_exhaustive]
55373pub struct AutomaticResources {
55374    /// Immutable. The minimum number of replicas this DeployedModel will be always
55375    /// deployed on. If traffic against it increases, it may dynamically be
55376    /// deployed onto more replicas up to
55377    /// [max_replica_count][google.cloud.aiplatform.v1.AutomaticResources.max_replica_count],
55378    /// and as traffic decreases, some of these extra replicas may be freed. If the
55379    /// requested value is too large, the deployment will error.
55380    ///
55381    /// [google.cloud.aiplatform.v1.AutomaticResources.max_replica_count]: crate::model::AutomaticResources::max_replica_count
55382    pub min_replica_count: i32,
55383
55384    /// Immutable. The maximum number of replicas this DeployedModel may be
55385    /// deployed on when the traffic against it increases. If the requested value
55386    /// is too large, the deployment will error, but if deployment succeeds then
55387    /// the ability to scale the model to that many replicas is guaranteed (barring
55388    /// service outages). If traffic against the DeployedModel increases beyond
55389    /// what its replicas at maximum may handle, a portion of the traffic will be
55390    /// dropped. If this value is not provided, a no upper bound for scaling under
55391    /// heavy traffic will be assume, though Vertex AI may be unable to scale
55392    /// beyond certain replica number.
55393    pub max_replica_count: i32,
55394
55395    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
55396}
55397
55398#[cfg(any(
55399    feature = "deployment-resource-pool-service",
55400    feature = "endpoint-service",
55401    feature = "feature-online-store-admin-service",
55402    feature = "index-endpoint-service",
55403    feature = "model-garden-service",
55404))]
55405impl AutomaticResources {
55406    pub fn new() -> Self {
55407        std::default::Default::default()
55408    }
55409
55410    /// Sets the value of [min_replica_count][crate::model::AutomaticResources::min_replica_count].
55411    pub fn set_min_replica_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
55412        self.min_replica_count = v.into();
55413        self
55414    }
55415
55416    /// Sets the value of [max_replica_count][crate::model::AutomaticResources::max_replica_count].
55417    pub fn set_max_replica_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
55418        self.max_replica_count = v.into();
55419        self
55420    }
55421}
55422
55423#[cfg(any(
55424    feature = "deployment-resource-pool-service",
55425    feature = "endpoint-service",
55426    feature = "feature-online-store-admin-service",
55427    feature = "index-endpoint-service",
55428    feature = "model-garden-service",
55429))]
55430impl wkt::message::Message for AutomaticResources {
55431    fn typename() -> &'static str {
55432        "type.googleapis.com/google.cloud.aiplatform.v1.AutomaticResources"
55433    }
55434}
55435
55436/// A description of resources that are used for performing batch operations, are
55437/// dedicated to a Model, and need manual configuration.
55438#[cfg(feature = "job-service")]
55439#[derive(Clone, Default, PartialEq)]
55440#[non_exhaustive]
55441pub struct BatchDedicatedResources {
55442    /// Required. Immutable. The specification of a single machine.
55443    pub machine_spec: std::option::Option<crate::model::MachineSpec>,
55444
55445    /// Immutable. The number of machine replicas used at the start of the batch
55446    /// operation. If not set, Vertex AI decides starting number, not greater than
55447    /// [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
55448    ///
55449    /// [google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]: crate::model::BatchDedicatedResources::max_replica_count
55450    pub starting_replica_count: i32,
55451
55452    /// Immutable. The maximum number of machine replicas the batch operation may
55453    /// be scaled to. The default value is 10.
55454    pub max_replica_count: i32,
55455
55456    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
55457}
55458
55459#[cfg(feature = "job-service")]
55460impl BatchDedicatedResources {
55461    pub fn new() -> Self {
55462        std::default::Default::default()
55463    }
55464
55465    /// Sets the value of [machine_spec][crate::model::BatchDedicatedResources::machine_spec].
55466    pub fn set_machine_spec<T>(mut self, v: T) -> Self
55467    where
55468        T: std::convert::Into<crate::model::MachineSpec>,
55469    {
55470        self.machine_spec = std::option::Option::Some(v.into());
55471        self
55472    }
55473
55474    /// Sets or clears the value of [machine_spec][crate::model::BatchDedicatedResources::machine_spec].
55475    pub fn set_or_clear_machine_spec<T>(mut self, v: std::option::Option<T>) -> Self
55476    where
55477        T: std::convert::Into<crate::model::MachineSpec>,
55478    {
55479        self.machine_spec = v.map(|x| x.into());
55480        self
55481    }
55482
55483    /// Sets the value of [starting_replica_count][crate::model::BatchDedicatedResources::starting_replica_count].
55484    pub fn set_starting_replica_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
55485        self.starting_replica_count = v.into();
55486        self
55487    }
55488
55489    /// Sets the value of [max_replica_count][crate::model::BatchDedicatedResources::max_replica_count].
55490    pub fn set_max_replica_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
55491        self.max_replica_count = v.into();
55492        self
55493    }
55494}
55495
55496#[cfg(feature = "job-service")]
55497impl wkt::message::Message for BatchDedicatedResources {
55498    fn typename() -> &'static str {
55499        "type.googleapis.com/google.cloud.aiplatform.v1.BatchDedicatedResources"
55500    }
55501}
55502
55503/// Statistics information about resource consumption.
55504#[cfg(feature = "job-service")]
55505#[derive(Clone, Default, PartialEq)]
55506#[non_exhaustive]
55507pub struct ResourcesConsumed {
55508    /// Output only. The number of replica hours used. Note that many replicas may
55509    /// run in parallel, and additionally any given work may be queued for some
55510    /// time. Therefore this value is not strictly related to wall time.
55511    pub replica_hours: f64,
55512
55513    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
55514}
55515
55516#[cfg(feature = "job-service")]
55517impl ResourcesConsumed {
55518    pub fn new() -> Self {
55519        std::default::Default::default()
55520    }
55521
55522    /// Sets the value of [replica_hours][crate::model::ResourcesConsumed::replica_hours].
55523    pub fn set_replica_hours<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
55524        self.replica_hours = v.into();
55525        self
55526    }
55527}
55528
55529#[cfg(feature = "job-service")]
55530impl wkt::message::Message for ResourcesConsumed {
55531    fn typename() -> &'static str {
55532        "type.googleapis.com/google.cloud.aiplatform.v1.ResourcesConsumed"
55533    }
55534}
55535
55536/// Represents the spec of disk options.
55537#[cfg(any(feature = "job-service", feature = "persistent-resource-service",))]
55538#[derive(Clone, Default, PartialEq)]
55539#[non_exhaustive]
55540pub struct DiskSpec {
55541    /// Type of the boot disk (default is "pd-ssd").
55542    /// Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or
55543    /// "pd-standard" (Persistent Disk Hard Disk Drive).
55544    pub boot_disk_type: std::string::String,
55545
55546    /// Size in GB of the boot disk (default is 100GB).
55547    pub boot_disk_size_gb: i32,
55548
55549    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
55550}
55551
55552#[cfg(any(feature = "job-service", feature = "persistent-resource-service",))]
55553impl DiskSpec {
55554    pub fn new() -> Self {
55555        std::default::Default::default()
55556    }
55557
55558    /// Sets the value of [boot_disk_type][crate::model::DiskSpec::boot_disk_type].
55559    pub fn set_boot_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
55560        self.boot_disk_type = v.into();
55561        self
55562    }
55563
55564    /// Sets the value of [boot_disk_size_gb][crate::model::DiskSpec::boot_disk_size_gb].
55565    pub fn set_boot_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
55566        self.boot_disk_size_gb = v.into();
55567        self
55568    }
55569}
55570
55571#[cfg(any(feature = "job-service", feature = "persistent-resource-service",))]
55572impl wkt::message::Message for DiskSpec {
55573    fn typename() -> &'static str {
55574        "type.googleapis.com/google.cloud.aiplatform.v1.DiskSpec"
55575    }
55576}
55577
55578/// Represents the spec of [persistent
55579/// disk][<https://cloud.google.com/compute/docs/disks/persistent-disks>] options.
55580#[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
55581#[derive(Clone, Default, PartialEq)]
55582#[non_exhaustive]
55583pub struct PersistentDiskSpec {
55584    /// Type of the disk (default is "pd-standard").
55585    /// Valid values: "pd-ssd" (Persistent Disk Solid State Drive)
55586    /// "pd-standard" (Persistent Disk Hard Disk Drive)
55587    /// "pd-balanced" (Balanced Persistent Disk)
55588    /// "pd-extreme" (Extreme Persistent Disk)
55589    pub disk_type: std::string::String,
55590
55591    /// Size in GB of the disk (default is 100GB).
55592    pub disk_size_gb: i64,
55593
55594    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
55595}
55596
55597#[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
55598impl PersistentDiskSpec {
55599    pub fn new() -> Self {
55600        std::default::Default::default()
55601    }
55602
55603    /// Sets the value of [disk_type][crate::model::PersistentDiskSpec::disk_type].
55604    pub fn set_disk_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
55605        self.disk_type = v.into();
55606        self
55607    }
55608
55609    /// Sets the value of [disk_size_gb][crate::model::PersistentDiskSpec::disk_size_gb].
55610    pub fn set_disk_size_gb<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
55611        self.disk_size_gb = v.into();
55612        self
55613    }
55614}
55615
55616#[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
55617impl wkt::message::Message for PersistentDiskSpec {
55618    fn typename() -> &'static str {
55619        "type.googleapis.com/google.cloud.aiplatform.v1.PersistentDiskSpec"
55620    }
55621}
55622
55623/// Represents a mount configuration for Network File System (NFS) to mount.
55624#[cfg(feature = "job-service")]
55625#[derive(Clone, Default, PartialEq)]
55626#[non_exhaustive]
55627pub struct NfsMount {
55628    /// Required. IP address of the NFS server.
55629    pub server: std::string::String,
55630
55631    /// Required. Source path exported from NFS server.
55632    /// Has to start with '/', and combined with the ip address, it indicates
55633    /// the source mount path in the form of `server:path`
55634    pub path: std::string::String,
55635
55636    /// Required. Destination mount path. The NFS will be mounted for the user
55637    /// under /mnt/nfs/<mount_point>
55638    pub mount_point: std::string::String,
55639
55640    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
55641}
55642
55643#[cfg(feature = "job-service")]
55644impl NfsMount {
55645    pub fn new() -> Self {
55646        std::default::Default::default()
55647    }
55648
55649    /// Sets the value of [server][crate::model::NfsMount::server].
55650    pub fn set_server<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
55651        self.server = v.into();
55652        self
55653    }
55654
55655    /// Sets the value of [path][crate::model::NfsMount::path].
55656    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
55657        self.path = v.into();
55658        self
55659    }
55660
55661    /// Sets the value of [mount_point][crate::model::NfsMount::mount_point].
55662    pub fn set_mount_point<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
55663        self.mount_point = v.into();
55664        self
55665    }
55666}
55667
55668#[cfg(feature = "job-service")]
55669impl wkt::message::Message for NfsMount {
55670    fn typename() -> &'static str {
55671        "type.googleapis.com/google.cloud.aiplatform.v1.NfsMount"
55672    }
55673}
55674
55675/// The metric specification that defines the target resource utilization
55676/// (CPU utilization, accelerator's duty cycle, and so on) for calculating the
55677/// desired replica count.
55678#[cfg(any(
55679    feature = "deployment-resource-pool-service",
55680    feature = "endpoint-service",
55681    feature = "index-endpoint-service",
55682    feature = "model-garden-service",
55683))]
55684#[derive(Clone, Default, PartialEq)]
55685#[non_exhaustive]
55686pub struct AutoscalingMetricSpec {
55687    /// Required. The resource metric name.
55688    /// Supported metrics:
55689    ///
55690    /// * For Online Prediction:
55691    /// * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
55692    /// * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
55693    pub metric_name: std::string::String,
55694
55695    /// The target resource utilization in percentage (1% - 100%) for the given
55696    /// metric; once the real usage deviates from the target by a certain
55697    /// percentage, the machine replicas change. The default value is 60
55698    /// (representing 60%) if not provided.
55699    pub target: i32,
55700
55701    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
55702}
55703
55704#[cfg(any(
55705    feature = "deployment-resource-pool-service",
55706    feature = "endpoint-service",
55707    feature = "index-endpoint-service",
55708    feature = "model-garden-service",
55709))]
55710impl AutoscalingMetricSpec {
55711    pub fn new() -> Self {
55712        std::default::Default::default()
55713    }
55714
55715    /// Sets the value of [metric_name][crate::model::AutoscalingMetricSpec::metric_name].
55716    pub fn set_metric_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
55717        self.metric_name = v.into();
55718        self
55719    }
55720
55721    /// Sets the value of [target][crate::model::AutoscalingMetricSpec::target].
55722    pub fn set_target<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
55723        self.target = v.into();
55724        self
55725    }
55726}
55727
55728#[cfg(any(
55729    feature = "deployment-resource-pool-service",
55730    feature = "endpoint-service",
55731    feature = "index-endpoint-service",
55732    feature = "model-garden-service",
55733))]
55734impl wkt::message::Message for AutoscalingMetricSpec {
55735    fn typename() -> &'static str {
55736        "type.googleapis.com/google.cloud.aiplatform.v1.AutoscalingMetricSpec"
55737    }
55738}
55739
55740/// A set of Shielded Instance options.
55741/// See [Images using supported Shielded VM
55742/// features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
55743#[cfg(feature = "notebook-service")]
55744#[derive(Clone, Default, PartialEq)]
55745#[non_exhaustive]
55746pub struct ShieldedVmConfig {
55747    /// Defines whether the instance has [Secure
55748    /// Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot)
55749    /// enabled.
55750    ///
55751    /// Secure Boot helps ensure that the system only runs authentic software by
55752    /// verifying the digital signature of all boot components, and halting the
55753    /// boot process if signature verification fails.
55754    pub enable_secure_boot: bool,
55755
55756    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
55757}
55758
55759#[cfg(feature = "notebook-service")]
55760impl ShieldedVmConfig {
55761    pub fn new() -> Self {
55762        std::default::Default::default()
55763    }
55764
55765    /// Sets the value of [enable_secure_boot][crate::model::ShieldedVmConfig::enable_secure_boot].
55766    pub fn set_enable_secure_boot<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
55767        self.enable_secure_boot = v.into();
55768        self
55769    }
55770}
55771
55772#[cfg(feature = "notebook-service")]
55773impl wkt::message::Message for ShieldedVmConfig {
55774    fn typename() -> &'static str {
55775        "type.googleapis.com/google.cloud.aiplatform.v1.ShieldedVmConfig"
55776    }
55777}
55778
55779/// Manual batch tuning parameters.
55780#[cfg(feature = "job-service")]
55781#[derive(Clone, Default, PartialEq)]
55782#[non_exhaustive]
55783pub struct ManualBatchTuningParameters {
55784    /// Immutable. The number of the records (e.g. instances) of the operation
55785    /// given in each batch to a machine replica. Machine type, and size of a
55786    /// single record should be considered when setting this parameter, higher
55787    /// value speeds up the batch operation's execution, but too high value will
55788    /// result in a whole batch not fitting in a machine's memory, and the whole
55789    /// operation will fail.
55790    /// The default value is 64.
55791    pub batch_size: i32,
55792
55793    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
55794}
55795
55796#[cfg(feature = "job-service")]
55797impl ManualBatchTuningParameters {
55798    pub fn new() -> Self {
55799        std::default::Default::default()
55800    }
55801
55802    /// Sets the value of [batch_size][crate::model::ManualBatchTuningParameters::batch_size].
55803    pub fn set_batch_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
55804        self.batch_size = v.into();
55805        self
55806    }
55807}
55808
55809#[cfg(feature = "job-service")]
55810impl wkt::message::Message for ManualBatchTuningParameters {
55811    fn typename() -> &'static str {
55812        "type.googleapis.com/google.cloud.aiplatform.v1.ManualBatchTuningParameters"
55813    }
55814}
55815
55816/// The request message for
55817/// [MatchService.FindNeighbors][google.cloud.aiplatform.v1.MatchService.FindNeighbors].
55818///
55819/// [google.cloud.aiplatform.v1.MatchService.FindNeighbors]: crate::client::MatchService::find_neighbors
55820#[cfg(feature = "match-service")]
55821#[derive(Clone, Default, PartialEq)]
55822#[non_exhaustive]
55823pub struct FindNeighborsRequest {
55824    /// Required. The name of the index endpoint.
55825    /// Format:
55826    /// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
55827    pub index_endpoint: std::string::String,
55828
55829    /// The ID of the DeployedIndex that will serve the request. This request is
55830    /// sent to a specific IndexEndpoint, as per the IndexEndpoint.network. That
55831    /// IndexEndpoint also has IndexEndpoint.deployed_indexes, and each such index
55832    /// has a DeployedIndex.id field.
55833    /// The value of the field below must equal one of the DeployedIndex.id
55834    /// fields of the IndexEndpoint that is being called for this request.
55835    pub deployed_index_id: std::string::String,
55836
55837    /// The list of queries.
55838    pub queries: std::vec::Vec<crate::model::find_neighbors_request::Query>,
55839
55840    /// If set to true, the full datapoints (including all vector values and
55841    /// restricts) of the nearest neighbors are returned.
55842    /// Note that returning full datapoint will significantly increase the
55843    /// latency and cost of the query.
55844    pub return_full_datapoint: bool,
55845
55846    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
55847}
55848
55849#[cfg(feature = "match-service")]
55850impl FindNeighborsRequest {
55851    pub fn new() -> Self {
55852        std::default::Default::default()
55853    }
55854
55855    /// Sets the value of [index_endpoint][crate::model::FindNeighborsRequest::index_endpoint].
55856    pub fn set_index_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
55857        self.index_endpoint = v.into();
55858        self
55859    }
55860
55861    /// Sets the value of [deployed_index_id][crate::model::FindNeighborsRequest::deployed_index_id].
55862    pub fn set_deployed_index_id<T: std::convert::Into<std::string::String>>(
55863        mut self,
55864        v: T,
55865    ) -> Self {
55866        self.deployed_index_id = v.into();
55867        self
55868    }
55869
55870    /// Sets the value of [queries][crate::model::FindNeighborsRequest::queries].
55871    pub fn set_queries<T, V>(mut self, v: T) -> Self
55872    where
55873        T: std::iter::IntoIterator<Item = V>,
55874        V: std::convert::Into<crate::model::find_neighbors_request::Query>,
55875    {
55876        use std::iter::Iterator;
55877        self.queries = v.into_iter().map(|i| i.into()).collect();
55878        self
55879    }
55880
55881    /// Sets the value of [return_full_datapoint][crate::model::FindNeighborsRequest::return_full_datapoint].
55882    pub fn set_return_full_datapoint<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
55883        self.return_full_datapoint = v.into();
55884        self
55885    }
55886}
55887
55888#[cfg(feature = "match-service")]
55889impl wkt::message::Message for FindNeighborsRequest {
55890    fn typename() -> &'static str {
55891        "type.googleapis.com/google.cloud.aiplatform.v1.FindNeighborsRequest"
55892    }
55893}
55894
55895/// Defines additional types related to [FindNeighborsRequest].
55896#[cfg(feature = "match-service")]
55897pub mod find_neighbors_request {
55898    #[allow(unused_imports)]
55899    use super::*;
55900
55901    /// A query to find a number of the nearest neighbors (most similar vectors)
55902    /// of a vector.
55903    #[cfg(feature = "match-service")]
55904    #[derive(Clone, Default, PartialEq)]
55905    #[non_exhaustive]
55906    pub struct Query {
55907        /// Required. The datapoint/vector whose nearest neighbors should be searched
55908        /// for.
55909        pub datapoint: std::option::Option<crate::model::IndexDatapoint>,
55910
55911        /// The number of nearest neighbors to be retrieved from database for each
55912        /// query. If not set, will use the default from the service configuration
55913        /// (<https://cloud.google.com/vertex-ai/docs/matching-engine/configuring-indexes#nearest-neighbor-search-config>).
55914        pub neighbor_count: i32,
55915
55916        /// Crowding is a constraint on a neighbor list produced by nearest neighbor
55917        /// search requiring that no more than some value k' of the k neighbors
55918        /// returned have the same value of crowding_attribute.
55919        /// It's used for improving result diversity.
55920        /// This field is the maximum number of matches with the same crowding tag.
55921        pub per_crowding_attribute_neighbor_count: i32,
55922
55923        /// The number of neighbors to find via approximate search before
55924        /// exact reordering is performed. If not set, the default value from scam
55925        /// config is used; if set, this value must be > 0.
55926        pub approximate_neighbor_count: i32,
55927
55928        /// The fraction of the number of leaves to search, set at query time allows
55929        /// user to tune search performance. This value increase result in both
55930        /// search accuracy and latency increase. The value should be between 0.0
55931        /// and 1.0. If not set or set to 0.0, query uses the default value specified
55932        /// in
55933        /// NearestNeighborSearchConfig.TreeAHConfig.fraction_leaf_nodes_to_search.
55934        pub fraction_leaf_nodes_to_search_override: f64,
55935
55936        pub ranking: std::option::Option<crate::model::find_neighbors_request::query::Ranking>,
55937
55938        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
55939    }
55940
55941    #[cfg(feature = "match-service")]
55942    impl Query {
55943        pub fn new() -> Self {
55944            std::default::Default::default()
55945        }
55946
55947        /// Sets the value of [datapoint][crate::model::find_neighbors_request::Query::datapoint].
55948        pub fn set_datapoint<T>(mut self, v: T) -> Self
55949        where
55950            T: std::convert::Into<crate::model::IndexDatapoint>,
55951        {
55952            self.datapoint = std::option::Option::Some(v.into());
55953            self
55954        }
55955
55956        /// Sets or clears the value of [datapoint][crate::model::find_neighbors_request::Query::datapoint].
55957        pub fn set_or_clear_datapoint<T>(mut self, v: std::option::Option<T>) -> Self
55958        where
55959            T: std::convert::Into<crate::model::IndexDatapoint>,
55960        {
55961            self.datapoint = v.map(|x| x.into());
55962            self
55963        }
55964
55965        /// Sets the value of [neighbor_count][crate::model::find_neighbors_request::Query::neighbor_count].
55966        pub fn set_neighbor_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
55967            self.neighbor_count = v.into();
55968            self
55969        }
55970
55971        /// Sets the value of [per_crowding_attribute_neighbor_count][crate::model::find_neighbors_request::Query::per_crowding_attribute_neighbor_count].
55972        pub fn set_per_crowding_attribute_neighbor_count<T: std::convert::Into<i32>>(
55973            mut self,
55974            v: T,
55975        ) -> Self {
55976            self.per_crowding_attribute_neighbor_count = v.into();
55977            self
55978        }
55979
55980        /// Sets the value of [approximate_neighbor_count][crate::model::find_neighbors_request::Query::approximate_neighbor_count].
55981        pub fn set_approximate_neighbor_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
55982            self.approximate_neighbor_count = v.into();
55983            self
55984        }
55985
55986        /// Sets the value of [fraction_leaf_nodes_to_search_override][crate::model::find_neighbors_request::Query::fraction_leaf_nodes_to_search_override].
55987        pub fn set_fraction_leaf_nodes_to_search_override<T: std::convert::Into<f64>>(
55988            mut self,
55989            v: T,
55990        ) -> Self {
55991            self.fraction_leaf_nodes_to_search_override = v.into();
55992            self
55993        }
55994
55995        /// Sets the value of [ranking][crate::model::find_neighbors_request::Query::ranking].
55996        ///
55997        /// Note that all the setters affecting `ranking` are mutually
55998        /// exclusive.
55999        pub fn set_ranking<
56000            T: std::convert::Into<
56001                    std::option::Option<crate::model::find_neighbors_request::query::Ranking>,
56002                >,
56003        >(
56004            mut self,
56005            v: T,
56006        ) -> Self {
56007            self.ranking = v.into();
56008            self
56009        }
56010
56011        /// The value of [ranking][crate::model::find_neighbors_request::Query::ranking]
56012        /// if it holds a `Rrf`, `None` if the field is not set or
56013        /// holds a different branch.
56014        pub fn rrf(
56015            &self,
56016        ) -> std::option::Option<&std::boxed::Box<crate::model::find_neighbors_request::query::Rrf>>
56017        {
56018            #[allow(unreachable_patterns)]
56019            self.ranking.as_ref().and_then(|v| match v {
56020                crate::model::find_neighbors_request::query::Ranking::Rrf(v) => {
56021                    std::option::Option::Some(v)
56022                }
56023                _ => std::option::Option::None,
56024            })
56025        }
56026
56027        /// Sets the value of [ranking][crate::model::find_neighbors_request::Query::ranking]
56028        /// to hold a `Rrf`.
56029        ///
56030        /// Note that all the setters affecting `ranking` are
56031        /// mutually exclusive.
56032        pub fn set_rrf<
56033            T: std::convert::Into<std::boxed::Box<crate::model::find_neighbors_request::query::Rrf>>,
56034        >(
56035            mut self,
56036            v: T,
56037        ) -> Self {
56038            self.ranking = std::option::Option::Some(
56039                crate::model::find_neighbors_request::query::Ranking::Rrf(v.into()),
56040            );
56041            self
56042        }
56043    }
56044
56045    #[cfg(feature = "match-service")]
56046    impl wkt::message::Message for Query {
56047        fn typename() -> &'static str {
56048            "type.googleapis.com/google.cloud.aiplatform.v1.FindNeighborsRequest.Query"
56049        }
56050    }
56051
56052    /// Defines additional types related to [Query].
56053    #[cfg(feature = "match-service")]
56054    pub mod query {
56055        #[allow(unused_imports)]
56056        use super::*;
56057
56058        /// Parameters for RRF algorithm that combines search results.
56059        #[cfg(feature = "match-service")]
56060        #[derive(Clone, Default, PartialEq)]
56061        #[non_exhaustive]
56062        pub struct Rrf {
56063            /// Required. Users can provide an alpha value to give more weight to dense
56064            /// vs sparse results. For example, if the alpha is 0, we only return
56065            /// sparse and if the alpha is 1, we only return dense.
56066            pub alpha: f32,
56067
56068            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56069        }
56070
56071        #[cfg(feature = "match-service")]
56072        impl Rrf {
56073            pub fn new() -> Self {
56074                std::default::Default::default()
56075            }
56076
56077            /// Sets the value of [alpha][crate::model::find_neighbors_request::query::Rrf::alpha].
56078            pub fn set_alpha<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
56079                self.alpha = v.into();
56080                self
56081            }
56082        }
56083
56084        #[cfg(feature = "match-service")]
56085        impl wkt::message::Message for Rrf {
56086            fn typename() -> &'static str {
56087                "type.googleapis.com/google.cloud.aiplatform.v1.FindNeighborsRequest.Query.RRF"
56088            }
56089        }
56090
56091        #[cfg(feature = "match-service")]
56092        #[derive(Clone, Debug, PartialEq)]
56093        #[non_exhaustive]
56094        pub enum Ranking {
56095            /// Optional. Represents RRF algorithm that combines search results.
56096            Rrf(std::boxed::Box<crate::model::find_neighbors_request::query::Rrf>),
56097        }
56098    }
56099}
56100
56101/// The response message for
56102/// [MatchService.FindNeighbors][google.cloud.aiplatform.v1.MatchService.FindNeighbors].
56103///
56104/// [google.cloud.aiplatform.v1.MatchService.FindNeighbors]: crate::client::MatchService::find_neighbors
56105#[cfg(feature = "match-service")]
56106#[derive(Clone, Default, PartialEq)]
56107#[non_exhaustive]
56108pub struct FindNeighborsResponse {
56109    /// The nearest neighbors of the query datapoints.
56110    pub nearest_neighbors: std::vec::Vec<crate::model::find_neighbors_response::NearestNeighbors>,
56111
56112    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56113}
56114
56115#[cfg(feature = "match-service")]
56116impl FindNeighborsResponse {
56117    pub fn new() -> Self {
56118        std::default::Default::default()
56119    }
56120
56121    /// Sets the value of [nearest_neighbors][crate::model::FindNeighborsResponse::nearest_neighbors].
56122    pub fn set_nearest_neighbors<T, V>(mut self, v: T) -> Self
56123    where
56124        T: std::iter::IntoIterator<Item = V>,
56125        V: std::convert::Into<crate::model::find_neighbors_response::NearestNeighbors>,
56126    {
56127        use std::iter::Iterator;
56128        self.nearest_neighbors = v.into_iter().map(|i| i.into()).collect();
56129        self
56130    }
56131}
56132
56133#[cfg(feature = "match-service")]
56134impl wkt::message::Message for FindNeighborsResponse {
56135    fn typename() -> &'static str {
56136        "type.googleapis.com/google.cloud.aiplatform.v1.FindNeighborsResponse"
56137    }
56138}
56139
56140/// Defines additional types related to [FindNeighborsResponse].
56141#[cfg(feature = "match-service")]
56142pub mod find_neighbors_response {
56143    #[allow(unused_imports)]
56144    use super::*;
56145
56146    /// A neighbor of the query vector.
56147    #[cfg(feature = "match-service")]
56148    #[derive(Clone, Default, PartialEq)]
56149    #[non_exhaustive]
56150    pub struct Neighbor {
56151        /// The datapoint of the neighbor.
56152        /// Note that full datapoints are returned only when "return_full_datapoint"
56153        /// is set to true. Otherwise, only the "datapoint_id" and "crowding_tag"
56154        /// fields are populated.
56155        pub datapoint: std::option::Option<crate::model::IndexDatapoint>,
56156
56157        /// The distance between the neighbor and the dense embedding query.
56158        pub distance: f64,
56159
56160        /// The distance between the neighbor and the query sparse_embedding.
56161        pub sparse_distance: f64,
56162
56163        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56164    }
56165
56166    #[cfg(feature = "match-service")]
56167    impl Neighbor {
56168        pub fn new() -> Self {
56169            std::default::Default::default()
56170        }
56171
56172        /// Sets the value of [datapoint][crate::model::find_neighbors_response::Neighbor::datapoint].
56173        pub fn set_datapoint<T>(mut self, v: T) -> Self
56174        where
56175            T: std::convert::Into<crate::model::IndexDatapoint>,
56176        {
56177            self.datapoint = std::option::Option::Some(v.into());
56178            self
56179        }
56180
56181        /// Sets or clears the value of [datapoint][crate::model::find_neighbors_response::Neighbor::datapoint].
56182        pub fn set_or_clear_datapoint<T>(mut self, v: std::option::Option<T>) -> Self
56183        where
56184            T: std::convert::Into<crate::model::IndexDatapoint>,
56185        {
56186            self.datapoint = v.map(|x| x.into());
56187            self
56188        }
56189
56190        /// Sets the value of [distance][crate::model::find_neighbors_response::Neighbor::distance].
56191        pub fn set_distance<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
56192            self.distance = v.into();
56193            self
56194        }
56195
56196        /// Sets the value of [sparse_distance][crate::model::find_neighbors_response::Neighbor::sparse_distance].
56197        pub fn set_sparse_distance<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
56198            self.sparse_distance = v.into();
56199            self
56200        }
56201    }
56202
56203    #[cfg(feature = "match-service")]
56204    impl wkt::message::Message for Neighbor {
56205        fn typename() -> &'static str {
56206            "type.googleapis.com/google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor"
56207        }
56208    }
56209
56210    /// Nearest neighbors for one query.
56211    #[cfg(feature = "match-service")]
56212    #[derive(Clone, Default, PartialEq)]
56213    #[non_exhaustive]
56214    pub struct NearestNeighbors {
56215        /// The ID of the query datapoint.
56216        pub id: std::string::String,
56217
56218        /// All its neighbors.
56219        pub neighbors: std::vec::Vec<crate::model::find_neighbors_response::Neighbor>,
56220
56221        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56222    }
56223
56224    #[cfg(feature = "match-service")]
56225    impl NearestNeighbors {
56226        pub fn new() -> Self {
56227            std::default::Default::default()
56228        }
56229
56230        /// Sets the value of [id][crate::model::find_neighbors_response::NearestNeighbors::id].
56231        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
56232            self.id = v.into();
56233            self
56234        }
56235
56236        /// Sets the value of [neighbors][crate::model::find_neighbors_response::NearestNeighbors::neighbors].
56237        pub fn set_neighbors<T, V>(mut self, v: T) -> Self
56238        where
56239            T: std::iter::IntoIterator<Item = V>,
56240            V: std::convert::Into<crate::model::find_neighbors_response::Neighbor>,
56241        {
56242            use std::iter::Iterator;
56243            self.neighbors = v.into_iter().map(|i| i.into()).collect();
56244            self
56245        }
56246    }
56247
56248    #[cfg(feature = "match-service")]
56249    impl wkt::message::Message for NearestNeighbors {
56250        fn typename() -> &'static str {
56251            "type.googleapis.com/google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors"
56252        }
56253    }
56254}
56255
56256/// The request message for
56257/// [MatchService.ReadIndexDatapoints][google.cloud.aiplatform.v1.MatchService.ReadIndexDatapoints].
56258///
56259/// [google.cloud.aiplatform.v1.MatchService.ReadIndexDatapoints]: crate::client::MatchService::read_index_datapoints
56260#[cfg(feature = "match-service")]
56261#[derive(Clone, Default, PartialEq)]
56262#[non_exhaustive]
56263pub struct ReadIndexDatapointsRequest {
56264    /// Required. The name of the index endpoint.
56265    /// Format:
56266    /// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
56267    pub index_endpoint: std::string::String,
56268
56269    /// The ID of the DeployedIndex that will serve the request.
56270    pub deployed_index_id: std::string::String,
56271
56272    /// IDs of the datapoints to be searched for.
56273    pub ids: std::vec::Vec<std::string::String>,
56274
56275    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56276}
56277
56278#[cfg(feature = "match-service")]
56279impl ReadIndexDatapointsRequest {
56280    pub fn new() -> Self {
56281        std::default::Default::default()
56282    }
56283
56284    /// Sets the value of [index_endpoint][crate::model::ReadIndexDatapointsRequest::index_endpoint].
56285    pub fn set_index_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
56286        self.index_endpoint = v.into();
56287        self
56288    }
56289
56290    /// Sets the value of [deployed_index_id][crate::model::ReadIndexDatapointsRequest::deployed_index_id].
56291    pub fn set_deployed_index_id<T: std::convert::Into<std::string::String>>(
56292        mut self,
56293        v: T,
56294    ) -> Self {
56295        self.deployed_index_id = v.into();
56296        self
56297    }
56298
56299    /// Sets the value of [ids][crate::model::ReadIndexDatapointsRequest::ids].
56300    pub fn set_ids<T, V>(mut self, v: T) -> Self
56301    where
56302        T: std::iter::IntoIterator<Item = V>,
56303        V: std::convert::Into<std::string::String>,
56304    {
56305        use std::iter::Iterator;
56306        self.ids = v.into_iter().map(|i| i.into()).collect();
56307        self
56308    }
56309}
56310
56311#[cfg(feature = "match-service")]
56312impl wkt::message::Message for ReadIndexDatapointsRequest {
56313    fn typename() -> &'static str {
56314        "type.googleapis.com/google.cloud.aiplatform.v1.ReadIndexDatapointsRequest"
56315    }
56316}
56317
56318/// The response message for
56319/// [MatchService.ReadIndexDatapoints][google.cloud.aiplatform.v1.MatchService.ReadIndexDatapoints].
56320///
56321/// [google.cloud.aiplatform.v1.MatchService.ReadIndexDatapoints]: crate::client::MatchService::read_index_datapoints
56322#[cfg(feature = "match-service")]
56323#[derive(Clone, Default, PartialEq)]
56324#[non_exhaustive]
56325pub struct ReadIndexDatapointsResponse {
56326    /// The result list of datapoints.
56327    pub datapoints: std::vec::Vec<crate::model::IndexDatapoint>,
56328
56329    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56330}
56331
56332#[cfg(feature = "match-service")]
56333impl ReadIndexDatapointsResponse {
56334    pub fn new() -> Self {
56335        std::default::Default::default()
56336    }
56337
56338    /// Sets the value of [datapoints][crate::model::ReadIndexDatapointsResponse::datapoints].
56339    pub fn set_datapoints<T, V>(mut self, v: T) -> Self
56340    where
56341        T: std::iter::IntoIterator<Item = V>,
56342        V: std::convert::Into<crate::model::IndexDatapoint>,
56343    {
56344        use std::iter::Iterator;
56345        self.datapoints = v.into_iter().map(|i| i.into()).collect();
56346        self
56347    }
56348}
56349
56350#[cfg(feature = "match-service")]
56351impl wkt::message::Message for ReadIndexDatapointsResponse {
56352    fn typename() -> &'static str {
56353        "type.googleapis.com/google.cloud.aiplatform.v1.ReadIndexDatapointsResponse"
56354    }
56355}
56356
56357/// Instance of a general MetadataSchema.
56358#[cfg(feature = "metadata-service")]
56359#[derive(Clone, Default, PartialEq)]
56360#[non_exhaustive]
56361pub struct MetadataSchema {
56362    /// Output only. The resource name of the MetadataSchema.
56363    pub name: std::string::String,
56364
56365    /// The version of the MetadataSchema. The version's format must match
56366    /// the following regular expression: `^[0-9]+[.][0-9]+[.][0-9]+$`, which would
56367    /// allow to order/compare different versions. Example: 1.0.0, 1.0.1, etc.
56368    pub schema_version: std::string::String,
56369
56370    /// Required. The raw YAML string representation of the MetadataSchema. The
56371    /// combination of [MetadataSchema.version] and the schema name given by
56372    /// `title` in [MetadataSchema.schema] must be unique within a MetadataStore.
56373    ///
56374    /// The schema is defined as an OpenAPI 3.0.2
56375    /// [MetadataSchema
56376    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject)
56377    pub schema: std::string::String,
56378
56379    /// The type of the MetadataSchema. This is a property that identifies which
56380    /// metadata types will use the MetadataSchema.
56381    pub schema_type: crate::model::metadata_schema::MetadataSchemaType,
56382
56383    /// Output only. Timestamp when this MetadataSchema was created.
56384    pub create_time: std::option::Option<wkt::Timestamp>,
56385
56386    /// Description of the Metadata Schema
56387    pub description: std::string::String,
56388
56389    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56390}
56391
56392#[cfg(feature = "metadata-service")]
56393impl MetadataSchema {
56394    pub fn new() -> Self {
56395        std::default::Default::default()
56396    }
56397
56398    /// Sets the value of [name][crate::model::MetadataSchema::name].
56399    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
56400        self.name = v.into();
56401        self
56402    }
56403
56404    /// Sets the value of [schema_version][crate::model::MetadataSchema::schema_version].
56405    pub fn set_schema_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
56406        self.schema_version = v.into();
56407        self
56408    }
56409
56410    /// Sets the value of [schema][crate::model::MetadataSchema::schema].
56411    pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
56412        self.schema = v.into();
56413        self
56414    }
56415
56416    /// Sets the value of [schema_type][crate::model::MetadataSchema::schema_type].
56417    pub fn set_schema_type<
56418        T: std::convert::Into<crate::model::metadata_schema::MetadataSchemaType>,
56419    >(
56420        mut self,
56421        v: T,
56422    ) -> Self {
56423        self.schema_type = v.into();
56424        self
56425    }
56426
56427    /// Sets the value of [create_time][crate::model::MetadataSchema::create_time].
56428    pub fn set_create_time<T>(mut self, v: T) -> Self
56429    where
56430        T: std::convert::Into<wkt::Timestamp>,
56431    {
56432        self.create_time = std::option::Option::Some(v.into());
56433        self
56434    }
56435
56436    /// Sets or clears the value of [create_time][crate::model::MetadataSchema::create_time].
56437    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
56438    where
56439        T: std::convert::Into<wkt::Timestamp>,
56440    {
56441        self.create_time = v.map(|x| x.into());
56442        self
56443    }
56444
56445    /// Sets the value of [description][crate::model::MetadataSchema::description].
56446    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
56447        self.description = v.into();
56448        self
56449    }
56450}
56451
56452#[cfg(feature = "metadata-service")]
56453impl wkt::message::Message for MetadataSchema {
56454    fn typename() -> &'static str {
56455        "type.googleapis.com/google.cloud.aiplatform.v1.MetadataSchema"
56456    }
56457}
56458
56459/// Defines additional types related to [MetadataSchema].
56460#[cfg(feature = "metadata-service")]
56461pub mod metadata_schema {
56462    #[allow(unused_imports)]
56463    use super::*;
56464
56465    /// Describes the type of the MetadataSchema.
56466    ///
56467    /// # Working with unknown values
56468    ///
56469    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
56470    /// additional enum variants at any time. Adding new variants is not considered
56471    /// a breaking change. Applications should write their code in anticipation of:
56472    ///
56473    /// - New values appearing in future releases of the client library, **and**
56474    /// - New values received dynamically, without application changes.
56475    ///
56476    /// Please consult the [Working with enums] section in the user guide for some
56477    /// guidelines.
56478    ///
56479    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
56480    #[cfg(feature = "metadata-service")]
56481    #[derive(Clone, Debug, PartialEq)]
56482    #[non_exhaustive]
56483    pub enum MetadataSchemaType {
56484        /// Unspecified type for the MetadataSchema.
56485        Unspecified,
56486        /// A type indicating that the MetadataSchema will be used by Artifacts.
56487        ArtifactType,
56488        /// A typee indicating that the MetadataSchema will be used by Executions.
56489        ExecutionType,
56490        /// A state indicating that the MetadataSchema will be used by Contexts.
56491        ContextType,
56492        /// If set, the enum was initialized with an unknown value.
56493        ///
56494        /// Applications can examine the value using [MetadataSchemaType::value] or
56495        /// [MetadataSchemaType::name].
56496        UnknownValue(metadata_schema_type::UnknownValue),
56497    }
56498
56499    #[doc(hidden)]
56500    #[cfg(feature = "metadata-service")]
56501    pub mod metadata_schema_type {
56502        #[allow(unused_imports)]
56503        use super::*;
56504        #[derive(Clone, Debug, PartialEq)]
56505        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
56506    }
56507
56508    #[cfg(feature = "metadata-service")]
56509    impl MetadataSchemaType {
56510        /// Gets the enum value.
56511        ///
56512        /// Returns `None` if the enum contains an unknown value deserialized from
56513        /// the string representation of enums.
56514        pub fn value(&self) -> std::option::Option<i32> {
56515            match self {
56516                Self::Unspecified => std::option::Option::Some(0),
56517                Self::ArtifactType => std::option::Option::Some(1),
56518                Self::ExecutionType => std::option::Option::Some(2),
56519                Self::ContextType => std::option::Option::Some(3),
56520                Self::UnknownValue(u) => u.0.value(),
56521            }
56522        }
56523
56524        /// Gets the enum value as a string.
56525        ///
56526        /// Returns `None` if the enum contains an unknown value deserialized from
56527        /// the integer representation of enums.
56528        pub fn name(&self) -> std::option::Option<&str> {
56529            match self {
56530                Self::Unspecified => std::option::Option::Some("METADATA_SCHEMA_TYPE_UNSPECIFIED"),
56531                Self::ArtifactType => std::option::Option::Some("ARTIFACT_TYPE"),
56532                Self::ExecutionType => std::option::Option::Some("EXECUTION_TYPE"),
56533                Self::ContextType => std::option::Option::Some("CONTEXT_TYPE"),
56534                Self::UnknownValue(u) => u.0.name(),
56535            }
56536        }
56537    }
56538
56539    #[cfg(feature = "metadata-service")]
56540    impl std::default::Default for MetadataSchemaType {
56541        fn default() -> Self {
56542            use std::convert::From;
56543            Self::from(0)
56544        }
56545    }
56546
56547    #[cfg(feature = "metadata-service")]
56548    impl std::fmt::Display for MetadataSchemaType {
56549        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
56550            wkt::internal::display_enum(f, self.name(), self.value())
56551        }
56552    }
56553
56554    #[cfg(feature = "metadata-service")]
56555    impl std::convert::From<i32> for MetadataSchemaType {
56556        fn from(value: i32) -> Self {
56557            match value {
56558                0 => Self::Unspecified,
56559                1 => Self::ArtifactType,
56560                2 => Self::ExecutionType,
56561                3 => Self::ContextType,
56562                _ => Self::UnknownValue(metadata_schema_type::UnknownValue(
56563                    wkt::internal::UnknownEnumValue::Integer(value),
56564                )),
56565            }
56566        }
56567    }
56568
56569    #[cfg(feature = "metadata-service")]
56570    impl std::convert::From<&str> for MetadataSchemaType {
56571        fn from(value: &str) -> Self {
56572            use std::string::ToString;
56573            match value {
56574                "METADATA_SCHEMA_TYPE_UNSPECIFIED" => Self::Unspecified,
56575                "ARTIFACT_TYPE" => Self::ArtifactType,
56576                "EXECUTION_TYPE" => Self::ExecutionType,
56577                "CONTEXT_TYPE" => Self::ContextType,
56578                _ => Self::UnknownValue(metadata_schema_type::UnknownValue(
56579                    wkt::internal::UnknownEnumValue::String(value.to_string()),
56580                )),
56581            }
56582        }
56583    }
56584
56585    #[cfg(feature = "metadata-service")]
56586    impl serde::ser::Serialize for MetadataSchemaType {
56587        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
56588        where
56589            S: serde::Serializer,
56590        {
56591            match self {
56592                Self::Unspecified => serializer.serialize_i32(0),
56593                Self::ArtifactType => serializer.serialize_i32(1),
56594                Self::ExecutionType => serializer.serialize_i32(2),
56595                Self::ContextType => serializer.serialize_i32(3),
56596                Self::UnknownValue(u) => u.0.serialize(serializer),
56597            }
56598        }
56599    }
56600
56601    #[cfg(feature = "metadata-service")]
56602    impl<'de> serde::de::Deserialize<'de> for MetadataSchemaType {
56603        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
56604        where
56605            D: serde::Deserializer<'de>,
56606        {
56607            deserializer.deserialize_any(wkt::internal::EnumVisitor::<MetadataSchemaType>::new(
56608                ".google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType",
56609            ))
56610        }
56611    }
56612}
56613
56614/// Request message for
56615/// [MetadataService.CreateMetadataStore][google.cloud.aiplatform.v1.MetadataService.CreateMetadataStore].
56616///
56617/// [google.cloud.aiplatform.v1.MetadataService.CreateMetadataStore]: crate::client::MetadataService::create_metadata_store
56618#[cfg(feature = "metadata-service")]
56619#[derive(Clone, Default, PartialEq)]
56620#[non_exhaustive]
56621pub struct CreateMetadataStoreRequest {
56622    /// Required. The resource name of the Location where the MetadataStore should
56623    /// be created.
56624    /// Format: `projects/{project}/locations/{location}/`
56625    pub parent: std::string::String,
56626
56627    /// Required. The MetadataStore to create.
56628    pub metadata_store: std::option::Option<crate::model::MetadataStore>,
56629
56630    /// The {metadatastore} portion of the resource name with the format:
56631    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
56632    /// If not provided, the MetadataStore's ID will be a UUID generated by the
56633    /// service.
56634    /// Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
56635    /// Must be unique across all MetadataStores in the parent Location.
56636    /// (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED
56637    /// if the caller can't view the preexisting MetadataStore.)
56638    pub metadata_store_id: std::string::String,
56639
56640    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56641}
56642
56643#[cfg(feature = "metadata-service")]
56644impl CreateMetadataStoreRequest {
56645    pub fn new() -> Self {
56646        std::default::Default::default()
56647    }
56648
56649    /// Sets the value of [parent][crate::model::CreateMetadataStoreRequest::parent].
56650    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
56651        self.parent = v.into();
56652        self
56653    }
56654
56655    /// Sets the value of [metadata_store][crate::model::CreateMetadataStoreRequest::metadata_store].
56656    pub fn set_metadata_store<T>(mut self, v: T) -> Self
56657    where
56658        T: std::convert::Into<crate::model::MetadataStore>,
56659    {
56660        self.metadata_store = std::option::Option::Some(v.into());
56661        self
56662    }
56663
56664    /// Sets or clears the value of [metadata_store][crate::model::CreateMetadataStoreRequest::metadata_store].
56665    pub fn set_or_clear_metadata_store<T>(mut self, v: std::option::Option<T>) -> Self
56666    where
56667        T: std::convert::Into<crate::model::MetadataStore>,
56668    {
56669        self.metadata_store = v.map(|x| x.into());
56670        self
56671    }
56672
56673    /// Sets the value of [metadata_store_id][crate::model::CreateMetadataStoreRequest::metadata_store_id].
56674    pub fn set_metadata_store_id<T: std::convert::Into<std::string::String>>(
56675        mut self,
56676        v: T,
56677    ) -> Self {
56678        self.metadata_store_id = v.into();
56679        self
56680    }
56681}
56682
56683#[cfg(feature = "metadata-service")]
56684impl wkt::message::Message for CreateMetadataStoreRequest {
56685    fn typename() -> &'static str {
56686        "type.googleapis.com/google.cloud.aiplatform.v1.CreateMetadataStoreRequest"
56687    }
56688}
56689
56690/// Details of operations that perform
56691/// [MetadataService.CreateMetadataStore][google.cloud.aiplatform.v1.MetadataService.CreateMetadataStore].
56692///
56693/// [google.cloud.aiplatform.v1.MetadataService.CreateMetadataStore]: crate::client::MetadataService::create_metadata_store
56694#[cfg(feature = "metadata-service")]
56695#[derive(Clone, Default, PartialEq)]
56696#[non_exhaustive]
56697pub struct CreateMetadataStoreOperationMetadata {
56698    /// Operation metadata for creating a MetadataStore.
56699    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
56700
56701    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56702}
56703
56704#[cfg(feature = "metadata-service")]
56705impl CreateMetadataStoreOperationMetadata {
56706    pub fn new() -> Self {
56707        std::default::Default::default()
56708    }
56709
56710    /// Sets the value of [generic_metadata][crate::model::CreateMetadataStoreOperationMetadata::generic_metadata].
56711    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
56712    where
56713        T: std::convert::Into<crate::model::GenericOperationMetadata>,
56714    {
56715        self.generic_metadata = std::option::Option::Some(v.into());
56716        self
56717    }
56718
56719    /// Sets or clears the value of [generic_metadata][crate::model::CreateMetadataStoreOperationMetadata::generic_metadata].
56720    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
56721    where
56722        T: std::convert::Into<crate::model::GenericOperationMetadata>,
56723    {
56724        self.generic_metadata = v.map(|x| x.into());
56725        self
56726    }
56727}
56728
56729#[cfg(feature = "metadata-service")]
56730impl wkt::message::Message for CreateMetadataStoreOperationMetadata {
56731    fn typename() -> &'static str {
56732        "type.googleapis.com/google.cloud.aiplatform.v1.CreateMetadataStoreOperationMetadata"
56733    }
56734}
56735
56736/// Request message for
56737/// [MetadataService.GetMetadataStore][google.cloud.aiplatform.v1.MetadataService.GetMetadataStore].
56738///
56739/// [google.cloud.aiplatform.v1.MetadataService.GetMetadataStore]: crate::client::MetadataService::get_metadata_store
56740#[cfg(feature = "metadata-service")]
56741#[derive(Clone, Default, PartialEq)]
56742#[non_exhaustive]
56743pub struct GetMetadataStoreRequest {
56744    /// Required. The resource name of the MetadataStore to retrieve.
56745    /// Format:
56746    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
56747    pub name: std::string::String,
56748
56749    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56750}
56751
56752#[cfg(feature = "metadata-service")]
56753impl GetMetadataStoreRequest {
56754    pub fn new() -> Self {
56755        std::default::Default::default()
56756    }
56757
56758    /// Sets the value of [name][crate::model::GetMetadataStoreRequest::name].
56759    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
56760        self.name = v.into();
56761        self
56762    }
56763}
56764
56765#[cfg(feature = "metadata-service")]
56766impl wkt::message::Message for GetMetadataStoreRequest {
56767    fn typename() -> &'static str {
56768        "type.googleapis.com/google.cloud.aiplatform.v1.GetMetadataStoreRequest"
56769    }
56770}
56771
56772/// Request message for
56773/// [MetadataService.ListMetadataStores][google.cloud.aiplatform.v1.MetadataService.ListMetadataStores].
56774///
56775/// [google.cloud.aiplatform.v1.MetadataService.ListMetadataStores]: crate::client::MetadataService::list_metadata_stores
56776#[cfg(feature = "metadata-service")]
56777#[derive(Clone, Default, PartialEq)]
56778#[non_exhaustive]
56779pub struct ListMetadataStoresRequest {
56780    /// Required. The Location whose MetadataStores should be listed.
56781    /// Format:
56782    /// `projects/{project}/locations/{location}`
56783    pub parent: std::string::String,
56784
56785    /// The maximum number of Metadata Stores to return. The service may return
56786    /// fewer.
56787    /// Must be in range 1-1000, inclusive. Defaults to 100.
56788    pub page_size: i32,
56789
56790    /// A page token, received from a previous
56791    /// [MetadataService.ListMetadataStores][google.cloud.aiplatform.v1.MetadataService.ListMetadataStores]
56792    /// call. Provide this to retrieve the subsequent page.
56793    ///
56794    /// When paginating, all other provided parameters must match the call that
56795    /// provided the page token. (Otherwise the request will fail with
56796    /// INVALID_ARGUMENT error.)
56797    ///
56798    /// [google.cloud.aiplatform.v1.MetadataService.ListMetadataStores]: crate::client::MetadataService::list_metadata_stores
56799    pub page_token: std::string::String,
56800
56801    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56802}
56803
56804#[cfg(feature = "metadata-service")]
56805impl ListMetadataStoresRequest {
56806    pub fn new() -> Self {
56807        std::default::Default::default()
56808    }
56809
56810    /// Sets the value of [parent][crate::model::ListMetadataStoresRequest::parent].
56811    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
56812        self.parent = v.into();
56813        self
56814    }
56815
56816    /// Sets the value of [page_size][crate::model::ListMetadataStoresRequest::page_size].
56817    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
56818        self.page_size = v.into();
56819        self
56820    }
56821
56822    /// Sets the value of [page_token][crate::model::ListMetadataStoresRequest::page_token].
56823    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
56824        self.page_token = v.into();
56825        self
56826    }
56827}
56828
56829#[cfg(feature = "metadata-service")]
56830impl wkt::message::Message for ListMetadataStoresRequest {
56831    fn typename() -> &'static str {
56832        "type.googleapis.com/google.cloud.aiplatform.v1.ListMetadataStoresRequest"
56833    }
56834}
56835
56836/// Response message for
56837/// [MetadataService.ListMetadataStores][google.cloud.aiplatform.v1.MetadataService.ListMetadataStores].
56838///
56839/// [google.cloud.aiplatform.v1.MetadataService.ListMetadataStores]: crate::client::MetadataService::list_metadata_stores
56840#[cfg(feature = "metadata-service")]
56841#[derive(Clone, Default, PartialEq)]
56842#[non_exhaustive]
56843pub struct ListMetadataStoresResponse {
56844    /// The MetadataStores found for the Location.
56845    pub metadata_stores: std::vec::Vec<crate::model::MetadataStore>,
56846
56847    /// A token, which can be sent as
56848    /// [ListMetadataStoresRequest.page_token][google.cloud.aiplatform.v1.ListMetadataStoresRequest.page_token]
56849    /// to retrieve the next page. If this field is not populated, there are no
56850    /// subsequent pages.
56851    ///
56852    /// [google.cloud.aiplatform.v1.ListMetadataStoresRequest.page_token]: crate::model::ListMetadataStoresRequest::page_token
56853    pub next_page_token: std::string::String,
56854
56855    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56856}
56857
56858#[cfg(feature = "metadata-service")]
56859impl ListMetadataStoresResponse {
56860    pub fn new() -> Self {
56861        std::default::Default::default()
56862    }
56863
56864    /// Sets the value of [metadata_stores][crate::model::ListMetadataStoresResponse::metadata_stores].
56865    pub fn set_metadata_stores<T, V>(mut self, v: T) -> Self
56866    where
56867        T: std::iter::IntoIterator<Item = V>,
56868        V: std::convert::Into<crate::model::MetadataStore>,
56869    {
56870        use std::iter::Iterator;
56871        self.metadata_stores = v.into_iter().map(|i| i.into()).collect();
56872        self
56873    }
56874
56875    /// Sets the value of [next_page_token][crate::model::ListMetadataStoresResponse::next_page_token].
56876    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
56877        self.next_page_token = v.into();
56878        self
56879    }
56880}
56881
56882#[cfg(feature = "metadata-service")]
56883impl wkt::message::Message for ListMetadataStoresResponse {
56884    fn typename() -> &'static str {
56885        "type.googleapis.com/google.cloud.aiplatform.v1.ListMetadataStoresResponse"
56886    }
56887}
56888
56889#[cfg(feature = "metadata-service")]
56890#[doc(hidden)]
56891impl gax::paginator::internal::PageableResponse for ListMetadataStoresResponse {
56892    type PageItem = crate::model::MetadataStore;
56893
56894    fn items(self) -> std::vec::Vec<Self::PageItem> {
56895        self.metadata_stores
56896    }
56897
56898    fn next_page_token(&self) -> std::string::String {
56899        use std::clone::Clone;
56900        self.next_page_token.clone()
56901    }
56902}
56903
56904/// Request message for
56905/// [MetadataService.DeleteMetadataStore][google.cloud.aiplatform.v1.MetadataService.DeleteMetadataStore].
56906///
56907/// [google.cloud.aiplatform.v1.MetadataService.DeleteMetadataStore]: crate::client::MetadataService::delete_metadata_store
56908#[cfg(feature = "metadata-service")]
56909#[derive(Clone, Default, PartialEq)]
56910#[non_exhaustive]
56911pub struct DeleteMetadataStoreRequest {
56912    /// Required. The resource name of the MetadataStore to delete.
56913    /// Format:
56914    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
56915    pub name: std::string::String,
56916
56917    /// Deprecated: Field is no longer supported.
56918    #[deprecated]
56919    pub force: bool,
56920
56921    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56922}
56923
56924#[cfg(feature = "metadata-service")]
56925impl DeleteMetadataStoreRequest {
56926    pub fn new() -> Self {
56927        std::default::Default::default()
56928    }
56929
56930    /// Sets the value of [name][crate::model::DeleteMetadataStoreRequest::name].
56931    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
56932        self.name = v.into();
56933        self
56934    }
56935
56936    /// Sets the value of [force][crate::model::DeleteMetadataStoreRequest::force].
56937    #[deprecated]
56938    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
56939        self.force = v.into();
56940        self
56941    }
56942}
56943
56944#[cfg(feature = "metadata-service")]
56945impl wkt::message::Message for DeleteMetadataStoreRequest {
56946    fn typename() -> &'static str {
56947        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteMetadataStoreRequest"
56948    }
56949}
56950
56951/// Details of operations that perform
56952/// [MetadataService.DeleteMetadataStore][google.cloud.aiplatform.v1.MetadataService.DeleteMetadataStore].
56953///
56954/// [google.cloud.aiplatform.v1.MetadataService.DeleteMetadataStore]: crate::client::MetadataService::delete_metadata_store
56955#[cfg(feature = "metadata-service")]
56956#[derive(Clone, Default, PartialEq)]
56957#[non_exhaustive]
56958pub struct DeleteMetadataStoreOperationMetadata {
56959    /// Operation metadata for deleting a MetadataStore.
56960    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
56961
56962    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
56963}
56964
56965#[cfg(feature = "metadata-service")]
56966impl DeleteMetadataStoreOperationMetadata {
56967    pub fn new() -> Self {
56968        std::default::Default::default()
56969    }
56970
56971    /// Sets the value of [generic_metadata][crate::model::DeleteMetadataStoreOperationMetadata::generic_metadata].
56972    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
56973    where
56974        T: std::convert::Into<crate::model::GenericOperationMetadata>,
56975    {
56976        self.generic_metadata = std::option::Option::Some(v.into());
56977        self
56978    }
56979
56980    /// Sets or clears the value of [generic_metadata][crate::model::DeleteMetadataStoreOperationMetadata::generic_metadata].
56981    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
56982    where
56983        T: std::convert::Into<crate::model::GenericOperationMetadata>,
56984    {
56985        self.generic_metadata = v.map(|x| x.into());
56986        self
56987    }
56988}
56989
56990#[cfg(feature = "metadata-service")]
56991impl wkt::message::Message for DeleteMetadataStoreOperationMetadata {
56992    fn typename() -> &'static str {
56993        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteMetadataStoreOperationMetadata"
56994    }
56995}
56996
56997/// Request message for
56998/// [MetadataService.CreateArtifact][google.cloud.aiplatform.v1.MetadataService.CreateArtifact].
56999///
57000/// [google.cloud.aiplatform.v1.MetadataService.CreateArtifact]: crate::client::MetadataService::create_artifact
57001#[cfg(feature = "metadata-service")]
57002#[derive(Clone, Default, PartialEq)]
57003#[non_exhaustive]
57004pub struct CreateArtifactRequest {
57005    /// Required. The resource name of the MetadataStore where the Artifact should
57006    /// be created.
57007    /// Format:
57008    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
57009    pub parent: std::string::String,
57010
57011    /// Required. The Artifact to create.
57012    pub artifact: std::option::Option<crate::model::Artifact>,
57013
57014    /// The {artifact} portion of the resource name with the format:
57015    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
57016    /// If not provided, the Artifact's ID will be a UUID generated by the service.
57017    /// Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
57018    /// Must be unique across all Artifacts in the parent MetadataStore. (Otherwise
57019    /// the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the
57020    /// caller can't view the preexisting Artifact.)
57021    pub artifact_id: std::string::String,
57022
57023    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57024}
57025
57026#[cfg(feature = "metadata-service")]
57027impl CreateArtifactRequest {
57028    pub fn new() -> Self {
57029        std::default::Default::default()
57030    }
57031
57032    /// Sets the value of [parent][crate::model::CreateArtifactRequest::parent].
57033    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57034        self.parent = v.into();
57035        self
57036    }
57037
57038    /// Sets the value of [artifact][crate::model::CreateArtifactRequest::artifact].
57039    pub fn set_artifact<T>(mut self, v: T) -> Self
57040    where
57041        T: std::convert::Into<crate::model::Artifact>,
57042    {
57043        self.artifact = std::option::Option::Some(v.into());
57044        self
57045    }
57046
57047    /// Sets or clears the value of [artifact][crate::model::CreateArtifactRequest::artifact].
57048    pub fn set_or_clear_artifact<T>(mut self, v: std::option::Option<T>) -> Self
57049    where
57050        T: std::convert::Into<crate::model::Artifact>,
57051    {
57052        self.artifact = v.map(|x| x.into());
57053        self
57054    }
57055
57056    /// Sets the value of [artifact_id][crate::model::CreateArtifactRequest::artifact_id].
57057    pub fn set_artifact_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57058        self.artifact_id = v.into();
57059        self
57060    }
57061}
57062
57063#[cfg(feature = "metadata-service")]
57064impl wkt::message::Message for CreateArtifactRequest {
57065    fn typename() -> &'static str {
57066        "type.googleapis.com/google.cloud.aiplatform.v1.CreateArtifactRequest"
57067    }
57068}
57069
57070/// Request message for
57071/// [MetadataService.GetArtifact][google.cloud.aiplatform.v1.MetadataService.GetArtifact].
57072///
57073/// [google.cloud.aiplatform.v1.MetadataService.GetArtifact]: crate::client::MetadataService::get_artifact
57074#[cfg(feature = "metadata-service")]
57075#[derive(Clone, Default, PartialEq)]
57076#[non_exhaustive]
57077pub struct GetArtifactRequest {
57078    /// Required. The resource name of the Artifact to retrieve.
57079    /// Format:
57080    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
57081    pub name: std::string::String,
57082
57083    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57084}
57085
57086#[cfg(feature = "metadata-service")]
57087impl GetArtifactRequest {
57088    pub fn new() -> Self {
57089        std::default::Default::default()
57090    }
57091
57092    /// Sets the value of [name][crate::model::GetArtifactRequest::name].
57093    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57094        self.name = v.into();
57095        self
57096    }
57097}
57098
57099#[cfg(feature = "metadata-service")]
57100impl wkt::message::Message for GetArtifactRequest {
57101    fn typename() -> &'static str {
57102        "type.googleapis.com/google.cloud.aiplatform.v1.GetArtifactRequest"
57103    }
57104}
57105
57106/// Request message for
57107/// [MetadataService.ListArtifacts][google.cloud.aiplatform.v1.MetadataService.ListArtifacts].
57108///
57109/// [google.cloud.aiplatform.v1.MetadataService.ListArtifacts]: crate::client::MetadataService::list_artifacts
57110#[cfg(feature = "metadata-service")]
57111#[derive(Clone, Default, PartialEq)]
57112#[non_exhaustive]
57113pub struct ListArtifactsRequest {
57114    /// Required. The MetadataStore whose Artifacts should be listed.
57115    /// Format:
57116    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
57117    pub parent: std::string::String,
57118
57119    /// The maximum number of Artifacts to return. The service may return fewer.
57120    /// Must be in range 1-1000, inclusive. Defaults to 100.
57121    pub page_size: i32,
57122
57123    /// A page token, received from a previous
57124    /// [MetadataService.ListArtifacts][google.cloud.aiplatform.v1.MetadataService.ListArtifacts]
57125    /// call. Provide this to retrieve the subsequent page.
57126    ///
57127    /// When paginating, all other provided parameters must match the call that
57128    /// provided the page token. (Otherwise the request will fail with
57129    /// INVALID_ARGUMENT error.)
57130    ///
57131    /// [google.cloud.aiplatform.v1.MetadataService.ListArtifacts]: crate::client::MetadataService::list_artifacts
57132    pub page_token: std::string::String,
57133
57134    /// Filter specifying the boolean condition for the Artifacts to satisfy in
57135    /// order to be part of the result set.
57136    /// The syntax to define filter query is based on <https://google.aip.dev/160>.
57137    /// The supported set of filters include the following:
57138    ///
57139    /// * **Attribute filtering**:
57140    ///   For example: `display_name = "test"`.
57141    ///   Supported fields include: `name`, `display_name`, `uri`, `state`,
57142    ///   `schema_title`, `create_time`, and `update_time`.
57143    ///   Time fields, such as `create_time` and `update_time`, require values
57144    ///   specified in RFC-3339 format.
57145    ///   For example: `create_time = "2020-11-19T11:30:00-04:00"`
57146    /// * **Metadata field**:
57147    ///   To filter on metadata fields use traversal operation as follows:
57148    ///   `metadata.<field_name>.<type_value>`.
57149    ///   For example: `metadata.field_1.number_value = 10.0`
57150    ///   In case the field name contains special characters (such as colon), one
57151    ///   can embed it inside double quote.
57152    ///   For example: `metadata."field:1".number_value = 10.0`
57153    /// * **Context based filtering**:
57154    ///   To filter Artifacts based on the contexts to which they belong, use the
57155    ///   function operator with the full resource name
57156    ///   `in_context(<context-name>)`.
57157    ///   For example:
57158    ///   `in_context("projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context-id>")`
57159    ///
57160    /// Each of the above supported filter types can be combined together using
57161    /// logical operators (`AND` & `OR`). Maximum nested expression depth allowed
57162    /// is 5.
57163    ///
57164    /// For example: `display_name = "test" AND metadata.field1.bool_value = true`.
57165    pub filter: std::string::String,
57166
57167    /// How the list of messages is ordered. Specify the values to order by and an
57168    /// ordering operation. The default sorting order is ascending. To specify
57169    /// descending order for a field, users append a " desc" suffix; for example:
57170    /// "foo desc, bar".
57171    /// Subfields are specified with a `.` character, such as foo.bar.
57172    /// see <https://google.aip.dev/132#ordering> for more details.
57173    pub order_by: std::string::String,
57174
57175    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57176}
57177
57178#[cfg(feature = "metadata-service")]
57179impl ListArtifactsRequest {
57180    pub fn new() -> Self {
57181        std::default::Default::default()
57182    }
57183
57184    /// Sets the value of [parent][crate::model::ListArtifactsRequest::parent].
57185    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57186        self.parent = v.into();
57187        self
57188    }
57189
57190    /// Sets the value of [page_size][crate::model::ListArtifactsRequest::page_size].
57191    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
57192        self.page_size = v.into();
57193        self
57194    }
57195
57196    /// Sets the value of [page_token][crate::model::ListArtifactsRequest::page_token].
57197    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57198        self.page_token = v.into();
57199        self
57200    }
57201
57202    /// Sets the value of [filter][crate::model::ListArtifactsRequest::filter].
57203    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57204        self.filter = v.into();
57205        self
57206    }
57207
57208    /// Sets the value of [order_by][crate::model::ListArtifactsRequest::order_by].
57209    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57210        self.order_by = v.into();
57211        self
57212    }
57213}
57214
57215#[cfg(feature = "metadata-service")]
57216impl wkt::message::Message for ListArtifactsRequest {
57217    fn typename() -> &'static str {
57218        "type.googleapis.com/google.cloud.aiplatform.v1.ListArtifactsRequest"
57219    }
57220}
57221
57222/// Response message for
57223/// [MetadataService.ListArtifacts][google.cloud.aiplatform.v1.MetadataService.ListArtifacts].
57224///
57225/// [google.cloud.aiplatform.v1.MetadataService.ListArtifacts]: crate::client::MetadataService::list_artifacts
57226#[cfg(feature = "metadata-service")]
57227#[derive(Clone, Default, PartialEq)]
57228#[non_exhaustive]
57229pub struct ListArtifactsResponse {
57230    /// The Artifacts retrieved from the MetadataStore.
57231    pub artifacts: std::vec::Vec<crate::model::Artifact>,
57232
57233    /// A token, which can be sent as
57234    /// [ListArtifactsRequest.page_token][google.cloud.aiplatform.v1.ListArtifactsRequest.page_token]
57235    /// to retrieve the next page.
57236    /// If this field is not populated, there are no subsequent pages.
57237    ///
57238    /// [google.cloud.aiplatform.v1.ListArtifactsRequest.page_token]: crate::model::ListArtifactsRequest::page_token
57239    pub next_page_token: std::string::String,
57240
57241    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57242}
57243
57244#[cfg(feature = "metadata-service")]
57245impl ListArtifactsResponse {
57246    pub fn new() -> Self {
57247        std::default::Default::default()
57248    }
57249
57250    /// Sets the value of [artifacts][crate::model::ListArtifactsResponse::artifacts].
57251    pub fn set_artifacts<T, V>(mut self, v: T) -> Self
57252    where
57253        T: std::iter::IntoIterator<Item = V>,
57254        V: std::convert::Into<crate::model::Artifact>,
57255    {
57256        use std::iter::Iterator;
57257        self.artifacts = v.into_iter().map(|i| i.into()).collect();
57258        self
57259    }
57260
57261    /// Sets the value of [next_page_token][crate::model::ListArtifactsResponse::next_page_token].
57262    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57263        self.next_page_token = v.into();
57264        self
57265    }
57266}
57267
57268#[cfg(feature = "metadata-service")]
57269impl wkt::message::Message for ListArtifactsResponse {
57270    fn typename() -> &'static str {
57271        "type.googleapis.com/google.cloud.aiplatform.v1.ListArtifactsResponse"
57272    }
57273}
57274
57275#[cfg(feature = "metadata-service")]
57276#[doc(hidden)]
57277impl gax::paginator::internal::PageableResponse for ListArtifactsResponse {
57278    type PageItem = crate::model::Artifact;
57279
57280    fn items(self) -> std::vec::Vec<Self::PageItem> {
57281        self.artifacts
57282    }
57283
57284    fn next_page_token(&self) -> std::string::String {
57285        use std::clone::Clone;
57286        self.next_page_token.clone()
57287    }
57288}
57289
57290/// Request message for
57291/// [MetadataService.UpdateArtifact][google.cloud.aiplatform.v1.MetadataService.UpdateArtifact].
57292///
57293/// [google.cloud.aiplatform.v1.MetadataService.UpdateArtifact]: crate::client::MetadataService::update_artifact
57294#[cfg(feature = "metadata-service")]
57295#[derive(Clone, Default, PartialEq)]
57296#[non_exhaustive]
57297pub struct UpdateArtifactRequest {
57298    /// Required. The Artifact containing updates.
57299    /// The Artifact's [Artifact.name][google.cloud.aiplatform.v1.Artifact.name]
57300    /// field is used to identify the Artifact to be updated. Format:
57301    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
57302    ///
57303    /// [google.cloud.aiplatform.v1.Artifact.name]: crate::model::Artifact::name
57304    pub artifact: std::option::Option<crate::model::Artifact>,
57305
57306    /// Optional. A FieldMask indicating which fields should be updated.
57307    pub update_mask: std::option::Option<wkt::FieldMask>,
57308
57309    /// If set to true, and the [Artifact][google.cloud.aiplatform.v1.Artifact] is
57310    /// not found, a new [Artifact][google.cloud.aiplatform.v1.Artifact] is
57311    /// created.
57312    ///
57313    /// [google.cloud.aiplatform.v1.Artifact]: crate::model::Artifact
57314    pub allow_missing: bool,
57315
57316    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57317}
57318
57319#[cfg(feature = "metadata-service")]
57320impl UpdateArtifactRequest {
57321    pub fn new() -> Self {
57322        std::default::Default::default()
57323    }
57324
57325    /// Sets the value of [artifact][crate::model::UpdateArtifactRequest::artifact].
57326    pub fn set_artifact<T>(mut self, v: T) -> Self
57327    where
57328        T: std::convert::Into<crate::model::Artifact>,
57329    {
57330        self.artifact = std::option::Option::Some(v.into());
57331        self
57332    }
57333
57334    /// Sets or clears the value of [artifact][crate::model::UpdateArtifactRequest::artifact].
57335    pub fn set_or_clear_artifact<T>(mut self, v: std::option::Option<T>) -> Self
57336    where
57337        T: std::convert::Into<crate::model::Artifact>,
57338    {
57339        self.artifact = v.map(|x| x.into());
57340        self
57341    }
57342
57343    /// Sets the value of [update_mask][crate::model::UpdateArtifactRequest::update_mask].
57344    pub fn set_update_mask<T>(mut self, v: T) -> Self
57345    where
57346        T: std::convert::Into<wkt::FieldMask>,
57347    {
57348        self.update_mask = std::option::Option::Some(v.into());
57349        self
57350    }
57351
57352    /// Sets or clears the value of [update_mask][crate::model::UpdateArtifactRequest::update_mask].
57353    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
57354    where
57355        T: std::convert::Into<wkt::FieldMask>,
57356    {
57357        self.update_mask = v.map(|x| x.into());
57358        self
57359    }
57360
57361    /// Sets the value of [allow_missing][crate::model::UpdateArtifactRequest::allow_missing].
57362    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
57363        self.allow_missing = v.into();
57364        self
57365    }
57366}
57367
57368#[cfg(feature = "metadata-service")]
57369impl wkt::message::Message for UpdateArtifactRequest {
57370    fn typename() -> &'static str {
57371        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateArtifactRequest"
57372    }
57373}
57374
57375/// Request message for
57376/// [MetadataService.DeleteArtifact][google.cloud.aiplatform.v1.MetadataService.DeleteArtifact].
57377///
57378/// [google.cloud.aiplatform.v1.MetadataService.DeleteArtifact]: crate::client::MetadataService::delete_artifact
57379#[cfg(feature = "metadata-service")]
57380#[derive(Clone, Default, PartialEq)]
57381#[non_exhaustive]
57382pub struct DeleteArtifactRequest {
57383    /// Required. The resource name of the Artifact to delete.
57384    /// Format:
57385    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
57386    pub name: std::string::String,
57387
57388    /// Optional. The etag of the Artifact to delete.
57389    /// If this is provided, it must match the server's etag. Otherwise, the
57390    /// request will fail with a FAILED_PRECONDITION.
57391    pub etag: std::string::String,
57392
57393    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57394}
57395
57396#[cfg(feature = "metadata-service")]
57397impl DeleteArtifactRequest {
57398    pub fn new() -> Self {
57399        std::default::Default::default()
57400    }
57401
57402    /// Sets the value of [name][crate::model::DeleteArtifactRequest::name].
57403    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57404        self.name = v.into();
57405        self
57406    }
57407
57408    /// Sets the value of [etag][crate::model::DeleteArtifactRequest::etag].
57409    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57410        self.etag = v.into();
57411        self
57412    }
57413}
57414
57415#[cfg(feature = "metadata-service")]
57416impl wkt::message::Message for DeleteArtifactRequest {
57417    fn typename() -> &'static str {
57418        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteArtifactRequest"
57419    }
57420}
57421
57422/// Request message for
57423/// [MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts].
57424///
57425/// [google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts]: crate::client::MetadataService::purge_artifacts
57426#[cfg(feature = "metadata-service")]
57427#[derive(Clone, Default, PartialEq)]
57428#[non_exhaustive]
57429pub struct PurgeArtifactsRequest {
57430    /// Required. The metadata store to purge Artifacts from.
57431    /// Format:
57432    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
57433    pub parent: std::string::String,
57434
57435    /// Required. A required filter matching the Artifacts to be purged.
57436    /// E.g., `update_time <= 2020-11-19T11:30:00-04:00`.
57437    pub filter: std::string::String,
57438
57439    /// Optional. Flag to indicate to actually perform the purge.
57440    /// If `force` is set to false, the method will return a sample of
57441    /// Artifact names that would be deleted.
57442    pub force: bool,
57443
57444    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57445}
57446
57447#[cfg(feature = "metadata-service")]
57448impl PurgeArtifactsRequest {
57449    pub fn new() -> Self {
57450        std::default::Default::default()
57451    }
57452
57453    /// Sets the value of [parent][crate::model::PurgeArtifactsRequest::parent].
57454    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57455        self.parent = v.into();
57456        self
57457    }
57458
57459    /// Sets the value of [filter][crate::model::PurgeArtifactsRequest::filter].
57460    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57461        self.filter = v.into();
57462        self
57463    }
57464
57465    /// Sets the value of [force][crate::model::PurgeArtifactsRequest::force].
57466    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
57467        self.force = v.into();
57468        self
57469    }
57470}
57471
57472#[cfg(feature = "metadata-service")]
57473impl wkt::message::Message for PurgeArtifactsRequest {
57474    fn typename() -> &'static str {
57475        "type.googleapis.com/google.cloud.aiplatform.v1.PurgeArtifactsRequest"
57476    }
57477}
57478
57479/// Response message for
57480/// [MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts].
57481///
57482/// [google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts]: crate::client::MetadataService::purge_artifacts
57483#[cfg(feature = "metadata-service")]
57484#[derive(Clone, Default, PartialEq)]
57485#[non_exhaustive]
57486pub struct PurgeArtifactsResponse {
57487    /// The number of Artifacts that this request deleted (or, if `force` is false,
57488    /// the number of Artifacts that will be deleted). This can be an estimate.
57489    pub purge_count: i64,
57490
57491    /// A sample of the Artifact names that will be deleted.
57492    /// Only populated if `force` is set to false. The maximum number of samples is
57493    /// 100 (it is possible to return fewer).
57494    pub purge_sample: std::vec::Vec<std::string::String>,
57495
57496    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57497}
57498
57499#[cfg(feature = "metadata-service")]
57500impl PurgeArtifactsResponse {
57501    pub fn new() -> Self {
57502        std::default::Default::default()
57503    }
57504
57505    /// Sets the value of [purge_count][crate::model::PurgeArtifactsResponse::purge_count].
57506    pub fn set_purge_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
57507        self.purge_count = v.into();
57508        self
57509    }
57510
57511    /// Sets the value of [purge_sample][crate::model::PurgeArtifactsResponse::purge_sample].
57512    pub fn set_purge_sample<T, V>(mut self, v: T) -> Self
57513    where
57514        T: std::iter::IntoIterator<Item = V>,
57515        V: std::convert::Into<std::string::String>,
57516    {
57517        use std::iter::Iterator;
57518        self.purge_sample = v.into_iter().map(|i| i.into()).collect();
57519        self
57520    }
57521}
57522
57523#[cfg(feature = "metadata-service")]
57524impl wkt::message::Message for PurgeArtifactsResponse {
57525    fn typename() -> &'static str {
57526        "type.googleapis.com/google.cloud.aiplatform.v1.PurgeArtifactsResponse"
57527    }
57528}
57529
57530/// Details of operations that perform
57531/// [MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts].
57532///
57533/// [google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts]: crate::client::MetadataService::purge_artifacts
57534#[cfg(feature = "metadata-service")]
57535#[derive(Clone, Default, PartialEq)]
57536#[non_exhaustive]
57537pub struct PurgeArtifactsMetadata {
57538    /// Operation metadata for purging Artifacts.
57539    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
57540
57541    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57542}
57543
57544#[cfg(feature = "metadata-service")]
57545impl PurgeArtifactsMetadata {
57546    pub fn new() -> Self {
57547        std::default::Default::default()
57548    }
57549
57550    /// Sets the value of [generic_metadata][crate::model::PurgeArtifactsMetadata::generic_metadata].
57551    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
57552    where
57553        T: std::convert::Into<crate::model::GenericOperationMetadata>,
57554    {
57555        self.generic_metadata = std::option::Option::Some(v.into());
57556        self
57557    }
57558
57559    /// Sets or clears the value of [generic_metadata][crate::model::PurgeArtifactsMetadata::generic_metadata].
57560    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
57561    where
57562        T: std::convert::Into<crate::model::GenericOperationMetadata>,
57563    {
57564        self.generic_metadata = v.map(|x| x.into());
57565        self
57566    }
57567}
57568
57569#[cfg(feature = "metadata-service")]
57570impl wkt::message::Message for PurgeArtifactsMetadata {
57571    fn typename() -> &'static str {
57572        "type.googleapis.com/google.cloud.aiplatform.v1.PurgeArtifactsMetadata"
57573    }
57574}
57575
57576/// Request message for
57577/// [MetadataService.CreateContext][google.cloud.aiplatform.v1.MetadataService.CreateContext].
57578///
57579/// [google.cloud.aiplatform.v1.MetadataService.CreateContext]: crate::client::MetadataService::create_context
57580#[cfg(feature = "metadata-service")]
57581#[derive(Clone, Default, PartialEq)]
57582#[non_exhaustive]
57583pub struct CreateContextRequest {
57584    /// Required. The resource name of the MetadataStore where the Context should
57585    /// be created. Format:
57586    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
57587    pub parent: std::string::String,
57588
57589    /// Required. The Context to create.
57590    pub context: std::option::Option<crate::model::Context>,
57591
57592    /// The {context} portion of the resource name with the format:
57593    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`.
57594    /// If not provided, the Context's ID will be a UUID generated by the service.
57595    /// Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
57596    /// Must be unique across all Contexts in the parent MetadataStore. (Otherwise
57597    /// the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the
57598    /// caller can't view the preexisting Context.)
57599    pub context_id: std::string::String,
57600
57601    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57602}
57603
57604#[cfg(feature = "metadata-service")]
57605impl CreateContextRequest {
57606    pub fn new() -> Self {
57607        std::default::Default::default()
57608    }
57609
57610    /// Sets the value of [parent][crate::model::CreateContextRequest::parent].
57611    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57612        self.parent = v.into();
57613        self
57614    }
57615
57616    /// Sets the value of [context][crate::model::CreateContextRequest::context].
57617    pub fn set_context<T>(mut self, v: T) -> Self
57618    where
57619        T: std::convert::Into<crate::model::Context>,
57620    {
57621        self.context = std::option::Option::Some(v.into());
57622        self
57623    }
57624
57625    /// Sets or clears the value of [context][crate::model::CreateContextRequest::context].
57626    pub fn set_or_clear_context<T>(mut self, v: std::option::Option<T>) -> Self
57627    where
57628        T: std::convert::Into<crate::model::Context>,
57629    {
57630        self.context = v.map(|x| x.into());
57631        self
57632    }
57633
57634    /// Sets the value of [context_id][crate::model::CreateContextRequest::context_id].
57635    pub fn set_context_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57636        self.context_id = v.into();
57637        self
57638    }
57639}
57640
57641#[cfg(feature = "metadata-service")]
57642impl wkt::message::Message for CreateContextRequest {
57643    fn typename() -> &'static str {
57644        "type.googleapis.com/google.cloud.aiplatform.v1.CreateContextRequest"
57645    }
57646}
57647
57648/// Request message for
57649/// [MetadataService.GetContext][google.cloud.aiplatform.v1.MetadataService.GetContext].
57650///
57651/// [google.cloud.aiplatform.v1.MetadataService.GetContext]: crate::client::MetadataService::get_context
57652#[cfg(feature = "metadata-service")]
57653#[derive(Clone, Default, PartialEq)]
57654#[non_exhaustive]
57655pub struct GetContextRequest {
57656    /// Required. The resource name of the Context to retrieve.
57657    /// Format:
57658    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
57659    pub name: std::string::String,
57660
57661    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57662}
57663
57664#[cfg(feature = "metadata-service")]
57665impl GetContextRequest {
57666    pub fn new() -> Self {
57667        std::default::Default::default()
57668    }
57669
57670    /// Sets the value of [name][crate::model::GetContextRequest::name].
57671    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57672        self.name = v.into();
57673        self
57674    }
57675}
57676
57677#[cfg(feature = "metadata-service")]
57678impl wkt::message::Message for GetContextRequest {
57679    fn typename() -> &'static str {
57680        "type.googleapis.com/google.cloud.aiplatform.v1.GetContextRequest"
57681    }
57682}
57683
57684/// Request message for
57685/// [MetadataService.ListContexts][google.cloud.aiplatform.v1.MetadataService.ListContexts]
57686///
57687/// [google.cloud.aiplatform.v1.MetadataService.ListContexts]: crate::client::MetadataService::list_contexts
57688#[cfg(feature = "metadata-service")]
57689#[derive(Clone, Default, PartialEq)]
57690#[non_exhaustive]
57691pub struct ListContextsRequest {
57692    /// Required. The MetadataStore whose Contexts should be listed.
57693    /// Format:
57694    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
57695    pub parent: std::string::String,
57696
57697    /// The maximum number of Contexts to return. The service may return fewer.
57698    /// Must be in range 1-1000, inclusive. Defaults to 100.
57699    pub page_size: i32,
57700
57701    /// A page token, received from a previous
57702    /// [MetadataService.ListContexts][google.cloud.aiplatform.v1.MetadataService.ListContexts]
57703    /// call. Provide this to retrieve the subsequent page.
57704    ///
57705    /// When paginating, all other provided parameters must match the call that
57706    /// provided the page token. (Otherwise the request will fail with
57707    /// INVALID_ARGUMENT error.)
57708    ///
57709    /// [google.cloud.aiplatform.v1.MetadataService.ListContexts]: crate::client::MetadataService::list_contexts
57710    pub page_token: std::string::String,
57711
57712    /// Filter specifying the boolean condition for the Contexts to satisfy in
57713    /// order to be part of the result set.
57714    /// The syntax to define filter query is based on <https://google.aip.dev/160>.
57715    /// Following are the supported set of filters:
57716    ///
57717    /// * **Attribute filtering**:
57718    ///   For example: `display_name = "test"`.
57719    ///   Supported fields include: `name`, `display_name`, `schema_title`,
57720    ///   `create_time`, and `update_time`.
57721    ///   Time fields, such as `create_time` and `update_time`, require values
57722    ///   specified in RFC-3339 format.
57723    ///   For example: `create_time = "2020-11-19T11:30:00-04:00"`.
57724    ///
57725    /// * **Metadata field**:
57726    ///   To filter on metadata fields use traversal operation as follows:
57727    ///   `metadata.<field_name>.<type_value>`.
57728    ///   For example: `metadata.field_1.number_value = 10.0`.
57729    ///   In case the field name contains special characters (such as colon), one
57730    ///   can embed it inside double quote.
57731    ///   For example: `metadata."field:1".number_value = 10.0`
57732    ///
57733    /// * **Parent Child filtering**:
57734    ///   To filter Contexts based on parent-child relationship use the HAS
57735    ///   operator as follows:
57736    ///
57737    ///
57738    /// ```norust
57739    /// parent_contexts:
57740    /// "projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context_id>"
57741    /// child_contexts:
57742    /// "projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context_id>"
57743    /// ```
57744    ///
57745    /// Each of the above supported filters can be combined together using
57746    /// logical operators (`AND` & `OR`). Maximum nested expression depth allowed
57747    /// is 5.
57748    ///
57749    /// For example: `display_name = "test" AND metadata.field1.bool_value = true`.
57750    pub filter: std::string::String,
57751
57752    /// How the list of messages is ordered. Specify the values to order by and an
57753    /// ordering operation. The default sorting order is ascending. To specify
57754    /// descending order for a field, users append a " desc" suffix; for example:
57755    /// "foo desc, bar".
57756    /// Subfields are specified with a `.` character, such as foo.bar.
57757    /// see <https://google.aip.dev/132#ordering> for more details.
57758    pub order_by: std::string::String,
57759
57760    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57761}
57762
57763#[cfg(feature = "metadata-service")]
57764impl ListContextsRequest {
57765    pub fn new() -> Self {
57766        std::default::Default::default()
57767    }
57768
57769    /// Sets the value of [parent][crate::model::ListContextsRequest::parent].
57770    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57771        self.parent = v.into();
57772        self
57773    }
57774
57775    /// Sets the value of [page_size][crate::model::ListContextsRequest::page_size].
57776    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
57777        self.page_size = v.into();
57778        self
57779    }
57780
57781    /// Sets the value of [page_token][crate::model::ListContextsRequest::page_token].
57782    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57783        self.page_token = v.into();
57784        self
57785    }
57786
57787    /// Sets the value of [filter][crate::model::ListContextsRequest::filter].
57788    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57789        self.filter = v.into();
57790        self
57791    }
57792
57793    /// Sets the value of [order_by][crate::model::ListContextsRequest::order_by].
57794    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57795        self.order_by = v.into();
57796        self
57797    }
57798}
57799
57800#[cfg(feature = "metadata-service")]
57801impl wkt::message::Message for ListContextsRequest {
57802    fn typename() -> &'static str {
57803        "type.googleapis.com/google.cloud.aiplatform.v1.ListContextsRequest"
57804    }
57805}
57806
57807/// Response message for
57808/// [MetadataService.ListContexts][google.cloud.aiplatform.v1.MetadataService.ListContexts].
57809///
57810/// [google.cloud.aiplatform.v1.MetadataService.ListContexts]: crate::client::MetadataService::list_contexts
57811#[cfg(feature = "metadata-service")]
57812#[derive(Clone, Default, PartialEq)]
57813#[non_exhaustive]
57814pub struct ListContextsResponse {
57815    /// The Contexts retrieved from the MetadataStore.
57816    pub contexts: std::vec::Vec<crate::model::Context>,
57817
57818    /// A token, which can be sent as
57819    /// [ListContextsRequest.page_token][google.cloud.aiplatform.v1.ListContextsRequest.page_token]
57820    /// to retrieve the next page.
57821    /// If this field is not populated, there are no subsequent pages.
57822    ///
57823    /// [google.cloud.aiplatform.v1.ListContextsRequest.page_token]: crate::model::ListContextsRequest::page_token
57824    pub next_page_token: std::string::String,
57825
57826    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57827}
57828
57829#[cfg(feature = "metadata-service")]
57830impl ListContextsResponse {
57831    pub fn new() -> Self {
57832        std::default::Default::default()
57833    }
57834
57835    /// Sets the value of [contexts][crate::model::ListContextsResponse::contexts].
57836    pub fn set_contexts<T, V>(mut self, v: T) -> Self
57837    where
57838        T: std::iter::IntoIterator<Item = V>,
57839        V: std::convert::Into<crate::model::Context>,
57840    {
57841        use std::iter::Iterator;
57842        self.contexts = v.into_iter().map(|i| i.into()).collect();
57843        self
57844    }
57845
57846    /// Sets the value of [next_page_token][crate::model::ListContextsResponse::next_page_token].
57847    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57848        self.next_page_token = v.into();
57849        self
57850    }
57851}
57852
57853#[cfg(feature = "metadata-service")]
57854impl wkt::message::Message for ListContextsResponse {
57855    fn typename() -> &'static str {
57856        "type.googleapis.com/google.cloud.aiplatform.v1.ListContextsResponse"
57857    }
57858}
57859
57860#[cfg(feature = "metadata-service")]
57861#[doc(hidden)]
57862impl gax::paginator::internal::PageableResponse for ListContextsResponse {
57863    type PageItem = crate::model::Context;
57864
57865    fn items(self) -> std::vec::Vec<Self::PageItem> {
57866        self.contexts
57867    }
57868
57869    fn next_page_token(&self) -> std::string::String {
57870        use std::clone::Clone;
57871        self.next_page_token.clone()
57872    }
57873}
57874
57875/// Request message for
57876/// [MetadataService.UpdateContext][google.cloud.aiplatform.v1.MetadataService.UpdateContext].
57877///
57878/// [google.cloud.aiplatform.v1.MetadataService.UpdateContext]: crate::client::MetadataService::update_context
57879#[cfg(feature = "metadata-service")]
57880#[derive(Clone, Default, PartialEq)]
57881#[non_exhaustive]
57882pub struct UpdateContextRequest {
57883    /// Required. The Context containing updates.
57884    /// The Context's [Context.name][google.cloud.aiplatform.v1.Context.name] field
57885    /// is used to identify the Context to be updated. Format:
57886    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
57887    ///
57888    /// [google.cloud.aiplatform.v1.Context.name]: crate::model::Context::name
57889    pub context: std::option::Option<crate::model::Context>,
57890
57891    /// Optional. A FieldMask indicating which fields should be updated.
57892    pub update_mask: std::option::Option<wkt::FieldMask>,
57893
57894    /// If set to true, and the [Context][google.cloud.aiplatform.v1.Context] is
57895    /// not found, a new [Context][google.cloud.aiplatform.v1.Context] is created.
57896    ///
57897    /// [google.cloud.aiplatform.v1.Context]: crate::model::Context
57898    pub allow_missing: bool,
57899
57900    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57901}
57902
57903#[cfg(feature = "metadata-service")]
57904impl UpdateContextRequest {
57905    pub fn new() -> Self {
57906        std::default::Default::default()
57907    }
57908
57909    /// Sets the value of [context][crate::model::UpdateContextRequest::context].
57910    pub fn set_context<T>(mut self, v: T) -> Self
57911    where
57912        T: std::convert::Into<crate::model::Context>,
57913    {
57914        self.context = std::option::Option::Some(v.into());
57915        self
57916    }
57917
57918    /// Sets or clears the value of [context][crate::model::UpdateContextRequest::context].
57919    pub fn set_or_clear_context<T>(mut self, v: std::option::Option<T>) -> Self
57920    where
57921        T: std::convert::Into<crate::model::Context>,
57922    {
57923        self.context = v.map(|x| x.into());
57924        self
57925    }
57926
57927    /// Sets the value of [update_mask][crate::model::UpdateContextRequest::update_mask].
57928    pub fn set_update_mask<T>(mut self, v: T) -> Self
57929    where
57930        T: std::convert::Into<wkt::FieldMask>,
57931    {
57932        self.update_mask = std::option::Option::Some(v.into());
57933        self
57934    }
57935
57936    /// Sets or clears the value of [update_mask][crate::model::UpdateContextRequest::update_mask].
57937    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
57938    where
57939        T: std::convert::Into<wkt::FieldMask>,
57940    {
57941        self.update_mask = v.map(|x| x.into());
57942        self
57943    }
57944
57945    /// Sets the value of [allow_missing][crate::model::UpdateContextRequest::allow_missing].
57946    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
57947        self.allow_missing = v.into();
57948        self
57949    }
57950}
57951
57952#[cfg(feature = "metadata-service")]
57953impl wkt::message::Message for UpdateContextRequest {
57954    fn typename() -> &'static str {
57955        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateContextRequest"
57956    }
57957}
57958
57959/// Request message for
57960/// [MetadataService.DeleteContext][google.cloud.aiplatform.v1.MetadataService.DeleteContext].
57961///
57962/// [google.cloud.aiplatform.v1.MetadataService.DeleteContext]: crate::client::MetadataService::delete_context
57963#[cfg(feature = "metadata-service")]
57964#[derive(Clone, Default, PartialEq)]
57965#[non_exhaustive]
57966pub struct DeleteContextRequest {
57967    /// Required. The resource name of the Context to delete.
57968    /// Format:
57969    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
57970    pub name: std::string::String,
57971
57972    /// The force deletion semantics is still undefined.
57973    /// Users should not use this field.
57974    pub force: bool,
57975
57976    /// Optional. The etag of the Context to delete.
57977    /// If this is provided, it must match the server's etag. Otherwise, the
57978    /// request will fail with a FAILED_PRECONDITION.
57979    pub etag: std::string::String,
57980
57981    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
57982}
57983
57984#[cfg(feature = "metadata-service")]
57985impl DeleteContextRequest {
57986    pub fn new() -> Self {
57987        std::default::Default::default()
57988    }
57989
57990    /// Sets the value of [name][crate::model::DeleteContextRequest::name].
57991    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
57992        self.name = v.into();
57993        self
57994    }
57995
57996    /// Sets the value of [force][crate::model::DeleteContextRequest::force].
57997    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
57998        self.force = v.into();
57999        self
58000    }
58001
58002    /// Sets the value of [etag][crate::model::DeleteContextRequest::etag].
58003    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58004        self.etag = v.into();
58005        self
58006    }
58007}
58008
58009#[cfg(feature = "metadata-service")]
58010impl wkt::message::Message for DeleteContextRequest {
58011    fn typename() -> &'static str {
58012        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteContextRequest"
58013    }
58014}
58015
58016/// Request message for
58017/// [MetadataService.PurgeContexts][google.cloud.aiplatform.v1.MetadataService.PurgeContexts].
58018///
58019/// [google.cloud.aiplatform.v1.MetadataService.PurgeContexts]: crate::client::MetadataService::purge_contexts
58020#[cfg(feature = "metadata-service")]
58021#[derive(Clone, Default, PartialEq)]
58022#[non_exhaustive]
58023pub struct PurgeContextsRequest {
58024    /// Required. The metadata store to purge Contexts from.
58025    /// Format:
58026    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
58027    pub parent: std::string::String,
58028
58029    /// Required. A required filter matching the Contexts to be purged.
58030    /// E.g., `update_time <= 2020-11-19T11:30:00-04:00`.
58031    pub filter: std::string::String,
58032
58033    /// Optional. Flag to indicate to actually perform the purge.
58034    /// If `force` is set to false, the method will return a sample of
58035    /// Context names that would be deleted.
58036    pub force: bool,
58037
58038    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58039}
58040
58041#[cfg(feature = "metadata-service")]
58042impl PurgeContextsRequest {
58043    pub fn new() -> Self {
58044        std::default::Default::default()
58045    }
58046
58047    /// Sets the value of [parent][crate::model::PurgeContextsRequest::parent].
58048    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58049        self.parent = v.into();
58050        self
58051    }
58052
58053    /// Sets the value of [filter][crate::model::PurgeContextsRequest::filter].
58054    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58055        self.filter = v.into();
58056        self
58057    }
58058
58059    /// Sets the value of [force][crate::model::PurgeContextsRequest::force].
58060    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
58061        self.force = v.into();
58062        self
58063    }
58064}
58065
58066#[cfg(feature = "metadata-service")]
58067impl wkt::message::Message for PurgeContextsRequest {
58068    fn typename() -> &'static str {
58069        "type.googleapis.com/google.cloud.aiplatform.v1.PurgeContextsRequest"
58070    }
58071}
58072
58073/// Response message for
58074/// [MetadataService.PurgeContexts][google.cloud.aiplatform.v1.MetadataService.PurgeContexts].
58075///
58076/// [google.cloud.aiplatform.v1.MetadataService.PurgeContexts]: crate::client::MetadataService::purge_contexts
58077#[cfg(feature = "metadata-service")]
58078#[derive(Clone, Default, PartialEq)]
58079#[non_exhaustive]
58080pub struct PurgeContextsResponse {
58081    /// The number of Contexts that this request deleted (or, if `force` is false,
58082    /// the number of Contexts that will be deleted). This can be an estimate.
58083    pub purge_count: i64,
58084
58085    /// A sample of the Context names that will be deleted.
58086    /// Only populated if `force` is set to false. The maximum number of samples is
58087    /// 100 (it is possible to return fewer).
58088    pub purge_sample: std::vec::Vec<std::string::String>,
58089
58090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58091}
58092
58093#[cfg(feature = "metadata-service")]
58094impl PurgeContextsResponse {
58095    pub fn new() -> Self {
58096        std::default::Default::default()
58097    }
58098
58099    /// Sets the value of [purge_count][crate::model::PurgeContextsResponse::purge_count].
58100    pub fn set_purge_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
58101        self.purge_count = v.into();
58102        self
58103    }
58104
58105    /// Sets the value of [purge_sample][crate::model::PurgeContextsResponse::purge_sample].
58106    pub fn set_purge_sample<T, V>(mut self, v: T) -> Self
58107    where
58108        T: std::iter::IntoIterator<Item = V>,
58109        V: std::convert::Into<std::string::String>,
58110    {
58111        use std::iter::Iterator;
58112        self.purge_sample = v.into_iter().map(|i| i.into()).collect();
58113        self
58114    }
58115}
58116
58117#[cfg(feature = "metadata-service")]
58118impl wkt::message::Message for PurgeContextsResponse {
58119    fn typename() -> &'static str {
58120        "type.googleapis.com/google.cloud.aiplatform.v1.PurgeContextsResponse"
58121    }
58122}
58123
58124/// Details of operations that perform
58125/// [MetadataService.PurgeContexts][google.cloud.aiplatform.v1.MetadataService.PurgeContexts].
58126///
58127/// [google.cloud.aiplatform.v1.MetadataService.PurgeContexts]: crate::client::MetadataService::purge_contexts
58128#[cfg(feature = "metadata-service")]
58129#[derive(Clone, Default, PartialEq)]
58130#[non_exhaustive]
58131pub struct PurgeContextsMetadata {
58132    /// Operation metadata for purging Contexts.
58133    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
58134
58135    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58136}
58137
58138#[cfg(feature = "metadata-service")]
58139impl PurgeContextsMetadata {
58140    pub fn new() -> Self {
58141        std::default::Default::default()
58142    }
58143
58144    /// Sets the value of [generic_metadata][crate::model::PurgeContextsMetadata::generic_metadata].
58145    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
58146    where
58147        T: std::convert::Into<crate::model::GenericOperationMetadata>,
58148    {
58149        self.generic_metadata = std::option::Option::Some(v.into());
58150        self
58151    }
58152
58153    /// Sets or clears the value of [generic_metadata][crate::model::PurgeContextsMetadata::generic_metadata].
58154    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
58155    where
58156        T: std::convert::Into<crate::model::GenericOperationMetadata>,
58157    {
58158        self.generic_metadata = v.map(|x| x.into());
58159        self
58160    }
58161}
58162
58163#[cfg(feature = "metadata-service")]
58164impl wkt::message::Message for PurgeContextsMetadata {
58165    fn typename() -> &'static str {
58166        "type.googleapis.com/google.cloud.aiplatform.v1.PurgeContextsMetadata"
58167    }
58168}
58169
58170/// Request message for
58171/// [MetadataService.AddContextArtifactsAndExecutions][google.cloud.aiplatform.v1.MetadataService.AddContextArtifactsAndExecutions].
58172///
58173/// [google.cloud.aiplatform.v1.MetadataService.AddContextArtifactsAndExecutions]: crate::client::MetadataService::add_context_artifacts_and_executions
58174#[cfg(feature = "metadata-service")]
58175#[derive(Clone, Default, PartialEq)]
58176#[non_exhaustive]
58177pub struct AddContextArtifactsAndExecutionsRequest {
58178    /// Required. The resource name of the Context that the Artifacts and
58179    /// Executions belong to. Format:
58180    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
58181    pub context: std::string::String,
58182
58183    /// The resource names of the Artifacts to attribute to the Context.
58184    ///
58185    /// Format:
58186    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
58187    pub artifacts: std::vec::Vec<std::string::String>,
58188
58189    /// The resource names of the Executions to associate with the
58190    /// Context.
58191    ///
58192    /// Format:
58193    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
58194    pub executions: std::vec::Vec<std::string::String>,
58195
58196    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58197}
58198
58199#[cfg(feature = "metadata-service")]
58200impl AddContextArtifactsAndExecutionsRequest {
58201    pub fn new() -> Self {
58202        std::default::Default::default()
58203    }
58204
58205    /// Sets the value of [context][crate::model::AddContextArtifactsAndExecutionsRequest::context].
58206    pub fn set_context<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58207        self.context = v.into();
58208        self
58209    }
58210
58211    /// Sets the value of [artifacts][crate::model::AddContextArtifactsAndExecutionsRequest::artifacts].
58212    pub fn set_artifacts<T, V>(mut self, v: T) -> Self
58213    where
58214        T: std::iter::IntoIterator<Item = V>,
58215        V: std::convert::Into<std::string::String>,
58216    {
58217        use std::iter::Iterator;
58218        self.artifacts = v.into_iter().map(|i| i.into()).collect();
58219        self
58220    }
58221
58222    /// Sets the value of [executions][crate::model::AddContextArtifactsAndExecutionsRequest::executions].
58223    pub fn set_executions<T, V>(mut self, v: T) -> Self
58224    where
58225        T: std::iter::IntoIterator<Item = V>,
58226        V: std::convert::Into<std::string::String>,
58227    {
58228        use std::iter::Iterator;
58229        self.executions = v.into_iter().map(|i| i.into()).collect();
58230        self
58231    }
58232}
58233
58234#[cfg(feature = "metadata-service")]
58235impl wkt::message::Message for AddContextArtifactsAndExecutionsRequest {
58236    fn typename() -> &'static str {
58237        "type.googleapis.com/google.cloud.aiplatform.v1.AddContextArtifactsAndExecutionsRequest"
58238    }
58239}
58240
58241/// Response message for
58242/// [MetadataService.AddContextArtifactsAndExecutions][google.cloud.aiplatform.v1.MetadataService.AddContextArtifactsAndExecutions].
58243///
58244/// [google.cloud.aiplatform.v1.MetadataService.AddContextArtifactsAndExecutions]: crate::client::MetadataService::add_context_artifacts_and_executions
58245#[cfg(feature = "metadata-service")]
58246#[derive(Clone, Default, PartialEq)]
58247#[non_exhaustive]
58248pub struct AddContextArtifactsAndExecutionsResponse {
58249    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58250}
58251
58252#[cfg(feature = "metadata-service")]
58253impl AddContextArtifactsAndExecutionsResponse {
58254    pub fn new() -> Self {
58255        std::default::Default::default()
58256    }
58257}
58258
58259#[cfg(feature = "metadata-service")]
58260impl wkt::message::Message for AddContextArtifactsAndExecutionsResponse {
58261    fn typename() -> &'static str {
58262        "type.googleapis.com/google.cloud.aiplatform.v1.AddContextArtifactsAndExecutionsResponse"
58263    }
58264}
58265
58266/// Request message for
58267/// [MetadataService.AddContextChildren][google.cloud.aiplatform.v1.MetadataService.AddContextChildren].
58268///
58269/// [google.cloud.aiplatform.v1.MetadataService.AddContextChildren]: crate::client::MetadataService::add_context_children
58270#[cfg(feature = "metadata-service")]
58271#[derive(Clone, Default, PartialEq)]
58272#[non_exhaustive]
58273pub struct AddContextChildrenRequest {
58274    /// Required. The resource name of the parent Context.
58275    ///
58276    /// Format:
58277    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
58278    pub context: std::string::String,
58279
58280    /// The resource names of the child Contexts.
58281    pub child_contexts: std::vec::Vec<std::string::String>,
58282
58283    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58284}
58285
58286#[cfg(feature = "metadata-service")]
58287impl AddContextChildrenRequest {
58288    pub fn new() -> Self {
58289        std::default::Default::default()
58290    }
58291
58292    /// Sets the value of [context][crate::model::AddContextChildrenRequest::context].
58293    pub fn set_context<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58294        self.context = v.into();
58295        self
58296    }
58297
58298    /// Sets the value of [child_contexts][crate::model::AddContextChildrenRequest::child_contexts].
58299    pub fn set_child_contexts<T, V>(mut self, v: T) -> Self
58300    where
58301        T: std::iter::IntoIterator<Item = V>,
58302        V: std::convert::Into<std::string::String>,
58303    {
58304        use std::iter::Iterator;
58305        self.child_contexts = v.into_iter().map(|i| i.into()).collect();
58306        self
58307    }
58308}
58309
58310#[cfg(feature = "metadata-service")]
58311impl wkt::message::Message for AddContextChildrenRequest {
58312    fn typename() -> &'static str {
58313        "type.googleapis.com/google.cloud.aiplatform.v1.AddContextChildrenRequest"
58314    }
58315}
58316
58317/// Response message for
58318/// [MetadataService.AddContextChildren][google.cloud.aiplatform.v1.MetadataService.AddContextChildren].
58319///
58320/// [google.cloud.aiplatform.v1.MetadataService.AddContextChildren]: crate::client::MetadataService::add_context_children
58321#[cfg(feature = "metadata-service")]
58322#[derive(Clone, Default, PartialEq)]
58323#[non_exhaustive]
58324pub struct AddContextChildrenResponse {
58325    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58326}
58327
58328#[cfg(feature = "metadata-service")]
58329impl AddContextChildrenResponse {
58330    pub fn new() -> Self {
58331        std::default::Default::default()
58332    }
58333}
58334
58335#[cfg(feature = "metadata-service")]
58336impl wkt::message::Message for AddContextChildrenResponse {
58337    fn typename() -> &'static str {
58338        "type.googleapis.com/google.cloud.aiplatform.v1.AddContextChildrenResponse"
58339    }
58340}
58341
58342/// Request message for
58343/// [MetadataService.DeleteContextChildrenRequest][].
58344#[cfg(feature = "metadata-service")]
58345#[derive(Clone, Default, PartialEq)]
58346#[non_exhaustive]
58347pub struct RemoveContextChildrenRequest {
58348    /// Required. The resource name of the parent Context.
58349    ///
58350    /// Format:
58351    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
58352    pub context: std::string::String,
58353
58354    /// The resource names of the child Contexts.
58355    pub child_contexts: std::vec::Vec<std::string::String>,
58356
58357    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58358}
58359
58360#[cfg(feature = "metadata-service")]
58361impl RemoveContextChildrenRequest {
58362    pub fn new() -> Self {
58363        std::default::Default::default()
58364    }
58365
58366    /// Sets the value of [context][crate::model::RemoveContextChildrenRequest::context].
58367    pub fn set_context<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58368        self.context = v.into();
58369        self
58370    }
58371
58372    /// Sets the value of [child_contexts][crate::model::RemoveContextChildrenRequest::child_contexts].
58373    pub fn set_child_contexts<T, V>(mut self, v: T) -> Self
58374    where
58375        T: std::iter::IntoIterator<Item = V>,
58376        V: std::convert::Into<std::string::String>,
58377    {
58378        use std::iter::Iterator;
58379        self.child_contexts = v.into_iter().map(|i| i.into()).collect();
58380        self
58381    }
58382}
58383
58384#[cfg(feature = "metadata-service")]
58385impl wkt::message::Message for RemoveContextChildrenRequest {
58386    fn typename() -> &'static str {
58387        "type.googleapis.com/google.cloud.aiplatform.v1.RemoveContextChildrenRequest"
58388    }
58389}
58390
58391/// Response message for
58392/// [MetadataService.RemoveContextChildren][google.cloud.aiplatform.v1.MetadataService.RemoveContextChildren].
58393///
58394/// [google.cloud.aiplatform.v1.MetadataService.RemoveContextChildren]: crate::client::MetadataService::remove_context_children
58395#[cfg(feature = "metadata-service")]
58396#[derive(Clone, Default, PartialEq)]
58397#[non_exhaustive]
58398pub struct RemoveContextChildrenResponse {
58399    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58400}
58401
58402#[cfg(feature = "metadata-service")]
58403impl RemoveContextChildrenResponse {
58404    pub fn new() -> Self {
58405        std::default::Default::default()
58406    }
58407}
58408
58409#[cfg(feature = "metadata-service")]
58410impl wkt::message::Message for RemoveContextChildrenResponse {
58411    fn typename() -> &'static str {
58412        "type.googleapis.com/google.cloud.aiplatform.v1.RemoveContextChildrenResponse"
58413    }
58414}
58415
58416/// Request message for
58417/// [MetadataService.QueryContextLineageSubgraph][google.cloud.aiplatform.v1.MetadataService.QueryContextLineageSubgraph].
58418///
58419/// [google.cloud.aiplatform.v1.MetadataService.QueryContextLineageSubgraph]: crate::client::MetadataService::query_context_lineage_subgraph
58420#[cfg(feature = "metadata-service")]
58421#[derive(Clone, Default, PartialEq)]
58422#[non_exhaustive]
58423pub struct QueryContextLineageSubgraphRequest {
58424    /// Required. The resource name of the Context whose Artifacts and Executions
58425    /// should be retrieved as a LineageSubgraph.
58426    /// Format:
58427    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
58428    ///
58429    /// The request may error with FAILED_PRECONDITION if the number of Artifacts,
58430    /// the number of Executions, or the number of Events that would be returned
58431    /// for the Context exceeds 1000.
58432    pub context: std::string::String,
58433
58434    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58435}
58436
58437#[cfg(feature = "metadata-service")]
58438impl QueryContextLineageSubgraphRequest {
58439    pub fn new() -> Self {
58440        std::default::Default::default()
58441    }
58442
58443    /// Sets the value of [context][crate::model::QueryContextLineageSubgraphRequest::context].
58444    pub fn set_context<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58445        self.context = v.into();
58446        self
58447    }
58448}
58449
58450#[cfg(feature = "metadata-service")]
58451impl wkt::message::Message for QueryContextLineageSubgraphRequest {
58452    fn typename() -> &'static str {
58453        "type.googleapis.com/google.cloud.aiplatform.v1.QueryContextLineageSubgraphRequest"
58454    }
58455}
58456
58457/// Request message for
58458/// [MetadataService.CreateExecution][google.cloud.aiplatform.v1.MetadataService.CreateExecution].
58459///
58460/// [google.cloud.aiplatform.v1.MetadataService.CreateExecution]: crate::client::MetadataService::create_execution
58461#[cfg(feature = "metadata-service")]
58462#[derive(Clone, Default, PartialEq)]
58463#[non_exhaustive]
58464pub struct CreateExecutionRequest {
58465    /// Required. The resource name of the MetadataStore where the Execution should
58466    /// be created.
58467    /// Format:
58468    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
58469    pub parent: std::string::String,
58470
58471    /// Required. The Execution to create.
58472    pub execution: std::option::Option<crate::model::Execution>,
58473
58474    /// The {execution} portion of the resource name with the format:
58475    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
58476    /// If not provided, the Execution's ID will be a UUID generated by the
58477    /// service.
58478    /// Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
58479    /// Must be unique across all Executions in the parent MetadataStore.
58480    /// (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED
58481    /// if the caller can't view the preexisting Execution.)
58482    pub execution_id: std::string::String,
58483
58484    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58485}
58486
58487#[cfg(feature = "metadata-service")]
58488impl CreateExecutionRequest {
58489    pub fn new() -> Self {
58490        std::default::Default::default()
58491    }
58492
58493    /// Sets the value of [parent][crate::model::CreateExecutionRequest::parent].
58494    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58495        self.parent = v.into();
58496        self
58497    }
58498
58499    /// Sets the value of [execution][crate::model::CreateExecutionRequest::execution].
58500    pub fn set_execution<T>(mut self, v: T) -> Self
58501    where
58502        T: std::convert::Into<crate::model::Execution>,
58503    {
58504        self.execution = std::option::Option::Some(v.into());
58505        self
58506    }
58507
58508    /// Sets or clears the value of [execution][crate::model::CreateExecutionRequest::execution].
58509    pub fn set_or_clear_execution<T>(mut self, v: std::option::Option<T>) -> Self
58510    where
58511        T: std::convert::Into<crate::model::Execution>,
58512    {
58513        self.execution = v.map(|x| x.into());
58514        self
58515    }
58516
58517    /// Sets the value of [execution_id][crate::model::CreateExecutionRequest::execution_id].
58518    pub fn set_execution_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58519        self.execution_id = v.into();
58520        self
58521    }
58522}
58523
58524#[cfg(feature = "metadata-service")]
58525impl wkt::message::Message for CreateExecutionRequest {
58526    fn typename() -> &'static str {
58527        "type.googleapis.com/google.cloud.aiplatform.v1.CreateExecutionRequest"
58528    }
58529}
58530
58531/// Request message for
58532/// [MetadataService.GetExecution][google.cloud.aiplatform.v1.MetadataService.GetExecution].
58533///
58534/// [google.cloud.aiplatform.v1.MetadataService.GetExecution]: crate::client::MetadataService::get_execution
58535#[cfg(feature = "metadata-service")]
58536#[derive(Clone, Default, PartialEq)]
58537#[non_exhaustive]
58538pub struct GetExecutionRequest {
58539    /// Required. The resource name of the Execution to retrieve.
58540    /// Format:
58541    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
58542    pub name: std::string::String,
58543
58544    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58545}
58546
58547#[cfg(feature = "metadata-service")]
58548impl GetExecutionRequest {
58549    pub fn new() -> Self {
58550        std::default::Default::default()
58551    }
58552
58553    /// Sets the value of [name][crate::model::GetExecutionRequest::name].
58554    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58555        self.name = v.into();
58556        self
58557    }
58558}
58559
58560#[cfg(feature = "metadata-service")]
58561impl wkt::message::Message for GetExecutionRequest {
58562    fn typename() -> &'static str {
58563        "type.googleapis.com/google.cloud.aiplatform.v1.GetExecutionRequest"
58564    }
58565}
58566
58567/// Request message for
58568/// [MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions].
58569///
58570/// [google.cloud.aiplatform.v1.MetadataService.ListExecutions]: crate::client::MetadataService::list_executions
58571#[cfg(feature = "metadata-service")]
58572#[derive(Clone, Default, PartialEq)]
58573#[non_exhaustive]
58574pub struct ListExecutionsRequest {
58575    /// Required. The MetadataStore whose Executions should be listed.
58576    /// Format:
58577    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
58578    pub parent: std::string::String,
58579
58580    /// The maximum number of Executions to return. The service may return fewer.
58581    /// Must be in range 1-1000, inclusive. Defaults to 100.
58582    pub page_size: i32,
58583
58584    /// A page token, received from a previous
58585    /// [MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions]
58586    /// call. Provide this to retrieve the subsequent page.
58587    ///
58588    /// When paginating, all other provided parameters must match the call that
58589    /// provided the page token. (Otherwise the request will fail with an
58590    /// INVALID_ARGUMENT error.)
58591    ///
58592    /// [google.cloud.aiplatform.v1.MetadataService.ListExecutions]: crate::client::MetadataService::list_executions
58593    pub page_token: std::string::String,
58594
58595    /// Filter specifying the boolean condition for the Executions to satisfy in
58596    /// order to be part of the result set.
58597    /// The syntax to define filter query is based on <https://google.aip.dev/160>.
58598    /// Following are the supported set of filters:
58599    ///
58600    /// * **Attribute filtering**:
58601    ///   For example: `display_name = "test"`.
58602    ///   Supported fields include: `name`, `display_name`, `state`,
58603    ///   `schema_title`, `create_time`, and `update_time`.
58604    ///   Time fields, such as `create_time` and `update_time`, require values
58605    ///   specified in RFC-3339 format.
58606    ///   For example: `create_time = "2020-11-19T11:30:00-04:00"`.
58607    /// * **Metadata field**:
58608    ///   To filter on metadata fields use traversal operation as follows:
58609    ///   `metadata.<field_name>.<type_value>`
58610    ///   For example: `metadata.field_1.number_value = 10.0`
58611    ///   In case the field name contains special characters (such as colon), one
58612    ///   can embed it inside double quote.
58613    ///   For example: `metadata."field:1".number_value = 10.0`
58614    /// * **Context based filtering**:
58615    ///   To filter Executions based on the contexts to which they belong use
58616    ///   the function operator with the full resource name:
58617    ///   `in_context(<context-name>)`.
58618    ///   For example:
58619    ///   `in_context("projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context-id>")`
58620    ///
58621    /// Each of the above supported filters can be combined together using
58622    /// logical operators (`AND` & `OR`). Maximum nested expression depth allowed
58623    /// is 5.
58624    ///
58625    /// For example: `display_name = "test" AND metadata.field1.bool_value = true`.
58626    pub filter: std::string::String,
58627
58628    /// How the list of messages is ordered. Specify the values to order by and an
58629    /// ordering operation. The default sorting order is ascending. To specify
58630    /// descending order for a field, users append a " desc" suffix; for example:
58631    /// "foo desc, bar".
58632    /// Subfields are specified with a `.` character, such as foo.bar.
58633    /// see <https://google.aip.dev/132#ordering> for more details.
58634    pub order_by: std::string::String,
58635
58636    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58637}
58638
58639#[cfg(feature = "metadata-service")]
58640impl ListExecutionsRequest {
58641    pub fn new() -> Self {
58642        std::default::Default::default()
58643    }
58644
58645    /// Sets the value of [parent][crate::model::ListExecutionsRequest::parent].
58646    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58647        self.parent = v.into();
58648        self
58649    }
58650
58651    /// Sets the value of [page_size][crate::model::ListExecutionsRequest::page_size].
58652    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
58653        self.page_size = v.into();
58654        self
58655    }
58656
58657    /// Sets the value of [page_token][crate::model::ListExecutionsRequest::page_token].
58658    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58659        self.page_token = v.into();
58660        self
58661    }
58662
58663    /// Sets the value of [filter][crate::model::ListExecutionsRequest::filter].
58664    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58665        self.filter = v.into();
58666        self
58667    }
58668
58669    /// Sets the value of [order_by][crate::model::ListExecutionsRequest::order_by].
58670    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58671        self.order_by = v.into();
58672        self
58673    }
58674}
58675
58676#[cfg(feature = "metadata-service")]
58677impl wkt::message::Message for ListExecutionsRequest {
58678    fn typename() -> &'static str {
58679        "type.googleapis.com/google.cloud.aiplatform.v1.ListExecutionsRequest"
58680    }
58681}
58682
58683/// Response message for
58684/// [MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions].
58685///
58686/// [google.cloud.aiplatform.v1.MetadataService.ListExecutions]: crate::client::MetadataService::list_executions
58687#[cfg(feature = "metadata-service")]
58688#[derive(Clone, Default, PartialEq)]
58689#[non_exhaustive]
58690pub struct ListExecutionsResponse {
58691    /// The Executions retrieved from the MetadataStore.
58692    pub executions: std::vec::Vec<crate::model::Execution>,
58693
58694    /// A token, which can be sent as
58695    /// [ListExecutionsRequest.page_token][google.cloud.aiplatform.v1.ListExecutionsRequest.page_token]
58696    /// to retrieve the next page.
58697    /// If this field is not populated, there are no subsequent pages.
58698    ///
58699    /// [google.cloud.aiplatform.v1.ListExecutionsRequest.page_token]: crate::model::ListExecutionsRequest::page_token
58700    pub next_page_token: std::string::String,
58701
58702    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58703}
58704
58705#[cfg(feature = "metadata-service")]
58706impl ListExecutionsResponse {
58707    pub fn new() -> Self {
58708        std::default::Default::default()
58709    }
58710
58711    /// Sets the value of [executions][crate::model::ListExecutionsResponse::executions].
58712    pub fn set_executions<T, V>(mut self, v: T) -> Self
58713    where
58714        T: std::iter::IntoIterator<Item = V>,
58715        V: std::convert::Into<crate::model::Execution>,
58716    {
58717        use std::iter::Iterator;
58718        self.executions = v.into_iter().map(|i| i.into()).collect();
58719        self
58720    }
58721
58722    /// Sets the value of [next_page_token][crate::model::ListExecutionsResponse::next_page_token].
58723    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58724        self.next_page_token = v.into();
58725        self
58726    }
58727}
58728
58729#[cfg(feature = "metadata-service")]
58730impl wkt::message::Message for ListExecutionsResponse {
58731    fn typename() -> &'static str {
58732        "type.googleapis.com/google.cloud.aiplatform.v1.ListExecutionsResponse"
58733    }
58734}
58735
58736#[cfg(feature = "metadata-service")]
58737#[doc(hidden)]
58738impl gax::paginator::internal::PageableResponse for ListExecutionsResponse {
58739    type PageItem = crate::model::Execution;
58740
58741    fn items(self) -> std::vec::Vec<Self::PageItem> {
58742        self.executions
58743    }
58744
58745    fn next_page_token(&self) -> std::string::String {
58746        use std::clone::Clone;
58747        self.next_page_token.clone()
58748    }
58749}
58750
58751/// Request message for
58752/// [MetadataService.UpdateExecution][google.cloud.aiplatform.v1.MetadataService.UpdateExecution].
58753///
58754/// [google.cloud.aiplatform.v1.MetadataService.UpdateExecution]: crate::client::MetadataService::update_execution
58755#[cfg(feature = "metadata-service")]
58756#[derive(Clone, Default, PartialEq)]
58757#[non_exhaustive]
58758pub struct UpdateExecutionRequest {
58759    /// Required. The Execution containing updates.
58760    /// The Execution's [Execution.name][google.cloud.aiplatform.v1.Execution.name]
58761    /// field is used to identify the Execution to be updated. Format:
58762    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
58763    ///
58764    /// [google.cloud.aiplatform.v1.Execution.name]: crate::model::Execution::name
58765    pub execution: std::option::Option<crate::model::Execution>,
58766
58767    /// Optional. A FieldMask indicating which fields should be updated.
58768    pub update_mask: std::option::Option<wkt::FieldMask>,
58769
58770    /// If set to true, and the [Execution][google.cloud.aiplatform.v1.Execution]
58771    /// is not found, a new [Execution][google.cloud.aiplatform.v1.Execution] is
58772    /// created.
58773    ///
58774    /// [google.cloud.aiplatform.v1.Execution]: crate::model::Execution
58775    pub allow_missing: bool,
58776
58777    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58778}
58779
58780#[cfg(feature = "metadata-service")]
58781impl UpdateExecutionRequest {
58782    pub fn new() -> Self {
58783        std::default::Default::default()
58784    }
58785
58786    /// Sets the value of [execution][crate::model::UpdateExecutionRequest::execution].
58787    pub fn set_execution<T>(mut self, v: T) -> Self
58788    where
58789        T: std::convert::Into<crate::model::Execution>,
58790    {
58791        self.execution = std::option::Option::Some(v.into());
58792        self
58793    }
58794
58795    /// Sets or clears the value of [execution][crate::model::UpdateExecutionRequest::execution].
58796    pub fn set_or_clear_execution<T>(mut self, v: std::option::Option<T>) -> Self
58797    where
58798        T: std::convert::Into<crate::model::Execution>,
58799    {
58800        self.execution = v.map(|x| x.into());
58801        self
58802    }
58803
58804    /// Sets the value of [update_mask][crate::model::UpdateExecutionRequest::update_mask].
58805    pub fn set_update_mask<T>(mut self, v: T) -> Self
58806    where
58807        T: std::convert::Into<wkt::FieldMask>,
58808    {
58809        self.update_mask = std::option::Option::Some(v.into());
58810        self
58811    }
58812
58813    /// Sets or clears the value of [update_mask][crate::model::UpdateExecutionRequest::update_mask].
58814    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
58815    where
58816        T: std::convert::Into<wkt::FieldMask>,
58817    {
58818        self.update_mask = v.map(|x| x.into());
58819        self
58820    }
58821
58822    /// Sets the value of [allow_missing][crate::model::UpdateExecutionRequest::allow_missing].
58823    pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
58824        self.allow_missing = v.into();
58825        self
58826    }
58827}
58828
58829#[cfg(feature = "metadata-service")]
58830impl wkt::message::Message for UpdateExecutionRequest {
58831    fn typename() -> &'static str {
58832        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateExecutionRequest"
58833    }
58834}
58835
58836/// Request message for
58837/// [MetadataService.DeleteExecution][google.cloud.aiplatform.v1.MetadataService.DeleteExecution].
58838///
58839/// [google.cloud.aiplatform.v1.MetadataService.DeleteExecution]: crate::client::MetadataService::delete_execution
58840#[cfg(feature = "metadata-service")]
58841#[derive(Clone, Default, PartialEq)]
58842#[non_exhaustive]
58843pub struct DeleteExecutionRequest {
58844    /// Required. The resource name of the Execution to delete.
58845    /// Format:
58846    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
58847    pub name: std::string::String,
58848
58849    /// Optional. The etag of the Execution to delete.
58850    /// If this is provided, it must match the server's etag. Otherwise, the
58851    /// request will fail with a FAILED_PRECONDITION.
58852    pub etag: std::string::String,
58853
58854    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58855}
58856
58857#[cfg(feature = "metadata-service")]
58858impl DeleteExecutionRequest {
58859    pub fn new() -> Self {
58860        std::default::Default::default()
58861    }
58862
58863    /// Sets the value of [name][crate::model::DeleteExecutionRequest::name].
58864    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58865        self.name = v.into();
58866        self
58867    }
58868
58869    /// Sets the value of [etag][crate::model::DeleteExecutionRequest::etag].
58870    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58871        self.etag = v.into();
58872        self
58873    }
58874}
58875
58876#[cfg(feature = "metadata-service")]
58877impl wkt::message::Message for DeleteExecutionRequest {
58878    fn typename() -> &'static str {
58879        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteExecutionRequest"
58880    }
58881}
58882
58883/// Request message for
58884/// [MetadataService.PurgeExecutions][google.cloud.aiplatform.v1.MetadataService.PurgeExecutions].
58885///
58886/// [google.cloud.aiplatform.v1.MetadataService.PurgeExecutions]: crate::client::MetadataService::purge_executions
58887#[cfg(feature = "metadata-service")]
58888#[derive(Clone, Default, PartialEq)]
58889#[non_exhaustive]
58890pub struct PurgeExecutionsRequest {
58891    /// Required. The metadata store to purge Executions from.
58892    /// Format:
58893    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
58894    pub parent: std::string::String,
58895
58896    /// Required. A required filter matching the Executions to be purged.
58897    /// E.g., `update_time <= 2020-11-19T11:30:00-04:00`.
58898    pub filter: std::string::String,
58899
58900    /// Optional. Flag to indicate to actually perform the purge.
58901    /// If `force` is set to false, the method will return a sample of
58902    /// Execution names that would be deleted.
58903    pub force: bool,
58904
58905    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58906}
58907
58908#[cfg(feature = "metadata-service")]
58909impl PurgeExecutionsRequest {
58910    pub fn new() -> Self {
58911        std::default::Default::default()
58912    }
58913
58914    /// Sets the value of [parent][crate::model::PurgeExecutionsRequest::parent].
58915    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58916        self.parent = v.into();
58917        self
58918    }
58919
58920    /// Sets the value of [filter][crate::model::PurgeExecutionsRequest::filter].
58921    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
58922        self.filter = v.into();
58923        self
58924    }
58925
58926    /// Sets the value of [force][crate::model::PurgeExecutionsRequest::force].
58927    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
58928        self.force = v.into();
58929        self
58930    }
58931}
58932
58933#[cfg(feature = "metadata-service")]
58934impl wkt::message::Message for PurgeExecutionsRequest {
58935    fn typename() -> &'static str {
58936        "type.googleapis.com/google.cloud.aiplatform.v1.PurgeExecutionsRequest"
58937    }
58938}
58939
58940/// Response message for
58941/// [MetadataService.PurgeExecutions][google.cloud.aiplatform.v1.MetadataService.PurgeExecutions].
58942///
58943/// [google.cloud.aiplatform.v1.MetadataService.PurgeExecutions]: crate::client::MetadataService::purge_executions
58944#[cfg(feature = "metadata-service")]
58945#[derive(Clone, Default, PartialEq)]
58946#[non_exhaustive]
58947pub struct PurgeExecutionsResponse {
58948    /// The number of Executions that this request deleted (or, if `force` is
58949    /// false, the number of Executions that will be deleted). This can be an
58950    /// estimate.
58951    pub purge_count: i64,
58952
58953    /// A sample of the Execution names that will be deleted.
58954    /// Only populated if `force` is set to false. The maximum number of samples is
58955    /// 100 (it is possible to return fewer).
58956    pub purge_sample: std::vec::Vec<std::string::String>,
58957
58958    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
58959}
58960
58961#[cfg(feature = "metadata-service")]
58962impl PurgeExecutionsResponse {
58963    pub fn new() -> Self {
58964        std::default::Default::default()
58965    }
58966
58967    /// Sets the value of [purge_count][crate::model::PurgeExecutionsResponse::purge_count].
58968    pub fn set_purge_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
58969        self.purge_count = v.into();
58970        self
58971    }
58972
58973    /// Sets the value of [purge_sample][crate::model::PurgeExecutionsResponse::purge_sample].
58974    pub fn set_purge_sample<T, V>(mut self, v: T) -> Self
58975    where
58976        T: std::iter::IntoIterator<Item = V>,
58977        V: std::convert::Into<std::string::String>,
58978    {
58979        use std::iter::Iterator;
58980        self.purge_sample = v.into_iter().map(|i| i.into()).collect();
58981        self
58982    }
58983}
58984
58985#[cfg(feature = "metadata-service")]
58986impl wkt::message::Message for PurgeExecutionsResponse {
58987    fn typename() -> &'static str {
58988        "type.googleapis.com/google.cloud.aiplatform.v1.PurgeExecutionsResponse"
58989    }
58990}
58991
58992/// Details of operations that perform
58993/// [MetadataService.PurgeExecutions][google.cloud.aiplatform.v1.MetadataService.PurgeExecutions].
58994///
58995/// [google.cloud.aiplatform.v1.MetadataService.PurgeExecutions]: crate::client::MetadataService::purge_executions
58996#[cfg(feature = "metadata-service")]
58997#[derive(Clone, Default, PartialEq)]
58998#[non_exhaustive]
58999pub struct PurgeExecutionsMetadata {
59000    /// Operation metadata for purging Executions.
59001    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
59002
59003    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59004}
59005
59006#[cfg(feature = "metadata-service")]
59007impl PurgeExecutionsMetadata {
59008    pub fn new() -> Self {
59009        std::default::Default::default()
59010    }
59011
59012    /// Sets the value of [generic_metadata][crate::model::PurgeExecutionsMetadata::generic_metadata].
59013    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
59014    where
59015        T: std::convert::Into<crate::model::GenericOperationMetadata>,
59016    {
59017        self.generic_metadata = std::option::Option::Some(v.into());
59018        self
59019    }
59020
59021    /// Sets or clears the value of [generic_metadata][crate::model::PurgeExecutionsMetadata::generic_metadata].
59022    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
59023    where
59024        T: std::convert::Into<crate::model::GenericOperationMetadata>,
59025    {
59026        self.generic_metadata = v.map(|x| x.into());
59027        self
59028    }
59029}
59030
59031#[cfg(feature = "metadata-service")]
59032impl wkt::message::Message for PurgeExecutionsMetadata {
59033    fn typename() -> &'static str {
59034        "type.googleapis.com/google.cloud.aiplatform.v1.PurgeExecutionsMetadata"
59035    }
59036}
59037
59038/// Request message for
59039/// [MetadataService.AddExecutionEvents][google.cloud.aiplatform.v1.MetadataService.AddExecutionEvents].
59040///
59041/// [google.cloud.aiplatform.v1.MetadataService.AddExecutionEvents]: crate::client::MetadataService::add_execution_events
59042#[cfg(feature = "metadata-service")]
59043#[derive(Clone, Default, PartialEq)]
59044#[non_exhaustive]
59045pub struct AddExecutionEventsRequest {
59046    /// Required. The resource name of the Execution that the Events connect
59047    /// Artifacts with.
59048    /// Format:
59049    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
59050    pub execution: std::string::String,
59051
59052    /// The Events to create and add.
59053    pub events: std::vec::Vec<crate::model::Event>,
59054
59055    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59056}
59057
59058#[cfg(feature = "metadata-service")]
59059impl AddExecutionEventsRequest {
59060    pub fn new() -> Self {
59061        std::default::Default::default()
59062    }
59063
59064    /// Sets the value of [execution][crate::model::AddExecutionEventsRequest::execution].
59065    pub fn set_execution<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
59066        self.execution = v.into();
59067        self
59068    }
59069
59070    /// Sets the value of [events][crate::model::AddExecutionEventsRequest::events].
59071    pub fn set_events<T, V>(mut self, v: T) -> Self
59072    where
59073        T: std::iter::IntoIterator<Item = V>,
59074        V: std::convert::Into<crate::model::Event>,
59075    {
59076        use std::iter::Iterator;
59077        self.events = v.into_iter().map(|i| i.into()).collect();
59078        self
59079    }
59080}
59081
59082#[cfg(feature = "metadata-service")]
59083impl wkt::message::Message for AddExecutionEventsRequest {
59084    fn typename() -> &'static str {
59085        "type.googleapis.com/google.cloud.aiplatform.v1.AddExecutionEventsRequest"
59086    }
59087}
59088
59089/// Response message for
59090/// [MetadataService.AddExecutionEvents][google.cloud.aiplatform.v1.MetadataService.AddExecutionEvents].
59091///
59092/// [google.cloud.aiplatform.v1.MetadataService.AddExecutionEvents]: crate::client::MetadataService::add_execution_events
59093#[cfg(feature = "metadata-service")]
59094#[derive(Clone, Default, PartialEq)]
59095#[non_exhaustive]
59096pub struct AddExecutionEventsResponse {
59097    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59098}
59099
59100#[cfg(feature = "metadata-service")]
59101impl AddExecutionEventsResponse {
59102    pub fn new() -> Self {
59103        std::default::Default::default()
59104    }
59105}
59106
59107#[cfg(feature = "metadata-service")]
59108impl wkt::message::Message for AddExecutionEventsResponse {
59109    fn typename() -> &'static str {
59110        "type.googleapis.com/google.cloud.aiplatform.v1.AddExecutionEventsResponse"
59111    }
59112}
59113
59114/// Request message for
59115/// [MetadataService.QueryExecutionInputsAndOutputs][google.cloud.aiplatform.v1.MetadataService.QueryExecutionInputsAndOutputs].
59116///
59117/// [google.cloud.aiplatform.v1.MetadataService.QueryExecutionInputsAndOutputs]: crate::client::MetadataService::query_execution_inputs_and_outputs
59118#[cfg(feature = "metadata-service")]
59119#[derive(Clone, Default, PartialEq)]
59120#[non_exhaustive]
59121pub struct QueryExecutionInputsAndOutputsRequest {
59122    /// Required. The resource name of the Execution whose input and output
59123    /// Artifacts should be retrieved as a LineageSubgraph. Format:
59124    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
59125    pub execution: std::string::String,
59126
59127    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59128}
59129
59130#[cfg(feature = "metadata-service")]
59131impl QueryExecutionInputsAndOutputsRequest {
59132    pub fn new() -> Self {
59133        std::default::Default::default()
59134    }
59135
59136    /// Sets the value of [execution][crate::model::QueryExecutionInputsAndOutputsRequest::execution].
59137    pub fn set_execution<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
59138        self.execution = v.into();
59139        self
59140    }
59141}
59142
59143#[cfg(feature = "metadata-service")]
59144impl wkt::message::Message for QueryExecutionInputsAndOutputsRequest {
59145    fn typename() -> &'static str {
59146        "type.googleapis.com/google.cloud.aiplatform.v1.QueryExecutionInputsAndOutputsRequest"
59147    }
59148}
59149
59150/// Request message for
59151/// [MetadataService.CreateMetadataSchema][google.cloud.aiplatform.v1.MetadataService.CreateMetadataSchema].
59152///
59153/// [google.cloud.aiplatform.v1.MetadataService.CreateMetadataSchema]: crate::client::MetadataService::create_metadata_schema
59154#[cfg(feature = "metadata-service")]
59155#[derive(Clone, Default, PartialEq)]
59156#[non_exhaustive]
59157pub struct CreateMetadataSchemaRequest {
59158    /// Required. The resource name of the MetadataStore where the MetadataSchema
59159    /// should be created. Format:
59160    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
59161    pub parent: std::string::String,
59162
59163    /// Required. The MetadataSchema to create.
59164    pub metadata_schema: std::option::Option<crate::model::MetadataSchema>,
59165
59166    /// The {metadata_schema} portion of the resource name with the format:
59167    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}`
59168    /// If not provided, the MetadataStore's ID will be a UUID generated by the
59169    /// service.
59170    /// Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
59171    /// Must be unique across all MetadataSchemas in the parent Location.
59172    /// (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED
59173    /// if the caller can't view the preexisting MetadataSchema.)
59174    pub metadata_schema_id: std::string::String,
59175
59176    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59177}
59178
59179#[cfg(feature = "metadata-service")]
59180impl CreateMetadataSchemaRequest {
59181    pub fn new() -> Self {
59182        std::default::Default::default()
59183    }
59184
59185    /// Sets the value of [parent][crate::model::CreateMetadataSchemaRequest::parent].
59186    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
59187        self.parent = v.into();
59188        self
59189    }
59190
59191    /// Sets the value of [metadata_schema][crate::model::CreateMetadataSchemaRequest::metadata_schema].
59192    pub fn set_metadata_schema<T>(mut self, v: T) -> Self
59193    where
59194        T: std::convert::Into<crate::model::MetadataSchema>,
59195    {
59196        self.metadata_schema = std::option::Option::Some(v.into());
59197        self
59198    }
59199
59200    /// Sets or clears the value of [metadata_schema][crate::model::CreateMetadataSchemaRequest::metadata_schema].
59201    pub fn set_or_clear_metadata_schema<T>(mut self, v: std::option::Option<T>) -> Self
59202    where
59203        T: std::convert::Into<crate::model::MetadataSchema>,
59204    {
59205        self.metadata_schema = v.map(|x| x.into());
59206        self
59207    }
59208
59209    /// Sets the value of [metadata_schema_id][crate::model::CreateMetadataSchemaRequest::metadata_schema_id].
59210    pub fn set_metadata_schema_id<T: std::convert::Into<std::string::String>>(
59211        mut self,
59212        v: T,
59213    ) -> Self {
59214        self.metadata_schema_id = v.into();
59215        self
59216    }
59217}
59218
59219#[cfg(feature = "metadata-service")]
59220impl wkt::message::Message for CreateMetadataSchemaRequest {
59221    fn typename() -> &'static str {
59222        "type.googleapis.com/google.cloud.aiplatform.v1.CreateMetadataSchemaRequest"
59223    }
59224}
59225
59226/// Request message for
59227/// [MetadataService.GetMetadataSchema][google.cloud.aiplatform.v1.MetadataService.GetMetadataSchema].
59228///
59229/// [google.cloud.aiplatform.v1.MetadataService.GetMetadataSchema]: crate::client::MetadataService::get_metadata_schema
59230#[cfg(feature = "metadata-service")]
59231#[derive(Clone, Default, PartialEq)]
59232#[non_exhaustive]
59233pub struct GetMetadataSchemaRequest {
59234    /// Required. The resource name of the MetadataSchema to retrieve.
59235    /// Format:
59236    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}`
59237    pub name: std::string::String,
59238
59239    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59240}
59241
59242#[cfg(feature = "metadata-service")]
59243impl GetMetadataSchemaRequest {
59244    pub fn new() -> Self {
59245        std::default::Default::default()
59246    }
59247
59248    /// Sets the value of [name][crate::model::GetMetadataSchemaRequest::name].
59249    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
59250        self.name = v.into();
59251        self
59252    }
59253}
59254
59255#[cfg(feature = "metadata-service")]
59256impl wkt::message::Message for GetMetadataSchemaRequest {
59257    fn typename() -> &'static str {
59258        "type.googleapis.com/google.cloud.aiplatform.v1.GetMetadataSchemaRequest"
59259    }
59260}
59261
59262/// Request message for
59263/// [MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas].
59264///
59265/// [google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas]: crate::client::MetadataService::list_metadata_schemas
59266#[cfg(feature = "metadata-service")]
59267#[derive(Clone, Default, PartialEq)]
59268#[non_exhaustive]
59269pub struct ListMetadataSchemasRequest {
59270    /// Required. The MetadataStore whose MetadataSchemas should be listed.
59271    /// Format:
59272    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
59273    pub parent: std::string::String,
59274
59275    /// The maximum number of MetadataSchemas to return. The service may return
59276    /// fewer.
59277    /// Must be in range 1-1000, inclusive. Defaults to 100.
59278    pub page_size: i32,
59279
59280    /// A page token, received from a previous
59281    /// [MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas]
59282    /// call. Provide this to retrieve the next page.
59283    ///
59284    /// When paginating, all other provided parameters must match the call that
59285    /// provided the page token. (Otherwise the request will fail with
59286    /// INVALID_ARGUMENT error.)
59287    ///
59288    /// [google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas]: crate::client::MetadataService::list_metadata_schemas
59289    pub page_token: std::string::String,
59290
59291    /// A query to filter available MetadataSchemas for matching results.
59292    pub filter: std::string::String,
59293
59294    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59295}
59296
59297#[cfg(feature = "metadata-service")]
59298impl ListMetadataSchemasRequest {
59299    pub fn new() -> Self {
59300        std::default::Default::default()
59301    }
59302
59303    /// Sets the value of [parent][crate::model::ListMetadataSchemasRequest::parent].
59304    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
59305        self.parent = v.into();
59306        self
59307    }
59308
59309    /// Sets the value of [page_size][crate::model::ListMetadataSchemasRequest::page_size].
59310    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
59311        self.page_size = v.into();
59312        self
59313    }
59314
59315    /// Sets the value of [page_token][crate::model::ListMetadataSchemasRequest::page_token].
59316    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
59317        self.page_token = v.into();
59318        self
59319    }
59320
59321    /// Sets the value of [filter][crate::model::ListMetadataSchemasRequest::filter].
59322    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
59323        self.filter = v.into();
59324        self
59325    }
59326}
59327
59328#[cfg(feature = "metadata-service")]
59329impl wkt::message::Message for ListMetadataSchemasRequest {
59330    fn typename() -> &'static str {
59331        "type.googleapis.com/google.cloud.aiplatform.v1.ListMetadataSchemasRequest"
59332    }
59333}
59334
59335/// Response message for
59336/// [MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas].
59337///
59338/// [google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas]: crate::client::MetadataService::list_metadata_schemas
59339#[cfg(feature = "metadata-service")]
59340#[derive(Clone, Default, PartialEq)]
59341#[non_exhaustive]
59342pub struct ListMetadataSchemasResponse {
59343    /// The MetadataSchemas found for the MetadataStore.
59344    pub metadata_schemas: std::vec::Vec<crate::model::MetadataSchema>,
59345
59346    /// A token, which can be sent as
59347    /// [ListMetadataSchemasRequest.page_token][google.cloud.aiplatform.v1.ListMetadataSchemasRequest.page_token]
59348    /// to retrieve the next page. If this field is not populated, there are no
59349    /// subsequent pages.
59350    ///
59351    /// [google.cloud.aiplatform.v1.ListMetadataSchemasRequest.page_token]: crate::model::ListMetadataSchemasRequest::page_token
59352    pub next_page_token: std::string::String,
59353
59354    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59355}
59356
59357#[cfg(feature = "metadata-service")]
59358impl ListMetadataSchemasResponse {
59359    pub fn new() -> Self {
59360        std::default::Default::default()
59361    }
59362
59363    /// Sets the value of [metadata_schemas][crate::model::ListMetadataSchemasResponse::metadata_schemas].
59364    pub fn set_metadata_schemas<T, V>(mut self, v: T) -> Self
59365    where
59366        T: std::iter::IntoIterator<Item = V>,
59367        V: std::convert::Into<crate::model::MetadataSchema>,
59368    {
59369        use std::iter::Iterator;
59370        self.metadata_schemas = v.into_iter().map(|i| i.into()).collect();
59371        self
59372    }
59373
59374    /// Sets the value of [next_page_token][crate::model::ListMetadataSchemasResponse::next_page_token].
59375    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
59376        self.next_page_token = v.into();
59377        self
59378    }
59379}
59380
59381#[cfg(feature = "metadata-service")]
59382impl wkt::message::Message for ListMetadataSchemasResponse {
59383    fn typename() -> &'static str {
59384        "type.googleapis.com/google.cloud.aiplatform.v1.ListMetadataSchemasResponse"
59385    }
59386}
59387
59388#[cfg(feature = "metadata-service")]
59389#[doc(hidden)]
59390impl gax::paginator::internal::PageableResponse for ListMetadataSchemasResponse {
59391    type PageItem = crate::model::MetadataSchema;
59392
59393    fn items(self) -> std::vec::Vec<Self::PageItem> {
59394        self.metadata_schemas
59395    }
59396
59397    fn next_page_token(&self) -> std::string::String {
59398        use std::clone::Clone;
59399        self.next_page_token.clone()
59400    }
59401}
59402
59403/// Request message for
59404/// [MetadataService.QueryArtifactLineageSubgraph][google.cloud.aiplatform.v1.MetadataService.QueryArtifactLineageSubgraph].
59405///
59406/// [google.cloud.aiplatform.v1.MetadataService.QueryArtifactLineageSubgraph]: crate::client::MetadataService::query_artifact_lineage_subgraph
59407#[cfg(feature = "metadata-service")]
59408#[derive(Clone, Default, PartialEq)]
59409#[non_exhaustive]
59410pub struct QueryArtifactLineageSubgraphRequest {
59411    /// Required. The resource name of the Artifact whose Lineage needs to be
59412    /// retrieved as a LineageSubgraph. Format:
59413    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
59414    ///
59415    /// The request may error with FAILED_PRECONDITION if the number of Artifacts,
59416    /// the number of Executions, or the number of Events that would be returned
59417    /// for the Context exceeds 1000.
59418    pub artifact: std::string::String,
59419
59420    /// Specifies the size of the lineage graph in terms of number of hops from the
59421    /// specified artifact.
59422    /// Negative Value: INVALID_ARGUMENT error is returned
59423    /// 0: Only input artifact is returned.
59424    /// No value: Transitive closure is performed to return the complete graph.
59425    pub max_hops: i32,
59426
59427    /// Filter specifying the boolean condition for the Artifacts to satisfy in
59428    /// order to be part of the Lineage Subgraph.
59429    /// The syntax to define filter query is based on <https://google.aip.dev/160>.
59430    /// The supported set of filters include the following:
59431    ///
59432    /// * **Attribute filtering**:
59433    ///   For example: `display_name = "test"`
59434    ///   Supported fields include: `name`, `display_name`, `uri`, `state`,
59435    ///   `schema_title`, `create_time`, and `update_time`.
59436    ///   Time fields, such as `create_time` and `update_time`, require values
59437    ///   specified in RFC-3339 format.
59438    ///   For example: `create_time = "2020-11-19T11:30:00-04:00"`
59439    /// * **Metadata field**:
59440    ///   To filter on metadata fields use traversal operation as follows:
59441    ///   `metadata.<field_name>.<type_value>`.
59442    ///   For example: `metadata.field_1.number_value = 10.0`
59443    ///   In case the field name contains special characters (such as colon), one
59444    ///   can embed it inside double quote.
59445    ///   For example: `metadata."field:1".number_value = 10.0`
59446    ///
59447    /// Each of the above supported filter types can be combined together using
59448    /// logical operators (`AND` & `OR`). Maximum nested expression depth allowed
59449    /// is 5.
59450    ///
59451    /// For example: `display_name = "test" AND metadata.field1.bool_value = true`.
59452    pub filter: std::string::String,
59453
59454    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59455}
59456
59457#[cfg(feature = "metadata-service")]
59458impl QueryArtifactLineageSubgraphRequest {
59459    pub fn new() -> Self {
59460        std::default::Default::default()
59461    }
59462
59463    /// Sets the value of [artifact][crate::model::QueryArtifactLineageSubgraphRequest::artifact].
59464    pub fn set_artifact<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
59465        self.artifact = v.into();
59466        self
59467    }
59468
59469    /// Sets the value of [max_hops][crate::model::QueryArtifactLineageSubgraphRequest::max_hops].
59470    pub fn set_max_hops<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
59471        self.max_hops = v.into();
59472        self
59473    }
59474
59475    /// Sets the value of [filter][crate::model::QueryArtifactLineageSubgraphRequest::filter].
59476    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
59477        self.filter = v.into();
59478        self
59479    }
59480}
59481
59482#[cfg(feature = "metadata-service")]
59483impl wkt::message::Message for QueryArtifactLineageSubgraphRequest {
59484    fn typename() -> &'static str {
59485        "type.googleapis.com/google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest"
59486    }
59487}
59488
59489/// Instance of a metadata store. Contains a set of metadata that can be
59490/// queried.
59491#[cfg(feature = "metadata-service")]
59492#[derive(Clone, Default, PartialEq)]
59493#[non_exhaustive]
59494pub struct MetadataStore {
59495    /// Output only. The resource name of the MetadataStore instance.
59496    pub name: std::string::String,
59497
59498    /// Output only. Timestamp when this MetadataStore was created.
59499    pub create_time: std::option::Option<wkt::Timestamp>,
59500
59501    /// Output only. Timestamp when this MetadataStore was last updated.
59502    pub update_time: std::option::Option<wkt::Timestamp>,
59503
59504    /// Customer-managed encryption key spec for a Metadata Store. If set, this
59505    /// Metadata Store and all sub-resources of this Metadata Store are secured
59506    /// using this key.
59507    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
59508
59509    /// Description of the MetadataStore.
59510    pub description: std::string::String,
59511
59512    /// Output only. State information of the MetadataStore.
59513    pub state: std::option::Option<crate::model::metadata_store::MetadataStoreState>,
59514
59515    /// Optional. Dataplex integration settings.
59516    pub dataplex_config: std::option::Option<crate::model::metadata_store::DataplexConfig>,
59517
59518    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59519}
59520
59521#[cfg(feature = "metadata-service")]
59522impl MetadataStore {
59523    pub fn new() -> Self {
59524        std::default::Default::default()
59525    }
59526
59527    /// Sets the value of [name][crate::model::MetadataStore::name].
59528    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
59529        self.name = v.into();
59530        self
59531    }
59532
59533    /// Sets the value of [create_time][crate::model::MetadataStore::create_time].
59534    pub fn set_create_time<T>(mut self, v: T) -> Self
59535    where
59536        T: std::convert::Into<wkt::Timestamp>,
59537    {
59538        self.create_time = std::option::Option::Some(v.into());
59539        self
59540    }
59541
59542    /// Sets or clears the value of [create_time][crate::model::MetadataStore::create_time].
59543    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
59544    where
59545        T: std::convert::Into<wkt::Timestamp>,
59546    {
59547        self.create_time = v.map(|x| x.into());
59548        self
59549    }
59550
59551    /// Sets the value of [update_time][crate::model::MetadataStore::update_time].
59552    pub fn set_update_time<T>(mut self, v: T) -> Self
59553    where
59554        T: std::convert::Into<wkt::Timestamp>,
59555    {
59556        self.update_time = std::option::Option::Some(v.into());
59557        self
59558    }
59559
59560    /// Sets or clears the value of [update_time][crate::model::MetadataStore::update_time].
59561    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
59562    where
59563        T: std::convert::Into<wkt::Timestamp>,
59564    {
59565        self.update_time = v.map(|x| x.into());
59566        self
59567    }
59568
59569    /// Sets the value of [encryption_spec][crate::model::MetadataStore::encryption_spec].
59570    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
59571    where
59572        T: std::convert::Into<crate::model::EncryptionSpec>,
59573    {
59574        self.encryption_spec = std::option::Option::Some(v.into());
59575        self
59576    }
59577
59578    /// Sets or clears the value of [encryption_spec][crate::model::MetadataStore::encryption_spec].
59579    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
59580    where
59581        T: std::convert::Into<crate::model::EncryptionSpec>,
59582    {
59583        self.encryption_spec = v.map(|x| x.into());
59584        self
59585    }
59586
59587    /// Sets the value of [description][crate::model::MetadataStore::description].
59588    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
59589        self.description = v.into();
59590        self
59591    }
59592
59593    /// Sets the value of [state][crate::model::MetadataStore::state].
59594    pub fn set_state<T>(mut self, v: T) -> Self
59595    where
59596        T: std::convert::Into<crate::model::metadata_store::MetadataStoreState>,
59597    {
59598        self.state = std::option::Option::Some(v.into());
59599        self
59600    }
59601
59602    /// Sets or clears the value of [state][crate::model::MetadataStore::state].
59603    pub fn set_or_clear_state<T>(mut self, v: std::option::Option<T>) -> Self
59604    where
59605        T: std::convert::Into<crate::model::metadata_store::MetadataStoreState>,
59606    {
59607        self.state = v.map(|x| x.into());
59608        self
59609    }
59610
59611    /// Sets the value of [dataplex_config][crate::model::MetadataStore::dataplex_config].
59612    pub fn set_dataplex_config<T>(mut self, v: T) -> Self
59613    where
59614        T: std::convert::Into<crate::model::metadata_store::DataplexConfig>,
59615    {
59616        self.dataplex_config = std::option::Option::Some(v.into());
59617        self
59618    }
59619
59620    /// Sets or clears the value of [dataplex_config][crate::model::MetadataStore::dataplex_config].
59621    pub fn set_or_clear_dataplex_config<T>(mut self, v: std::option::Option<T>) -> Self
59622    where
59623        T: std::convert::Into<crate::model::metadata_store::DataplexConfig>,
59624    {
59625        self.dataplex_config = v.map(|x| x.into());
59626        self
59627    }
59628}
59629
59630#[cfg(feature = "metadata-service")]
59631impl wkt::message::Message for MetadataStore {
59632    fn typename() -> &'static str {
59633        "type.googleapis.com/google.cloud.aiplatform.v1.MetadataStore"
59634    }
59635}
59636
59637/// Defines additional types related to [MetadataStore].
59638#[cfg(feature = "metadata-service")]
59639pub mod metadata_store {
59640    #[allow(unused_imports)]
59641    use super::*;
59642
59643    /// Represents state information for a MetadataStore.
59644    #[cfg(feature = "metadata-service")]
59645    #[derive(Clone, Default, PartialEq)]
59646    #[non_exhaustive]
59647    pub struct MetadataStoreState {
59648        /// The disk utilization of the MetadataStore in bytes.
59649        pub disk_utilization_bytes: i64,
59650
59651        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59652    }
59653
59654    #[cfg(feature = "metadata-service")]
59655    impl MetadataStoreState {
59656        pub fn new() -> Self {
59657            std::default::Default::default()
59658        }
59659
59660        /// Sets the value of [disk_utilization_bytes][crate::model::metadata_store::MetadataStoreState::disk_utilization_bytes].
59661        pub fn set_disk_utilization_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
59662            self.disk_utilization_bytes = v.into();
59663            self
59664        }
59665    }
59666
59667    #[cfg(feature = "metadata-service")]
59668    impl wkt::message::Message for MetadataStoreState {
59669        fn typename() -> &'static str {
59670            "type.googleapis.com/google.cloud.aiplatform.v1.MetadataStore.MetadataStoreState"
59671        }
59672    }
59673
59674    /// Represents Dataplex integration settings.
59675    #[cfg(feature = "metadata-service")]
59676    #[derive(Clone, Default, PartialEq)]
59677    #[non_exhaustive]
59678    pub struct DataplexConfig {
59679        /// Optional. Whether or not Data Lineage synchronization is enabled for
59680        /// Vertex Pipelines.
59681        pub enabled_pipelines_lineage: bool,
59682
59683        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59684    }
59685
59686    #[cfg(feature = "metadata-service")]
59687    impl DataplexConfig {
59688        pub fn new() -> Self {
59689            std::default::Default::default()
59690        }
59691
59692        /// Sets the value of [enabled_pipelines_lineage][crate::model::metadata_store::DataplexConfig::enabled_pipelines_lineage].
59693        pub fn set_enabled_pipelines_lineage<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
59694            self.enabled_pipelines_lineage = v.into();
59695            self
59696        }
59697    }
59698
59699    #[cfg(feature = "metadata-service")]
59700    impl wkt::message::Message for DataplexConfig {
59701        fn typename() -> &'static str {
59702            "type.googleapis.com/google.cloud.aiplatform.v1.MetadataStore.DataplexConfig"
59703        }
59704    }
59705}
59706
59707/// Represents one resource that exists in automl.googleapis.com,
59708/// datalabeling.googleapis.com or ml.googleapis.com.
59709#[cfg(feature = "migration-service")]
59710#[derive(Clone, Default, PartialEq)]
59711#[non_exhaustive]
59712pub struct MigratableResource {
59713    /// Output only. Timestamp when the last migration attempt on this
59714    /// MigratableResource started. Will not be set if there's no migration attempt
59715    /// on this MigratableResource.
59716    pub last_migrate_time: std::option::Option<wkt::Timestamp>,
59717
59718    /// Output only. Timestamp when this MigratableResource was last updated.
59719    pub last_update_time: std::option::Option<wkt::Timestamp>,
59720
59721    pub resource: std::option::Option<crate::model::migratable_resource::Resource>,
59722
59723    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59724}
59725
59726#[cfg(feature = "migration-service")]
59727impl MigratableResource {
59728    pub fn new() -> Self {
59729        std::default::Default::default()
59730    }
59731
59732    /// Sets the value of [last_migrate_time][crate::model::MigratableResource::last_migrate_time].
59733    pub fn set_last_migrate_time<T>(mut self, v: T) -> Self
59734    where
59735        T: std::convert::Into<wkt::Timestamp>,
59736    {
59737        self.last_migrate_time = std::option::Option::Some(v.into());
59738        self
59739    }
59740
59741    /// Sets or clears the value of [last_migrate_time][crate::model::MigratableResource::last_migrate_time].
59742    pub fn set_or_clear_last_migrate_time<T>(mut self, v: std::option::Option<T>) -> Self
59743    where
59744        T: std::convert::Into<wkt::Timestamp>,
59745    {
59746        self.last_migrate_time = v.map(|x| x.into());
59747        self
59748    }
59749
59750    /// Sets the value of [last_update_time][crate::model::MigratableResource::last_update_time].
59751    pub fn set_last_update_time<T>(mut self, v: T) -> Self
59752    where
59753        T: std::convert::Into<wkt::Timestamp>,
59754    {
59755        self.last_update_time = std::option::Option::Some(v.into());
59756        self
59757    }
59758
59759    /// Sets or clears the value of [last_update_time][crate::model::MigratableResource::last_update_time].
59760    pub fn set_or_clear_last_update_time<T>(mut self, v: std::option::Option<T>) -> Self
59761    where
59762        T: std::convert::Into<wkt::Timestamp>,
59763    {
59764        self.last_update_time = v.map(|x| x.into());
59765        self
59766    }
59767
59768    /// Sets the value of [resource][crate::model::MigratableResource::resource].
59769    ///
59770    /// Note that all the setters affecting `resource` are mutually
59771    /// exclusive.
59772    pub fn set_resource<
59773        T: std::convert::Into<std::option::Option<crate::model::migratable_resource::Resource>>,
59774    >(
59775        mut self,
59776        v: T,
59777    ) -> Self {
59778        self.resource = v.into();
59779        self
59780    }
59781
59782    /// The value of [resource][crate::model::MigratableResource::resource]
59783    /// if it holds a `MlEngineModelVersion`, `None` if the field is not set or
59784    /// holds a different branch.
59785    pub fn ml_engine_model_version(
59786        &self,
59787    ) -> std::option::Option<
59788        &std::boxed::Box<crate::model::migratable_resource::MlEngineModelVersion>,
59789    > {
59790        #[allow(unreachable_patterns)]
59791        self.resource.as_ref().and_then(|v| match v {
59792            crate::model::migratable_resource::Resource::MlEngineModelVersion(v) => {
59793                std::option::Option::Some(v)
59794            }
59795            _ => std::option::Option::None,
59796        })
59797    }
59798
59799    /// Sets the value of [resource][crate::model::MigratableResource::resource]
59800    /// to hold a `MlEngineModelVersion`.
59801    ///
59802    /// Note that all the setters affecting `resource` are
59803    /// mutually exclusive.
59804    pub fn set_ml_engine_model_version<
59805        T: std::convert::Into<
59806                std::boxed::Box<crate::model::migratable_resource::MlEngineModelVersion>,
59807            >,
59808    >(
59809        mut self,
59810        v: T,
59811    ) -> Self {
59812        self.resource = std::option::Option::Some(
59813            crate::model::migratable_resource::Resource::MlEngineModelVersion(v.into()),
59814        );
59815        self
59816    }
59817
59818    /// The value of [resource][crate::model::MigratableResource::resource]
59819    /// if it holds a `AutomlModel`, `None` if the field is not set or
59820    /// holds a different branch.
59821    pub fn automl_model(
59822        &self,
59823    ) -> std::option::Option<&std::boxed::Box<crate::model::migratable_resource::AutomlModel>> {
59824        #[allow(unreachable_patterns)]
59825        self.resource.as_ref().and_then(|v| match v {
59826            crate::model::migratable_resource::Resource::AutomlModel(v) => {
59827                std::option::Option::Some(v)
59828            }
59829            _ => std::option::Option::None,
59830        })
59831    }
59832
59833    /// Sets the value of [resource][crate::model::MigratableResource::resource]
59834    /// to hold a `AutomlModel`.
59835    ///
59836    /// Note that all the setters affecting `resource` are
59837    /// mutually exclusive.
59838    pub fn set_automl_model<
59839        T: std::convert::Into<std::boxed::Box<crate::model::migratable_resource::AutomlModel>>,
59840    >(
59841        mut self,
59842        v: T,
59843    ) -> Self {
59844        self.resource = std::option::Option::Some(
59845            crate::model::migratable_resource::Resource::AutomlModel(v.into()),
59846        );
59847        self
59848    }
59849
59850    /// The value of [resource][crate::model::MigratableResource::resource]
59851    /// if it holds a `AutomlDataset`, `None` if the field is not set or
59852    /// holds a different branch.
59853    pub fn automl_dataset(
59854        &self,
59855    ) -> std::option::Option<&std::boxed::Box<crate::model::migratable_resource::AutomlDataset>>
59856    {
59857        #[allow(unreachable_patterns)]
59858        self.resource.as_ref().and_then(|v| match v {
59859            crate::model::migratable_resource::Resource::AutomlDataset(v) => {
59860                std::option::Option::Some(v)
59861            }
59862            _ => std::option::Option::None,
59863        })
59864    }
59865
59866    /// Sets the value of [resource][crate::model::MigratableResource::resource]
59867    /// to hold a `AutomlDataset`.
59868    ///
59869    /// Note that all the setters affecting `resource` are
59870    /// mutually exclusive.
59871    pub fn set_automl_dataset<
59872        T: std::convert::Into<std::boxed::Box<crate::model::migratable_resource::AutomlDataset>>,
59873    >(
59874        mut self,
59875        v: T,
59876    ) -> Self {
59877        self.resource = std::option::Option::Some(
59878            crate::model::migratable_resource::Resource::AutomlDataset(v.into()),
59879        );
59880        self
59881    }
59882
59883    /// The value of [resource][crate::model::MigratableResource::resource]
59884    /// if it holds a `DataLabelingDataset`, `None` if the field is not set or
59885    /// holds a different branch.
59886    pub fn data_labeling_dataset(
59887        &self,
59888    ) -> std::option::Option<&std::boxed::Box<crate::model::migratable_resource::DataLabelingDataset>>
59889    {
59890        #[allow(unreachable_patterns)]
59891        self.resource.as_ref().and_then(|v| match v {
59892            crate::model::migratable_resource::Resource::DataLabelingDataset(v) => {
59893                std::option::Option::Some(v)
59894            }
59895            _ => std::option::Option::None,
59896        })
59897    }
59898
59899    /// Sets the value of [resource][crate::model::MigratableResource::resource]
59900    /// to hold a `DataLabelingDataset`.
59901    ///
59902    /// Note that all the setters affecting `resource` are
59903    /// mutually exclusive.
59904    pub fn set_data_labeling_dataset<
59905        T: std::convert::Into<std::boxed::Box<crate::model::migratable_resource::DataLabelingDataset>>,
59906    >(
59907        mut self,
59908        v: T,
59909    ) -> Self {
59910        self.resource = std::option::Option::Some(
59911            crate::model::migratable_resource::Resource::DataLabelingDataset(v.into()),
59912        );
59913        self
59914    }
59915}
59916
59917#[cfg(feature = "migration-service")]
59918impl wkt::message::Message for MigratableResource {
59919    fn typename() -> &'static str {
59920        "type.googleapis.com/google.cloud.aiplatform.v1.MigratableResource"
59921    }
59922}
59923
59924/// Defines additional types related to [MigratableResource].
59925#[cfg(feature = "migration-service")]
59926pub mod migratable_resource {
59927    #[allow(unused_imports)]
59928    use super::*;
59929
59930    /// Represents one model Version in ml.googleapis.com.
59931    #[cfg(feature = "migration-service")]
59932    #[derive(Clone, Default, PartialEq)]
59933    #[non_exhaustive]
59934    pub struct MlEngineModelVersion {
59935        /// The ml.googleapis.com endpoint that this model Version currently lives
59936        /// in.
59937        /// Example values:
59938        ///
59939        /// * ml.googleapis.com
59940        /// * us-centrall-ml.googleapis.com
59941        /// * europe-west4-ml.googleapis.com
59942        /// * asia-east1-ml.googleapis.com
59943        pub endpoint: std::string::String,
59944
59945        /// Full resource name of ml engine model Version.
59946        /// Format: `projects/{project}/models/{model}/versions/{version}`.
59947        pub version: std::string::String,
59948
59949        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59950    }
59951
59952    #[cfg(feature = "migration-service")]
59953    impl MlEngineModelVersion {
59954        pub fn new() -> Self {
59955            std::default::Default::default()
59956        }
59957
59958        /// Sets the value of [endpoint][crate::model::migratable_resource::MlEngineModelVersion::endpoint].
59959        pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
59960            self.endpoint = v.into();
59961            self
59962        }
59963
59964        /// Sets the value of [version][crate::model::migratable_resource::MlEngineModelVersion::version].
59965        pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
59966            self.version = v.into();
59967            self
59968        }
59969    }
59970
59971    #[cfg(feature = "migration-service")]
59972    impl wkt::message::Message for MlEngineModelVersion {
59973        fn typename() -> &'static str {
59974            "type.googleapis.com/google.cloud.aiplatform.v1.MigratableResource.MlEngineModelVersion"
59975        }
59976    }
59977
59978    /// Represents one Model in automl.googleapis.com.
59979    #[cfg(feature = "migration-service")]
59980    #[derive(Clone, Default, PartialEq)]
59981    #[non_exhaustive]
59982    pub struct AutomlModel {
59983        /// Full resource name of automl Model.
59984        /// Format:
59985        /// `projects/{project}/locations/{location}/models/{model}`.
59986        pub model: std::string::String,
59987
59988        /// The Model's display name in automl.googleapis.com.
59989        pub model_display_name: std::string::String,
59990
59991        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
59992    }
59993
59994    #[cfg(feature = "migration-service")]
59995    impl AutomlModel {
59996        pub fn new() -> Self {
59997            std::default::Default::default()
59998        }
59999
60000        /// Sets the value of [model][crate::model::migratable_resource::AutomlModel::model].
60001        pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
60002            self.model = v.into();
60003            self
60004        }
60005
60006        /// Sets the value of [model_display_name][crate::model::migratable_resource::AutomlModel::model_display_name].
60007        pub fn set_model_display_name<T: std::convert::Into<std::string::String>>(
60008            mut self,
60009            v: T,
60010        ) -> Self {
60011            self.model_display_name = v.into();
60012            self
60013        }
60014    }
60015
60016    #[cfg(feature = "migration-service")]
60017    impl wkt::message::Message for AutomlModel {
60018        fn typename() -> &'static str {
60019            "type.googleapis.com/google.cloud.aiplatform.v1.MigratableResource.AutomlModel"
60020        }
60021    }
60022
60023    /// Represents one Dataset in automl.googleapis.com.
60024    #[cfg(feature = "migration-service")]
60025    #[derive(Clone, Default, PartialEq)]
60026    #[non_exhaustive]
60027    pub struct AutomlDataset {
60028        /// Full resource name of automl Dataset.
60029        /// Format:
60030        /// `projects/{project}/locations/{location}/datasets/{dataset}`.
60031        pub dataset: std::string::String,
60032
60033        /// The Dataset's display name in automl.googleapis.com.
60034        pub dataset_display_name: std::string::String,
60035
60036        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60037    }
60038
60039    #[cfg(feature = "migration-service")]
60040    impl AutomlDataset {
60041        pub fn new() -> Self {
60042            std::default::Default::default()
60043        }
60044
60045        /// Sets the value of [dataset][crate::model::migratable_resource::AutomlDataset::dataset].
60046        pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
60047            self.dataset = v.into();
60048            self
60049        }
60050
60051        /// Sets the value of [dataset_display_name][crate::model::migratable_resource::AutomlDataset::dataset_display_name].
60052        pub fn set_dataset_display_name<T: std::convert::Into<std::string::String>>(
60053            mut self,
60054            v: T,
60055        ) -> Self {
60056            self.dataset_display_name = v.into();
60057            self
60058        }
60059    }
60060
60061    #[cfg(feature = "migration-service")]
60062    impl wkt::message::Message for AutomlDataset {
60063        fn typename() -> &'static str {
60064            "type.googleapis.com/google.cloud.aiplatform.v1.MigratableResource.AutomlDataset"
60065        }
60066    }
60067
60068    /// Represents one Dataset in datalabeling.googleapis.com.
60069    #[cfg(feature = "migration-service")]
60070    #[derive(Clone, Default, PartialEq)]
60071    #[non_exhaustive]
60072    pub struct DataLabelingDataset {
60073        /// Full resource name of data labeling Dataset.
60074        /// Format:
60075        /// `projects/{project}/datasets/{dataset}`.
60076        pub dataset: std::string::String,
60077
60078        /// The Dataset's display name in datalabeling.googleapis.com.
60079        pub dataset_display_name: std::string::String,
60080
60081        /// The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to
60082        /// the data labeling Dataset.
60083        pub data_labeling_annotated_datasets: std::vec::Vec<
60084            crate::model::migratable_resource::data_labeling_dataset::DataLabelingAnnotatedDataset,
60085        >,
60086
60087        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60088    }
60089
60090    #[cfg(feature = "migration-service")]
60091    impl DataLabelingDataset {
60092        pub fn new() -> Self {
60093            std::default::Default::default()
60094        }
60095
60096        /// Sets the value of [dataset][crate::model::migratable_resource::DataLabelingDataset::dataset].
60097        pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
60098            self.dataset = v.into();
60099            self
60100        }
60101
60102        /// Sets the value of [dataset_display_name][crate::model::migratable_resource::DataLabelingDataset::dataset_display_name].
60103        pub fn set_dataset_display_name<T: std::convert::Into<std::string::String>>(
60104            mut self,
60105            v: T,
60106        ) -> Self {
60107            self.dataset_display_name = v.into();
60108            self
60109        }
60110
60111        /// Sets the value of [data_labeling_annotated_datasets][crate::model::migratable_resource::DataLabelingDataset::data_labeling_annotated_datasets].
60112        pub fn set_data_labeling_annotated_datasets<T, V>(mut self, v: T) -> Self
60113        where
60114            T: std::iter::IntoIterator<Item = V>,
60115            V: std::convert::Into<crate::model::migratable_resource::data_labeling_dataset::DataLabelingAnnotatedDataset>
60116        {
60117            use std::iter::Iterator;
60118            self.data_labeling_annotated_datasets = v.into_iter().map(|i| i.into()).collect();
60119            self
60120        }
60121    }
60122
60123    #[cfg(feature = "migration-service")]
60124    impl wkt::message::Message for DataLabelingDataset {
60125        fn typename() -> &'static str {
60126            "type.googleapis.com/google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset"
60127        }
60128    }
60129
60130    /// Defines additional types related to [DataLabelingDataset].
60131    #[cfg(feature = "migration-service")]
60132    pub mod data_labeling_dataset {
60133        #[allow(unused_imports)]
60134        use super::*;
60135
60136        /// Represents one AnnotatedDataset in datalabeling.googleapis.com.
60137        #[cfg(feature = "migration-service")]
60138        #[derive(Clone, Default, PartialEq)]
60139        #[non_exhaustive]
60140        pub struct DataLabelingAnnotatedDataset {
60141            /// Full resource name of data labeling AnnotatedDataset.
60142            /// Format:
60143            /// `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
60144            pub annotated_dataset: std::string::String,
60145
60146            /// The AnnotatedDataset's display name in datalabeling.googleapis.com.
60147            pub annotated_dataset_display_name: std::string::String,
60148
60149            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60150        }
60151
60152        #[cfg(feature = "migration-service")]
60153        impl DataLabelingAnnotatedDataset {
60154            pub fn new() -> Self {
60155                std::default::Default::default()
60156            }
60157
60158            /// Sets the value of [annotated_dataset][crate::model::migratable_resource::data_labeling_dataset::DataLabelingAnnotatedDataset::annotated_dataset].
60159            pub fn set_annotated_dataset<T: std::convert::Into<std::string::String>>(
60160                mut self,
60161                v: T,
60162            ) -> Self {
60163                self.annotated_dataset = v.into();
60164                self
60165            }
60166
60167            /// Sets the value of [annotated_dataset_display_name][crate::model::migratable_resource::data_labeling_dataset::DataLabelingAnnotatedDataset::annotated_dataset_display_name].
60168            pub fn set_annotated_dataset_display_name<
60169                T: std::convert::Into<std::string::String>,
60170            >(
60171                mut self,
60172                v: T,
60173            ) -> Self {
60174                self.annotated_dataset_display_name = v.into();
60175                self
60176            }
60177        }
60178
60179        #[cfg(feature = "migration-service")]
60180        impl wkt::message::Message for DataLabelingAnnotatedDataset {
60181            fn typename() -> &'static str {
60182                "type.googleapis.com/google.cloud.aiplatform.v1.MigratableResource.DataLabelingDataset.DataLabelingAnnotatedDataset"
60183            }
60184        }
60185    }
60186
60187    #[cfg(feature = "migration-service")]
60188    #[derive(Clone, Debug, PartialEq)]
60189    #[non_exhaustive]
60190    pub enum Resource {
60191        /// Output only. Represents one Version in ml.googleapis.com.
60192        MlEngineModelVersion(
60193            std::boxed::Box<crate::model::migratable_resource::MlEngineModelVersion>,
60194        ),
60195        /// Output only. Represents one Model in automl.googleapis.com.
60196        AutomlModel(std::boxed::Box<crate::model::migratable_resource::AutomlModel>),
60197        /// Output only. Represents one Dataset in automl.googleapis.com.
60198        AutomlDataset(std::boxed::Box<crate::model::migratable_resource::AutomlDataset>),
60199        /// Output only. Represents one Dataset in datalabeling.googleapis.com.
60200        DataLabelingDataset(
60201            std::boxed::Box<crate::model::migratable_resource::DataLabelingDataset>,
60202        ),
60203    }
60204}
60205
60206/// Request message for
60207/// [MigrationService.SearchMigratableResources][google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources].
60208///
60209/// [google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources]: crate::client::MigrationService::search_migratable_resources
60210#[cfg(feature = "migration-service")]
60211#[derive(Clone, Default, PartialEq)]
60212#[non_exhaustive]
60213pub struct SearchMigratableResourcesRequest {
60214    /// Required. The location that the migratable resources should be searched
60215    /// from. It's the Vertex AI location that the resources can be migrated to,
60216    /// not the resources' original location. Format:
60217    /// `projects/{project}/locations/{location}`
60218    pub parent: std::string::String,
60219
60220    /// The standard page size.
60221    /// The default and maximum value is 100.
60222    pub page_size: i32,
60223
60224    /// The standard page token.
60225    pub page_token: std::string::String,
60226
60227    /// A filter for your search. You can use the following types of filters:
60228    ///
60229    /// * Resource type filters. The following strings filter for a specific type
60230    ///   of [MigratableResource][google.cloud.aiplatform.v1.MigratableResource]:
60231    ///   * `ml_engine_model_version:*`
60232    ///   * `automl_model:*`
60233    ///   * `automl_dataset:*`
60234    ///   * `data_labeling_dataset:*`
60235    /// * "Migrated or not" filters. The following strings filter for resources
60236    ///   that either have or have not already been migrated:
60237    ///   * `last_migrate_time:*` filters for migrated resources.
60238    ///   * `NOT last_migrate_time:*` filters for not yet migrated resources.
60239    ///
60240    /// [google.cloud.aiplatform.v1.MigratableResource]: crate::model::MigratableResource
60241    pub filter: std::string::String,
60242
60243    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60244}
60245
60246#[cfg(feature = "migration-service")]
60247impl SearchMigratableResourcesRequest {
60248    pub fn new() -> Self {
60249        std::default::Default::default()
60250    }
60251
60252    /// Sets the value of [parent][crate::model::SearchMigratableResourcesRequest::parent].
60253    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
60254        self.parent = v.into();
60255        self
60256    }
60257
60258    /// Sets the value of [page_size][crate::model::SearchMigratableResourcesRequest::page_size].
60259    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
60260        self.page_size = v.into();
60261        self
60262    }
60263
60264    /// Sets the value of [page_token][crate::model::SearchMigratableResourcesRequest::page_token].
60265    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
60266        self.page_token = v.into();
60267        self
60268    }
60269
60270    /// Sets the value of [filter][crate::model::SearchMigratableResourcesRequest::filter].
60271    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
60272        self.filter = v.into();
60273        self
60274    }
60275}
60276
60277#[cfg(feature = "migration-service")]
60278impl wkt::message::Message for SearchMigratableResourcesRequest {
60279    fn typename() -> &'static str {
60280        "type.googleapis.com/google.cloud.aiplatform.v1.SearchMigratableResourcesRequest"
60281    }
60282}
60283
60284/// Response message for
60285/// [MigrationService.SearchMigratableResources][google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources].
60286///
60287/// [google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources]: crate::client::MigrationService::search_migratable_resources
60288#[cfg(feature = "migration-service")]
60289#[derive(Clone, Default, PartialEq)]
60290#[non_exhaustive]
60291pub struct SearchMigratableResourcesResponse {
60292    /// All migratable resources that can be migrated to the
60293    /// location specified in the request.
60294    pub migratable_resources: std::vec::Vec<crate::model::MigratableResource>,
60295
60296    /// The standard next-page token.
60297    /// The migratable_resources may not fill page_size in
60298    /// SearchMigratableResourcesRequest even when there are subsequent pages.
60299    pub next_page_token: std::string::String,
60300
60301    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60302}
60303
60304#[cfg(feature = "migration-service")]
60305impl SearchMigratableResourcesResponse {
60306    pub fn new() -> Self {
60307        std::default::Default::default()
60308    }
60309
60310    /// Sets the value of [migratable_resources][crate::model::SearchMigratableResourcesResponse::migratable_resources].
60311    pub fn set_migratable_resources<T, V>(mut self, v: T) -> Self
60312    where
60313        T: std::iter::IntoIterator<Item = V>,
60314        V: std::convert::Into<crate::model::MigratableResource>,
60315    {
60316        use std::iter::Iterator;
60317        self.migratable_resources = v.into_iter().map(|i| i.into()).collect();
60318        self
60319    }
60320
60321    /// Sets the value of [next_page_token][crate::model::SearchMigratableResourcesResponse::next_page_token].
60322    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
60323        self.next_page_token = v.into();
60324        self
60325    }
60326}
60327
60328#[cfg(feature = "migration-service")]
60329impl wkt::message::Message for SearchMigratableResourcesResponse {
60330    fn typename() -> &'static str {
60331        "type.googleapis.com/google.cloud.aiplatform.v1.SearchMigratableResourcesResponse"
60332    }
60333}
60334
60335#[cfg(feature = "migration-service")]
60336#[doc(hidden)]
60337impl gax::paginator::internal::PageableResponse for SearchMigratableResourcesResponse {
60338    type PageItem = crate::model::MigratableResource;
60339
60340    fn items(self) -> std::vec::Vec<Self::PageItem> {
60341        self.migratable_resources
60342    }
60343
60344    fn next_page_token(&self) -> std::string::String {
60345        use std::clone::Clone;
60346        self.next_page_token.clone()
60347    }
60348}
60349
60350/// Request message for
60351/// [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources].
60352///
60353/// [google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources]: crate::client::MigrationService::batch_migrate_resources
60354#[cfg(feature = "migration-service")]
60355#[derive(Clone, Default, PartialEq)]
60356#[non_exhaustive]
60357pub struct BatchMigrateResourcesRequest {
60358    /// Required. The location of the migrated resource will live in.
60359    /// Format: `projects/{project}/locations/{location}`
60360    pub parent: std::string::String,
60361
60362    /// Required. The request messages specifying the resources to migrate.
60363    /// They must be in the same location as the destination.
60364    /// Up to 50 resources can be migrated in one batch.
60365    pub migrate_resource_requests: std::vec::Vec<crate::model::MigrateResourceRequest>,
60366
60367    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60368}
60369
60370#[cfg(feature = "migration-service")]
60371impl BatchMigrateResourcesRequest {
60372    pub fn new() -> Self {
60373        std::default::Default::default()
60374    }
60375
60376    /// Sets the value of [parent][crate::model::BatchMigrateResourcesRequest::parent].
60377    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
60378        self.parent = v.into();
60379        self
60380    }
60381
60382    /// Sets the value of [migrate_resource_requests][crate::model::BatchMigrateResourcesRequest::migrate_resource_requests].
60383    pub fn set_migrate_resource_requests<T, V>(mut self, v: T) -> Self
60384    where
60385        T: std::iter::IntoIterator<Item = V>,
60386        V: std::convert::Into<crate::model::MigrateResourceRequest>,
60387    {
60388        use std::iter::Iterator;
60389        self.migrate_resource_requests = v.into_iter().map(|i| i.into()).collect();
60390        self
60391    }
60392}
60393
60394#[cfg(feature = "migration-service")]
60395impl wkt::message::Message for BatchMigrateResourcesRequest {
60396    fn typename() -> &'static str {
60397        "type.googleapis.com/google.cloud.aiplatform.v1.BatchMigrateResourcesRequest"
60398    }
60399}
60400
60401/// Config of migrating one resource from automl.googleapis.com,
60402/// datalabeling.googleapis.com and ml.googleapis.com to Vertex AI.
60403#[cfg(feature = "migration-service")]
60404#[derive(Clone, Default, PartialEq)]
60405#[non_exhaustive]
60406pub struct MigrateResourceRequest {
60407    pub request: std::option::Option<crate::model::migrate_resource_request::Request>,
60408
60409    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60410}
60411
60412#[cfg(feature = "migration-service")]
60413impl MigrateResourceRequest {
60414    pub fn new() -> Self {
60415        std::default::Default::default()
60416    }
60417
60418    /// Sets the value of [request][crate::model::MigrateResourceRequest::request].
60419    ///
60420    /// Note that all the setters affecting `request` are mutually
60421    /// exclusive.
60422    pub fn set_request<
60423        T: std::convert::Into<std::option::Option<crate::model::migrate_resource_request::Request>>,
60424    >(
60425        mut self,
60426        v: T,
60427    ) -> Self {
60428        self.request = v.into();
60429        self
60430    }
60431
60432    /// The value of [request][crate::model::MigrateResourceRequest::request]
60433    /// if it holds a `MigrateMlEngineModelVersionConfig`, `None` if the field is not set or
60434    /// holds a different branch.
60435    pub fn migrate_ml_engine_model_version_config(
60436        &self,
60437    ) -> std::option::Option<
60438        &std::boxed::Box<crate::model::migrate_resource_request::MigrateMlEngineModelVersionConfig>,
60439    > {
60440        #[allow(unreachable_patterns)]
60441        self.request.as_ref().and_then(|v| match v {
60442            crate::model::migrate_resource_request::Request::MigrateMlEngineModelVersionConfig(
60443                v,
60444            ) => std::option::Option::Some(v),
60445            _ => std::option::Option::None,
60446        })
60447    }
60448
60449    /// Sets the value of [request][crate::model::MigrateResourceRequest::request]
60450    /// to hold a `MigrateMlEngineModelVersionConfig`.
60451    ///
60452    /// Note that all the setters affecting `request` are
60453    /// mutually exclusive.
60454    pub fn set_migrate_ml_engine_model_version_config<
60455        T: std::convert::Into<
60456                std::boxed::Box<
60457                    crate::model::migrate_resource_request::MigrateMlEngineModelVersionConfig,
60458                >,
60459            >,
60460    >(
60461        mut self,
60462        v: T,
60463    ) -> Self {
60464        self.request = std::option::Option::Some(
60465            crate::model::migrate_resource_request::Request::MigrateMlEngineModelVersionConfig(
60466                v.into(),
60467            ),
60468        );
60469        self
60470    }
60471
60472    /// The value of [request][crate::model::MigrateResourceRequest::request]
60473    /// if it holds a `MigrateAutomlModelConfig`, `None` if the field is not set or
60474    /// holds a different branch.
60475    pub fn migrate_automl_model_config(
60476        &self,
60477    ) -> std::option::Option<
60478        &std::boxed::Box<crate::model::migrate_resource_request::MigrateAutomlModelConfig>,
60479    > {
60480        #[allow(unreachable_patterns)]
60481        self.request.as_ref().and_then(|v| match v {
60482            crate::model::migrate_resource_request::Request::MigrateAutomlModelConfig(v) => {
60483                std::option::Option::Some(v)
60484            }
60485            _ => std::option::Option::None,
60486        })
60487    }
60488
60489    /// Sets the value of [request][crate::model::MigrateResourceRequest::request]
60490    /// to hold a `MigrateAutomlModelConfig`.
60491    ///
60492    /// Note that all the setters affecting `request` are
60493    /// mutually exclusive.
60494    pub fn set_migrate_automl_model_config<
60495        T: std::convert::Into<
60496                std::boxed::Box<crate::model::migrate_resource_request::MigrateAutomlModelConfig>,
60497            >,
60498    >(
60499        mut self,
60500        v: T,
60501    ) -> Self {
60502        self.request = std::option::Option::Some(
60503            crate::model::migrate_resource_request::Request::MigrateAutomlModelConfig(v.into()),
60504        );
60505        self
60506    }
60507
60508    /// The value of [request][crate::model::MigrateResourceRequest::request]
60509    /// if it holds a `MigrateAutomlDatasetConfig`, `None` if the field is not set or
60510    /// holds a different branch.
60511    pub fn migrate_automl_dataset_config(
60512        &self,
60513    ) -> std::option::Option<
60514        &std::boxed::Box<crate::model::migrate_resource_request::MigrateAutomlDatasetConfig>,
60515    > {
60516        #[allow(unreachable_patterns)]
60517        self.request.as_ref().and_then(|v| match v {
60518            crate::model::migrate_resource_request::Request::MigrateAutomlDatasetConfig(v) => {
60519                std::option::Option::Some(v)
60520            }
60521            _ => std::option::Option::None,
60522        })
60523    }
60524
60525    /// Sets the value of [request][crate::model::MigrateResourceRequest::request]
60526    /// to hold a `MigrateAutomlDatasetConfig`.
60527    ///
60528    /// Note that all the setters affecting `request` are
60529    /// mutually exclusive.
60530    pub fn set_migrate_automl_dataset_config<
60531        T: std::convert::Into<
60532                std::boxed::Box<crate::model::migrate_resource_request::MigrateAutomlDatasetConfig>,
60533            >,
60534    >(
60535        mut self,
60536        v: T,
60537    ) -> Self {
60538        self.request = std::option::Option::Some(
60539            crate::model::migrate_resource_request::Request::MigrateAutomlDatasetConfig(v.into()),
60540        );
60541        self
60542    }
60543
60544    /// The value of [request][crate::model::MigrateResourceRequest::request]
60545    /// if it holds a `MigrateDataLabelingDatasetConfig`, `None` if the field is not set or
60546    /// holds a different branch.
60547    pub fn migrate_data_labeling_dataset_config(
60548        &self,
60549    ) -> std::option::Option<
60550        &std::boxed::Box<crate::model::migrate_resource_request::MigrateDataLabelingDatasetConfig>,
60551    > {
60552        #[allow(unreachable_patterns)]
60553        self.request.as_ref().and_then(|v| match v {
60554            crate::model::migrate_resource_request::Request::MigrateDataLabelingDatasetConfig(
60555                v,
60556            ) => std::option::Option::Some(v),
60557            _ => std::option::Option::None,
60558        })
60559    }
60560
60561    /// Sets the value of [request][crate::model::MigrateResourceRequest::request]
60562    /// to hold a `MigrateDataLabelingDatasetConfig`.
60563    ///
60564    /// Note that all the setters affecting `request` are
60565    /// mutually exclusive.
60566    pub fn set_migrate_data_labeling_dataset_config<
60567        T: std::convert::Into<
60568                std::boxed::Box<
60569                    crate::model::migrate_resource_request::MigrateDataLabelingDatasetConfig,
60570                >,
60571            >,
60572    >(
60573        mut self,
60574        v: T,
60575    ) -> Self {
60576        self.request = std::option::Option::Some(
60577            crate::model::migrate_resource_request::Request::MigrateDataLabelingDatasetConfig(
60578                v.into(),
60579            ),
60580        );
60581        self
60582    }
60583}
60584
60585#[cfg(feature = "migration-service")]
60586impl wkt::message::Message for MigrateResourceRequest {
60587    fn typename() -> &'static str {
60588        "type.googleapis.com/google.cloud.aiplatform.v1.MigrateResourceRequest"
60589    }
60590}
60591
60592/// Defines additional types related to [MigrateResourceRequest].
60593#[cfg(feature = "migration-service")]
60594pub mod migrate_resource_request {
60595    #[allow(unused_imports)]
60596    use super::*;
60597
60598    /// Config for migrating version in ml.googleapis.com to Vertex AI's Model.
60599    #[cfg(feature = "migration-service")]
60600    #[derive(Clone, Default, PartialEq)]
60601    #[non_exhaustive]
60602    pub struct MigrateMlEngineModelVersionConfig {
60603        /// Required. The ml.googleapis.com endpoint that this model version should
60604        /// be migrated from. Example values:
60605        ///
60606        /// * ml.googleapis.com
60607        ///
60608        /// * us-centrall-ml.googleapis.com
60609        ///
60610        /// * europe-west4-ml.googleapis.com
60611        ///
60612        /// * asia-east1-ml.googleapis.com
60613        ///
60614        pub endpoint: std::string::String,
60615
60616        /// Required. Full resource name of ml engine model version.
60617        /// Format: `projects/{project}/models/{model}/versions/{version}`.
60618        pub model_version: std::string::String,
60619
60620        /// Required. Display name of the model in Vertex AI.
60621        /// System will pick a display name if unspecified.
60622        pub model_display_name: std::string::String,
60623
60624        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60625    }
60626
60627    #[cfg(feature = "migration-service")]
60628    impl MigrateMlEngineModelVersionConfig {
60629        pub fn new() -> Self {
60630            std::default::Default::default()
60631        }
60632
60633        /// Sets the value of [endpoint][crate::model::migrate_resource_request::MigrateMlEngineModelVersionConfig::endpoint].
60634        pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
60635            self.endpoint = v.into();
60636            self
60637        }
60638
60639        /// Sets the value of [model_version][crate::model::migrate_resource_request::MigrateMlEngineModelVersionConfig::model_version].
60640        pub fn set_model_version<T: std::convert::Into<std::string::String>>(
60641            mut self,
60642            v: T,
60643        ) -> Self {
60644            self.model_version = v.into();
60645            self
60646        }
60647
60648        /// Sets the value of [model_display_name][crate::model::migrate_resource_request::MigrateMlEngineModelVersionConfig::model_display_name].
60649        pub fn set_model_display_name<T: std::convert::Into<std::string::String>>(
60650            mut self,
60651            v: T,
60652        ) -> Self {
60653            self.model_display_name = v.into();
60654            self
60655        }
60656    }
60657
60658    #[cfg(feature = "migration-service")]
60659    impl wkt::message::Message for MigrateMlEngineModelVersionConfig {
60660        fn typename() -> &'static str {
60661            "type.googleapis.com/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig"
60662        }
60663    }
60664
60665    /// Config for migrating Model in automl.googleapis.com to Vertex AI's Model.
60666    #[cfg(feature = "migration-service")]
60667    #[derive(Clone, Default, PartialEq)]
60668    #[non_exhaustive]
60669    pub struct MigrateAutomlModelConfig {
60670        /// Required. Full resource name of automl Model.
60671        /// Format:
60672        /// `projects/{project}/locations/{location}/models/{model}`.
60673        pub model: std::string::String,
60674
60675        /// Optional. Display name of the model in Vertex AI.
60676        /// System will pick a display name if unspecified.
60677        pub model_display_name: std::string::String,
60678
60679        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60680    }
60681
60682    #[cfg(feature = "migration-service")]
60683    impl MigrateAutomlModelConfig {
60684        pub fn new() -> Self {
60685            std::default::Default::default()
60686        }
60687
60688        /// Sets the value of [model][crate::model::migrate_resource_request::MigrateAutomlModelConfig::model].
60689        pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
60690            self.model = v.into();
60691            self
60692        }
60693
60694        /// Sets the value of [model_display_name][crate::model::migrate_resource_request::MigrateAutomlModelConfig::model_display_name].
60695        pub fn set_model_display_name<T: std::convert::Into<std::string::String>>(
60696            mut self,
60697            v: T,
60698        ) -> Self {
60699            self.model_display_name = v.into();
60700            self
60701        }
60702    }
60703
60704    #[cfg(feature = "migration-service")]
60705    impl wkt::message::Message for MigrateAutomlModelConfig {
60706        fn typename() -> &'static str {
60707            "type.googleapis.com/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig"
60708        }
60709    }
60710
60711    /// Config for migrating Dataset in automl.googleapis.com to Vertex AI's
60712    /// Dataset.
60713    #[cfg(feature = "migration-service")]
60714    #[derive(Clone, Default, PartialEq)]
60715    #[non_exhaustive]
60716    pub struct MigrateAutomlDatasetConfig {
60717        /// Required. Full resource name of automl Dataset.
60718        /// Format:
60719        /// `projects/{project}/locations/{location}/datasets/{dataset}`.
60720        pub dataset: std::string::String,
60721
60722        /// Required. Display name of the Dataset in Vertex AI.
60723        /// System will pick a display name if unspecified.
60724        pub dataset_display_name: std::string::String,
60725
60726        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60727    }
60728
60729    #[cfg(feature = "migration-service")]
60730    impl MigrateAutomlDatasetConfig {
60731        pub fn new() -> Self {
60732            std::default::Default::default()
60733        }
60734
60735        /// Sets the value of [dataset][crate::model::migrate_resource_request::MigrateAutomlDatasetConfig::dataset].
60736        pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
60737            self.dataset = v.into();
60738            self
60739        }
60740
60741        /// Sets the value of [dataset_display_name][crate::model::migrate_resource_request::MigrateAutomlDatasetConfig::dataset_display_name].
60742        pub fn set_dataset_display_name<T: std::convert::Into<std::string::String>>(
60743            mut self,
60744            v: T,
60745        ) -> Self {
60746            self.dataset_display_name = v.into();
60747            self
60748        }
60749    }
60750
60751    #[cfg(feature = "migration-service")]
60752    impl wkt::message::Message for MigrateAutomlDatasetConfig {
60753        fn typename() -> &'static str {
60754            "type.googleapis.com/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig"
60755        }
60756    }
60757
60758    /// Config for migrating Dataset in datalabeling.googleapis.com to Vertex
60759    /// AI's Dataset.
60760    #[cfg(feature = "migration-service")]
60761    #[derive(Clone, Default, PartialEq)]
60762    #[non_exhaustive]
60763    pub struct MigrateDataLabelingDatasetConfig {
60764
60765        /// Required. Full resource name of data labeling Dataset.
60766        /// Format:
60767        /// `projects/{project}/datasets/{dataset}`.
60768        pub dataset: std::string::String,
60769
60770        /// Optional. Display name of the Dataset in Vertex AI.
60771        /// System will pick a display name if unspecified.
60772        pub dataset_display_name: std::string::String,
60773
60774        /// Optional. Configs for migrating AnnotatedDataset in
60775        /// datalabeling.googleapis.com to Vertex AI's SavedQuery. The specified
60776        /// AnnotatedDatasets have to belong to the datalabeling Dataset.
60777        pub migrate_data_labeling_annotated_dataset_configs: std::vec::Vec<crate::model::migrate_resource_request::migrate_data_labeling_dataset_config::MigrateDataLabelingAnnotatedDatasetConfig>,
60778
60779        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60780    }
60781
60782    #[cfg(feature = "migration-service")]
60783    impl MigrateDataLabelingDatasetConfig {
60784        pub fn new() -> Self {
60785            std::default::Default::default()
60786        }
60787
60788        /// Sets the value of [dataset][crate::model::migrate_resource_request::MigrateDataLabelingDatasetConfig::dataset].
60789        pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
60790            self.dataset = v.into();
60791            self
60792        }
60793
60794        /// Sets the value of [dataset_display_name][crate::model::migrate_resource_request::MigrateDataLabelingDatasetConfig::dataset_display_name].
60795        pub fn set_dataset_display_name<T: std::convert::Into<std::string::String>>(
60796            mut self,
60797            v: T,
60798        ) -> Self {
60799            self.dataset_display_name = v.into();
60800            self
60801        }
60802
60803        /// Sets the value of [migrate_data_labeling_annotated_dataset_configs][crate::model::migrate_resource_request::MigrateDataLabelingDatasetConfig::migrate_data_labeling_annotated_dataset_configs].
60804        pub fn set_migrate_data_labeling_annotated_dataset_configs<T, V>(mut self, v: T) -> Self
60805        where
60806            T: std::iter::IntoIterator<Item = V>,
60807            V: std::convert::Into<crate::model::migrate_resource_request::migrate_data_labeling_dataset_config::MigrateDataLabelingAnnotatedDatasetConfig>
60808        {
60809            use std::iter::Iterator;
60810            self.migrate_data_labeling_annotated_dataset_configs =
60811                v.into_iter().map(|i| i.into()).collect();
60812            self
60813        }
60814    }
60815
60816    #[cfg(feature = "migration-service")]
60817    impl wkt::message::Message for MigrateDataLabelingDatasetConfig {
60818        fn typename() -> &'static str {
60819            "type.googleapis.com/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig"
60820        }
60821    }
60822
60823    /// Defines additional types related to [MigrateDataLabelingDatasetConfig].
60824    #[cfg(feature = "migration-service")]
60825    pub mod migrate_data_labeling_dataset_config {
60826        #[allow(unused_imports)]
60827        use super::*;
60828
60829        /// Config for migrating AnnotatedDataset in datalabeling.googleapis.com to
60830        /// Vertex AI's SavedQuery.
60831        #[cfg(feature = "migration-service")]
60832        #[derive(Clone, Default, PartialEq)]
60833        #[non_exhaustive]
60834        pub struct MigrateDataLabelingAnnotatedDatasetConfig {
60835            /// Required. Full resource name of data labeling AnnotatedDataset.
60836            /// Format:
60837            /// `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
60838            pub annotated_dataset: std::string::String,
60839
60840            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60841        }
60842
60843        #[cfg(feature = "migration-service")]
60844        impl MigrateDataLabelingAnnotatedDatasetConfig {
60845            pub fn new() -> Self {
60846                std::default::Default::default()
60847            }
60848
60849            /// Sets the value of [annotated_dataset][crate::model::migrate_resource_request::migrate_data_labeling_dataset_config::MigrateDataLabelingAnnotatedDatasetConfig::annotated_dataset].
60850            pub fn set_annotated_dataset<T: std::convert::Into<std::string::String>>(
60851                mut self,
60852                v: T,
60853            ) -> Self {
60854                self.annotated_dataset = v.into();
60855                self
60856            }
60857        }
60858
60859        #[cfg(feature = "migration-service")]
60860        impl wkt::message::Message for MigrateDataLabelingAnnotatedDatasetConfig {
60861            fn typename() -> &'static str {
60862                "type.googleapis.com/google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig.MigrateDataLabelingAnnotatedDatasetConfig"
60863            }
60864        }
60865    }
60866
60867    #[cfg(feature = "migration-service")]
60868    #[derive(Clone, Debug, PartialEq)]
60869    #[non_exhaustive]
60870    pub enum Request {
60871        /// Config for migrating Version in ml.googleapis.com to Vertex AI's Model.
60872        MigrateMlEngineModelVersionConfig(
60873            std::boxed::Box<
60874                crate::model::migrate_resource_request::MigrateMlEngineModelVersionConfig,
60875            >,
60876        ),
60877        /// Config for migrating Model in automl.googleapis.com to Vertex AI's
60878        /// Model.
60879        MigrateAutomlModelConfig(
60880            std::boxed::Box<crate::model::migrate_resource_request::MigrateAutomlModelConfig>,
60881        ),
60882        /// Config for migrating Dataset in automl.googleapis.com to Vertex AI's
60883        /// Dataset.
60884        MigrateAutomlDatasetConfig(
60885            std::boxed::Box<crate::model::migrate_resource_request::MigrateAutomlDatasetConfig>,
60886        ),
60887        /// Config for migrating Dataset in datalabeling.googleapis.com to
60888        /// Vertex AI's Dataset.
60889        MigrateDataLabelingDatasetConfig(
60890            std::boxed::Box<
60891                crate::model::migrate_resource_request::MigrateDataLabelingDatasetConfig,
60892            >,
60893        ),
60894    }
60895}
60896
60897/// Response message for
60898/// [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources].
60899///
60900/// [google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources]: crate::client::MigrationService::batch_migrate_resources
60901#[cfg(feature = "migration-service")]
60902#[derive(Clone, Default, PartialEq)]
60903#[non_exhaustive]
60904pub struct BatchMigrateResourcesResponse {
60905    /// Successfully migrated resources.
60906    pub migrate_resource_responses: std::vec::Vec<crate::model::MigrateResourceResponse>,
60907
60908    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60909}
60910
60911#[cfg(feature = "migration-service")]
60912impl BatchMigrateResourcesResponse {
60913    pub fn new() -> Self {
60914        std::default::Default::default()
60915    }
60916
60917    /// Sets the value of [migrate_resource_responses][crate::model::BatchMigrateResourcesResponse::migrate_resource_responses].
60918    pub fn set_migrate_resource_responses<T, V>(mut self, v: T) -> Self
60919    where
60920        T: std::iter::IntoIterator<Item = V>,
60921        V: std::convert::Into<crate::model::MigrateResourceResponse>,
60922    {
60923        use std::iter::Iterator;
60924        self.migrate_resource_responses = v.into_iter().map(|i| i.into()).collect();
60925        self
60926    }
60927}
60928
60929#[cfg(feature = "migration-service")]
60930impl wkt::message::Message for BatchMigrateResourcesResponse {
60931    fn typename() -> &'static str {
60932        "type.googleapis.com/google.cloud.aiplatform.v1.BatchMigrateResourcesResponse"
60933    }
60934}
60935
60936/// Describes a successfully migrated resource.
60937#[cfg(feature = "migration-service")]
60938#[derive(Clone, Default, PartialEq)]
60939#[non_exhaustive]
60940pub struct MigrateResourceResponse {
60941    /// Before migration, the identifier in ml.googleapis.com,
60942    /// automl.googleapis.com or datalabeling.googleapis.com.
60943    pub migratable_resource: std::option::Option<crate::model::MigratableResource>,
60944
60945    /// After migration, the resource name in Vertex AI.
60946    pub migrated_resource:
60947        std::option::Option<crate::model::migrate_resource_response::MigratedResource>,
60948
60949    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60950}
60951
60952#[cfg(feature = "migration-service")]
60953impl MigrateResourceResponse {
60954    pub fn new() -> Self {
60955        std::default::Default::default()
60956    }
60957
60958    /// Sets the value of [migratable_resource][crate::model::MigrateResourceResponse::migratable_resource].
60959    pub fn set_migratable_resource<T>(mut self, v: T) -> Self
60960    where
60961        T: std::convert::Into<crate::model::MigratableResource>,
60962    {
60963        self.migratable_resource = std::option::Option::Some(v.into());
60964        self
60965    }
60966
60967    /// Sets or clears the value of [migratable_resource][crate::model::MigrateResourceResponse::migratable_resource].
60968    pub fn set_or_clear_migratable_resource<T>(mut self, v: std::option::Option<T>) -> Self
60969    where
60970        T: std::convert::Into<crate::model::MigratableResource>,
60971    {
60972        self.migratable_resource = v.map(|x| x.into());
60973        self
60974    }
60975
60976    /// Sets the value of [migrated_resource][crate::model::MigrateResourceResponse::migrated_resource].
60977    ///
60978    /// Note that all the setters affecting `migrated_resource` are mutually
60979    /// exclusive.
60980    pub fn set_migrated_resource<
60981        T: std::convert::Into<
60982                std::option::Option<crate::model::migrate_resource_response::MigratedResource>,
60983            >,
60984    >(
60985        mut self,
60986        v: T,
60987    ) -> Self {
60988        self.migrated_resource = v.into();
60989        self
60990    }
60991
60992    /// The value of [migrated_resource][crate::model::MigrateResourceResponse::migrated_resource]
60993    /// if it holds a `Dataset`, `None` if the field is not set or
60994    /// holds a different branch.
60995    pub fn dataset(&self) -> std::option::Option<&std::string::String> {
60996        #[allow(unreachable_patterns)]
60997        self.migrated_resource.as_ref().and_then(|v| match v {
60998            crate::model::migrate_resource_response::MigratedResource::Dataset(v) => {
60999                std::option::Option::Some(v)
61000            }
61001            _ => std::option::Option::None,
61002        })
61003    }
61004
61005    /// Sets the value of [migrated_resource][crate::model::MigrateResourceResponse::migrated_resource]
61006    /// to hold a `Dataset`.
61007    ///
61008    /// Note that all the setters affecting `migrated_resource` are
61009    /// mutually exclusive.
61010    pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
61011        self.migrated_resource = std::option::Option::Some(
61012            crate::model::migrate_resource_response::MigratedResource::Dataset(v.into()),
61013        );
61014        self
61015    }
61016
61017    /// The value of [migrated_resource][crate::model::MigrateResourceResponse::migrated_resource]
61018    /// if it holds a `Model`, `None` if the field is not set or
61019    /// holds a different branch.
61020    pub fn model(&self) -> std::option::Option<&std::string::String> {
61021        #[allow(unreachable_patterns)]
61022        self.migrated_resource.as_ref().and_then(|v| match v {
61023            crate::model::migrate_resource_response::MigratedResource::Model(v) => {
61024                std::option::Option::Some(v)
61025            }
61026            _ => std::option::Option::None,
61027        })
61028    }
61029
61030    /// Sets the value of [migrated_resource][crate::model::MigrateResourceResponse::migrated_resource]
61031    /// to hold a `Model`.
61032    ///
61033    /// Note that all the setters affecting `migrated_resource` are
61034    /// mutually exclusive.
61035    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
61036        self.migrated_resource = std::option::Option::Some(
61037            crate::model::migrate_resource_response::MigratedResource::Model(v.into()),
61038        );
61039        self
61040    }
61041}
61042
61043#[cfg(feature = "migration-service")]
61044impl wkt::message::Message for MigrateResourceResponse {
61045    fn typename() -> &'static str {
61046        "type.googleapis.com/google.cloud.aiplatform.v1.MigrateResourceResponse"
61047    }
61048}
61049
61050/// Defines additional types related to [MigrateResourceResponse].
61051#[cfg(feature = "migration-service")]
61052pub mod migrate_resource_response {
61053    #[allow(unused_imports)]
61054    use super::*;
61055
61056    /// After migration, the resource name in Vertex AI.
61057    #[cfg(feature = "migration-service")]
61058    #[derive(Clone, Debug, PartialEq)]
61059    #[non_exhaustive]
61060    pub enum MigratedResource {
61061        /// Migrated Dataset's resource name.
61062        Dataset(std::string::String),
61063        /// Migrated Model's resource name.
61064        Model(std::string::String),
61065    }
61066}
61067
61068/// Runtime operation information for
61069/// [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources].
61070///
61071/// [google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources]: crate::client::MigrationService::batch_migrate_resources
61072#[cfg(feature = "migration-service")]
61073#[derive(Clone, Default, PartialEq)]
61074#[non_exhaustive]
61075pub struct BatchMigrateResourcesOperationMetadata {
61076    /// The common part of the operation metadata.
61077    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
61078
61079    /// Partial results that reflect the latest migration operation progress.
61080    pub partial_results:
61081        std::vec::Vec<crate::model::batch_migrate_resources_operation_metadata::PartialResult>,
61082
61083    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
61084}
61085
61086#[cfg(feature = "migration-service")]
61087impl BatchMigrateResourcesOperationMetadata {
61088    pub fn new() -> Self {
61089        std::default::Default::default()
61090    }
61091
61092    /// Sets the value of [generic_metadata][crate::model::BatchMigrateResourcesOperationMetadata::generic_metadata].
61093    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
61094    where
61095        T: std::convert::Into<crate::model::GenericOperationMetadata>,
61096    {
61097        self.generic_metadata = std::option::Option::Some(v.into());
61098        self
61099    }
61100
61101    /// Sets or clears the value of [generic_metadata][crate::model::BatchMigrateResourcesOperationMetadata::generic_metadata].
61102    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
61103    where
61104        T: std::convert::Into<crate::model::GenericOperationMetadata>,
61105    {
61106        self.generic_metadata = v.map(|x| x.into());
61107        self
61108    }
61109
61110    /// Sets the value of [partial_results][crate::model::BatchMigrateResourcesOperationMetadata::partial_results].
61111    pub fn set_partial_results<T, V>(mut self, v: T) -> Self
61112    where
61113        T: std::iter::IntoIterator<Item = V>,
61114        V: std::convert::Into<
61115                crate::model::batch_migrate_resources_operation_metadata::PartialResult,
61116            >,
61117    {
61118        use std::iter::Iterator;
61119        self.partial_results = v.into_iter().map(|i| i.into()).collect();
61120        self
61121    }
61122}
61123
61124#[cfg(feature = "migration-service")]
61125impl wkt::message::Message for BatchMigrateResourcesOperationMetadata {
61126    fn typename() -> &'static str {
61127        "type.googleapis.com/google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata"
61128    }
61129}
61130
61131/// Defines additional types related to [BatchMigrateResourcesOperationMetadata].
61132#[cfg(feature = "migration-service")]
61133pub mod batch_migrate_resources_operation_metadata {
61134    #[allow(unused_imports)]
61135    use super::*;
61136
61137    /// Represents a partial result in batch migration operation for one
61138    /// [MigrateResourceRequest][google.cloud.aiplatform.v1.MigrateResourceRequest].
61139    ///
61140    /// [google.cloud.aiplatform.v1.MigrateResourceRequest]: crate::model::MigrateResourceRequest
61141    #[cfg(feature = "migration-service")]
61142    #[derive(Clone, Default, PartialEq)]
61143    #[non_exhaustive]
61144    pub struct PartialResult {
61145        /// It's the same as the value in
61146        /// [BatchMigrateResourcesRequest.migrate_resource_requests][google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.migrate_resource_requests].
61147        ///
61148        /// [google.cloud.aiplatform.v1.BatchMigrateResourcesRequest.migrate_resource_requests]: crate::model::BatchMigrateResourcesRequest::migrate_resource_requests
61149        pub request: std::option::Option<crate::model::MigrateResourceRequest>,
61150
61151        /// If the resource's migration is ongoing, none of the result will be set.
61152        /// If the resource's migration is finished, either error or one of the
61153        /// migrated resource name will be filled.
61154        pub result: std::option::Option<
61155            crate::model::batch_migrate_resources_operation_metadata::partial_result::Result,
61156        >,
61157
61158        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
61159    }
61160
61161    #[cfg(feature = "migration-service")]
61162    impl PartialResult {
61163        pub fn new() -> Self {
61164            std::default::Default::default()
61165        }
61166
61167        /// Sets the value of [request][crate::model::batch_migrate_resources_operation_metadata::PartialResult::request].
61168        pub fn set_request<T>(mut self, v: T) -> Self
61169        where
61170            T: std::convert::Into<crate::model::MigrateResourceRequest>,
61171        {
61172            self.request = std::option::Option::Some(v.into());
61173            self
61174        }
61175
61176        /// Sets or clears the value of [request][crate::model::batch_migrate_resources_operation_metadata::PartialResult::request].
61177        pub fn set_or_clear_request<T>(mut self, v: std::option::Option<T>) -> Self
61178        where
61179            T: std::convert::Into<crate::model::MigrateResourceRequest>,
61180        {
61181            self.request = v.map(|x| x.into());
61182            self
61183        }
61184
61185        /// Sets the value of [result][crate::model::batch_migrate_resources_operation_metadata::PartialResult::result].
61186        ///
61187        /// Note that all the setters affecting `result` are mutually
61188        /// exclusive.
61189        pub fn set_result<T: std::convert::Into<std::option::Option<crate::model::batch_migrate_resources_operation_metadata::partial_result::Result>>>(mut self, v: T) -> Self
61190        {
61191            self.result = v.into();
61192            self
61193        }
61194
61195        /// The value of [result][crate::model::batch_migrate_resources_operation_metadata::PartialResult::result]
61196        /// if it holds a `Error`, `None` if the field is not set or
61197        /// holds a different branch.
61198        pub fn error(&self) -> std::option::Option<&std::boxed::Box<rpc::model::Status>> {
61199            #[allow(unreachable_patterns)]
61200            self.result.as_ref().and_then(|v| match v {
61201                crate::model::batch_migrate_resources_operation_metadata::partial_result::Result::Error(v) => std::option::Option::Some(v),
61202                _ => std::option::Option::None,
61203            })
61204        }
61205
61206        /// Sets the value of [result][crate::model::batch_migrate_resources_operation_metadata::PartialResult::result]
61207        /// to hold a `Error`.
61208        ///
61209        /// Note that all the setters affecting `result` are
61210        /// mutually exclusive.
61211        pub fn set_error<T: std::convert::Into<std::boxed::Box<rpc::model::Status>>>(
61212            mut self,
61213            v: T,
61214        ) -> Self {
61215            self.result = std::option::Option::Some(
61216                crate::model::batch_migrate_resources_operation_metadata::partial_result::Result::Error(
61217                    v.into()
61218                )
61219            );
61220            self
61221        }
61222
61223        /// The value of [result][crate::model::batch_migrate_resources_operation_metadata::PartialResult::result]
61224        /// if it holds a `Model`, `None` if the field is not set or
61225        /// holds a different branch.
61226        pub fn model(&self) -> std::option::Option<&std::string::String> {
61227            #[allow(unreachable_patterns)]
61228            self.result.as_ref().and_then(|v| match v {
61229                crate::model::batch_migrate_resources_operation_metadata::partial_result::Result::Model(v) => std::option::Option::Some(v),
61230                _ => std::option::Option::None,
61231            })
61232        }
61233
61234        /// Sets the value of [result][crate::model::batch_migrate_resources_operation_metadata::PartialResult::result]
61235        /// to hold a `Model`.
61236        ///
61237        /// Note that all the setters affecting `result` are
61238        /// mutually exclusive.
61239        pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
61240            self.result = std::option::Option::Some(
61241                crate::model::batch_migrate_resources_operation_metadata::partial_result::Result::Model(
61242                    v.into()
61243                )
61244            );
61245            self
61246        }
61247
61248        /// The value of [result][crate::model::batch_migrate_resources_operation_metadata::PartialResult::result]
61249        /// if it holds a `Dataset`, `None` if the field is not set or
61250        /// holds a different branch.
61251        pub fn dataset(&self) -> std::option::Option<&std::string::String> {
61252            #[allow(unreachable_patterns)]
61253            self.result.as_ref().and_then(|v| match v {
61254                crate::model::batch_migrate_resources_operation_metadata::partial_result::Result::Dataset(v) => std::option::Option::Some(v),
61255                _ => std::option::Option::None,
61256            })
61257        }
61258
61259        /// Sets the value of [result][crate::model::batch_migrate_resources_operation_metadata::PartialResult::result]
61260        /// to hold a `Dataset`.
61261        ///
61262        /// Note that all the setters affecting `result` are
61263        /// mutually exclusive.
61264        pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
61265            self.result = std::option::Option::Some(
61266                crate::model::batch_migrate_resources_operation_metadata::partial_result::Result::Dataset(
61267                    v.into()
61268                )
61269            );
61270            self
61271        }
61272    }
61273
61274    #[cfg(feature = "migration-service")]
61275    impl wkt::message::Message for PartialResult {
61276        fn typename() -> &'static str {
61277            "type.googleapis.com/google.cloud.aiplatform.v1.BatchMigrateResourcesOperationMetadata.PartialResult"
61278        }
61279    }
61280
61281    /// Defines additional types related to [PartialResult].
61282    #[cfg(feature = "migration-service")]
61283    pub mod partial_result {
61284        #[allow(unused_imports)]
61285        use super::*;
61286
61287        /// If the resource's migration is ongoing, none of the result will be set.
61288        /// If the resource's migration is finished, either error or one of the
61289        /// migrated resource name will be filled.
61290        #[cfg(feature = "migration-service")]
61291        #[derive(Clone, Debug, PartialEq)]
61292        #[non_exhaustive]
61293        pub enum Result {
61294            /// The error result of the migration request in case of failure.
61295            Error(std::boxed::Box<rpc::model::Status>),
61296            /// Migrated model resource name.
61297            Model(std::string::String),
61298            /// Migrated dataset resource name.
61299            Dataset(std::string::String),
61300        }
61301    }
61302}
61303
61304/// A trained machine learning Model.
61305#[cfg(any(
61306    feature = "dataset-service",
61307    feature = "model-service",
61308    feature = "pipeline-service",
61309))]
61310#[derive(Clone, Default, PartialEq)]
61311#[non_exhaustive]
61312pub struct Model {
61313    /// The resource name of the Model.
61314    pub name: std::string::String,
61315
61316    /// Output only. Immutable. The version ID of the model.
61317    /// A new version is committed when a new model version is uploaded or
61318    /// trained under an existing model id. It is an auto-incrementing decimal
61319    /// number in string representation.
61320    pub version_id: std::string::String,
61321
61322    /// User provided version aliases so that a model version can be referenced via
61323    /// alias (i.e.
61324    /// `projects/{project}/locations/{location}/models/{model_id}@{version_alias}`
61325    /// instead of auto-generated version id (i.e.
61326    /// `projects/{project}/locations/{location}/models/{model_id}@{version_id})`.
61327    /// The format is [a-z][a-zA-Z0-9-]{0,126}[a-z0-9] to distinguish from
61328    /// version_id. A default version alias will be created for the first version
61329    /// of the model, and there must be exactly one default version alias for a
61330    /// model.
61331    pub version_aliases: std::vec::Vec<std::string::String>,
61332
61333    /// Output only. Timestamp when this version was created.
61334    pub version_create_time: std::option::Option<wkt::Timestamp>,
61335
61336    /// Output only. Timestamp when this version was most recently updated.
61337    pub version_update_time: std::option::Option<wkt::Timestamp>,
61338
61339    /// Required. The display name of the Model.
61340    /// The name can be up to 128 characters long and can consist of any UTF-8
61341    /// characters.
61342    pub display_name: std::string::String,
61343
61344    /// The description of the Model.
61345    pub description: std::string::String,
61346
61347    /// The description of this version.
61348    pub version_description: std::string::String,
61349
61350    /// The default checkpoint id of a model version.
61351    pub default_checkpoint_id: std::string::String,
61352
61353    /// The schemata that describe formats of the Model's predictions and
61354    /// explanations as given and returned via
61355    /// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]
61356    /// and
61357    /// [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain].
61358    ///
61359    /// [google.cloud.aiplatform.v1.PredictionService.Explain]: crate::client::PredictionService::explain
61360    /// [google.cloud.aiplatform.v1.PredictionService.Predict]: crate::client::PredictionService::predict
61361    pub predict_schemata: std::option::Option<crate::model::PredictSchemata>,
61362
61363    /// Immutable. Points to a YAML file stored on Google Cloud Storage describing
61364    /// additional information about the Model, that is specific to it. Unset if
61365    /// the Model does not have any additional information. The schema is defined
61366    /// as an OpenAPI 3.0.2 [Schema
61367    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
61368    /// AutoML Models always have this field populated by Vertex AI, if no
61369    /// additional metadata is needed, this field is set to an empty string.
61370    /// Note: The URI given on output will be immutable and probably different,
61371    /// including the URI scheme, than the one given on input. The output URI will
61372    /// point to a location where the user only has a read access.
61373    pub metadata_schema_uri: std::string::String,
61374
61375    /// Immutable. An additional information about the Model; the schema of the
61376    /// metadata can be found in
61377    /// [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri].
61378    /// Unset if the Model does not have any additional information.
61379    ///
61380    /// [google.cloud.aiplatform.v1.Model.metadata_schema_uri]: crate::model::Model::metadata_schema_uri
61381    pub metadata: std::option::Option<wkt::Value>,
61382
61383    /// Output only. The formats in which this Model may be exported. If empty,
61384    /// this Model is not available for export.
61385    pub supported_export_formats: std::vec::Vec<crate::model::model::ExportFormat>,
61386
61387    /// Output only. The resource name of the TrainingPipeline that uploaded this
61388    /// Model, if any.
61389    pub training_pipeline: std::string::String,
61390
61391    /// Optional. This field is populated if the model is produced by a pipeline
61392    /// job.
61393    pub pipeline_job: std::string::String,
61394
61395    /// Input only. The specification of the container that is to be used when
61396    /// deploying this Model. The specification is ingested upon
61397    /// [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel],
61398    /// and all binaries it contains are copied and stored internally by Vertex AI.
61399    /// Not required for AutoML Models.
61400    ///
61401    /// [google.cloud.aiplatform.v1.ModelService.UploadModel]: crate::client::ModelService::upload_model
61402    pub container_spec: std::option::Option<crate::model::ModelContainerSpec>,
61403
61404    /// Immutable. The path to the directory containing the Model artifact and any
61405    /// of its supporting files. Not required for AutoML Models.
61406    pub artifact_uri: std::string::String,
61407
61408    /// Output only. When this Model is deployed, its prediction resources are
61409    /// described by the `prediction_resources` field of the
61410    /// [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
61411    /// object. Because not all Models support all resource configuration types,
61412    /// the configuration types this Model supports are listed here. If no
61413    /// configuration types are listed, the Model cannot be deployed to an
61414    /// [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support
61415    /// online predictions
61416    /// ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]
61417    /// or
61418    /// [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain]).
61419    /// Such a Model can serve predictions by using a
61420    /// [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it
61421    /// has at least one entry each in
61422    /// [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats]
61423    /// and
61424    /// [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats].
61425    ///
61426    /// [google.cloud.aiplatform.v1.BatchPredictionJob]: crate::model::BatchPredictionJob
61427    /// [google.cloud.aiplatform.v1.Endpoint]: crate::model::Endpoint
61428    /// [google.cloud.aiplatform.v1.Endpoint.deployed_models]: crate::model::Endpoint::deployed_models
61429    /// [google.cloud.aiplatform.v1.Model.supported_input_storage_formats]: crate::model::Model::supported_input_storage_formats
61430    /// [google.cloud.aiplatform.v1.Model.supported_output_storage_formats]: crate::model::Model::supported_output_storage_formats
61431    /// [google.cloud.aiplatform.v1.PredictionService.Explain]: crate::client::PredictionService::explain
61432    /// [google.cloud.aiplatform.v1.PredictionService.Predict]: crate::client::PredictionService::predict
61433    pub supported_deployment_resources_types:
61434        std::vec::Vec<crate::model::model::DeploymentResourcesType>,
61435
61436    /// Output only. The formats this Model supports in
61437    /// [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config].
61438    /// If
61439    /// [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
61440    /// exists, the instances should be given as per that schema.
61441    ///
61442    /// The possible formats are:
61443    ///
61444    /// * `jsonl`
61445    ///   The JSON Lines format, where each instance is a single line. Uses
61446    ///   [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
61447    ///
61448    /// * `csv`
61449    ///   The CSV format, where each instance is a single comma-separated line.
61450    ///   The first line in the file is the header, containing comma-separated field
61451    ///   names. Uses
61452    ///   [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
61453    ///
61454    /// * `tf-record`
61455    ///   The TFRecord format, where each instance is a single record in tfrecord
61456    ///   syntax. Uses
61457    ///   [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
61458    ///
61459    /// * `tf-record-gzip`
61460    ///   Similar to `tf-record`, but the file is gzipped. Uses
61461    ///   [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source].
61462    ///
61463    /// * `bigquery`
61464    ///   Each instance is a single row in BigQuery. Uses
61465    ///   [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source].
61466    ///
61467    /// * `file-list`
61468    ///   Each line of the file is the location of an instance to process, uses
61469    ///   `gcs_source` field of the
61470    ///   [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig]
61471    ///   object.
61472    ///
61473    ///
61474    /// If this Model doesn't support any of these formats it means it cannot be
61475    /// used with a
61476    /// [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob].
61477    /// However, if it has
61478    /// [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types],
61479    /// it could serve online predictions by using
61480    /// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]
61481    /// or
61482    /// [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain].
61483    ///
61484    /// [google.cloud.aiplatform.v1.BatchPredictionJob]: crate::model::BatchPredictionJob
61485    /// [google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig]: crate::model::batch_prediction_job::InputConfig
61486    /// [google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source]: crate::model::batch_prediction_job::InputConfig::source
61487    /// [google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source]: crate::model::batch_prediction_job::InputConfig::source
61488    /// [google.cloud.aiplatform.v1.BatchPredictionJob.input_config]: crate::model::BatchPredictionJob::input_config
61489    /// [google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]: crate::model::Model::supported_deployment_resources_types
61490    /// [google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]: crate::model::PredictSchemata::instance_schema_uri
61491    /// [google.cloud.aiplatform.v1.PredictionService.Explain]: crate::client::PredictionService::explain
61492    /// [google.cloud.aiplatform.v1.PredictionService.Predict]: crate::client::PredictionService::predict
61493    pub supported_input_storage_formats: std::vec::Vec<std::string::String>,
61494
61495    /// Output only. The formats this Model supports in
61496    /// [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
61497    /// If both
61498    /// [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
61499    /// and
61500    /// [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri]
61501    /// exist, the predictions are returned together with their instances. In other
61502    /// words, the prediction has the original instance data first, followed by the
61503    /// actual prediction content (as per the schema).
61504    ///
61505    /// The possible formats are:
61506    ///
61507    /// * `jsonl`
61508    ///   The JSON Lines format, where each prediction is a single line. Uses
61509    ///   [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
61510    ///
61511    /// * `csv`
61512    ///   The CSV format, where each prediction is a single comma-separated line.
61513    ///   The first line in the file is the header, containing comma-separated field
61514    ///   names. Uses
61515    ///   [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination].
61516    ///
61517    /// * `bigquery`
61518    ///   Each prediction is a single row in a BigQuery table, uses
61519    ///   [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]
61520    ///   .
61521    ///
61522    ///
61523    /// If this Model doesn't support any of these formats it means it cannot be
61524    /// used with a
61525    /// [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob].
61526    /// However, if it has
61527    /// [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types],
61528    /// it could serve online predictions by using
61529    /// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]
61530    /// or
61531    /// [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain].
61532    ///
61533    /// [google.cloud.aiplatform.v1.BatchPredictionJob]: crate::model::BatchPredictionJob
61534    /// [google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination]: crate::model::batch_prediction_job::OutputConfig::destination
61535    /// [google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination]: crate::model::batch_prediction_job::OutputConfig::destination
61536    /// [google.cloud.aiplatform.v1.BatchPredictionJob.output_config]: crate::model::BatchPredictionJob::output_config
61537    /// [google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]: crate::model::Model::supported_deployment_resources_types
61538    /// [google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]: crate::model::PredictSchemata::instance_schema_uri
61539    /// [google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri]: crate::model::PredictSchemata::prediction_schema_uri
61540    /// [google.cloud.aiplatform.v1.PredictionService.Explain]: crate::client::PredictionService::explain
61541    /// [google.cloud.aiplatform.v1.PredictionService.Predict]: crate::client::PredictionService::predict
61542    pub supported_output_storage_formats: std::vec::Vec<std::string::String>,
61543
61544    /// Output only. Timestamp when this Model was uploaded into Vertex AI.
61545    pub create_time: std::option::Option<wkt::Timestamp>,
61546
61547    /// Output only. Timestamp when this Model was most recently updated.
61548    pub update_time: std::option::Option<wkt::Timestamp>,
61549
61550    /// Output only. The pointers to DeployedModels created from this Model. Note
61551    /// that Model could have been deployed to Endpoints in different Locations.
61552    pub deployed_models: std::vec::Vec<crate::model::DeployedModelRef>,
61553
61554    /// The default explanation specification for this Model.
61555    ///
61556    /// The Model can be used for
61557    /// [requesting
61558    /// explanation][google.cloud.aiplatform.v1.PredictionService.Explain] after
61559    /// being [deployed][google.cloud.aiplatform.v1.EndpointService.DeployModel] if
61560    /// it is populated. The Model can be used for [batch
61561    /// explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation]
61562    /// if it is populated.
61563    ///
61564    /// All fields of the explanation_spec can be overridden by
61565    /// [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
61566    /// of
61567    /// [DeployModelRequest.deployed_model][google.cloud.aiplatform.v1.DeployModelRequest.deployed_model],
61568    /// or
61569    /// [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec]
61570    /// of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob].
61571    ///
61572    /// If the default explanation specification is not set for this Model, this
61573    /// Model can still be used for
61574    /// [requesting
61575    /// explanation][google.cloud.aiplatform.v1.PredictionService.Explain] by
61576    /// setting
61577    /// [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
61578    /// of
61579    /// [DeployModelRequest.deployed_model][google.cloud.aiplatform.v1.DeployModelRequest.deployed_model]
61580    /// and for [batch
61581    /// explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation]
61582    /// by setting
61583    /// [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec]
61584    /// of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob].
61585    ///
61586    /// [google.cloud.aiplatform.v1.BatchPredictionJob]: crate::model::BatchPredictionJob
61587    /// [google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec]: crate::model::BatchPredictionJob::explanation_spec
61588    /// [google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation]: crate::model::BatchPredictionJob::generate_explanation
61589    /// [google.cloud.aiplatform.v1.DeployModelRequest.deployed_model]: crate::model::DeployModelRequest::deployed_model
61590    /// [google.cloud.aiplatform.v1.DeployedModel.explanation_spec]: crate::model::DeployedModel::explanation_spec
61591    /// [google.cloud.aiplatform.v1.EndpointService.DeployModel]: crate::client::EndpointService::deploy_model
61592    /// [google.cloud.aiplatform.v1.PredictionService.Explain]: crate::client::PredictionService::explain
61593    pub explanation_spec: std::option::Option<crate::model::ExplanationSpec>,
61594
61595    /// Used to perform consistent read-modify-write updates. If not set, a blind
61596    /// "overwrite" update happens.
61597    pub etag: std::string::String,
61598
61599    /// The labels with user-defined metadata to organize your Models.
61600    ///
61601    /// Label keys and values can be no longer than 64 characters
61602    /// (Unicode codepoints), can only contain lowercase letters, numeric
61603    /// characters, underscores and dashes. International characters are allowed.
61604    ///
61605    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
61606    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
61607
61608    /// Stats of data used for training or evaluating the Model.
61609    ///
61610    /// Only populated when the Model is trained by a TrainingPipeline with
61611    /// [data_input_config][google.cloud.aiplatform.v1.TrainingPipeline.input_data_config].
61612    ///
61613    /// [google.cloud.aiplatform.v1.TrainingPipeline.input_data_config]: crate::model::TrainingPipeline::input_data_config
61614    pub data_stats: std::option::Option<crate::model::model::DataStats>,
61615
61616    /// Customer-managed encryption key spec for a Model. If set, this
61617    /// Model and all sub-resources of this Model will be secured by this key.
61618    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
61619
61620    /// Output only. Source of a model. It can either be automl training pipeline,
61621    /// custom training pipeline, BigQuery ML, or saved and tuned from Genie or
61622    /// Model Garden.
61623    pub model_source_info: std::option::Option<crate::model::ModelSourceInfo>,
61624
61625    /// Output only. If this Model is a copy of another Model, this contains info
61626    /// about the original.
61627    pub original_model_info: std::option::Option<crate::model::model::OriginalModelInfo>,
61628
61629    /// Output only. The resource name of the Artifact that was created in
61630    /// MetadataStore when creating the Model. The Artifact resource name pattern
61631    /// is
61632    /// `projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}`.
61633    pub metadata_artifact: std::string::String,
61634
61635    /// Optional. User input field to specify the base model source. Currently it
61636    /// only supports specifing the Model Garden models and Genie models.
61637    pub base_model_source: std::option::Option<crate::model::model::BaseModelSource>,
61638
61639    /// Output only. Reserved for future use.
61640    pub satisfies_pzs: bool,
61641
61642    /// Output only. Reserved for future use.
61643    pub satisfies_pzi: bool,
61644
61645    /// Optional. Output only. The checkpoints of the model.
61646    pub checkpoints: std::vec::Vec<crate::model::Checkpoint>,
61647
61648    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
61649}
61650
61651#[cfg(any(
61652    feature = "dataset-service",
61653    feature = "model-service",
61654    feature = "pipeline-service",
61655))]
61656impl Model {
61657    pub fn new() -> Self {
61658        std::default::Default::default()
61659    }
61660
61661    /// Sets the value of [name][crate::model::Model::name].
61662    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
61663        self.name = v.into();
61664        self
61665    }
61666
61667    /// Sets the value of [version_id][crate::model::Model::version_id].
61668    pub fn set_version_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
61669        self.version_id = v.into();
61670        self
61671    }
61672
61673    /// Sets the value of [version_aliases][crate::model::Model::version_aliases].
61674    pub fn set_version_aliases<T, V>(mut self, v: T) -> Self
61675    where
61676        T: std::iter::IntoIterator<Item = V>,
61677        V: std::convert::Into<std::string::String>,
61678    {
61679        use std::iter::Iterator;
61680        self.version_aliases = v.into_iter().map(|i| i.into()).collect();
61681        self
61682    }
61683
61684    /// Sets the value of [version_create_time][crate::model::Model::version_create_time].
61685    pub fn set_version_create_time<T>(mut self, v: T) -> Self
61686    where
61687        T: std::convert::Into<wkt::Timestamp>,
61688    {
61689        self.version_create_time = std::option::Option::Some(v.into());
61690        self
61691    }
61692
61693    /// Sets or clears the value of [version_create_time][crate::model::Model::version_create_time].
61694    pub fn set_or_clear_version_create_time<T>(mut self, v: std::option::Option<T>) -> Self
61695    where
61696        T: std::convert::Into<wkt::Timestamp>,
61697    {
61698        self.version_create_time = v.map(|x| x.into());
61699        self
61700    }
61701
61702    /// Sets the value of [version_update_time][crate::model::Model::version_update_time].
61703    pub fn set_version_update_time<T>(mut self, v: T) -> Self
61704    where
61705        T: std::convert::Into<wkt::Timestamp>,
61706    {
61707        self.version_update_time = std::option::Option::Some(v.into());
61708        self
61709    }
61710
61711    /// Sets or clears the value of [version_update_time][crate::model::Model::version_update_time].
61712    pub fn set_or_clear_version_update_time<T>(mut self, v: std::option::Option<T>) -> Self
61713    where
61714        T: std::convert::Into<wkt::Timestamp>,
61715    {
61716        self.version_update_time = v.map(|x| x.into());
61717        self
61718    }
61719
61720    /// Sets the value of [display_name][crate::model::Model::display_name].
61721    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
61722        self.display_name = v.into();
61723        self
61724    }
61725
61726    /// Sets the value of [description][crate::model::Model::description].
61727    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
61728        self.description = v.into();
61729        self
61730    }
61731
61732    /// Sets the value of [version_description][crate::model::Model::version_description].
61733    pub fn set_version_description<T: std::convert::Into<std::string::String>>(
61734        mut self,
61735        v: T,
61736    ) -> Self {
61737        self.version_description = v.into();
61738        self
61739    }
61740
61741    /// Sets the value of [default_checkpoint_id][crate::model::Model::default_checkpoint_id].
61742    pub fn set_default_checkpoint_id<T: std::convert::Into<std::string::String>>(
61743        mut self,
61744        v: T,
61745    ) -> Self {
61746        self.default_checkpoint_id = v.into();
61747        self
61748    }
61749
61750    /// Sets the value of [predict_schemata][crate::model::Model::predict_schemata].
61751    pub fn set_predict_schemata<T>(mut self, v: T) -> Self
61752    where
61753        T: std::convert::Into<crate::model::PredictSchemata>,
61754    {
61755        self.predict_schemata = std::option::Option::Some(v.into());
61756        self
61757    }
61758
61759    /// Sets or clears the value of [predict_schemata][crate::model::Model::predict_schemata].
61760    pub fn set_or_clear_predict_schemata<T>(mut self, v: std::option::Option<T>) -> Self
61761    where
61762        T: std::convert::Into<crate::model::PredictSchemata>,
61763    {
61764        self.predict_schemata = v.map(|x| x.into());
61765        self
61766    }
61767
61768    /// Sets the value of [metadata_schema_uri][crate::model::Model::metadata_schema_uri].
61769    pub fn set_metadata_schema_uri<T: std::convert::Into<std::string::String>>(
61770        mut self,
61771        v: T,
61772    ) -> Self {
61773        self.metadata_schema_uri = v.into();
61774        self
61775    }
61776
61777    /// Sets the value of [metadata][crate::model::Model::metadata].
61778    pub fn set_metadata<T>(mut self, v: T) -> Self
61779    where
61780        T: std::convert::Into<wkt::Value>,
61781    {
61782        self.metadata = std::option::Option::Some(v.into());
61783        self
61784    }
61785
61786    /// Sets or clears the value of [metadata][crate::model::Model::metadata].
61787    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
61788    where
61789        T: std::convert::Into<wkt::Value>,
61790    {
61791        self.metadata = v.map(|x| x.into());
61792        self
61793    }
61794
61795    /// Sets the value of [supported_export_formats][crate::model::Model::supported_export_formats].
61796    pub fn set_supported_export_formats<T, V>(mut self, v: T) -> Self
61797    where
61798        T: std::iter::IntoIterator<Item = V>,
61799        V: std::convert::Into<crate::model::model::ExportFormat>,
61800    {
61801        use std::iter::Iterator;
61802        self.supported_export_formats = v.into_iter().map(|i| i.into()).collect();
61803        self
61804    }
61805
61806    /// Sets the value of [training_pipeline][crate::model::Model::training_pipeline].
61807    pub fn set_training_pipeline<T: std::convert::Into<std::string::String>>(
61808        mut self,
61809        v: T,
61810    ) -> Self {
61811        self.training_pipeline = v.into();
61812        self
61813    }
61814
61815    /// Sets the value of [pipeline_job][crate::model::Model::pipeline_job].
61816    pub fn set_pipeline_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
61817        self.pipeline_job = v.into();
61818        self
61819    }
61820
61821    /// Sets the value of [container_spec][crate::model::Model::container_spec].
61822    pub fn set_container_spec<T>(mut self, v: T) -> Self
61823    where
61824        T: std::convert::Into<crate::model::ModelContainerSpec>,
61825    {
61826        self.container_spec = std::option::Option::Some(v.into());
61827        self
61828    }
61829
61830    /// Sets or clears the value of [container_spec][crate::model::Model::container_spec].
61831    pub fn set_or_clear_container_spec<T>(mut self, v: std::option::Option<T>) -> Self
61832    where
61833        T: std::convert::Into<crate::model::ModelContainerSpec>,
61834    {
61835        self.container_spec = v.map(|x| x.into());
61836        self
61837    }
61838
61839    /// Sets the value of [artifact_uri][crate::model::Model::artifact_uri].
61840    pub fn set_artifact_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
61841        self.artifact_uri = v.into();
61842        self
61843    }
61844
61845    /// Sets the value of [supported_deployment_resources_types][crate::model::Model::supported_deployment_resources_types].
61846    pub fn set_supported_deployment_resources_types<T, V>(mut self, v: T) -> Self
61847    where
61848        T: std::iter::IntoIterator<Item = V>,
61849        V: std::convert::Into<crate::model::model::DeploymentResourcesType>,
61850    {
61851        use std::iter::Iterator;
61852        self.supported_deployment_resources_types = v.into_iter().map(|i| i.into()).collect();
61853        self
61854    }
61855
61856    /// Sets the value of [supported_input_storage_formats][crate::model::Model::supported_input_storage_formats].
61857    pub fn set_supported_input_storage_formats<T, V>(mut self, v: T) -> Self
61858    where
61859        T: std::iter::IntoIterator<Item = V>,
61860        V: std::convert::Into<std::string::String>,
61861    {
61862        use std::iter::Iterator;
61863        self.supported_input_storage_formats = v.into_iter().map(|i| i.into()).collect();
61864        self
61865    }
61866
61867    /// Sets the value of [supported_output_storage_formats][crate::model::Model::supported_output_storage_formats].
61868    pub fn set_supported_output_storage_formats<T, V>(mut self, v: T) -> Self
61869    where
61870        T: std::iter::IntoIterator<Item = V>,
61871        V: std::convert::Into<std::string::String>,
61872    {
61873        use std::iter::Iterator;
61874        self.supported_output_storage_formats = v.into_iter().map(|i| i.into()).collect();
61875        self
61876    }
61877
61878    /// Sets the value of [create_time][crate::model::Model::create_time].
61879    pub fn set_create_time<T>(mut self, v: T) -> Self
61880    where
61881        T: std::convert::Into<wkt::Timestamp>,
61882    {
61883        self.create_time = std::option::Option::Some(v.into());
61884        self
61885    }
61886
61887    /// Sets or clears the value of [create_time][crate::model::Model::create_time].
61888    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
61889    where
61890        T: std::convert::Into<wkt::Timestamp>,
61891    {
61892        self.create_time = v.map(|x| x.into());
61893        self
61894    }
61895
61896    /// Sets the value of [update_time][crate::model::Model::update_time].
61897    pub fn set_update_time<T>(mut self, v: T) -> Self
61898    where
61899        T: std::convert::Into<wkt::Timestamp>,
61900    {
61901        self.update_time = std::option::Option::Some(v.into());
61902        self
61903    }
61904
61905    /// Sets or clears the value of [update_time][crate::model::Model::update_time].
61906    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
61907    where
61908        T: std::convert::Into<wkt::Timestamp>,
61909    {
61910        self.update_time = v.map(|x| x.into());
61911        self
61912    }
61913
61914    /// Sets the value of [deployed_models][crate::model::Model::deployed_models].
61915    pub fn set_deployed_models<T, V>(mut self, v: T) -> Self
61916    where
61917        T: std::iter::IntoIterator<Item = V>,
61918        V: std::convert::Into<crate::model::DeployedModelRef>,
61919    {
61920        use std::iter::Iterator;
61921        self.deployed_models = v.into_iter().map(|i| i.into()).collect();
61922        self
61923    }
61924
61925    /// Sets the value of [explanation_spec][crate::model::Model::explanation_spec].
61926    pub fn set_explanation_spec<T>(mut self, v: T) -> Self
61927    where
61928        T: std::convert::Into<crate::model::ExplanationSpec>,
61929    {
61930        self.explanation_spec = std::option::Option::Some(v.into());
61931        self
61932    }
61933
61934    /// Sets or clears the value of [explanation_spec][crate::model::Model::explanation_spec].
61935    pub fn set_or_clear_explanation_spec<T>(mut self, v: std::option::Option<T>) -> Self
61936    where
61937        T: std::convert::Into<crate::model::ExplanationSpec>,
61938    {
61939        self.explanation_spec = v.map(|x| x.into());
61940        self
61941    }
61942
61943    /// Sets the value of [etag][crate::model::Model::etag].
61944    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
61945        self.etag = v.into();
61946        self
61947    }
61948
61949    /// Sets the value of [labels][crate::model::Model::labels].
61950    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
61951    where
61952        T: std::iter::IntoIterator<Item = (K, V)>,
61953        K: std::convert::Into<std::string::String>,
61954        V: std::convert::Into<std::string::String>,
61955    {
61956        use std::iter::Iterator;
61957        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
61958        self
61959    }
61960
61961    /// Sets the value of [data_stats][crate::model::Model::data_stats].
61962    pub fn set_data_stats<T>(mut self, v: T) -> Self
61963    where
61964        T: std::convert::Into<crate::model::model::DataStats>,
61965    {
61966        self.data_stats = std::option::Option::Some(v.into());
61967        self
61968    }
61969
61970    /// Sets or clears the value of [data_stats][crate::model::Model::data_stats].
61971    pub fn set_or_clear_data_stats<T>(mut self, v: std::option::Option<T>) -> Self
61972    where
61973        T: std::convert::Into<crate::model::model::DataStats>,
61974    {
61975        self.data_stats = v.map(|x| x.into());
61976        self
61977    }
61978
61979    /// Sets the value of [encryption_spec][crate::model::Model::encryption_spec].
61980    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
61981    where
61982        T: std::convert::Into<crate::model::EncryptionSpec>,
61983    {
61984        self.encryption_spec = std::option::Option::Some(v.into());
61985        self
61986    }
61987
61988    /// Sets or clears the value of [encryption_spec][crate::model::Model::encryption_spec].
61989    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
61990    where
61991        T: std::convert::Into<crate::model::EncryptionSpec>,
61992    {
61993        self.encryption_spec = v.map(|x| x.into());
61994        self
61995    }
61996
61997    /// Sets the value of [model_source_info][crate::model::Model::model_source_info].
61998    pub fn set_model_source_info<T>(mut self, v: T) -> Self
61999    where
62000        T: std::convert::Into<crate::model::ModelSourceInfo>,
62001    {
62002        self.model_source_info = std::option::Option::Some(v.into());
62003        self
62004    }
62005
62006    /// Sets or clears the value of [model_source_info][crate::model::Model::model_source_info].
62007    pub fn set_or_clear_model_source_info<T>(mut self, v: std::option::Option<T>) -> Self
62008    where
62009        T: std::convert::Into<crate::model::ModelSourceInfo>,
62010    {
62011        self.model_source_info = v.map(|x| x.into());
62012        self
62013    }
62014
62015    /// Sets the value of [original_model_info][crate::model::Model::original_model_info].
62016    pub fn set_original_model_info<T>(mut self, v: T) -> Self
62017    where
62018        T: std::convert::Into<crate::model::model::OriginalModelInfo>,
62019    {
62020        self.original_model_info = std::option::Option::Some(v.into());
62021        self
62022    }
62023
62024    /// Sets or clears the value of [original_model_info][crate::model::Model::original_model_info].
62025    pub fn set_or_clear_original_model_info<T>(mut self, v: std::option::Option<T>) -> Self
62026    where
62027        T: std::convert::Into<crate::model::model::OriginalModelInfo>,
62028    {
62029        self.original_model_info = v.map(|x| x.into());
62030        self
62031    }
62032
62033    /// Sets the value of [metadata_artifact][crate::model::Model::metadata_artifact].
62034    pub fn set_metadata_artifact<T: std::convert::Into<std::string::String>>(
62035        mut self,
62036        v: T,
62037    ) -> Self {
62038        self.metadata_artifact = v.into();
62039        self
62040    }
62041
62042    /// Sets the value of [base_model_source][crate::model::Model::base_model_source].
62043    pub fn set_base_model_source<T>(mut self, v: T) -> Self
62044    where
62045        T: std::convert::Into<crate::model::model::BaseModelSource>,
62046    {
62047        self.base_model_source = std::option::Option::Some(v.into());
62048        self
62049    }
62050
62051    /// Sets or clears the value of [base_model_source][crate::model::Model::base_model_source].
62052    pub fn set_or_clear_base_model_source<T>(mut self, v: std::option::Option<T>) -> Self
62053    where
62054        T: std::convert::Into<crate::model::model::BaseModelSource>,
62055    {
62056        self.base_model_source = v.map(|x| x.into());
62057        self
62058    }
62059
62060    /// Sets the value of [satisfies_pzs][crate::model::Model::satisfies_pzs].
62061    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
62062        self.satisfies_pzs = v.into();
62063        self
62064    }
62065
62066    /// Sets the value of [satisfies_pzi][crate::model::Model::satisfies_pzi].
62067    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
62068        self.satisfies_pzi = v.into();
62069        self
62070    }
62071
62072    /// Sets the value of [checkpoints][crate::model::Model::checkpoints].
62073    pub fn set_checkpoints<T, V>(mut self, v: T) -> Self
62074    where
62075        T: std::iter::IntoIterator<Item = V>,
62076        V: std::convert::Into<crate::model::Checkpoint>,
62077    {
62078        use std::iter::Iterator;
62079        self.checkpoints = v.into_iter().map(|i| i.into()).collect();
62080        self
62081    }
62082}
62083
62084#[cfg(any(
62085    feature = "dataset-service",
62086    feature = "model-service",
62087    feature = "pipeline-service",
62088))]
62089impl wkt::message::Message for Model {
62090    fn typename() -> &'static str {
62091        "type.googleapis.com/google.cloud.aiplatform.v1.Model"
62092    }
62093}
62094
62095/// Defines additional types related to [Model].
62096#[cfg(any(
62097    feature = "dataset-service",
62098    feature = "model-service",
62099    feature = "pipeline-service",
62100))]
62101pub mod model {
62102    #[allow(unused_imports)]
62103    use super::*;
62104
62105    /// Represents export format supported by the Model.
62106    /// All formats export to Google Cloud Storage.
62107    #[cfg(any(
62108        feature = "dataset-service",
62109        feature = "model-service",
62110        feature = "pipeline-service",
62111    ))]
62112    #[derive(Clone, Default, PartialEq)]
62113    #[non_exhaustive]
62114    pub struct ExportFormat {
62115        /// Output only. The ID of the export format.
62116        /// The possible format IDs are:
62117        ///
62118        /// * `tflite`
62119        ///   Used for Android mobile devices.
62120        ///
62121        /// * `edgetpu-tflite`
62122        ///   Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.
62123        ///
62124        /// * `tf-saved-model`
62125        ///   A tensorflow model in SavedModel format.
62126        ///
62127        /// * `tf-js`
62128        ///   A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used
62129        ///   in the browser and in Node.js using JavaScript.
62130        ///
62131        /// * `core-ml`
62132        ///   Used for iOS mobile devices.
62133        ///
62134        /// * `custom-trained`
62135        ///   A Model that was uploaded or trained by custom code.
62136        ///
62137        pub id: std::string::String,
62138
62139        /// Output only. The content of this Model that may be exported.
62140        pub exportable_contents:
62141            std::vec::Vec<crate::model::model::export_format::ExportableContent>,
62142
62143        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
62144    }
62145
62146    #[cfg(any(
62147        feature = "dataset-service",
62148        feature = "model-service",
62149        feature = "pipeline-service",
62150    ))]
62151    impl ExportFormat {
62152        pub fn new() -> Self {
62153            std::default::Default::default()
62154        }
62155
62156        /// Sets the value of [id][crate::model::model::ExportFormat::id].
62157        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
62158            self.id = v.into();
62159            self
62160        }
62161
62162        /// Sets the value of [exportable_contents][crate::model::model::ExportFormat::exportable_contents].
62163        pub fn set_exportable_contents<T, V>(mut self, v: T) -> Self
62164        where
62165            T: std::iter::IntoIterator<Item = V>,
62166            V: std::convert::Into<crate::model::model::export_format::ExportableContent>,
62167        {
62168            use std::iter::Iterator;
62169            self.exportable_contents = v.into_iter().map(|i| i.into()).collect();
62170            self
62171        }
62172    }
62173
62174    #[cfg(any(
62175        feature = "dataset-service",
62176        feature = "model-service",
62177        feature = "pipeline-service",
62178    ))]
62179    impl wkt::message::Message for ExportFormat {
62180        fn typename() -> &'static str {
62181            "type.googleapis.com/google.cloud.aiplatform.v1.Model.ExportFormat"
62182        }
62183    }
62184
62185    /// Defines additional types related to [ExportFormat].
62186    #[cfg(any(
62187        feature = "dataset-service",
62188        feature = "model-service",
62189        feature = "pipeline-service",
62190    ))]
62191    pub mod export_format {
62192        #[allow(unused_imports)]
62193        use super::*;
62194
62195        /// The Model content that can be exported.
62196        ///
62197        /// # Working with unknown values
62198        ///
62199        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
62200        /// additional enum variants at any time. Adding new variants is not considered
62201        /// a breaking change. Applications should write their code in anticipation of:
62202        ///
62203        /// - New values appearing in future releases of the client library, **and**
62204        /// - New values received dynamically, without application changes.
62205        ///
62206        /// Please consult the [Working with enums] section in the user guide for some
62207        /// guidelines.
62208        ///
62209        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
62210        #[cfg(any(
62211            feature = "dataset-service",
62212            feature = "model-service",
62213            feature = "pipeline-service",
62214        ))]
62215        #[derive(Clone, Debug, PartialEq)]
62216        #[non_exhaustive]
62217        pub enum ExportableContent {
62218            /// Should not be used.
62219            Unspecified,
62220            /// Model artifact and any of its supported files. Will be exported to the
62221            /// location specified by the `artifactDestination` field of the
62222            /// [ExportModelRequest.output_config][google.cloud.aiplatform.v1.ExportModelRequest.output_config]
62223            /// object.
62224            ///
62225            /// [google.cloud.aiplatform.v1.ExportModelRequest.output_config]: crate::model::ExportModelRequest::output_config
62226            Artifact,
62227            /// The container image that is to be used when deploying this Model. Will
62228            /// be exported to the location specified by the `imageDestination` field
62229            /// of the
62230            /// [ExportModelRequest.output_config][google.cloud.aiplatform.v1.ExportModelRequest.output_config]
62231            /// object.
62232            ///
62233            /// [google.cloud.aiplatform.v1.ExportModelRequest.output_config]: crate::model::ExportModelRequest::output_config
62234            Image,
62235            /// If set, the enum was initialized with an unknown value.
62236            ///
62237            /// Applications can examine the value using [ExportableContent::value] or
62238            /// [ExportableContent::name].
62239            UnknownValue(exportable_content::UnknownValue),
62240        }
62241
62242        #[doc(hidden)]
62243        #[cfg(any(
62244            feature = "dataset-service",
62245            feature = "model-service",
62246            feature = "pipeline-service",
62247        ))]
62248        pub mod exportable_content {
62249            #[allow(unused_imports)]
62250            use super::*;
62251            #[derive(Clone, Debug, PartialEq)]
62252            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
62253        }
62254
62255        #[cfg(any(
62256            feature = "dataset-service",
62257            feature = "model-service",
62258            feature = "pipeline-service",
62259        ))]
62260        impl ExportableContent {
62261            /// Gets the enum value.
62262            ///
62263            /// Returns `None` if the enum contains an unknown value deserialized from
62264            /// the string representation of enums.
62265            pub fn value(&self) -> std::option::Option<i32> {
62266                match self {
62267                    Self::Unspecified => std::option::Option::Some(0),
62268                    Self::Artifact => std::option::Option::Some(1),
62269                    Self::Image => std::option::Option::Some(2),
62270                    Self::UnknownValue(u) => u.0.value(),
62271                }
62272            }
62273
62274            /// Gets the enum value as a string.
62275            ///
62276            /// Returns `None` if the enum contains an unknown value deserialized from
62277            /// the integer representation of enums.
62278            pub fn name(&self) -> std::option::Option<&str> {
62279                match self {
62280                    Self::Unspecified => {
62281                        std::option::Option::Some("EXPORTABLE_CONTENT_UNSPECIFIED")
62282                    }
62283                    Self::Artifact => std::option::Option::Some("ARTIFACT"),
62284                    Self::Image => std::option::Option::Some("IMAGE"),
62285                    Self::UnknownValue(u) => u.0.name(),
62286                }
62287            }
62288        }
62289
62290        #[cfg(any(
62291            feature = "dataset-service",
62292            feature = "model-service",
62293            feature = "pipeline-service",
62294        ))]
62295        impl std::default::Default for ExportableContent {
62296            fn default() -> Self {
62297                use std::convert::From;
62298                Self::from(0)
62299            }
62300        }
62301
62302        #[cfg(any(
62303            feature = "dataset-service",
62304            feature = "model-service",
62305            feature = "pipeline-service",
62306        ))]
62307        impl std::fmt::Display for ExportableContent {
62308            fn fmt(
62309                &self,
62310                f: &mut std::fmt::Formatter<'_>,
62311            ) -> std::result::Result<(), std::fmt::Error> {
62312                wkt::internal::display_enum(f, self.name(), self.value())
62313            }
62314        }
62315
62316        #[cfg(any(
62317            feature = "dataset-service",
62318            feature = "model-service",
62319            feature = "pipeline-service",
62320        ))]
62321        impl std::convert::From<i32> for ExportableContent {
62322            fn from(value: i32) -> Self {
62323                match value {
62324                    0 => Self::Unspecified,
62325                    1 => Self::Artifact,
62326                    2 => Self::Image,
62327                    _ => Self::UnknownValue(exportable_content::UnknownValue(
62328                        wkt::internal::UnknownEnumValue::Integer(value),
62329                    )),
62330                }
62331            }
62332        }
62333
62334        #[cfg(any(
62335            feature = "dataset-service",
62336            feature = "model-service",
62337            feature = "pipeline-service",
62338        ))]
62339        impl std::convert::From<&str> for ExportableContent {
62340            fn from(value: &str) -> Self {
62341                use std::string::ToString;
62342                match value {
62343                    "EXPORTABLE_CONTENT_UNSPECIFIED" => Self::Unspecified,
62344                    "ARTIFACT" => Self::Artifact,
62345                    "IMAGE" => Self::Image,
62346                    _ => Self::UnknownValue(exportable_content::UnknownValue(
62347                        wkt::internal::UnknownEnumValue::String(value.to_string()),
62348                    )),
62349                }
62350            }
62351        }
62352
62353        #[cfg(any(
62354            feature = "dataset-service",
62355            feature = "model-service",
62356            feature = "pipeline-service",
62357        ))]
62358        impl serde::ser::Serialize for ExportableContent {
62359            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
62360            where
62361                S: serde::Serializer,
62362            {
62363                match self {
62364                    Self::Unspecified => serializer.serialize_i32(0),
62365                    Self::Artifact => serializer.serialize_i32(1),
62366                    Self::Image => serializer.serialize_i32(2),
62367                    Self::UnknownValue(u) => u.0.serialize(serializer),
62368                }
62369            }
62370        }
62371
62372        #[cfg(any(
62373            feature = "dataset-service",
62374            feature = "model-service",
62375            feature = "pipeline-service",
62376        ))]
62377        impl<'de> serde::de::Deserialize<'de> for ExportableContent {
62378            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
62379            where
62380                D: serde::Deserializer<'de>,
62381            {
62382                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ExportableContent>::new(
62383                    ".google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent",
62384                ))
62385            }
62386        }
62387    }
62388
62389    /// Stats of data used for train or evaluate the Model.
62390    #[cfg(any(
62391        feature = "dataset-service",
62392        feature = "model-service",
62393        feature = "pipeline-service",
62394    ))]
62395    #[derive(Clone, Default, PartialEq)]
62396    #[non_exhaustive]
62397    pub struct DataStats {
62398        /// Number of DataItems that were used for training this Model.
62399        pub training_data_items_count: i64,
62400
62401        /// Number of DataItems that were used for validating this Model during
62402        /// training.
62403        pub validation_data_items_count: i64,
62404
62405        /// Number of DataItems that were used for evaluating this Model. If the
62406        /// Model is evaluated multiple times, this will be the number of test
62407        /// DataItems used by the first evaluation. If the Model is not evaluated,
62408        /// the number is 0.
62409        pub test_data_items_count: i64,
62410
62411        /// Number of Annotations that are used for training this Model.
62412        pub training_annotations_count: i64,
62413
62414        /// Number of Annotations that are used for validating this Model during
62415        /// training.
62416        pub validation_annotations_count: i64,
62417
62418        /// Number of Annotations that are used for evaluating this Model. If the
62419        /// Model is evaluated multiple times, this will be the number of test
62420        /// Annotations used by the first evaluation. If the Model is not evaluated,
62421        /// the number is 0.
62422        pub test_annotations_count: i64,
62423
62424        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
62425    }
62426
62427    #[cfg(any(
62428        feature = "dataset-service",
62429        feature = "model-service",
62430        feature = "pipeline-service",
62431    ))]
62432    impl DataStats {
62433        pub fn new() -> Self {
62434            std::default::Default::default()
62435        }
62436
62437        /// Sets the value of [training_data_items_count][crate::model::model::DataStats::training_data_items_count].
62438        pub fn set_training_data_items_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
62439            self.training_data_items_count = v.into();
62440            self
62441        }
62442
62443        /// Sets the value of [validation_data_items_count][crate::model::model::DataStats::validation_data_items_count].
62444        pub fn set_validation_data_items_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
62445            self.validation_data_items_count = v.into();
62446            self
62447        }
62448
62449        /// Sets the value of [test_data_items_count][crate::model::model::DataStats::test_data_items_count].
62450        pub fn set_test_data_items_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
62451            self.test_data_items_count = v.into();
62452            self
62453        }
62454
62455        /// Sets the value of [training_annotations_count][crate::model::model::DataStats::training_annotations_count].
62456        pub fn set_training_annotations_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
62457            self.training_annotations_count = v.into();
62458            self
62459        }
62460
62461        /// Sets the value of [validation_annotations_count][crate::model::model::DataStats::validation_annotations_count].
62462        pub fn set_validation_annotations_count<T: std::convert::Into<i64>>(
62463            mut self,
62464            v: T,
62465        ) -> Self {
62466            self.validation_annotations_count = v.into();
62467            self
62468        }
62469
62470        /// Sets the value of [test_annotations_count][crate::model::model::DataStats::test_annotations_count].
62471        pub fn set_test_annotations_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
62472            self.test_annotations_count = v.into();
62473            self
62474        }
62475    }
62476
62477    #[cfg(any(
62478        feature = "dataset-service",
62479        feature = "model-service",
62480        feature = "pipeline-service",
62481    ))]
62482    impl wkt::message::Message for DataStats {
62483        fn typename() -> &'static str {
62484            "type.googleapis.com/google.cloud.aiplatform.v1.Model.DataStats"
62485        }
62486    }
62487
62488    /// Contains information about the original Model if this Model is a copy.
62489    #[cfg(any(
62490        feature = "dataset-service",
62491        feature = "model-service",
62492        feature = "pipeline-service",
62493    ))]
62494    #[derive(Clone, Default, PartialEq)]
62495    #[non_exhaustive]
62496    pub struct OriginalModelInfo {
62497        /// Output only. The resource name of the Model this Model is a copy of,
62498        /// including the revision. Format:
62499        /// `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
62500        pub model: std::string::String,
62501
62502        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
62503    }
62504
62505    #[cfg(any(
62506        feature = "dataset-service",
62507        feature = "model-service",
62508        feature = "pipeline-service",
62509    ))]
62510    impl OriginalModelInfo {
62511        pub fn new() -> Self {
62512            std::default::Default::default()
62513        }
62514
62515        /// Sets the value of [model][crate::model::model::OriginalModelInfo::model].
62516        pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
62517            self.model = v.into();
62518            self
62519        }
62520    }
62521
62522    #[cfg(any(
62523        feature = "dataset-service",
62524        feature = "model-service",
62525        feature = "pipeline-service",
62526    ))]
62527    impl wkt::message::Message for OriginalModelInfo {
62528        fn typename() -> &'static str {
62529            "type.googleapis.com/google.cloud.aiplatform.v1.Model.OriginalModelInfo"
62530        }
62531    }
62532
62533    /// User input field to specify the base model source. Currently it only
62534    /// supports specifing the Model Garden models and Genie models.
62535    #[cfg(any(
62536        feature = "dataset-service",
62537        feature = "model-service",
62538        feature = "pipeline-service",
62539    ))]
62540    #[derive(Clone, Default, PartialEq)]
62541    #[non_exhaustive]
62542    pub struct BaseModelSource {
62543        pub source: std::option::Option<crate::model::model::base_model_source::Source>,
62544
62545        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
62546    }
62547
62548    #[cfg(any(
62549        feature = "dataset-service",
62550        feature = "model-service",
62551        feature = "pipeline-service",
62552    ))]
62553    impl BaseModelSource {
62554        pub fn new() -> Self {
62555            std::default::Default::default()
62556        }
62557
62558        /// Sets the value of [source][crate::model::model::BaseModelSource::source].
62559        ///
62560        /// Note that all the setters affecting `source` are mutually
62561        /// exclusive.
62562        pub fn set_source<
62563            T: std::convert::Into<std::option::Option<crate::model::model::base_model_source::Source>>,
62564        >(
62565            mut self,
62566            v: T,
62567        ) -> Self {
62568            self.source = v.into();
62569            self
62570        }
62571
62572        /// The value of [source][crate::model::model::BaseModelSource::source]
62573        /// if it holds a `ModelGardenSource`, `None` if the field is not set or
62574        /// holds a different branch.
62575        pub fn model_garden_source(
62576            &self,
62577        ) -> std::option::Option<&std::boxed::Box<crate::model::ModelGardenSource>> {
62578            #[allow(unreachable_patterns)]
62579            self.source.as_ref().and_then(|v| match v {
62580                crate::model::model::base_model_source::Source::ModelGardenSource(v) => {
62581                    std::option::Option::Some(v)
62582                }
62583                _ => std::option::Option::None,
62584            })
62585        }
62586
62587        /// Sets the value of [source][crate::model::model::BaseModelSource::source]
62588        /// to hold a `ModelGardenSource`.
62589        ///
62590        /// Note that all the setters affecting `source` are
62591        /// mutually exclusive.
62592        pub fn set_model_garden_source<
62593            T: std::convert::Into<std::boxed::Box<crate::model::ModelGardenSource>>,
62594        >(
62595            mut self,
62596            v: T,
62597        ) -> Self {
62598            self.source = std::option::Option::Some(
62599                crate::model::model::base_model_source::Source::ModelGardenSource(v.into()),
62600            );
62601            self
62602        }
62603
62604        /// The value of [source][crate::model::model::BaseModelSource::source]
62605        /// if it holds a `GenieSource`, `None` if the field is not set or
62606        /// holds a different branch.
62607        pub fn genie_source(
62608            &self,
62609        ) -> std::option::Option<&std::boxed::Box<crate::model::GenieSource>> {
62610            #[allow(unreachable_patterns)]
62611            self.source.as_ref().and_then(|v| match v {
62612                crate::model::model::base_model_source::Source::GenieSource(v) => {
62613                    std::option::Option::Some(v)
62614                }
62615                _ => std::option::Option::None,
62616            })
62617        }
62618
62619        /// Sets the value of [source][crate::model::model::BaseModelSource::source]
62620        /// to hold a `GenieSource`.
62621        ///
62622        /// Note that all the setters affecting `source` are
62623        /// mutually exclusive.
62624        pub fn set_genie_source<
62625            T: std::convert::Into<std::boxed::Box<crate::model::GenieSource>>,
62626        >(
62627            mut self,
62628            v: T,
62629        ) -> Self {
62630            self.source = std::option::Option::Some(
62631                crate::model::model::base_model_source::Source::GenieSource(v.into()),
62632            );
62633            self
62634        }
62635    }
62636
62637    #[cfg(any(
62638        feature = "dataset-service",
62639        feature = "model-service",
62640        feature = "pipeline-service",
62641    ))]
62642    impl wkt::message::Message for BaseModelSource {
62643        fn typename() -> &'static str {
62644            "type.googleapis.com/google.cloud.aiplatform.v1.Model.BaseModelSource"
62645        }
62646    }
62647
62648    /// Defines additional types related to [BaseModelSource].
62649    #[cfg(any(
62650        feature = "dataset-service",
62651        feature = "model-service",
62652        feature = "pipeline-service",
62653    ))]
62654    pub mod base_model_source {
62655        #[allow(unused_imports)]
62656        use super::*;
62657
62658        #[cfg(any(
62659            feature = "dataset-service",
62660            feature = "model-service",
62661            feature = "pipeline-service",
62662        ))]
62663        #[derive(Clone, Debug, PartialEq)]
62664        #[non_exhaustive]
62665        pub enum Source {
62666            /// Source information of Model Garden models.
62667            ModelGardenSource(std::boxed::Box<crate::model::ModelGardenSource>),
62668            /// Information about the base model of Genie models.
62669            GenieSource(std::boxed::Box<crate::model::GenieSource>),
62670        }
62671    }
62672
62673    /// Identifies a type of Model's prediction resources.
62674    ///
62675    /// # Working with unknown values
62676    ///
62677    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
62678    /// additional enum variants at any time. Adding new variants is not considered
62679    /// a breaking change. Applications should write their code in anticipation of:
62680    ///
62681    /// - New values appearing in future releases of the client library, **and**
62682    /// - New values received dynamically, without application changes.
62683    ///
62684    /// Please consult the [Working with enums] section in the user guide for some
62685    /// guidelines.
62686    ///
62687    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
62688    #[cfg(any(
62689        feature = "dataset-service",
62690        feature = "model-service",
62691        feature = "pipeline-service",
62692    ))]
62693    #[derive(Clone, Debug, PartialEq)]
62694    #[non_exhaustive]
62695    pub enum DeploymentResourcesType {
62696        /// Should not be used.
62697        Unspecified,
62698        /// Resources that are dedicated to the
62699        /// [DeployedModel][google.cloud.aiplatform.v1.DeployedModel], and that need
62700        /// a higher degree of manual configuration.
62701        ///
62702        /// [google.cloud.aiplatform.v1.DeployedModel]: crate::model::DeployedModel
62703        DedicatedResources,
62704        /// Resources that to large degree are decided by Vertex AI, and require
62705        /// only a modest additional configuration.
62706        AutomaticResources,
62707        /// Resources that can be shared by multiple
62708        /// [DeployedModels][google.cloud.aiplatform.v1.DeployedModel]. A
62709        /// pre-configured
62710        /// [DeploymentResourcePool][google.cloud.aiplatform.v1.DeploymentResourcePool]
62711        /// is required.
62712        ///
62713        /// [google.cloud.aiplatform.v1.DeployedModel]: crate::model::DeployedModel
62714        /// [google.cloud.aiplatform.v1.DeploymentResourcePool]: crate::model::DeploymentResourcePool
62715        SharedResources,
62716        /// If set, the enum was initialized with an unknown value.
62717        ///
62718        /// Applications can examine the value using [DeploymentResourcesType::value] or
62719        /// [DeploymentResourcesType::name].
62720        UnknownValue(deployment_resources_type::UnknownValue),
62721    }
62722
62723    #[doc(hidden)]
62724    #[cfg(any(
62725        feature = "dataset-service",
62726        feature = "model-service",
62727        feature = "pipeline-service",
62728    ))]
62729    pub mod deployment_resources_type {
62730        #[allow(unused_imports)]
62731        use super::*;
62732        #[derive(Clone, Debug, PartialEq)]
62733        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
62734    }
62735
62736    #[cfg(any(
62737        feature = "dataset-service",
62738        feature = "model-service",
62739        feature = "pipeline-service",
62740    ))]
62741    impl DeploymentResourcesType {
62742        /// Gets the enum value.
62743        ///
62744        /// Returns `None` if the enum contains an unknown value deserialized from
62745        /// the string representation of enums.
62746        pub fn value(&self) -> std::option::Option<i32> {
62747            match self {
62748                Self::Unspecified => std::option::Option::Some(0),
62749                Self::DedicatedResources => std::option::Option::Some(1),
62750                Self::AutomaticResources => std::option::Option::Some(2),
62751                Self::SharedResources => std::option::Option::Some(3),
62752                Self::UnknownValue(u) => u.0.value(),
62753            }
62754        }
62755
62756        /// Gets the enum value as a string.
62757        ///
62758        /// Returns `None` if the enum contains an unknown value deserialized from
62759        /// the integer representation of enums.
62760        pub fn name(&self) -> std::option::Option<&str> {
62761            match self {
62762                Self::Unspecified => {
62763                    std::option::Option::Some("DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED")
62764                }
62765                Self::DedicatedResources => std::option::Option::Some("DEDICATED_RESOURCES"),
62766                Self::AutomaticResources => std::option::Option::Some("AUTOMATIC_RESOURCES"),
62767                Self::SharedResources => std::option::Option::Some("SHARED_RESOURCES"),
62768                Self::UnknownValue(u) => u.0.name(),
62769            }
62770        }
62771    }
62772
62773    #[cfg(any(
62774        feature = "dataset-service",
62775        feature = "model-service",
62776        feature = "pipeline-service",
62777    ))]
62778    impl std::default::Default for DeploymentResourcesType {
62779        fn default() -> Self {
62780            use std::convert::From;
62781            Self::from(0)
62782        }
62783    }
62784
62785    #[cfg(any(
62786        feature = "dataset-service",
62787        feature = "model-service",
62788        feature = "pipeline-service",
62789    ))]
62790    impl std::fmt::Display for DeploymentResourcesType {
62791        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
62792            wkt::internal::display_enum(f, self.name(), self.value())
62793        }
62794    }
62795
62796    #[cfg(any(
62797        feature = "dataset-service",
62798        feature = "model-service",
62799        feature = "pipeline-service",
62800    ))]
62801    impl std::convert::From<i32> for DeploymentResourcesType {
62802        fn from(value: i32) -> Self {
62803            match value {
62804                0 => Self::Unspecified,
62805                1 => Self::DedicatedResources,
62806                2 => Self::AutomaticResources,
62807                3 => Self::SharedResources,
62808                _ => Self::UnknownValue(deployment_resources_type::UnknownValue(
62809                    wkt::internal::UnknownEnumValue::Integer(value),
62810                )),
62811            }
62812        }
62813    }
62814
62815    #[cfg(any(
62816        feature = "dataset-service",
62817        feature = "model-service",
62818        feature = "pipeline-service",
62819    ))]
62820    impl std::convert::From<&str> for DeploymentResourcesType {
62821        fn from(value: &str) -> Self {
62822            use std::string::ToString;
62823            match value {
62824                "DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED" => Self::Unspecified,
62825                "DEDICATED_RESOURCES" => Self::DedicatedResources,
62826                "AUTOMATIC_RESOURCES" => Self::AutomaticResources,
62827                "SHARED_RESOURCES" => Self::SharedResources,
62828                _ => Self::UnknownValue(deployment_resources_type::UnknownValue(
62829                    wkt::internal::UnknownEnumValue::String(value.to_string()),
62830                )),
62831            }
62832        }
62833    }
62834
62835    #[cfg(any(
62836        feature = "dataset-service",
62837        feature = "model-service",
62838        feature = "pipeline-service",
62839    ))]
62840    impl serde::ser::Serialize for DeploymentResourcesType {
62841        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
62842        where
62843            S: serde::Serializer,
62844        {
62845            match self {
62846                Self::Unspecified => serializer.serialize_i32(0),
62847                Self::DedicatedResources => serializer.serialize_i32(1),
62848                Self::AutomaticResources => serializer.serialize_i32(2),
62849                Self::SharedResources => serializer.serialize_i32(3),
62850                Self::UnknownValue(u) => u.0.serialize(serializer),
62851            }
62852        }
62853    }
62854
62855    #[cfg(any(
62856        feature = "dataset-service",
62857        feature = "model-service",
62858        feature = "pipeline-service",
62859    ))]
62860    impl<'de> serde::de::Deserialize<'de> for DeploymentResourcesType {
62861        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
62862        where
62863            D: serde::Deserializer<'de>,
62864        {
62865            deserializer.deserialize_any(
62866                wkt::internal::EnumVisitor::<DeploymentResourcesType>::new(
62867                    ".google.cloud.aiplatform.v1.Model.DeploymentResourcesType",
62868                ),
62869            )
62870        }
62871    }
62872}
62873
62874/// Contains information about the Large Model.
62875#[cfg(feature = "model-garden-service")]
62876#[derive(Clone, Default, PartialEq)]
62877#[non_exhaustive]
62878pub struct LargeModelReference {
62879    /// Required. The unique name of the large Foundation or pre-built model. Like
62880    /// "chat-bison", "text-bison". Or model name with version ID, like
62881    /// "chat-bison@001", "text-bison@005", etc.
62882    pub name: std::string::String,
62883
62884    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
62885}
62886
62887#[cfg(feature = "model-garden-service")]
62888impl LargeModelReference {
62889    pub fn new() -> Self {
62890        std::default::Default::default()
62891    }
62892
62893    /// Sets the value of [name][crate::model::LargeModelReference::name].
62894    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
62895        self.name = v.into();
62896        self
62897    }
62898}
62899
62900#[cfg(feature = "model-garden-service")]
62901impl wkt::message::Message for LargeModelReference {
62902    fn typename() -> &'static str {
62903        "type.googleapis.com/google.cloud.aiplatform.v1.LargeModelReference"
62904    }
62905}
62906
62907/// Contains information about the source of the models generated from Model
62908/// Garden.
62909#[cfg(any(
62910    feature = "dataset-service",
62911    feature = "model-service",
62912    feature = "pipeline-service",
62913))]
62914#[derive(Clone, Default, PartialEq)]
62915#[non_exhaustive]
62916pub struct ModelGardenSource {
62917    /// Required. The model garden source model resource name.
62918    pub public_model_name: std::string::String,
62919
62920    /// Optional. The model garden source model version ID.
62921    pub version_id: std::string::String,
62922
62923    /// Optional. Whether to avoid pulling the model from the HF cache.
62924    pub skip_hf_model_cache: bool,
62925
62926    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
62927}
62928
62929#[cfg(any(
62930    feature = "dataset-service",
62931    feature = "model-service",
62932    feature = "pipeline-service",
62933))]
62934impl ModelGardenSource {
62935    pub fn new() -> Self {
62936        std::default::Default::default()
62937    }
62938
62939    /// Sets the value of [public_model_name][crate::model::ModelGardenSource::public_model_name].
62940    pub fn set_public_model_name<T: std::convert::Into<std::string::String>>(
62941        mut self,
62942        v: T,
62943    ) -> Self {
62944        self.public_model_name = v.into();
62945        self
62946    }
62947
62948    /// Sets the value of [version_id][crate::model::ModelGardenSource::version_id].
62949    pub fn set_version_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
62950        self.version_id = v.into();
62951        self
62952    }
62953
62954    /// Sets the value of [skip_hf_model_cache][crate::model::ModelGardenSource::skip_hf_model_cache].
62955    pub fn set_skip_hf_model_cache<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
62956        self.skip_hf_model_cache = v.into();
62957        self
62958    }
62959}
62960
62961#[cfg(any(
62962    feature = "dataset-service",
62963    feature = "model-service",
62964    feature = "pipeline-service",
62965))]
62966impl wkt::message::Message for ModelGardenSource {
62967    fn typename() -> &'static str {
62968        "type.googleapis.com/google.cloud.aiplatform.v1.ModelGardenSource"
62969    }
62970}
62971
62972/// Contains information about the source of the models generated from Generative
62973/// AI Studio.
62974#[cfg(any(
62975    feature = "dataset-service",
62976    feature = "model-service",
62977    feature = "pipeline-service",
62978))]
62979#[derive(Clone, Default, PartialEq)]
62980#[non_exhaustive]
62981pub struct GenieSource {
62982    /// Required. The public base model URI.
62983    pub base_model_uri: std::string::String,
62984
62985    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
62986}
62987
62988#[cfg(any(
62989    feature = "dataset-service",
62990    feature = "model-service",
62991    feature = "pipeline-service",
62992))]
62993impl GenieSource {
62994    pub fn new() -> Self {
62995        std::default::Default::default()
62996    }
62997
62998    /// Sets the value of [base_model_uri][crate::model::GenieSource::base_model_uri].
62999    pub fn set_base_model_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
63000        self.base_model_uri = v.into();
63001        self
63002    }
63003}
63004
63005#[cfg(any(
63006    feature = "dataset-service",
63007    feature = "model-service",
63008    feature = "pipeline-service",
63009))]
63010impl wkt::message::Message for GenieSource {
63011    fn typename() -> &'static str {
63012        "type.googleapis.com/google.cloud.aiplatform.v1.GenieSource"
63013    }
63014}
63015
63016/// Contains the schemata used in Model's predictions and explanations via
63017/// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict],
63018/// [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain]
63019/// and [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob].
63020///
63021/// [google.cloud.aiplatform.v1.BatchPredictionJob]: crate::model::BatchPredictionJob
63022/// [google.cloud.aiplatform.v1.PredictionService.Explain]: crate::client::PredictionService::explain
63023/// [google.cloud.aiplatform.v1.PredictionService.Predict]: crate::client::PredictionService::predict
63024#[cfg(any(
63025    feature = "dataset-service",
63026    feature = "job-service",
63027    feature = "model-garden-service",
63028    feature = "model-service",
63029    feature = "pipeline-service",
63030))]
63031#[derive(Clone, Default, PartialEq)]
63032#[non_exhaustive]
63033pub struct PredictSchemata {
63034    /// Immutable. Points to a YAML file stored on Google Cloud Storage describing
63035    /// the format of a single instance, which are used in
63036    /// [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances],
63037    /// [ExplainRequest.instances][google.cloud.aiplatform.v1.ExplainRequest.instances]
63038    /// and
63039    /// [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config].
63040    /// The schema is defined as an OpenAPI 3.0.2 [Schema
63041    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
63042    /// AutoML Models always have this field populated by Vertex AI.
63043    /// Note: The URI given on output will be immutable and probably different,
63044    /// including the URI scheme, than the one given on input. The output URI will
63045    /// point to a location where the user only has a read access.
63046    ///
63047    /// [google.cloud.aiplatform.v1.BatchPredictionJob.input_config]: crate::model::BatchPredictionJob::input_config
63048    /// [google.cloud.aiplatform.v1.ExplainRequest.instances]: crate::model::ExplainRequest::instances
63049    /// [google.cloud.aiplatform.v1.PredictRequest.instances]: crate::model::PredictRequest::instances
63050    pub instance_schema_uri: std::string::String,
63051
63052    /// Immutable. Points to a YAML file stored on Google Cloud Storage describing
63053    /// the parameters of prediction and explanation via
63054    /// [PredictRequest.parameters][google.cloud.aiplatform.v1.PredictRequest.parameters],
63055    /// [ExplainRequest.parameters][google.cloud.aiplatform.v1.ExplainRequest.parameters]
63056    /// and
63057    /// [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters].
63058    /// The schema is defined as an OpenAPI 3.0.2 [Schema
63059    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
63060    /// AutoML Models always have this field populated by Vertex AI, if no
63061    /// parameters are supported, then it is set to an empty string.
63062    /// Note: The URI given on output will be immutable and probably different,
63063    /// including the URI scheme, than the one given on input. The output URI will
63064    /// point to a location where the user only has a read access.
63065    ///
63066    /// [google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters]: crate::model::BatchPredictionJob::model_parameters
63067    /// [google.cloud.aiplatform.v1.ExplainRequest.parameters]: crate::model::ExplainRequest::parameters
63068    /// [google.cloud.aiplatform.v1.PredictRequest.parameters]: crate::model::PredictRequest::parameters
63069    pub parameters_schema_uri: std::string::String,
63070
63071    /// Immutable. Points to a YAML file stored on Google Cloud Storage describing
63072    /// the format of a single prediction produced by this Model, which are
63073    /// returned via
63074    /// [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions],
63075    /// [ExplainResponse.explanations][google.cloud.aiplatform.v1.ExplainResponse.explanations],
63076    /// and
63077    /// [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config].
63078    /// The schema is defined as an OpenAPI 3.0.2 [Schema
63079    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
63080    /// AutoML Models always have this field populated by Vertex AI.
63081    /// Note: The URI given on output will be immutable and probably different,
63082    /// including the URI scheme, than the one given on input. The output URI will
63083    /// point to a location where the user only has a read access.
63084    ///
63085    /// [google.cloud.aiplatform.v1.BatchPredictionJob.output_config]: crate::model::BatchPredictionJob::output_config
63086    /// [google.cloud.aiplatform.v1.ExplainResponse.explanations]: crate::model::ExplainResponse::explanations
63087    /// [google.cloud.aiplatform.v1.PredictResponse.predictions]: crate::model::PredictResponse::predictions
63088    pub prediction_schema_uri: std::string::String,
63089
63090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
63091}
63092
63093#[cfg(any(
63094    feature = "dataset-service",
63095    feature = "job-service",
63096    feature = "model-garden-service",
63097    feature = "model-service",
63098    feature = "pipeline-service",
63099))]
63100impl PredictSchemata {
63101    pub fn new() -> Self {
63102        std::default::Default::default()
63103    }
63104
63105    /// Sets the value of [instance_schema_uri][crate::model::PredictSchemata::instance_schema_uri].
63106    pub fn set_instance_schema_uri<T: std::convert::Into<std::string::String>>(
63107        mut self,
63108        v: T,
63109    ) -> Self {
63110        self.instance_schema_uri = v.into();
63111        self
63112    }
63113
63114    /// Sets the value of [parameters_schema_uri][crate::model::PredictSchemata::parameters_schema_uri].
63115    pub fn set_parameters_schema_uri<T: std::convert::Into<std::string::String>>(
63116        mut self,
63117        v: T,
63118    ) -> Self {
63119        self.parameters_schema_uri = v.into();
63120        self
63121    }
63122
63123    /// Sets the value of [prediction_schema_uri][crate::model::PredictSchemata::prediction_schema_uri].
63124    pub fn set_prediction_schema_uri<T: std::convert::Into<std::string::String>>(
63125        mut self,
63126        v: T,
63127    ) -> Self {
63128        self.prediction_schema_uri = v.into();
63129        self
63130    }
63131}
63132
63133#[cfg(any(
63134    feature = "dataset-service",
63135    feature = "job-service",
63136    feature = "model-garden-service",
63137    feature = "model-service",
63138    feature = "pipeline-service",
63139))]
63140impl wkt::message::Message for PredictSchemata {
63141    fn typename() -> &'static str {
63142        "type.googleapis.com/google.cloud.aiplatform.v1.PredictSchemata"
63143    }
63144}
63145
63146/// Specification of a container for serving predictions. Some fields in this
63147/// message correspond to fields in the [Kubernetes Container v1 core
63148/// specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
63149#[cfg(any(
63150    feature = "dataset-service",
63151    feature = "job-service",
63152    feature = "model-garden-service",
63153    feature = "model-service",
63154    feature = "pipeline-service",
63155))]
63156#[derive(Clone, Default, PartialEq)]
63157#[non_exhaustive]
63158pub struct ModelContainerSpec {
63159    /// Required. Immutable. URI of the Docker image to be used as the custom
63160    /// container for serving predictions. This URI must identify an image in
63161    /// Artifact Registry or Container Registry. Learn more about the [container
63162    /// publishing
63163    /// requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing),
63164    /// including permissions requirements for the Vertex AI Service Agent.
63165    ///
63166    /// The container image is ingested upon
63167    /// [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel],
63168    /// stored internally, and this original path is afterwards not used.
63169    ///
63170    /// To learn about the requirements for the Docker image itself, see
63171    /// [Custom container
63172    /// requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#).
63173    ///
63174    /// You can use the URI to one of Vertex AI's [pre-built container images for
63175    /// prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers)
63176    /// in this field.
63177    ///
63178    /// [google.cloud.aiplatform.v1.ModelService.UploadModel]: crate::client::ModelService::upload_model
63179    pub image_uri: std::string::String,
63180
63181    /// Immutable. Specifies the command that runs when the container starts. This
63182    /// overrides the container's
63183    /// [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint).
63184    /// Specify this field as an array of executable and arguments, similar to a
63185    /// Docker `ENTRYPOINT`'s "exec" form, not its "shell" form.
63186    ///
63187    /// If you do not specify this field, then the container's `ENTRYPOINT` runs,
63188    /// in conjunction with the
63189    /// [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the
63190    /// container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd),
63191    /// if either exists. If this field is not specified and the container does not
63192    /// have an `ENTRYPOINT`, then refer to the Docker documentation about [how
63193    /// `CMD` and `ENTRYPOINT`
63194    /// interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact).
63195    ///
63196    /// If you specify this field, then you can also specify the `args` field to
63197    /// provide additional arguments for this command. However, if you specify this
63198    /// field, then the container's `CMD` is ignored. See the
63199    /// [Kubernetes documentation about how the
63200    /// `command` and `args` fields interact with a container's `ENTRYPOINT` and
63201    /// `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes).
63202    ///
63203    /// In this field, you can reference [environment variables set by Vertex
63204    /// AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables)
63205    /// and environment variables set in the
63206    /// [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field. You cannot
63207    /// reference environment variables set in the Docker image. In order for
63208    /// environment variables to be expanded, reference them by using the following
63209    /// syntax: \<code\>$(\<var\>VARIABLE_NAME\</var\>)\</code\> Note that this differs
63210    /// from Bash variable expansion, which does not use parentheses. If a variable
63211    /// cannot be resolved, the reference in the input string is used unchanged. To
63212    /// avoid variable expansion, you can escape this syntax with `$$`; for
63213    /// example: \<code\>$$(\<var\>VARIABLE_NAME\</var\>)\</code\> This field corresponds
63214    /// to the `command` field of the Kubernetes Containers [v1 core
63215    /// API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
63216    ///
63217    /// [google.cloud.aiplatform.v1.ModelContainerSpec.args]: crate::model::ModelContainerSpec::args
63218    /// [google.cloud.aiplatform.v1.ModelContainerSpec.env]: crate::model::ModelContainerSpec::env
63219    pub command: std::vec::Vec<std::string::String>,
63220
63221    /// Immutable. Specifies arguments for the command that runs when the container
63222    /// starts. This overrides the container's
63223    /// [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify
63224    /// this field as an array of executable and arguments, similar to a Docker
63225    /// `CMD`'s "default parameters" form.
63226    ///
63227    /// If you don't specify this field but do specify the
63228    /// [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field,
63229    /// then the command from the `command` field runs without any additional
63230    /// arguments. See the [Kubernetes documentation about how the `command` and
63231    /// `args` fields interact with a container's `ENTRYPOINT` and
63232    /// `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes).
63233    ///
63234    /// If you don't specify this field and don't specify the `command` field,
63235    /// then the container's
63236    /// [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and
63237    /// `CMD` determine what runs based on their default behavior. See the Docker
63238    /// documentation about [how `CMD` and `ENTRYPOINT`
63239    /// interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact).
63240    ///
63241    /// In this field, you can reference [environment variables
63242    /// set by Vertex
63243    /// AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables)
63244    /// and environment variables set in the
63245    /// [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field. You cannot
63246    /// reference environment variables set in the Docker image. In order for
63247    /// environment variables to be expanded, reference them by using the following
63248    /// syntax: \<code\>$(\<var\>VARIABLE_NAME\</var\>)\</code\> Note that this differs
63249    /// from Bash variable expansion, which does not use parentheses. If a variable
63250    /// cannot be resolved, the reference in the input string is used unchanged. To
63251    /// avoid variable expansion, you can escape this syntax with `$$`; for
63252    /// example: \<code\>$$(\<var\>VARIABLE_NAME\</var\>)\</code\> This field corresponds
63253    /// to the `args` field of the Kubernetes Containers [v1 core
63254    /// API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
63255    ///
63256    /// [google.cloud.aiplatform.v1.ModelContainerSpec.command]: crate::model::ModelContainerSpec::command
63257    /// [google.cloud.aiplatform.v1.ModelContainerSpec.env]: crate::model::ModelContainerSpec::env
63258    pub args: std::vec::Vec<std::string::String>,
63259
63260    /// Immutable. List of environment variables to set in the container. After the
63261    /// container starts running, code running in the container can read these
63262    /// environment variables.
63263    ///
63264    /// Additionally, the
63265    /// [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and
63266    /// [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can
63267    /// reference these variables. Later entries in this list can also reference
63268    /// earlier entries. For example, the following example sets the variable
63269    /// `VAR_2` to have the value `foo bar`:
63270    ///
63271    /// ```norust
63272    /// [
63273    ///   {
63274    ///     "name": "VAR_1",
63275    ///     "value": "foo"
63276    ///   },
63277    ///   {
63278    ///     "name": "VAR_2",
63279    ///     "value": "$(VAR_1) bar"
63280    ///   }
63281    /// ]
63282    /// ```
63283    ///
63284    /// If you switch the order of the variables in the example, then the expansion
63285    /// does not occur.
63286    ///
63287    /// This field corresponds to the `env` field of the Kubernetes Containers
63288    /// [v1 core
63289    /// API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
63290    ///
63291    /// [google.cloud.aiplatform.v1.ModelContainerSpec.args]: crate::model::ModelContainerSpec::args
63292    /// [google.cloud.aiplatform.v1.ModelContainerSpec.command]: crate::model::ModelContainerSpec::command
63293    pub env: std::vec::Vec<crate::model::EnvVar>,
63294
63295    /// Immutable. List of ports to expose from the container. Vertex AI sends any
63296    /// prediction requests that it receives to the first port on this list. Vertex
63297    /// AI also sends
63298    /// [liveness and health
63299    /// checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness)
63300    /// to this port.
63301    ///
63302    /// If you do not specify this field, it defaults to following value:
63303    ///
63304    /// ```norust
63305    /// [
63306    ///   {
63307    ///     "containerPort": 8080
63308    ///   }
63309    /// ]
63310    /// ```
63311    ///
63312    /// Vertex AI does not use ports other than the first one listed. This field
63313    /// corresponds to the `ports` field of the Kubernetes Containers
63314    /// [v1 core
63315    /// API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
63316    pub ports: std::vec::Vec<crate::model::Port>,
63317
63318    /// Immutable. HTTP path on the container to send prediction requests to.
63319    /// Vertex AI forwards requests sent using
63320    /// [projects.locations.endpoints.predict][google.cloud.aiplatform.v1.PredictionService.Predict]
63321    /// to this path on the container's IP address and port. Vertex AI then returns
63322    /// the container's response in the API response.
63323    ///
63324    /// For example, if you set this field to `/foo`, then when Vertex AI
63325    /// receives a prediction request, it forwards the request body in a POST
63326    /// request to the `/foo` path on the port of your container specified by the
63327    /// first value of this `ModelContainerSpec`'s
63328    /// [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
63329    ///
63330    /// If you don't specify this field, it defaults to the following value when
63331    /// you [deploy this Model to an
63332    /// Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
63333    /// \<code\>/v1/endpoints/\<var\>ENDPOINT\</var\>/deployedModels/\<var\>DEPLOYED_MODEL\</var\>:predict\</code\>
63334    /// The placeholders in this value are replaced as follows:
63335    ///
63336    /// * \<var\>ENDPOINT\</var\>: The last segment (following `endpoints/`)of the
63337    ///   Endpoint.name][] field of the Endpoint where this Model has been
63338    ///   deployed. (Vertex AI makes this value available to your container code
63339    ///   as the [`AIP_ENDPOINT_ID` environment
63340    ///   variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)
63341    ///
63342    /// * \<var\>DEPLOYED_MODEL\</var\>:
63343    ///   [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the
63344    ///   `DeployedModel`.
63345    ///   (Vertex AI makes this value available to your container code
63346    ///   as the [`AIP_DEPLOYED_MODEL_ID` environment
63347    ///   variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)
63348    ///
63349    ///
63350    /// [google.cloud.aiplatform.v1.DeployedModel.id]: crate::model::DeployedModel::id
63351    /// [google.cloud.aiplatform.v1.EndpointService.DeployModel]: crate::client::EndpointService::deploy_model
63352    /// [google.cloud.aiplatform.v1.ModelContainerSpec.ports]: crate::model::ModelContainerSpec::ports
63353    /// [google.cloud.aiplatform.v1.PredictionService.Predict]: crate::client::PredictionService::predict
63354    pub predict_route: std::string::String,
63355
63356    /// Immutable. HTTP path on the container to send health checks to. Vertex AI
63357    /// intermittently sends GET requests to this path on the container's IP
63358    /// address and port to check that the container is healthy. Read more about
63359    /// [health
63360    /// checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health).
63361    ///
63362    /// For example, if you set this field to `/bar`, then Vertex AI
63363    /// intermittently sends a GET request to the `/bar` path on the port of your
63364    /// container specified by the first value of this `ModelContainerSpec`'s
63365    /// [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field.
63366    ///
63367    /// If you don't specify this field, it defaults to the following value when
63368    /// you [deploy this Model to an
63369    /// Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]:
63370    /// \<code\>/v1/endpoints/\<var\>ENDPOINT\</var\>/deployedModels/\<var\>DEPLOYED_MODEL\</var\>:predict\</code\>
63371    /// The placeholders in this value are replaced as follows:
63372    ///
63373    /// * \<var\>ENDPOINT\</var\>: The last segment (following `endpoints/`)of the
63374    ///   Endpoint.name][] field of the Endpoint where this Model has been
63375    ///   deployed. (Vertex AI makes this value available to your container code
63376    ///   as the [`AIP_ENDPOINT_ID` environment
63377    ///   variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)
63378    ///
63379    /// * \<var\>DEPLOYED_MODEL\</var\>:
63380    ///   [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the
63381    ///   `DeployedModel`.
63382    ///   (Vertex AI makes this value available to your container code as the
63383    ///   [`AIP_DEPLOYED_MODEL_ID` environment
63384    ///   variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)
63385    ///
63386    ///
63387    /// [google.cloud.aiplatform.v1.DeployedModel.id]: crate::model::DeployedModel::id
63388    /// [google.cloud.aiplatform.v1.EndpointService.DeployModel]: crate::client::EndpointService::deploy_model
63389    /// [google.cloud.aiplatform.v1.ModelContainerSpec.ports]: crate::model::ModelContainerSpec::ports
63390    pub health_route: std::string::String,
63391
63392    /// Immutable. Invoke route prefix for the custom container. "/*" is the only
63393    /// supported value right now. By setting this field, any non-root route on
63394    /// this model will be accessible with invoke http call eg: "/invoke/foo/bar",
63395    /// however the [PredictionService.Invoke] RPC is not supported yet.
63396    ///
63397    /// Only one of `predict_route` or `invoke_route_prefix` can be set, and we
63398    /// default to using `predict_route` if this field is not set. If this field
63399    /// is set, the Model can only be deployed to dedicated endpoint.
63400    pub invoke_route_prefix: std::string::String,
63401
63402    /// Immutable. List of ports to expose from the container. Vertex AI sends gRPC
63403    /// prediction requests that it receives to the first port on this list. Vertex
63404    /// AI also sends liveness and health checks to this port.
63405    ///
63406    /// If you do not specify this field, gRPC requests to the container will be
63407    /// disabled.
63408    ///
63409    /// Vertex AI does not use ports other than the first one listed. This field
63410    /// corresponds to the `ports` field of the Kubernetes Containers v1 core API.
63411    pub grpc_ports: std::vec::Vec<crate::model::Port>,
63412
63413    /// Immutable. Deployment timeout.
63414    /// Limit for deployment timeout is 2 hours.
63415    pub deployment_timeout: std::option::Option<wkt::Duration>,
63416
63417    /// Immutable. The amount of the VM memory to reserve as the shared memory for
63418    /// the model in megabytes.
63419    pub shared_memory_size_mb: i64,
63420
63421    /// Immutable. Specification for Kubernetes startup probe.
63422    pub startup_probe: std::option::Option<crate::model::Probe>,
63423
63424    /// Immutable. Specification for Kubernetes readiness probe.
63425    pub health_probe: std::option::Option<crate::model::Probe>,
63426
63427    /// Immutable. Specification for Kubernetes liveness probe.
63428    pub liveness_probe: std::option::Option<crate::model::Probe>,
63429
63430    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
63431}
63432
63433#[cfg(any(
63434    feature = "dataset-service",
63435    feature = "job-service",
63436    feature = "model-garden-service",
63437    feature = "model-service",
63438    feature = "pipeline-service",
63439))]
63440impl ModelContainerSpec {
63441    pub fn new() -> Self {
63442        std::default::Default::default()
63443    }
63444
63445    /// Sets the value of [image_uri][crate::model::ModelContainerSpec::image_uri].
63446    pub fn set_image_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
63447        self.image_uri = v.into();
63448        self
63449    }
63450
63451    /// Sets the value of [command][crate::model::ModelContainerSpec::command].
63452    pub fn set_command<T, V>(mut self, v: T) -> Self
63453    where
63454        T: std::iter::IntoIterator<Item = V>,
63455        V: std::convert::Into<std::string::String>,
63456    {
63457        use std::iter::Iterator;
63458        self.command = v.into_iter().map(|i| i.into()).collect();
63459        self
63460    }
63461
63462    /// Sets the value of [args][crate::model::ModelContainerSpec::args].
63463    pub fn set_args<T, V>(mut self, v: T) -> Self
63464    where
63465        T: std::iter::IntoIterator<Item = V>,
63466        V: std::convert::Into<std::string::String>,
63467    {
63468        use std::iter::Iterator;
63469        self.args = v.into_iter().map(|i| i.into()).collect();
63470        self
63471    }
63472
63473    /// Sets the value of [env][crate::model::ModelContainerSpec::env].
63474    pub fn set_env<T, V>(mut self, v: T) -> Self
63475    where
63476        T: std::iter::IntoIterator<Item = V>,
63477        V: std::convert::Into<crate::model::EnvVar>,
63478    {
63479        use std::iter::Iterator;
63480        self.env = v.into_iter().map(|i| i.into()).collect();
63481        self
63482    }
63483
63484    /// Sets the value of [ports][crate::model::ModelContainerSpec::ports].
63485    pub fn set_ports<T, V>(mut self, v: T) -> Self
63486    where
63487        T: std::iter::IntoIterator<Item = V>,
63488        V: std::convert::Into<crate::model::Port>,
63489    {
63490        use std::iter::Iterator;
63491        self.ports = v.into_iter().map(|i| i.into()).collect();
63492        self
63493    }
63494
63495    /// Sets the value of [predict_route][crate::model::ModelContainerSpec::predict_route].
63496    pub fn set_predict_route<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
63497        self.predict_route = v.into();
63498        self
63499    }
63500
63501    /// Sets the value of [health_route][crate::model::ModelContainerSpec::health_route].
63502    pub fn set_health_route<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
63503        self.health_route = v.into();
63504        self
63505    }
63506
63507    /// Sets the value of [invoke_route_prefix][crate::model::ModelContainerSpec::invoke_route_prefix].
63508    pub fn set_invoke_route_prefix<T: std::convert::Into<std::string::String>>(
63509        mut self,
63510        v: T,
63511    ) -> Self {
63512        self.invoke_route_prefix = v.into();
63513        self
63514    }
63515
63516    /// Sets the value of [grpc_ports][crate::model::ModelContainerSpec::grpc_ports].
63517    pub fn set_grpc_ports<T, V>(mut self, v: T) -> Self
63518    where
63519        T: std::iter::IntoIterator<Item = V>,
63520        V: std::convert::Into<crate::model::Port>,
63521    {
63522        use std::iter::Iterator;
63523        self.grpc_ports = v.into_iter().map(|i| i.into()).collect();
63524        self
63525    }
63526
63527    /// Sets the value of [deployment_timeout][crate::model::ModelContainerSpec::deployment_timeout].
63528    pub fn set_deployment_timeout<T>(mut self, v: T) -> Self
63529    where
63530        T: std::convert::Into<wkt::Duration>,
63531    {
63532        self.deployment_timeout = std::option::Option::Some(v.into());
63533        self
63534    }
63535
63536    /// Sets or clears the value of [deployment_timeout][crate::model::ModelContainerSpec::deployment_timeout].
63537    pub fn set_or_clear_deployment_timeout<T>(mut self, v: std::option::Option<T>) -> Self
63538    where
63539        T: std::convert::Into<wkt::Duration>,
63540    {
63541        self.deployment_timeout = v.map(|x| x.into());
63542        self
63543    }
63544
63545    /// Sets the value of [shared_memory_size_mb][crate::model::ModelContainerSpec::shared_memory_size_mb].
63546    pub fn set_shared_memory_size_mb<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
63547        self.shared_memory_size_mb = v.into();
63548        self
63549    }
63550
63551    /// Sets the value of [startup_probe][crate::model::ModelContainerSpec::startup_probe].
63552    pub fn set_startup_probe<T>(mut self, v: T) -> Self
63553    where
63554        T: std::convert::Into<crate::model::Probe>,
63555    {
63556        self.startup_probe = std::option::Option::Some(v.into());
63557        self
63558    }
63559
63560    /// Sets or clears the value of [startup_probe][crate::model::ModelContainerSpec::startup_probe].
63561    pub fn set_or_clear_startup_probe<T>(mut self, v: std::option::Option<T>) -> Self
63562    where
63563        T: std::convert::Into<crate::model::Probe>,
63564    {
63565        self.startup_probe = v.map(|x| x.into());
63566        self
63567    }
63568
63569    /// Sets the value of [health_probe][crate::model::ModelContainerSpec::health_probe].
63570    pub fn set_health_probe<T>(mut self, v: T) -> Self
63571    where
63572        T: std::convert::Into<crate::model::Probe>,
63573    {
63574        self.health_probe = std::option::Option::Some(v.into());
63575        self
63576    }
63577
63578    /// Sets or clears the value of [health_probe][crate::model::ModelContainerSpec::health_probe].
63579    pub fn set_or_clear_health_probe<T>(mut self, v: std::option::Option<T>) -> Self
63580    where
63581        T: std::convert::Into<crate::model::Probe>,
63582    {
63583        self.health_probe = v.map(|x| x.into());
63584        self
63585    }
63586
63587    /// Sets the value of [liveness_probe][crate::model::ModelContainerSpec::liveness_probe].
63588    pub fn set_liveness_probe<T>(mut self, v: T) -> Self
63589    where
63590        T: std::convert::Into<crate::model::Probe>,
63591    {
63592        self.liveness_probe = std::option::Option::Some(v.into());
63593        self
63594    }
63595
63596    /// Sets or clears the value of [liveness_probe][crate::model::ModelContainerSpec::liveness_probe].
63597    pub fn set_or_clear_liveness_probe<T>(mut self, v: std::option::Option<T>) -> Self
63598    where
63599        T: std::convert::Into<crate::model::Probe>,
63600    {
63601        self.liveness_probe = v.map(|x| x.into());
63602        self
63603    }
63604}
63605
63606#[cfg(any(
63607    feature = "dataset-service",
63608    feature = "job-service",
63609    feature = "model-garden-service",
63610    feature = "model-service",
63611    feature = "pipeline-service",
63612))]
63613impl wkt::message::Message for ModelContainerSpec {
63614    fn typename() -> &'static str {
63615        "type.googleapis.com/google.cloud.aiplatform.v1.ModelContainerSpec"
63616    }
63617}
63618
63619/// Represents a network port in a container.
63620#[cfg(any(
63621    feature = "dataset-service",
63622    feature = "job-service",
63623    feature = "model-garden-service",
63624    feature = "model-service",
63625    feature = "pipeline-service",
63626))]
63627#[derive(Clone, Default, PartialEq)]
63628#[non_exhaustive]
63629pub struct Port {
63630    /// The number of the port to expose on the pod's IP address.
63631    /// Must be a valid port number, between 1 and 65535 inclusive.
63632    pub container_port: i32,
63633
63634    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
63635}
63636
63637#[cfg(any(
63638    feature = "dataset-service",
63639    feature = "job-service",
63640    feature = "model-garden-service",
63641    feature = "model-service",
63642    feature = "pipeline-service",
63643))]
63644impl Port {
63645    pub fn new() -> Self {
63646        std::default::Default::default()
63647    }
63648
63649    /// Sets the value of [container_port][crate::model::Port::container_port].
63650    pub fn set_container_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
63651        self.container_port = v.into();
63652        self
63653    }
63654}
63655
63656#[cfg(any(
63657    feature = "dataset-service",
63658    feature = "job-service",
63659    feature = "model-garden-service",
63660    feature = "model-service",
63661    feature = "pipeline-service",
63662))]
63663impl wkt::message::Message for Port {
63664    fn typename() -> &'static str {
63665        "type.googleapis.com/google.cloud.aiplatform.v1.Port"
63666    }
63667}
63668
63669/// Detail description of the source information of the model.
63670#[cfg(any(
63671    feature = "dataset-service",
63672    feature = "model-service",
63673    feature = "pipeline-service",
63674))]
63675#[derive(Clone, Default, PartialEq)]
63676#[non_exhaustive]
63677pub struct ModelSourceInfo {
63678    /// Type of the model source.
63679    pub source_type: crate::model::model_source_info::ModelSourceType,
63680
63681    /// If this Model is copy of another Model. If true then
63682    /// [source_type][google.cloud.aiplatform.v1.ModelSourceInfo.source_type]
63683    /// pertains to the original.
63684    ///
63685    /// [google.cloud.aiplatform.v1.ModelSourceInfo.source_type]: crate::model::ModelSourceInfo::source_type
63686    pub copy: bool,
63687
63688    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
63689}
63690
63691#[cfg(any(
63692    feature = "dataset-service",
63693    feature = "model-service",
63694    feature = "pipeline-service",
63695))]
63696impl ModelSourceInfo {
63697    pub fn new() -> Self {
63698        std::default::Default::default()
63699    }
63700
63701    /// Sets the value of [source_type][crate::model::ModelSourceInfo::source_type].
63702    pub fn set_source_type<
63703        T: std::convert::Into<crate::model::model_source_info::ModelSourceType>,
63704    >(
63705        mut self,
63706        v: T,
63707    ) -> Self {
63708        self.source_type = v.into();
63709        self
63710    }
63711
63712    /// Sets the value of [copy][crate::model::ModelSourceInfo::copy].
63713    pub fn set_copy<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
63714        self.copy = v.into();
63715        self
63716    }
63717}
63718
63719#[cfg(any(
63720    feature = "dataset-service",
63721    feature = "model-service",
63722    feature = "pipeline-service",
63723))]
63724impl wkt::message::Message for ModelSourceInfo {
63725    fn typename() -> &'static str {
63726        "type.googleapis.com/google.cloud.aiplatform.v1.ModelSourceInfo"
63727    }
63728}
63729
63730/// Defines additional types related to [ModelSourceInfo].
63731#[cfg(any(
63732    feature = "dataset-service",
63733    feature = "model-service",
63734    feature = "pipeline-service",
63735))]
63736pub mod model_source_info {
63737    #[allow(unused_imports)]
63738    use super::*;
63739
63740    /// Source of the model.
63741    /// Different from `objective` field, this `ModelSourceType` enum
63742    /// indicates the source from which the model was accessed or obtained,
63743    /// whereas the `objective` indicates the overall aim or function of this
63744    /// model.
63745    ///
63746    /// # Working with unknown values
63747    ///
63748    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
63749    /// additional enum variants at any time. Adding new variants is not considered
63750    /// a breaking change. Applications should write their code in anticipation of:
63751    ///
63752    /// - New values appearing in future releases of the client library, **and**
63753    /// - New values received dynamically, without application changes.
63754    ///
63755    /// Please consult the [Working with enums] section in the user guide for some
63756    /// guidelines.
63757    ///
63758    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
63759    #[cfg(any(
63760        feature = "dataset-service",
63761        feature = "model-service",
63762        feature = "pipeline-service",
63763    ))]
63764    #[derive(Clone, Debug, PartialEq)]
63765    #[non_exhaustive]
63766    pub enum ModelSourceType {
63767        /// Should not be used.
63768        Unspecified,
63769        /// The Model is uploaded by automl training pipeline.
63770        Automl,
63771        /// The Model is uploaded by user or custom training pipeline.
63772        Custom,
63773        /// The Model is registered and sync'ed from BigQuery ML.
63774        Bqml,
63775        /// The Model is saved or tuned from Model Garden.
63776        ModelGarden,
63777        /// The Model is saved or tuned from Genie.
63778        Genie,
63779        /// The Model is uploaded by text embedding finetuning pipeline.
63780        CustomTextEmbedding,
63781        /// The Model is saved or tuned from Marketplace.
63782        Marketplace,
63783        /// If set, the enum was initialized with an unknown value.
63784        ///
63785        /// Applications can examine the value using [ModelSourceType::value] or
63786        /// [ModelSourceType::name].
63787        UnknownValue(model_source_type::UnknownValue),
63788    }
63789
63790    #[doc(hidden)]
63791    #[cfg(any(
63792        feature = "dataset-service",
63793        feature = "model-service",
63794        feature = "pipeline-service",
63795    ))]
63796    pub mod model_source_type {
63797        #[allow(unused_imports)]
63798        use super::*;
63799        #[derive(Clone, Debug, PartialEq)]
63800        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
63801    }
63802
63803    #[cfg(any(
63804        feature = "dataset-service",
63805        feature = "model-service",
63806        feature = "pipeline-service",
63807    ))]
63808    impl ModelSourceType {
63809        /// Gets the enum value.
63810        ///
63811        /// Returns `None` if the enum contains an unknown value deserialized from
63812        /// the string representation of enums.
63813        pub fn value(&self) -> std::option::Option<i32> {
63814            match self {
63815                Self::Unspecified => std::option::Option::Some(0),
63816                Self::Automl => std::option::Option::Some(1),
63817                Self::Custom => std::option::Option::Some(2),
63818                Self::Bqml => std::option::Option::Some(3),
63819                Self::ModelGarden => std::option::Option::Some(4),
63820                Self::Genie => std::option::Option::Some(5),
63821                Self::CustomTextEmbedding => std::option::Option::Some(6),
63822                Self::Marketplace => std::option::Option::Some(7),
63823                Self::UnknownValue(u) => u.0.value(),
63824            }
63825        }
63826
63827        /// Gets the enum value as a string.
63828        ///
63829        /// Returns `None` if the enum contains an unknown value deserialized from
63830        /// the integer representation of enums.
63831        pub fn name(&self) -> std::option::Option<&str> {
63832            match self {
63833                Self::Unspecified => std::option::Option::Some("MODEL_SOURCE_TYPE_UNSPECIFIED"),
63834                Self::Automl => std::option::Option::Some("AUTOML"),
63835                Self::Custom => std::option::Option::Some("CUSTOM"),
63836                Self::Bqml => std::option::Option::Some("BQML"),
63837                Self::ModelGarden => std::option::Option::Some("MODEL_GARDEN"),
63838                Self::Genie => std::option::Option::Some("GENIE"),
63839                Self::CustomTextEmbedding => std::option::Option::Some("CUSTOM_TEXT_EMBEDDING"),
63840                Self::Marketplace => std::option::Option::Some("MARKETPLACE"),
63841                Self::UnknownValue(u) => u.0.name(),
63842            }
63843        }
63844    }
63845
63846    #[cfg(any(
63847        feature = "dataset-service",
63848        feature = "model-service",
63849        feature = "pipeline-service",
63850    ))]
63851    impl std::default::Default for ModelSourceType {
63852        fn default() -> Self {
63853            use std::convert::From;
63854            Self::from(0)
63855        }
63856    }
63857
63858    #[cfg(any(
63859        feature = "dataset-service",
63860        feature = "model-service",
63861        feature = "pipeline-service",
63862    ))]
63863    impl std::fmt::Display for ModelSourceType {
63864        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
63865            wkt::internal::display_enum(f, self.name(), self.value())
63866        }
63867    }
63868
63869    #[cfg(any(
63870        feature = "dataset-service",
63871        feature = "model-service",
63872        feature = "pipeline-service",
63873    ))]
63874    impl std::convert::From<i32> for ModelSourceType {
63875        fn from(value: i32) -> Self {
63876            match value {
63877                0 => Self::Unspecified,
63878                1 => Self::Automl,
63879                2 => Self::Custom,
63880                3 => Self::Bqml,
63881                4 => Self::ModelGarden,
63882                5 => Self::Genie,
63883                6 => Self::CustomTextEmbedding,
63884                7 => Self::Marketplace,
63885                _ => Self::UnknownValue(model_source_type::UnknownValue(
63886                    wkt::internal::UnknownEnumValue::Integer(value),
63887                )),
63888            }
63889        }
63890    }
63891
63892    #[cfg(any(
63893        feature = "dataset-service",
63894        feature = "model-service",
63895        feature = "pipeline-service",
63896    ))]
63897    impl std::convert::From<&str> for ModelSourceType {
63898        fn from(value: &str) -> Self {
63899            use std::string::ToString;
63900            match value {
63901                "MODEL_SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
63902                "AUTOML" => Self::Automl,
63903                "CUSTOM" => Self::Custom,
63904                "BQML" => Self::Bqml,
63905                "MODEL_GARDEN" => Self::ModelGarden,
63906                "GENIE" => Self::Genie,
63907                "CUSTOM_TEXT_EMBEDDING" => Self::CustomTextEmbedding,
63908                "MARKETPLACE" => Self::Marketplace,
63909                _ => Self::UnknownValue(model_source_type::UnknownValue(
63910                    wkt::internal::UnknownEnumValue::String(value.to_string()),
63911                )),
63912            }
63913        }
63914    }
63915
63916    #[cfg(any(
63917        feature = "dataset-service",
63918        feature = "model-service",
63919        feature = "pipeline-service",
63920    ))]
63921    impl serde::ser::Serialize for ModelSourceType {
63922        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
63923        where
63924            S: serde::Serializer,
63925        {
63926            match self {
63927                Self::Unspecified => serializer.serialize_i32(0),
63928                Self::Automl => serializer.serialize_i32(1),
63929                Self::Custom => serializer.serialize_i32(2),
63930                Self::Bqml => serializer.serialize_i32(3),
63931                Self::ModelGarden => serializer.serialize_i32(4),
63932                Self::Genie => serializer.serialize_i32(5),
63933                Self::CustomTextEmbedding => serializer.serialize_i32(6),
63934                Self::Marketplace => serializer.serialize_i32(7),
63935                Self::UnknownValue(u) => u.0.serialize(serializer),
63936            }
63937        }
63938    }
63939
63940    #[cfg(any(
63941        feature = "dataset-service",
63942        feature = "model-service",
63943        feature = "pipeline-service",
63944    ))]
63945    impl<'de> serde::de::Deserialize<'de> for ModelSourceType {
63946        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
63947        where
63948            D: serde::Deserializer<'de>,
63949        {
63950            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ModelSourceType>::new(
63951                ".google.cloud.aiplatform.v1.ModelSourceInfo.ModelSourceType",
63952            ))
63953        }
63954    }
63955}
63956
63957/// Probe describes a health check to be performed against a container to
63958/// determine whether it is alive or ready to receive traffic.
63959#[cfg(any(
63960    feature = "dataset-service",
63961    feature = "job-service",
63962    feature = "model-garden-service",
63963    feature = "model-service",
63964    feature = "pipeline-service",
63965))]
63966#[derive(Clone, Default, PartialEq)]
63967#[non_exhaustive]
63968pub struct Probe {
63969    /// How often (in seconds) to perform the probe. Default to 10 seconds.
63970    /// Minimum value is 1. Must be less than timeout_seconds.
63971    ///
63972    /// Maps to Kubernetes probe argument 'periodSeconds'.
63973    pub period_seconds: i32,
63974
63975    /// Number of seconds after which the probe times out. Defaults to 1 second.
63976    /// Minimum value is 1. Must be greater or equal to period_seconds.
63977    ///
63978    /// Maps to Kubernetes probe argument 'timeoutSeconds'.
63979    pub timeout_seconds: i32,
63980
63981    /// Number of consecutive failures before the probe is considered failed.
63982    /// Defaults to 3. Minimum value is 1.
63983    ///
63984    /// Maps to Kubernetes probe argument 'failureThreshold'.
63985    pub failure_threshold: i32,
63986
63987    /// Number of consecutive successes before the probe is considered successful.
63988    /// Defaults to 1. Minimum value is 1.
63989    ///
63990    /// Maps to Kubernetes probe argument 'successThreshold'.
63991    pub success_threshold: i32,
63992
63993    /// Number of seconds to wait before starting the probe. Defaults to 0.
63994    /// Minimum value is 0.
63995    ///
63996    /// Maps to Kubernetes probe argument 'initialDelaySeconds'.
63997    pub initial_delay_seconds: i32,
63998
63999    pub probe_type: std::option::Option<crate::model::probe::ProbeType>,
64000
64001    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
64002}
64003
64004#[cfg(any(
64005    feature = "dataset-service",
64006    feature = "job-service",
64007    feature = "model-garden-service",
64008    feature = "model-service",
64009    feature = "pipeline-service",
64010))]
64011impl Probe {
64012    pub fn new() -> Self {
64013        std::default::Default::default()
64014    }
64015
64016    /// Sets the value of [period_seconds][crate::model::Probe::period_seconds].
64017    pub fn set_period_seconds<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
64018        self.period_seconds = v.into();
64019        self
64020    }
64021
64022    /// Sets the value of [timeout_seconds][crate::model::Probe::timeout_seconds].
64023    pub fn set_timeout_seconds<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
64024        self.timeout_seconds = v.into();
64025        self
64026    }
64027
64028    /// Sets the value of [failure_threshold][crate::model::Probe::failure_threshold].
64029    pub fn set_failure_threshold<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
64030        self.failure_threshold = v.into();
64031        self
64032    }
64033
64034    /// Sets the value of [success_threshold][crate::model::Probe::success_threshold].
64035    pub fn set_success_threshold<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
64036        self.success_threshold = v.into();
64037        self
64038    }
64039
64040    /// Sets the value of [initial_delay_seconds][crate::model::Probe::initial_delay_seconds].
64041    pub fn set_initial_delay_seconds<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
64042        self.initial_delay_seconds = v.into();
64043        self
64044    }
64045
64046    /// Sets the value of [probe_type][crate::model::Probe::probe_type].
64047    ///
64048    /// Note that all the setters affecting `probe_type` are mutually
64049    /// exclusive.
64050    pub fn set_probe_type<
64051        T: std::convert::Into<std::option::Option<crate::model::probe::ProbeType>>,
64052    >(
64053        mut self,
64054        v: T,
64055    ) -> Self {
64056        self.probe_type = v.into();
64057        self
64058    }
64059
64060    /// The value of [probe_type][crate::model::Probe::probe_type]
64061    /// if it holds a `Exec`, `None` if the field is not set or
64062    /// holds a different branch.
64063    pub fn exec(&self) -> std::option::Option<&std::boxed::Box<crate::model::probe::ExecAction>> {
64064        #[allow(unreachable_patterns)]
64065        self.probe_type.as_ref().and_then(|v| match v {
64066            crate::model::probe::ProbeType::Exec(v) => std::option::Option::Some(v),
64067            _ => std::option::Option::None,
64068        })
64069    }
64070
64071    /// Sets the value of [probe_type][crate::model::Probe::probe_type]
64072    /// to hold a `Exec`.
64073    ///
64074    /// Note that all the setters affecting `probe_type` are
64075    /// mutually exclusive.
64076    pub fn set_exec<T: std::convert::Into<std::boxed::Box<crate::model::probe::ExecAction>>>(
64077        mut self,
64078        v: T,
64079    ) -> Self {
64080        self.probe_type = std::option::Option::Some(crate::model::probe::ProbeType::Exec(v.into()));
64081        self
64082    }
64083
64084    /// The value of [probe_type][crate::model::Probe::probe_type]
64085    /// if it holds a `HttpGet`, `None` if the field is not set or
64086    /// holds a different branch.
64087    pub fn http_get(
64088        &self,
64089    ) -> std::option::Option<&std::boxed::Box<crate::model::probe::HttpGetAction>> {
64090        #[allow(unreachable_patterns)]
64091        self.probe_type.as_ref().and_then(|v| match v {
64092            crate::model::probe::ProbeType::HttpGet(v) => std::option::Option::Some(v),
64093            _ => std::option::Option::None,
64094        })
64095    }
64096
64097    /// Sets the value of [probe_type][crate::model::Probe::probe_type]
64098    /// to hold a `HttpGet`.
64099    ///
64100    /// Note that all the setters affecting `probe_type` are
64101    /// mutually exclusive.
64102    pub fn set_http_get<
64103        T: std::convert::Into<std::boxed::Box<crate::model::probe::HttpGetAction>>,
64104    >(
64105        mut self,
64106        v: T,
64107    ) -> Self {
64108        self.probe_type =
64109            std::option::Option::Some(crate::model::probe::ProbeType::HttpGet(v.into()));
64110        self
64111    }
64112
64113    /// The value of [probe_type][crate::model::Probe::probe_type]
64114    /// if it holds a `Grpc`, `None` if the field is not set or
64115    /// holds a different branch.
64116    pub fn grpc(&self) -> std::option::Option<&std::boxed::Box<crate::model::probe::GrpcAction>> {
64117        #[allow(unreachable_patterns)]
64118        self.probe_type.as_ref().and_then(|v| match v {
64119            crate::model::probe::ProbeType::Grpc(v) => std::option::Option::Some(v),
64120            _ => std::option::Option::None,
64121        })
64122    }
64123
64124    /// Sets the value of [probe_type][crate::model::Probe::probe_type]
64125    /// to hold a `Grpc`.
64126    ///
64127    /// Note that all the setters affecting `probe_type` are
64128    /// mutually exclusive.
64129    pub fn set_grpc<T: std::convert::Into<std::boxed::Box<crate::model::probe::GrpcAction>>>(
64130        mut self,
64131        v: T,
64132    ) -> Self {
64133        self.probe_type = std::option::Option::Some(crate::model::probe::ProbeType::Grpc(v.into()));
64134        self
64135    }
64136
64137    /// The value of [probe_type][crate::model::Probe::probe_type]
64138    /// if it holds a `TcpSocket`, `None` if the field is not set or
64139    /// holds a different branch.
64140    pub fn tcp_socket(
64141        &self,
64142    ) -> std::option::Option<&std::boxed::Box<crate::model::probe::TcpSocketAction>> {
64143        #[allow(unreachable_patterns)]
64144        self.probe_type.as_ref().and_then(|v| match v {
64145            crate::model::probe::ProbeType::TcpSocket(v) => std::option::Option::Some(v),
64146            _ => std::option::Option::None,
64147        })
64148    }
64149
64150    /// Sets the value of [probe_type][crate::model::Probe::probe_type]
64151    /// to hold a `TcpSocket`.
64152    ///
64153    /// Note that all the setters affecting `probe_type` are
64154    /// mutually exclusive.
64155    pub fn set_tcp_socket<
64156        T: std::convert::Into<std::boxed::Box<crate::model::probe::TcpSocketAction>>,
64157    >(
64158        mut self,
64159        v: T,
64160    ) -> Self {
64161        self.probe_type =
64162            std::option::Option::Some(crate::model::probe::ProbeType::TcpSocket(v.into()));
64163        self
64164    }
64165}
64166
64167#[cfg(any(
64168    feature = "dataset-service",
64169    feature = "job-service",
64170    feature = "model-garden-service",
64171    feature = "model-service",
64172    feature = "pipeline-service",
64173))]
64174impl wkt::message::Message for Probe {
64175    fn typename() -> &'static str {
64176        "type.googleapis.com/google.cloud.aiplatform.v1.Probe"
64177    }
64178}
64179
64180/// Defines additional types related to [Probe].
64181#[cfg(any(
64182    feature = "dataset-service",
64183    feature = "job-service",
64184    feature = "model-garden-service",
64185    feature = "model-service",
64186    feature = "pipeline-service",
64187))]
64188pub mod probe {
64189    #[allow(unused_imports)]
64190    use super::*;
64191
64192    /// ExecAction specifies a command to execute.
64193    #[cfg(any(
64194        feature = "dataset-service",
64195        feature = "job-service",
64196        feature = "model-garden-service",
64197        feature = "model-service",
64198        feature = "pipeline-service",
64199    ))]
64200    #[derive(Clone, Default, PartialEq)]
64201    #[non_exhaustive]
64202    pub struct ExecAction {
64203        /// Command is the command line to execute inside the container, the working
64204        /// directory for the command is root ('/') in the container's filesystem.
64205        /// The command is simply exec'd, it is not run inside a shell, so
64206        /// traditional shell instructions ('|', etc) won't work. To use a shell, you
64207        /// need to explicitly call out to that shell. Exit status of 0 is treated as
64208        /// live/healthy and non-zero is unhealthy.
64209        pub command: std::vec::Vec<std::string::String>,
64210
64211        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
64212    }
64213
64214    #[cfg(any(
64215        feature = "dataset-service",
64216        feature = "job-service",
64217        feature = "model-garden-service",
64218        feature = "model-service",
64219        feature = "pipeline-service",
64220    ))]
64221    impl ExecAction {
64222        pub fn new() -> Self {
64223            std::default::Default::default()
64224        }
64225
64226        /// Sets the value of [command][crate::model::probe::ExecAction::command].
64227        pub fn set_command<T, V>(mut self, v: T) -> Self
64228        where
64229            T: std::iter::IntoIterator<Item = V>,
64230            V: std::convert::Into<std::string::String>,
64231        {
64232            use std::iter::Iterator;
64233            self.command = v.into_iter().map(|i| i.into()).collect();
64234            self
64235        }
64236    }
64237
64238    #[cfg(any(
64239        feature = "dataset-service",
64240        feature = "job-service",
64241        feature = "model-garden-service",
64242        feature = "model-service",
64243        feature = "pipeline-service",
64244    ))]
64245    impl wkt::message::Message for ExecAction {
64246        fn typename() -> &'static str {
64247            "type.googleapis.com/google.cloud.aiplatform.v1.Probe.ExecAction"
64248        }
64249    }
64250
64251    /// HttpGetAction describes an action based on HTTP Get requests.
64252    #[cfg(any(
64253        feature = "dataset-service",
64254        feature = "job-service",
64255        feature = "model-garden-service",
64256        feature = "model-service",
64257        feature = "pipeline-service",
64258    ))]
64259    #[derive(Clone, Default, PartialEq)]
64260    #[non_exhaustive]
64261    pub struct HttpGetAction {
64262        /// Path to access on the HTTP server.
64263        pub path: std::string::String,
64264
64265        /// Number of the port to access on the container.
64266        /// Number must be in the range 1 to 65535.
64267        pub port: i32,
64268
64269        /// Host name to connect to, defaults to the model serving container's IP.
64270        /// You probably want to set "Host" in httpHeaders instead.
64271        pub host: std::string::String,
64272
64273        /// Scheme to use for connecting to the host.
64274        /// Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS".
64275        pub scheme: std::string::String,
64276
64277        /// Custom headers to set in the request. HTTP allows repeated headers.
64278        pub http_headers: std::vec::Vec<crate::model::probe::HttpHeader>,
64279
64280        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
64281    }
64282
64283    #[cfg(any(
64284        feature = "dataset-service",
64285        feature = "job-service",
64286        feature = "model-garden-service",
64287        feature = "model-service",
64288        feature = "pipeline-service",
64289    ))]
64290    impl HttpGetAction {
64291        pub fn new() -> Self {
64292            std::default::Default::default()
64293        }
64294
64295        /// Sets the value of [path][crate::model::probe::HttpGetAction::path].
64296        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
64297            self.path = v.into();
64298            self
64299        }
64300
64301        /// Sets the value of [port][crate::model::probe::HttpGetAction::port].
64302        pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
64303            self.port = v.into();
64304            self
64305        }
64306
64307        /// Sets the value of [host][crate::model::probe::HttpGetAction::host].
64308        pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
64309            self.host = v.into();
64310            self
64311        }
64312
64313        /// Sets the value of [scheme][crate::model::probe::HttpGetAction::scheme].
64314        pub fn set_scheme<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
64315            self.scheme = v.into();
64316            self
64317        }
64318
64319        /// Sets the value of [http_headers][crate::model::probe::HttpGetAction::http_headers].
64320        pub fn set_http_headers<T, V>(mut self, v: T) -> Self
64321        where
64322            T: std::iter::IntoIterator<Item = V>,
64323            V: std::convert::Into<crate::model::probe::HttpHeader>,
64324        {
64325            use std::iter::Iterator;
64326            self.http_headers = v.into_iter().map(|i| i.into()).collect();
64327            self
64328        }
64329    }
64330
64331    #[cfg(any(
64332        feature = "dataset-service",
64333        feature = "job-service",
64334        feature = "model-garden-service",
64335        feature = "model-service",
64336        feature = "pipeline-service",
64337    ))]
64338    impl wkt::message::Message for HttpGetAction {
64339        fn typename() -> &'static str {
64340            "type.googleapis.com/google.cloud.aiplatform.v1.Probe.HttpGetAction"
64341        }
64342    }
64343
64344    /// GrpcAction checks the health of a container using a gRPC service.
64345    #[cfg(any(
64346        feature = "dataset-service",
64347        feature = "job-service",
64348        feature = "model-garden-service",
64349        feature = "model-service",
64350        feature = "pipeline-service",
64351    ))]
64352    #[derive(Clone, Default, PartialEq)]
64353    #[non_exhaustive]
64354    pub struct GrpcAction {
64355        /// Port number of the gRPC service. Number must be in the range 1 to 65535.
64356        pub port: i32,
64357
64358        /// Service is the name of the service to place in the gRPC
64359        /// HealthCheckRequest (see
64360        /// <https://github.com/grpc/grpc/blob/master/doc/health-checking.md>).
64361        ///
64362        /// If this is not specified, the default behavior is defined by gRPC.
64363        pub service: std::string::String,
64364
64365        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
64366    }
64367
64368    #[cfg(any(
64369        feature = "dataset-service",
64370        feature = "job-service",
64371        feature = "model-garden-service",
64372        feature = "model-service",
64373        feature = "pipeline-service",
64374    ))]
64375    impl GrpcAction {
64376        pub fn new() -> Self {
64377            std::default::Default::default()
64378        }
64379
64380        /// Sets the value of [port][crate::model::probe::GrpcAction::port].
64381        pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
64382            self.port = v.into();
64383            self
64384        }
64385
64386        /// Sets the value of [service][crate::model::probe::GrpcAction::service].
64387        pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
64388            self.service = v.into();
64389            self
64390        }
64391    }
64392
64393    #[cfg(any(
64394        feature = "dataset-service",
64395        feature = "job-service",
64396        feature = "model-garden-service",
64397        feature = "model-service",
64398        feature = "pipeline-service",
64399    ))]
64400    impl wkt::message::Message for GrpcAction {
64401        fn typename() -> &'static str {
64402            "type.googleapis.com/google.cloud.aiplatform.v1.Probe.GrpcAction"
64403        }
64404    }
64405
64406    /// TcpSocketAction probes the health of a container by opening a TCP socket
64407    /// connection.
64408    #[cfg(any(
64409        feature = "dataset-service",
64410        feature = "job-service",
64411        feature = "model-garden-service",
64412        feature = "model-service",
64413        feature = "pipeline-service",
64414    ))]
64415    #[derive(Clone, Default, PartialEq)]
64416    #[non_exhaustive]
64417    pub struct TcpSocketAction {
64418        /// Number of the port to access on the container.
64419        /// Number must be in the range 1 to 65535.
64420        pub port: i32,
64421
64422        /// Optional: Host name to connect to, defaults to the model serving
64423        /// container's IP.
64424        pub host: std::string::String,
64425
64426        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
64427    }
64428
64429    #[cfg(any(
64430        feature = "dataset-service",
64431        feature = "job-service",
64432        feature = "model-garden-service",
64433        feature = "model-service",
64434        feature = "pipeline-service",
64435    ))]
64436    impl TcpSocketAction {
64437        pub fn new() -> Self {
64438            std::default::Default::default()
64439        }
64440
64441        /// Sets the value of [port][crate::model::probe::TcpSocketAction::port].
64442        pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
64443            self.port = v.into();
64444            self
64445        }
64446
64447        /// Sets the value of [host][crate::model::probe::TcpSocketAction::host].
64448        pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
64449            self.host = v.into();
64450            self
64451        }
64452    }
64453
64454    #[cfg(any(
64455        feature = "dataset-service",
64456        feature = "job-service",
64457        feature = "model-garden-service",
64458        feature = "model-service",
64459        feature = "pipeline-service",
64460    ))]
64461    impl wkt::message::Message for TcpSocketAction {
64462        fn typename() -> &'static str {
64463            "type.googleapis.com/google.cloud.aiplatform.v1.Probe.TcpSocketAction"
64464        }
64465    }
64466
64467    /// HttpHeader describes a custom header to be used in HTTP probes
64468    #[cfg(any(
64469        feature = "dataset-service",
64470        feature = "job-service",
64471        feature = "model-garden-service",
64472        feature = "model-service",
64473        feature = "pipeline-service",
64474    ))]
64475    #[derive(Clone, Default, PartialEq)]
64476    #[non_exhaustive]
64477    pub struct HttpHeader {
64478        /// The header field name.
64479        /// This will be canonicalized upon output, so case-variant names will be
64480        /// understood as the same header.
64481        pub name: std::string::String,
64482
64483        /// The header field value
64484        pub value: std::string::String,
64485
64486        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
64487    }
64488
64489    #[cfg(any(
64490        feature = "dataset-service",
64491        feature = "job-service",
64492        feature = "model-garden-service",
64493        feature = "model-service",
64494        feature = "pipeline-service",
64495    ))]
64496    impl HttpHeader {
64497        pub fn new() -> Self {
64498            std::default::Default::default()
64499        }
64500
64501        /// Sets the value of [name][crate::model::probe::HttpHeader::name].
64502        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
64503            self.name = v.into();
64504            self
64505        }
64506
64507        /// Sets the value of [value][crate::model::probe::HttpHeader::value].
64508        pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
64509            self.value = v.into();
64510            self
64511        }
64512    }
64513
64514    #[cfg(any(
64515        feature = "dataset-service",
64516        feature = "job-service",
64517        feature = "model-garden-service",
64518        feature = "model-service",
64519        feature = "pipeline-service",
64520    ))]
64521    impl wkt::message::Message for HttpHeader {
64522        fn typename() -> &'static str {
64523            "type.googleapis.com/google.cloud.aiplatform.v1.Probe.HttpHeader"
64524        }
64525    }
64526
64527    #[cfg(any(
64528        feature = "dataset-service",
64529        feature = "job-service",
64530        feature = "model-garden-service",
64531        feature = "model-service",
64532        feature = "pipeline-service",
64533    ))]
64534    #[derive(Clone, Debug, PartialEq)]
64535    #[non_exhaustive]
64536    pub enum ProbeType {
64537        /// ExecAction probes the health of a container by executing a command.
64538        Exec(std::boxed::Box<crate::model::probe::ExecAction>),
64539        /// HttpGetAction probes the health of a container by sending an HTTP GET
64540        /// request.
64541        HttpGet(std::boxed::Box<crate::model::probe::HttpGetAction>),
64542        /// GrpcAction probes the health of a container by sending a gRPC request.
64543        Grpc(std::boxed::Box<crate::model::probe::GrpcAction>),
64544        /// TcpSocketAction probes the health of a container by opening a TCP socket
64545        /// connection.
64546        TcpSocket(std::boxed::Box<crate::model::probe::TcpSocketAction>),
64547    }
64548}
64549
64550/// Describes the machine learning model version checkpoint.
64551#[cfg(any(
64552    feature = "dataset-service",
64553    feature = "model-service",
64554    feature = "pipeline-service",
64555))]
64556#[derive(Clone, Default, PartialEq)]
64557#[non_exhaustive]
64558pub struct Checkpoint {
64559    /// The ID of the checkpoint.
64560    pub checkpoint_id: std::string::String,
64561
64562    /// The epoch of the checkpoint.
64563    pub epoch: i64,
64564
64565    /// The step of the checkpoint.
64566    pub step: i64,
64567
64568    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
64569}
64570
64571#[cfg(any(
64572    feature = "dataset-service",
64573    feature = "model-service",
64574    feature = "pipeline-service",
64575))]
64576impl Checkpoint {
64577    pub fn new() -> Self {
64578        std::default::Default::default()
64579    }
64580
64581    /// Sets the value of [checkpoint_id][crate::model::Checkpoint::checkpoint_id].
64582    pub fn set_checkpoint_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
64583        self.checkpoint_id = v.into();
64584        self
64585    }
64586
64587    /// Sets the value of [epoch][crate::model::Checkpoint::epoch].
64588    pub fn set_epoch<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
64589        self.epoch = v.into();
64590        self
64591    }
64592
64593    /// Sets the value of [step][crate::model::Checkpoint::step].
64594    pub fn set_step<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
64595        self.step = v.into();
64596        self
64597    }
64598}
64599
64600#[cfg(any(
64601    feature = "dataset-service",
64602    feature = "model-service",
64603    feature = "pipeline-service",
64604))]
64605impl wkt::message::Message for Checkpoint {
64606    fn typename() -> &'static str {
64607        "type.googleapis.com/google.cloud.aiplatform.v1.Checkpoint"
64608    }
64609}
64610
64611/// Represents a job that runs periodically to monitor the deployed models in an
64612/// endpoint. It will analyze the logged training & prediction data to detect any
64613/// abnormal behaviors.
64614#[cfg(feature = "job-service")]
64615#[derive(Clone, Default, PartialEq)]
64616#[non_exhaustive]
64617pub struct ModelDeploymentMonitoringJob {
64618    /// Output only. Resource name of a ModelDeploymentMonitoringJob.
64619    pub name: std::string::String,
64620
64621    /// Required. The user-defined name of the ModelDeploymentMonitoringJob.
64622    /// The name can be up to 128 characters long and can consist of any UTF-8
64623    /// characters.
64624    /// Display name of a ModelDeploymentMonitoringJob.
64625    pub display_name: std::string::String,
64626
64627    /// Required. Endpoint resource name.
64628    /// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
64629    pub endpoint: std::string::String,
64630
64631    /// Output only. The detailed state of the monitoring job.
64632    /// When the job is still creating, the state will be 'PENDING'.
64633    /// Once the job is successfully created, the state will be 'RUNNING'.
64634    /// Pause the job, the state will be 'PAUSED'.
64635    /// Resume the job, the state will return to 'RUNNING'.
64636    pub state: crate::model::JobState,
64637
64638    /// Output only. Schedule state when the monitoring job is in Running state.
64639    pub schedule_state: crate::model::model_deployment_monitoring_job::MonitoringScheduleState,
64640
64641    /// Output only. Latest triggered monitoring pipeline metadata.
64642    pub latest_monitoring_pipeline_metadata: std::option::Option<
64643        crate::model::model_deployment_monitoring_job::LatestMonitoringPipelineMetadata,
64644    >,
64645
64646    /// Required. The config for monitoring objectives. This is a per DeployedModel
64647    /// config. Each DeployedModel needs to be configured separately.
64648    pub model_deployment_monitoring_objective_configs:
64649        std::vec::Vec<crate::model::ModelDeploymentMonitoringObjectiveConfig>,
64650
64651    /// Required. Schedule config for running the monitoring job.
64652    pub model_deployment_monitoring_schedule_config:
64653        std::option::Option<crate::model::ModelDeploymentMonitoringScheduleConfig>,
64654
64655    /// Required. Sample Strategy for logging.
64656    pub logging_sampling_strategy: std::option::Option<crate::model::SamplingStrategy>,
64657
64658    /// Alert config for model monitoring.
64659    pub model_monitoring_alert_config:
64660        std::option::Option<crate::model::ModelMonitoringAlertConfig>,
64661
64662    /// YAML schema file uri describing the format of a single instance,
64663    /// which are given to format this Endpoint's prediction (and explanation).
64664    /// If not set, we will generate predict schema from collected predict
64665    /// requests.
64666    pub predict_instance_schema_uri: std::string::String,
64667
64668    /// Sample Predict instance, same format as
64669    /// [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances],
64670    /// this can be set as a replacement of
64671    /// [ModelDeploymentMonitoringJob.predict_instance_schema_uri][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.predict_instance_schema_uri].
64672    /// If not set, we will generate predict schema from collected predict
64673    /// requests.
64674    ///
64675    /// [google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.predict_instance_schema_uri]: crate::model::ModelDeploymentMonitoringJob::predict_instance_schema_uri
64676    /// [google.cloud.aiplatform.v1.PredictRequest.instances]: crate::model::PredictRequest::instances
64677    pub sample_predict_instance: std::option::Option<wkt::Value>,
64678
64679    /// YAML schema file uri describing the format of a single instance that you
64680    /// want Tensorflow Data Validation (TFDV) to analyze.
64681    ///
64682    /// If this field is empty, all the feature data types are inferred from
64683    /// [predict_instance_schema_uri][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.predict_instance_schema_uri],
64684    /// meaning that TFDV will use the data in the exact format(data type) as
64685    /// prediction request/response.
64686    /// If there are any data type differences between predict instance and TFDV
64687    /// instance, this field can be used to override the schema.
64688    /// For models trained with Vertex AI, this field must be set as all the
64689    /// fields in predict instance formatted as string.
64690    ///
64691    /// [google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.predict_instance_schema_uri]: crate::model::ModelDeploymentMonitoringJob::predict_instance_schema_uri
64692    pub analysis_instance_schema_uri: std::string::String,
64693
64694    /// Output only. The created bigquery tables for the job under customer
64695    /// project. Customer could do their own query & analysis. There could be 4 log
64696    /// tables in maximum:
64697    ///
64698    /// 1. Training data logging predict request/response
64699    /// 1. Serving data logging predict request/response
64700    pub bigquery_tables: std::vec::Vec<crate::model::ModelDeploymentMonitoringBigQueryTable>,
64701
64702    /// The TTL of BigQuery tables in user projects which stores logs.
64703    /// A day is the basic unit of the TTL and we take the ceil of TTL/86400(a
64704    /// day). e.g. { second: 3600} indicates ttl = 1 day.
64705    pub log_ttl: std::option::Option<wkt::Duration>,
64706
64707    /// The labels with user-defined metadata to organize your
64708    /// ModelDeploymentMonitoringJob.
64709    ///
64710    /// Label keys and values can be no longer than 64 characters
64711    /// (Unicode codepoints), can only contain lowercase letters, numeric
64712    /// characters, underscores and dashes. International characters are allowed.
64713    ///
64714    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
64715    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
64716
64717    /// Output only. Timestamp when this ModelDeploymentMonitoringJob was created.
64718    pub create_time: std::option::Option<wkt::Timestamp>,
64719
64720    /// Output only. Timestamp when this ModelDeploymentMonitoringJob was updated
64721    /// most recently.
64722    pub update_time: std::option::Option<wkt::Timestamp>,
64723
64724    /// Output only. Timestamp when this monitoring pipeline will be scheduled to
64725    /// run for the next round.
64726    pub next_schedule_time: std::option::Option<wkt::Timestamp>,
64727
64728    /// Stats anomalies base folder path.
64729    pub stats_anomalies_base_directory: std::option::Option<crate::model::GcsDestination>,
64730
64731    /// Customer-managed encryption key spec for a ModelDeploymentMonitoringJob. If
64732    /// set, this ModelDeploymentMonitoringJob and all sub-resources of this
64733    /// ModelDeploymentMonitoringJob will be secured by this key.
64734    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
64735
64736    /// If true, the scheduled monitoring pipeline logs are sent to
64737    /// Google Cloud Logging, including pipeline status and anomalies detected.
64738    /// Please note the logs incur cost, which are subject to [Cloud Logging
64739    /// pricing](https://cloud.google.com/logging#pricing).
64740    pub enable_monitoring_pipeline_logs: bool,
64741
64742    /// Output only. Only populated when the job's state is `JOB_STATE_FAILED` or
64743    /// `JOB_STATE_CANCELLED`.
64744    pub error: std::option::Option<rpc::model::Status>,
64745
64746    /// Output only. Reserved for future use.
64747    pub satisfies_pzs: bool,
64748
64749    /// Output only. Reserved for future use.
64750    pub satisfies_pzi: bool,
64751
64752    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
64753}
64754
64755#[cfg(feature = "job-service")]
64756impl ModelDeploymentMonitoringJob {
64757    pub fn new() -> Self {
64758        std::default::Default::default()
64759    }
64760
64761    /// Sets the value of [name][crate::model::ModelDeploymentMonitoringJob::name].
64762    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
64763        self.name = v.into();
64764        self
64765    }
64766
64767    /// Sets the value of [display_name][crate::model::ModelDeploymentMonitoringJob::display_name].
64768    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
64769        self.display_name = v.into();
64770        self
64771    }
64772
64773    /// Sets the value of [endpoint][crate::model::ModelDeploymentMonitoringJob::endpoint].
64774    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
64775        self.endpoint = v.into();
64776        self
64777    }
64778
64779    /// Sets the value of [state][crate::model::ModelDeploymentMonitoringJob::state].
64780    pub fn set_state<T: std::convert::Into<crate::model::JobState>>(mut self, v: T) -> Self {
64781        self.state = v.into();
64782        self
64783    }
64784
64785    /// Sets the value of [schedule_state][crate::model::ModelDeploymentMonitoringJob::schedule_state].
64786    pub fn set_schedule_state<
64787        T: std::convert::Into<crate::model::model_deployment_monitoring_job::MonitoringScheduleState>,
64788    >(
64789        mut self,
64790        v: T,
64791    ) -> Self {
64792        self.schedule_state = v.into();
64793        self
64794    }
64795
64796    /// Sets the value of [latest_monitoring_pipeline_metadata][crate::model::ModelDeploymentMonitoringJob::latest_monitoring_pipeline_metadata].
64797    pub fn set_latest_monitoring_pipeline_metadata<T>(mut self, v: T) -> Self
64798    where
64799        T: std::convert::Into<
64800                crate::model::model_deployment_monitoring_job::LatestMonitoringPipelineMetadata,
64801            >,
64802    {
64803        self.latest_monitoring_pipeline_metadata = std::option::Option::Some(v.into());
64804        self
64805    }
64806
64807    /// Sets or clears the value of [latest_monitoring_pipeline_metadata][crate::model::ModelDeploymentMonitoringJob::latest_monitoring_pipeline_metadata].
64808    pub fn set_or_clear_latest_monitoring_pipeline_metadata<T>(
64809        mut self,
64810        v: std::option::Option<T>,
64811    ) -> Self
64812    where
64813        T: std::convert::Into<
64814                crate::model::model_deployment_monitoring_job::LatestMonitoringPipelineMetadata,
64815            >,
64816    {
64817        self.latest_monitoring_pipeline_metadata = v.map(|x| x.into());
64818        self
64819    }
64820
64821    /// Sets the value of [model_deployment_monitoring_objective_configs][crate::model::ModelDeploymentMonitoringJob::model_deployment_monitoring_objective_configs].
64822    pub fn set_model_deployment_monitoring_objective_configs<T, V>(mut self, v: T) -> Self
64823    where
64824        T: std::iter::IntoIterator<Item = V>,
64825        V: std::convert::Into<crate::model::ModelDeploymentMonitoringObjectiveConfig>,
64826    {
64827        use std::iter::Iterator;
64828        self.model_deployment_monitoring_objective_configs =
64829            v.into_iter().map(|i| i.into()).collect();
64830        self
64831    }
64832
64833    /// Sets the value of [model_deployment_monitoring_schedule_config][crate::model::ModelDeploymentMonitoringJob::model_deployment_monitoring_schedule_config].
64834    pub fn set_model_deployment_monitoring_schedule_config<T>(mut self, v: T) -> Self
64835    where
64836        T: std::convert::Into<crate::model::ModelDeploymentMonitoringScheduleConfig>,
64837    {
64838        self.model_deployment_monitoring_schedule_config = std::option::Option::Some(v.into());
64839        self
64840    }
64841
64842    /// Sets or clears the value of [model_deployment_monitoring_schedule_config][crate::model::ModelDeploymentMonitoringJob::model_deployment_monitoring_schedule_config].
64843    pub fn set_or_clear_model_deployment_monitoring_schedule_config<T>(
64844        mut self,
64845        v: std::option::Option<T>,
64846    ) -> Self
64847    where
64848        T: std::convert::Into<crate::model::ModelDeploymentMonitoringScheduleConfig>,
64849    {
64850        self.model_deployment_monitoring_schedule_config = v.map(|x| x.into());
64851        self
64852    }
64853
64854    /// Sets the value of [logging_sampling_strategy][crate::model::ModelDeploymentMonitoringJob::logging_sampling_strategy].
64855    pub fn set_logging_sampling_strategy<T>(mut self, v: T) -> Self
64856    where
64857        T: std::convert::Into<crate::model::SamplingStrategy>,
64858    {
64859        self.logging_sampling_strategy = std::option::Option::Some(v.into());
64860        self
64861    }
64862
64863    /// Sets or clears the value of [logging_sampling_strategy][crate::model::ModelDeploymentMonitoringJob::logging_sampling_strategy].
64864    pub fn set_or_clear_logging_sampling_strategy<T>(mut self, v: std::option::Option<T>) -> Self
64865    where
64866        T: std::convert::Into<crate::model::SamplingStrategy>,
64867    {
64868        self.logging_sampling_strategy = v.map(|x| x.into());
64869        self
64870    }
64871
64872    /// Sets the value of [model_monitoring_alert_config][crate::model::ModelDeploymentMonitoringJob::model_monitoring_alert_config].
64873    pub fn set_model_monitoring_alert_config<T>(mut self, v: T) -> Self
64874    where
64875        T: std::convert::Into<crate::model::ModelMonitoringAlertConfig>,
64876    {
64877        self.model_monitoring_alert_config = std::option::Option::Some(v.into());
64878        self
64879    }
64880
64881    /// Sets or clears the value of [model_monitoring_alert_config][crate::model::ModelDeploymentMonitoringJob::model_monitoring_alert_config].
64882    pub fn set_or_clear_model_monitoring_alert_config<T>(
64883        mut self,
64884        v: std::option::Option<T>,
64885    ) -> Self
64886    where
64887        T: std::convert::Into<crate::model::ModelMonitoringAlertConfig>,
64888    {
64889        self.model_monitoring_alert_config = v.map(|x| x.into());
64890        self
64891    }
64892
64893    /// Sets the value of [predict_instance_schema_uri][crate::model::ModelDeploymentMonitoringJob::predict_instance_schema_uri].
64894    pub fn set_predict_instance_schema_uri<T: std::convert::Into<std::string::String>>(
64895        mut self,
64896        v: T,
64897    ) -> Self {
64898        self.predict_instance_schema_uri = v.into();
64899        self
64900    }
64901
64902    /// Sets the value of [sample_predict_instance][crate::model::ModelDeploymentMonitoringJob::sample_predict_instance].
64903    pub fn set_sample_predict_instance<T>(mut self, v: T) -> Self
64904    where
64905        T: std::convert::Into<wkt::Value>,
64906    {
64907        self.sample_predict_instance = std::option::Option::Some(v.into());
64908        self
64909    }
64910
64911    /// Sets or clears the value of [sample_predict_instance][crate::model::ModelDeploymentMonitoringJob::sample_predict_instance].
64912    pub fn set_or_clear_sample_predict_instance<T>(mut self, v: std::option::Option<T>) -> Self
64913    where
64914        T: std::convert::Into<wkt::Value>,
64915    {
64916        self.sample_predict_instance = v.map(|x| x.into());
64917        self
64918    }
64919
64920    /// Sets the value of [analysis_instance_schema_uri][crate::model::ModelDeploymentMonitoringJob::analysis_instance_schema_uri].
64921    pub fn set_analysis_instance_schema_uri<T: std::convert::Into<std::string::String>>(
64922        mut self,
64923        v: T,
64924    ) -> Self {
64925        self.analysis_instance_schema_uri = v.into();
64926        self
64927    }
64928
64929    /// Sets the value of [bigquery_tables][crate::model::ModelDeploymentMonitoringJob::bigquery_tables].
64930    pub fn set_bigquery_tables<T, V>(mut self, v: T) -> Self
64931    where
64932        T: std::iter::IntoIterator<Item = V>,
64933        V: std::convert::Into<crate::model::ModelDeploymentMonitoringBigQueryTable>,
64934    {
64935        use std::iter::Iterator;
64936        self.bigquery_tables = v.into_iter().map(|i| i.into()).collect();
64937        self
64938    }
64939
64940    /// Sets the value of [log_ttl][crate::model::ModelDeploymentMonitoringJob::log_ttl].
64941    pub fn set_log_ttl<T>(mut self, v: T) -> Self
64942    where
64943        T: std::convert::Into<wkt::Duration>,
64944    {
64945        self.log_ttl = std::option::Option::Some(v.into());
64946        self
64947    }
64948
64949    /// Sets or clears the value of [log_ttl][crate::model::ModelDeploymentMonitoringJob::log_ttl].
64950    pub fn set_or_clear_log_ttl<T>(mut self, v: std::option::Option<T>) -> Self
64951    where
64952        T: std::convert::Into<wkt::Duration>,
64953    {
64954        self.log_ttl = v.map(|x| x.into());
64955        self
64956    }
64957
64958    /// Sets the value of [labels][crate::model::ModelDeploymentMonitoringJob::labels].
64959    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
64960    where
64961        T: std::iter::IntoIterator<Item = (K, V)>,
64962        K: std::convert::Into<std::string::String>,
64963        V: std::convert::Into<std::string::String>,
64964    {
64965        use std::iter::Iterator;
64966        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
64967        self
64968    }
64969
64970    /// Sets the value of [create_time][crate::model::ModelDeploymentMonitoringJob::create_time].
64971    pub fn set_create_time<T>(mut self, v: T) -> Self
64972    where
64973        T: std::convert::Into<wkt::Timestamp>,
64974    {
64975        self.create_time = std::option::Option::Some(v.into());
64976        self
64977    }
64978
64979    /// Sets or clears the value of [create_time][crate::model::ModelDeploymentMonitoringJob::create_time].
64980    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
64981    where
64982        T: std::convert::Into<wkt::Timestamp>,
64983    {
64984        self.create_time = v.map(|x| x.into());
64985        self
64986    }
64987
64988    /// Sets the value of [update_time][crate::model::ModelDeploymentMonitoringJob::update_time].
64989    pub fn set_update_time<T>(mut self, v: T) -> Self
64990    where
64991        T: std::convert::Into<wkt::Timestamp>,
64992    {
64993        self.update_time = std::option::Option::Some(v.into());
64994        self
64995    }
64996
64997    /// Sets or clears the value of [update_time][crate::model::ModelDeploymentMonitoringJob::update_time].
64998    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
64999    where
65000        T: std::convert::Into<wkt::Timestamp>,
65001    {
65002        self.update_time = v.map(|x| x.into());
65003        self
65004    }
65005
65006    /// Sets the value of [next_schedule_time][crate::model::ModelDeploymentMonitoringJob::next_schedule_time].
65007    pub fn set_next_schedule_time<T>(mut self, v: T) -> Self
65008    where
65009        T: std::convert::Into<wkt::Timestamp>,
65010    {
65011        self.next_schedule_time = std::option::Option::Some(v.into());
65012        self
65013    }
65014
65015    /// Sets or clears the value of [next_schedule_time][crate::model::ModelDeploymentMonitoringJob::next_schedule_time].
65016    pub fn set_or_clear_next_schedule_time<T>(mut self, v: std::option::Option<T>) -> Self
65017    where
65018        T: std::convert::Into<wkt::Timestamp>,
65019    {
65020        self.next_schedule_time = v.map(|x| x.into());
65021        self
65022    }
65023
65024    /// Sets the value of [stats_anomalies_base_directory][crate::model::ModelDeploymentMonitoringJob::stats_anomalies_base_directory].
65025    pub fn set_stats_anomalies_base_directory<T>(mut self, v: T) -> Self
65026    where
65027        T: std::convert::Into<crate::model::GcsDestination>,
65028    {
65029        self.stats_anomalies_base_directory = std::option::Option::Some(v.into());
65030        self
65031    }
65032
65033    /// Sets or clears the value of [stats_anomalies_base_directory][crate::model::ModelDeploymentMonitoringJob::stats_anomalies_base_directory].
65034    pub fn set_or_clear_stats_anomalies_base_directory<T>(
65035        mut self,
65036        v: std::option::Option<T>,
65037    ) -> Self
65038    where
65039        T: std::convert::Into<crate::model::GcsDestination>,
65040    {
65041        self.stats_anomalies_base_directory = v.map(|x| x.into());
65042        self
65043    }
65044
65045    /// Sets the value of [encryption_spec][crate::model::ModelDeploymentMonitoringJob::encryption_spec].
65046    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
65047    where
65048        T: std::convert::Into<crate::model::EncryptionSpec>,
65049    {
65050        self.encryption_spec = std::option::Option::Some(v.into());
65051        self
65052    }
65053
65054    /// Sets or clears the value of [encryption_spec][crate::model::ModelDeploymentMonitoringJob::encryption_spec].
65055    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
65056    where
65057        T: std::convert::Into<crate::model::EncryptionSpec>,
65058    {
65059        self.encryption_spec = v.map(|x| x.into());
65060        self
65061    }
65062
65063    /// Sets the value of [enable_monitoring_pipeline_logs][crate::model::ModelDeploymentMonitoringJob::enable_monitoring_pipeline_logs].
65064    pub fn set_enable_monitoring_pipeline_logs<T: std::convert::Into<bool>>(
65065        mut self,
65066        v: T,
65067    ) -> Self {
65068        self.enable_monitoring_pipeline_logs = v.into();
65069        self
65070    }
65071
65072    /// Sets the value of [error][crate::model::ModelDeploymentMonitoringJob::error].
65073    pub fn set_error<T>(mut self, v: T) -> Self
65074    where
65075        T: std::convert::Into<rpc::model::Status>,
65076    {
65077        self.error = std::option::Option::Some(v.into());
65078        self
65079    }
65080
65081    /// Sets or clears the value of [error][crate::model::ModelDeploymentMonitoringJob::error].
65082    pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
65083    where
65084        T: std::convert::Into<rpc::model::Status>,
65085    {
65086        self.error = v.map(|x| x.into());
65087        self
65088    }
65089
65090    /// Sets the value of [satisfies_pzs][crate::model::ModelDeploymentMonitoringJob::satisfies_pzs].
65091    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
65092        self.satisfies_pzs = v.into();
65093        self
65094    }
65095
65096    /// Sets the value of [satisfies_pzi][crate::model::ModelDeploymentMonitoringJob::satisfies_pzi].
65097    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
65098        self.satisfies_pzi = v.into();
65099        self
65100    }
65101}
65102
65103#[cfg(feature = "job-service")]
65104impl wkt::message::Message for ModelDeploymentMonitoringJob {
65105    fn typename() -> &'static str {
65106        "type.googleapis.com/google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob"
65107    }
65108}
65109
65110/// Defines additional types related to [ModelDeploymentMonitoringJob].
65111#[cfg(feature = "job-service")]
65112pub mod model_deployment_monitoring_job {
65113    #[allow(unused_imports)]
65114    use super::*;
65115
65116    /// All metadata of most recent monitoring pipelines.
65117    #[cfg(feature = "job-service")]
65118    #[derive(Clone, Default, PartialEq)]
65119    #[non_exhaustive]
65120    pub struct LatestMonitoringPipelineMetadata {
65121        /// The time that most recent monitoring pipelines that is related to this
65122        /// run.
65123        pub run_time: std::option::Option<wkt::Timestamp>,
65124
65125        /// The status of the most recent monitoring pipeline.
65126        pub status: std::option::Option<rpc::model::Status>,
65127
65128        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
65129    }
65130
65131    #[cfg(feature = "job-service")]
65132    impl LatestMonitoringPipelineMetadata {
65133        pub fn new() -> Self {
65134            std::default::Default::default()
65135        }
65136
65137        /// Sets the value of [run_time][crate::model::model_deployment_monitoring_job::LatestMonitoringPipelineMetadata::run_time].
65138        pub fn set_run_time<T>(mut self, v: T) -> Self
65139        where
65140            T: std::convert::Into<wkt::Timestamp>,
65141        {
65142            self.run_time = std::option::Option::Some(v.into());
65143            self
65144        }
65145
65146        /// Sets or clears the value of [run_time][crate::model::model_deployment_monitoring_job::LatestMonitoringPipelineMetadata::run_time].
65147        pub fn set_or_clear_run_time<T>(mut self, v: std::option::Option<T>) -> Self
65148        where
65149            T: std::convert::Into<wkt::Timestamp>,
65150        {
65151            self.run_time = v.map(|x| x.into());
65152            self
65153        }
65154
65155        /// Sets the value of [status][crate::model::model_deployment_monitoring_job::LatestMonitoringPipelineMetadata::status].
65156        pub fn set_status<T>(mut self, v: T) -> Self
65157        where
65158            T: std::convert::Into<rpc::model::Status>,
65159        {
65160            self.status = std::option::Option::Some(v.into());
65161            self
65162        }
65163
65164        /// Sets or clears the value of [status][crate::model::model_deployment_monitoring_job::LatestMonitoringPipelineMetadata::status].
65165        pub fn set_or_clear_status<T>(mut self, v: std::option::Option<T>) -> Self
65166        where
65167            T: std::convert::Into<rpc::model::Status>,
65168        {
65169            self.status = v.map(|x| x.into());
65170            self
65171        }
65172    }
65173
65174    #[cfg(feature = "job-service")]
65175    impl wkt::message::Message for LatestMonitoringPipelineMetadata {
65176        fn typename() -> &'static str {
65177            "type.googleapis.com/google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.LatestMonitoringPipelineMetadata"
65178        }
65179    }
65180
65181    /// The state to Specify the monitoring pipeline.
65182    ///
65183    /// # Working with unknown values
65184    ///
65185    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
65186    /// additional enum variants at any time. Adding new variants is not considered
65187    /// a breaking change. Applications should write their code in anticipation of:
65188    ///
65189    /// - New values appearing in future releases of the client library, **and**
65190    /// - New values received dynamically, without application changes.
65191    ///
65192    /// Please consult the [Working with enums] section in the user guide for some
65193    /// guidelines.
65194    ///
65195    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
65196    #[cfg(feature = "job-service")]
65197    #[derive(Clone, Debug, PartialEq)]
65198    #[non_exhaustive]
65199    pub enum MonitoringScheduleState {
65200        /// Unspecified state.
65201        Unspecified,
65202        /// The pipeline is picked up and wait to run.
65203        Pending,
65204        /// The pipeline is offline and will be scheduled for next run.
65205        Offline,
65206        /// The pipeline is running.
65207        Running,
65208        /// If set, the enum was initialized with an unknown value.
65209        ///
65210        /// Applications can examine the value using [MonitoringScheduleState::value] or
65211        /// [MonitoringScheduleState::name].
65212        UnknownValue(monitoring_schedule_state::UnknownValue),
65213    }
65214
65215    #[doc(hidden)]
65216    #[cfg(feature = "job-service")]
65217    pub mod monitoring_schedule_state {
65218        #[allow(unused_imports)]
65219        use super::*;
65220        #[derive(Clone, Debug, PartialEq)]
65221        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
65222    }
65223
65224    #[cfg(feature = "job-service")]
65225    impl MonitoringScheduleState {
65226        /// Gets the enum value.
65227        ///
65228        /// Returns `None` if the enum contains an unknown value deserialized from
65229        /// the string representation of enums.
65230        pub fn value(&self) -> std::option::Option<i32> {
65231            match self {
65232                Self::Unspecified => std::option::Option::Some(0),
65233                Self::Pending => std::option::Option::Some(1),
65234                Self::Offline => std::option::Option::Some(2),
65235                Self::Running => std::option::Option::Some(3),
65236                Self::UnknownValue(u) => u.0.value(),
65237            }
65238        }
65239
65240        /// Gets the enum value as a string.
65241        ///
65242        /// Returns `None` if the enum contains an unknown value deserialized from
65243        /// the integer representation of enums.
65244        pub fn name(&self) -> std::option::Option<&str> {
65245            match self {
65246                Self::Unspecified => {
65247                    std::option::Option::Some("MONITORING_SCHEDULE_STATE_UNSPECIFIED")
65248                }
65249                Self::Pending => std::option::Option::Some("PENDING"),
65250                Self::Offline => std::option::Option::Some("OFFLINE"),
65251                Self::Running => std::option::Option::Some("RUNNING"),
65252                Self::UnknownValue(u) => u.0.name(),
65253            }
65254        }
65255    }
65256
65257    #[cfg(feature = "job-service")]
65258    impl std::default::Default for MonitoringScheduleState {
65259        fn default() -> Self {
65260            use std::convert::From;
65261            Self::from(0)
65262        }
65263    }
65264
65265    #[cfg(feature = "job-service")]
65266    impl std::fmt::Display for MonitoringScheduleState {
65267        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
65268            wkt::internal::display_enum(f, self.name(), self.value())
65269        }
65270    }
65271
65272    #[cfg(feature = "job-service")]
65273    impl std::convert::From<i32> for MonitoringScheduleState {
65274        fn from(value: i32) -> Self {
65275            match value {
65276                0 => Self::Unspecified,
65277                1 => Self::Pending,
65278                2 => Self::Offline,
65279                3 => Self::Running,
65280                _ => Self::UnknownValue(monitoring_schedule_state::UnknownValue(
65281                    wkt::internal::UnknownEnumValue::Integer(value),
65282                )),
65283            }
65284        }
65285    }
65286
65287    #[cfg(feature = "job-service")]
65288    impl std::convert::From<&str> for MonitoringScheduleState {
65289        fn from(value: &str) -> Self {
65290            use std::string::ToString;
65291            match value {
65292                "MONITORING_SCHEDULE_STATE_UNSPECIFIED" => Self::Unspecified,
65293                "PENDING" => Self::Pending,
65294                "OFFLINE" => Self::Offline,
65295                "RUNNING" => Self::Running,
65296                _ => Self::UnknownValue(monitoring_schedule_state::UnknownValue(
65297                    wkt::internal::UnknownEnumValue::String(value.to_string()),
65298                )),
65299            }
65300        }
65301    }
65302
65303    #[cfg(feature = "job-service")]
65304    impl serde::ser::Serialize for MonitoringScheduleState {
65305        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
65306        where
65307            S: serde::Serializer,
65308        {
65309            match self {
65310                Self::Unspecified => serializer.serialize_i32(0),
65311                Self::Pending => serializer.serialize_i32(1),
65312                Self::Offline => serializer.serialize_i32(2),
65313                Self::Running => serializer.serialize_i32(3),
65314                Self::UnknownValue(u) => u.0.serialize(serializer),
65315            }
65316        }
65317    }
65318
65319    #[cfg(feature = "job-service")]
65320    impl<'de> serde::de::Deserialize<'de> for MonitoringScheduleState {
65321        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
65322        where
65323            D: serde::Deserializer<'de>,
65324        {
65325            deserializer.deserialize_any(wkt::internal::EnumVisitor::<MonitoringScheduleState>::new(
65326                ".google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.MonitoringScheduleState"))
65327        }
65328    }
65329}
65330
65331/// ModelDeploymentMonitoringBigQueryTable specifies the BigQuery table name
65332/// as well as some information of the logs stored in this table.
65333#[cfg(feature = "job-service")]
65334#[derive(Clone, Default, PartialEq)]
65335#[non_exhaustive]
65336pub struct ModelDeploymentMonitoringBigQueryTable {
65337    /// The source of log.
65338    pub log_source: crate::model::model_deployment_monitoring_big_query_table::LogSource,
65339
65340    /// The type of log.
65341    pub log_type: crate::model::model_deployment_monitoring_big_query_table::LogType,
65342
65343    /// The created BigQuery table to store logs. Customer could do their own query
65344    /// & analysis. Format:
65345    /// `bq://<project_id>.model_deployment_monitoring_<endpoint_id>.<tolower(log_source)>_<tolower(log_type)>`
65346    pub bigquery_table_path: std::string::String,
65347
65348    /// Output only. The schema version of the request/response logging BigQuery
65349    /// table. Default to v1 if unset.
65350    pub request_response_logging_schema_version: std::string::String,
65351
65352    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
65353}
65354
65355#[cfg(feature = "job-service")]
65356impl ModelDeploymentMonitoringBigQueryTable {
65357    pub fn new() -> Self {
65358        std::default::Default::default()
65359    }
65360
65361    /// Sets the value of [log_source][crate::model::ModelDeploymentMonitoringBigQueryTable::log_source].
65362    pub fn set_log_source<
65363        T: std::convert::Into<crate::model::model_deployment_monitoring_big_query_table::LogSource>,
65364    >(
65365        mut self,
65366        v: T,
65367    ) -> Self {
65368        self.log_source = v.into();
65369        self
65370    }
65371
65372    /// Sets the value of [log_type][crate::model::ModelDeploymentMonitoringBigQueryTable::log_type].
65373    pub fn set_log_type<
65374        T: std::convert::Into<crate::model::model_deployment_monitoring_big_query_table::LogType>,
65375    >(
65376        mut self,
65377        v: T,
65378    ) -> Self {
65379        self.log_type = v.into();
65380        self
65381    }
65382
65383    /// Sets the value of [bigquery_table_path][crate::model::ModelDeploymentMonitoringBigQueryTable::bigquery_table_path].
65384    pub fn set_bigquery_table_path<T: std::convert::Into<std::string::String>>(
65385        mut self,
65386        v: T,
65387    ) -> Self {
65388        self.bigquery_table_path = v.into();
65389        self
65390    }
65391
65392    /// Sets the value of [request_response_logging_schema_version][crate::model::ModelDeploymentMonitoringBigQueryTable::request_response_logging_schema_version].
65393    pub fn set_request_response_logging_schema_version<
65394        T: std::convert::Into<std::string::String>,
65395    >(
65396        mut self,
65397        v: T,
65398    ) -> Self {
65399        self.request_response_logging_schema_version = v.into();
65400        self
65401    }
65402}
65403
65404#[cfg(feature = "job-service")]
65405impl wkt::message::Message for ModelDeploymentMonitoringBigQueryTable {
65406    fn typename() -> &'static str {
65407        "type.googleapis.com/google.cloud.aiplatform.v1.ModelDeploymentMonitoringBigQueryTable"
65408    }
65409}
65410
65411/// Defines additional types related to [ModelDeploymentMonitoringBigQueryTable].
65412#[cfg(feature = "job-service")]
65413pub mod model_deployment_monitoring_big_query_table {
65414    #[allow(unused_imports)]
65415    use super::*;
65416
65417    /// Indicates where does the log come from.
65418    ///
65419    /// # Working with unknown values
65420    ///
65421    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
65422    /// additional enum variants at any time. Adding new variants is not considered
65423    /// a breaking change. Applications should write their code in anticipation of:
65424    ///
65425    /// - New values appearing in future releases of the client library, **and**
65426    /// - New values received dynamically, without application changes.
65427    ///
65428    /// Please consult the [Working with enums] section in the user guide for some
65429    /// guidelines.
65430    ///
65431    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
65432    #[cfg(feature = "job-service")]
65433    #[derive(Clone, Debug, PartialEq)]
65434    #[non_exhaustive]
65435    pub enum LogSource {
65436        /// Unspecified source.
65437        Unspecified,
65438        /// Logs coming from Training dataset.
65439        Training,
65440        /// Logs coming from Serving traffic.
65441        Serving,
65442        /// If set, the enum was initialized with an unknown value.
65443        ///
65444        /// Applications can examine the value using [LogSource::value] or
65445        /// [LogSource::name].
65446        UnknownValue(log_source::UnknownValue),
65447    }
65448
65449    #[doc(hidden)]
65450    #[cfg(feature = "job-service")]
65451    pub mod log_source {
65452        #[allow(unused_imports)]
65453        use super::*;
65454        #[derive(Clone, Debug, PartialEq)]
65455        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
65456    }
65457
65458    #[cfg(feature = "job-service")]
65459    impl LogSource {
65460        /// Gets the enum value.
65461        ///
65462        /// Returns `None` if the enum contains an unknown value deserialized from
65463        /// the string representation of enums.
65464        pub fn value(&self) -> std::option::Option<i32> {
65465            match self {
65466                Self::Unspecified => std::option::Option::Some(0),
65467                Self::Training => std::option::Option::Some(1),
65468                Self::Serving => std::option::Option::Some(2),
65469                Self::UnknownValue(u) => u.0.value(),
65470            }
65471        }
65472
65473        /// Gets the enum value as a string.
65474        ///
65475        /// Returns `None` if the enum contains an unknown value deserialized from
65476        /// the integer representation of enums.
65477        pub fn name(&self) -> std::option::Option<&str> {
65478            match self {
65479                Self::Unspecified => std::option::Option::Some("LOG_SOURCE_UNSPECIFIED"),
65480                Self::Training => std::option::Option::Some("TRAINING"),
65481                Self::Serving => std::option::Option::Some("SERVING"),
65482                Self::UnknownValue(u) => u.0.name(),
65483            }
65484        }
65485    }
65486
65487    #[cfg(feature = "job-service")]
65488    impl std::default::Default for LogSource {
65489        fn default() -> Self {
65490            use std::convert::From;
65491            Self::from(0)
65492        }
65493    }
65494
65495    #[cfg(feature = "job-service")]
65496    impl std::fmt::Display for LogSource {
65497        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
65498            wkt::internal::display_enum(f, self.name(), self.value())
65499        }
65500    }
65501
65502    #[cfg(feature = "job-service")]
65503    impl std::convert::From<i32> for LogSource {
65504        fn from(value: i32) -> Self {
65505            match value {
65506                0 => Self::Unspecified,
65507                1 => Self::Training,
65508                2 => Self::Serving,
65509                _ => Self::UnknownValue(log_source::UnknownValue(
65510                    wkt::internal::UnknownEnumValue::Integer(value),
65511                )),
65512            }
65513        }
65514    }
65515
65516    #[cfg(feature = "job-service")]
65517    impl std::convert::From<&str> for LogSource {
65518        fn from(value: &str) -> Self {
65519            use std::string::ToString;
65520            match value {
65521                "LOG_SOURCE_UNSPECIFIED" => Self::Unspecified,
65522                "TRAINING" => Self::Training,
65523                "SERVING" => Self::Serving,
65524                _ => Self::UnknownValue(log_source::UnknownValue(
65525                    wkt::internal::UnknownEnumValue::String(value.to_string()),
65526                )),
65527            }
65528        }
65529    }
65530
65531    #[cfg(feature = "job-service")]
65532    impl serde::ser::Serialize for LogSource {
65533        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
65534        where
65535            S: serde::Serializer,
65536        {
65537            match self {
65538                Self::Unspecified => serializer.serialize_i32(0),
65539                Self::Training => serializer.serialize_i32(1),
65540                Self::Serving => serializer.serialize_i32(2),
65541                Self::UnknownValue(u) => u.0.serialize(serializer),
65542            }
65543        }
65544    }
65545
65546    #[cfg(feature = "job-service")]
65547    impl<'de> serde::de::Deserialize<'de> for LogSource {
65548        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
65549        where
65550            D: serde::Deserializer<'de>,
65551        {
65552            deserializer.deserialize_any(wkt::internal::EnumVisitor::<LogSource>::new(
65553                ".google.cloud.aiplatform.v1.ModelDeploymentMonitoringBigQueryTable.LogSource",
65554            ))
65555        }
65556    }
65557
65558    /// Indicates what type of traffic does the log belong to.
65559    ///
65560    /// # Working with unknown values
65561    ///
65562    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
65563    /// additional enum variants at any time. Adding new variants is not considered
65564    /// a breaking change. Applications should write their code in anticipation of:
65565    ///
65566    /// - New values appearing in future releases of the client library, **and**
65567    /// - New values received dynamically, without application changes.
65568    ///
65569    /// Please consult the [Working with enums] section in the user guide for some
65570    /// guidelines.
65571    ///
65572    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
65573    #[cfg(feature = "job-service")]
65574    #[derive(Clone, Debug, PartialEq)]
65575    #[non_exhaustive]
65576    pub enum LogType {
65577        /// Unspecified type.
65578        Unspecified,
65579        /// Predict logs.
65580        Predict,
65581        /// Explain logs.
65582        Explain,
65583        /// If set, the enum was initialized with an unknown value.
65584        ///
65585        /// Applications can examine the value using [LogType::value] or
65586        /// [LogType::name].
65587        UnknownValue(log_type::UnknownValue),
65588    }
65589
65590    #[doc(hidden)]
65591    #[cfg(feature = "job-service")]
65592    pub mod log_type {
65593        #[allow(unused_imports)]
65594        use super::*;
65595        #[derive(Clone, Debug, PartialEq)]
65596        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
65597    }
65598
65599    #[cfg(feature = "job-service")]
65600    impl LogType {
65601        /// Gets the enum value.
65602        ///
65603        /// Returns `None` if the enum contains an unknown value deserialized from
65604        /// the string representation of enums.
65605        pub fn value(&self) -> std::option::Option<i32> {
65606            match self {
65607                Self::Unspecified => std::option::Option::Some(0),
65608                Self::Predict => std::option::Option::Some(1),
65609                Self::Explain => std::option::Option::Some(2),
65610                Self::UnknownValue(u) => u.0.value(),
65611            }
65612        }
65613
65614        /// Gets the enum value as a string.
65615        ///
65616        /// Returns `None` if the enum contains an unknown value deserialized from
65617        /// the integer representation of enums.
65618        pub fn name(&self) -> std::option::Option<&str> {
65619            match self {
65620                Self::Unspecified => std::option::Option::Some("LOG_TYPE_UNSPECIFIED"),
65621                Self::Predict => std::option::Option::Some("PREDICT"),
65622                Self::Explain => std::option::Option::Some("EXPLAIN"),
65623                Self::UnknownValue(u) => u.0.name(),
65624            }
65625        }
65626    }
65627
65628    #[cfg(feature = "job-service")]
65629    impl std::default::Default for LogType {
65630        fn default() -> Self {
65631            use std::convert::From;
65632            Self::from(0)
65633        }
65634    }
65635
65636    #[cfg(feature = "job-service")]
65637    impl std::fmt::Display for LogType {
65638        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
65639            wkt::internal::display_enum(f, self.name(), self.value())
65640        }
65641    }
65642
65643    #[cfg(feature = "job-service")]
65644    impl std::convert::From<i32> for LogType {
65645        fn from(value: i32) -> Self {
65646            match value {
65647                0 => Self::Unspecified,
65648                1 => Self::Predict,
65649                2 => Self::Explain,
65650                _ => Self::UnknownValue(log_type::UnknownValue(
65651                    wkt::internal::UnknownEnumValue::Integer(value),
65652                )),
65653            }
65654        }
65655    }
65656
65657    #[cfg(feature = "job-service")]
65658    impl std::convert::From<&str> for LogType {
65659        fn from(value: &str) -> Self {
65660            use std::string::ToString;
65661            match value {
65662                "LOG_TYPE_UNSPECIFIED" => Self::Unspecified,
65663                "PREDICT" => Self::Predict,
65664                "EXPLAIN" => Self::Explain,
65665                _ => Self::UnknownValue(log_type::UnknownValue(
65666                    wkt::internal::UnknownEnumValue::String(value.to_string()),
65667                )),
65668            }
65669        }
65670    }
65671
65672    #[cfg(feature = "job-service")]
65673    impl serde::ser::Serialize for LogType {
65674        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
65675        where
65676            S: serde::Serializer,
65677        {
65678            match self {
65679                Self::Unspecified => serializer.serialize_i32(0),
65680                Self::Predict => serializer.serialize_i32(1),
65681                Self::Explain => serializer.serialize_i32(2),
65682                Self::UnknownValue(u) => u.0.serialize(serializer),
65683            }
65684        }
65685    }
65686
65687    #[cfg(feature = "job-service")]
65688    impl<'de> serde::de::Deserialize<'de> for LogType {
65689        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
65690        where
65691            D: serde::Deserializer<'de>,
65692        {
65693            deserializer.deserialize_any(wkt::internal::EnumVisitor::<LogType>::new(
65694                ".google.cloud.aiplatform.v1.ModelDeploymentMonitoringBigQueryTable.LogType",
65695            ))
65696        }
65697    }
65698}
65699
65700/// ModelDeploymentMonitoringObjectiveConfig contains the pair of
65701/// deployed_model_id to ModelMonitoringObjectiveConfig.
65702#[cfg(feature = "job-service")]
65703#[derive(Clone, Default, PartialEq)]
65704#[non_exhaustive]
65705pub struct ModelDeploymentMonitoringObjectiveConfig {
65706    /// The DeployedModel ID of the objective config.
65707    pub deployed_model_id: std::string::String,
65708
65709    /// The objective config of for the modelmonitoring job of this deployed model.
65710    pub objective_config: std::option::Option<crate::model::ModelMonitoringObjectiveConfig>,
65711
65712    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
65713}
65714
65715#[cfg(feature = "job-service")]
65716impl ModelDeploymentMonitoringObjectiveConfig {
65717    pub fn new() -> Self {
65718        std::default::Default::default()
65719    }
65720
65721    /// Sets the value of [deployed_model_id][crate::model::ModelDeploymentMonitoringObjectiveConfig::deployed_model_id].
65722    pub fn set_deployed_model_id<T: std::convert::Into<std::string::String>>(
65723        mut self,
65724        v: T,
65725    ) -> Self {
65726        self.deployed_model_id = v.into();
65727        self
65728    }
65729
65730    /// Sets the value of [objective_config][crate::model::ModelDeploymentMonitoringObjectiveConfig::objective_config].
65731    pub fn set_objective_config<T>(mut self, v: T) -> Self
65732    where
65733        T: std::convert::Into<crate::model::ModelMonitoringObjectiveConfig>,
65734    {
65735        self.objective_config = std::option::Option::Some(v.into());
65736        self
65737    }
65738
65739    /// Sets or clears the value of [objective_config][crate::model::ModelDeploymentMonitoringObjectiveConfig::objective_config].
65740    pub fn set_or_clear_objective_config<T>(mut self, v: std::option::Option<T>) -> Self
65741    where
65742        T: std::convert::Into<crate::model::ModelMonitoringObjectiveConfig>,
65743    {
65744        self.objective_config = v.map(|x| x.into());
65745        self
65746    }
65747}
65748
65749#[cfg(feature = "job-service")]
65750impl wkt::message::Message for ModelDeploymentMonitoringObjectiveConfig {
65751    fn typename() -> &'static str {
65752        "type.googleapis.com/google.cloud.aiplatform.v1.ModelDeploymentMonitoringObjectiveConfig"
65753    }
65754}
65755
65756/// The config for scheduling monitoring job.
65757#[cfg(feature = "job-service")]
65758#[derive(Clone, Default, PartialEq)]
65759#[non_exhaustive]
65760pub struct ModelDeploymentMonitoringScheduleConfig {
65761    /// Required. The model monitoring job scheduling interval. It will be rounded
65762    /// up to next full hour. This defines how often the monitoring jobs are
65763    /// triggered.
65764    pub monitor_interval: std::option::Option<wkt::Duration>,
65765
65766    /// The time window of the prediction data being included in each prediction
65767    /// dataset. This window specifies how long the data should be collected from
65768    /// historical model results for each run. If not set,
65769    /// [ModelDeploymentMonitoringScheduleConfig.monitor_interval][google.cloud.aiplatform.v1.ModelDeploymentMonitoringScheduleConfig.monitor_interval]
65770    /// will be used. e.g. If currently the cutoff time is 2022-01-08 14:30:00 and
65771    /// the monitor_window is set to be 3600, then data from 2022-01-08 13:30:00 to
65772    /// 2022-01-08 14:30:00 will be retrieved and aggregated to calculate the
65773    /// monitoring statistics.
65774    ///
65775    /// [google.cloud.aiplatform.v1.ModelDeploymentMonitoringScheduleConfig.monitor_interval]: crate::model::ModelDeploymentMonitoringScheduleConfig::monitor_interval
65776    pub monitor_window: std::option::Option<wkt::Duration>,
65777
65778    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
65779}
65780
65781#[cfg(feature = "job-service")]
65782impl ModelDeploymentMonitoringScheduleConfig {
65783    pub fn new() -> Self {
65784        std::default::Default::default()
65785    }
65786
65787    /// Sets the value of [monitor_interval][crate::model::ModelDeploymentMonitoringScheduleConfig::monitor_interval].
65788    pub fn set_monitor_interval<T>(mut self, v: T) -> Self
65789    where
65790        T: std::convert::Into<wkt::Duration>,
65791    {
65792        self.monitor_interval = std::option::Option::Some(v.into());
65793        self
65794    }
65795
65796    /// Sets or clears the value of [monitor_interval][crate::model::ModelDeploymentMonitoringScheduleConfig::monitor_interval].
65797    pub fn set_or_clear_monitor_interval<T>(mut self, v: std::option::Option<T>) -> Self
65798    where
65799        T: std::convert::Into<wkt::Duration>,
65800    {
65801        self.monitor_interval = v.map(|x| x.into());
65802        self
65803    }
65804
65805    /// Sets the value of [monitor_window][crate::model::ModelDeploymentMonitoringScheduleConfig::monitor_window].
65806    pub fn set_monitor_window<T>(mut self, v: T) -> Self
65807    where
65808        T: std::convert::Into<wkt::Duration>,
65809    {
65810        self.monitor_window = std::option::Option::Some(v.into());
65811        self
65812    }
65813
65814    /// Sets or clears the value of [monitor_window][crate::model::ModelDeploymentMonitoringScheduleConfig::monitor_window].
65815    pub fn set_or_clear_monitor_window<T>(mut self, v: std::option::Option<T>) -> Self
65816    where
65817        T: std::convert::Into<wkt::Duration>,
65818    {
65819        self.monitor_window = v.map(|x| x.into());
65820        self
65821    }
65822}
65823
65824#[cfg(feature = "job-service")]
65825impl wkt::message::Message for ModelDeploymentMonitoringScheduleConfig {
65826    fn typename() -> &'static str {
65827        "type.googleapis.com/google.cloud.aiplatform.v1.ModelDeploymentMonitoringScheduleConfig"
65828    }
65829}
65830
65831/// Statistics and anomalies generated by Model Monitoring.
65832#[cfg(feature = "job-service")]
65833#[derive(Clone, Default, PartialEq)]
65834#[non_exhaustive]
65835pub struct ModelMonitoringStatsAnomalies {
65836    /// Model Monitoring Objective those stats and anomalies belonging to.
65837    pub objective: crate::model::ModelDeploymentMonitoringObjectiveType,
65838
65839    /// Deployed Model ID.
65840    pub deployed_model_id: std::string::String,
65841
65842    /// Number of anomalies within all stats.
65843    pub anomaly_count: i32,
65844
65845    /// A list of historical Stats and Anomalies generated for all Features.
65846    pub feature_stats: std::vec::Vec<
65847        crate::model::model_monitoring_stats_anomalies::FeatureHistoricStatsAnomalies,
65848    >,
65849
65850    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
65851}
65852
65853#[cfg(feature = "job-service")]
65854impl ModelMonitoringStatsAnomalies {
65855    pub fn new() -> Self {
65856        std::default::Default::default()
65857    }
65858
65859    /// Sets the value of [objective][crate::model::ModelMonitoringStatsAnomalies::objective].
65860    pub fn set_objective<
65861        T: std::convert::Into<crate::model::ModelDeploymentMonitoringObjectiveType>,
65862    >(
65863        mut self,
65864        v: T,
65865    ) -> Self {
65866        self.objective = v.into();
65867        self
65868    }
65869
65870    /// Sets the value of [deployed_model_id][crate::model::ModelMonitoringStatsAnomalies::deployed_model_id].
65871    pub fn set_deployed_model_id<T: std::convert::Into<std::string::String>>(
65872        mut self,
65873        v: T,
65874    ) -> Self {
65875        self.deployed_model_id = v.into();
65876        self
65877    }
65878
65879    /// Sets the value of [anomaly_count][crate::model::ModelMonitoringStatsAnomalies::anomaly_count].
65880    pub fn set_anomaly_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
65881        self.anomaly_count = v.into();
65882        self
65883    }
65884
65885    /// Sets the value of [feature_stats][crate::model::ModelMonitoringStatsAnomalies::feature_stats].
65886    pub fn set_feature_stats<T, V>(mut self, v: T) -> Self
65887    where
65888        T: std::iter::IntoIterator<Item = V>,
65889        V: std::convert::Into<
65890                crate::model::model_monitoring_stats_anomalies::FeatureHistoricStatsAnomalies,
65891            >,
65892    {
65893        use std::iter::Iterator;
65894        self.feature_stats = v.into_iter().map(|i| i.into()).collect();
65895        self
65896    }
65897}
65898
65899#[cfg(feature = "job-service")]
65900impl wkt::message::Message for ModelMonitoringStatsAnomalies {
65901    fn typename() -> &'static str {
65902        "type.googleapis.com/google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies"
65903    }
65904}
65905
65906/// Defines additional types related to [ModelMonitoringStatsAnomalies].
65907#[cfg(feature = "job-service")]
65908pub mod model_monitoring_stats_anomalies {
65909    #[allow(unused_imports)]
65910    use super::*;
65911
65912    /// Historical Stats (and Anomalies) for a specific Feature.
65913    #[cfg(feature = "job-service")]
65914    #[derive(Clone, Default, PartialEq)]
65915    #[non_exhaustive]
65916    pub struct FeatureHistoricStatsAnomalies {
65917        /// Display Name of the Feature.
65918        pub feature_display_name: std::string::String,
65919
65920        /// Threshold for anomaly detection.
65921        pub threshold: std::option::Option<crate::model::ThresholdConfig>,
65922
65923        /// Stats calculated for the Training Dataset.
65924        pub training_stats: std::option::Option<crate::model::FeatureStatsAnomaly>,
65925
65926        /// A list of historical stats generated by different time window's
65927        /// Prediction Dataset.
65928        pub prediction_stats: std::vec::Vec<crate::model::FeatureStatsAnomaly>,
65929
65930        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
65931    }
65932
65933    #[cfg(feature = "job-service")]
65934    impl FeatureHistoricStatsAnomalies {
65935        pub fn new() -> Self {
65936            std::default::Default::default()
65937        }
65938
65939        /// Sets the value of [feature_display_name][crate::model::model_monitoring_stats_anomalies::FeatureHistoricStatsAnomalies::feature_display_name].
65940        pub fn set_feature_display_name<T: std::convert::Into<std::string::String>>(
65941            mut self,
65942            v: T,
65943        ) -> Self {
65944            self.feature_display_name = v.into();
65945            self
65946        }
65947
65948        /// Sets the value of [threshold][crate::model::model_monitoring_stats_anomalies::FeatureHistoricStatsAnomalies::threshold].
65949        pub fn set_threshold<T>(mut self, v: T) -> Self
65950        where
65951            T: std::convert::Into<crate::model::ThresholdConfig>,
65952        {
65953            self.threshold = std::option::Option::Some(v.into());
65954            self
65955        }
65956
65957        /// Sets or clears the value of [threshold][crate::model::model_monitoring_stats_anomalies::FeatureHistoricStatsAnomalies::threshold].
65958        pub fn set_or_clear_threshold<T>(mut self, v: std::option::Option<T>) -> Self
65959        where
65960            T: std::convert::Into<crate::model::ThresholdConfig>,
65961        {
65962            self.threshold = v.map(|x| x.into());
65963            self
65964        }
65965
65966        /// Sets the value of [training_stats][crate::model::model_monitoring_stats_anomalies::FeatureHistoricStatsAnomalies::training_stats].
65967        pub fn set_training_stats<T>(mut self, v: T) -> Self
65968        where
65969            T: std::convert::Into<crate::model::FeatureStatsAnomaly>,
65970        {
65971            self.training_stats = std::option::Option::Some(v.into());
65972            self
65973        }
65974
65975        /// Sets or clears the value of [training_stats][crate::model::model_monitoring_stats_anomalies::FeatureHistoricStatsAnomalies::training_stats].
65976        pub fn set_or_clear_training_stats<T>(mut self, v: std::option::Option<T>) -> Self
65977        where
65978            T: std::convert::Into<crate::model::FeatureStatsAnomaly>,
65979        {
65980            self.training_stats = v.map(|x| x.into());
65981            self
65982        }
65983
65984        /// Sets the value of [prediction_stats][crate::model::model_monitoring_stats_anomalies::FeatureHistoricStatsAnomalies::prediction_stats].
65985        pub fn set_prediction_stats<T, V>(mut self, v: T) -> Self
65986        where
65987            T: std::iter::IntoIterator<Item = V>,
65988            V: std::convert::Into<crate::model::FeatureStatsAnomaly>,
65989        {
65990            use std::iter::Iterator;
65991            self.prediction_stats = v.into_iter().map(|i| i.into()).collect();
65992            self
65993        }
65994    }
65995
65996    #[cfg(feature = "job-service")]
65997    impl wkt::message::Message for FeatureHistoricStatsAnomalies {
65998        fn typename() -> &'static str {
65999            "type.googleapis.com/google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies"
66000        }
66001    }
66002}
66003
66004/// A collection of metrics calculated by comparing Model's predictions on all of
66005/// the test data against annotations from the test data.
66006#[cfg(feature = "model-service")]
66007#[derive(Clone, Default, PartialEq)]
66008#[non_exhaustive]
66009pub struct ModelEvaluation {
66010    /// Output only. The resource name of the ModelEvaluation.
66011    pub name: std::string::String,
66012
66013    /// The display name of the ModelEvaluation.
66014    pub display_name: std::string::String,
66015
66016    /// Points to a YAML file stored on Google Cloud Storage describing the
66017    /// [metrics][google.cloud.aiplatform.v1.ModelEvaluation.metrics] of this
66018    /// ModelEvaluation. The schema is defined as an OpenAPI 3.0.2 [Schema
66019    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
66020    ///
66021    /// [google.cloud.aiplatform.v1.ModelEvaluation.metrics]: crate::model::ModelEvaluation::metrics
66022    pub metrics_schema_uri: std::string::String,
66023
66024    /// Evaluation metrics of the Model. The schema of the metrics is stored in
66025    /// [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]
66026    ///
66027    /// [google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri]: crate::model::ModelEvaluation::metrics_schema_uri
66028    pub metrics: std::option::Option<wkt::Value>,
66029
66030    /// Output only. Timestamp when this ModelEvaluation was created.
66031    pub create_time: std::option::Option<wkt::Timestamp>,
66032
66033    /// All possible
66034    /// [dimensions][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.dimension]
66035    /// of ModelEvaluationSlices. The dimensions can be used as the filter of the
66036    /// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices]
66037    /// request, in the form of `slice.dimension = <dimension>`.
66038    ///
66039    /// [google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.dimension]: crate::model::model_evaluation_slice::Slice::dimension
66040    /// [google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices]: crate::client::ModelService::list_model_evaluation_slices
66041    pub slice_dimensions: std::vec::Vec<std::string::String>,
66042
66043    /// Points to a YAML file stored on Google Cloud Storage describing
66044    /// [EvaluatedDataItemView.data_item_payload][] and
66045    /// [EvaluatedAnnotation.data_item_payload][google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload].
66046    /// The schema is defined as an OpenAPI 3.0.2 [Schema
66047    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
66048    ///
66049    /// This field is not populated if there are neither EvaluatedDataItemViews nor
66050    /// EvaluatedAnnotations under this ModelEvaluation.
66051    ///
66052    /// [google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload]: crate::model::EvaluatedAnnotation::data_item_payload
66053    pub data_item_schema_uri: std::string::String,
66054
66055    /// Points to a YAML file stored on Google Cloud Storage describing
66056    /// [EvaluatedDataItemView.predictions][],
66057    /// [EvaluatedDataItemView.ground_truths][],
66058    /// [EvaluatedAnnotation.predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions],
66059    /// and
66060    /// [EvaluatedAnnotation.ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths].
66061    /// The schema is defined as an OpenAPI 3.0.2 [Schema
66062    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
66063    ///
66064    /// This field is not populated if there are neither EvaluatedDataItemViews nor
66065    /// EvaluatedAnnotations under this ModelEvaluation.
66066    ///
66067    /// [google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths]: crate::model::EvaluatedAnnotation::ground_truths
66068    /// [google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions]: crate::model::EvaluatedAnnotation::predictions
66069    pub annotation_schema_uri: std::string::String,
66070
66071    /// Aggregated explanation metrics for the Model's prediction output over the
66072    /// data this ModelEvaluation uses. This field is populated only if the Model
66073    /// is evaluated with explanations, and only for AutoML tabular Models.
66074    pub model_explanation: std::option::Option<crate::model::ModelExplanation>,
66075
66076    /// Describes the values of
66077    /// [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] that are used
66078    /// for explaining the predicted values on the evaluated data.
66079    ///
66080    /// [google.cloud.aiplatform.v1.ExplanationSpec]: crate::model::ExplanationSpec
66081    pub explanation_specs:
66082        std::vec::Vec<crate::model::model_evaluation::ModelEvaluationExplanationSpec>,
66083
66084    /// The metadata of the ModelEvaluation.
66085    /// For the ModelEvaluation uploaded from Managed Pipeline, metadata contains a
66086    /// structured value with keys of "pipeline_job_id", "evaluation_dataset_type",
66087    /// "evaluation_dataset_path", "row_based_metrics_path".
66088    pub metadata: std::option::Option<wkt::Value>,
66089
66090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
66091}
66092
66093#[cfg(feature = "model-service")]
66094impl ModelEvaluation {
66095    pub fn new() -> Self {
66096        std::default::Default::default()
66097    }
66098
66099    /// Sets the value of [name][crate::model::ModelEvaluation::name].
66100    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
66101        self.name = v.into();
66102        self
66103    }
66104
66105    /// Sets the value of [display_name][crate::model::ModelEvaluation::display_name].
66106    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
66107        self.display_name = v.into();
66108        self
66109    }
66110
66111    /// Sets the value of [metrics_schema_uri][crate::model::ModelEvaluation::metrics_schema_uri].
66112    pub fn set_metrics_schema_uri<T: std::convert::Into<std::string::String>>(
66113        mut self,
66114        v: T,
66115    ) -> Self {
66116        self.metrics_schema_uri = v.into();
66117        self
66118    }
66119
66120    /// Sets the value of [metrics][crate::model::ModelEvaluation::metrics].
66121    pub fn set_metrics<T>(mut self, v: T) -> Self
66122    where
66123        T: std::convert::Into<wkt::Value>,
66124    {
66125        self.metrics = std::option::Option::Some(v.into());
66126        self
66127    }
66128
66129    /// Sets or clears the value of [metrics][crate::model::ModelEvaluation::metrics].
66130    pub fn set_or_clear_metrics<T>(mut self, v: std::option::Option<T>) -> Self
66131    where
66132        T: std::convert::Into<wkt::Value>,
66133    {
66134        self.metrics = v.map(|x| x.into());
66135        self
66136    }
66137
66138    /// Sets the value of [create_time][crate::model::ModelEvaluation::create_time].
66139    pub fn set_create_time<T>(mut self, v: T) -> Self
66140    where
66141        T: std::convert::Into<wkt::Timestamp>,
66142    {
66143        self.create_time = std::option::Option::Some(v.into());
66144        self
66145    }
66146
66147    /// Sets or clears the value of [create_time][crate::model::ModelEvaluation::create_time].
66148    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
66149    where
66150        T: std::convert::Into<wkt::Timestamp>,
66151    {
66152        self.create_time = v.map(|x| x.into());
66153        self
66154    }
66155
66156    /// Sets the value of [slice_dimensions][crate::model::ModelEvaluation::slice_dimensions].
66157    pub fn set_slice_dimensions<T, V>(mut self, v: T) -> Self
66158    where
66159        T: std::iter::IntoIterator<Item = V>,
66160        V: std::convert::Into<std::string::String>,
66161    {
66162        use std::iter::Iterator;
66163        self.slice_dimensions = v.into_iter().map(|i| i.into()).collect();
66164        self
66165    }
66166
66167    /// Sets the value of [data_item_schema_uri][crate::model::ModelEvaluation::data_item_schema_uri].
66168    pub fn set_data_item_schema_uri<T: std::convert::Into<std::string::String>>(
66169        mut self,
66170        v: T,
66171    ) -> Self {
66172        self.data_item_schema_uri = v.into();
66173        self
66174    }
66175
66176    /// Sets the value of [annotation_schema_uri][crate::model::ModelEvaluation::annotation_schema_uri].
66177    pub fn set_annotation_schema_uri<T: std::convert::Into<std::string::String>>(
66178        mut self,
66179        v: T,
66180    ) -> Self {
66181        self.annotation_schema_uri = v.into();
66182        self
66183    }
66184
66185    /// Sets the value of [model_explanation][crate::model::ModelEvaluation::model_explanation].
66186    pub fn set_model_explanation<T>(mut self, v: T) -> Self
66187    where
66188        T: std::convert::Into<crate::model::ModelExplanation>,
66189    {
66190        self.model_explanation = std::option::Option::Some(v.into());
66191        self
66192    }
66193
66194    /// Sets or clears the value of [model_explanation][crate::model::ModelEvaluation::model_explanation].
66195    pub fn set_or_clear_model_explanation<T>(mut self, v: std::option::Option<T>) -> Self
66196    where
66197        T: std::convert::Into<crate::model::ModelExplanation>,
66198    {
66199        self.model_explanation = v.map(|x| x.into());
66200        self
66201    }
66202
66203    /// Sets the value of [explanation_specs][crate::model::ModelEvaluation::explanation_specs].
66204    pub fn set_explanation_specs<T, V>(mut self, v: T) -> Self
66205    where
66206        T: std::iter::IntoIterator<Item = V>,
66207        V: std::convert::Into<crate::model::model_evaluation::ModelEvaluationExplanationSpec>,
66208    {
66209        use std::iter::Iterator;
66210        self.explanation_specs = v.into_iter().map(|i| i.into()).collect();
66211        self
66212    }
66213
66214    /// Sets the value of [metadata][crate::model::ModelEvaluation::metadata].
66215    pub fn set_metadata<T>(mut self, v: T) -> Self
66216    where
66217        T: std::convert::Into<wkt::Value>,
66218    {
66219        self.metadata = std::option::Option::Some(v.into());
66220        self
66221    }
66222
66223    /// Sets or clears the value of [metadata][crate::model::ModelEvaluation::metadata].
66224    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
66225    where
66226        T: std::convert::Into<wkt::Value>,
66227    {
66228        self.metadata = v.map(|x| x.into());
66229        self
66230    }
66231}
66232
66233#[cfg(feature = "model-service")]
66234impl wkt::message::Message for ModelEvaluation {
66235    fn typename() -> &'static str {
66236        "type.googleapis.com/google.cloud.aiplatform.v1.ModelEvaluation"
66237    }
66238}
66239
66240/// Defines additional types related to [ModelEvaluation].
66241#[cfg(feature = "model-service")]
66242pub mod model_evaluation {
66243    #[allow(unused_imports)]
66244    use super::*;
66245
66246    #[cfg(feature = "model-service")]
66247    #[derive(Clone, Default, PartialEq)]
66248    #[non_exhaustive]
66249    pub struct ModelEvaluationExplanationSpec {
66250        /// Explanation type.
66251        ///
66252        /// For AutoML Image Classification models, possible values are:
66253        ///
66254        /// * `image-integrated-gradients`
66255        /// * `image-xrai`
66256        pub explanation_type: std::string::String,
66257
66258        /// Explanation spec details.
66259        pub explanation_spec: std::option::Option<crate::model::ExplanationSpec>,
66260
66261        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
66262    }
66263
66264    #[cfg(feature = "model-service")]
66265    impl ModelEvaluationExplanationSpec {
66266        pub fn new() -> Self {
66267            std::default::Default::default()
66268        }
66269
66270        /// Sets the value of [explanation_type][crate::model::model_evaluation::ModelEvaluationExplanationSpec::explanation_type].
66271        pub fn set_explanation_type<T: std::convert::Into<std::string::String>>(
66272            mut self,
66273            v: T,
66274        ) -> Self {
66275            self.explanation_type = v.into();
66276            self
66277        }
66278
66279        /// Sets the value of [explanation_spec][crate::model::model_evaluation::ModelEvaluationExplanationSpec::explanation_spec].
66280        pub fn set_explanation_spec<T>(mut self, v: T) -> Self
66281        where
66282            T: std::convert::Into<crate::model::ExplanationSpec>,
66283        {
66284            self.explanation_spec = std::option::Option::Some(v.into());
66285            self
66286        }
66287
66288        /// Sets or clears the value of [explanation_spec][crate::model::model_evaluation::ModelEvaluationExplanationSpec::explanation_spec].
66289        pub fn set_or_clear_explanation_spec<T>(mut self, v: std::option::Option<T>) -> Self
66290        where
66291            T: std::convert::Into<crate::model::ExplanationSpec>,
66292        {
66293            self.explanation_spec = v.map(|x| x.into());
66294            self
66295        }
66296    }
66297
66298    #[cfg(feature = "model-service")]
66299    impl wkt::message::Message for ModelEvaluationExplanationSpec {
66300        fn typename() -> &'static str {
66301            "type.googleapis.com/google.cloud.aiplatform.v1.ModelEvaluation.ModelEvaluationExplanationSpec"
66302        }
66303    }
66304}
66305
66306/// A collection of metrics calculated by comparing Model's predictions on a
66307/// slice of the test data against ground truth annotations.
66308#[cfg(feature = "model-service")]
66309#[derive(Clone, Default, PartialEq)]
66310#[non_exhaustive]
66311pub struct ModelEvaluationSlice {
66312    /// Output only. The resource name of the ModelEvaluationSlice.
66313    pub name: std::string::String,
66314
66315    /// Output only. The slice of the test data that is used to evaluate the Model.
66316    pub slice: std::option::Option<crate::model::model_evaluation_slice::Slice>,
66317
66318    /// Output only. Points to a YAML file stored on Google Cloud Storage
66319    /// describing the
66320    /// [metrics][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics] of this
66321    /// ModelEvaluationSlice. The schema is defined as an OpenAPI 3.0.2 [Schema
66322    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
66323    ///
66324    /// [google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics]: crate::model::ModelEvaluationSlice::metrics
66325    pub metrics_schema_uri: std::string::String,
66326
66327    /// Output only. Sliced evaluation metrics of the Model. The schema of the
66328    /// metrics is stored in
66329    /// [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]
66330    ///
66331    /// [google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri]: crate::model::ModelEvaluationSlice::metrics_schema_uri
66332    pub metrics: std::option::Option<wkt::Value>,
66333
66334    /// Output only. Timestamp when this ModelEvaluationSlice was created.
66335    pub create_time: std::option::Option<wkt::Timestamp>,
66336
66337    /// Output only. Aggregated explanation metrics for the Model's prediction
66338    /// output over the data this ModelEvaluation uses. This field is populated
66339    /// only if the Model is evaluated with explanations, and only for tabular
66340    /// Models.
66341    pub model_explanation: std::option::Option<crate::model::ModelExplanation>,
66342
66343    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
66344}
66345
66346#[cfg(feature = "model-service")]
66347impl ModelEvaluationSlice {
66348    pub fn new() -> Self {
66349        std::default::Default::default()
66350    }
66351
66352    /// Sets the value of [name][crate::model::ModelEvaluationSlice::name].
66353    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
66354        self.name = v.into();
66355        self
66356    }
66357
66358    /// Sets the value of [slice][crate::model::ModelEvaluationSlice::slice].
66359    pub fn set_slice<T>(mut self, v: T) -> Self
66360    where
66361        T: std::convert::Into<crate::model::model_evaluation_slice::Slice>,
66362    {
66363        self.slice = std::option::Option::Some(v.into());
66364        self
66365    }
66366
66367    /// Sets or clears the value of [slice][crate::model::ModelEvaluationSlice::slice].
66368    pub fn set_or_clear_slice<T>(mut self, v: std::option::Option<T>) -> Self
66369    where
66370        T: std::convert::Into<crate::model::model_evaluation_slice::Slice>,
66371    {
66372        self.slice = v.map(|x| x.into());
66373        self
66374    }
66375
66376    /// Sets the value of [metrics_schema_uri][crate::model::ModelEvaluationSlice::metrics_schema_uri].
66377    pub fn set_metrics_schema_uri<T: std::convert::Into<std::string::String>>(
66378        mut self,
66379        v: T,
66380    ) -> Self {
66381        self.metrics_schema_uri = v.into();
66382        self
66383    }
66384
66385    /// Sets the value of [metrics][crate::model::ModelEvaluationSlice::metrics].
66386    pub fn set_metrics<T>(mut self, v: T) -> Self
66387    where
66388        T: std::convert::Into<wkt::Value>,
66389    {
66390        self.metrics = std::option::Option::Some(v.into());
66391        self
66392    }
66393
66394    /// Sets or clears the value of [metrics][crate::model::ModelEvaluationSlice::metrics].
66395    pub fn set_or_clear_metrics<T>(mut self, v: std::option::Option<T>) -> Self
66396    where
66397        T: std::convert::Into<wkt::Value>,
66398    {
66399        self.metrics = v.map(|x| x.into());
66400        self
66401    }
66402
66403    /// Sets the value of [create_time][crate::model::ModelEvaluationSlice::create_time].
66404    pub fn set_create_time<T>(mut self, v: T) -> Self
66405    where
66406        T: std::convert::Into<wkt::Timestamp>,
66407    {
66408        self.create_time = std::option::Option::Some(v.into());
66409        self
66410    }
66411
66412    /// Sets or clears the value of [create_time][crate::model::ModelEvaluationSlice::create_time].
66413    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
66414    where
66415        T: std::convert::Into<wkt::Timestamp>,
66416    {
66417        self.create_time = v.map(|x| x.into());
66418        self
66419    }
66420
66421    /// Sets the value of [model_explanation][crate::model::ModelEvaluationSlice::model_explanation].
66422    pub fn set_model_explanation<T>(mut self, v: T) -> Self
66423    where
66424        T: std::convert::Into<crate::model::ModelExplanation>,
66425    {
66426        self.model_explanation = std::option::Option::Some(v.into());
66427        self
66428    }
66429
66430    /// Sets or clears the value of [model_explanation][crate::model::ModelEvaluationSlice::model_explanation].
66431    pub fn set_or_clear_model_explanation<T>(mut self, v: std::option::Option<T>) -> Self
66432    where
66433        T: std::convert::Into<crate::model::ModelExplanation>,
66434    {
66435        self.model_explanation = v.map(|x| x.into());
66436        self
66437    }
66438}
66439
66440#[cfg(feature = "model-service")]
66441impl wkt::message::Message for ModelEvaluationSlice {
66442    fn typename() -> &'static str {
66443        "type.googleapis.com/google.cloud.aiplatform.v1.ModelEvaluationSlice"
66444    }
66445}
66446
66447/// Defines additional types related to [ModelEvaluationSlice].
66448#[cfg(feature = "model-service")]
66449pub mod model_evaluation_slice {
66450    #[allow(unused_imports)]
66451    use super::*;
66452
66453    /// Definition of a slice.
66454    #[cfg(feature = "model-service")]
66455    #[derive(Clone, Default, PartialEq)]
66456    #[non_exhaustive]
66457    pub struct Slice {
66458        /// Output only. The dimension of the slice.
66459        /// Well-known dimensions are:
66460        ///
66461        /// * `annotationSpec`: This slice is on the test data that has either
66462        ///   ground truth or prediction with
66463        ///   [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name]
66464        ///   equals to
66465        ///   [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value].
66466        /// * `slice`: This slice is a user customized slice defined by its
66467        ///   SliceSpec.
66468        ///
66469        /// [google.cloud.aiplatform.v1.AnnotationSpec.display_name]: crate::model::AnnotationSpec::display_name
66470        /// [google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value]: crate::model::model_evaluation_slice::Slice::value
66471        pub dimension: std::string::String,
66472
66473        /// Output only. The value of the dimension in this slice.
66474        pub value: std::string::String,
66475
66476        /// Output only. Specification for how the data was sliced.
66477        pub slice_spec: std::option::Option<crate::model::model_evaluation_slice::slice::SliceSpec>,
66478
66479        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
66480    }
66481
66482    #[cfg(feature = "model-service")]
66483    impl Slice {
66484        pub fn new() -> Self {
66485            std::default::Default::default()
66486        }
66487
66488        /// Sets the value of [dimension][crate::model::model_evaluation_slice::Slice::dimension].
66489        pub fn set_dimension<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
66490            self.dimension = v.into();
66491            self
66492        }
66493
66494        /// Sets the value of [value][crate::model::model_evaluation_slice::Slice::value].
66495        pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
66496            self.value = v.into();
66497            self
66498        }
66499
66500        /// Sets the value of [slice_spec][crate::model::model_evaluation_slice::Slice::slice_spec].
66501        pub fn set_slice_spec<T>(mut self, v: T) -> Self
66502        where
66503            T: std::convert::Into<crate::model::model_evaluation_slice::slice::SliceSpec>,
66504        {
66505            self.slice_spec = std::option::Option::Some(v.into());
66506            self
66507        }
66508
66509        /// Sets or clears the value of [slice_spec][crate::model::model_evaluation_slice::Slice::slice_spec].
66510        pub fn set_or_clear_slice_spec<T>(mut self, v: std::option::Option<T>) -> Self
66511        where
66512            T: std::convert::Into<crate::model::model_evaluation_slice::slice::SliceSpec>,
66513        {
66514            self.slice_spec = v.map(|x| x.into());
66515            self
66516        }
66517    }
66518
66519    #[cfg(feature = "model-service")]
66520    impl wkt::message::Message for Slice {
66521        fn typename() -> &'static str {
66522            "type.googleapis.com/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice"
66523        }
66524    }
66525
66526    /// Defines additional types related to [Slice].
66527    #[cfg(feature = "model-service")]
66528    pub mod slice {
66529        #[allow(unused_imports)]
66530        use super::*;
66531
66532        /// Specification for how the data should be sliced.
66533        #[cfg(feature = "model-service")]
66534        #[derive(Clone, Default, PartialEq)]
66535        #[non_exhaustive]
66536        pub struct SliceSpec {
66537            /// Mapping configuration for this SliceSpec.
66538            /// The key is the name of the feature.
66539            /// By default, the key will be prefixed by "instance" as a dictionary
66540            /// prefix for Vertex Batch Predictions output format.
66541            pub configs: std::collections::HashMap<
66542                std::string::String,
66543                crate::model::model_evaluation_slice::slice::slice_spec::SliceConfig,
66544            >,
66545
66546            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
66547        }
66548
66549        #[cfg(feature = "model-service")]
66550        impl SliceSpec {
66551            pub fn new() -> Self {
66552                std::default::Default::default()
66553            }
66554
66555            /// Sets the value of [configs][crate::model::model_evaluation_slice::slice::SliceSpec::configs].
66556            pub fn set_configs<T, K, V>(mut self, v: T) -> Self
66557            where
66558                T: std::iter::IntoIterator<Item = (K, V)>,
66559                K: std::convert::Into<std::string::String>,
66560                V: std::convert::Into<
66561                        crate::model::model_evaluation_slice::slice::slice_spec::SliceConfig,
66562                    >,
66563            {
66564                use std::iter::Iterator;
66565                self.configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
66566                self
66567            }
66568        }
66569
66570        #[cfg(feature = "model-service")]
66571        impl wkt::message::Message for SliceSpec {
66572            fn typename() -> &'static str {
66573                "type.googleapis.com/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec"
66574            }
66575        }
66576
66577        /// Defines additional types related to [SliceSpec].
66578        #[cfg(feature = "model-service")]
66579        pub mod slice_spec {
66580            #[allow(unused_imports)]
66581            use super::*;
66582
66583            /// Specification message containing the config for this SliceSpec.
66584            /// When `kind` is selected as `value` and/or `range`, only a single slice
66585            /// will be computed.
66586            /// When `all_values` is present, a separate slice will be computed for
66587            /// each possible label/value for the corresponding key in `config`.
66588            /// Examples, with feature zip_code with values 12345, 23334, 88888 and
66589            /// feature country with values "US", "Canada", "Mexico" in the dataset:
66590            ///
66591            /// Example 1:
66592            ///
66593            /// ```norust
66594            /// {
66595            ///   "zip_code": { "value": { "float_value": 12345.0 } }
66596            /// }
66597            /// ```
66598            ///
66599            /// A single slice for any data with zip_code 12345 in the dataset.
66600            ///
66601            /// Example 2:
66602            ///
66603            /// ```norust
66604            /// {
66605            ///   "zip_code": { "range": { "low": 12345, "high": 20000 } }
66606            /// }
66607            /// ```
66608            ///
66609            /// A single slice containing data where the zip_codes between 12345 and
66610            /// 20000 For this example, data with the zip_code of 12345 will be in this
66611            /// slice.
66612            ///
66613            /// Example 3:
66614            ///
66615            /// ```norust
66616            /// {
66617            ///   "zip_code": { "range": { "low": 10000, "high": 20000 } },
66618            ///   "country": { "value": { "string_value": "US" } }
66619            /// }
66620            /// ```
66621            ///
66622            /// A single slice containing data where the zip_codes between 10000 and
66623            /// 20000 has the country "US". For this example, data with the zip_code of
66624            /// 12345 and country "US" will be in this slice.
66625            ///
66626            /// Example 4:
66627            ///
66628            /// ```norust
66629            /// { "country": {"all_values": { "value": true } } }
66630            /// ```
66631            ///
66632            /// Three slices are computed, one for each unique country in the dataset.
66633            ///
66634            /// Example 5:
66635            ///
66636            /// ```norust
66637            /// {
66638            ///   "country": { "all_values": { "value": true } },
66639            ///   "zip_code": { "value": { "float_value": 12345.0 } }
66640            /// }
66641            /// ```
66642            ///
66643            /// Three slices are computed, one for each unique country in the dataset
66644            /// where the zip_code is also 12345. For this example, data with zip_code
66645            /// 12345 and country "US" will be in one slice, zip_code 12345 and country
66646            /// "Canada" in another slice, and zip_code 12345 and country "Mexico" in
66647            /// another slice, totaling 3 slices.
66648            #[cfg(feature = "model-service")]
66649            #[derive(Clone, Default, PartialEq)]
66650            #[non_exhaustive]
66651            pub struct SliceConfig {
66652                pub kind: std::option::Option<
66653                    crate::model::model_evaluation_slice::slice::slice_spec::slice_config::Kind,
66654                >,
66655
66656                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
66657            }
66658
66659            #[cfg(feature = "model-service")]
66660            impl SliceConfig {
66661                pub fn new() -> Self {
66662                    std::default::Default::default()
66663                }
66664
66665                /// Sets the value of [kind][crate::model::model_evaluation_slice::slice::slice_spec::SliceConfig::kind].
66666                ///
66667                /// Note that all the setters affecting `kind` are mutually
66668                /// exclusive.
66669                pub fn set_kind<T: std::convert::Into<std::option::Option<crate::model::model_evaluation_slice::slice::slice_spec::slice_config::Kind>>>(mut self, v: T) -> Self
66670                {
66671                    self.kind = v.into();
66672                    self
66673                }
66674
66675                /// The value of [kind][crate::model::model_evaluation_slice::slice::slice_spec::SliceConfig::kind]
66676                /// if it holds a `Value`, `None` if the field is not set or
66677                /// holds a different branch.
66678                pub fn value(
66679                    &self,
66680                ) -> std::option::Option<
66681                    &std::boxed::Box<
66682                        crate::model::model_evaluation_slice::slice::slice_spec::Value,
66683                    >,
66684                > {
66685                    #[allow(unreachable_patterns)]
66686                    self.kind.as_ref().and_then(|v| match v {
66687                        crate::model::model_evaluation_slice::slice::slice_spec::slice_config::Kind::Value(v) => std::option::Option::Some(v),
66688                        _ => std::option::Option::None,
66689                    })
66690                }
66691
66692                /// Sets the value of [kind][crate::model::model_evaluation_slice::slice::slice_spec::SliceConfig::kind]
66693                /// to hold a `Value`.
66694                ///
66695                /// Note that all the setters affecting `kind` are
66696                /// mutually exclusive.
66697                pub fn set_value<
66698                    T: std::convert::Into<
66699                            std::boxed::Box<
66700                                crate::model::model_evaluation_slice::slice::slice_spec::Value,
66701                            >,
66702                        >,
66703                >(
66704                    mut self,
66705                    v: T,
66706                ) -> Self {
66707                    self.kind = std::option::Option::Some(
66708                        crate::model::model_evaluation_slice::slice::slice_spec::slice_config::Kind::Value(
66709                            v.into()
66710                        )
66711                    );
66712                    self
66713                }
66714
66715                /// The value of [kind][crate::model::model_evaluation_slice::slice::slice_spec::SliceConfig::kind]
66716                /// if it holds a `Range`, `None` if the field is not set or
66717                /// holds a different branch.
66718                pub fn range(
66719                    &self,
66720                ) -> std::option::Option<
66721                    &std::boxed::Box<
66722                        crate::model::model_evaluation_slice::slice::slice_spec::Range,
66723                    >,
66724                > {
66725                    #[allow(unreachable_patterns)]
66726                    self.kind.as_ref().and_then(|v| match v {
66727                        crate::model::model_evaluation_slice::slice::slice_spec::slice_config::Kind::Range(v) => std::option::Option::Some(v),
66728                        _ => std::option::Option::None,
66729                    })
66730                }
66731
66732                /// Sets the value of [kind][crate::model::model_evaluation_slice::slice::slice_spec::SliceConfig::kind]
66733                /// to hold a `Range`.
66734                ///
66735                /// Note that all the setters affecting `kind` are
66736                /// mutually exclusive.
66737                pub fn set_range<
66738                    T: std::convert::Into<
66739                            std::boxed::Box<
66740                                crate::model::model_evaluation_slice::slice::slice_spec::Range,
66741                            >,
66742                        >,
66743                >(
66744                    mut self,
66745                    v: T,
66746                ) -> Self {
66747                    self.kind = std::option::Option::Some(
66748                        crate::model::model_evaluation_slice::slice::slice_spec::slice_config::Kind::Range(
66749                            v.into()
66750                        )
66751                    );
66752                    self
66753                }
66754
66755                /// The value of [kind][crate::model::model_evaluation_slice::slice::slice_spec::SliceConfig::kind]
66756                /// if it holds a `AllValues`, `None` if the field is not set or
66757                /// holds a different branch.
66758                pub fn all_values(&self) -> std::option::Option<&std::boxed::Box<wkt::BoolValue>> {
66759                    #[allow(unreachable_patterns)]
66760                    self.kind.as_ref().and_then(|v| match v {
66761                        crate::model::model_evaluation_slice::slice::slice_spec::slice_config::Kind::AllValues(v) => std::option::Option::Some(v),
66762                        _ => std::option::Option::None,
66763                    })
66764                }
66765
66766                /// Sets the value of [kind][crate::model::model_evaluation_slice::slice::slice_spec::SliceConfig::kind]
66767                /// to hold a `AllValues`.
66768                ///
66769                /// Note that all the setters affecting `kind` are
66770                /// mutually exclusive.
66771                pub fn set_all_values<T: std::convert::Into<std::boxed::Box<wkt::BoolValue>>>(
66772                    mut self,
66773                    v: T,
66774                ) -> Self {
66775                    self.kind = std::option::Option::Some(
66776                        crate::model::model_evaluation_slice::slice::slice_spec::slice_config::Kind::AllValues(
66777                            v.into()
66778                        )
66779                    );
66780                    self
66781                }
66782            }
66783
66784            #[cfg(feature = "model-service")]
66785            impl wkt::message::Message for SliceConfig {
66786                fn typename() -> &'static str {
66787                    "type.googleapis.com/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig"
66788                }
66789            }
66790
66791            /// Defines additional types related to [SliceConfig].
66792            #[cfg(feature = "model-service")]
66793            pub mod slice_config {
66794                #[allow(unused_imports)]
66795                use super::*;
66796
66797                #[cfg(feature = "model-service")]
66798                #[derive(Clone, Debug, PartialEq)]
66799                #[non_exhaustive]
66800                pub enum Kind {
66801                    /// A unique specific value for a given feature.
66802                    /// Example: `{ "value": { "string_value": "12345" } }`
66803                    Value(
66804                        std::boxed::Box<
66805                            crate::model::model_evaluation_slice::slice::slice_spec::Value,
66806                        >,
66807                    ),
66808                    /// A range of values for a numerical feature.
66809                    /// Example: `{"range":{"low":10000.0,"high":50000.0}}`
66810                    /// will capture 12345 and 23334 in the slice.
66811                    Range(
66812                        std::boxed::Box<
66813                            crate::model::model_evaluation_slice::slice::slice_spec::Range,
66814                        >,
66815                    ),
66816                    /// If all_values is set to true, then all possible labels of the keyed
66817                    /// feature will have another slice computed.
66818                    /// Example: `{"all_values":{"value":true}}`
66819                    AllValues(std::boxed::Box<wkt::BoolValue>),
66820                }
66821            }
66822
66823            /// A range of values for slice(s).
66824            /// `low` is inclusive, `high` is exclusive.
66825            #[cfg(feature = "model-service")]
66826            #[derive(Clone, Default, PartialEq)]
66827            #[non_exhaustive]
66828            pub struct Range {
66829                /// Inclusive low value for the range.
66830                pub low: f32,
66831
66832                /// Exclusive high value for the range.
66833                pub high: f32,
66834
66835                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
66836            }
66837
66838            #[cfg(feature = "model-service")]
66839            impl Range {
66840                pub fn new() -> Self {
66841                    std::default::Default::default()
66842                }
66843
66844                /// Sets the value of [low][crate::model::model_evaluation_slice::slice::slice_spec::Range::low].
66845                pub fn set_low<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
66846                    self.low = v.into();
66847                    self
66848                }
66849
66850                /// Sets the value of [high][crate::model::model_evaluation_slice::slice::slice_spec::Range::high].
66851                pub fn set_high<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
66852                    self.high = v.into();
66853                    self
66854                }
66855            }
66856
66857            #[cfg(feature = "model-service")]
66858            impl wkt::message::Message for Range {
66859                fn typename() -> &'static str {
66860                    "type.googleapis.com/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Range"
66861                }
66862            }
66863
66864            /// Single value that supports strings and floats.
66865            #[cfg(feature = "model-service")]
66866            #[derive(Clone, Default, PartialEq)]
66867            #[non_exhaustive]
66868            pub struct Value {
66869                pub kind: std::option::Option<
66870                    crate::model::model_evaluation_slice::slice::slice_spec::value::Kind,
66871                >,
66872
66873                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
66874            }
66875
66876            #[cfg(feature = "model-service")]
66877            impl Value {
66878                pub fn new() -> Self {
66879                    std::default::Default::default()
66880                }
66881
66882                /// Sets the value of [kind][crate::model::model_evaluation_slice::slice::slice_spec::Value::kind].
66883                ///
66884                /// Note that all the setters affecting `kind` are mutually
66885                /// exclusive.
66886                pub fn set_kind<T: std::convert::Into<std::option::Option<crate::model::model_evaluation_slice::slice::slice_spec::value::Kind>>>(mut self, v: T) -> Self
66887                {
66888                    self.kind = v.into();
66889                    self
66890                }
66891
66892                /// The value of [kind][crate::model::model_evaluation_slice::slice::slice_spec::Value::kind]
66893                /// if it holds a `StringValue`, `None` if the field is not set or
66894                /// holds a different branch.
66895                pub fn string_value(&self) -> std::option::Option<&std::string::String> {
66896                    #[allow(unreachable_patterns)]
66897                    self.kind.as_ref().and_then(|v| match v {
66898                        crate::model::model_evaluation_slice::slice::slice_spec::value::Kind::StringValue(v) => std::option::Option::Some(v),
66899                        _ => std::option::Option::None,
66900                    })
66901                }
66902
66903                /// Sets the value of [kind][crate::model::model_evaluation_slice::slice::slice_spec::Value::kind]
66904                /// to hold a `StringValue`.
66905                ///
66906                /// Note that all the setters affecting `kind` are
66907                /// mutually exclusive.
66908                pub fn set_string_value<T: std::convert::Into<std::string::String>>(
66909                    mut self,
66910                    v: T,
66911                ) -> Self {
66912                    self.kind = std::option::Option::Some(
66913                        crate::model::model_evaluation_slice::slice::slice_spec::value::Kind::StringValue(
66914                            v.into()
66915                        )
66916                    );
66917                    self
66918                }
66919
66920                /// The value of [kind][crate::model::model_evaluation_slice::slice::slice_spec::Value::kind]
66921                /// if it holds a `FloatValue`, `None` if the field is not set or
66922                /// holds a different branch.
66923                pub fn float_value(&self) -> std::option::Option<&f32> {
66924                    #[allow(unreachable_patterns)]
66925                    self.kind.as_ref().and_then(|v| match v {
66926                        crate::model::model_evaluation_slice::slice::slice_spec::value::Kind::FloatValue(v) => std::option::Option::Some(v),
66927                        _ => std::option::Option::None,
66928                    })
66929                }
66930
66931                /// Sets the value of [kind][crate::model::model_evaluation_slice::slice::slice_spec::Value::kind]
66932                /// to hold a `FloatValue`.
66933                ///
66934                /// Note that all the setters affecting `kind` are
66935                /// mutually exclusive.
66936                pub fn set_float_value<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
66937                    self.kind = std::option::Option::Some(
66938                        crate::model::model_evaluation_slice::slice::slice_spec::value::Kind::FloatValue(
66939                            v.into()
66940                        )
66941                    );
66942                    self
66943                }
66944            }
66945
66946            #[cfg(feature = "model-service")]
66947            impl wkt::message::Message for Value {
66948                fn typename() -> &'static str {
66949                    "type.googleapis.com/google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec.Value"
66950                }
66951            }
66952
66953            /// Defines additional types related to [Value].
66954            #[cfg(feature = "model-service")]
66955            pub mod value {
66956                #[allow(unused_imports)]
66957                use super::*;
66958
66959                #[cfg(feature = "model-service")]
66960                #[derive(Clone, Debug, PartialEq)]
66961                #[non_exhaustive]
66962                pub enum Kind {
66963                    /// String type.
66964                    StringValue(std::string::String),
66965                    /// Float type.
66966                    FloatValue(f32),
66967                }
66968            }
66969        }
66970    }
66971}
66972
66973/// Request message for
66974/// [ModelGardenService.GetPublisherModel][google.cloud.aiplatform.v1.ModelGardenService.GetPublisherModel]
66975///
66976/// [google.cloud.aiplatform.v1.ModelGardenService.GetPublisherModel]: crate::client::ModelGardenService::get_publisher_model
66977#[cfg(feature = "model-garden-service")]
66978#[derive(Clone, Default, PartialEq)]
66979#[non_exhaustive]
66980pub struct GetPublisherModelRequest {
66981    /// Required. The name of the PublisherModel resource.
66982    /// Format:
66983    /// `publishers/{publisher}/models/{publisher_model}`
66984    pub name: std::string::String,
66985
66986    /// Optional. The IETF BCP-47 language code representing the language in which
66987    /// the publisher model's text information should be written in.
66988    pub language_code: std::string::String,
66989
66990    /// Optional. PublisherModel view specifying which fields to read.
66991    pub view: crate::model::PublisherModelView,
66992
66993    /// Optional. Boolean indicates whether the requested model is a Hugging Face
66994    /// model.
66995    pub is_hugging_face_model: bool,
66996
66997    /// Optional. Token used to access Hugging Face gated models.
66998    pub hugging_face_token: std::string::String,
66999
67000    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
67001}
67002
67003#[cfg(feature = "model-garden-service")]
67004impl GetPublisherModelRequest {
67005    pub fn new() -> Self {
67006        std::default::Default::default()
67007    }
67008
67009    /// Sets the value of [name][crate::model::GetPublisherModelRequest::name].
67010    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
67011        self.name = v.into();
67012        self
67013    }
67014
67015    /// Sets the value of [language_code][crate::model::GetPublisherModelRequest::language_code].
67016    pub fn set_language_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
67017        self.language_code = v.into();
67018        self
67019    }
67020
67021    /// Sets the value of [view][crate::model::GetPublisherModelRequest::view].
67022    pub fn set_view<T: std::convert::Into<crate::model::PublisherModelView>>(
67023        mut self,
67024        v: T,
67025    ) -> Self {
67026        self.view = v.into();
67027        self
67028    }
67029
67030    /// Sets the value of [is_hugging_face_model][crate::model::GetPublisherModelRequest::is_hugging_face_model].
67031    pub fn set_is_hugging_face_model<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
67032        self.is_hugging_face_model = v.into();
67033        self
67034    }
67035
67036    /// Sets the value of [hugging_face_token][crate::model::GetPublisherModelRequest::hugging_face_token].
67037    pub fn set_hugging_face_token<T: std::convert::Into<std::string::String>>(
67038        mut self,
67039        v: T,
67040    ) -> Self {
67041        self.hugging_face_token = v.into();
67042        self
67043    }
67044}
67045
67046#[cfg(feature = "model-garden-service")]
67047impl wkt::message::Message for GetPublisherModelRequest {
67048    fn typename() -> &'static str {
67049        "type.googleapis.com/google.cloud.aiplatform.v1.GetPublisherModelRequest"
67050    }
67051}
67052
67053/// Request message for
67054/// [ModelGardenService.Deploy][google.cloud.aiplatform.v1.ModelGardenService.Deploy].
67055///
67056/// [google.cloud.aiplatform.v1.ModelGardenService.Deploy]: crate::client::ModelGardenService::deploy
67057#[cfg(feature = "model-garden-service")]
67058#[derive(Clone, Default, PartialEq)]
67059#[non_exhaustive]
67060pub struct DeployRequest {
67061    /// Required. The resource name of the Location to deploy the model in.
67062    /// Format: `projects/{project}/locations/{location}`
67063    pub destination: std::string::String,
67064
67065    /// Optional. The model config to use for the deployment.
67066    /// If not specified, the default model config will be used.
67067    pub model_config: std::option::Option<crate::model::deploy_request::ModelConfig>,
67068
67069    /// Optional. The endpoint config to use for the deployment.
67070    /// If not specified, the default endpoint config will be used.
67071    pub endpoint_config: std::option::Option<crate::model::deploy_request::EndpointConfig>,
67072
67073    /// Optional. The deploy config to use for the deployment.
67074    /// If not specified, the default deploy config will be used.
67075    pub deploy_config: std::option::Option<crate::model::deploy_request::DeployConfig>,
67076
67077    /// The artifacts to deploy.
67078    pub artifacts: std::option::Option<crate::model::deploy_request::Artifacts>,
67079
67080    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
67081}
67082
67083#[cfg(feature = "model-garden-service")]
67084impl DeployRequest {
67085    pub fn new() -> Self {
67086        std::default::Default::default()
67087    }
67088
67089    /// Sets the value of [destination][crate::model::DeployRequest::destination].
67090    pub fn set_destination<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
67091        self.destination = v.into();
67092        self
67093    }
67094
67095    /// Sets the value of [model_config][crate::model::DeployRequest::model_config].
67096    pub fn set_model_config<T>(mut self, v: T) -> Self
67097    where
67098        T: std::convert::Into<crate::model::deploy_request::ModelConfig>,
67099    {
67100        self.model_config = std::option::Option::Some(v.into());
67101        self
67102    }
67103
67104    /// Sets or clears the value of [model_config][crate::model::DeployRequest::model_config].
67105    pub fn set_or_clear_model_config<T>(mut self, v: std::option::Option<T>) -> Self
67106    where
67107        T: std::convert::Into<crate::model::deploy_request::ModelConfig>,
67108    {
67109        self.model_config = v.map(|x| x.into());
67110        self
67111    }
67112
67113    /// Sets the value of [endpoint_config][crate::model::DeployRequest::endpoint_config].
67114    pub fn set_endpoint_config<T>(mut self, v: T) -> Self
67115    where
67116        T: std::convert::Into<crate::model::deploy_request::EndpointConfig>,
67117    {
67118        self.endpoint_config = std::option::Option::Some(v.into());
67119        self
67120    }
67121
67122    /// Sets or clears the value of [endpoint_config][crate::model::DeployRequest::endpoint_config].
67123    pub fn set_or_clear_endpoint_config<T>(mut self, v: std::option::Option<T>) -> Self
67124    where
67125        T: std::convert::Into<crate::model::deploy_request::EndpointConfig>,
67126    {
67127        self.endpoint_config = v.map(|x| x.into());
67128        self
67129    }
67130
67131    /// Sets the value of [deploy_config][crate::model::DeployRequest::deploy_config].
67132    pub fn set_deploy_config<T>(mut self, v: T) -> Self
67133    where
67134        T: std::convert::Into<crate::model::deploy_request::DeployConfig>,
67135    {
67136        self.deploy_config = std::option::Option::Some(v.into());
67137        self
67138    }
67139
67140    /// Sets or clears the value of [deploy_config][crate::model::DeployRequest::deploy_config].
67141    pub fn set_or_clear_deploy_config<T>(mut self, v: std::option::Option<T>) -> Self
67142    where
67143        T: std::convert::Into<crate::model::deploy_request::DeployConfig>,
67144    {
67145        self.deploy_config = v.map(|x| x.into());
67146        self
67147    }
67148
67149    /// Sets the value of [artifacts][crate::model::DeployRequest::artifacts].
67150    ///
67151    /// Note that all the setters affecting `artifacts` are mutually
67152    /// exclusive.
67153    pub fn set_artifacts<
67154        T: std::convert::Into<std::option::Option<crate::model::deploy_request::Artifacts>>,
67155    >(
67156        mut self,
67157        v: T,
67158    ) -> Self {
67159        self.artifacts = v.into();
67160        self
67161    }
67162
67163    /// The value of [artifacts][crate::model::DeployRequest::artifacts]
67164    /// if it holds a `PublisherModelName`, `None` if the field is not set or
67165    /// holds a different branch.
67166    pub fn publisher_model_name(&self) -> std::option::Option<&std::string::String> {
67167        #[allow(unreachable_patterns)]
67168        self.artifacts.as_ref().and_then(|v| match v {
67169            crate::model::deploy_request::Artifacts::PublisherModelName(v) => {
67170                std::option::Option::Some(v)
67171            }
67172            _ => std::option::Option::None,
67173        })
67174    }
67175
67176    /// Sets the value of [artifacts][crate::model::DeployRequest::artifacts]
67177    /// to hold a `PublisherModelName`.
67178    ///
67179    /// Note that all the setters affecting `artifacts` are
67180    /// mutually exclusive.
67181    pub fn set_publisher_model_name<T: std::convert::Into<std::string::String>>(
67182        mut self,
67183        v: T,
67184    ) -> Self {
67185        self.artifacts = std::option::Option::Some(
67186            crate::model::deploy_request::Artifacts::PublisherModelName(v.into()),
67187        );
67188        self
67189    }
67190
67191    /// The value of [artifacts][crate::model::DeployRequest::artifacts]
67192    /// if it holds a `HuggingFaceModelId`, `None` if the field is not set or
67193    /// holds a different branch.
67194    pub fn hugging_face_model_id(&self) -> std::option::Option<&std::string::String> {
67195        #[allow(unreachable_patterns)]
67196        self.artifacts.as_ref().and_then(|v| match v {
67197            crate::model::deploy_request::Artifacts::HuggingFaceModelId(v) => {
67198                std::option::Option::Some(v)
67199            }
67200            _ => std::option::Option::None,
67201        })
67202    }
67203
67204    /// Sets the value of [artifacts][crate::model::DeployRequest::artifacts]
67205    /// to hold a `HuggingFaceModelId`.
67206    ///
67207    /// Note that all the setters affecting `artifacts` are
67208    /// mutually exclusive.
67209    pub fn set_hugging_face_model_id<T: std::convert::Into<std::string::String>>(
67210        mut self,
67211        v: T,
67212    ) -> Self {
67213        self.artifacts = std::option::Option::Some(
67214            crate::model::deploy_request::Artifacts::HuggingFaceModelId(v.into()),
67215        );
67216        self
67217    }
67218}
67219
67220#[cfg(feature = "model-garden-service")]
67221impl wkt::message::Message for DeployRequest {
67222    fn typename() -> &'static str {
67223        "type.googleapis.com/google.cloud.aiplatform.v1.DeployRequest"
67224    }
67225}
67226
67227/// Defines additional types related to [DeployRequest].
67228#[cfg(feature = "model-garden-service")]
67229pub mod deploy_request {
67230    #[allow(unused_imports)]
67231    use super::*;
67232
67233    /// The model config to use for the deployment.
67234    #[cfg(feature = "model-garden-service")]
67235    #[derive(Clone, Default, PartialEq)]
67236    #[non_exhaustive]
67237    pub struct ModelConfig {
67238        /// Optional. Whether the user accepts the End User License Agreement (EULA)
67239        /// for the model.
67240        pub accept_eula: bool,
67241
67242        /// Optional. The Hugging Face read access token used to access the model
67243        /// artifacts of gated models.
67244        pub hugging_face_access_token: std::string::String,
67245
67246        /// Optional. If true, the model will deploy with a cached version instead of
67247        /// directly downloading the model artifacts from Hugging Face. This is
67248        /// suitable for VPC-SC users with limited internet access.
67249        pub hugging_face_cache_enabled: bool,
67250
67251        /// Optional. The user-specified display name of the uploaded model. If not
67252        /// set, a default name will be used.
67253        pub model_display_name: std::string::String,
67254
67255        /// Optional. The specification of the container that is to be used when
67256        /// deploying. If not set, the default container spec will be used.
67257        pub container_spec: std::option::Option<crate::model::ModelContainerSpec>,
67258
67259        /// Optional. The ID to use for the uploaded Model, which will become the
67260        /// final component of the model resource name. When not provided, Vertex AI
67261        /// will generate a value for this ID. When Model Registry model is provided,
67262        /// this field will be ignored.
67263        ///
67264        /// This value may be up to 63 characters, and valid characters are
67265        /// `[a-z0-9_-]`. The first character cannot be a number or hyphen.
67266        pub model_user_id: std::string::String,
67267
67268        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
67269    }
67270
67271    #[cfg(feature = "model-garden-service")]
67272    impl ModelConfig {
67273        pub fn new() -> Self {
67274            std::default::Default::default()
67275        }
67276
67277        /// Sets the value of [accept_eula][crate::model::deploy_request::ModelConfig::accept_eula].
67278        pub fn set_accept_eula<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
67279            self.accept_eula = v.into();
67280            self
67281        }
67282
67283        /// Sets the value of [hugging_face_access_token][crate::model::deploy_request::ModelConfig::hugging_face_access_token].
67284        pub fn set_hugging_face_access_token<T: std::convert::Into<std::string::String>>(
67285            mut self,
67286            v: T,
67287        ) -> Self {
67288            self.hugging_face_access_token = v.into();
67289            self
67290        }
67291
67292        /// Sets the value of [hugging_face_cache_enabled][crate::model::deploy_request::ModelConfig::hugging_face_cache_enabled].
67293        pub fn set_hugging_face_cache_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
67294            self.hugging_face_cache_enabled = v.into();
67295            self
67296        }
67297
67298        /// Sets the value of [model_display_name][crate::model::deploy_request::ModelConfig::model_display_name].
67299        pub fn set_model_display_name<T: std::convert::Into<std::string::String>>(
67300            mut self,
67301            v: T,
67302        ) -> Self {
67303            self.model_display_name = v.into();
67304            self
67305        }
67306
67307        /// Sets the value of [container_spec][crate::model::deploy_request::ModelConfig::container_spec].
67308        pub fn set_container_spec<T>(mut self, v: T) -> Self
67309        where
67310            T: std::convert::Into<crate::model::ModelContainerSpec>,
67311        {
67312            self.container_spec = std::option::Option::Some(v.into());
67313            self
67314        }
67315
67316        /// Sets or clears the value of [container_spec][crate::model::deploy_request::ModelConfig::container_spec].
67317        pub fn set_or_clear_container_spec<T>(mut self, v: std::option::Option<T>) -> Self
67318        where
67319            T: std::convert::Into<crate::model::ModelContainerSpec>,
67320        {
67321            self.container_spec = v.map(|x| x.into());
67322            self
67323        }
67324
67325        /// Sets the value of [model_user_id][crate::model::deploy_request::ModelConfig::model_user_id].
67326        pub fn set_model_user_id<T: std::convert::Into<std::string::String>>(
67327            mut self,
67328            v: T,
67329        ) -> Self {
67330            self.model_user_id = v.into();
67331            self
67332        }
67333    }
67334
67335    #[cfg(feature = "model-garden-service")]
67336    impl wkt::message::Message for ModelConfig {
67337        fn typename() -> &'static str {
67338            "type.googleapis.com/google.cloud.aiplatform.v1.DeployRequest.ModelConfig"
67339        }
67340    }
67341
67342    /// The endpoint config to use for the deployment.
67343    #[cfg(feature = "model-garden-service")]
67344    #[derive(Clone, Default, PartialEq)]
67345    #[non_exhaustive]
67346    pub struct EndpointConfig {
67347        /// Optional. The user-specified display name of the endpoint. If not set, a
67348        /// default name will be used.
67349        pub endpoint_display_name: std::string::String,
67350
67351        /// Optional. Deprecated. Use dedicated_endpoint_disabled instead.
67352        /// If true, the endpoint will be exposed through a
67353        /// dedicated DNS [Endpoint.dedicated_endpoint_dns]. Your request to the
67354        /// dedicated DNS will be isolated from other users' traffic and will have
67355        /// better performance and reliability. Note: Once you enabled dedicated
67356        /// endpoint, you won't be able to send request to the shared DNS
67357        /// {region}-aiplatform.googleapis.com. The limitations will be removed soon.
67358        #[deprecated]
67359        pub dedicated_endpoint_enabled: bool,
67360
67361        /// Optional. By default, if dedicated endpoint is enabled, the endpoint will
67362        /// be exposed through a dedicated DNS [Endpoint.dedicated_endpoint_dns].
67363        /// Your request to the dedicated DNS will be isolated from other users'
67364        /// traffic and will have better performance and reliability. Note: Once you
67365        /// enabled dedicated endpoint, you won't be able to send request to the
67366        /// shared DNS {region}-aiplatform.googleapis.com. The limitations will be
67367        /// removed soon.
67368        ///
67369        /// If this field is set to true, the dedicated endpoint will be disabled
67370        /// and the deployed model will be exposed through the shared DNS
67371        /// {region}-aiplatform.googleapis.com.
67372        pub dedicated_endpoint_disabled: bool,
67373
67374        /// Optional. Immutable. The ID to use for endpoint, which will become the
67375        /// final component of the endpoint resource name. If not provided, Vertex AI
67376        /// will generate a value for this ID.
67377        ///
67378        /// If the first character is a letter, this value may be up to 63
67379        /// characters, and valid characters are `[a-z0-9-]`. The last character must
67380        /// be a letter or number.
67381        ///
67382        /// If the first character is a number, this value may be up to 9 characters,
67383        /// and valid characters are `[0-9]` with no leading zeros.
67384        ///
67385        /// When using HTTP/JSON, this field is populated
67386        /// based on a query string argument, such as `?endpoint_id=12345`. This is
67387        /// the fallback for fields that are not included in either the URI or the
67388        /// body.
67389        pub endpoint_user_id: std::string::String,
67390
67391        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
67392    }
67393
67394    #[cfg(feature = "model-garden-service")]
67395    impl EndpointConfig {
67396        pub fn new() -> Self {
67397            std::default::Default::default()
67398        }
67399
67400        /// Sets the value of [endpoint_display_name][crate::model::deploy_request::EndpointConfig::endpoint_display_name].
67401        pub fn set_endpoint_display_name<T: std::convert::Into<std::string::String>>(
67402            mut self,
67403            v: T,
67404        ) -> Self {
67405            self.endpoint_display_name = v.into();
67406            self
67407        }
67408
67409        /// Sets the value of [dedicated_endpoint_enabled][crate::model::deploy_request::EndpointConfig::dedicated_endpoint_enabled].
67410        #[deprecated]
67411        pub fn set_dedicated_endpoint_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
67412            self.dedicated_endpoint_enabled = v.into();
67413            self
67414        }
67415
67416        /// Sets the value of [dedicated_endpoint_disabled][crate::model::deploy_request::EndpointConfig::dedicated_endpoint_disabled].
67417        pub fn set_dedicated_endpoint_disabled<T: std::convert::Into<bool>>(
67418            mut self,
67419            v: T,
67420        ) -> Self {
67421            self.dedicated_endpoint_disabled = v.into();
67422            self
67423        }
67424
67425        /// Sets the value of [endpoint_user_id][crate::model::deploy_request::EndpointConfig::endpoint_user_id].
67426        pub fn set_endpoint_user_id<T: std::convert::Into<std::string::String>>(
67427            mut self,
67428            v: T,
67429        ) -> Self {
67430            self.endpoint_user_id = v.into();
67431            self
67432        }
67433    }
67434
67435    #[cfg(feature = "model-garden-service")]
67436    impl wkt::message::Message for EndpointConfig {
67437        fn typename() -> &'static str {
67438            "type.googleapis.com/google.cloud.aiplatform.v1.DeployRequest.EndpointConfig"
67439        }
67440    }
67441
67442    /// The deploy config to use for the deployment.
67443    #[cfg(feature = "model-garden-service")]
67444    #[derive(Clone, Default, PartialEq)]
67445    #[non_exhaustive]
67446    pub struct DeployConfig {
67447        /// Optional. The dedicated resources to use for the endpoint. If not set,
67448        /// the default resources will be used.
67449        pub dedicated_resources: std::option::Option<crate::model::DedicatedResources>,
67450
67451        /// Optional. If true, enable the QMT fast tryout feature for this model if
67452        /// possible.
67453        pub fast_tryout_enabled: bool,
67454
67455        /// Optional. System labels for Model Garden deployments.
67456        /// These labels are managed by Google and for tracking purposes only.
67457        pub system_labels: std::collections::HashMap<std::string::String, std::string::String>,
67458
67459        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
67460    }
67461
67462    #[cfg(feature = "model-garden-service")]
67463    impl DeployConfig {
67464        pub fn new() -> Self {
67465            std::default::Default::default()
67466        }
67467
67468        /// Sets the value of [dedicated_resources][crate::model::deploy_request::DeployConfig::dedicated_resources].
67469        pub fn set_dedicated_resources<T>(mut self, v: T) -> Self
67470        where
67471            T: std::convert::Into<crate::model::DedicatedResources>,
67472        {
67473            self.dedicated_resources = std::option::Option::Some(v.into());
67474            self
67475        }
67476
67477        /// Sets or clears the value of [dedicated_resources][crate::model::deploy_request::DeployConfig::dedicated_resources].
67478        pub fn set_or_clear_dedicated_resources<T>(mut self, v: std::option::Option<T>) -> Self
67479        where
67480            T: std::convert::Into<crate::model::DedicatedResources>,
67481        {
67482            self.dedicated_resources = v.map(|x| x.into());
67483            self
67484        }
67485
67486        /// Sets the value of [fast_tryout_enabled][crate::model::deploy_request::DeployConfig::fast_tryout_enabled].
67487        pub fn set_fast_tryout_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
67488            self.fast_tryout_enabled = v.into();
67489            self
67490        }
67491
67492        /// Sets the value of [system_labels][crate::model::deploy_request::DeployConfig::system_labels].
67493        pub fn set_system_labels<T, K, V>(mut self, v: T) -> Self
67494        where
67495            T: std::iter::IntoIterator<Item = (K, V)>,
67496            K: std::convert::Into<std::string::String>,
67497            V: std::convert::Into<std::string::String>,
67498        {
67499            use std::iter::Iterator;
67500            self.system_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
67501            self
67502        }
67503    }
67504
67505    #[cfg(feature = "model-garden-service")]
67506    impl wkt::message::Message for DeployConfig {
67507        fn typename() -> &'static str {
67508            "type.googleapis.com/google.cloud.aiplatform.v1.DeployRequest.DeployConfig"
67509        }
67510    }
67511
67512    /// The artifacts to deploy.
67513    #[cfg(feature = "model-garden-service")]
67514    #[derive(Clone, Debug, PartialEq)]
67515    #[non_exhaustive]
67516    pub enum Artifacts {
67517        /// The Model Garden model to deploy.
67518        /// Format:
67519        /// `publishers/{publisher}/models/{publisher_model}@{version_id}`, or
67520        /// `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001`.
67521        PublisherModelName(std::string::String),
67522        /// The Hugging Face model to deploy.
67523        /// Format: Hugging Face model ID like `google/gemma-2-2b-it`.
67524        HuggingFaceModelId(std::string::String),
67525    }
67526}
67527
67528/// Response message for
67529/// [ModelGardenService.Deploy][google.cloud.aiplatform.v1.ModelGardenService.Deploy].
67530///
67531/// [google.cloud.aiplatform.v1.ModelGardenService.Deploy]: crate::client::ModelGardenService::deploy
67532#[cfg(feature = "model-garden-service")]
67533#[derive(Clone, Default, PartialEq)]
67534#[non_exhaustive]
67535pub struct DeployResponse {
67536    /// Output only. The name of the PublisherModel resource.
67537    /// Format:
67538    /// `publishers/{publisher}/models/{publisher_model}@{version_id}`, or
67539    /// `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001`
67540    pub publisher_model: std::string::String,
67541
67542    /// Output only. The name of the Endpoint created.
67543    /// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
67544    pub endpoint: std::string::String,
67545
67546    /// Output only. The name of the Model created.
67547    /// Format: `projects/{project}/locations/{location}/models/{model}`
67548    pub model: std::string::String,
67549
67550    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
67551}
67552
67553#[cfg(feature = "model-garden-service")]
67554impl DeployResponse {
67555    pub fn new() -> Self {
67556        std::default::Default::default()
67557    }
67558
67559    /// Sets the value of [publisher_model][crate::model::DeployResponse::publisher_model].
67560    pub fn set_publisher_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
67561        self.publisher_model = v.into();
67562        self
67563    }
67564
67565    /// Sets the value of [endpoint][crate::model::DeployResponse::endpoint].
67566    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
67567        self.endpoint = v.into();
67568        self
67569    }
67570
67571    /// Sets the value of [model][crate::model::DeployResponse::model].
67572    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
67573        self.model = v.into();
67574        self
67575    }
67576}
67577
67578#[cfg(feature = "model-garden-service")]
67579impl wkt::message::Message for DeployResponse {
67580    fn typename() -> &'static str {
67581        "type.googleapis.com/google.cloud.aiplatform.v1.DeployResponse"
67582    }
67583}
67584
67585/// Runtime operation information for
67586/// [ModelGardenService.Deploy][google.cloud.aiplatform.v1.ModelGardenService.Deploy].
67587///
67588/// [google.cloud.aiplatform.v1.ModelGardenService.Deploy]: crate::client::ModelGardenService::deploy
67589#[cfg(feature = "model-garden-service")]
67590#[derive(Clone, Default, PartialEq)]
67591#[non_exhaustive]
67592pub struct DeployOperationMetadata {
67593    /// The operation generic information.
67594    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
67595
67596    /// Output only. The name of the model resource.
67597    pub publisher_model: std::string::String,
67598
67599    /// Output only. The resource name of the Location to deploy the model in.
67600    /// Format: `projects/{project}/locations/{location}`
67601    pub destination: std::string::String,
67602
67603    /// Output only. The project number where the deploy model request is sent.
67604    pub project_number: i64,
67605
67606    /// Output only. The model id to be used at query time.
67607    pub model_id: std::string::String,
67608
67609    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
67610}
67611
67612#[cfg(feature = "model-garden-service")]
67613impl DeployOperationMetadata {
67614    pub fn new() -> Self {
67615        std::default::Default::default()
67616    }
67617
67618    /// Sets the value of [generic_metadata][crate::model::DeployOperationMetadata::generic_metadata].
67619    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
67620    where
67621        T: std::convert::Into<crate::model::GenericOperationMetadata>,
67622    {
67623        self.generic_metadata = std::option::Option::Some(v.into());
67624        self
67625    }
67626
67627    /// Sets or clears the value of [generic_metadata][crate::model::DeployOperationMetadata::generic_metadata].
67628    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
67629    where
67630        T: std::convert::Into<crate::model::GenericOperationMetadata>,
67631    {
67632        self.generic_metadata = v.map(|x| x.into());
67633        self
67634    }
67635
67636    /// Sets the value of [publisher_model][crate::model::DeployOperationMetadata::publisher_model].
67637    pub fn set_publisher_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
67638        self.publisher_model = v.into();
67639        self
67640    }
67641
67642    /// Sets the value of [destination][crate::model::DeployOperationMetadata::destination].
67643    pub fn set_destination<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
67644        self.destination = v.into();
67645        self
67646    }
67647
67648    /// Sets the value of [project_number][crate::model::DeployOperationMetadata::project_number].
67649    pub fn set_project_number<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
67650        self.project_number = v.into();
67651        self
67652    }
67653
67654    /// Sets the value of [model_id][crate::model::DeployOperationMetadata::model_id].
67655    pub fn set_model_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
67656        self.model_id = v.into();
67657        self
67658    }
67659}
67660
67661#[cfg(feature = "model-garden-service")]
67662impl wkt::message::Message for DeployOperationMetadata {
67663    fn typename() -> &'static str {
67664        "type.googleapis.com/google.cloud.aiplatform.v1.DeployOperationMetadata"
67665    }
67666}
67667
67668/// The objective configuration for model monitoring, including the information
67669/// needed to detect anomalies for one particular model.
67670#[cfg(feature = "job-service")]
67671#[derive(Clone, Default, PartialEq)]
67672#[non_exhaustive]
67673pub struct ModelMonitoringObjectiveConfig {
67674    /// Training dataset for models. This field has to be set only if
67675    /// TrainingPredictionSkewDetectionConfig is specified.
67676    pub training_dataset:
67677        std::option::Option<crate::model::model_monitoring_objective_config::TrainingDataset>,
67678
67679    /// The config for skew between training data and prediction data.
67680    pub training_prediction_skew_detection_config: std::option::Option<
67681        crate::model::model_monitoring_objective_config::TrainingPredictionSkewDetectionConfig,
67682    >,
67683
67684    /// The config for drift of prediction data.
67685    pub prediction_drift_detection_config: std::option::Option<
67686        crate::model::model_monitoring_objective_config::PredictionDriftDetectionConfig,
67687    >,
67688
67689    /// The config for integrating with Vertex Explainable AI.
67690    pub explanation_config:
67691        std::option::Option<crate::model::model_monitoring_objective_config::ExplanationConfig>,
67692
67693    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
67694}
67695
67696#[cfg(feature = "job-service")]
67697impl ModelMonitoringObjectiveConfig {
67698    pub fn new() -> Self {
67699        std::default::Default::default()
67700    }
67701
67702    /// Sets the value of [training_dataset][crate::model::ModelMonitoringObjectiveConfig::training_dataset].
67703    pub fn set_training_dataset<T>(mut self, v: T) -> Self
67704    where
67705        T: std::convert::Into<crate::model::model_monitoring_objective_config::TrainingDataset>,
67706    {
67707        self.training_dataset = std::option::Option::Some(v.into());
67708        self
67709    }
67710
67711    /// Sets or clears the value of [training_dataset][crate::model::ModelMonitoringObjectiveConfig::training_dataset].
67712    pub fn set_or_clear_training_dataset<T>(mut self, v: std::option::Option<T>) -> Self
67713    where
67714        T: std::convert::Into<crate::model::model_monitoring_objective_config::TrainingDataset>,
67715    {
67716        self.training_dataset = v.map(|x| x.into());
67717        self
67718    }
67719
67720    /// Sets the value of [training_prediction_skew_detection_config][crate::model::ModelMonitoringObjectiveConfig::training_prediction_skew_detection_config].
67721    pub fn set_training_prediction_skew_detection_config<T>(mut self, v: T) -> Self
67722    where T: std::convert::Into<crate::model::model_monitoring_objective_config::TrainingPredictionSkewDetectionConfig>
67723    {
67724        self.training_prediction_skew_detection_config = std::option::Option::Some(v.into());
67725        self
67726    }
67727
67728    /// Sets or clears the value of [training_prediction_skew_detection_config][crate::model::ModelMonitoringObjectiveConfig::training_prediction_skew_detection_config].
67729    pub fn set_or_clear_training_prediction_skew_detection_config<T>(mut self, v: std::option::Option<T>) -> Self
67730    where T: std::convert::Into<crate::model::model_monitoring_objective_config::TrainingPredictionSkewDetectionConfig>
67731    {
67732        self.training_prediction_skew_detection_config = v.map(|x| x.into());
67733        self
67734    }
67735
67736    /// Sets the value of [prediction_drift_detection_config][crate::model::ModelMonitoringObjectiveConfig::prediction_drift_detection_config].
67737    pub fn set_prediction_drift_detection_config<T>(mut self, v: T) -> Self
67738    where
67739        T: std::convert::Into<
67740                crate::model::model_monitoring_objective_config::PredictionDriftDetectionConfig,
67741            >,
67742    {
67743        self.prediction_drift_detection_config = std::option::Option::Some(v.into());
67744        self
67745    }
67746
67747    /// Sets or clears the value of [prediction_drift_detection_config][crate::model::ModelMonitoringObjectiveConfig::prediction_drift_detection_config].
67748    pub fn set_or_clear_prediction_drift_detection_config<T>(
67749        mut self,
67750        v: std::option::Option<T>,
67751    ) -> Self
67752    where
67753        T: std::convert::Into<
67754                crate::model::model_monitoring_objective_config::PredictionDriftDetectionConfig,
67755            >,
67756    {
67757        self.prediction_drift_detection_config = v.map(|x| x.into());
67758        self
67759    }
67760
67761    /// Sets the value of [explanation_config][crate::model::ModelMonitoringObjectiveConfig::explanation_config].
67762    pub fn set_explanation_config<T>(mut self, v: T) -> Self
67763    where
67764        T: std::convert::Into<crate::model::model_monitoring_objective_config::ExplanationConfig>,
67765    {
67766        self.explanation_config = std::option::Option::Some(v.into());
67767        self
67768    }
67769
67770    /// Sets or clears the value of [explanation_config][crate::model::ModelMonitoringObjectiveConfig::explanation_config].
67771    pub fn set_or_clear_explanation_config<T>(mut self, v: std::option::Option<T>) -> Self
67772    where
67773        T: std::convert::Into<crate::model::model_monitoring_objective_config::ExplanationConfig>,
67774    {
67775        self.explanation_config = v.map(|x| x.into());
67776        self
67777    }
67778}
67779
67780#[cfg(feature = "job-service")]
67781impl wkt::message::Message for ModelMonitoringObjectiveConfig {
67782    fn typename() -> &'static str {
67783        "type.googleapis.com/google.cloud.aiplatform.v1.ModelMonitoringObjectiveConfig"
67784    }
67785}
67786
67787/// Defines additional types related to [ModelMonitoringObjectiveConfig].
67788#[cfg(feature = "job-service")]
67789pub mod model_monitoring_objective_config {
67790    #[allow(unused_imports)]
67791    use super::*;
67792
67793    /// Training Dataset information.
67794    #[cfg(feature = "job-service")]
67795    #[derive(Clone, Default, PartialEq)]
67796    #[non_exhaustive]
67797    pub struct TrainingDataset {
67798        /// Data format of the dataset, only applicable if the input is from
67799        /// Google Cloud Storage.
67800        /// The possible formats are:
67801        ///
67802        /// "tf-record"
67803        /// The source file is a TFRecord file.
67804        ///
67805        /// "csv"
67806        /// The source file is a CSV file.
67807        /// "jsonl"
67808        /// The source file is a JSONL file.
67809        pub data_format: std::string::String,
67810
67811        /// The target field name the model is to predict.
67812        /// This field will be excluded when doing Predict and (or) Explain for the
67813        /// training data.
67814        pub target_field: std::string::String,
67815
67816        /// Strategy to sample data from Training Dataset.
67817        /// If not set, we process the whole dataset.
67818        pub logging_sampling_strategy: std::option::Option<crate::model::SamplingStrategy>,
67819
67820        pub data_source: std::option::Option<
67821            crate::model::model_monitoring_objective_config::training_dataset::DataSource,
67822        >,
67823
67824        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
67825    }
67826
67827    #[cfg(feature = "job-service")]
67828    impl TrainingDataset {
67829        pub fn new() -> Self {
67830            std::default::Default::default()
67831        }
67832
67833        /// Sets the value of [data_format][crate::model::model_monitoring_objective_config::TrainingDataset::data_format].
67834        pub fn set_data_format<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
67835            self.data_format = v.into();
67836            self
67837        }
67838
67839        /// Sets the value of [target_field][crate::model::model_monitoring_objective_config::TrainingDataset::target_field].
67840        pub fn set_target_field<T: std::convert::Into<std::string::String>>(
67841            mut self,
67842            v: T,
67843        ) -> Self {
67844            self.target_field = v.into();
67845            self
67846        }
67847
67848        /// Sets the value of [logging_sampling_strategy][crate::model::model_monitoring_objective_config::TrainingDataset::logging_sampling_strategy].
67849        pub fn set_logging_sampling_strategy<T>(mut self, v: T) -> Self
67850        where
67851            T: std::convert::Into<crate::model::SamplingStrategy>,
67852        {
67853            self.logging_sampling_strategy = std::option::Option::Some(v.into());
67854            self
67855        }
67856
67857        /// Sets or clears the value of [logging_sampling_strategy][crate::model::model_monitoring_objective_config::TrainingDataset::logging_sampling_strategy].
67858        pub fn set_or_clear_logging_sampling_strategy<T>(
67859            mut self,
67860            v: std::option::Option<T>,
67861        ) -> Self
67862        where
67863            T: std::convert::Into<crate::model::SamplingStrategy>,
67864        {
67865            self.logging_sampling_strategy = v.map(|x| x.into());
67866            self
67867        }
67868
67869        /// Sets the value of [data_source][crate::model::model_monitoring_objective_config::TrainingDataset::data_source].
67870        ///
67871        /// Note that all the setters affecting `data_source` are mutually
67872        /// exclusive.
67873        pub fn set_data_source<T: std::convert::Into<std::option::Option<crate::model::model_monitoring_objective_config::training_dataset::DataSource>>>(mut self, v: T) -> Self
67874        {
67875            self.data_source = v.into();
67876            self
67877        }
67878
67879        /// The value of [data_source][crate::model::model_monitoring_objective_config::TrainingDataset::data_source]
67880        /// if it holds a `Dataset`, `None` if the field is not set or
67881        /// holds a different branch.
67882        pub fn dataset(&self) -> std::option::Option<&std::string::String> {
67883            #[allow(unreachable_patterns)]
67884            self.data_source.as_ref().and_then(|v| match v {
67885                crate::model::model_monitoring_objective_config::training_dataset::DataSource::Dataset(v) => std::option::Option::Some(v),
67886                _ => std::option::Option::None,
67887            })
67888        }
67889
67890        /// Sets the value of [data_source][crate::model::model_monitoring_objective_config::TrainingDataset::data_source]
67891        /// to hold a `Dataset`.
67892        ///
67893        /// Note that all the setters affecting `data_source` are
67894        /// mutually exclusive.
67895        pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
67896            self.data_source = std::option::Option::Some(
67897                crate::model::model_monitoring_objective_config::training_dataset::DataSource::Dataset(
67898                    v.into()
67899                )
67900            );
67901            self
67902        }
67903
67904        /// The value of [data_source][crate::model::model_monitoring_objective_config::TrainingDataset::data_source]
67905        /// if it holds a `GcsSource`, `None` if the field is not set or
67906        /// holds a different branch.
67907        pub fn gcs_source(&self) -> std::option::Option<&std::boxed::Box<crate::model::GcsSource>> {
67908            #[allow(unreachable_patterns)]
67909            self.data_source.as_ref().and_then(|v| match v {
67910                crate::model::model_monitoring_objective_config::training_dataset::DataSource::GcsSource(v) => std::option::Option::Some(v),
67911                _ => std::option::Option::None,
67912            })
67913        }
67914
67915        /// Sets the value of [data_source][crate::model::model_monitoring_objective_config::TrainingDataset::data_source]
67916        /// to hold a `GcsSource`.
67917        ///
67918        /// Note that all the setters affecting `data_source` are
67919        /// mutually exclusive.
67920        pub fn set_gcs_source<T: std::convert::Into<std::boxed::Box<crate::model::GcsSource>>>(
67921            mut self,
67922            v: T,
67923        ) -> Self {
67924            self.data_source = std::option::Option::Some(
67925                crate::model::model_monitoring_objective_config::training_dataset::DataSource::GcsSource(
67926                    v.into()
67927                )
67928            );
67929            self
67930        }
67931
67932        /// The value of [data_source][crate::model::model_monitoring_objective_config::TrainingDataset::data_source]
67933        /// if it holds a `BigquerySource`, `None` if the field is not set or
67934        /// holds a different branch.
67935        pub fn bigquery_source(
67936            &self,
67937        ) -> std::option::Option<&std::boxed::Box<crate::model::BigQuerySource>> {
67938            #[allow(unreachable_patterns)]
67939            self.data_source.as_ref().and_then(|v| match v {
67940                crate::model::model_monitoring_objective_config::training_dataset::DataSource::BigquerySource(v) => std::option::Option::Some(v),
67941                _ => std::option::Option::None,
67942            })
67943        }
67944
67945        /// Sets the value of [data_source][crate::model::model_monitoring_objective_config::TrainingDataset::data_source]
67946        /// to hold a `BigquerySource`.
67947        ///
67948        /// Note that all the setters affecting `data_source` are
67949        /// mutually exclusive.
67950        pub fn set_bigquery_source<
67951            T: std::convert::Into<std::boxed::Box<crate::model::BigQuerySource>>,
67952        >(
67953            mut self,
67954            v: T,
67955        ) -> Self {
67956            self.data_source = std::option::Option::Some(
67957                crate::model::model_monitoring_objective_config::training_dataset::DataSource::BigquerySource(
67958                    v.into()
67959                )
67960            );
67961            self
67962        }
67963    }
67964
67965    #[cfg(feature = "job-service")]
67966    impl wkt::message::Message for TrainingDataset {
67967        fn typename() -> &'static str {
67968            "type.googleapis.com/google.cloud.aiplatform.v1.ModelMonitoringObjectiveConfig.TrainingDataset"
67969        }
67970    }
67971
67972    /// Defines additional types related to [TrainingDataset].
67973    #[cfg(feature = "job-service")]
67974    pub mod training_dataset {
67975        #[allow(unused_imports)]
67976        use super::*;
67977
67978        #[cfg(feature = "job-service")]
67979        #[derive(Clone, Debug, PartialEq)]
67980        #[non_exhaustive]
67981        pub enum DataSource {
67982            /// The resource name of the Dataset used to train this Model.
67983            Dataset(std::string::String),
67984            /// The Google Cloud Storage uri of the unmanaged Dataset used to train
67985            /// this Model.
67986            GcsSource(std::boxed::Box<crate::model::GcsSource>),
67987            /// The BigQuery table of the unmanaged Dataset used to train this
67988            /// Model.
67989            BigquerySource(std::boxed::Box<crate::model::BigQuerySource>),
67990        }
67991    }
67992
67993    /// The config for Training & Prediction data skew detection. It specifies the
67994    /// training dataset sources and the skew detection parameters.
67995    #[cfg(feature = "job-service")]
67996    #[derive(Clone, Default, PartialEq)]
67997    #[non_exhaustive]
67998    pub struct TrainingPredictionSkewDetectionConfig {
67999        /// Key is the feature name and value is the threshold. If a feature needs to
68000        /// be monitored for skew, a value threshold must be configured for that
68001        /// feature. The threshold here is against feature distribution distance
68002        /// between the training and prediction feature.
68003        pub skew_thresholds:
68004            std::collections::HashMap<std::string::String, crate::model::ThresholdConfig>,
68005
68006        /// Key is the feature name and value is the threshold. The threshold here is
68007        /// against attribution score distance between the training and prediction
68008        /// feature.
68009        pub attribution_score_skew_thresholds:
68010            std::collections::HashMap<std::string::String, crate::model::ThresholdConfig>,
68011
68012        /// Skew anomaly detection threshold used by all features.
68013        /// When the per-feature thresholds are not set, this field can be used to
68014        /// specify a threshold for all features.
68015        pub default_skew_threshold: std::option::Option<crate::model::ThresholdConfig>,
68016
68017        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
68018    }
68019
68020    #[cfg(feature = "job-service")]
68021    impl TrainingPredictionSkewDetectionConfig {
68022        pub fn new() -> Self {
68023            std::default::Default::default()
68024        }
68025
68026        /// Sets the value of [skew_thresholds][crate::model::model_monitoring_objective_config::TrainingPredictionSkewDetectionConfig::skew_thresholds].
68027        pub fn set_skew_thresholds<T, K, V>(mut self, v: T) -> Self
68028        where
68029            T: std::iter::IntoIterator<Item = (K, V)>,
68030            K: std::convert::Into<std::string::String>,
68031            V: std::convert::Into<crate::model::ThresholdConfig>,
68032        {
68033            use std::iter::Iterator;
68034            self.skew_thresholds = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
68035            self
68036        }
68037
68038        /// Sets the value of [attribution_score_skew_thresholds][crate::model::model_monitoring_objective_config::TrainingPredictionSkewDetectionConfig::attribution_score_skew_thresholds].
68039        pub fn set_attribution_score_skew_thresholds<T, K, V>(mut self, v: T) -> Self
68040        where
68041            T: std::iter::IntoIterator<Item = (K, V)>,
68042            K: std::convert::Into<std::string::String>,
68043            V: std::convert::Into<crate::model::ThresholdConfig>,
68044        {
68045            use std::iter::Iterator;
68046            self.attribution_score_skew_thresholds =
68047                v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
68048            self
68049        }
68050
68051        /// Sets the value of [default_skew_threshold][crate::model::model_monitoring_objective_config::TrainingPredictionSkewDetectionConfig::default_skew_threshold].
68052        pub fn set_default_skew_threshold<T>(mut self, v: T) -> Self
68053        where
68054            T: std::convert::Into<crate::model::ThresholdConfig>,
68055        {
68056            self.default_skew_threshold = std::option::Option::Some(v.into());
68057            self
68058        }
68059
68060        /// Sets or clears the value of [default_skew_threshold][crate::model::model_monitoring_objective_config::TrainingPredictionSkewDetectionConfig::default_skew_threshold].
68061        pub fn set_or_clear_default_skew_threshold<T>(mut self, v: std::option::Option<T>) -> Self
68062        where
68063            T: std::convert::Into<crate::model::ThresholdConfig>,
68064        {
68065            self.default_skew_threshold = v.map(|x| x.into());
68066            self
68067        }
68068    }
68069
68070    #[cfg(feature = "job-service")]
68071    impl wkt::message::Message for TrainingPredictionSkewDetectionConfig {
68072        fn typename() -> &'static str {
68073            "type.googleapis.com/google.cloud.aiplatform.v1.ModelMonitoringObjectiveConfig.TrainingPredictionSkewDetectionConfig"
68074        }
68075    }
68076
68077    /// The config for Prediction data drift detection.
68078    #[cfg(feature = "job-service")]
68079    #[derive(Clone, Default, PartialEq)]
68080    #[non_exhaustive]
68081    pub struct PredictionDriftDetectionConfig {
68082        /// Key is the feature name and value is the threshold. If a feature needs to
68083        /// be monitored for drift, a value threshold must be configured for that
68084        /// feature. The threshold here is against feature distribution distance
68085        /// between different time windws.
68086        pub drift_thresholds:
68087            std::collections::HashMap<std::string::String, crate::model::ThresholdConfig>,
68088
68089        /// Key is the feature name and value is the threshold. The threshold here is
68090        /// against attribution score distance between different time windows.
68091        pub attribution_score_drift_thresholds:
68092            std::collections::HashMap<std::string::String, crate::model::ThresholdConfig>,
68093
68094        /// Drift anomaly detection threshold used by all features.
68095        /// When the per-feature thresholds are not set, this field can be used to
68096        /// specify a threshold for all features.
68097        pub default_drift_threshold: std::option::Option<crate::model::ThresholdConfig>,
68098
68099        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
68100    }
68101
68102    #[cfg(feature = "job-service")]
68103    impl PredictionDriftDetectionConfig {
68104        pub fn new() -> Self {
68105            std::default::Default::default()
68106        }
68107
68108        /// Sets the value of [drift_thresholds][crate::model::model_monitoring_objective_config::PredictionDriftDetectionConfig::drift_thresholds].
68109        pub fn set_drift_thresholds<T, K, V>(mut self, v: T) -> Self
68110        where
68111            T: std::iter::IntoIterator<Item = (K, V)>,
68112            K: std::convert::Into<std::string::String>,
68113            V: std::convert::Into<crate::model::ThresholdConfig>,
68114        {
68115            use std::iter::Iterator;
68116            self.drift_thresholds = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
68117            self
68118        }
68119
68120        /// Sets the value of [attribution_score_drift_thresholds][crate::model::model_monitoring_objective_config::PredictionDriftDetectionConfig::attribution_score_drift_thresholds].
68121        pub fn set_attribution_score_drift_thresholds<T, K, V>(mut self, v: T) -> Self
68122        where
68123            T: std::iter::IntoIterator<Item = (K, V)>,
68124            K: std::convert::Into<std::string::String>,
68125            V: std::convert::Into<crate::model::ThresholdConfig>,
68126        {
68127            use std::iter::Iterator;
68128            self.attribution_score_drift_thresholds =
68129                v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
68130            self
68131        }
68132
68133        /// Sets the value of [default_drift_threshold][crate::model::model_monitoring_objective_config::PredictionDriftDetectionConfig::default_drift_threshold].
68134        pub fn set_default_drift_threshold<T>(mut self, v: T) -> Self
68135        where
68136            T: std::convert::Into<crate::model::ThresholdConfig>,
68137        {
68138            self.default_drift_threshold = std::option::Option::Some(v.into());
68139            self
68140        }
68141
68142        /// Sets or clears the value of [default_drift_threshold][crate::model::model_monitoring_objective_config::PredictionDriftDetectionConfig::default_drift_threshold].
68143        pub fn set_or_clear_default_drift_threshold<T>(mut self, v: std::option::Option<T>) -> Self
68144        where
68145            T: std::convert::Into<crate::model::ThresholdConfig>,
68146        {
68147            self.default_drift_threshold = v.map(|x| x.into());
68148            self
68149        }
68150    }
68151
68152    #[cfg(feature = "job-service")]
68153    impl wkt::message::Message for PredictionDriftDetectionConfig {
68154        fn typename() -> &'static str {
68155            "type.googleapis.com/google.cloud.aiplatform.v1.ModelMonitoringObjectiveConfig.PredictionDriftDetectionConfig"
68156        }
68157    }
68158
68159    /// The config for integrating with Vertex Explainable AI. Only applicable if
68160    /// the Model has explanation_spec populated.
68161    #[cfg(feature = "job-service")]
68162    #[derive(Clone, Default, PartialEq)]
68163    #[non_exhaustive]
68164    pub struct ExplanationConfig {
68165
68166        /// If want to analyze the Vertex Explainable AI feature attribute scores or
68167        /// not. If set to true, Vertex AI will log the feature attributions from
68168        /// explain response and do the skew/drift detection for them.
68169        pub enable_feature_attributes: bool,
68170
68171        /// Predictions generated by the BatchPredictionJob using baseline dataset.
68172        pub explanation_baseline: std::option::Option<crate::model::model_monitoring_objective_config::explanation_config::ExplanationBaseline>,
68173
68174        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
68175    }
68176
68177    #[cfg(feature = "job-service")]
68178    impl ExplanationConfig {
68179        pub fn new() -> Self {
68180            std::default::Default::default()
68181        }
68182
68183        /// Sets the value of [enable_feature_attributes][crate::model::model_monitoring_objective_config::ExplanationConfig::enable_feature_attributes].
68184        pub fn set_enable_feature_attributes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
68185            self.enable_feature_attributes = v.into();
68186            self
68187        }
68188
68189        /// Sets the value of [explanation_baseline][crate::model::model_monitoring_objective_config::ExplanationConfig::explanation_baseline].
68190        pub fn set_explanation_baseline<T>(mut self, v: T) -> Self
68191        where T: std::convert::Into<crate::model::model_monitoring_objective_config::explanation_config::ExplanationBaseline>
68192        {
68193            self.explanation_baseline = std::option::Option::Some(v.into());
68194            self
68195        }
68196
68197        /// Sets or clears the value of [explanation_baseline][crate::model::model_monitoring_objective_config::ExplanationConfig::explanation_baseline].
68198        pub fn set_or_clear_explanation_baseline<T>(mut self, v: std::option::Option<T>) -> Self
68199        where T: std::convert::Into<crate::model::model_monitoring_objective_config::explanation_config::ExplanationBaseline>
68200        {
68201            self.explanation_baseline = v.map(|x| x.into());
68202            self
68203        }
68204    }
68205
68206    #[cfg(feature = "job-service")]
68207    impl wkt::message::Message for ExplanationConfig {
68208        fn typename() -> &'static str {
68209            "type.googleapis.com/google.cloud.aiplatform.v1.ModelMonitoringObjectiveConfig.ExplanationConfig"
68210        }
68211    }
68212
68213    /// Defines additional types related to [ExplanationConfig].
68214    #[cfg(feature = "job-service")]
68215    pub mod explanation_config {
68216        #[allow(unused_imports)]
68217        use super::*;
68218
68219        /// Output from
68220        /// [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] for
68221        /// Model Monitoring baseline dataset, which can be used to generate baseline
68222        /// attribution scores.
68223        ///
68224        /// [google.cloud.aiplatform.v1.BatchPredictionJob]: crate::model::BatchPredictionJob
68225        #[cfg(feature = "job-service")]
68226        #[derive(Clone, Default, PartialEq)]
68227        #[non_exhaustive]
68228        pub struct ExplanationBaseline {
68229
68230            /// The storage format of the predictions generated BatchPrediction job.
68231            pub prediction_format: crate::model::model_monitoring_objective_config::explanation_config::explanation_baseline::PredictionFormat,
68232
68233            /// The configuration specifying of BatchExplain job output. This can be
68234            /// used to generate the baseline of feature attribution scores.
68235            pub destination: std::option::Option<crate::model::model_monitoring_objective_config::explanation_config::explanation_baseline::Destination>,
68236
68237            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
68238        }
68239
68240        #[cfg(feature = "job-service")]
68241        impl ExplanationBaseline {
68242            pub fn new() -> Self {
68243                std::default::Default::default()
68244            }
68245
68246            /// Sets the value of [prediction_format][crate::model::model_monitoring_objective_config::explanation_config::ExplanationBaseline::prediction_format].
68247            pub fn set_prediction_format<T: std::convert::Into<crate::model::model_monitoring_objective_config::explanation_config::explanation_baseline::PredictionFormat>>(mut self, v: T) -> Self{
68248                self.prediction_format = v.into();
68249                self
68250            }
68251
68252            /// Sets the value of [destination][crate::model::model_monitoring_objective_config::explanation_config::ExplanationBaseline::destination].
68253            ///
68254            /// Note that all the setters affecting `destination` are mutually
68255            /// exclusive.
68256            pub fn set_destination<T: std::convert::Into<std::option::Option<crate::model::model_monitoring_objective_config::explanation_config::explanation_baseline::Destination>>>(mut self, v: T) -> Self
68257            {
68258                self.destination = v.into();
68259                self
68260            }
68261
68262            /// The value of [destination][crate::model::model_monitoring_objective_config::explanation_config::ExplanationBaseline::destination]
68263            /// if it holds a `Gcs`, `None` if the field is not set or
68264            /// holds a different branch.
68265            pub fn gcs(
68266                &self,
68267            ) -> std::option::Option<&std::boxed::Box<crate::model::GcsDestination>> {
68268                #[allow(unreachable_patterns)]
68269                self.destination.as_ref().and_then(|v| match v {
68270                    crate::model::model_monitoring_objective_config::explanation_config::explanation_baseline::Destination::Gcs(v) => std::option::Option::Some(v),
68271                    _ => std::option::Option::None,
68272                })
68273            }
68274
68275            /// Sets the value of [destination][crate::model::model_monitoring_objective_config::explanation_config::ExplanationBaseline::destination]
68276            /// to hold a `Gcs`.
68277            ///
68278            /// Note that all the setters affecting `destination` are
68279            /// mutually exclusive.
68280            pub fn set_gcs<T: std::convert::Into<std::boxed::Box<crate::model::GcsDestination>>>(
68281                mut self,
68282                v: T,
68283            ) -> Self {
68284                self.destination = std::option::Option::Some(
68285                    crate::model::model_monitoring_objective_config::explanation_config::explanation_baseline::Destination::Gcs(
68286                        v.into()
68287                    )
68288                );
68289                self
68290            }
68291
68292            /// The value of [destination][crate::model::model_monitoring_objective_config::explanation_config::ExplanationBaseline::destination]
68293            /// if it holds a `Bigquery`, `None` if the field is not set or
68294            /// holds a different branch.
68295            pub fn bigquery(
68296                &self,
68297            ) -> std::option::Option<&std::boxed::Box<crate::model::BigQueryDestination>>
68298            {
68299                #[allow(unreachable_patterns)]
68300                self.destination.as_ref().and_then(|v| match v {
68301                    crate::model::model_monitoring_objective_config::explanation_config::explanation_baseline::Destination::Bigquery(v) => std::option::Option::Some(v),
68302                    _ => std::option::Option::None,
68303                })
68304            }
68305
68306            /// Sets the value of [destination][crate::model::model_monitoring_objective_config::explanation_config::ExplanationBaseline::destination]
68307            /// to hold a `Bigquery`.
68308            ///
68309            /// Note that all the setters affecting `destination` are
68310            /// mutually exclusive.
68311            pub fn set_bigquery<
68312                T: std::convert::Into<std::boxed::Box<crate::model::BigQueryDestination>>,
68313            >(
68314                mut self,
68315                v: T,
68316            ) -> Self {
68317                self.destination = std::option::Option::Some(
68318                    crate::model::model_monitoring_objective_config::explanation_config::explanation_baseline::Destination::Bigquery(
68319                        v.into()
68320                    )
68321                );
68322                self
68323            }
68324        }
68325
68326        #[cfg(feature = "job-service")]
68327        impl wkt::message::Message for ExplanationBaseline {
68328            fn typename() -> &'static str {
68329                "type.googleapis.com/google.cloud.aiplatform.v1.ModelMonitoringObjectiveConfig.ExplanationConfig.ExplanationBaseline"
68330            }
68331        }
68332
68333        /// Defines additional types related to [ExplanationBaseline].
68334        #[cfg(feature = "job-service")]
68335        pub mod explanation_baseline {
68336            #[allow(unused_imports)]
68337            use super::*;
68338
68339            /// The storage format of the predictions generated BatchPrediction job.
68340            ///
68341            /// # Working with unknown values
68342            ///
68343            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
68344            /// additional enum variants at any time. Adding new variants is not considered
68345            /// a breaking change. Applications should write their code in anticipation of:
68346            ///
68347            /// - New values appearing in future releases of the client library, **and**
68348            /// - New values received dynamically, without application changes.
68349            ///
68350            /// Please consult the [Working with enums] section in the user guide for some
68351            /// guidelines.
68352            ///
68353            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
68354            #[cfg(feature = "job-service")]
68355            #[derive(Clone, Debug, PartialEq)]
68356            #[non_exhaustive]
68357            pub enum PredictionFormat {
68358                /// Should not be set.
68359                Unspecified,
68360                /// Predictions are in JSONL files.
68361                Jsonl,
68362                /// Predictions are in BigQuery.
68363                Bigquery,
68364                /// If set, the enum was initialized with an unknown value.
68365                ///
68366                /// Applications can examine the value using [PredictionFormat::value] or
68367                /// [PredictionFormat::name].
68368                UnknownValue(prediction_format::UnknownValue),
68369            }
68370
68371            #[doc(hidden)]
68372            #[cfg(feature = "job-service")]
68373            pub mod prediction_format {
68374                #[allow(unused_imports)]
68375                use super::*;
68376                #[derive(Clone, Debug, PartialEq)]
68377                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
68378            }
68379
68380            #[cfg(feature = "job-service")]
68381            impl PredictionFormat {
68382                /// Gets the enum value.
68383                ///
68384                /// Returns `None` if the enum contains an unknown value deserialized from
68385                /// the string representation of enums.
68386                pub fn value(&self) -> std::option::Option<i32> {
68387                    match self {
68388                        Self::Unspecified => std::option::Option::Some(0),
68389                        Self::Jsonl => std::option::Option::Some(2),
68390                        Self::Bigquery => std::option::Option::Some(3),
68391                        Self::UnknownValue(u) => u.0.value(),
68392                    }
68393                }
68394
68395                /// Gets the enum value as a string.
68396                ///
68397                /// Returns `None` if the enum contains an unknown value deserialized from
68398                /// the integer representation of enums.
68399                pub fn name(&self) -> std::option::Option<&str> {
68400                    match self {
68401                        Self::Unspecified => {
68402                            std::option::Option::Some("PREDICTION_FORMAT_UNSPECIFIED")
68403                        }
68404                        Self::Jsonl => std::option::Option::Some("JSONL"),
68405                        Self::Bigquery => std::option::Option::Some("BIGQUERY"),
68406                        Self::UnknownValue(u) => u.0.name(),
68407                    }
68408                }
68409            }
68410
68411            #[cfg(feature = "job-service")]
68412            impl std::default::Default for PredictionFormat {
68413                fn default() -> Self {
68414                    use std::convert::From;
68415                    Self::from(0)
68416                }
68417            }
68418
68419            #[cfg(feature = "job-service")]
68420            impl std::fmt::Display for PredictionFormat {
68421                fn fmt(
68422                    &self,
68423                    f: &mut std::fmt::Formatter<'_>,
68424                ) -> std::result::Result<(), std::fmt::Error> {
68425                    wkt::internal::display_enum(f, self.name(), self.value())
68426                }
68427            }
68428
68429            #[cfg(feature = "job-service")]
68430            impl std::convert::From<i32> for PredictionFormat {
68431                fn from(value: i32) -> Self {
68432                    match value {
68433                        0 => Self::Unspecified,
68434                        2 => Self::Jsonl,
68435                        3 => Self::Bigquery,
68436                        _ => Self::UnknownValue(prediction_format::UnknownValue(
68437                            wkt::internal::UnknownEnumValue::Integer(value),
68438                        )),
68439                    }
68440                }
68441            }
68442
68443            #[cfg(feature = "job-service")]
68444            impl std::convert::From<&str> for PredictionFormat {
68445                fn from(value: &str) -> Self {
68446                    use std::string::ToString;
68447                    match value {
68448                        "PREDICTION_FORMAT_UNSPECIFIED" => Self::Unspecified,
68449                        "JSONL" => Self::Jsonl,
68450                        "BIGQUERY" => Self::Bigquery,
68451                        _ => Self::UnknownValue(prediction_format::UnknownValue(
68452                            wkt::internal::UnknownEnumValue::String(value.to_string()),
68453                        )),
68454                    }
68455                }
68456            }
68457
68458            #[cfg(feature = "job-service")]
68459            impl serde::ser::Serialize for PredictionFormat {
68460                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
68461                where
68462                    S: serde::Serializer,
68463                {
68464                    match self {
68465                        Self::Unspecified => serializer.serialize_i32(0),
68466                        Self::Jsonl => serializer.serialize_i32(2),
68467                        Self::Bigquery => serializer.serialize_i32(3),
68468                        Self::UnknownValue(u) => u.0.serialize(serializer),
68469                    }
68470                }
68471            }
68472
68473            #[cfg(feature = "job-service")]
68474            impl<'de> serde::de::Deserialize<'de> for PredictionFormat {
68475                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
68476                where
68477                    D: serde::Deserializer<'de>,
68478                {
68479                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<PredictionFormat>::new(
68480                        ".google.cloud.aiplatform.v1.ModelMonitoringObjectiveConfig.ExplanationConfig.ExplanationBaseline.PredictionFormat"))
68481                }
68482            }
68483
68484            /// The configuration specifying of BatchExplain job output. This can be
68485            /// used to generate the baseline of feature attribution scores.
68486            #[cfg(feature = "job-service")]
68487            #[derive(Clone, Debug, PartialEq)]
68488            #[non_exhaustive]
68489            pub enum Destination {
68490                /// Cloud Storage location for BatchExplain output.
68491                Gcs(std::boxed::Box<crate::model::GcsDestination>),
68492                /// BigQuery location for BatchExplain output.
68493                Bigquery(std::boxed::Box<crate::model::BigQueryDestination>),
68494            }
68495        }
68496    }
68497}
68498
68499/// The alert config for model monitoring.
68500#[cfg(feature = "job-service")]
68501#[derive(Clone, Default, PartialEq)]
68502#[non_exhaustive]
68503pub struct ModelMonitoringAlertConfig {
68504    /// Dump the anomalies to Cloud Logging. The anomalies will be put to json
68505    /// payload encoded from proto
68506    /// [ModelMonitoringStatsAnomalies][google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies].
68507    /// This can be further synced to Pub/Sub or any other services supported by
68508    /// Cloud Logging.
68509    ///
68510    /// [google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies]: crate::model::ModelMonitoringStatsAnomalies
68511    pub enable_logging: bool,
68512
68513    /// Resource names of the NotificationChannels to send alert.
68514    /// Must be of the format
68515    /// `projects/<project_id_or_number>/notificationChannels/<channel_id>`
68516    pub notification_channels: std::vec::Vec<std::string::String>,
68517
68518    pub alert: std::option::Option<crate::model::model_monitoring_alert_config::Alert>,
68519
68520    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
68521}
68522
68523#[cfg(feature = "job-service")]
68524impl ModelMonitoringAlertConfig {
68525    pub fn new() -> Self {
68526        std::default::Default::default()
68527    }
68528
68529    /// Sets the value of [enable_logging][crate::model::ModelMonitoringAlertConfig::enable_logging].
68530    pub fn set_enable_logging<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
68531        self.enable_logging = v.into();
68532        self
68533    }
68534
68535    /// Sets the value of [notification_channels][crate::model::ModelMonitoringAlertConfig::notification_channels].
68536    pub fn set_notification_channels<T, V>(mut self, v: T) -> Self
68537    where
68538        T: std::iter::IntoIterator<Item = V>,
68539        V: std::convert::Into<std::string::String>,
68540    {
68541        use std::iter::Iterator;
68542        self.notification_channels = v.into_iter().map(|i| i.into()).collect();
68543        self
68544    }
68545
68546    /// Sets the value of [alert][crate::model::ModelMonitoringAlertConfig::alert].
68547    ///
68548    /// Note that all the setters affecting `alert` are mutually
68549    /// exclusive.
68550    pub fn set_alert<
68551        T: std::convert::Into<std::option::Option<crate::model::model_monitoring_alert_config::Alert>>,
68552    >(
68553        mut self,
68554        v: T,
68555    ) -> Self {
68556        self.alert = v.into();
68557        self
68558    }
68559
68560    /// The value of [alert][crate::model::ModelMonitoringAlertConfig::alert]
68561    /// if it holds a `EmailAlertConfig`, `None` if the field is not set or
68562    /// holds a different branch.
68563    pub fn email_alert_config(
68564        &self,
68565    ) -> std::option::Option<
68566        &std::boxed::Box<crate::model::model_monitoring_alert_config::EmailAlertConfig>,
68567    > {
68568        #[allow(unreachable_patterns)]
68569        self.alert.as_ref().and_then(|v| match v {
68570            crate::model::model_monitoring_alert_config::Alert::EmailAlertConfig(v) => {
68571                std::option::Option::Some(v)
68572            }
68573            _ => std::option::Option::None,
68574        })
68575    }
68576
68577    /// Sets the value of [alert][crate::model::ModelMonitoringAlertConfig::alert]
68578    /// to hold a `EmailAlertConfig`.
68579    ///
68580    /// Note that all the setters affecting `alert` are
68581    /// mutually exclusive.
68582    pub fn set_email_alert_config<
68583        T: std::convert::Into<
68584                std::boxed::Box<crate::model::model_monitoring_alert_config::EmailAlertConfig>,
68585            >,
68586    >(
68587        mut self,
68588        v: T,
68589    ) -> Self {
68590        self.alert = std::option::Option::Some(
68591            crate::model::model_monitoring_alert_config::Alert::EmailAlertConfig(v.into()),
68592        );
68593        self
68594    }
68595}
68596
68597#[cfg(feature = "job-service")]
68598impl wkt::message::Message for ModelMonitoringAlertConfig {
68599    fn typename() -> &'static str {
68600        "type.googleapis.com/google.cloud.aiplatform.v1.ModelMonitoringAlertConfig"
68601    }
68602}
68603
68604/// Defines additional types related to [ModelMonitoringAlertConfig].
68605#[cfg(feature = "job-service")]
68606pub mod model_monitoring_alert_config {
68607    #[allow(unused_imports)]
68608    use super::*;
68609
68610    /// The config for email alert.
68611    #[cfg(feature = "job-service")]
68612    #[derive(Clone, Default, PartialEq)]
68613    #[non_exhaustive]
68614    pub struct EmailAlertConfig {
68615        /// The email addresses to send the alert.
68616        pub user_emails: std::vec::Vec<std::string::String>,
68617
68618        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
68619    }
68620
68621    #[cfg(feature = "job-service")]
68622    impl EmailAlertConfig {
68623        pub fn new() -> Self {
68624            std::default::Default::default()
68625        }
68626
68627        /// Sets the value of [user_emails][crate::model::model_monitoring_alert_config::EmailAlertConfig::user_emails].
68628        pub fn set_user_emails<T, V>(mut self, v: T) -> Self
68629        where
68630            T: std::iter::IntoIterator<Item = V>,
68631            V: std::convert::Into<std::string::String>,
68632        {
68633            use std::iter::Iterator;
68634            self.user_emails = v.into_iter().map(|i| i.into()).collect();
68635            self
68636        }
68637    }
68638
68639    #[cfg(feature = "job-service")]
68640    impl wkt::message::Message for EmailAlertConfig {
68641        fn typename() -> &'static str {
68642            "type.googleapis.com/google.cloud.aiplatform.v1.ModelMonitoringAlertConfig.EmailAlertConfig"
68643        }
68644    }
68645
68646    #[cfg(feature = "job-service")]
68647    #[derive(Clone, Debug, PartialEq)]
68648    #[non_exhaustive]
68649    pub enum Alert {
68650        /// Email alert config.
68651        EmailAlertConfig(
68652            std::boxed::Box<crate::model::model_monitoring_alert_config::EmailAlertConfig>,
68653        ),
68654    }
68655}
68656
68657/// The config for feature monitoring threshold.
68658#[cfg(feature = "job-service")]
68659#[derive(Clone, Default, PartialEq)]
68660#[non_exhaustive]
68661pub struct ThresholdConfig {
68662    pub threshold: std::option::Option<crate::model::threshold_config::Threshold>,
68663
68664    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
68665}
68666
68667#[cfg(feature = "job-service")]
68668impl ThresholdConfig {
68669    pub fn new() -> Self {
68670        std::default::Default::default()
68671    }
68672
68673    /// Sets the value of [threshold][crate::model::ThresholdConfig::threshold].
68674    ///
68675    /// Note that all the setters affecting `threshold` are mutually
68676    /// exclusive.
68677    pub fn set_threshold<
68678        T: std::convert::Into<std::option::Option<crate::model::threshold_config::Threshold>>,
68679    >(
68680        mut self,
68681        v: T,
68682    ) -> Self {
68683        self.threshold = v.into();
68684        self
68685    }
68686
68687    /// The value of [threshold][crate::model::ThresholdConfig::threshold]
68688    /// if it holds a `Value`, `None` if the field is not set or
68689    /// holds a different branch.
68690    pub fn value(&self) -> std::option::Option<&f64> {
68691        #[allow(unreachable_patterns)]
68692        self.threshold.as_ref().and_then(|v| match v {
68693            crate::model::threshold_config::Threshold::Value(v) => std::option::Option::Some(v),
68694            _ => std::option::Option::None,
68695        })
68696    }
68697
68698    /// Sets the value of [threshold][crate::model::ThresholdConfig::threshold]
68699    /// to hold a `Value`.
68700    ///
68701    /// Note that all the setters affecting `threshold` are
68702    /// mutually exclusive.
68703    pub fn set_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
68704        self.threshold =
68705            std::option::Option::Some(crate::model::threshold_config::Threshold::Value(v.into()));
68706        self
68707    }
68708}
68709
68710#[cfg(feature = "job-service")]
68711impl wkt::message::Message for ThresholdConfig {
68712    fn typename() -> &'static str {
68713        "type.googleapis.com/google.cloud.aiplatform.v1.ThresholdConfig"
68714    }
68715}
68716
68717/// Defines additional types related to [ThresholdConfig].
68718#[cfg(feature = "job-service")]
68719pub mod threshold_config {
68720    #[allow(unused_imports)]
68721    use super::*;
68722
68723    #[cfg(feature = "job-service")]
68724    #[derive(Clone, Debug, PartialEq)]
68725    #[non_exhaustive]
68726    pub enum Threshold {
68727        /// Specify a threshold value that can trigger the alert.
68728        /// If this threshold config is for feature distribution distance:
68729        ///
68730        /// 1. For categorical feature, the distribution distance is calculated by
68731        ///    L-inifinity norm.
68732        /// 1. For numerical feature, the distribution distance is calculated by
68733        ///    Jensen–Shannon divergence.
68734        ///    Each feature must have a non-zero threshold if they need to be monitored.
68735        ///    Otherwise no alert will be triggered for that feature.
68736        Value(f64),
68737    }
68738}
68739
68740/// Sampling Strategy for logging, can be for both training and prediction
68741/// dataset.
68742#[cfg(feature = "job-service")]
68743#[derive(Clone, Default, PartialEq)]
68744#[non_exhaustive]
68745pub struct SamplingStrategy {
68746    /// Random sample config. Will support more sampling strategies later.
68747    pub random_sample_config:
68748        std::option::Option<crate::model::sampling_strategy::RandomSampleConfig>,
68749
68750    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
68751}
68752
68753#[cfg(feature = "job-service")]
68754impl SamplingStrategy {
68755    pub fn new() -> Self {
68756        std::default::Default::default()
68757    }
68758
68759    /// Sets the value of [random_sample_config][crate::model::SamplingStrategy::random_sample_config].
68760    pub fn set_random_sample_config<T>(mut self, v: T) -> Self
68761    where
68762        T: std::convert::Into<crate::model::sampling_strategy::RandomSampleConfig>,
68763    {
68764        self.random_sample_config = std::option::Option::Some(v.into());
68765        self
68766    }
68767
68768    /// Sets or clears the value of [random_sample_config][crate::model::SamplingStrategy::random_sample_config].
68769    pub fn set_or_clear_random_sample_config<T>(mut self, v: std::option::Option<T>) -> Self
68770    where
68771        T: std::convert::Into<crate::model::sampling_strategy::RandomSampleConfig>,
68772    {
68773        self.random_sample_config = v.map(|x| x.into());
68774        self
68775    }
68776}
68777
68778#[cfg(feature = "job-service")]
68779impl wkt::message::Message for SamplingStrategy {
68780    fn typename() -> &'static str {
68781        "type.googleapis.com/google.cloud.aiplatform.v1.SamplingStrategy"
68782    }
68783}
68784
68785/// Defines additional types related to [SamplingStrategy].
68786#[cfg(feature = "job-service")]
68787pub mod sampling_strategy {
68788    #[allow(unused_imports)]
68789    use super::*;
68790
68791    /// Requests are randomly selected.
68792    #[cfg(feature = "job-service")]
68793    #[derive(Clone, Default, PartialEq)]
68794    #[non_exhaustive]
68795    pub struct RandomSampleConfig {
68796        /// Sample rate (0, 1]
68797        pub sample_rate: f64,
68798
68799        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
68800    }
68801
68802    #[cfg(feature = "job-service")]
68803    impl RandomSampleConfig {
68804        pub fn new() -> Self {
68805            std::default::Default::default()
68806        }
68807
68808        /// Sets the value of [sample_rate][crate::model::sampling_strategy::RandomSampleConfig::sample_rate].
68809        pub fn set_sample_rate<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
68810            self.sample_rate = v.into();
68811            self
68812        }
68813    }
68814
68815    #[cfg(feature = "job-service")]
68816    impl wkt::message::Message for RandomSampleConfig {
68817        fn typename() -> &'static str {
68818            "type.googleapis.com/google.cloud.aiplatform.v1.SamplingStrategy.RandomSampleConfig"
68819        }
68820    }
68821}
68822
68823/// Request message for
68824/// [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel].
68825///
68826/// [google.cloud.aiplatform.v1.ModelService.UploadModel]: crate::client::ModelService::upload_model
68827#[cfg(feature = "model-service")]
68828#[derive(Clone, Default, PartialEq)]
68829#[non_exhaustive]
68830pub struct UploadModelRequest {
68831    /// Required. The resource name of the Location into which to upload the Model.
68832    /// Format: `projects/{project}/locations/{location}`
68833    pub parent: std::string::String,
68834
68835    /// Optional. The resource name of the model into which to upload the version.
68836    /// Only specify this field when uploading a new version.
68837    pub parent_model: std::string::String,
68838
68839    /// Optional. The ID to use for the uploaded Model, which will become the final
68840    /// component of the model resource name.
68841    ///
68842    /// This value may be up to 63 characters, and valid characters are
68843    /// `[a-z0-9_-]`. The first character cannot be a number or hyphen.
68844    pub model_id: std::string::String,
68845
68846    /// Required. The Model to create.
68847    pub model: std::option::Option<crate::model::Model>,
68848
68849    /// Optional. The user-provided custom service account to use to do the model
68850    /// upload. If empty, [Vertex AI Service
68851    /// Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
68852    /// will be used to access resources needed to upload the model. This account
68853    /// must belong to the target project where the model is uploaded to, i.e., the
68854    /// project specified in the `parent` field of this request and have necessary
68855    /// read permissions (to Google Cloud Storage, Artifact Registry, etc.).
68856    pub service_account: std::string::String,
68857
68858    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
68859}
68860
68861#[cfg(feature = "model-service")]
68862impl UploadModelRequest {
68863    pub fn new() -> Self {
68864        std::default::Default::default()
68865    }
68866
68867    /// Sets the value of [parent][crate::model::UploadModelRequest::parent].
68868    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
68869        self.parent = v.into();
68870        self
68871    }
68872
68873    /// Sets the value of [parent_model][crate::model::UploadModelRequest::parent_model].
68874    pub fn set_parent_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
68875        self.parent_model = v.into();
68876        self
68877    }
68878
68879    /// Sets the value of [model_id][crate::model::UploadModelRequest::model_id].
68880    pub fn set_model_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
68881        self.model_id = v.into();
68882        self
68883    }
68884
68885    /// Sets the value of [model][crate::model::UploadModelRequest::model].
68886    pub fn set_model<T>(mut self, v: T) -> Self
68887    where
68888        T: std::convert::Into<crate::model::Model>,
68889    {
68890        self.model = std::option::Option::Some(v.into());
68891        self
68892    }
68893
68894    /// Sets or clears the value of [model][crate::model::UploadModelRequest::model].
68895    pub fn set_or_clear_model<T>(mut self, v: std::option::Option<T>) -> Self
68896    where
68897        T: std::convert::Into<crate::model::Model>,
68898    {
68899        self.model = v.map(|x| x.into());
68900        self
68901    }
68902
68903    /// Sets the value of [service_account][crate::model::UploadModelRequest::service_account].
68904    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
68905        self.service_account = v.into();
68906        self
68907    }
68908}
68909
68910#[cfg(feature = "model-service")]
68911impl wkt::message::Message for UploadModelRequest {
68912    fn typename() -> &'static str {
68913        "type.googleapis.com/google.cloud.aiplatform.v1.UploadModelRequest"
68914    }
68915}
68916
68917/// Details of
68918/// [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel]
68919/// operation.
68920///
68921/// [google.cloud.aiplatform.v1.ModelService.UploadModel]: crate::client::ModelService::upload_model
68922#[cfg(feature = "model-service")]
68923#[derive(Clone, Default, PartialEq)]
68924#[non_exhaustive]
68925pub struct UploadModelOperationMetadata {
68926    /// The common part of the operation metadata.
68927    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
68928
68929    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
68930}
68931
68932#[cfg(feature = "model-service")]
68933impl UploadModelOperationMetadata {
68934    pub fn new() -> Self {
68935        std::default::Default::default()
68936    }
68937
68938    /// Sets the value of [generic_metadata][crate::model::UploadModelOperationMetadata::generic_metadata].
68939    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
68940    where
68941        T: std::convert::Into<crate::model::GenericOperationMetadata>,
68942    {
68943        self.generic_metadata = std::option::Option::Some(v.into());
68944        self
68945    }
68946
68947    /// Sets or clears the value of [generic_metadata][crate::model::UploadModelOperationMetadata::generic_metadata].
68948    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
68949    where
68950        T: std::convert::Into<crate::model::GenericOperationMetadata>,
68951    {
68952        self.generic_metadata = v.map(|x| x.into());
68953        self
68954    }
68955}
68956
68957#[cfg(feature = "model-service")]
68958impl wkt::message::Message for UploadModelOperationMetadata {
68959    fn typename() -> &'static str {
68960        "type.googleapis.com/google.cloud.aiplatform.v1.UploadModelOperationMetadata"
68961    }
68962}
68963
68964/// Response message of
68965/// [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel]
68966/// operation.
68967///
68968/// [google.cloud.aiplatform.v1.ModelService.UploadModel]: crate::client::ModelService::upload_model
68969#[cfg(feature = "model-service")]
68970#[derive(Clone, Default, PartialEq)]
68971#[non_exhaustive]
68972pub struct UploadModelResponse {
68973    /// The name of the uploaded Model resource.
68974    /// Format: `projects/{project}/locations/{location}/models/{model}`
68975    pub model: std::string::String,
68976
68977    /// Output only. The version ID of the model that is uploaded.
68978    pub model_version_id: std::string::String,
68979
68980    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
68981}
68982
68983#[cfg(feature = "model-service")]
68984impl UploadModelResponse {
68985    pub fn new() -> Self {
68986        std::default::Default::default()
68987    }
68988
68989    /// Sets the value of [model][crate::model::UploadModelResponse::model].
68990    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
68991        self.model = v.into();
68992        self
68993    }
68994
68995    /// Sets the value of [model_version_id][crate::model::UploadModelResponse::model_version_id].
68996    pub fn set_model_version_id<T: std::convert::Into<std::string::String>>(
68997        mut self,
68998        v: T,
68999    ) -> Self {
69000        self.model_version_id = v.into();
69001        self
69002    }
69003}
69004
69005#[cfg(feature = "model-service")]
69006impl wkt::message::Message for UploadModelResponse {
69007    fn typename() -> &'static str {
69008        "type.googleapis.com/google.cloud.aiplatform.v1.UploadModelResponse"
69009    }
69010}
69011
69012/// Request message for
69013/// [ModelService.GetModel][google.cloud.aiplatform.v1.ModelService.GetModel].
69014///
69015/// [google.cloud.aiplatform.v1.ModelService.GetModel]: crate::client::ModelService::get_model
69016#[cfg(feature = "model-service")]
69017#[derive(Clone, Default, PartialEq)]
69018#[non_exhaustive]
69019pub struct GetModelRequest {
69020    /// Required. The name of the Model resource.
69021    /// Format: `projects/{project}/locations/{location}/models/{model}`
69022    ///
69023    /// In order to retrieve a specific version of the model, also provide
69024    /// the version ID or version alias.
69025    /// Example: `projects/{project}/locations/{location}/models/{model}@2`
69026    /// or
69027    /// `projects/{project}/locations/{location}/models/{model}@golden`
69028    /// If no version ID or alias is specified, the "default" version will be
69029    /// returned. The "default" version alias is created for the first version of
69030    /// the model, and can be moved to other versions later on. There will be
69031    /// exactly one default version.
69032    pub name: std::string::String,
69033
69034    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69035}
69036
69037#[cfg(feature = "model-service")]
69038impl GetModelRequest {
69039    pub fn new() -> Self {
69040        std::default::Default::default()
69041    }
69042
69043    /// Sets the value of [name][crate::model::GetModelRequest::name].
69044    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69045        self.name = v.into();
69046        self
69047    }
69048}
69049
69050#[cfg(feature = "model-service")]
69051impl wkt::message::Message for GetModelRequest {
69052    fn typename() -> &'static str {
69053        "type.googleapis.com/google.cloud.aiplatform.v1.GetModelRequest"
69054    }
69055}
69056
69057/// Request message for
69058/// [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels].
69059///
69060/// [google.cloud.aiplatform.v1.ModelService.ListModels]: crate::client::ModelService::list_models
69061#[cfg(feature = "model-service")]
69062#[derive(Clone, Default, PartialEq)]
69063#[non_exhaustive]
69064pub struct ListModelsRequest {
69065    /// Required. The resource name of the Location to list the Models from.
69066    /// Format: `projects/{project}/locations/{location}`
69067    pub parent: std::string::String,
69068
69069    /// An expression for filtering the results of the request. For field names
69070    /// both snake_case and camelCase are supported.
69071    ///
69072    /// * `model` supports = and !=. `model` represents the Model ID,
69073    ///   i.e. the last segment of the Model's [resource
69074    ///   name][google.cloud.aiplatform.v1.Model.name].
69075    /// * `display_name` supports = and !=
69076    /// * `labels` supports general map functions that is:
69077    ///   * `labels.key=value` - key:value equality
69078    ///   * `labels.key:* or labels:key - key existence
69079    ///   * A key including a space must be quoted. `labels."a key"`.
69080    /// * `base_model_name` only supports =
69081    ///
69082    /// Some examples:
69083    ///
69084    /// * `model=1234`
69085    /// * `displayName="myDisplayName"`
69086    /// * `labels.myKey="myValue"`
69087    /// * `baseModelName="text-bison"`
69088    ///
69089    /// [google.cloud.aiplatform.v1.Model.name]: crate::model::Model::name
69090    pub filter: std::string::String,
69091
69092    /// The standard list page size.
69093    pub page_size: i32,
69094
69095    /// The standard list page token.
69096    /// Typically obtained via
69097    /// [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token]
69098    /// of the previous
69099    /// [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels]
69100    /// call.
69101    ///
69102    /// [google.cloud.aiplatform.v1.ListModelsResponse.next_page_token]: crate::model::ListModelsResponse::next_page_token
69103    /// [google.cloud.aiplatform.v1.ModelService.ListModels]: crate::client::ModelService::list_models
69104    pub page_token: std::string::String,
69105
69106    /// Mask specifying which fields to read.
69107    pub read_mask: std::option::Option<wkt::FieldMask>,
69108
69109    /// A comma-separated list of fields to order by, sorted in ascending order.
69110    /// Use "desc" after a field name for descending.
69111    /// Supported fields:
69112    ///
69113    /// * `display_name`
69114    /// * `create_time`
69115    /// * `update_time`
69116    ///
69117    /// Example: `display_name, create_time desc`.
69118    pub order_by: std::string::String,
69119
69120    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69121}
69122
69123#[cfg(feature = "model-service")]
69124impl ListModelsRequest {
69125    pub fn new() -> Self {
69126        std::default::Default::default()
69127    }
69128
69129    /// Sets the value of [parent][crate::model::ListModelsRequest::parent].
69130    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69131        self.parent = v.into();
69132        self
69133    }
69134
69135    /// Sets the value of [filter][crate::model::ListModelsRequest::filter].
69136    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69137        self.filter = v.into();
69138        self
69139    }
69140
69141    /// Sets the value of [page_size][crate::model::ListModelsRequest::page_size].
69142    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
69143        self.page_size = v.into();
69144        self
69145    }
69146
69147    /// Sets the value of [page_token][crate::model::ListModelsRequest::page_token].
69148    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69149        self.page_token = v.into();
69150        self
69151    }
69152
69153    /// Sets the value of [read_mask][crate::model::ListModelsRequest::read_mask].
69154    pub fn set_read_mask<T>(mut self, v: T) -> Self
69155    where
69156        T: std::convert::Into<wkt::FieldMask>,
69157    {
69158        self.read_mask = std::option::Option::Some(v.into());
69159        self
69160    }
69161
69162    /// Sets or clears the value of [read_mask][crate::model::ListModelsRequest::read_mask].
69163    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
69164    where
69165        T: std::convert::Into<wkt::FieldMask>,
69166    {
69167        self.read_mask = v.map(|x| x.into());
69168        self
69169    }
69170
69171    /// Sets the value of [order_by][crate::model::ListModelsRequest::order_by].
69172    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69173        self.order_by = v.into();
69174        self
69175    }
69176}
69177
69178#[cfg(feature = "model-service")]
69179impl wkt::message::Message for ListModelsRequest {
69180    fn typename() -> &'static str {
69181        "type.googleapis.com/google.cloud.aiplatform.v1.ListModelsRequest"
69182    }
69183}
69184
69185/// Response message for
69186/// [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels]
69187///
69188/// [google.cloud.aiplatform.v1.ModelService.ListModels]: crate::client::ModelService::list_models
69189#[cfg(feature = "model-service")]
69190#[derive(Clone, Default, PartialEq)]
69191#[non_exhaustive]
69192pub struct ListModelsResponse {
69193    /// List of Models in the requested page.
69194    pub models: std::vec::Vec<crate::model::Model>,
69195
69196    /// A token to retrieve next page of results.
69197    /// Pass to
69198    /// [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token]
69199    /// to obtain that page.
69200    ///
69201    /// [google.cloud.aiplatform.v1.ListModelsRequest.page_token]: crate::model::ListModelsRequest::page_token
69202    pub next_page_token: std::string::String,
69203
69204    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69205}
69206
69207#[cfg(feature = "model-service")]
69208impl ListModelsResponse {
69209    pub fn new() -> Self {
69210        std::default::Default::default()
69211    }
69212
69213    /// Sets the value of [models][crate::model::ListModelsResponse::models].
69214    pub fn set_models<T, V>(mut self, v: T) -> Self
69215    where
69216        T: std::iter::IntoIterator<Item = V>,
69217        V: std::convert::Into<crate::model::Model>,
69218    {
69219        use std::iter::Iterator;
69220        self.models = v.into_iter().map(|i| i.into()).collect();
69221        self
69222    }
69223
69224    /// Sets the value of [next_page_token][crate::model::ListModelsResponse::next_page_token].
69225    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69226        self.next_page_token = v.into();
69227        self
69228    }
69229}
69230
69231#[cfg(feature = "model-service")]
69232impl wkt::message::Message for ListModelsResponse {
69233    fn typename() -> &'static str {
69234        "type.googleapis.com/google.cloud.aiplatform.v1.ListModelsResponse"
69235    }
69236}
69237
69238#[cfg(feature = "model-service")]
69239#[doc(hidden)]
69240impl gax::paginator::internal::PageableResponse for ListModelsResponse {
69241    type PageItem = crate::model::Model;
69242
69243    fn items(self) -> std::vec::Vec<Self::PageItem> {
69244        self.models
69245    }
69246
69247    fn next_page_token(&self) -> std::string::String {
69248        use std::clone::Clone;
69249        self.next_page_token.clone()
69250    }
69251}
69252
69253/// Request message for
69254/// [ModelService.ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions].
69255///
69256/// [google.cloud.aiplatform.v1.ModelService.ListModelVersions]: crate::client::ModelService::list_model_versions
69257#[cfg(feature = "model-service")]
69258#[derive(Clone, Default, PartialEq)]
69259#[non_exhaustive]
69260pub struct ListModelVersionsRequest {
69261    /// Required. The name of the model to list versions for.
69262    pub name: std::string::String,
69263
69264    /// The standard list page size.
69265    pub page_size: i32,
69266
69267    /// The standard list page token.
69268    /// Typically obtained via
69269    /// [next_page_token][google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token]
69270    /// of the previous
69271    /// [ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions]
69272    /// call.
69273    ///
69274    /// [google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token]: crate::model::ListModelVersionsResponse::next_page_token
69275    /// [google.cloud.aiplatform.v1.ModelService.ListModelVersions]: crate::client::ModelService::list_model_versions
69276    pub page_token: std::string::String,
69277
69278    /// An expression for filtering the results of the request. For field names
69279    /// both snake_case and camelCase are supported.
69280    ///
69281    /// * `labels` supports general map functions that is:
69282    ///   * `labels.key=value` - key:value equality
69283    ///   * `labels.key:* or labels:key - key existence
69284    ///   * A key including a space must be quoted. `labels."a key"`.
69285    ///
69286    /// Some examples:
69287    ///
69288    /// * `labels.myKey="myValue"`
69289    pub filter: std::string::String,
69290
69291    /// Mask specifying which fields to read.
69292    pub read_mask: std::option::Option<wkt::FieldMask>,
69293
69294    /// A comma-separated list of fields to order by, sorted in ascending order.
69295    /// Use "desc" after a field name for descending.
69296    /// Supported fields:
69297    ///
69298    /// * `create_time`
69299    /// * `update_time`
69300    ///
69301    /// Example: `update_time asc, create_time desc`.
69302    pub order_by: std::string::String,
69303
69304    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69305}
69306
69307#[cfg(feature = "model-service")]
69308impl ListModelVersionsRequest {
69309    pub fn new() -> Self {
69310        std::default::Default::default()
69311    }
69312
69313    /// Sets the value of [name][crate::model::ListModelVersionsRequest::name].
69314    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69315        self.name = v.into();
69316        self
69317    }
69318
69319    /// Sets the value of [page_size][crate::model::ListModelVersionsRequest::page_size].
69320    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
69321        self.page_size = v.into();
69322        self
69323    }
69324
69325    /// Sets the value of [page_token][crate::model::ListModelVersionsRequest::page_token].
69326    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69327        self.page_token = v.into();
69328        self
69329    }
69330
69331    /// Sets the value of [filter][crate::model::ListModelVersionsRequest::filter].
69332    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69333        self.filter = v.into();
69334        self
69335    }
69336
69337    /// Sets the value of [read_mask][crate::model::ListModelVersionsRequest::read_mask].
69338    pub fn set_read_mask<T>(mut self, v: T) -> Self
69339    where
69340        T: std::convert::Into<wkt::FieldMask>,
69341    {
69342        self.read_mask = std::option::Option::Some(v.into());
69343        self
69344    }
69345
69346    /// Sets or clears the value of [read_mask][crate::model::ListModelVersionsRequest::read_mask].
69347    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
69348    where
69349        T: std::convert::Into<wkt::FieldMask>,
69350    {
69351        self.read_mask = v.map(|x| x.into());
69352        self
69353    }
69354
69355    /// Sets the value of [order_by][crate::model::ListModelVersionsRequest::order_by].
69356    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69357        self.order_by = v.into();
69358        self
69359    }
69360}
69361
69362#[cfg(feature = "model-service")]
69363impl wkt::message::Message for ListModelVersionsRequest {
69364    fn typename() -> &'static str {
69365        "type.googleapis.com/google.cloud.aiplatform.v1.ListModelVersionsRequest"
69366    }
69367}
69368
69369/// Response message for
69370/// [ModelService.ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions]
69371///
69372/// [google.cloud.aiplatform.v1.ModelService.ListModelVersions]: crate::client::ModelService::list_model_versions
69373#[cfg(feature = "model-service")]
69374#[derive(Clone, Default, PartialEq)]
69375#[non_exhaustive]
69376pub struct ListModelVersionsResponse {
69377    /// List of Model versions in the requested page.
69378    /// In the returned Model name field, version ID instead of regvision tag will
69379    /// be included.
69380    pub models: std::vec::Vec<crate::model::Model>,
69381
69382    /// A token to retrieve the next page of results.
69383    /// Pass to
69384    /// [ListModelVersionsRequest.page_token][google.cloud.aiplatform.v1.ListModelVersionsRequest.page_token]
69385    /// to obtain that page.
69386    ///
69387    /// [google.cloud.aiplatform.v1.ListModelVersionsRequest.page_token]: crate::model::ListModelVersionsRequest::page_token
69388    pub next_page_token: std::string::String,
69389
69390    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69391}
69392
69393#[cfg(feature = "model-service")]
69394impl ListModelVersionsResponse {
69395    pub fn new() -> Self {
69396        std::default::Default::default()
69397    }
69398
69399    /// Sets the value of [models][crate::model::ListModelVersionsResponse::models].
69400    pub fn set_models<T, V>(mut self, v: T) -> Self
69401    where
69402        T: std::iter::IntoIterator<Item = V>,
69403        V: std::convert::Into<crate::model::Model>,
69404    {
69405        use std::iter::Iterator;
69406        self.models = v.into_iter().map(|i| i.into()).collect();
69407        self
69408    }
69409
69410    /// Sets the value of [next_page_token][crate::model::ListModelVersionsResponse::next_page_token].
69411    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69412        self.next_page_token = v.into();
69413        self
69414    }
69415}
69416
69417#[cfg(feature = "model-service")]
69418impl wkt::message::Message for ListModelVersionsResponse {
69419    fn typename() -> &'static str {
69420        "type.googleapis.com/google.cloud.aiplatform.v1.ListModelVersionsResponse"
69421    }
69422}
69423
69424#[cfg(feature = "model-service")]
69425#[doc(hidden)]
69426impl gax::paginator::internal::PageableResponse for ListModelVersionsResponse {
69427    type PageItem = crate::model::Model;
69428
69429    fn items(self) -> std::vec::Vec<Self::PageItem> {
69430        self.models
69431    }
69432
69433    fn next_page_token(&self) -> std::string::String {
69434        use std::clone::Clone;
69435        self.next_page_token.clone()
69436    }
69437}
69438
69439/// Request message for
69440/// [ModelService.ListModelVersionCheckpoints][google.cloud.aiplatform.v1.ModelService.ListModelVersionCheckpoints].
69441///
69442/// [google.cloud.aiplatform.v1.ModelService.ListModelVersionCheckpoints]: crate::client::ModelService::list_model_version_checkpoints
69443#[cfg(feature = "model-service")]
69444#[derive(Clone, Default, PartialEq)]
69445#[non_exhaustive]
69446pub struct ListModelVersionCheckpointsRequest {
69447    /// Required. The name of the model version to list checkpoints for.
69448    /// `projects/{project}/locations/{location}/models/{model}@{version}`
69449    /// Example: `projects/{project}/locations/{location}/models/{model}@2`
69450    /// or
69451    /// `projects/{project}/locations/{location}/models/{model}@golden`
69452    /// If no version ID or alias is specified, the latest version will be
69453    /// used.
69454    pub name: std::string::String,
69455
69456    /// Optional. The standard list page size.
69457    pub page_size: i32,
69458
69459    /// Optional. The standard list page token.
69460    /// Typically obtained via
69461    /// [next_page_token][google.cloud.aiplatform.v1.ListModelVersionCheckpointsResponse.next_page_token]
69462    /// of the previous
69463    /// [ListModelVersionCheckpoints][google.cloud.aiplatform.v1.ModelService.ListModelVersionCheckpoints]
69464    /// call.
69465    ///
69466    /// [google.cloud.aiplatform.v1.ListModelVersionCheckpointsResponse.next_page_token]: crate::model::ListModelVersionCheckpointsResponse::next_page_token
69467    /// [google.cloud.aiplatform.v1.ModelService.ListModelVersionCheckpoints]: crate::client::ModelService::list_model_version_checkpoints
69468    pub page_token: std::string::String,
69469
69470    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69471}
69472
69473#[cfg(feature = "model-service")]
69474impl ListModelVersionCheckpointsRequest {
69475    pub fn new() -> Self {
69476        std::default::Default::default()
69477    }
69478
69479    /// Sets the value of [name][crate::model::ListModelVersionCheckpointsRequest::name].
69480    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69481        self.name = v.into();
69482        self
69483    }
69484
69485    /// Sets the value of [page_size][crate::model::ListModelVersionCheckpointsRequest::page_size].
69486    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
69487        self.page_size = v.into();
69488        self
69489    }
69490
69491    /// Sets the value of [page_token][crate::model::ListModelVersionCheckpointsRequest::page_token].
69492    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69493        self.page_token = v.into();
69494        self
69495    }
69496}
69497
69498#[cfg(feature = "model-service")]
69499impl wkt::message::Message for ListModelVersionCheckpointsRequest {
69500    fn typename() -> &'static str {
69501        "type.googleapis.com/google.cloud.aiplatform.v1.ListModelVersionCheckpointsRequest"
69502    }
69503}
69504
69505/// A proto representation of a Spanner-stored ModelVersionCheckpoint.
69506/// The meaning of the fields is equivalent to their in-Spanner counterparts.
69507#[cfg(feature = "model-service")]
69508#[derive(Clone, Default, PartialEq)]
69509#[non_exhaustive]
69510pub struct ModelVersionCheckpoint {
69511    /// The ID of the checkpoint.
69512    pub checkpoint_id: std::string::String,
69513
69514    /// The epoch of the checkpoint.
69515    pub epoch: i64,
69516
69517    /// The step of the checkpoint.
69518    pub step: i64,
69519
69520    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69521}
69522
69523#[cfg(feature = "model-service")]
69524impl ModelVersionCheckpoint {
69525    pub fn new() -> Self {
69526        std::default::Default::default()
69527    }
69528
69529    /// Sets the value of [checkpoint_id][crate::model::ModelVersionCheckpoint::checkpoint_id].
69530    pub fn set_checkpoint_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69531        self.checkpoint_id = v.into();
69532        self
69533    }
69534
69535    /// Sets the value of [epoch][crate::model::ModelVersionCheckpoint::epoch].
69536    pub fn set_epoch<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
69537        self.epoch = v.into();
69538        self
69539    }
69540
69541    /// Sets the value of [step][crate::model::ModelVersionCheckpoint::step].
69542    pub fn set_step<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
69543        self.step = v.into();
69544        self
69545    }
69546}
69547
69548#[cfg(feature = "model-service")]
69549impl wkt::message::Message for ModelVersionCheckpoint {
69550    fn typename() -> &'static str {
69551        "type.googleapis.com/google.cloud.aiplatform.v1.ModelVersionCheckpoint"
69552    }
69553}
69554
69555/// Response message for
69556/// [ModelService.ListModelVersionCheckpoints][google.cloud.aiplatform.v1.ModelService.ListModelVersionCheckpoints]
69557///
69558/// [google.cloud.aiplatform.v1.ModelService.ListModelVersionCheckpoints]: crate::client::ModelService::list_model_version_checkpoints
69559#[cfg(feature = "model-service")]
69560#[derive(Clone, Default, PartialEq)]
69561#[non_exhaustive]
69562pub struct ListModelVersionCheckpointsResponse {
69563    /// List of Model Version checkpoints.
69564    pub checkpoints: std::vec::Vec<crate::model::ModelVersionCheckpoint>,
69565
69566    /// A token to retrieve the next page of results.
69567    /// Pass to
69568    /// [ListModelVersionCheckpointsRequest.page_token][google.cloud.aiplatform.v1.ListModelVersionCheckpointsRequest.page_token]
69569    /// to obtain that page.
69570    ///
69571    /// [google.cloud.aiplatform.v1.ListModelVersionCheckpointsRequest.page_token]: crate::model::ListModelVersionCheckpointsRequest::page_token
69572    pub next_page_token: std::string::String,
69573
69574    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69575}
69576
69577#[cfg(feature = "model-service")]
69578impl ListModelVersionCheckpointsResponse {
69579    pub fn new() -> Self {
69580        std::default::Default::default()
69581    }
69582
69583    /// Sets the value of [checkpoints][crate::model::ListModelVersionCheckpointsResponse::checkpoints].
69584    pub fn set_checkpoints<T, V>(mut self, v: T) -> Self
69585    where
69586        T: std::iter::IntoIterator<Item = V>,
69587        V: std::convert::Into<crate::model::ModelVersionCheckpoint>,
69588    {
69589        use std::iter::Iterator;
69590        self.checkpoints = v.into_iter().map(|i| i.into()).collect();
69591        self
69592    }
69593
69594    /// Sets the value of [next_page_token][crate::model::ListModelVersionCheckpointsResponse::next_page_token].
69595    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69596        self.next_page_token = v.into();
69597        self
69598    }
69599}
69600
69601#[cfg(feature = "model-service")]
69602impl wkt::message::Message for ListModelVersionCheckpointsResponse {
69603    fn typename() -> &'static str {
69604        "type.googleapis.com/google.cloud.aiplatform.v1.ListModelVersionCheckpointsResponse"
69605    }
69606}
69607
69608#[cfg(feature = "model-service")]
69609#[doc(hidden)]
69610impl gax::paginator::internal::PageableResponse for ListModelVersionCheckpointsResponse {
69611    type PageItem = crate::model::ModelVersionCheckpoint;
69612
69613    fn items(self) -> std::vec::Vec<Self::PageItem> {
69614        self.checkpoints
69615    }
69616
69617    fn next_page_token(&self) -> std::string::String {
69618        use std::clone::Clone;
69619        self.next_page_token.clone()
69620    }
69621}
69622
69623/// Request message for
69624/// [ModelService.UpdateModel][google.cloud.aiplatform.v1.ModelService.UpdateModel].
69625///
69626/// [google.cloud.aiplatform.v1.ModelService.UpdateModel]: crate::client::ModelService::update_model
69627#[cfg(feature = "model-service")]
69628#[derive(Clone, Default, PartialEq)]
69629#[non_exhaustive]
69630pub struct UpdateModelRequest {
69631    /// Required. The Model which replaces the resource on the server.
69632    /// When Model Versioning is enabled, the model.name will be used to determine
69633    /// whether to update the model or model version.
69634    ///
69635    /// 1. model.name with the @ value, e.g. models/123@1, refers to a version
69636    ///    specific update.
69637    /// 1. model.name without the @ value, e.g. models/123, refers to a model
69638    ///    update.
69639    /// 1. model.name with @-, e.g. models/123@-, refers to a model update.
69640    /// 1. Supported model fields: display_name, description; supported
69641    ///    version-specific fields: version_description. Labels are supported in both
69642    ///    scenarios. Both the model labels and the version labels are merged when a
69643    ///    model is returned. When updating labels, if the request is for
69644    ///    model-specific update, model label gets updated. Otherwise, version labels
69645    ///    get updated.
69646    /// 1. A model name or model version name fields update mismatch will cause a
69647    ///    precondition error.
69648    /// 1. One request cannot update both the model and the version fields. You
69649    ///    must update them separately.
69650    pub model: std::option::Option<crate::model::Model>,
69651
69652    /// Required. The update mask applies to the resource.
69653    /// For the `FieldMask` definition, see
69654    /// [google.protobuf.FieldMask][google.protobuf.FieldMask].
69655    ///
69656    /// [google.protobuf.FieldMask]: wkt::FieldMask
69657    pub update_mask: std::option::Option<wkt::FieldMask>,
69658
69659    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69660}
69661
69662#[cfg(feature = "model-service")]
69663impl UpdateModelRequest {
69664    pub fn new() -> Self {
69665        std::default::Default::default()
69666    }
69667
69668    /// Sets the value of [model][crate::model::UpdateModelRequest::model].
69669    pub fn set_model<T>(mut self, v: T) -> Self
69670    where
69671        T: std::convert::Into<crate::model::Model>,
69672    {
69673        self.model = std::option::Option::Some(v.into());
69674        self
69675    }
69676
69677    /// Sets or clears the value of [model][crate::model::UpdateModelRequest::model].
69678    pub fn set_or_clear_model<T>(mut self, v: std::option::Option<T>) -> Self
69679    where
69680        T: std::convert::Into<crate::model::Model>,
69681    {
69682        self.model = v.map(|x| x.into());
69683        self
69684    }
69685
69686    /// Sets the value of [update_mask][crate::model::UpdateModelRequest::update_mask].
69687    pub fn set_update_mask<T>(mut self, v: T) -> Self
69688    where
69689        T: std::convert::Into<wkt::FieldMask>,
69690    {
69691        self.update_mask = std::option::Option::Some(v.into());
69692        self
69693    }
69694
69695    /// Sets or clears the value of [update_mask][crate::model::UpdateModelRequest::update_mask].
69696    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
69697    where
69698        T: std::convert::Into<wkt::FieldMask>,
69699    {
69700        self.update_mask = v.map(|x| x.into());
69701        self
69702    }
69703}
69704
69705#[cfg(feature = "model-service")]
69706impl wkt::message::Message for UpdateModelRequest {
69707    fn typename() -> &'static str {
69708        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateModelRequest"
69709    }
69710}
69711
69712/// Request message for
69713/// [ModelService.UpdateExplanationDataset][google.cloud.aiplatform.v1.ModelService.UpdateExplanationDataset].
69714///
69715/// [google.cloud.aiplatform.v1.ModelService.UpdateExplanationDataset]: crate::client::ModelService::update_explanation_dataset
69716#[cfg(feature = "model-service")]
69717#[derive(Clone, Default, PartialEq)]
69718#[non_exhaustive]
69719pub struct UpdateExplanationDatasetRequest {
69720    /// Required. The resource name of the Model to update.
69721    /// Format: `projects/{project}/locations/{location}/models/{model}`
69722    pub model: std::string::String,
69723
69724    /// The example config containing the location of the dataset.
69725    pub examples: std::option::Option<crate::model::Examples>,
69726
69727    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69728}
69729
69730#[cfg(feature = "model-service")]
69731impl UpdateExplanationDatasetRequest {
69732    pub fn new() -> Self {
69733        std::default::Default::default()
69734    }
69735
69736    /// Sets the value of [model][crate::model::UpdateExplanationDatasetRequest::model].
69737    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69738        self.model = v.into();
69739        self
69740    }
69741
69742    /// Sets the value of [examples][crate::model::UpdateExplanationDatasetRequest::examples].
69743    pub fn set_examples<T>(mut self, v: T) -> Self
69744    where
69745        T: std::convert::Into<crate::model::Examples>,
69746    {
69747        self.examples = std::option::Option::Some(v.into());
69748        self
69749    }
69750
69751    /// Sets or clears the value of [examples][crate::model::UpdateExplanationDatasetRequest::examples].
69752    pub fn set_or_clear_examples<T>(mut self, v: std::option::Option<T>) -> Self
69753    where
69754        T: std::convert::Into<crate::model::Examples>,
69755    {
69756        self.examples = v.map(|x| x.into());
69757        self
69758    }
69759}
69760
69761#[cfg(feature = "model-service")]
69762impl wkt::message::Message for UpdateExplanationDatasetRequest {
69763    fn typename() -> &'static str {
69764        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateExplanationDatasetRequest"
69765    }
69766}
69767
69768/// Runtime operation information for
69769/// [ModelService.UpdateExplanationDataset][google.cloud.aiplatform.v1.ModelService.UpdateExplanationDataset].
69770///
69771/// [google.cloud.aiplatform.v1.ModelService.UpdateExplanationDataset]: crate::client::ModelService::update_explanation_dataset
69772#[cfg(feature = "model-service")]
69773#[derive(Clone, Default, PartialEq)]
69774#[non_exhaustive]
69775pub struct UpdateExplanationDatasetOperationMetadata {
69776    /// The common part of the operation metadata.
69777    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
69778
69779    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69780}
69781
69782#[cfg(feature = "model-service")]
69783impl UpdateExplanationDatasetOperationMetadata {
69784    pub fn new() -> Self {
69785        std::default::Default::default()
69786    }
69787
69788    /// Sets the value of [generic_metadata][crate::model::UpdateExplanationDatasetOperationMetadata::generic_metadata].
69789    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
69790    where
69791        T: std::convert::Into<crate::model::GenericOperationMetadata>,
69792    {
69793        self.generic_metadata = std::option::Option::Some(v.into());
69794        self
69795    }
69796
69797    /// Sets or clears the value of [generic_metadata][crate::model::UpdateExplanationDatasetOperationMetadata::generic_metadata].
69798    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
69799    where
69800        T: std::convert::Into<crate::model::GenericOperationMetadata>,
69801    {
69802        self.generic_metadata = v.map(|x| x.into());
69803        self
69804    }
69805}
69806
69807#[cfg(feature = "model-service")]
69808impl wkt::message::Message for UpdateExplanationDatasetOperationMetadata {
69809    fn typename() -> &'static str {
69810        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateExplanationDatasetOperationMetadata"
69811    }
69812}
69813
69814/// Request message for
69815/// [ModelService.DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel].
69816///
69817/// [google.cloud.aiplatform.v1.ModelService.DeleteModel]: crate::client::ModelService::delete_model
69818#[cfg(feature = "model-service")]
69819#[derive(Clone, Default, PartialEq)]
69820#[non_exhaustive]
69821pub struct DeleteModelRequest {
69822    /// Required. The name of the Model resource to be deleted.
69823    /// Format: `projects/{project}/locations/{location}/models/{model}`
69824    pub name: std::string::String,
69825
69826    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69827}
69828
69829#[cfg(feature = "model-service")]
69830impl DeleteModelRequest {
69831    pub fn new() -> Self {
69832        std::default::Default::default()
69833    }
69834
69835    /// Sets the value of [name][crate::model::DeleteModelRequest::name].
69836    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69837        self.name = v.into();
69838        self
69839    }
69840}
69841
69842#[cfg(feature = "model-service")]
69843impl wkt::message::Message for DeleteModelRequest {
69844    fn typename() -> &'static str {
69845        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteModelRequest"
69846    }
69847}
69848
69849/// Request message for
69850/// [ModelService.DeleteModelVersion][google.cloud.aiplatform.v1.ModelService.DeleteModelVersion].
69851///
69852/// [google.cloud.aiplatform.v1.ModelService.DeleteModelVersion]: crate::client::ModelService::delete_model_version
69853#[cfg(feature = "model-service")]
69854#[derive(Clone, Default, PartialEq)]
69855#[non_exhaustive]
69856pub struct DeleteModelVersionRequest {
69857    /// Required. The name of the model version to be deleted, with a version ID
69858    /// explicitly included.
69859    ///
69860    /// Example: `projects/{project}/locations/{location}/models/{model}@1234`
69861    pub name: std::string::String,
69862
69863    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69864}
69865
69866#[cfg(feature = "model-service")]
69867impl DeleteModelVersionRequest {
69868    pub fn new() -> Self {
69869        std::default::Default::default()
69870    }
69871
69872    /// Sets the value of [name][crate::model::DeleteModelVersionRequest::name].
69873    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69874        self.name = v.into();
69875        self
69876    }
69877}
69878
69879#[cfg(feature = "model-service")]
69880impl wkt::message::Message for DeleteModelVersionRequest {
69881    fn typename() -> &'static str {
69882        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteModelVersionRequest"
69883    }
69884}
69885
69886/// Request message for
69887/// [ModelService.MergeVersionAliases][google.cloud.aiplatform.v1.ModelService.MergeVersionAliases].
69888///
69889/// [google.cloud.aiplatform.v1.ModelService.MergeVersionAliases]: crate::client::ModelService::merge_version_aliases
69890#[cfg(feature = "model-service")]
69891#[derive(Clone, Default, PartialEq)]
69892#[non_exhaustive]
69893pub struct MergeVersionAliasesRequest {
69894    /// Required. The name of the model version to merge aliases, with a version ID
69895    /// explicitly included.
69896    ///
69897    /// Example: `projects/{project}/locations/{location}/models/{model}@1234`
69898    pub name: std::string::String,
69899
69900    /// Required. The set of version aliases to merge.
69901    /// The alias should be at most 128 characters, and match
69902    /// `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
69903    /// Add the `-` prefix to an alias means removing that alias from the version.
69904    /// `-` is NOT counted in the 128 characters. Example: `-golden` means removing
69905    /// the `golden` alias from the version.
69906    ///
69907    /// There is NO ordering in aliases, which means
69908    ///
69909    /// 1. The aliases returned from GetModel API might not have the exactly same
69910    ///    order from this MergeVersionAliases API. 2) Adding and deleting the same
69911    ///    alias in the request is not recommended, and the 2 operations will be
69912    ///    cancelled out.
69913    pub version_aliases: std::vec::Vec<std::string::String>,
69914
69915    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69916}
69917
69918#[cfg(feature = "model-service")]
69919impl MergeVersionAliasesRequest {
69920    pub fn new() -> Self {
69921        std::default::Default::default()
69922    }
69923
69924    /// Sets the value of [name][crate::model::MergeVersionAliasesRequest::name].
69925    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69926        self.name = v.into();
69927        self
69928    }
69929
69930    /// Sets the value of [version_aliases][crate::model::MergeVersionAliasesRequest::version_aliases].
69931    pub fn set_version_aliases<T, V>(mut self, v: T) -> Self
69932    where
69933        T: std::iter::IntoIterator<Item = V>,
69934        V: std::convert::Into<std::string::String>,
69935    {
69936        use std::iter::Iterator;
69937        self.version_aliases = v.into_iter().map(|i| i.into()).collect();
69938        self
69939    }
69940}
69941
69942#[cfg(feature = "model-service")]
69943impl wkt::message::Message for MergeVersionAliasesRequest {
69944    fn typename() -> &'static str {
69945        "type.googleapis.com/google.cloud.aiplatform.v1.MergeVersionAliasesRequest"
69946    }
69947}
69948
69949/// Request message for
69950/// [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel].
69951///
69952/// [google.cloud.aiplatform.v1.ModelService.ExportModel]: crate::client::ModelService::export_model
69953#[cfg(feature = "model-service")]
69954#[derive(Clone, Default, PartialEq)]
69955#[non_exhaustive]
69956pub struct ExportModelRequest {
69957    /// Required. The resource name of the Model to export.
69958    /// The resource name may contain version id or version alias to specify the
69959    /// version, if no version is specified, the default version will be exported.
69960    pub name: std::string::String,
69961
69962    /// Required. The desired output location and configuration.
69963    pub output_config: std::option::Option<crate::model::export_model_request::OutputConfig>,
69964
69965    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
69966}
69967
69968#[cfg(feature = "model-service")]
69969impl ExportModelRequest {
69970    pub fn new() -> Self {
69971        std::default::Default::default()
69972    }
69973
69974    /// Sets the value of [name][crate::model::ExportModelRequest::name].
69975    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69976        self.name = v.into();
69977        self
69978    }
69979
69980    /// Sets the value of [output_config][crate::model::ExportModelRequest::output_config].
69981    pub fn set_output_config<T>(mut self, v: T) -> Self
69982    where
69983        T: std::convert::Into<crate::model::export_model_request::OutputConfig>,
69984    {
69985        self.output_config = std::option::Option::Some(v.into());
69986        self
69987    }
69988
69989    /// Sets or clears the value of [output_config][crate::model::ExportModelRequest::output_config].
69990    pub fn set_or_clear_output_config<T>(mut self, v: std::option::Option<T>) -> Self
69991    where
69992        T: std::convert::Into<crate::model::export_model_request::OutputConfig>,
69993    {
69994        self.output_config = v.map(|x| x.into());
69995        self
69996    }
69997}
69998
69999#[cfg(feature = "model-service")]
70000impl wkt::message::Message for ExportModelRequest {
70001    fn typename() -> &'static str {
70002        "type.googleapis.com/google.cloud.aiplatform.v1.ExportModelRequest"
70003    }
70004}
70005
70006/// Defines additional types related to [ExportModelRequest].
70007#[cfg(feature = "model-service")]
70008pub mod export_model_request {
70009    #[allow(unused_imports)]
70010    use super::*;
70011
70012    /// Output configuration for the Model export.
70013    #[cfg(feature = "model-service")]
70014    #[derive(Clone, Default, PartialEq)]
70015    #[non_exhaustive]
70016    pub struct OutputConfig {
70017        /// The ID of the format in which the Model must be exported. Each Model
70018        /// lists the [export formats it
70019        /// supports][google.cloud.aiplatform.v1.Model.supported_export_formats]. If
70020        /// no value is provided here, then the first from the list of the Model's
70021        /// supported formats is used by default.
70022        ///
70023        /// [google.cloud.aiplatform.v1.Model.supported_export_formats]: crate::model::Model::supported_export_formats
70024        pub export_format_id: std::string::String,
70025
70026        /// The Cloud Storage location where the Model artifact is to be
70027        /// written to. Under the directory given as the destination a new one with
70028        /// name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
70029        /// where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
70030        /// will be created. Inside, the Model and any of its supporting files
70031        /// will be written.
70032        /// This field should only be set when the `exportableContent` field of the
70033        /// [Model.supported_export_formats] object contains `ARTIFACT`.
70034        pub artifact_destination: std::option::Option<crate::model::GcsDestination>,
70035
70036        /// The Google Container Registry or Artifact Registry uri where the
70037        /// Model container image will be copied to.
70038        /// This field should only be set when the `exportableContent` field of the
70039        /// [Model.supported_export_formats] object contains `IMAGE`.
70040        pub image_destination: std::option::Option<crate::model::ContainerRegistryDestination>,
70041
70042        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70043    }
70044
70045    #[cfg(feature = "model-service")]
70046    impl OutputConfig {
70047        pub fn new() -> Self {
70048            std::default::Default::default()
70049        }
70050
70051        /// Sets the value of [export_format_id][crate::model::export_model_request::OutputConfig::export_format_id].
70052        pub fn set_export_format_id<T: std::convert::Into<std::string::String>>(
70053            mut self,
70054            v: T,
70055        ) -> Self {
70056            self.export_format_id = v.into();
70057            self
70058        }
70059
70060        /// Sets the value of [artifact_destination][crate::model::export_model_request::OutputConfig::artifact_destination].
70061        pub fn set_artifact_destination<T>(mut self, v: T) -> Self
70062        where
70063            T: std::convert::Into<crate::model::GcsDestination>,
70064        {
70065            self.artifact_destination = std::option::Option::Some(v.into());
70066            self
70067        }
70068
70069        /// Sets or clears the value of [artifact_destination][crate::model::export_model_request::OutputConfig::artifact_destination].
70070        pub fn set_or_clear_artifact_destination<T>(mut self, v: std::option::Option<T>) -> Self
70071        where
70072            T: std::convert::Into<crate::model::GcsDestination>,
70073        {
70074            self.artifact_destination = v.map(|x| x.into());
70075            self
70076        }
70077
70078        /// Sets the value of [image_destination][crate::model::export_model_request::OutputConfig::image_destination].
70079        pub fn set_image_destination<T>(mut self, v: T) -> Self
70080        where
70081            T: std::convert::Into<crate::model::ContainerRegistryDestination>,
70082        {
70083            self.image_destination = std::option::Option::Some(v.into());
70084            self
70085        }
70086
70087        /// Sets or clears the value of [image_destination][crate::model::export_model_request::OutputConfig::image_destination].
70088        pub fn set_or_clear_image_destination<T>(mut self, v: std::option::Option<T>) -> Self
70089        where
70090            T: std::convert::Into<crate::model::ContainerRegistryDestination>,
70091        {
70092            self.image_destination = v.map(|x| x.into());
70093            self
70094        }
70095    }
70096
70097    #[cfg(feature = "model-service")]
70098    impl wkt::message::Message for OutputConfig {
70099        fn typename() -> &'static str {
70100            "type.googleapis.com/google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig"
70101        }
70102    }
70103}
70104
70105/// Details of
70106/// [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel]
70107/// operation.
70108///
70109/// [google.cloud.aiplatform.v1.ModelService.ExportModel]: crate::client::ModelService::export_model
70110#[cfg(feature = "model-service")]
70111#[derive(Clone, Default, PartialEq)]
70112#[non_exhaustive]
70113pub struct ExportModelOperationMetadata {
70114    /// The common part of the operation metadata.
70115    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
70116
70117    /// Output only. Information further describing the output of this Model
70118    /// export.
70119    pub output_info: std::option::Option<crate::model::export_model_operation_metadata::OutputInfo>,
70120
70121    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70122}
70123
70124#[cfg(feature = "model-service")]
70125impl ExportModelOperationMetadata {
70126    pub fn new() -> Self {
70127        std::default::Default::default()
70128    }
70129
70130    /// Sets the value of [generic_metadata][crate::model::ExportModelOperationMetadata::generic_metadata].
70131    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
70132    where
70133        T: std::convert::Into<crate::model::GenericOperationMetadata>,
70134    {
70135        self.generic_metadata = std::option::Option::Some(v.into());
70136        self
70137    }
70138
70139    /// Sets or clears the value of [generic_metadata][crate::model::ExportModelOperationMetadata::generic_metadata].
70140    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
70141    where
70142        T: std::convert::Into<crate::model::GenericOperationMetadata>,
70143    {
70144        self.generic_metadata = v.map(|x| x.into());
70145        self
70146    }
70147
70148    /// Sets the value of [output_info][crate::model::ExportModelOperationMetadata::output_info].
70149    pub fn set_output_info<T>(mut self, v: T) -> Self
70150    where
70151        T: std::convert::Into<crate::model::export_model_operation_metadata::OutputInfo>,
70152    {
70153        self.output_info = std::option::Option::Some(v.into());
70154        self
70155    }
70156
70157    /// Sets or clears the value of [output_info][crate::model::ExportModelOperationMetadata::output_info].
70158    pub fn set_or_clear_output_info<T>(mut self, v: std::option::Option<T>) -> Self
70159    where
70160        T: std::convert::Into<crate::model::export_model_operation_metadata::OutputInfo>,
70161    {
70162        self.output_info = v.map(|x| x.into());
70163        self
70164    }
70165}
70166
70167#[cfg(feature = "model-service")]
70168impl wkt::message::Message for ExportModelOperationMetadata {
70169    fn typename() -> &'static str {
70170        "type.googleapis.com/google.cloud.aiplatform.v1.ExportModelOperationMetadata"
70171    }
70172}
70173
70174/// Defines additional types related to [ExportModelOperationMetadata].
70175#[cfg(feature = "model-service")]
70176pub mod export_model_operation_metadata {
70177    #[allow(unused_imports)]
70178    use super::*;
70179
70180    /// Further describes the output of the ExportModel. Supplements
70181    /// [ExportModelRequest.OutputConfig][google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig].
70182    ///
70183    /// [google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig]: crate::model::export_model_request::OutputConfig
70184    #[cfg(feature = "model-service")]
70185    #[derive(Clone, Default, PartialEq)]
70186    #[non_exhaustive]
70187    pub struct OutputInfo {
70188        /// Output only. If the Model artifact is being exported to Google Cloud
70189        /// Storage this is the full path of the directory created, into which the
70190        /// Model files are being written to.
70191        pub artifact_output_uri: std::string::String,
70192
70193        /// Output only. If the Model image is being exported to Google Container
70194        /// Registry or Artifact Registry this is the full path of the image created.
70195        pub image_output_uri: std::string::String,
70196
70197        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70198    }
70199
70200    #[cfg(feature = "model-service")]
70201    impl OutputInfo {
70202        pub fn new() -> Self {
70203            std::default::Default::default()
70204        }
70205
70206        /// Sets the value of [artifact_output_uri][crate::model::export_model_operation_metadata::OutputInfo::artifact_output_uri].
70207        pub fn set_artifact_output_uri<T: std::convert::Into<std::string::String>>(
70208            mut self,
70209            v: T,
70210        ) -> Self {
70211            self.artifact_output_uri = v.into();
70212            self
70213        }
70214
70215        /// Sets the value of [image_output_uri][crate::model::export_model_operation_metadata::OutputInfo::image_output_uri].
70216        pub fn set_image_output_uri<T: std::convert::Into<std::string::String>>(
70217            mut self,
70218            v: T,
70219        ) -> Self {
70220            self.image_output_uri = v.into();
70221            self
70222        }
70223    }
70224
70225    #[cfg(feature = "model-service")]
70226    impl wkt::message::Message for OutputInfo {
70227        fn typename() -> &'static str {
70228            "type.googleapis.com/google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfo"
70229        }
70230    }
70231}
70232
70233/// Response message of
70234/// [ModelService.UpdateExplanationDataset][google.cloud.aiplatform.v1.ModelService.UpdateExplanationDataset]
70235/// operation.
70236///
70237/// [google.cloud.aiplatform.v1.ModelService.UpdateExplanationDataset]: crate::client::ModelService::update_explanation_dataset
70238#[cfg(feature = "model-service")]
70239#[derive(Clone, Default, PartialEq)]
70240#[non_exhaustive]
70241pub struct UpdateExplanationDatasetResponse {
70242    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70243}
70244
70245#[cfg(feature = "model-service")]
70246impl UpdateExplanationDatasetResponse {
70247    pub fn new() -> Self {
70248        std::default::Default::default()
70249    }
70250}
70251
70252#[cfg(feature = "model-service")]
70253impl wkt::message::Message for UpdateExplanationDatasetResponse {
70254    fn typename() -> &'static str {
70255        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateExplanationDatasetResponse"
70256    }
70257}
70258
70259/// Response message of
70260/// [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel]
70261/// operation.
70262///
70263/// [google.cloud.aiplatform.v1.ModelService.ExportModel]: crate::client::ModelService::export_model
70264#[cfg(feature = "model-service")]
70265#[derive(Clone, Default, PartialEq)]
70266#[non_exhaustive]
70267pub struct ExportModelResponse {
70268    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70269}
70270
70271#[cfg(feature = "model-service")]
70272impl ExportModelResponse {
70273    pub fn new() -> Self {
70274        std::default::Default::default()
70275    }
70276}
70277
70278#[cfg(feature = "model-service")]
70279impl wkt::message::Message for ExportModelResponse {
70280    fn typename() -> &'static str {
70281        "type.googleapis.com/google.cloud.aiplatform.v1.ExportModelResponse"
70282    }
70283}
70284
70285/// Request message for
70286/// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel].
70287///
70288/// [google.cloud.aiplatform.v1.ModelService.CopyModel]: crate::client::ModelService::copy_model
70289#[cfg(feature = "model-service")]
70290#[derive(Clone, Default, PartialEq)]
70291#[non_exhaustive]
70292pub struct CopyModelRequest {
70293    /// Required. The resource name of the Location into which to copy the Model.
70294    /// Format: `projects/{project}/locations/{location}`
70295    pub parent: std::string::String,
70296
70297    /// Required. The resource name of the Model to copy. That Model must be in the
70298    /// same Project. Format:
70299    /// `projects/{project}/locations/{location}/models/{model}`
70300    pub source_model: std::string::String,
70301
70302    /// Customer-managed encryption key options. If this is set,
70303    /// then the Model copy will be encrypted with the provided encryption key.
70304    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
70305
70306    /// If both fields are unset, a new Model will be created with a generated ID.
70307    pub destination_model: std::option::Option<crate::model::copy_model_request::DestinationModel>,
70308
70309    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70310}
70311
70312#[cfg(feature = "model-service")]
70313impl CopyModelRequest {
70314    pub fn new() -> Self {
70315        std::default::Default::default()
70316    }
70317
70318    /// Sets the value of [parent][crate::model::CopyModelRequest::parent].
70319    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70320        self.parent = v.into();
70321        self
70322    }
70323
70324    /// Sets the value of [source_model][crate::model::CopyModelRequest::source_model].
70325    pub fn set_source_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70326        self.source_model = v.into();
70327        self
70328    }
70329
70330    /// Sets the value of [encryption_spec][crate::model::CopyModelRequest::encryption_spec].
70331    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
70332    where
70333        T: std::convert::Into<crate::model::EncryptionSpec>,
70334    {
70335        self.encryption_spec = std::option::Option::Some(v.into());
70336        self
70337    }
70338
70339    /// Sets or clears the value of [encryption_spec][crate::model::CopyModelRequest::encryption_spec].
70340    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
70341    where
70342        T: std::convert::Into<crate::model::EncryptionSpec>,
70343    {
70344        self.encryption_spec = v.map(|x| x.into());
70345        self
70346    }
70347
70348    /// Sets the value of [destination_model][crate::model::CopyModelRequest::destination_model].
70349    ///
70350    /// Note that all the setters affecting `destination_model` are mutually
70351    /// exclusive.
70352    pub fn set_destination_model<
70353        T: std::convert::Into<std::option::Option<crate::model::copy_model_request::DestinationModel>>,
70354    >(
70355        mut self,
70356        v: T,
70357    ) -> Self {
70358        self.destination_model = v.into();
70359        self
70360    }
70361
70362    /// The value of [destination_model][crate::model::CopyModelRequest::destination_model]
70363    /// if it holds a `ModelId`, `None` if the field is not set or
70364    /// holds a different branch.
70365    pub fn model_id(&self) -> std::option::Option<&std::string::String> {
70366        #[allow(unreachable_patterns)]
70367        self.destination_model.as_ref().and_then(|v| match v {
70368            crate::model::copy_model_request::DestinationModel::ModelId(v) => {
70369                std::option::Option::Some(v)
70370            }
70371            _ => std::option::Option::None,
70372        })
70373    }
70374
70375    /// Sets the value of [destination_model][crate::model::CopyModelRequest::destination_model]
70376    /// to hold a `ModelId`.
70377    ///
70378    /// Note that all the setters affecting `destination_model` are
70379    /// mutually exclusive.
70380    pub fn set_model_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70381        self.destination_model = std::option::Option::Some(
70382            crate::model::copy_model_request::DestinationModel::ModelId(v.into()),
70383        );
70384        self
70385    }
70386
70387    /// The value of [destination_model][crate::model::CopyModelRequest::destination_model]
70388    /// if it holds a `ParentModel`, `None` if the field is not set or
70389    /// holds a different branch.
70390    pub fn parent_model(&self) -> std::option::Option<&std::string::String> {
70391        #[allow(unreachable_patterns)]
70392        self.destination_model.as_ref().and_then(|v| match v {
70393            crate::model::copy_model_request::DestinationModel::ParentModel(v) => {
70394                std::option::Option::Some(v)
70395            }
70396            _ => std::option::Option::None,
70397        })
70398    }
70399
70400    /// Sets the value of [destination_model][crate::model::CopyModelRequest::destination_model]
70401    /// to hold a `ParentModel`.
70402    ///
70403    /// Note that all the setters affecting `destination_model` are
70404    /// mutually exclusive.
70405    pub fn set_parent_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70406        self.destination_model = std::option::Option::Some(
70407            crate::model::copy_model_request::DestinationModel::ParentModel(v.into()),
70408        );
70409        self
70410    }
70411}
70412
70413#[cfg(feature = "model-service")]
70414impl wkt::message::Message for CopyModelRequest {
70415    fn typename() -> &'static str {
70416        "type.googleapis.com/google.cloud.aiplatform.v1.CopyModelRequest"
70417    }
70418}
70419
70420/// Defines additional types related to [CopyModelRequest].
70421#[cfg(feature = "model-service")]
70422pub mod copy_model_request {
70423    #[allow(unused_imports)]
70424    use super::*;
70425
70426    /// If both fields are unset, a new Model will be created with a generated ID.
70427    #[cfg(feature = "model-service")]
70428    #[derive(Clone, Debug, PartialEq)]
70429    #[non_exhaustive]
70430    pub enum DestinationModel {
70431        /// Optional. Copy source_model into a new Model with this ID. The ID will
70432        /// become the final component of the model resource name.
70433        ///
70434        /// This value may be up to 63 characters, and valid characters are
70435        /// `[a-z0-9_-]`. The first character cannot be a number or hyphen.
70436        ModelId(std::string::String),
70437        /// Optional. Specify this field to copy source_model into this existing
70438        /// Model as a new version. Format:
70439        /// `projects/{project}/locations/{location}/models/{model}`
70440        ParentModel(std::string::String),
70441    }
70442}
70443
70444/// Details of
70445/// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel]
70446/// operation.
70447///
70448/// [google.cloud.aiplatform.v1.ModelService.CopyModel]: crate::client::ModelService::copy_model
70449#[cfg(feature = "model-service")]
70450#[derive(Clone, Default, PartialEq)]
70451#[non_exhaustive]
70452pub struct CopyModelOperationMetadata {
70453    /// The common part of the operation metadata.
70454    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
70455
70456    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70457}
70458
70459#[cfg(feature = "model-service")]
70460impl CopyModelOperationMetadata {
70461    pub fn new() -> Self {
70462        std::default::Default::default()
70463    }
70464
70465    /// Sets the value of [generic_metadata][crate::model::CopyModelOperationMetadata::generic_metadata].
70466    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
70467    where
70468        T: std::convert::Into<crate::model::GenericOperationMetadata>,
70469    {
70470        self.generic_metadata = std::option::Option::Some(v.into());
70471        self
70472    }
70473
70474    /// Sets or clears the value of [generic_metadata][crate::model::CopyModelOperationMetadata::generic_metadata].
70475    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
70476    where
70477        T: std::convert::Into<crate::model::GenericOperationMetadata>,
70478    {
70479        self.generic_metadata = v.map(|x| x.into());
70480        self
70481    }
70482}
70483
70484#[cfg(feature = "model-service")]
70485impl wkt::message::Message for CopyModelOperationMetadata {
70486    fn typename() -> &'static str {
70487        "type.googleapis.com/google.cloud.aiplatform.v1.CopyModelOperationMetadata"
70488    }
70489}
70490
70491/// Response message of
70492/// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel]
70493/// operation.
70494///
70495/// [google.cloud.aiplatform.v1.ModelService.CopyModel]: crate::client::ModelService::copy_model
70496#[cfg(feature = "model-service")]
70497#[derive(Clone, Default, PartialEq)]
70498#[non_exhaustive]
70499pub struct CopyModelResponse {
70500    /// The name of the copied Model resource.
70501    /// Format: `projects/{project}/locations/{location}/models/{model}`
70502    pub model: std::string::String,
70503
70504    /// Output only. The version ID of the model that is copied.
70505    pub model_version_id: std::string::String,
70506
70507    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70508}
70509
70510#[cfg(feature = "model-service")]
70511impl CopyModelResponse {
70512    pub fn new() -> Self {
70513        std::default::Default::default()
70514    }
70515
70516    /// Sets the value of [model][crate::model::CopyModelResponse::model].
70517    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70518        self.model = v.into();
70519        self
70520    }
70521
70522    /// Sets the value of [model_version_id][crate::model::CopyModelResponse::model_version_id].
70523    pub fn set_model_version_id<T: std::convert::Into<std::string::String>>(
70524        mut self,
70525        v: T,
70526    ) -> Self {
70527        self.model_version_id = v.into();
70528        self
70529    }
70530}
70531
70532#[cfg(feature = "model-service")]
70533impl wkt::message::Message for CopyModelResponse {
70534    fn typename() -> &'static str {
70535        "type.googleapis.com/google.cloud.aiplatform.v1.CopyModelResponse"
70536    }
70537}
70538
70539/// Request message for
70540/// [ModelService.ImportModelEvaluation][google.cloud.aiplatform.v1.ModelService.ImportModelEvaluation]
70541///
70542/// [google.cloud.aiplatform.v1.ModelService.ImportModelEvaluation]: crate::client::ModelService::import_model_evaluation
70543#[cfg(feature = "model-service")]
70544#[derive(Clone, Default, PartialEq)]
70545#[non_exhaustive]
70546pub struct ImportModelEvaluationRequest {
70547    /// Required. The name of the parent model resource.
70548    /// Format: `projects/{project}/locations/{location}/models/{model}`
70549    pub parent: std::string::String,
70550
70551    /// Required. Model evaluation resource to be imported.
70552    pub model_evaluation: std::option::Option<crate::model::ModelEvaluation>,
70553
70554    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70555}
70556
70557#[cfg(feature = "model-service")]
70558impl ImportModelEvaluationRequest {
70559    pub fn new() -> Self {
70560        std::default::Default::default()
70561    }
70562
70563    /// Sets the value of [parent][crate::model::ImportModelEvaluationRequest::parent].
70564    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70565        self.parent = v.into();
70566        self
70567    }
70568
70569    /// Sets the value of [model_evaluation][crate::model::ImportModelEvaluationRequest::model_evaluation].
70570    pub fn set_model_evaluation<T>(mut self, v: T) -> Self
70571    where
70572        T: std::convert::Into<crate::model::ModelEvaluation>,
70573    {
70574        self.model_evaluation = std::option::Option::Some(v.into());
70575        self
70576    }
70577
70578    /// Sets or clears the value of [model_evaluation][crate::model::ImportModelEvaluationRequest::model_evaluation].
70579    pub fn set_or_clear_model_evaluation<T>(mut self, v: std::option::Option<T>) -> Self
70580    where
70581        T: std::convert::Into<crate::model::ModelEvaluation>,
70582    {
70583        self.model_evaluation = v.map(|x| x.into());
70584        self
70585    }
70586}
70587
70588#[cfg(feature = "model-service")]
70589impl wkt::message::Message for ImportModelEvaluationRequest {
70590    fn typename() -> &'static str {
70591        "type.googleapis.com/google.cloud.aiplatform.v1.ImportModelEvaluationRequest"
70592    }
70593}
70594
70595/// Request message for
70596/// [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices]
70597///
70598/// [google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices]: crate::client::ModelService::batch_import_model_evaluation_slices
70599#[cfg(feature = "model-service")]
70600#[derive(Clone, Default, PartialEq)]
70601#[non_exhaustive]
70602pub struct BatchImportModelEvaluationSlicesRequest {
70603    /// Required. The name of the parent ModelEvaluation resource.
70604    /// Format:
70605    /// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
70606    pub parent: std::string::String,
70607
70608    /// Required. Model evaluation slice resource to be imported.
70609    pub model_evaluation_slices: std::vec::Vec<crate::model::ModelEvaluationSlice>,
70610
70611    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70612}
70613
70614#[cfg(feature = "model-service")]
70615impl BatchImportModelEvaluationSlicesRequest {
70616    pub fn new() -> Self {
70617        std::default::Default::default()
70618    }
70619
70620    /// Sets the value of [parent][crate::model::BatchImportModelEvaluationSlicesRequest::parent].
70621    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70622        self.parent = v.into();
70623        self
70624    }
70625
70626    /// Sets the value of [model_evaluation_slices][crate::model::BatchImportModelEvaluationSlicesRequest::model_evaluation_slices].
70627    pub fn set_model_evaluation_slices<T, V>(mut self, v: T) -> Self
70628    where
70629        T: std::iter::IntoIterator<Item = V>,
70630        V: std::convert::Into<crate::model::ModelEvaluationSlice>,
70631    {
70632        use std::iter::Iterator;
70633        self.model_evaluation_slices = v.into_iter().map(|i| i.into()).collect();
70634        self
70635    }
70636}
70637
70638#[cfg(feature = "model-service")]
70639impl wkt::message::Message for BatchImportModelEvaluationSlicesRequest {
70640    fn typename() -> &'static str {
70641        "type.googleapis.com/google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest"
70642    }
70643}
70644
70645/// Response message for
70646/// [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices]
70647///
70648/// [google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices]: crate::client::ModelService::batch_import_model_evaluation_slices
70649#[cfg(feature = "model-service")]
70650#[derive(Clone, Default, PartialEq)]
70651#[non_exhaustive]
70652pub struct BatchImportModelEvaluationSlicesResponse {
70653    /// Output only. List of imported
70654    /// [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
70655    ///
70656    /// [google.cloud.aiplatform.v1.ModelEvaluationSlice.name]: crate::model::ModelEvaluationSlice::name
70657    pub imported_model_evaluation_slices: std::vec::Vec<std::string::String>,
70658
70659    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70660}
70661
70662#[cfg(feature = "model-service")]
70663impl BatchImportModelEvaluationSlicesResponse {
70664    pub fn new() -> Self {
70665        std::default::Default::default()
70666    }
70667
70668    /// Sets the value of [imported_model_evaluation_slices][crate::model::BatchImportModelEvaluationSlicesResponse::imported_model_evaluation_slices].
70669    pub fn set_imported_model_evaluation_slices<T, V>(mut self, v: T) -> Self
70670    where
70671        T: std::iter::IntoIterator<Item = V>,
70672        V: std::convert::Into<std::string::String>,
70673    {
70674        use std::iter::Iterator;
70675        self.imported_model_evaluation_slices = v.into_iter().map(|i| i.into()).collect();
70676        self
70677    }
70678}
70679
70680#[cfg(feature = "model-service")]
70681impl wkt::message::Message for BatchImportModelEvaluationSlicesResponse {
70682    fn typename() -> &'static str {
70683        "type.googleapis.com/google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse"
70684    }
70685}
70686
70687/// Request message for
70688/// [ModelService.BatchImportEvaluatedAnnotations][google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotations]
70689///
70690/// [google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotations]: crate::client::ModelService::batch_import_evaluated_annotations
70691#[cfg(feature = "model-service")]
70692#[derive(Clone, Default, PartialEq)]
70693#[non_exhaustive]
70694pub struct BatchImportEvaluatedAnnotationsRequest {
70695    /// Required. The name of the parent ModelEvaluationSlice resource.
70696    /// Format:
70697    /// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
70698    pub parent: std::string::String,
70699
70700    /// Required. Evaluated annotations resource to be imported.
70701    pub evaluated_annotations: std::vec::Vec<crate::model::EvaluatedAnnotation>,
70702
70703    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70704}
70705
70706#[cfg(feature = "model-service")]
70707impl BatchImportEvaluatedAnnotationsRequest {
70708    pub fn new() -> Self {
70709        std::default::Default::default()
70710    }
70711
70712    /// Sets the value of [parent][crate::model::BatchImportEvaluatedAnnotationsRequest::parent].
70713    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70714        self.parent = v.into();
70715        self
70716    }
70717
70718    /// Sets the value of [evaluated_annotations][crate::model::BatchImportEvaluatedAnnotationsRequest::evaluated_annotations].
70719    pub fn set_evaluated_annotations<T, V>(mut self, v: T) -> Self
70720    where
70721        T: std::iter::IntoIterator<Item = V>,
70722        V: std::convert::Into<crate::model::EvaluatedAnnotation>,
70723    {
70724        use std::iter::Iterator;
70725        self.evaluated_annotations = v.into_iter().map(|i| i.into()).collect();
70726        self
70727    }
70728}
70729
70730#[cfg(feature = "model-service")]
70731impl wkt::message::Message for BatchImportEvaluatedAnnotationsRequest {
70732    fn typename() -> &'static str {
70733        "type.googleapis.com/google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest"
70734    }
70735}
70736
70737/// Response message for
70738/// [ModelService.BatchImportEvaluatedAnnotations][google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotations]
70739///
70740/// [google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotations]: crate::client::ModelService::batch_import_evaluated_annotations
70741#[cfg(feature = "model-service")]
70742#[derive(Clone, Default, PartialEq)]
70743#[non_exhaustive]
70744pub struct BatchImportEvaluatedAnnotationsResponse {
70745    /// Output only. Number of EvaluatedAnnotations imported.
70746    pub imported_evaluated_annotations_count: i32,
70747
70748    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70749}
70750
70751#[cfg(feature = "model-service")]
70752impl BatchImportEvaluatedAnnotationsResponse {
70753    pub fn new() -> Self {
70754        std::default::Default::default()
70755    }
70756
70757    /// Sets the value of [imported_evaluated_annotations_count][crate::model::BatchImportEvaluatedAnnotationsResponse::imported_evaluated_annotations_count].
70758    pub fn set_imported_evaluated_annotations_count<T: std::convert::Into<i32>>(
70759        mut self,
70760        v: T,
70761    ) -> Self {
70762        self.imported_evaluated_annotations_count = v.into();
70763        self
70764    }
70765}
70766
70767#[cfg(feature = "model-service")]
70768impl wkt::message::Message for BatchImportEvaluatedAnnotationsResponse {
70769    fn typename() -> &'static str {
70770        "type.googleapis.com/google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse"
70771    }
70772}
70773
70774/// Request message for
70775/// [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1.ModelService.GetModelEvaluation].
70776///
70777/// [google.cloud.aiplatform.v1.ModelService.GetModelEvaluation]: crate::client::ModelService::get_model_evaluation
70778#[cfg(feature = "model-service")]
70779#[derive(Clone, Default, PartialEq)]
70780#[non_exhaustive]
70781pub struct GetModelEvaluationRequest {
70782    /// Required. The name of the ModelEvaluation resource.
70783    /// Format:
70784    /// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
70785    pub name: std::string::String,
70786
70787    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70788}
70789
70790#[cfg(feature = "model-service")]
70791impl GetModelEvaluationRequest {
70792    pub fn new() -> Self {
70793        std::default::Default::default()
70794    }
70795
70796    /// Sets the value of [name][crate::model::GetModelEvaluationRequest::name].
70797    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70798        self.name = v.into();
70799        self
70800    }
70801}
70802
70803#[cfg(feature = "model-service")]
70804impl wkt::message::Message for GetModelEvaluationRequest {
70805    fn typename() -> &'static str {
70806        "type.googleapis.com/google.cloud.aiplatform.v1.GetModelEvaluationRequest"
70807    }
70808}
70809
70810/// Request message for
70811/// [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations].
70812///
70813/// [google.cloud.aiplatform.v1.ModelService.ListModelEvaluations]: crate::client::ModelService::list_model_evaluations
70814#[cfg(feature = "model-service")]
70815#[derive(Clone, Default, PartialEq)]
70816#[non_exhaustive]
70817pub struct ListModelEvaluationsRequest {
70818    /// Required. The resource name of the Model to list the ModelEvaluations from.
70819    /// Format: `projects/{project}/locations/{location}/models/{model}`
70820    pub parent: std::string::String,
70821
70822    /// The standard list filter.
70823    pub filter: std::string::String,
70824
70825    /// The standard list page size.
70826    pub page_size: i32,
70827
70828    /// The standard list page token.
70829    /// Typically obtained via
70830    /// [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token]
70831    /// of the previous
70832    /// [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations]
70833    /// call.
70834    ///
70835    /// [google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token]: crate::model::ListModelEvaluationsResponse::next_page_token
70836    /// [google.cloud.aiplatform.v1.ModelService.ListModelEvaluations]: crate::client::ModelService::list_model_evaluations
70837    pub page_token: std::string::String,
70838
70839    /// Mask specifying which fields to read.
70840    pub read_mask: std::option::Option<wkt::FieldMask>,
70841
70842    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70843}
70844
70845#[cfg(feature = "model-service")]
70846impl ListModelEvaluationsRequest {
70847    pub fn new() -> Self {
70848        std::default::Default::default()
70849    }
70850
70851    /// Sets the value of [parent][crate::model::ListModelEvaluationsRequest::parent].
70852    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70853        self.parent = v.into();
70854        self
70855    }
70856
70857    /// Sets the value of [filter][crate::model::ListModelEvaluationsRequest::filter].
70858    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70859        self.filter = v.into();
70860        self
70861    }
70862
70863    /// Sets the value of [page_size][crate::model::ListModelEvaluationsRequest::page_size].
70864    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
70865        self.page_size = v.into();
70866        self
70867    }
70868
70869    /// Sets the value of [page_token][crate::model::ListModelEvaluationsRequest::page_token].
70870    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70871        self.page_token = v.into();
70872        self
70873    }
70874
70875    /// Sets the value of [read_mask][crate::model::ListModelEvaluationsRequest::read_mask].
70876    pub fn set_read_mask<T>(mut self, v: T) -> Self
70877    where
70878        T: std::convert::Into<wkt::FieldMask>,
70879    {
70880        self.read_mask = std::option::Option::Some(v.into());
70881        self
70882    }
70883
70884    /// Sets or clears the value of [read_mask][crate::model::ListModelEvaluationsRequest::read_mask].
70885    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
70886    where
70887        T: std::convert::Into<wkt::FieldMask>,
70888    {
70889        self.read_mask = v.map(|x| x.into());
70890        self
70891    }
70892}
70893
70894#[cfg(feature = "model-service")]
70895impl wkt::message::Message for ListModelEvaluationsRequest {
70896    fn typename() -> &'static str {
70897        "type.googleapis.com/google.cloud.aiplatform.v1.ListModelEvaluationsRequest"
70898    }
70899}
70900
70901/// Response message for
70902/// [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations].
70903///
70904/// [google.cloud.aiplatform.v1.ModelService.ListModelEvaluations]: crate::client::ModelService::list_model_evaluations
70905#[cfg(feature = "model-service")]
70906#[derive(Clone, Default, PartialEq)]
70907#[non_exhaustive]
70908pub struct ListModelEvaluationsResponse {
70909    /// List of ModelEvaluations in the requested page.
70910    pub model_evaluations: std::vec::Vec<crate::model::ModelEvaluation>,
70911
70912    /// A token to retrieve next page of results.
70913    /// Pass to
70914    /// [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token]
70915    /// to obtain that page.
70916    ///
70917    /// [google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token]: crate::model::ListModelEvaluationsRequest::page_token
70918    pub next_page_token: std::string::String,
70919
70920    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70921}
70922
70923#[cfg(feature = "model-service")]
70924impl ListModelEvaluationsResponse {
70925    pub fn new() -> Self {
70926        std::default::Default::default()
70927    }
70928
70929    /// Sets the value of [model_evaluations][crate::model::ListModelEvaluationsResponse::model_evaluations].
70930    pub fn set_model_evaluations<T, V>(mut self, v: T) -> Self
70931    where
70932        T: std::iter::IntoIterator<Item = V>,
70933        V: std::convert::Into<crate::model::ModelEvaluation>,
70934    {
70935        use std::iter::Iterator;
70936        self.model_evaluations = v.into_iter().map(|i| i.into()).collect();
70937        self
70938    }
70939
70940    /// Sets the value of [next_page_token][crate::model::ListModelEvaluationsResponse::next_page_token].
70941    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70942        self.next_page_token = v.into();
70943        self
70944    }
70945}
70946
70947#[cfg(feature = "model-service")]
70948impl wkt::message::Message for ListModelEvaluationsResponse {
70949    fn typename() -> &'static str {
70950        "type.googleapis.com/google.cloud.aiplatform.v1.ListModelEvaluationsResponse"
70951    }
70952}
70953
70954#[cfg(feature = "model-service")]
70955#[doc(hidden)]
70956impl gax::paginator::internal::PageableResponse for ListModelEvaluationsResponse {
70957    type PageItem = crate::model::ModelEvaluation;
70958
70959    fn items(self) -> std::vec::Vec<Self::PageItem> {
70960        self.model_evaluations
70961    }
70962
70963    fn next_page_token(&self) -> std::string::String {
70964        use std::clone::Clone;
70965        self.next_page_token.clone()
70966    }
70967}
70968
70969/// Request message for
70970/// [ModelService.GetModelEvaluationSlice][google.cloud.aiplatform.v1.ModelService.GetModelEvaluationSlice].
70971///
70972/// [google.cloud.aiplatform.v1.ModelService.GetModelEvaluationSlice]: crate::client::ModelService::get_model_evaluation_slice
70973#[cfg(feature = "model-service")]
70974#[derive(Clone, Default, PartialEq)]
70975#[non_exhaustive]
70976pub struct GetModelEvaluationSliceRequest {
70977    /// Required. The name of the ModelEvaluationSlice resource.
70978    /// Format:
70979    /// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
70980    pub name: std::string::String,
70981
70982    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
70983}
70984
70985#[cfg(feature = "model-service")]
70986impl GetModelEvaluationSliceRequest {
70987    pub fn new() -> Self {
70988        std::default::Default::default()
70989    }
70990
70991    /// Sets the value of [name][crate::model::GetModelEvaluationSliceRequest::name].
70992    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
70993        self.name = v.into();
70994        self
70995    }
70996}
70997
70998#[cfg(feature = "model-service")]
70999impl wkt::message::Message for GetModelEvaluationSliceRequest {
71000    fn typename() -> &'static str {
71001        "type.googleapis.com/google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest"
71002    }
71003}
71004
71005/// Request message for
71006/// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices].
71007///
71008/// [google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices]: crate::client::ModelService::list_model_evaluation_slices
71009#[cfg(feature = "model-service")]
71010#[derive(Clone, Default, PartialEq)]
71011#[non_exhaustive]
71012pub struct ListModelEvaluationSlicesRequest {
71013    /// Required. The resource name of the ModelEvaluation to list the
71014    /// ModelEvaluationSlices from. Format:
71015    /// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
71016    pub parent: std::string::String,
71017
71018    /// The standard list filter.
71019    ///
71020    /// * `slice.dimension` - for =.
71021    pub filter: std::string::String,
71022
71023    /// The standard list page size.
71024    pub page_size: i32,
71025
71026    /// The standard list page token.
71027    /// Typically obtained via
71028    /// [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token]
71029    /// of the previous
71030    /// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices]
71031    /// call.
71032    ///
71033    /// [google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token]: crate::model::ListModelEvaluationSlicesResponse::next_page_token
71034    /// [google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices]: crate::client::ModelService::list_model_evaluation_slices
71035    pub page_token: std::string::String,
71036
71037    /// Mask specifying which fields to read.
71038    pub read_mask: std::option::Option<wkt::FieldMask>,
71039
71040    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
71041}
71042
71043#[cfg(feature = "model-service")]
71044impl ListModelEvaluationSlicesRequest {
71045    pub fn new() -> Self {
71046        std::default::Default::default()
71047    }
71048
71049    /// Sets the value of [parent][crate::model::ListModelEvaluationSlicesRequest::parent].
71050    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
71051        self.parent = v.into();
71052        self
71053    }
71054
71055    /// Sets the value of [filter][crate::model::ListModelEvaluationSlicesRequest::filter].
71056    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
71057        self.filter = v.into();
71058        self
71059    }
71060
71061    /// Sets the value of [page_size][crate::model::ListModelEvaluationSlicesRequest::page_size].
71062    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
71063        self.page_size = v.into();
71064        self
71065    }
71066
71067    /// Sets the value of [page_token][crate::model::ListModelEvaluationSlicesRequest::page_token].
71068    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
71069        self.page_token = v.into();
71070        self
71071    }
71072
71073    /// Sets the value of [read_mask][crate::model::ListModelEvaluationSlicesRequest::read_mask].
71074    pub fn set_read_mask<T>(mut self, v: T) -> Self
71075    where
71076        T: std::convert::Into<wkt::FieldMask>,
71077    {
71078        self.read_mask = std::option::Option::Some(v.into());
71079        self
71080    }
71081
71082    /// Sets or clears the value of [read_mask][crate::model::ListModelEvaluationSlicesRequest::read_mask].
71083    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
71084    where
71085        T: std::convert::Into<wkt::FieldMask>,
71086    {
71087        self.read_mask = v.map(|x| x.into());
71088        self
71089    }
71090}
71091
71092#[cfg(feature = "model-service")]
71093impl wkt::message::Message for ListModelEvaluationSlicesRequest {
71094    fn typename() -> &'static str {
71095        "type.googleapis.com/google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest"
71096    }
71097}
71098
71099/// Response message for
71100/// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices].
71101///
71102/// [google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices]: crate::client::ModelService::list_model_evaluation_slices
71103#[cfg(feature = "model-service")]
71104#[derive(Clone, Default, PartialEq)]
71105#[non_exhaustive]
71106pub struct ListModelEvaluationSlicesResponse {
71107    /// List of ModelEvaluations in the requested page.
71108    pub model_evaluation_slices: std::vec::Vec<crate::model::ModelEvaluationSlice>,
71109
71110    /// A token to retrieve next page of results.
71111    /// Pass to
71112    /// [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token]
71113    /// to obtain that page.
71114    ///
71115    /// [google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token]: crate::model::ListModelEvaluationSlicesRequest::page_token
71116    pub next_page_token: std::string::String,
71117
71118    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
71119}
71120
71121#[cfg(feature = "model-service")]
71122impl ListModelEvaluationSlicesResponse {
71123    pub fn new() -> Self {
71124        std::default::Default::default()
71125    }
71126
71127    /// Sets the value of [model_evaluation_slices][crate::model::ListModelEvaluationSlicesResponse::model_evaluation_slices].
71128    pub fn set_model_evaluation_slices<T, V>(mut self, v: T) -> Self
71129    where
71130        T: std::iter::IntoIterator<Item = V>,
71131        V: std::convert::Into<crate::model::ModelEvaluationSlice>,
71132    {
71133        use std::iter::Iterator;
71134        self.model_evaluation_slices = v.into_iter().map(|i| i.into()).collect();
71135        self
71136    }
71137
71138    /// Sets the value of [next_page_token][crate::model::ListModelEvaluationSlicesResponse::next_page_token].
71139    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
71140        self.next_page_token = v.into();
71141        self
71142    }
71143}
71144
71145#[cfg(feature = "model-service")]
71146impl wkt::message::Message for ListModelEvaluationSlicesResponse {
71147    fn typename() -> &'static str {
71148        "type.googleapis.com/google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse"
71149    }
71150}
71151
71152#[cfg(feature = "model-service")]
71153#[doc(hidden)]
71154impl gax::paginator::internal::PageableResponse for ListModelEvaluationSlicesResponse {
71155    type PageItem = crate::model::ModelEvaluationSlice;
71156
71157    fn items(self) -> std::vec::Vec<Self::PageItem> {
71158        self.model_evaluation_slices
71159    }
71160
71161    fn next_page_token(&self) -> std::string::String {
71162        use std::clone::Clone;
71163        self.next_page_token.clone()
71164    }
71165}
71166
71167/// Represents a Neural Architecture Search (NAS) job.
71168#[cfg(feature = "job-service")]
71169#[derive(Clone, Default, PartialEq)]
71170#[non_exhaustive]
71171pub struct NasJob {
71172    /// Output only. Resource name of the NasJob.
71173    pub name: std::string::String,
71174
71175    /// Required. The display name of the NasJob.
71176    /// The name can be up to 128 characters long and can consist of any UTF-8
71177    /// characters.
71178    pub display_name: std::string::String,
71179
71180    /// Required. The specification of a NasJob.
71181    pub nas_job_spec: std::option::Option<crate::model::NasJobSpec>,
71182
71183    /// Output only. Output of the NasJob.
71184    pub nas_job_output: std::option::Option<crate::model::NasJobOutput>,
71185
71186    /// Output only. The detailed state of the job.
71187    pub state: crate::model::JobState,
71188
71189    /// Output only. Time when the NasJob was created.
71190    pub create_time: std::option::Option<wkt::Timestamp>,
71191
71192    /// Output only. Time when the NasJob for the first time entered the
71193    /// `JOB_STATE_RUNNING` state.
71194    pub start_time: std::option::Option<wkt::Timestamp>,
71195
71196    /// Output only. Time when the NasJob entered any of the following states:
71197    /// `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
71198    pub end_time: std::option::Option<wkt::Timestamp>,
71199
71200    /// Output only. Time when the NasJob was most recently updated.
71201    pub update_time: std::option::Option<wkt::Timestamp>,
71202
71203    /// Output only. Only populated when job's state is JOB_STATE_FAILED or
71204    /// JOB_STATE_CANCELLED.
71205    pub error: std::option::Option<rpc::model::Status>,
71206
71207    /// The labels with user-defined metadata to organize NasJobs.
71208    ///
71209    /// Label keys and values can be no longer than 64 characters
71210    /// (Unicode codepoints), can only contain lowercase letters, numeric
71211    /// characters, underscores and dashes. International characters are allowed.
71212    ///
71213    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
71214    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
71215
71216    /// Customer-managed encryption key options for a NasJob.
71217    /// If this is set, then all resources created by the NasJob
71218    /// will be encrypted with the provided encryption key.
71219    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
71220
71221    /// Optional. Enable a separation of Custom model training
71222    /// and restricted image training for tenant project.
71223    #[deprecated]
71224    pub enable_restricted_image_training: bool,
71225
71226    /// Output only. Reserved for future use.
71227    pub satisfies_pzs: bool,
71228
71229    /// Output only. Reserved for future use.
71230    pub satisfies_pzi: bool,
71231
71232    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
71233}
71234
71235#[cfg(feature = "job-service")]
71236impl NasJob {
71237    pub fn new() -> Self {
71238        std::default::Default::default()
71239    }
71240
71241    /// Sets the value of [name][crate::model::NasJob::name].
71242    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
71243        self.name = v.into();
71244        self
71245    }
71246
71247    /// Sets the value of [display_name][crate::model::NasJob::display_name].
71248    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
71249        self.display_name = v.into();
71250        self
71251    }
71252
71253    /// Sets the value of [nas_job_spec][crate::model::NasJob::nas_job_spec].
71254    pub fn set_nas_job_spec<T>(mut self, v: T) -> Self
71255    where
71256        T: std::convert::Into<crate::model::NasJobSpec>,
71257    {
71258        self.nas_job_spec = std::option::Option::Some(v.into());
71259        self
71260    }
71261
71262    /// Sets or clears the value of [nas_job_spec][crate::model::NasJob::nas_job_spec].
71263    pub fn set_or_clear_nas_job_spec<T>(mut self, v: std::option::Option<T>) -> Self
71264    where
71265        T: std::convert::Into<crate::model::NasJobSpec>,
71266    {
71267        self.nas_job_spec = v.map(|x| x.into());
71268        self
71269    }
71270
71271    /// Sets the value of [nas_job_output][crate::model::NasJob::nas_job_output].
71272    pub fn set_nas_job_output<T>(mut self, v: T) -> Self
71273    where
71274        T: std::convert::Into<crate::model::NasJobOutput>,
71275    {
71276        self.nas_job_output = std::option::Option::Some(v.into());
71277        self
71278    }
71279
71280    /// Sets or clears the value of [nas_job_output][crate::model::NasJob::nas_job_output].
71281    pub fn set_or_clear_nas_job_output<T>(mut self, v: std::option::Option<T>) -> Self
71282    where
71283        T: std::convert::Into<crate::model::NasJobOutput>,
71284    {
71285        self.nas_job_output = v.map(|x| x.into());
71286        self
71287    }
71288
71289    /// Sets the value of [state][crate::model::NasJob::state].
71290    pub fn set_state<T: std::convert::Into<crate::model::JobState>>(mut self, v: T) -> Self {
71291        self.state = v.into();
71292        self
71293    }
71294
71295    /// Sets the value of [create_time][crate::model::NasJob::create_time].
71296    pub fn set_create_time<T>(mut self, v: T) -> Self
71297    where
71298        T: std::convert::Into<wkt::Timestamp>,
71299    {
71300        self.create_time = std::option::Option::Some(v.into());
71301        self
71302    }
71303
71304    /// Sets or clears the value of [create_time][crate::model::NasJob::create_time].
71305    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
71306    where
71307        T: std::convert::Into<wkt::Timestamp>,
71308    {
71309        self.create_time = v.map(|x| x.into());
71310        self
71311    }
71312
71313    /// Sets the value of [start_time][crate::model::NasJob::start_time].
71314    pub fn set_start_time<T>(mut self, v: T) -> Self
71315    where
71316        T: std::convert::Into<wkt::Timestamp>,
71317    {
71318        self.start_time = std::option::Option::Some(v.into());
71319        self
71320    }
71321
71322    /// Sets or clears the value of [start_time][crate::model::NasJob::start_time].
71323    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
71324    where
71325        T: std::convert::Into<wkt::Timestamp>,
71326    {
71327        self.start_time = v.map(|x| x.into());
71328        self
71329    }
71330
71331    /// Sets the value of [end_time][crate::model::NasJob::end_time].
71332    pub fn set_end_time<T>(mut self, v: T) -> Self
71333    where
71334        T: std::convert::Into<wkt::Timestamp>,
71335    {
71336        self.end_time = std::option::Option::Some(v.into());
71337        self
71338    }
71339
71340    /// Sets or clears the value of [end_time][crate::model::NasJob::end_time].
71341    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
71342    where
71343        T: std::convert::Into<wkt::Timestamp>,
71344    {
71345        self.end_time = v.map(|x| x.into());
71346        self
71347    }
71348
71349    /// Sets the value of [update_time][crate::model::NasJob::update_time].
71350    pub fn set_update_time<T>(mut self, v: T) -> Self
71351    where
71352        T: std::convert::Into<wkt::Timestamp>,
71353    {
71354        self.update_time = std::option::Option::Some(v.into());
71355        self
71356    }
71357
71358    /// Sets or clears the value of [update_time][crate::model::NasJob::update_time].
71359    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
71360    where
71361        T: std::convert::Into<wkt::Timestamp>,
71362    {
71363        self.update_time = v.map(|x| x.into());
71364        self
71365    }
71366
71367    /// Sets the value of [error][crate::model::NasJob::error].
71368    pub fn set_error<T>(mut self, v: T) -> Self
71369    where
71370        T: std::convert::Into<rpc::model::Status>,
71371    {
71372        self.error = std::option::Option::Some(v.into());
71373        self
71374    }
71375
71376    /// Sets or clears the value of [error][crate::model::NasJob::error].
71377    pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
71378    where
71379        T: std::convert::Into<rpc::model::Status>,
71380    {
71381        self.error = v.map(|x| x.into());
71382        self
71383    }
71384
71385    /// Sets the value of [labels][crate::model::NasJob::labels].
71386    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
71387    where
71388        T: std::iter::IntoIterator<Item = (K, V)>,
71389        K: std::convert::Into<std::string::String>,
71390        V: std::convert::Into<std::string::String>,
71391    {
71392        use std::iter::Iterator;
71393        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
71394        self
71395    }
71396
71397    /// Sets the value of [encryption_spec][crate::model::NasJob::encryption_spec].
71398    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
71399    where
71400        T: std::convert::Into<crate::model::EncryptionSpec>,
71401    {
71402        self.encryption_spec = std::option::Option::Some(v.into());
71403        self
71404    }
71405
71406    /// Sets or clears the value of [encryption_spec][crate::model::NasJob::encryption_spec].
71407    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
71408    where
71409        T: std::convert::Into<crate::model::EncryptionSpec>,
71410    {
71411        self.encryption_spec = v.map(|x| x.into());
71412        self
71413    }
71414
71415    /// Sets the value of [enable_restricted_image_training][crate::model::NasJob::enable_restricted_image_training].
71416    #[deprecated]
71417    pub fn set_enable_restricted_image_training<T: std::convert::Into<bool>>(
71418        mut self,
71419        v: T,
71420    ) -> Self {
71421        self.enable_restricted_image_training = v.into();
71422        self
71423    }
71424
71425    /// Sets the value of [satisfies_pzs][crate::model::NasJob::satisfies_pzs].
71426    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
71427        self.satisfies_pzs = v.into();
71428        self
71429    }
71430
71431    /// Sets the value of [satisfies_pzi][crate::model::NasJob::satisfies_pzi].
71432    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
71433        self.satisfies_pzi = v.into();
71434        self
71435    }
71436}
71437
71438#[cfg(feature = "job-service")]
71439impl wkt::message::Message for NasJob {
71440    fn typename() -> &'static str {
71441        "type.googleapis.com/google.cloud.aiplatform.v1.NasJob"
71442    }
71443}
71444
71445/// Represents a NasTrial details along with its parameters. If there is a
71446/// corresponding train NasTrial, the train NasTrial is also returned.
71447#[cfg(feature = "job-service")]
71448#[derive(Clone, Default, PartialEq)]
71449#[non_exhaustive]
71450pub struct NasTrialDetail {
71451    /// Output only. Resource name of the NasTrialDetail.
71452    pub name: std::string::String,
71453
71454    /// The parameters for the NasJob NasTrial.
71455    pub parameters: std::string::String,
71456
71457    /// The requested search NasTrial.
71458    pub search_trial: std::option::Option<crate::model::NasTrial>,
71459
71460    /// The train NasTrial corresponding to
71461    /// [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
71462    /// Only populated if
71463    /// [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
71464    /// used for training.
71465    ///
71466    /// [google.cloud.aiplatform.v1.NasTrialDetail.search_trial]: crate::model::NasTrialDetail::search_trial
71467    pub train_trial: std::option::Option<crate::model::NasTrial>,
71468
71469    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
71470}
71471
71472#[cfg(feature = "job-service")]
71473impl NasTrialDetail {
71474    pub fn new() -> Self {
71475        std::default::Default::default()
71476    }
71477
71478    /// Sets the value of [name][crate::model::NasTrialDetail::name].
71479    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
71480        self.name = v.into();
71481        self
71482    }
71483
71484    /// Sets the value of [parameters][crate::model::NasTrialDetail::parameters].
71485    pub fn set_parameters<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
71486        self.parameters = v.into();
71487        self
71488    }
71489
71490    /// Sets the value of [search_trial][crate::model::NasTrialDetail::search_trial].
71491    pub fn set_search_trial<T>(mut self, v: T) -> Self
71492    where
71493        T: std::convert::Into<crate::model::NasTrial>,
71494    {
71495        self.search_trial = std::option::Option::Some(v.into());
71496        self
71497    }
71498
71499    /// Sets or clears the value of [search_trial][crate::model::NasTrialDetail::search_trial].
71500    pub fn set_or_clear_search_trial<T>(mut self, v: std::option::Option<T>) -> Self
71501    where
71502        T: std::convert::Into<crate::model::NasTrial>,
71503    {
71504        self.search_trial = v.map(|x| x.into());
71505        self
71506    }
71507
71508    /// Sets the value of [train_trial][crate::model::NasTrialDetail::train_trial].
71509    pub fn set_train_trial<T>(mut self, v: T) -> Self
71510    where
71511        T: std::convert::Into<crate::model::NasTrial>,
71512    {
71513        self.train_trial = std::option::Option::Some(v.into());
71514        self
71515    }
71516
71517    /// Sets or clears the value of [train_trial][crate::model::NasTrialDetail::train_trial].
71518    pub fn set_or_clear_train_trial<T>(mut self, v: std::option::Option<T>) -> Self
71519    where
71520        T: std::convert::Into<crate::model::NasTrial>,
71521    {
71522        self.train_trial = v.map(|x| x.into());
71523        self
71524    }
71525}
71526
71527#[cfg(feature = "job-service")]
71528impl wkt::message::Message for NasTrialDetail {
71529    fn typename() -> &'static str {
71530        "type.googleapis.com/google.cloud.aiplatform.v1.NasTrialDetail"
71531    }
71532}
71533
71534/// Represents the spec of a NasJob.
71535#[cfg(feature = "job-service")]
71536#[derive(Clone, Default, PartialEq)]
71537#[non_exhaustive]
71538pub struct NasJobSpec {
71539    /// The ID of the existing NasJob in the same Project and Location
71540    /// which will be used to resume search. search_space_spec and
71541    /// nas_algorithm_spec are obtained from previous NasJob hence should not
71542    /// provide them again for this NasJob.
71543    pub resume_nas_job_id: std::string::String,
71544
71545    /// It defines the search space for Neural Architecture Search (NAS).
71546    pub search_space_spec: std::string::String,
71547
71548    /// The Neural Architecture Search (NAS) algorithm specification.
71549    pub nas_algorithm_spec: std::option::Option<crate::model::nas_job_spec::NasAlgorithmSpec>,
71550
71551    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
71552}
71553
71554#[cfg(feature = "job-service")]
71555impl NasJobSpec {
71556    pub fn new() -> Self {
71557        std::default::Default::default()
71558    }
71559
71560    /// Sets the value of [resume_nas_job_id][crate::model::NasJobSpec::resume_nas_job_id].
71561    pub fn set_resume_nas_job_id<T: std::convert::Into<std::string::String>>(
71562        mut self,
71563        v: T,
71564    ) -> Self {
71565        self.resume_nas_job_id = v.into();
71566        self
71567    }
71568
71569    /// Sets the value of [search_space_spec][crate::model::NasJobSpec::search_space_spec].
71570    pub fn set_search_space_spec<T: std::convert::Into<std::string::String>>(
71571        mut self,
71572        v: T,
71573    ) -> Self {
71574        self.search_space_spec = v.into();
71575        self
71576    }
71577
71578    /// Sets the value of [nas_algorithm_spec][crate::model::NasJobSpec::nas_algorithm_spec].
71579    ///
71580    /// Note that all the setters affecting `nas_algorithm_spec` are mutually
71581    /// exclusive.
71582    pub fn set_nas_algorithm_spec<
71583        T: std::convert::Into<std::option::Option<crate::model::nas_job_spec::NasAlgorithmSpec>>,
71584    >(
71585        mut self,
71586        v: T,
71587    ) -> Self {
71588        self.nas_algorithm_spec = v.into();
71589        self
71590    }
71591
71592    /// The value of [nas_algorithm_spec][crate::model::NasJobSpec::nas_algorithm_spec]
71593    /// if it holds a `MultiTrialAlgorithmSpec`, `None` if the field is not set or
71594    /// holds a different branch.
71595    pub fn multi_trial_algorithm_spec(
71596        &self,
71597    ) -> std::option::Option<&std::boxed::Box<crate::model::nas_job_spec::MultiTrialAlgorithmSpec>>
71598    {
71599        #[allow(unreachable_patterns)]
71600        self.nas_algorithm_spec.as_ref().and_then(|v| match v {
71601            crate::model::nas_job_spec::NasAlgorithmSpec::MultiTrialAlgorithmSpec(v) => {
71602                std::option::Option::Some(v)
71603            }
71604            _ => std::option::Option::None,
71605        })
71606    }
71607
71608    /// Sets the value of [nas_algorithm_spec][crate::model::NasJobSpec::nas_algorithm_spec]
71609    /// to hold a `MultiTrialAlgorithmSpec`.
71610    ///
71611    /// Note that all the setters affecting `nas_algorithm_spec` are
71612    /// mutually exclusive.
71613    pub fn set_multi_trial_algorithm_spec<
71614        T: std::convert::Into<std::boxed::Box<crate::model::nas_job_spec::MultiTrialAlgorithmSpec>>,
71615    >(
71616        mut self,
71617        v: T,
71618    ) -> Self {
71619        self.nas_algorithm_spec = std::option::Option::Some(
71620            crate::model::nas_job_spec::NasAlgorithmSpec::MultiTrialAlgorithmSpec(v.into()),
71621        );
71622        self
71623    }
71624}
71625
71626#[cfg(feature = "job-service")]
71627impl wkt::message::Message for NasJobSpec {
71628    fn typename() -> &'static str {
71629        "type.googleapis.com/google.cloud.aiplatform.v1.NasJobSpec"
71630    }
71631}
71632
71633/// Defines additional types related to [NasJobSpec].
71634#[cfg(feature = "job-service")]
71635pub mod nas_job_spec {
71636    #[allow(unused_imports)]
71637    use super::*;
71638
71639    /// The spec of multi-trial Neural Architecture Search (NAS).
71640    #[cfg(feature = "job-service")]
71641    #[derive(Clone, Default, PartialEq)]
71642    #[non_exhaustive]
71643    pub struct MultiTrialAlgorithmSpec {
71644        /// The multi-trial Neural Architecture Search (NAS) algorithm
71645        /// type. Defaults to `REINFORCEMENT_LEARNING`.
71646        pub multi_trial_algorithm:
71647            crate::model::nas_job_spec::multi_trial_algorithm_spec::MultiTrialAlgorithm,
71648
71649        /// Metric specs for the NAS job.
71650        /// Validation for this field is done at `multi_trial_algorithm_spec` field.
71651        pub metric:
71652            std::option::Option<crate::model::nas_job_spec::multi_trial_algorithm_spec::MetricSpec>,
71653
71654        /// Required. Spec for search trials.
71655        pub search_trial_spec: std::option::Option<
71656            crate::model::nas_job_spec::multi_trial_algorithm_spec::SearchTrialSpec,
71657        >,
71658
71659        /// Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
71660        /// search trials will be trained for every M
71661        /// [TrainTrialSpec.frequency] trials searched.
71662        pub train_trial_spec: std::option::Option<
71663            crate::model::nas_job_spec::multi_trial_algorithm_spec::TrainTrialSpec,
71664        >,
71665
71666        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
71667    }
71668
71669    #[cfg(feature = "job-service")]
71670    impl MultiTrialAlgorithmSpec {
71671        pub fn new() -> Self {
71672            std::default::Default::default()
71673        }
71674
71675        /// Sets the value of [multi_trial_algorithm][crate::model::nas_job_spec::MultiTrialAlgorithmSpec::multi_trial_algorithm].
71676        pub fn set_multi_trial_algorithm<
71677            T: std::convert::Into<
71678                    crate::model::nas_job_spec::multi_trial_algorithm_spec::MultiTrialAlgorithm,
71679                >,
71680        >(
71681            mut self,
71682            v: T,
71683        ) -> Self {
71684            self.multi_trial_algorithm = v.into();
71685            self
71686        }
71687
71688        /// Sets the value of [metric][crate::model::nas_job_spec::MultiTrialAlgorithmSpec::metric].
71689        pub fn set_metric<T>(mut self, v: T) -> Self
71690        where
71691            T: std::convert::Into<
71692                    crate::model::nas_job_spec::multi_trial_algorithm_spec::MetricSpec,
71693                >,
71694        {
71695            self.metric = std::option::Option::Some(v.into());
71696            self
71697        }
71698
71699        /// Sets or clears the value of [metric][crate::model::nas_job_spec::MultiTrialAlgorithmSpec::metric].
71700        pub fn set_or_clear_metric<T>(mut self, v: std::option::Option<T>) -> Self
71701        where
71702            T: std::convert::Into<
71703                    crate::model::nas_job_spec::multi_trial_algorithm_spec::MetricSpec,
71704                >,
71705        {
71706            self.metric = v.map(|x| x.into());
71707            self
71708        }
71709
71710        /// Sets the value of [search_trial_spec][crate::model::nas_job_spec::MultiTrialAlgorithmSpec::search_trial_spec].
71711        pub fn set_search_trial_spec<T>(mut self, v: T) -> Self
71712        where
71713            T: std::convert::Into<
71714                    crate::model::nas_job_spec::multi_trial_algorithm_spec::SearchTrialSpec,
71715                >,
71716        {
71717            self.search_trial_spec = std::option::Option::Some(v.into());
71718            self
71719        }
71720
71721        /// Sets or clears the value of [search_trial_spec][crate::model::nas_job_spec::MultiTrialAlgorithmSpec::search_trial_spec].
71722        pub fn set_or_clear_search_trial_spec<T>(mut self, v: std::option::Option<T>) -> Self
71723        where
71724            T: std::convert::Into<
71725                    crate::model::nas_job_spec::multi_trial_algorithm_spec::SearchTrialSpec,
71726                >,
71727        {
71728            self.search_trial_spec = v.map(|x| x.into());
71729            self
71730        }
71731
71732        /// Sets the value of [train_trial_spec][crate::model::nas_job_spec::MultiTrialAlgorithmSpec::train_trial_spec].
71733        pub fn set_train_trial_spec<T>(mut self, v: T) -> Self
71734        where
71735            T: std::convert::Into<
71736                    crate::model::nas_job_spec::multi_trial_algorithm_spec::TrainTrialSpec,
71737                >,
71738        {
71739            self.train_trial_spec = std::option::Option::Some(v.into());
71740            self
71741        }
71742
71743        /// Sets or clears the value of [train_trial_spec][crate::model::nas_job_spec::MultiTrialAlgorithmSpec::train_trial_spec].
71744        pub fn set_or_clear_train_trial_spec<T>(mut self, v: std::option::Option<T>) -> Self
71745        where
71746            T: std::convert::Into<
71747                    crate::model::nas_job_spec::multi_trial_algorithm_spec::TrainTrialSpec,
71748                >,
71749        {
71750            self.train_trial_spec = v.map(|x| x.into());
71751            self
71752        }
71753    }
71754
71755    #[cfg(feature = "job-service")]
71756    impl wkt::message::Message for MultiTrialAlgorithmSpec {
71757        fn typename() -> &'static str {
71758            "type.googleapis.com/google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec"
71759        }
71760    }
71761
71762    /// Defines additional types related to [MultiTrialAlgorithmSpec].
71763    #[cfg(feature = "job-service")]
71764    pub mod multi_trial_algorithm_spec {
71765        #[allow(unused_imports)]
71766        use super::*;
71767
71768        /// Represents a metric to optimize.
71769        #[cfg(feature = "job-service")]
71770        #[derive(Clone, Default, PartialEq)]
71771        #[non_exhaustive]
71772        pub struct MetricSpec {
71773            /// Required. The ID of the metric. Must not contain whitespaces.
71774            pub metric_id: std::string::String,
71775
71776            /// Required. The optimization goal of the metric.
71777            pub goal: crate::model::nas_job_spec::multi_trial_algorithm_spec::metric_spec::GoalType,
71778
71779            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
71780        }
71781
71782        #[cfg(feature = "job-service")]
71783        impl MetricSpec {
71784            pub fn new() -> Self {
71785                std::default::Default::default()
71786            }
71787
71788            /// Sets the value of [metric_id][crate::model::nas_job_spec::multi_trial_algorithm_spec::MetricSpec::metric_id].
71789            pub fn set_metric_id<T: std::convert::Into<std::string::String>>(
71790                mut self,
71791                v: T,
71792            ) -> Self {
71793                self.metric_id = v.into();
71794                self
71795            }
71796
71797            /// Sets the value of [goal][crate::model::nas_job_spec::multi_trial_algorithm_spec::MetricSpec::goal].
71798            pub fn set_goal<T: std::convert::Into<crate::model::nas_job_spec::multi_trial_algorithm_spec::metric_spec::GoalType>>(mut self, v: T) -> Self{
71799                self.goal = v.into();
71800                self
71801            }
71802        }
71803
71804        #[cfg(feature = "job-service")]
71805        impl wkt::message::Message for MetricSpec {
71806            fn typename() -> &'static str {
71807                "type.googleapis.com/google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec"
71808            }
71809        }
71810
71811        /// Defines additional types related to [MetricSpec].
71812        #[cfg(feature = "job-service")]
71813        pub mod metric_spec {
71814            #[allow(unused_imports)]
71815            use super::*;
71816
71817            /// The available types of optimization goals.
71818            ///
71819            /// # Working with unknown values
71820            ///
71821            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
71822            /// additional enum variants at any time. Adding new variants is not considered
71823            /// a breaking change. Applications should write their code in anticipation of:
71824            ///
71825            /// - New values appearing in future releases of the client library, **and**
71826            /// - New values received dynamically, without application changes.
71827            ///
71828            /// Please consult the [Working with enums] section in the user guide for some
71829            /// guidelines.
71830            ///
71831            /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
71832            #[cfg(feature = "job-service")]
71833            #[derive(Clone, Debug, PartialEq)]
71834            #[non_exhaustive]
71835            pub enum GoalType {
71836                /// Goal Type will default to maximize.
71837                Unspecified,
71838                /// Maximize the goal metric.
71839                Maximize,
71840                /// Minimize the goal metric.
71841                Minimize,
71842                /// If set, the enum was initialized with an unknown value.
71843                ///
71844                /// Applications can examine the value using [GoalType::value] or
71845                /// [GoalType::name].
71846                UnknownValue(goal_type::UnknownValue),
71847            }
71848
71849            #[doc(hidden)]
71850            #[cfg(feature = "job-service")]
71851            pub mod goal_type {
71852                #[allow(unused_imports)]
71853                use super::*;
71854                #[derive(Clone, Debug, PartialEq)]
71855                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
71856            }
71857
71858            #[cfg(feature = "job-service")]
71859            impl GoalType {
71860                /// Gets the enum value.
71861                ///
71862                /// Returns `None` if the enum contains an unknown value deserialized from
71863                /// the string representation of enums.
71864                pub fn value(&self) -> std::option::Option<i32> {
71865                    match self {
71866                        Self::Unspecified => std::option::Option::Some(0),
71867                        Self::Maximize => std::option::Option::Some(1),
71868                        Self::Minimize => std::option::Option::Some(2),
71869                        Self::UnknownValue(u) => u.0.value(),
71870                    }
71871                }
71872
71873                /// Gets the enum value as a string.
71874                ///
71875                /// Returns `None` if the enum contains an unknown value deserialized from
71876                /// the integer representation of enums.
71877                pub fn name(&self) -> std::option::Option<&str> {
71878                    match self {
71879                        Self::Unspecified => std::option::Option::Some("GOAL_TYPE_UNSPECIFIED"),
71880                        Self::Maximize => std::option::Option::Some("MAXIMIZE"),
71881                        Self::Minimize => std::option::Option::Some("MINIMIZE"),
71882                        Self::UnknownValue(u) => u.0.name(),
71883                    }
71884                }
71885            }
71886
71887            #[cfg(feature = "job-service")]
71888            impl std::default::Default for GoalType {
71889                fn default() -> Self {
71890                    use std::convert::From;
71891                    Self::from(0)
71892                }
71893            }
71894
71895            #[cfg(feature = "job-service")]
71896            impl std::fmt::Display for GoalType {
71897                fn fmt(
71898                    &self,
71899                    f: &mut std::fmt::Formatter<'_>,
71900                ) -> std::result::Result<(), std::fmt::Error> {
71901                    wkt::internal::display_enum(f, self.name(), self.value())
71902                }
71903            }
71904
71905            #[cfg(feature = "job-service")]
71906            impl std::convert::From<i32> for GoalType {
71907                fn from(value: i32) -> Self {
71908                    match value {
71909                        0 => Self::Unspecified,
71910                        1 => Self::Maximize,
71911                        2 => Self::Minimize,
71912                        _ => Self::UnknownValue(goal_type::UnknownValue(
71913                            wkt::internal::UnknownEnumValue::Integer(value),
71914                        )),
71915                    }
71916                }
71917            }
71918
71919            #[cfg(feature = "job-service")]
71920            impl std::convert::From<&str> for GoalType {
71921                fn from(value: &str) -> Self {
71922                    use std::string::ToString;
71923                    match value {
71924                        "GOAL_TYPE_UNSPECIFIED" => Self::Unspecified,
71925                        "MAXIMIZE" => Self::Maximize,
71926                        "MINIMIZE" => Self::Minimize,
71927                        _ => Self::UnknownValue(goal_type::UnknownValue(
71928                            wkt::internal::UnknownEnumValue::String(value.to_string()),
71929                        )),
71930                    }
71931                }
71932            }
71933
71934            #[cfg(feature = "job-service")]
71935            impl serde::ser::Serialize for GoalType {
71936                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
71937                where
71938                    S: serde::Serializer,
71939                {
71940                    match self {
71941                        Self::Unspecified => serializer.serialize_i32(0),
71942                        Self::Maximize => serializer.serialize_i32(1),
71943                        Self::Minimize => serializer.serialize_i32(2),
71944                        Self::UnknownValue(u) => u.0.serialize(serializer),
71945                    }
71946                }
71947            }
71948
71949            #[cfg(feature = "job-service")]
71950            impl<'de> serde::de::Deserialize<'de> for GoalType {
71951                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
71952                where
71953                    D: serde::Deserializer<'de>,
71954                {
71955                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<GoalType>::new(
71956                        ".google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType"))
71957                }
71958            }
71959        }
71960
71961        /// Represent spec for search trials.
71962        #[cfg(feature = "job-service")]
71963        #[derive(Clone, Default, PartialEq)]
71964        #[non_exhaustive]
71965        pub struct SearchTrialSpec {
71966            /// Required. The spec of a search trial job. The same spec applies to
71967            /// all search trials.
71968            pub search_trial_job_spec: std::option::Option<crate::model::CustomJobSpec>,
71969
71970            /// Required. The maximum number of Neural Architecture Search (NAS) trials
71971            /// to run.
71972            pub max_trial_count: i32,
71973
71974            /// Required. The maximum number of trials to run in parallel.
71975            pub max_parallel_trial_count: i32,
71976
71977            /// The number of failed trials that need to be seen before failing
71978            /// the NasJob.
71979            ///
71980            /// If set to 0, Vertex AI decides how many trials must fail
71981            /// before the whole job fails.
71982            pub max_failed_trial_count: i32,
71983
71984            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
71985        }
71986
71987        #[cfg(feature = "job-service")]
71988        impl SearchTrialSpec {
71989            pub fn new() -> Self {
71990                std::default::Default::default()
71991            }
71992
71993            /// Sets the value of [search_trial_job_spec][crate::model::nas_job_spec::multi_trial_algorithm_spec::SearchTrialSpec::search_trial_job_spec].
71994            pub fn set_search_trial_job_spec<T>(mut self, v: T) -> Self
71995            where
71996                T: std::convert::Into<crate::model::CustomJobSpec>,
71997            {
71998                self.search_trial_job_spec = std::option::Option::Some(v.into());
71999                self
72000            }
72001
72002            /// Sets or clears the value of [search_trial_job_spec][crate::model::nas_job_spec::multi_trial_algorithm_spec::SearchTrialSpec::search_trial_job_spec].
72003            pub fn set_or_clear_search_trial_job_spec<T>(
72004                mut self,
72005                v: std::option::Option<T>,
72006            ) -> Self
72007            where
72008                T: std::convert::Into<crate::model::CustomJobSpec>,
72009            {
72010                self.search_trial_job_spec = v.map(|x| x.into());
72011                self
72012            }
72013
72014            /// Sets the value of [max_trial_count][crate::model::nas_job_spec::multi_trial_algorithm_spec::SearchTrialSpec::max_trial_count].
72015            pub fn set_max_trial_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
72016                self.max_trial_count = v.into();
72017                self
72018            }
72019
72020            /// Sets the value of [max_parallel_trial_count][crate::model::nas_job_spec::multi_trial_algorithm_spec::SearchTrialSpec::max_parallel_trial_count].
72021            pub fn set_max_parallel_trial_count<T: std::convert::Into<i32>>(
72022                mut self,
72023                v: T,
72024            ) -> Self {
72025                self.max_parallel_trial_count = v.into();
72026                self
72027            }
72028
72029            /// Sets the value of [max_failed_trial_count][crate::model::nas_job_spec::multi_trial_algorithm_spec::SearchTrialSpec::max_failed_trial_count].
72030            pub fn set_max_failed_trial_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
72031                self.max_failed_trial_count = v.into();
72032                self
72033            }
72034        }
72035
72036        #[cfg(feature = "job-service")]
72037        impl wkt::message::Message for SearchTrialSpec {
72038            fn typename() -> &'static str {
72039                "type.googleapis.com/google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec"
72040            }
72041        }
72042
72043        /// Represent spec for train trials.
72044        #[cfg(feature = "job-service")]
72045        #[derive(Clone, Default, PartialEq)]
72046        #[non_exhaustive]
72047        pub struct TrainTrialSpec {
72048            /// Required. The spec of a train trial job. The same spec applies to
72049            /// all train trials.
72050            pub train_trial_job_spec: std::option::Option<crate::model::CustomJobSpec>,
72051
72052            /// Required. The maximum number of trials to run in parallel.
72053            pub max_parallel_trial_count: i32,
72054
72055            /// Required. Frequency of search trials to start train stage. Top N
72056            /// [TrainTrialSpec.max_parallel_trial_count]
72057            /// search trials will be trained for every M
72058            /// [TrainTrialSpec.frequency] trials searched.
72059            pub frequency: i32,
72060
72061            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
72062        }
72063
72064        #[cfg(feature = "job-service")]
72065        impl TrainTrialSpec {
72066            pub fn new() -> Self {
72067                std::default::Default::default()
72068            }
72069
72070            /// Sets the value of [train_trial_job_spec][crate::model::nas_job_spec::multi_trial_algorithm_spec::TrainTrialSpec::train_trial_job_spec].
72071            pub fn set_train_trial_job_spec<T>(mut self, v: T) -> Self
72072            where
72073                T: std::convert::Into<crate::model::CustomJobSpec>,
72074            {
72075                self.train_trial_job_spec = std::option::Option::Some(v.into());
72076                self
72077            }
72078
72079            /// Sets or clears the value of [train_trial_job_spec][crate::model::nas_job_spec::multi_trial_algorithm_spec::TrainTrialSpec::train_trial_job_spec].
72080            pub fn set_or_clear_train_trial_job_spec<T>(mut self, v: std::option::Option<T>) -> Self
72081            where
72082                T: std::convert::Into<crate::model::CustomJobSpec>,
72083            {
72084                self.train_trial_job_spec = v.map(|x| x.into());
72085                self
72086            }
72087
72088            /// Sets the value of [max_parallel_trial_count][crate::model::nas_job_spec::multi_trial_algorithm_spec::TrainTrialSpec::max_parallel_trial_count].
72089            pub fn set_max_parallel_trial_count<T: std::convert::Into<i32>>(
72090                mut self,
72091                v: T,
72092            ) -> Self {
72093                self.max_parallel_trial_count = v.into();
72094                self
72095            }
72096
72097            /// Sets the value of [frequency][crate::model::nas_job_spec::multi_trial_algorithm_spec::TrainTrialSpec::frequency].
72098            pub fn set_frequency<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
72099                self.frequency = v.into();
72100                self
72101            }
72102        }
72103
72104        #[cfg(feature = "job-service")]
72105        impl wkt::message::Message for TrainTrialSpec {
72106            fn typename() -> &'static str {
72107                "type.googleapis.com/google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec"
72108            }
72109        }
72110
72111        /// The available types of multi-trial algorithms.
72112        ///
72113        /// # Working with unknown values
72114        ///
72115        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
72116        /// additional enum variants at any time. Adding new variants is not considered
72117        /// a breaking change. Applications should write their code in anticipation of:
72118        ///
72119        /// - New values appearing in future releases of the client library, **and**
72120        /// - New values received dynamically, without application changes.
72121        ///
72122        /// Please consult the [Working with enums] section in the user guide for some
72123        /// guidelines.
72124        ///
72125        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
72126        #[cfg(feature = "job-service")]
72127        #[derive(Clone, Debug, PartialEq)]
72128        #[non_exhaustive]
72129        pub enum MultiTrialAlgorithm {
72130            /// Defaults to `REINFORCEMENT_LEARNING`.
72131            Unspecified,
72132            /// The Reinforcement Learning Algorithm for Multi-trial Neural
72133            /// Architecture Search (NAS).
72134            ReinforcementLearning,
72135            /// The Grid Search Algorithm for Multi-trial Neural
72136            /// Architecture Search (NAS).
72137            GridSearch,
72138            /// If set, the enum was initialized with an unknown value.
72139            ///
72140            /// Applications can examine the value using [MultiTrialAlgorithm::value] or
72141            /// [MultiTrialAlgorithm::name].
72142            UnknownValue(multi_trial_algorithm::UnknownValue),
72143        }
72144
72145        #[doc(hidden)]
72146        #[cfg(feature = "job-service")]
72147        pub mod multi_trial_algorithm {
72148            #[allow(unused_imports)]
72149            use super::*;
72150            #[derive(Clone, Debug, PartialEq)]
72151            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
72152        }
72153
72154        #[cfg(feature = "job-service")]
72155        impl MultiTrialAlgorithm {
72156            /// Gets the enum value.
72157            ///
72158            /// Returns `None` if the enum contains an unknown value deserialized from
72159            /// the string representation of enums.
72160            pub fn value(&self) -> std::option::Option<i32> {
72161                match self {
72162                    Self::Unspecified => std::option::Option::Some(0),
72163                    Self::ReinforcementLearning => std::option::Option::Some(1),
72164                    Self::GridSearch => std::option::Option::Some(2),
72165                    Self::UnknownValue(u) => u.0.value(),
72166                }
72167            }
72168
72169            /// Gets the enum value as a string.
72170            ///
72171            /// Returns `None` if the enum contains an unknown value deserialized from
72172            /// the integer representation of enums.
72173            pub fn name(&self) -> std::option::Option<&str> {
72174                match self {
72175                    Self::Unspecified => {
72176                        std::option::Option::Some("MULTI_TRIAL_ALGORITHM_UNSPECIFIED")
72177                    }
72178                    Self::ReinforcementLearning => {
72179                        std::option::Option::Some("REINFORCEMENT_LEARNING")
72180                    }
72181                    Self::GridSearch => std::option::Option::Some("GRID_SEARCH"),
72182                    Self::UnknownValue(u) => u.0.name(),
72183                }
72184            }
72185        }
72186
72187        #[cfg(feature = "job-service")]
72188        impl std::default::Default for MultiTrialAlgorithm {
72189            fn default() -> Self {
72190                use std::convert::From;
72191                Self::from(0)
72192            }
72193        }
72194
72195        #[cfg(feature = "job-service")]
72196        impl std::fmt::Display for MultiTrialAlgorithm {
72197            fn fmt(
72198                &self,
72199                f: &mut std::fmt::Formatter<'_>,
72200            ) -> std::result::Result<(), std::fmt::Error> {
72201                wkt::internal::display_enum(f, self.name(), self.value())
72202            }
72203        }
72204
72205        #[cfg(feature = "job-service")]
72206        impl std::convert::From<i32> for MultiTrialAlgorithm {
72207            fn from(value: i32) -> Self {
72208                match value {
72209                    0 => Self::Unspecified,
72210                    1 => Self::ReinforcementLearning,
72211                    2 => Self::GridSearch,
72212                    _ => Self::UnknownValue(multi_trial_algorithm::UnknownValue(
72213                        wkt::internal::UnknownEnumValue::Integer(value),
72214                    )),
72215                }
72216            }
72217        }
72218
72219        #[cfg(feature = "job-service")]
72220        impl std::convert::From<&str> for MultiTrialAlgorithm {
72221            fn from(value: &str) -> Self {
72222                use std::string::ToString;
72223                match value {
72224                    "MULTI_TRIAL_ALGORITHM_UNSPECIFIED" => Self::Unspecified,
72225                    "REINFORCEMENT_LEARNING" => Self::ReinforcementLearning,
72226                    "GRID_SEARCH" => Self::GridSearch,
72227                    _ => Self::UnknownValue(multi_trial_algorithm::UnknownValue(
72228                        wkt::internal::UnknownEnumValue::String(value.to_string()),
72229                    )),
72230                }
72231            }
72232        }
72233
72234        #[cfg(feature = "job-service")]
72235        impl serde::ser::Serialize for MultiTrialAlgorithm {
72236            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
72237            where
72238                S: serde::Serializer,
72239            {
72240                match self {
72241                    Self::Unspecified => serializer.serialize_i32(0),
72242                    Self::ReinforcementLearning => serializer.serialize_i32(1),
72243                    Self::GridSearch => serializer.serialize_i32(2),
72244                    Self::UnknownValue(u) => u.0.serialize(serializer),
72245                }
72246            }
72247        }
72248
72249        #[cfg(feature = "job-service")]
72250        impl<'de> serde::de::Deserialize<'de> for MultiTrialAlgorithm {
72251            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
72252            where
72253                D: serde::Deserializer<'de>,
72254            {
72255                deserializer.deserialize_any(wkt::internal::EnumVisitor::<MultiTrialAlgorithm>::new(
72256                    ".google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm"))
72257            }
72258        }
72259    }
72260
72261    /// The Neural Architecture Search (NAS) algorithm specification.
72262    #[cfg(feature = "job-service")]
72263    #[derive(Clone, Debug, PartialEq)]
72264    #[non_exhaustive]
72265    pub enum NasAlgorithmSpec {
72266        /// The spec of multi-trial algorithms.
72267        MultiTrialAlgorithmSpec(
72268            std::boxed::Box<crate::model::nas_job_spec::MultiTrialAlgorithmSpec>,
72269        ),
72270    }
72271}
72272
72273/// Represents a uCAIP NasJob output.
72274#[cfg(feature = "job-service")]
72275#[derive(Clone, Default, PartialEq)]
72276#[non_exhaustive]
72277pub struct NasJobOutput {
72278    /// The output of this Neural Architecture Search (NAS) job.
72279    pub output: std::option::Option<crate::model::nas_job_output::Output>,
72280
72281    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
72282}
72283
72284#[cfg(feature = "job-service")]
72285impl NasJobOutput {
72286    pub fn new() -> Self {
72287        std::default::Default::default()
72288    }
72289
72290    /// Sets the value of [output][crate::model::NasJobOutput::output].
72291    ///
72292    /// Note that all the setters affecting `output` are mutually
72293    /// exclusive.
72294    pub fn set_output<
72295        T: std::convert::Into<std::option::Option<crate::model::nas_job_output::Output>>,
72296    >(
72297        mut self,
72298        v: T,
72299    ) -> Self {
72300        self.output = v.into();
72301        self
72302    }
72303
72304    /// The value of [output][crate::model::NasJobOutput::output]
72305    /// if it holds a `MultiTrialJobOutput`, `None` if the field is not set or
72306    /// holds a different branch.
72307    pub fn multi_trial_job_output(
72308        &self,
72309    ) -> std::option::Option<&std::boxed::Box<crate::model::nas_job_output::MultiTrialJobOutput>>
72310    {
72311        #[allow(unreachable_patterns)]
72312        self.output.as_ref().and_then(|v| match v {
72313            crate::model::nas_job_output::Output::MultiTrialJobOutput(v) => {
72314                std::option::Option::Some(v)
72315            }
72316            _ => std::option::Option::None,
72317        })
72318    }
72319
72320    /// Sets the value of [output][crate::model::NasJobOutput::output]
72321    /// to hold a `MultiTrialJobOutput`.
72322    ///
72323    /// Note that all the setters affecting `output` are
72324    /// mutually exclusive.
72325    pub fn set_multi_trial_job_output<
72326        T: std::convert::Into<std::boxed::Box<crate::model::nas_job_output::MultiTrialJobOutput>>,
72327    >(
72328        mut self,
72329        v: T,
72330    ) -> Self {
72331        self.output = std::option::Option::Some(
72332            crate::model::nas_job_output::Output::MultiTrialJobOutput(v.into()),
72333        );
72334        self
72335    }
72336}
72337
72338#[cfg(feature = "job-service")]
72339impl wkt::message::Message for NasJobOutput {
72340    fn typename() -> &'static str {
72341        "type.googleapis.com/google.cloud.aiplatform.v1.NasJobOutput"
72342    }
72343}
72344
72345/// Defines additional types related to [NasJobOutput].
72346#[cfg(feature = "job-service")]
72347pub mod nas_job_output {
72348    #[allow(unused_imports)]
72349    use super::*;
72350
72351    /// The output of a multi-trial Neural Architecture Search (NAS) jobs.
72352    #[cfg(feature = "job-service")]
72353    #[derive(Clone, Default, PartialEq)]
72354    #[non_exhaustive]
72355    pub struct MultiTrialJobOutput {
72356        /// Output only. List of NasTrials that were started as part of search stage.
72357        pub search_trials: std::vec::Vec<crate::model::NasTrial>,
72358
72359        /// Output only. List of NasTrials that were started as part of train stage.
72360        pub train_trials: std::vec::Vec<crate::model::NasTrial>,
72361
72362        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
72363    }
72364
72365    #[cfg(feature = "job-service")]
72366    impl MultiTrialJobOutput {
72367        pub fn new() -> Self {
72368            std::default::Default::default()
72369        }
72370
72371        /// Sets the value of [search_trials][crate::model::nas_job_output::MultiTrialJobOutput::search_trials].
72372        pub fn set_search_trials<T, V>(mut self, v: T) -> Self
72373        where
72374            T: std::iter::IntoIterator<Item = V>,
72375            V: std::convert::Into<crate::model::NasTrial>,
72376        {
72377            use std::iter::Iterator;
72378            self.search_trials = v.into_iter().map(|i| i.into()).collect();
72379            self
72380        }
72381
72382        /// Sets the value of [train_trials][crate::model::nas_job_output::MultiTrialJobOutput::train_trials].
72383        pub fn set_train_trials<T, V>(mut self, v: T) -> Self
72384        where
72385            T: std::iter::IntoIterator<Item = V>,
72386            V: std::convert::Into<crate::model::NasTrial>,
72387        {
72388            use std::iter::Iterator;
72389            self.train_trials = v.into_iter().map(|i| i.into()).collect();
72390            self
72391        }
72392    }
72393
72394    #[cfg(feature = "job-service")]
72395    impl wkt::message::Message for MultiTrialJobOutput {
72396        fn typename() -> &'static str {
72397            "type.googleapis.com/google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput"
72398        }
72399    }
72400
72401    /// The output of this Neural Architecture Search (NAS) job.
72402    #[cfg(feature = "job-service")]
72403    #[derive(Clone, Debug, PartialEq)]
72404    #[non_exhaustive]
72405    pub enum Output {
72406        /// Output only. The output of this multi-trial Neural Architecture Search
72407        /// (NAS) job.
72408        MultiTrialJobOutput(std::boxed::Box<crate::model::nas_job_output::MultiTrialJobOutput>),
72409    }
72410}
72411
72412/// Represents a uCAIP NasJob trial.
72413#[cfg(feature = "job-service")]
72414#[derive(Clone, Default, PartialEq)]
72415#[non_exhaustive]
72416pub struct NasTrial {
72417    /// Output only. The identifier of the NasTrial assigned by the service.
72418    pub id: std::string::String,
72419
72420    /// Output only. The detailed state of the NasTrial.
72421    pub state: crate::model::nas_trial::State,
72422
72423    /// Output only. The final measurement containing the objective value.
72424    pub final_measurement: std::option::Option<crate::model::Measurement>,
72425
72426    /// Output only. Time when the NasTrial was started.
72427    pub start_time: std::option::Option<wkt::Timestamp>,
72428
72429    /// Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
72430    /// `INFEASIBLE`.
72431    pub end_time: std::option::Option<wkt::Timestamp>,
72432
72433    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
72434}
72435
72436#[cfg(feature = "job-service")]
72437impl NasTrial {
72438    pub fn new() -> Self {
72439        std::default::Default::default()
72440    }
72441
72442    /// Sets the value of [id][crate::model::NasTrial::id].
72443    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
72444        self.id = v.into();
72445        self
72446    }
72447
72448    /// Sets the value of [state][crate::model::NasTrial::state].
72449    pub fn set_state<T: std::convert::Into<crate::model::nas_trial::State>>(
72450        mut self,
72451        v: T,
72452    ) -> Self {
72453        self.state = v.into();
72454        self
72455    }
72456
72457    /// Sets the value of [final_measurement][crate::model::NasTrial::final_measurement].
72458    pub fn set_final_measurement<T>(mut self, v: T) -> Self
72459    where
72460        T: std::convert::Into<crate::model::Measurement>,
72461    {
72462        self.final_measurement = std::option::Option::Some(v.into());
72463        self
72464    }
72465
72466    /// Sets or clears the value of [final_measurement][crate::model::NasTrial::final_measurement].
72467    pub fn set_or_clear_final_measurement<T>(mut self, v: std::option::Option<T>) -> Self
72468    where
72469        T: std::convert::Into<crate::model::Measurement>,
72470    {
72471        self.final_measurement = v.map(|x| x.into());
72472        self
72473    }
72474
72475    /// Sets the value of [start_time][crate::model::NasTrial::start_time].
72476    pub fn set_start_time<T>(mut self, v: T) -> Self
72477    where
72478        T: std::convert::Into<wkt::Timestamp>,
72479    {
72480        self.start_time = std::option::Option::Some(v.into());
72481        self
72482    }
72483
72484    /// Sets or clears the value of [start_time][crate::model::NasTrial::start_time].
72485    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
72486    where
72487        T: std::convert::Into<wkt::Timestamp>,
72488    {
72489        self.start_time = v.map(|x| x.into());
72490        self
72491    }
72492
72493    /// Sets the value of [end_time][crate::model::NasTrial::end_time].
72494    pub fn set_end_time<T>(mut self, v: T) -> Self
72495    where
72496        T: std::convert::Into<wkt::Timestamp>,
72497    {
72498        self.end_time = std::option::Option::Some(v.into());
72499        self
72500    }
72501
72502    /// Sets or clears the value of [end_time][crate::model::NasTrial::end_time].
72503    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
72504    where
72505        T: std::convert::Into<wkt::Timestamp>,
72506    {
72507        self.end_time = v.map(|x| x.into());
72508        self
72509    }
72510}
72511
72512#[cfg(feature = "job-service")]
72513impl wkt::message::Message for NasTrial {
72514    fn typename() -> &'static str {
72515        "type.googleapis.com/google.cloud.aiplatform.v1.NasTrial"
72516    }
72517}
72518
72519/// Defines additional types related to [NasTrial].
72520#[cfg(feature = "job-service")]
72521pub mod nas_trial {
72522    #[allow(unused_imports)]
72523    use super::*;
72524
72525    /// Describes a NasTrial state.
72526    ///
72527    /// # Working with unknown values
72528    ///
72529    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
72530    /// additional enum variants at any time. Adding new variants is not considered
72531    /// a breaking change. Applications should write their code in anticipation of:
72532    ///
72533    /// - New values appearing in future releases of the client library, **and**
72534    /// - New values received dynamically, without application changes.
72535    ///
72536    /// Please consult the [Working with enums] section in the user guide for some
72537    /// guidelines.
72538    ///
72539    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
72540    #[cfg(feature = "job-service")]
72541    #[derive(Clone, Debug, PartialEq)]
72542    #[non_exhaustive]
72543    pub enum State {
72544        /// The NasTrial state is unspecified.
72545        Unspecified,
72546        /// Indicates that a specific NasTrial has been requested, but it has not yet
72547        /// been suggested by the service.
72548        Requested,
72549        /// Indicates that the NasTrial has been suggested.
72550        Active,
72551        /// Indicates that the NasTrial should stop according to the service.
72552        Stopping,
72553        /// Indicates that the NasTrial is completed successfully.
72554        Succeeded,
72555        /// Indicates that the NasTrial should not be attempted again.
72556        /// The service will set a NasTrial to INFEASIBLE when it's done but missing
72557        /// the final_measurement.
72558        Infeasible,
72559        /// If set, the enum was initialized with an unknown value.
72560        ///
72561        /// Applications can examine the value using [State::value] or
72562        /// [State::name].
72563        UnknownValue(state::UnknownValue),
72564    }
72565
72566    #[doc(hidden)]
72567    #[cfg(feature = "job-service")]
72568    pub mod state {
72569        #[allow(unused_imports)]
72570        use super::*;
72571        #[derive(Clone, Debug, PartialEq)]
72572        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
72573    }
72574
72575    #[cfg(feature = "job-service")]
72576    impl State {
72577        /// Gets the enum value.
72578        ///
72579        /// Returns `None` if the enum contains an unknown value deserialized from
72580        /// the string representation of enums.
72581        pub fn value(&self) -> std::option::Option<i32> {
72582            match self {
72583                Self::Unspecified => std::option::Option::Some(0),
72584                Self::Requested => std::option::Option::Some(1),
72585                Self::Active => std::option::Option::Some(2),
72586                Self::Stopping => std::option::Option::Some(3),
72587                Self::Succeeded => std::option::Option::Some(4),
72588                Self::Infeasible => std::option::Option::Some(5),
72589                Self::UnknownValue(u) => u.0.value(),
72590            }
72591        }
72592
72593        /// Gets the enum value as a string.
72594        ///
72595        /// Returns `None` if the enum contains an unknown value deserialized from
72596        /// the integer representation of enums.
72597        pub fn name(&self) -> std::option::Option<&str> {
72598            match self {
72599                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
72600                Self::Requested => std::option::Option::Some("REQUESTED"),
72601                Self::Active => std::option::Option::Some("ACTIVE"),
72602                Self::Stopping => std::option::Option::Some("STOPPING"),
72603                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
72604                Self::Infeasible => std::option::Option::Some("INFEASIBLE"),
72605                Self::UnknownValue(u) => u.0.name(),
72606            }
72607        }
72608    }
72609
72610    #[cfg(feature = "job-service")]
72611    impl std::default::Default for State {
72612        fn default() -> Self {
72613            use std::convert::From;
72614            Self::from(0)
72615        }
72616    }
72617
72618    #[cfg(feature = "job-service")]
72619    impl std::fmt::Display for State {
72620        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
72621            wkt::internal::display_enum(f, self.name(), self.value())
72622        }
72623    }
72624
72625    #[cfg(feature = "job-service")]
72626    impl std::convert::From<i32> for State {
72627        fn from(value: i32) -> Self {
72628            match value {
72629                0 => Self::Unspecified,
72630                1 => Self::Requested,
72631                2 => Self::Active,
72632                3 => Self::Stopping,
72633                4 => Self::Succeeded,
72634                5 => Self::Infeasible,
72635                _ => Self::UnknownValue(state::UnknownValue(
72636                    wkt::internal::UnknownEnumValue::Integer(value),
72637                )),
72638            }
72639        }
72640    }
72641
72642    #[cfg(feature = "job-service")]
72643    impl std::convert::From<&str> for State {
72644        fn from(value: &str) -> Self {
72645            use std::string::ToString;
72646            match value {
72647                "STATE_UNSPECIFIED" => Self::Unspecified,
72648                "REQUESTED" => Self::Requested,
72649                "ACTIVE" => Self::Active,
72650                "STOPPING" => Self::Stopping,
72651                "SUCCEEDED" => Self::Succeeded,
72652                "INFEASIBLE" => Self::Infeasible,
72653                _ => Self::UnknownValue(state::UnknownValue(
72654                    wkt::internal::UnknownEnumValue::String(value.to_string()),
72655                )),
72656            }
72657        }
72658    }
72659
72660    #[cfg(feature = "job-service")]
72661    impl serde::ser::Serialize for State {
72662        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
72663        where
72664            S: serde::Serializer,
72665        {
72666            match self {
72667                Self::Unspecified => serializer.serialize_i32(0),
72668                Self::Requested => serializer.serialize_i32(1),
72669                Self::Active => serializer.serialize_i32(2),
72670                Self::Stopping => serializer.serialize_i32(3),
72671                Self::Succeeded => serializer.serialize_i32(4),
72672                Self::Infeasible => serializer.serialize_i32(5),
72673                Self::UnknownValue(u) => u.0.serialize(serializer),
72674            }
72675        }
72676    }
72677
72678    #[cfg(feature = "job-service")]
72679    impl<'de> serde::de::Deserialize<'de> for State {
72680        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
72681        where
72682            D: serde::Deserializer<'de>,
72683        {
72684            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
72685                ".google.cloud.aiplatform.v1.NasTrial.State",
72686            ))
72687        }
72688    }
72689}
72690
72691/// Network spec.
72692#[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
72693#[derive(Clone, Default, PartialEq)]
72694#[non_exhaustive]
72695pub struct NetworkSpec {
72696    /// Whether to enable public internet access. Default false.
72697    pub enable_internet_access: bool,
72698
72699    /// The full name of the Google Compute Engine
72700    /// [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
72701    pub network: std::string::String,
72702
72703    /// The name of the subnet that this instance is in.
72704    /// Format:
72705    /// `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`
72706    pub subnetwork: std::string::String,
72707
72708    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
72709}
72710
72711#[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
72712impl NetworkSpec {
72713    pub fn new() -> Self {
72714        std::default::Default::default()
72715    }
72716
72717    /// Sets the value of [enable_internet_access][crate::model::NetworkSpec::enable_internet_access].
72718    pub fn set_enable_internet_access<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
72719        self.enable_internet_access = v.into();
72720        self
72721    }
72722
72723    /// Sets the value of [network][crate::model::NetworkSpec::network].
72724    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
72725        self.network = v.into();
72726        self
72727    }
72728
72729    /// Sets the value of [subnetwork][crate::model::NetworkSpec::subnetwork].
72730    pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
72731        self.subnetwork = v.into();
72732        self
72733    }
72734}
72735
72736#[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
72737impl wkt::message::Message for NetworkSpec {
72738    fn typename() -> &'static str {
72739        "type.googleapis.com/google.cloud.aiplatform.v1.NetworkSpec"
72740    }
72741}
72742
72743/// The euc configuration of NotebookRuntimeTemplate.
72744#[cfg(feature = "notebook-service")]
72745#[derive(Clone, Default, PartialEq)]
72746#[non_exhaustive]
72747pub struct NotebookEucConfig {
72748    /// Input only. Whether EUC is disabled in this NotebookRuntimeTemplate.
72749    /// In proto3, the default value of a boolean is false. In this way, by default
72750    /// EUC will be enabled for NotebookRuntimeTemplate.
72751    pub euc_disabled: bool,
72752
72753    /// Output only. Whether ActAs check is bypassed for service account attached
72754    /// to the VM. If false, we need ActAs check for the default Compute Engine
72755    /// Service account. When a Runtime is created, a VM is allocated using Default
72756    /// Compute Engine Service Account. Any user requesting to use this Runtime
72757    /// requires Service Account User (ActAs) permission over this SA. If true,
72758    /// Runtime owner is using EUC and does not require the above permission as VM
72759    /// no longer use default Compute Engine SA, but a P4SA.
72760    pub bypass_actas_check: bool,
72761
72762    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
72763}
72764
72765#[cfg(feature = "notebook-service")]
72766impl NotebookEucConfig {
72767    pub fn new() -> Self {
72768        std::default::Default::default()
72769    }
72770
72771    /// Sets the value of [euc_disabled][crate::model::NotebookEucConfig::euc_disabled].
72772    pub fn set_euc_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
72773        self.euc_disabled = v.into();
72774        self
72775    }
72776
72777    /// Sets the value of [bypass_actas_check][crate::model::NotebookEucConfig::bypass_actas_check].
72778    pub fn set_bypass_actas_check<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
72779        self.bypass_actas_check = v.into();
72780        self
72781    }
72782}
72783
72784#[cfg(feature = "notebook-service")]
72785impl wkt::message::Message for NotebookEucConfig {
72786    fn typename() -> &'static str {
72787        "type.googleapis.com/google.cloud.aiplatform.v1.NotebookEucConfig"
72788    }
72789}
72790
72791/// NotebookExecutionJob represents an instance of a notebook execution.
72792#[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
72793#[derive(Clone, Default, PartialEq)]
72794#[non_exhaustive]
72795pub struct NotebookExecutionJob {
72796    /// Output only. The resource name of this NotebookExecutionJob. Format:
72797    /// `projects/{project_id}/locations/{location}/notebookExecutionJobs/{job_id}`
72798    pub name: std::string::String,
72799
72800    /// The display name of the NotebookExecutionJob. The name can be up to 128
72801    /// characters long and can consist of any UTF-8 characters.
72802    pub display_name: std::string::String,
72803
72804    /// Max running time of the execution job in seconds (default 86400s / 24 hrs).
72805    pub execution_timeout: std::option::Option<wkt::Duration>,
72806
72807    /// The Schedule resource name if this job is triggered by one. Format:
72808    /// `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
72809    pub schedule_resource_name: std::string::String,
72810
72811    /// Output only. The state of the NotebookExecutionJob.
72812    pub job_state: crate::model::JobState,
72813
72814    /// Output only. Populated when the NotebookExecutionJob is completed. When
72815    /// there is an error during notebook execution, the error details are
72816    /// populated.
72817    pub status: std::option::Option<rpc::model::Status>,
72818
72819    /// Output only. Timestamp when this NotebookExecutionJob was created.
72820    pub create_time: std::option::Option<wkt::Timestamp>,
72821
72822    /// Output only. Timestamp when this NotebookExecutionJob was most recently
72823    /// updated.
72824    pub update_time: std::option::Option<wkt::Timestamp>,
72825
72826    /// The labels with user-defined metadata to organize NotebookExecutionJobs.
72827    ///
72828    /// Label keys and values can be no longer than 64 characters
72829    /// (Unicode codepoints), can only contain lowercase letters, numeric
72830    /// characters, underscores and dashes. International characters are allowed.
72831    ///
72832    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
72833    /// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
72834    /// and are immutable.
72835    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
72836
72837    /// The name of the kernel to use during notebook execution. If unset, the
72838    /// default kernel is used.
72839    pub kernel_name: std::string::String,
72840
72841    /// Customer-managed encryption key spec for the notebook execution job.
72842    /// This field is auto-populated if the
72843    /// [NotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookRuntimeTemplate]
72844    /// has an encryption spec.
72845    ///
72846    /// [google.cloud.aiplatform.v1.NotebookRuntimeTemplate]: crate::model::NotebookRuntimeTemplate
72847    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
72848
72849    /// The input notebook.
72850    pub notebook_source: std::option::Option<crate::model::notebook_execution_job::NotebookSource>,
72851
72852    /// The compute config to use for an execution job.
72853    pub environment_spec:
72854        std::option::Option<crate::model::notebook_execution_job::EnvironmentSpec>,
72855
72856    /// The location to store the notebook execution result.
72857    pub execution_sink: std::option::Option<crate::model::notebook_execution_job::ExecutionSink>,
72858
72859    /// The identity to run the execution as.
72860    pub execution_identity:
72861        std::option::Option<crate::model::notebook_execution_job::ExecutionIdentity>,
72862
72863    /// Runtime environment for the notebook execution job. If unspecified, the
72864    /// default runtime of Colab is used.
72865    pub runtime_environment:
72866        std::option::Option<crate::model::notebook_execution_job::RuntimeEnvironment>,
72867
72868    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
72869}
72870
72871#[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
72872impl NotebookExecutionJob {
72873    pub fn new() -> Self {
72874        std::default::Default::default()
72875    }
72876
72877    /// Sets the value of [name][crate::model::NotebookExecutionJob::name].
72878    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
72879        self.name = v.into();
72880        self
72881    }
72882
72883    /// Sets the value of [display_name][crate::model::NotebookExecutionJob::display_name].
72884    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
72885        self.display_name = v.into();
72886        self
72887    }
72888
72889    /// Sets the value of [execution_timeout][crate::model::NotebookExecutionJob::execution_timeout].
72890    pub fn set_execution_timeout<T>(mut self, v: T) -> Self
72891    where
72892        T: std::convert::Into<wkt::Duration>,
72893    {
72894        self.execution_timeout = std::option::Option::Some(v.into());
72895        self
72896    }
72897
72898    /// Sets or clears the value of [execution_timeout][crate::model::NotebookExecutionJob::execution_timeout].
72899    pub fn set_or_clear_execution_timeout<T>(mut self, v: std::option::Option<T>) -> Self
72900    where
72901        T: std::convert::Into<wkt::Duration>,
72902    {
72903        self.execution_timeout = v.map(|x| x.into());
72904        self
72905    }
72906
72907    /// Sets the value of [schedule_resource_name][crate::model::NotebookExecutionJob::schedule_resource_name].
72908    pub fn set_schedule_resource_name<T: std::convert::Into<std::string::String>>(
72909        mut self,
72910        v: T,
72911    ) -> Self {
72912        self.schedule_resource_name = v.into();
72913        self
72914    }
72915
72916    /// Sets the value of [job_state][crate::model::NotebookExecutionJob::job_state].
72917    pub fn set_job_state<T: std::convert::Into<crate::model::JobState>>(mut self, v: T) -> Self {
72918        self.job_state = v.into();
72919        self
72920    }
72921
72922    /// Sets the value of [status][crate::model::NotebookExecutionJob::status].
72923    pub fn set_status<T>(mut self, v: T) -> Self
72924    where
72925        T: std::convert::Into<rpc::model::Status>,
72926    {
72927        self.status = std::option::Option::Some(v.into());
72928        self
72929    }
72930
72931    /// Sets or clears the value of [status][crate::model::NotebookExecutionJob::status].
72932    pub fn set_or_clear_status<T>(mut self, v: std::option::Option<T>) -> Self
72933    where
72934        T: std::convert::Into<rpc::model::Status>,
72935    {
72936        self.status = v.map(|x| x.into());
72937        self
72938    }
72939
72940    /// Sets the value of [create_time][crate::model::NotebookExecutionJob::create_time].
72941    pub fn set_create_time<T>(mut self, v: T) -> Self
72942    where
72943        T: std::convert::Into<wkt::Timestamp>,
72944    {
72945        self.create_time = std::option::Option::Some(v.into());
72946        self
72947    }
72948
72949    /// Sets or clears the value of [create_time][crate::model::NotebookExecutionJob::create_time].
72950    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
72951    where
72952        T: std::convert::Into<wkt::Timestamp>,
72953    {
72954        self.create_time = v.map(|x| x.into());
72955        self
72956    }
72957
72958    /// Sets the value of [update_time][crate::model::NotebookExecutionJob::update_time].
72959    pub fn set_update_time<T>(mut self, v: T) -> Self
72960    where
72961        T: std::convert::Into<wkt::Timestamp>,
72962    {
72963        self.update_time = std::option::Option::Some(v.into());
72964        self
72965    }
72966
72967    /// Sets or clears the value of [update_time][crate::model::NotebookExecutionJob::update_time].
72968    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
72969    where
72970        T: std::convert::Into<wkt::Timestamp>,
72971    {
72972        self.update_time = v.map(|x| x.into());
72973        self
72974    }
72975
72976    /// Sets the value of [labels][crate::model::NotebookExecutionJob::labels].
72977    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
72978    where
72979        T: std::iter::IntoIterator<Item = (K, V)>,
72980        K: std::convert::Into<std::string::String>,
72981        V: std::convert::Into<std::string::String>,
72982    {
72983        use std::iter::Iterator;
72984        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
72985        self
72986    }
72987
72988    /// Sets the value of [kernel_name][crate::model::NotebookExecutionJob::kernel_name].
72989    pub fn set_kernel_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
72990        self.kernel_name = v.into();
72991        self
72992    }
72993
72994    /// Sets the value of [encryption_spec][crate::model::NotebookExecutionJob::encryption_spec].
72995    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
72996    where
72997        T: std::convert::Into<crate::model::EncryptionSpec>,
72998    {
72999        self.encryption_spec = std::option::Option::Some(v.into());
73000        self
73001    }
73002
73003    /// Sets or clears the value of [encryption_spec][crate::model::NotebookExecutionJob::encryption_spec].
73004    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
73005    where
73006        T: std::convert::Into<crate::model::EncryptionSpec>,
73007    {
73008        self.encryption_spec = v.map(|x| x.into());
73009        self
73010    }
73011
73012    /// Sets the value of [notebook_source][crate::model::NotebookExecutionJob::notebook_source].
73013    ///
73014    /// Note that all the setters affecting `notebook_source` are mutually
73015    /// exclusive.
73016    pub fn set_notebook_source<
73017        T: std::convert::Into<
73018                std::option::Option<crate::model::notebook_execution_job::NotebookSource>,
73019            >,
73020    >(
73021        mut self,
73022        v: T,
73023    ) -> Self {
73024        self.notebook_source = v.into();
73025        self
73026    }
73027
73028    /// The value of [notebook_source][crate::model::NotebookExecutionJob::notebook_source]
73029    /// if it holds a `DataformRepositorySource`, `None` if the field is not set or
73030    /// holds a different branch.
73031    pub fn dataform_repository_source(
73032        &self,
73033    ) -> std::option::Option<
73034        &std::boxed::Box<crate::model::notebook_execution_job::DataformRepositorySource>,
73035    > {
73036        #[allow(unreachable_patterns)]
73037        self.notebook_source.as_ref().and_then(|v| match v {
73038            crate::model::notebook_execution_job::NotebookSource::DataformRepositorySource(v) => {
73039                std::option::Option::Some(v)
73040            }
73041            _ => std::option::Option::None,
73042        })
73043    }
73044
73045    /// Sets the value of [notebook_source][crate::model::NotebookExecutionJob::notebook_source]
73046    /// to hold a `DataformRepositorySource`.
73047    ///
73048    /// Note that all the setters affecting `notebook_source` are
73049    /// mutually exclusive.
73050    pub fn set_dataform_repository_source<
73051        T: std::convert::Into<
73052                std::boxed::Box<crate::model::notebook_execution_job::DataformRepositorySource>,
73053            >,
73054    >(
73055        mut self,
73056        v: T,
73057    ) -> Self {
73058        self.notebook_source = std::option::Option::Some(
73059            crate::model::notebook_execution_job::NotebookSource::DataformRepositorySource(
73060                v.into(),
73061            ),
73062        );
73063        self
73064    }
73065
73066    /// The value of [notebook_source][crate::model::NotebookExecutionJob::notebook_source]
73067    /// if it holds a `GcsNotebookSource`, `None` if the field is not set or
73068    /// holds a different branch.
73069    pub fn gcs_notebook_source(
73070        &self,
73071    ) -> std::option::Option<
73072        &std::boxed::Box<crate::model::notebook_execution_job::GcsNotebookSource>,
73073    > {
73074        #[allow(unreachable_patterns)]
73075        self.notebook_source.as_ref().and_then(|v| match v {
73076            crate::model::notebook_execution_job::NotebookSource::GcsNotebookSource(v) => {
73077                std::option::Option::Some(v)
73078            }
73079            _ => std::option::Option::None,
73080        })
73081    }
73082
73083    /// Sets the value of [notebook_source][crate::model::NotebookExecutionJob::notebook_source]
73084    /// to hold a `GcsNotebookSource`.
73085    ///
73086    /// Note that all the setters affecting `notebook_source` are
73087    /// mutually exclusive.
73088    pub fn set_gcs_notebook_source<
73089        T: std::convert::Into<
73090                std::boxed::Box<crate::model::notebook_execution_job::GcsNotebookSource>,
73091            >,
73092    >(
73093        mut self,
73094        v: T,
73095    ) -> Self {
73096        self.notebook_source = std::option::Option::Some(
73097            crate::model::notebook_execution_job::NotebookSource::GcsNotebookSource(v.into()),
73098        );
73099        self
73100    }
73101
73102    /// The value of [notebook_source][crate::model::NotebookExecutionJob::notebook_source]
73103    /// if it holds a `DirectNotebookSource`, `None` if the field is not set or
73104    /// holds a different branch.
73105    pub fn direct_notebook_source(
73106        &self,
73107    ) -> std::option::Option<
73108        &std::boxed::Box<crate::model::notebook_execution_job::DirectNotebookSource>,
73109    > {
73110        #[allow(unreachable_patterns)]
73111        self.notebook_source.as_ref().and_then(|v| match v {
73112            crate::model::notebook_execution_job::NotebookSource::DirectNotebookSource(v) => {
73113                std::option::Option::Some(v)
73114            }
73115            _ => std::option::Option::None,
73116        })
73117    }
73118
73119    /// Sets the value of [notebook_source][crate::model::NotebookExecutionJob::notebook_source]
73120    /// to hold a `DirectNotebookSource`.
73121    ///
73122    /// Note that all the setters affecting `notebook_source` are
73123    /// mutually exclusive.
73124    pub fn set_direct_notebook_source<
73125        T: std::convert::Into<
73126                std::boxed::Box<crate::model::notebook_execution_job::DirectNotebookSource>,
73127            >,
73128    >(
73129        mut self,
73130        v: T,
73131    ) -> Self {
73132        self.notebook_source = std::option::Option::Some(
73133            crate::model::notebook_execution_job::NotebookSource::DirectNotebookSource(v.into()),
73134        );
73135        self
73136    }
73137
73138    /// Sets the value of [environment_spec][crate::model::NotebookExecutionJob::environment_spec].
73139    ///
73140    /// Note that all the setters affecting `environment_spec` are mutually
73141    /// exclusive.
73142    pub fn set_environment_spec<
73143        T: std::convert::Into<
73144                std::option::Option<crate::model::notebook_execution_job::EnvironmentSpec>,
73145            >,
73146    >(
73147        mut self,
73148        v: T,
73149    ) -> Self {
73150        self.environment_spec = v.into();
73151        self
73152    }
73153
73154    /// The value of [environment_spec][crate::model::NotebookExecutionJob::environment_spec]
73155    /// if it holds a `NotebookRuntimeTemplateResourceName`, `None` if the field is not set or
73156    /// holds a different branch.
73157    pub fn notebook_runtime_template_resource_name(
73158        &self,
73159    ) -> std::option::Option<&std::string::String> {
73160        #[allow(unreachable_patterns)]
73161        self.environment_spec.as_ref().and_then(|v| match v {
73162            crate::model::notebook_execution_job::EnvironmentSpec::NotebookRuntimeTemplateResourceName(v) => std::option::Option::Some(v),
73163            _ => std::option::Option::None,
73164        })
73165    }
73166
73167    /// Sets the value of [environment_spec][crate::model::NotebookExecutionJob::environment_spec]
73168    /// to hold a `NotebookRuntimeTemplateResourceName`.
73169    ///
73170    /// Note that all the setters affecting `environment_spec` are
73171    /// mutually exclusive.
73172    pub fn set_notebook_runtime_template_resource_name<
73173        T: std::convert::Into<std::string::String>,
73174    >(
73175        mut self,
73176        v: T,
73177    ) -> Self {
73178        self.environment_spec = std::option::Option::Some(
73179            crate::model::notebook_execution_job::EnvironmentSpec::NotebookRuntimeTemplateResourceName(
73180                v.into()
73181            )
73182        );
73183        self
73184    }
73185
73186    /// The value of [environment_spec][crate::model::NotebookExecutionJob::environment_spec]
73187    /// if it holds a `CustomEnvironmentSpec`, `None` if the field is not set or
73188    /// holds a different branch.
73189    pub fn custom_environment_spec(
73190        &self,
73191    ) -> std::option::Option<
73192        &std::boxed::Box<crate::model::notebook_execution_job::CustomEnvironmentSpec>,
73193    > {
73194        #[allow(unreachable_patterns)]
73195        self.environment_spec.as_ref().and_then(|v| match v {
73196            crate::model::notebook_execution_job::EnvironmentSpec::CustomEnvironmentSpec(v) => {
73197                std::option::Option::Some(v)
73198            }
73199            _ => std::option::Option::None,
73200        })
73201    }
73202
73203    /// Sets the value of [environment_spec][crate::model::NotebookExecutionJob::environment_spec]
73204    /// to hold a `CustomEnvironmentSpec`.
73205    ///
73206    /// Note that all the setters affecting `environment_spec` are
73207    /// mutually exclusive.
73208    pub fn set_custom_environment_spec<
73209        T: std::convert::Into<
73210                std::boxed::Box<crate::model::notebook_execution_job::CustomEnvironmentSpec>,
73211            >,
73212    >(
73213        mut self,
73214        v: T,
73215    ) -> Self {
73216        self.environment_spec = std::option::Option::Some(
73217            crate::model::notebook_execution_job::EnvironmentSpec::CustomEnvironmentSpec(v.into()),
73218        );
73219        self
73220    }
73221
73222    /// Sets the value of [execution_sink][crate::model::NotebookExecutionJob::execution_sink].
73223    ///
73224    /// Note that all the setters affecting `execution_sink` are mutually
73225    /// exclusive.
73226    pub fn set_execution_sink<
73227        T: std::convert::Into<
73228                std::option::Option<crate::model::notebook_execution_job::ExecutionSink>,
73229            >,
73230    >(
73231        mut self,
73232        v: T,
73233    ) -> Self {
73234        self.execution_sink = v.into();
73235        self
73236    }
73237
73238    /// The value of [execution_sink][crate::model::NotebookExecutionJob::execution_sink]
73239    /// if it holds a `GcsOutputUri`, `None` if the field is not set or
73240    /// holds a different branch.
73241    pub fn gcs_output_uri(&self) -> std::option::Option<&std::string::String> {
73242        #[allow(unreachable_patterns)]
73243        self.execution_sink.as_ref().and_then(|v| match v {
73244            crate::model::notebook_execution_job::ExecutionSink::GcsOutputUri(v) => {
73245                std::option::Option::Some(v)
73246            }
73247            _ => std::option::Option::None,
73248        })
73249    }
73250
73251    /// Sets the value of [execution_sink][crate::model::NotebookExecutionJob::execution_sink]
73252    /// to hold a `GcsOutputUri`.
73253    ///
73254    /// Note that all the setters affecting `execution_sink` are
73255    /// mutually exclusive.
73256    pub fn set_gcs_output_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
73257        self.execution_sink = std::option::Option::Some(
73258            crate::model::notebook_execution_job::ExecutionSink::GcsOutputUri(v.into()),
73259        );
73260        self
73261    }
73262
73263    /// Sets the value of [execution_identity][crate::model::NotebookExecutionJob::execution_identity].
73264    ///
73265    /// Note that all the setters affecting `execution_identity` are mutually
73266    /// exclusive.
73267    pub fn set_execution_identity<
73268        T: std::convert::Into<
73269                std::option::Option<crate::model::notebook_execution_job::ExecutionIdentity>,
73270            >,
73271    >(
73272        mut self,
73273        v: T,
73274    ) -> Self {
73275        self.execution_identity = v.into();
73276        self
73277    }
73278
73279    /// The value of [execution_identity][crate::model::NotebookExecutionJob::execution_identity]
73280    /// if it holds a `ExecutionUser`, `None` if the field is not set or
73281    /// holds a different branch.
73282    pub fn execution_user(&self) -> std::option::Option<&std::string::String> {
73283        #[allow(unreachable_patterns)]
73284        self.execution_identity.as_ref().and_then(|v| match v {
73285            crate::model::notebook_execution_job::ExecutionIdentity::ExecutionUser(v) => {
73286                std::option::Option::Some(v)
73287            }
73288            _ => std::option::Option::None,
73289        })
73290    }
73291
73292    /// Sets the value of [execution_identity][crate::model::NotebookExecutionJob::execution_identity]
73293    /// to hold a `ExecutionUser`.
73294    ///
73295    /// Note that all the setters affecting `execution_identity` are
73296    /// mutually exclusive.
73297    pub fn set_execution_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
73298        self.execution_identity = std::option::Option::Some(
73299            crate::model::notebook_execution_job::ExecutionIdentity::ExecutionUser(v.into()),
73300        );
73301        self
73302    }
73303
73304    /// The value of [execution_identity][crate::model::NotebookExecutionJob::execution_identity]
73305    /// if it holds a `ServiceAccount`, `None` if the field is not set or
73306    /// holds a different branch.
73307    pub fn service_account(&self) -> std::option::Option<&std::string::String> {
73308        #[allow(unreachable_patterns)]
73309        self.execution_identity.as_ref().and_then(|v| match v {
73310            crate::model::notebook_execution_job::ExecutionIdentity::ServiceAccount(v) => {
73311                std::option::Option::Some(v)
73312            }
73313            _ => std::option::Option::None,
73314        })
73315    }
73316
73317    /// Sets the value of [execution_identity][crate::model::NotebookExecutionJob::execution_identity]
73318    /// to hold a `ServiceAccount`.
73319    ///
73320    /// Note that all the setters affecting `execution_identity` are
73321    /// mutually exclusive.
73322    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
73323        self.execution_identity = std::option::Option::Some(
73324            crate::model::notebook_execution_job::ExecutionIdentity::ServiceAccount(v.into()),
73325        );
73326        self
73327    }
73328
73329    /// Sets the value of [runtime_environment][crate::model::NotebookExecutionJob::runtime_environment].
73330    ///
73331    /// Note that all the setters affecting `runtime_environment` are mutually
73332    /// exclusive.
73333    pub fn set_runtime_environment<
73334        T: std::convert::Into<
73335                std::option::Option<crate::model::notebook_execution_job::RuntimeEnvironment>,
73336            >,
73337    >(
73338        mut self,
73339        v: T,
73340    ) -> Self {
73341        self.runtime_environment = v.into();
73342        self
73343    }
73344
73345    /// The value of [runtime_environment][crate::model::NotebookExecutionJob::runtime_environment]
73346    /// if it holds a `WorkbenchRuntime`, `None` if the field is not set or
73347    /// holds a different branch.
73348    pub fn workbench_runtime(
73349        &self,
73350    ) -> std::option::Option<&std::boxed::Box<crate::model::notebook_execution_job::WorkbenchRuntime>>
73351    {
73352        #[allow(unreachable_patterns)]
73353        self.runtime_environment.as_ref().and_then(|v| match v {
73354            crate::model::notebook_execution_job::RuntimeEnvironment::WorkbenchRuntime(v) => {
73355                std::option::Option::Some(v)
73356            }
73357            _ => std::option::Option::None,
73358        })
73359    }
73360
73361    /// Sets the value of [runtime_environment][crate::model::NotebookExecutionJob::runtime_environment]
73362    /// to hold a `WorkbenchRuntime`.
73363    ///
73364    /// Note that all the setters affecting `runtime_environment` are
73365    /// mutually exclusive.
73366    pub fn set_workbench_runtime<
73367        T: std::convert::Into<std::boxed::Box<crate::model::notebook_execution_job::WorkbenchRuntime>>,
73368    >(
73369        mut self,
73370        v: T,
73371    ) -> Self {
73372        self.runtime_environment = std::option::Option::Some(
73373            crate::model::notebook_execution_job::RuntimeEnvironment::WorkbenchRuntime(v.into()),
73374        );
73375        self
73376    }
73377}
73378
73379#[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73380impl wkt::message::Message for NotebookExecutionJob {
73381    fn typename() -> &'static str {
73382        "type.googleapis.com/google.cloud.aiplatform.v1.NotebookExecutionJob"
73383    }
73384}
73385
73386/// Defines additional types related to [NotebookExecutionJob].
73387#[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73388pub mod notebook_execution_job {
73389    #[allow(unused_imports)]
73390    use super::*;
73391
73392    /// The Dataform Repository containing the input notebook.
73393    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73394    #[derive(Clone, Default, PartialEq)]
73395    #[non_exhaustive]
73396    pub struct DataformRepositorySource {
73397        /// The resource name of the Dataform Repository. Format:
73398        /// `projects/{project_id}/locations/{location}/repositories/{repository_id}`
73399        pub dataform_repository_resource_name: std::string::String,
73400
73401        /// The commit SHA to read repository with. If unset, the file will be read
73402        /// at HEAD.
73403        pub commit_sha: std::string::String,
73404
73405        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
73406    }
73407
73408    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73409    impl DataformRepositorySource {
73410        pub fn new() -> Self {
73411            std::default::Default::default()
73412        }
73413
73414        /// Sets the value of [dataform_repository_resource_name][crate::model::notebook_execution_job::DataformRepositorySource::dataform_repository_resource_name].
73415        pub fn set_dataform_repository_resource_name<T: std::convert::Into<std::string::String>>(
73416            mut self,
73417            v: T,
73418        ) -> Self {
73419            self.dataform_repository_resource_name = v.into();
73420            self
73421        }
73422
73423        /// Sets the value of [commit_sha][crate::model::notebook_execution_job::DataformRepositorySource::commit_sha].
73424        pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
73425            self.commit_sha = v.into();
73426            self
73427        }
73428    }
73429
73430    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73431    impl wkt::message::Message for DataformRepositorySource {
73432        fn typename() -> &'static str {
73433            "type.googleapis.com/google.cloud.aiplatform.v1.NotebookExecutionJob.DataformRepositorySource"
73434        }
73435    }
73436
73437    /// The Cloud Storage uri for the input notebook.
73438    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73439    #[derive(Clone, Default, PartialEq)]
73440    #[non_exhaustive]
73441    pub struct GcsNotebookSource {
73442        /// The Cloud Storage uri pointing to the ipynb file. Format:
73443        /// `gs://bucket/notebook_file.ipynb`
73444        pub uri: std::string::String,
73445
73446        /// The version of the Cloud Storage object to read. If unset, the current
73447        /// version of the object is read. See
73448        /// <https://cloud.google.com/storage/docs/metadata#generation-number>.
73449        pub generation: std::string::String,
73450
73451        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
73452    }
73453
73454    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73455    impl GcsNotebookSource {
73456        pub fn new() -> Self {
73457            std::default::Default::default()
73458        }
73459
73460        /// Sets the value of [uri][crate::model::notebook_execution_job::GcsNotebookSource::uri].
73461        pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
73462            self.uri = v.into();
73463            self
73464        }
73465
73466        /// Sets the value of [generation][crate::model::notebook_execution_job::GcsNotebookSource::generation].
73467        pub fn set_generation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
73468            self.generation = v.into();
73469            self
73470        }
73471    }
73472
73473    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73474    impl wkt::message::Message for GcsNotebookSource {
73475        fn typename() -> &'static str {
73476            "type.googleapis.com/google.cloud.aiplatform.v1.NotebookExecutionJob.GcsNotebookSource"
73477        }
73478    }
73479
73480    /// The content of the input notebook in ipynb format.
73481    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73482    #[derive(Clone, Default, PartialEq)]
73483    #[non_exhaustive]
73484    pub struct DirectNotebookSource {
73485        /// The base64-encoded contents of the input notebook file.
73486        pub content: ::bytes::Bytes,
73487
73488        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
73489    }
73490
73491    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73492    impl DirectNotebookSource {
73493        pub fn new() -> Self {
73494            std::default::Default::default()
73495        }
73496
73497        /// Sets the value of [content][crate::model::notebook_execution_job::DirectNotebookSource::content].
73498        pub fn set_content<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
73499            self.content = v.into();
73500            self
73501        }
73502    }
73503
73504    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73505    impl wkt::message::Message for DirectNotebookSource {
73506        fn typename() -> &'static str {
73507            "type.googleapis.com/google.cloud.aiplatform.v1.NotebookExecutionJob.DirectNotebookSource"
73508        }
73509    }
73510
73511    /// Compute configuration to use for an execution job.
73512    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73513    #[derive(Clone, Default, PartialEq)]
73514    #[non_exhaustive]
73515    pub struct CustomEnvironmentSpec {
73516        /// The specification of a single machine for the execution job.
73517        pub machine_spec: std::option::Option<crate::model::MachineSpec>,
73518
73519        /// The specification of a persistent disk to attach for the execution job.
73520        pub persistent_disk_spec: std::option::Option<crate::model::PersistentDiskSpec>,
73521
73522        /// The network configuration to use for the execution job.
73523        pub network_spec: std::option::Option<crate::model::NetworkSpec>,
73524
73525        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
73526    }
73527
73528    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73529    impl CustomEnvironmentSpec {
73530        pub fn new() -> Self {
73531            std::default::Default::default()
73532        }
73533
73534        /// Sets the value of [machine_spec][crate::model::notebook_execution_job::CustomEnvironmentSpec::machine_spec].
73535        pub fn set_machine_spec<T>(mut self, v: T) -> Self
73536        where
73537            T: std::convert::Into<crate::model::MachineSpec>,
73538        {
73539            self.machine_spec = std::option::Option::Some(v.into());
73540            self
73541        }
73542
73543        /// Sets or clears the value of [machine_spec][crate::model::notebook_execution_job::CustomEnvironmentSpec::machine_spec].
73544        pub fn set_or_clear_machine_spec<T>(mut self, v: std::option::Option<T>) -> Self
73545        where
73546            T: std::convert::Into<crate::model::MachineSpec>,
73547        {
73548            self.machine_spec = v.map(|x| x.into());
73549            self
73550        }
73551
73552        /// Sets the value of [persistent_disk_spec][crate::model::notebook_execution_job::CustomEnvironmentSpec::persistent_disk_spec].
73553        pub fn set_persistent_disk_spec<T>(mut self, v: T) -> Self
73554        where
73555            T: std::convert::Into<crate::model::PersistentDiskSpec>,
73556        {
73557            self.persistent_disk_spec = std::option::Option::Some(v.into());
73558            self
73559        }
73560
73561        /// Sets or clears the value of [persistent_disk_spec][crate::model::notebook_execution_job::CustomEnvironmentSpec::persistent_disk_spec].
73562        pub fn set_or_clear_persistent_disk_spec<T>(mut self, v: std::option::Option<T>) -> Self
73563        where
73564            T: std::convert::Into<crate::model::PersistentDiskSpec>,
73565        {
73566            self.persistent_disk_spec = v.map(|x| x.into());
73567            self
73568        }
73569
73570        /// Sets the value of [network_spec][crate::model::notebook_execution_job::CustomEnvironmentSpec::network_spec].
73571        pub fn set_network_spec<T>(mut self, v: T) -> Self
73572        where
73573            T: std::convert::Into<crate::model::NetworkSpec>,
73574        {
73575            self.network_spec = std::option::Option::Some(v.into());
73576            self
73577        }
73578
73579        /// Sets or clears the value of [network_spec][crate::model::notebook_execution_job::CustomEnvironmentSpec::network_spec].
73580        pub fn set_or_clear_network_spec<T>(mut self, v: std::option::Option<T>) -> Self
73581        where
73582            T: std::convert::Into<crate::model::NetworkSpec>,
73583        {
73584            self.network_spec = v.map(|x| x.into());
73585            self
73586        }
73587    }
73588
73589    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73590    impl wkt::message::Message for CustomEnvironmentSpec {
73591        fn typename() -> &'static str {
73592            "type.googleapis.com/google.cloud.aiplatform.v1.NotebookExecutionJob.CustomEnvironmentSpec"
73593        }
73594    }
73595
73596    /// Configuration for a Workbench Instances-based environment.
73597    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73598    #[derive(Clone, Default, PartialEq)]
73599    #[non_exhaustive]
73600    pub struct WorkbenchRuntime {
73601        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
73602    }
73603
73604    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73605    impl WorkbenchRuntime {
73606        pub fn new() -> Self {
73607            std::default::Default::default()
73608        }
73609    }
73610
73611    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73612    impl wkt::message::Message for WorkbenchRuntime {
73613        fn typename() -> &'static str {
73614            "type.googleapis.com/google.cloud.aiplatform.v1.NotebookExecutionJob.WorkbenchRuntime"
73615        }
73616    }
73617
73618    /// The input notebook.
73619    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73620    #[derive(Clone, Debug, PartialEq)]
73621    #[non_exhaustive]
73622    pub enum NotebookSource {
73623        /// The Dataform Repository pointing to a single file notebook repository.
73624        DataformRepositorySource(
73625            std::boxed::Box<crate::model::notebook_execution_job::DataformRepositorySource>,
73626        ),
73627        /// The Cloud Storage url pointing to the ipynb file. Format:
73628        /// `gs://bucket/notebook_file.ipynb`
73629        GcsNotebookSource(std::boxed::Box<crate::model::notebook_execution_job::GcsNotebookSource>),
73630        /// The contents of an input notebook file.
73631        DirectNotebookSource(
73632            std::boxed::Box<crate::model::notebook_execution_job::DirectNotebookSource>,
73633        ),
73634    }
73635
73636    /// The compute config to use for an execution job.
73637    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73638    #[derive(Clone, Debug, PartialEq)]
73639    #[non_exhaustive]
73640    pub enum EnvironmentSpec {
73641        /// The NotebookRuntimeTemplate to source compute configuration from.
73642        NotebookRuntimeTemplateResourceName(std::string::String),
73643        /// The custom compute configuration for an execution job.
73644        CustomEnvironmentSpec(
73645            std::boxed::Box<crate::model::notebook_execution_job::CustomEnvironmentSpec>,
73646        ),
73647    }
73648
73649    /// The location to store the notebook execution result.
73650    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73651    #[derive(Clone, Debug, PartialEq)]
73652    #[non_exhaustive]
73653    pub enum ExecutionSink {
73654        /// The Cloud Storage location to upload the result to. Format:
73655        /// `gs://bucket-name`
73656        GcsOutputUri(std::string::String),
73657    }
73658
73659    /// The identity to run the execution as.
73660    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73661    #[derive(Clone, Debug, PartialEq)]
73662    #[non_exhaustive]
73663    pub enum ExecutionIdentity {
73664        /// The user email to run the execution as. Only supported by Colab runtimes.
73665        ExecutionUser(std::string::String),
73666        /// The service account to run the execution as.
73667        ServiceAccount(std::string::String),
73668    }
73669
73670    /// Runtime environment for the notebook execution job. If unspecified, the
73671    /// default runtime of Colab is used.
73672    #[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
73673    #[derive(Clone, Debug, PartialEq)]
73674    #[non_exhaustive]
73675    pub enum RuntimeEnvironment {
73676        /// The Workbench runtime configuration to use for the notebook execution.
73677        WorkbenchRuntime(std::boxed::Box<crate::model::notebook_execution_job::WorkbenchRuntime>),
73678    }
73679}
73680
73681/// The idle shutdown configuration of NotebookRuntimeTemplate, which contains
73682/// the idle_timeout as required field.
73683#[cfg(feature = "notebook-service")]
73684#[derive(Clone, Default, PartialEq)]
73685#[non_exhaustive]
73686pub struct NotebookIdleShutdownConfig {
73687    /// Required. Duration is accurate to the second. In Notebook, Idle Timeout is
73688    /// accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
73689    ///
73690    pub idle_timeout: std::option::Option<wkt::Duration>,
73691
73692    /// Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate.
73693    pub idle_shutdown_disabled: bool,
73694
73695    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
73696}
73697
73698#[cfg(feature = "notebook-service")]
73699impl NotebookIdleShutdownConfig {
73700    pub fn new() -> Self {
73701        std::default::Default::default()
73702    }
73703
73704    /// Sets the value of [idle_timeout][crate::model::NotebookIdleShutdownConfig::idle_timeout].
73705    pub fn set_idle_timeout<T>(mut self, v: T) -> Self
73706    where
73707        T: std::convert::Into<wkt::Duration>,
73708    {
73709        self.idle_timeout = std::option::Option::Some(v.into());
73710        self
73711    }
73712
73713    /// Sets or clears the value of [idle_timeout][crate::model::NotebookIdleShutdownConfig::idle_timeout].
73714    pub fn set_or_clear_idle_timeout<T>(mut self, v: std::option::Option<T>) -> Self
73715    where
73716        T: std::convert::Into<wkt::Duration>,
73717    {
73718        self.idle_timeout = v.map(|x| x.into());
73719        self
73720    }
73721
73722    /// Sets the value of [idle_shutdown_disabled][crate::model::NotebookIdleShutdownConfig::idle_shutdown_disabled].
73723    pub fn set_idle_shutdown_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
73724        self.idle_shutdown_disabled = v.into();
73725        self
73726    }
73727}
73728
73729#[cfg(feature = "notebook-service")]
73730impl wkt::message::Message for NotebookIdleShutdownConfig {
73731    fn typename() -> &'static str {
73732        "type.googleapis.com/google.cloud.aiplatform.v1.NotebookIdleShutdownConfig"
73733    }
73734}
73735
73736/// A template that specifies runtime configurations such as machine type,
73737/// runtime version, network configurations, etc.
73738/// Multiple runtimes can be created from a runtime template.
73739#[cfg(feature = "notebook-service")]
73740#[derive(Clone, Default, PartialEq)]
73741#[non_exhaustive]
73742pub struct NotebookRuntimeTemplate {
73743    /// The resource name of the NotebookRuntimeTemplate.
73744    pub name: std::string::String,
73745
73746    /// Required. The display name of the NotebookRuntimeTemplate.
73747    /// The name can be up to 128 characters long and can consist of any UTF-8
73748    /// characters.
73749    pub display_name: std::string::String,
73750
73751    /// The description of the NotebookRuntimeTemplate.
73752    pub description: std::string::String,
73753
73754    /// Output only. Deprecated: This field has no behavior. Use
73755    /// notebook_runtime_type = 'ONE_CLICK' instead.
73756    ///
73757    /// The default template to use if not specified.
73758    #[deprecated]
73759    pub is_default: bool,
73760
73761    /// Optional. Immutable. The specification of a single machine for the
73762    /// template.
73763    pub machine_spec: std::option::Option<crate::model::MachineSpec>,
73764
73765    /// Optional. The specification of [persistent
73766    /// disk][<https://cloud.google.com/compute/docs/disks/persistent-disks>]
73767    /// attached to the runtime as data disk storage.
73768    pub data_persistent_disk_spec: std::option::Option<crate::model::PersistentDiskSpec>,
73769
73770    /// Optional. Network spec.
73771    pub network_spec: std::option::Option<crate::model::NetworkSpec>,
73772
73773    /// Deprecated: This field is ignored and the "Vertex AI Notebook Service
73774    /// Account"
73775    /// (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is
73776    /// used for the runtime workload identity.
73777    /// See
73778    /// <https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account>
73779    /// for more details.
73780    /// For NotebookExecutionJob, use NotebookExecutionJob.service_account instead.
73781    ///
73782    /// The service account that the runtime workload runs as.
73783    /// You can use any service account within the same project, but you
73784    /// must have the service account user permission to use the instance.
73785    ///
73786    /// If not specified, the [Compute Engine default service
73787    /// account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
73788    /// is used.
73789    #[deprecated]
73790    pub service_account: std::string::String,
73791
73792    /// Used to perform consistent read-modify-write updates. If not set, a blind
73793    /// "overwrite" update happens.
73794    pub etag: std::string::String,
73795
73796    /// The labels with user-defined metadata to organize the
73797    /// NotebookRuntimeTemplates.
73798    ///
73799    /// Label keys and values can be no longer than 64 characters
73800    /// (Unicode codepoints), can only contain lowercase letters, numeric
73801    /// characters, underscores and dashes. International characters are allowed.
73802    ///
73803    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
73804    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
73805
73806    /// The idle shutdown configuration of NotebookRuntimeTemplate. This config
73807    /// will only be set when idle shutdown is enabled.
73808    pub idle_shutdown_config: std::option::Option<crate::model::NotebookIdleShutdownConfig>,
73809
73810    /// EUC configuration of the NotebookRuntimeTemplate.
73811    pub euc_config: std::option::Option<crate::model::NotebookEucConfig>,
73812
73813    /// Output only. Timestamp when this NotebookRuntimeTemplate was created.
73814    pub create_time: std::option::Option<wkt::Timestamp>,
73815
73816    /// Output only. Timestamp when this NotebookRuntimeTemplate was most recently
73817    /// updated.
73818    pub update_time: std::option::Option<wkt::Timestamp>,
73819
73820    /// Optional. Immutable. The type of the notebook runtime template.
73821    pub notebook_runtime_type: crate::model::NotebookRuntimeType,
73822
73823    /// Optional. Immutable. Runtime Shielded VM spec.
73824    pub shielded_vm_config: std::option::Option<crate::model::ShieldedVmConfig>,
73825
73826    /// Optional. The Compute Engine tags to add to runtime (see [Tagging
73827    /// instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
73828    pub network_tags: std::vec::Vec<std::string::String>,
73829
73830    /// Customer-managed encryption key spec for the notebook runtime.
73831    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
73832
73833    /// Optional. The notebook software configuration of the notebook runtime.
73834    pub software_config: std::option::Option<crate::model::NotebookSoftwareConfig>,
73835
73836    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
73837}
73838
73839#[cfg(feature = "notebook-service")]
73840impl NotebookRuntimeTemplate {
73841    pub fn new() -> Self {
73842        std::default::Default::default()
73843    }
73844
73845    /// Sets the value of [name][crate::model::NotebookRuntimeTemplate::name].
73846    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
73847        self.name = v.into();
73848        self
73849    }
73850
73851    /// Sets the value of [display_name][crate::model::NotebookRuntimeTemplate::display_name].
73852    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
73853        self.display_name = v.into();
73854        self
73855    }
73856
73857    /// Sets the value of [description][crate::model::NotebookRuntimeTemplate::description].
73858    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
73859        self.description = v.into();
73860        self
73861    }
73862
73863    /// Sets the value of [is_default][crate::model::NotebookRuntimeTemplate::is_default].
73864    #[deprecated]
73865    pub fn set_is_default<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
73866        self.is_default = v.into();
73867        self
73868    }
73869
73870    /// Sets the value of [machine_spec][crate::model::NotebookRuntimeTemplate::machine_spec].
73871    pub fn set_machine_spec<T>(mut self, v: T) -> Self
73872    where
73873        T: std::convert::Into<crate::model::MachineSpec>,
73874    {
73875        self.machine_spec = std::option::Option::Some(v.into());
73876        self
73877    }
73878
73879    /// Sets or clears the value of [machine_spec][crate::model::NotebookRuntimeTemplate::machine_spec].
73880    pub fn set_or_clear_machine_spec<T>(mut self, v: std::option::Option<T>) -> Self
73881    where
73882        T: std::convert::Into<crate::model::MachineSpec>,
73883    {
73884        self.machine_spec = v.map(|x| x.into());
73885        self
73886    }
73887
73888    /// Sets the value of [data_persistent_disk_spec][crate::model::NotebookRuntimeTemplate::data_persistent_disk_spec].
73889    pub fn set_data_persistent_disk_spec<T>(mut self, v: T) -> Self
73890    where
73891        T: std::convert::Into<crate::model::PersistentDiskSpec>,
73892    {
73893        self.data_persistent_disk_spec = std::option::Option::Some(v.into());
73894        self
73895    }
73896
73897    /// Sets or clears the value of [data_persistent_disk_spec][crate::model::NotebookRuntimeTemplate::data_persistent_disk_spec].
73898    pub fn set_or_clear_data_persistent_disk_spec<T>(mut self, v: std::option::Option<T>) -> Self
73899    where
73900        T: std::convert::Into<crate::model::PersistentDiskSpec>,
73901    {
73902        self.data_persistent_disk_spec = v.map(|x| x.into());
73903        self
73904    }
73905
73906    /// Sets the value of [network_spec][crate::model::NotebookRuntimeTemplate::network_spec].
73907    pub fn set_network_spec<T>(mut self, v: T) -> Self
73908    where
73909        T: std::convert::Into<crate::model::NetworkSpec>,
73910    {
73911        self.network_spec = std::option::Option::Some(v.into());
73912        self
73913    }
73914
73915    /// Sets or clears the value of [network_spec][crate::model::NotebookRuntimeTemplate::network_spec].
73916    pub fn set_or_clear_network_spec<T>(mut self, v: std::option::Option<T>) -> Self
73917    where
73918        T: std::convert::Into<crate::model::NetworkSpec>,
73919    {
73920        self.network_spec = v.map(|x| x.into());
73921        self
73922    }
73923
73924    /// Sets the value of [service_account][crate::model::NotebookRuntimeTemplate::service_account].
73925    #[deprecated]
73926    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
73927        self.service_account = v.into();
73928        self
73929    }
73930
73931    /// Sets the value of [etag][crate::model::NotebookRuntimeTemplate::etag].
73932    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
73933        self.etag = v.into();
73934        self
73935    }
73936
73937    /// Sets the value of [labels][crate::model::NotebookRuntimeTemplate::labels].
73938    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
73939    where
73940        T: std::iter::IntoIterator<Item = (K, V)>,
73941        K: std::convert::Into<std::string::String>,
73942        V: std::convert::Into<std::string::String>,
73943    {
73944        use std::iter::Iterator;
73945        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
73946        self
73947    }
73948
73949    /// Sets the value of [idle_shutdown_config][crate::model::NotebookRuntimeTemplate::idle_shutdown_config].
73950    pub fn set_idle_shutdown_config<T>(mut self, v: T) -> Self
73951    where
73952        T: std::convert::Into<crate::model::NotebookIdleShutdownConfig>,
73953    {
73954        self.idle_shutdown_config = std::option::Option::Some(v.into());
73955        self
73956    }
73957
73958    /// Sets or clears the value of [idle_shutdown_config][crate::model::NotebookRuntimeTemplate::idle_shutdown_config].
73959    pub fn set_or_clear_idle_shutdown_config<T>(mut self, v: std::option::Option<T>) -> Self
73960    where
73961        T: std::convert::Into<crate::model::NotebookIdleShutdownConfig>,
73962    {
73963        self.idle_shutdown_config = v.map(|x| x.into());
73964        self
73965    }
73966
73967    /// Sets the value of [euc_config][crate::model::NotebookRuntimeTemplate::euc_config].
73968    pub fn set_euc_config<T>(mut self, v: T) -> Self
73969    where
73970        T: std::convert::Into<crate::model::NotebookEucConfig>,
73971    {
73972        self.euc_config = std::option::Option::Some(v.into());
73973        self
73974    }
73975
73976    /// Sets or clears the value of [euc_config][crate::model::NotebookRuntimeTemplate::euc_config].
73977    pub fn set_or_clear_euc_config<T>(mut self, v: std::option::Option<T>) -> Self
73978    where
73979        T: std::convert::Into<crate::model::NotebookEucConfig>,
73980    {
73981        self.euc_config = v.map(|x| x.into());
73982        self
73983    }
73984
73985    /// Sets the value of [create_time][crate::model::NotebookRuntimeTemplate::create_time].
73986    pub fn set_create_time<T>(mut self, v: T) -> Self
73987    where
73988        T: std::convert::Into<wkt::Timestamp>,
73989    {
73990        self.create_time = std::option::Option::Some(v.into());
73991        self
73992    }
73993
73994    /// Sets or clears the value of [create_time][crate::model::NotebookRuntimeTemplate::create_time].
73995    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
73996    where
73997        T: std::convert::Into<wkt::Timestamp>,
73998    {
73999        self.create_time = v.map(|x| x.into());
74000        self
74001    }
74002
74003    /// Sets the value of [update_time][crate::model::NotebookRuntimeTemplate::update_time].
74004    pub fn set_update_time<T>(mut self, v: T) -> Self
74005    where
74006        T: std::convert::Into<wkt::Timestamp>,
74007    {
74008        self.update_time = std::option::Option::Some(v.into());
74009        self
74010    }
74011
74012    /// Sets or clears the value of [update_time][crate::model::NotebookRuntimeTemplate::update_time].
74013    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
74014    where
74015        T: std::convert::Into<wkt::Timestamp>,
74016    {
74017        self.update_time = v.map(|x| x.into());
74018        self
74019    }
74020
74021    /// Sets the value of [notebook_runtime_type][crate::model::NotebookRuntimeTemplate::notebook_runtime_type].
74022    pub fn set_notebook_runtime_type<T: std::convert::Into<crate::model::NotebookRuntimeType>>(
74023        mut self,
74024        v: T,
74025    ) -> Self {
74026        self.notebook_runtime_type = v.into();
74027        self
74028    }
74029
74030    /// Sets the value of [shielded_vm_config][crate::model::NotebookRuntimeTemplate::shielded_vm_config].
74031    pub fn set_shielded_vm_config<T>(mut self, v: T) -> Self
74032    where
74033        T: std::convert::Into<crate::model::ShieldedVmConfig>,
74034    {
74035        self.shielded_vm_config = std::option::Option::Some(v.into());
74036        self
74037    }
74038
74039    /// Sets or clears the value of [shielded_vm_config][crate::model::NotebookRuntimeTemplate::shielded_vm_config].
74040    pub fn set_or_clear_shielded_vm_config<T>(mut self, v: std::option::Option<T>) -> Self
74041    where
74042        T: std::convert::Into<crate::model::ShieldedVmConfig>,
74043    {
74044        self.shielded_vm_config = v.map(|x| x.into());
74045        self
74046    }
74047
74048    /// Sets the value of [network_tags][crate::model::NotebookRuntimeTemplate::network_tags].
74049    pub fn set_network_tags<T, V>(mut self, v: T) -> Self
74050    where
74051        T: std::iter::IntoIterator<Item = V>,
74052        V: std::convert::Into<std::string::String>,
74053    {
74054        use std::iter::Iterator;
74055        self.network_tags = v.into_iter().map(|i| i.into()).collect();
74056        self
74057    }
74058
74059    /// Sets the value of [encryption_spec][crate::model::NotebookRuntimeTemplate::encryption_spec].
74060    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
74061    where
74062        T: std::convert::Into<crate::model::EncryptionSpec>,
74063    {
74064        self.encryption_spec = std::option::Option::Some(v.into());
74065        self
74066    }
74067
74068    /// Sets or clears the value of [encryption_spec][crate::model::NotebookRuntimeTemplate::encryption_spec].
74069    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
74070    where
74071        T: std::convert::Into<crate::model::EncryptionSpec>,
74072    {
74073        self.encryption_spec = v.map(|x| x.into());
74074        self
74075    }
74076
74077    /// Sets the value of [software_config][crate::model::NotebookRuntimeTemplate::software_config].
74078    pub fn set_software_config<T>(mut self, v: T) -> Self
74079    where
74080        T: std::convert::Into<crate::model::NotebookSoftwareConfig>,
74081    {
74082        self.software_config = std::option::Option::Some(v.into());
74083        self
74084    }
74085
74086    /// Sets or clears the value of [software_config][crate::model::NotebookRuntimeTemplate::software_config].
74087    pub fn set_or_clear_software_config<T>(mut self, v: std::option::Option<T>) -> Self
74088    where
74089        T: std::convert::Into<crate::model::NotebookSoftwareConfig>,
74090    {
74091        self.software_config = v.map(|x| x.into());
74092        self
74093    }
74094}
74095
74096#[cfg(feature = "notebook-service")]
74097impl wkt::message::Message for NotebookRuntimeTemplate {
74098    fn typename() -> &'static str {
74099        "type.googleapis.com/google.cloud.aiplatform.v1.NotebookRuntimeTemplate"
74100    }
74101}
74102
74103/// A runtime is a virtual machine allocated to a particular user for a
74104/// particular Notebook file on temporary basis with lifetime. Default runtimes
74105/// have a lifetime of 18 hours, while custom runtimes last for 6 months from
74106/// their creation or last upgrade.
74107#[cfg(feature = "notebook-service")]
74108#[derive(Clone, Default, PartialEq)]
74109#[non_exhaustive]
74110pub struct NotebookRuntime {
74111    /// Output only. The resource name of the NotebookRuntime.
74112    pub name: std::string::String,
74113
74114    /// Required. The user email of the NotebookRuntime.
74115    pub runtime_user: std::string::String,
74116
74117    /// Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is
74118    /// created from.
74119    pub notebook_runtime_template_ref:
74120        std::option::Option<crate::model::NotebookRuntimeTemplateRef>,
74121
74122    /// Output only. The proxy endpoint used to access the NotebookRuntime.
74123    pub proxy_uri: std::string::String,
74124
74125    /// Output only. Timestamp when this NotebookRuntime was created.
74126    pub create_time: std::option::Option<wkt::Timestamp>,
74127
74128    /// Output only. Timestamp when this NotebookRuntime was most recently updated.
74129    pub update_time: std::option::Option<wkt::Timestamp>,
74130
74131    /// Output only. The health state of the NotebookRuntime.
74132    pub health_state: crate::model::notebook_runtime::HealthState,
74133
74134    /// Required. The display name of the NotebookRuntime.
74135    /// The name can be up to 128 characters long and can consist of any UTF-8
74136    /// characters.
74137    pub display_name: std::string::String,
74138
74139    /// The description of the NotebookRuntime.
74140    pub description: std::string::String,
74141
74142    /// Output only. Deprecated: This field is no longer used and the "Vertex AI
74143    /// Notebook Service Account"
74144    /// (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is
74145    /// used for the runtime workload identity.
74146    /// See
74147    /// <https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account>
74148    /// for more details.
74149    ///
74150    /// The service account that the NotebookRuntime workload runs as.
74151    pub service_account: std::string::String,
74152
74153    /// Output only. The runtime (instance) state of the NotebookRuntime.
74154    pub runtime_state: crate::model::notebook_runtime::RuntimeState,
74155
74156    /// Output only. Whether NotebookRuntime is upgradable.
74157    pub is_upgradable: bool,
74158
74159    /// The labels with user-defined metadata to organize your
74160    /// NotebookRuntime.
74161    ///
74162    /// Label keys and values can be no longer than 64 characters
74163    /// (Unicode codepoints), can only contain lowercase letters, numeric
74164    /// characters, underscores and dashes. International characters are allowed.
74165    /// No more than 64 user labels can be associated with one NotebookRuntime
74166    /// (System labels are excluded).
74167    ///
74168    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
74169    /// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
74170    /// and are immutable. Following system labels exist for NotebookRuntime:
74171    ///
74172    /// * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output
74173    ///   only, its value is the Compute Engine instance id.
74174    /// * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is
74175    ///   either "bigquery" or "vertex"; if absent, it should be "vertex". This is to
74176    ///   describe the entry service, either BigQuery or Vertex.
74177    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
74178
74179    /// Output only. Timestamp when this NotebookRuntime will be expired:
74180    ///
74181    /// 1. System Predefined NotebookRuntime: 24 hours after creation. After
74182    ///    expiration, system predifined runtime will be deleted.
74183    /// 1. User created NotebookRuntime: 6 months after last upgrade. After
74184    ///    expiration, user created runtime will be stopped and allowed for upgrade.
74185    pub expiration_time: std::option::Option<wkt::Timestamp>,
74186
74187    /// Output only. The VM os image version of NotebookRuntime.
74188    pub version: std::string::String,
74189
74190    /// Output only. The type of the notebook runtime.
74191    pub notebook_runtime_type: crate::model::NotebookRuntimeType,
74192
74193    /// Output only. The specification of a single machine used by the notebook
74194    /// runtime.
74195    pub machine_spec: std::option::Option<crate::model::MachineSpec>,
74196
74197    /// Output only. The specification of [persistent
74198    /// disk][<https://cloud.google.com/compute/docs/disks/persistent-disks>]
74199    /// attached to the notebook runtime as data disk storage.
74200    pub data_persistent_disk_spec: std::option::Option<crate::model::PersistentDiskSpec>,
74201
74202    /// Output only. Network spec of the notebook runtime.
74203    pub network_spec: std::option::Option<crate::model::NetworkSpec>,
74204
74205    /// Output only. The idle shutdown configuration of the notebook runtime.
74206    pub idle_shutdown_config: std::option::Option<crate::model::NotebookIdleShutdownConfig>,
74207
74208    /// Output only. EUC configuration of the notebook runtime.
74209    pub euc_config: std::option::Option<crate::model::NotebookEucConfig>,
74210
74211    /// Output only. Runtime Shielded VM spec.
74212    pub shielded_vm_config: std::option::Option<crate::model::ShieldedVmConfig>,
74213
74214    /// Optional. The Compute Engine tags to add to runtime (see [Tagging
74215    /// instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
74216    pub network_tags: std::vec::Vec<std::string::String>,
74217
74218    /// Output only. Software config of the notebook runtime.
74219    pub software_config: std::option::Option<crate::model::NotebookSoftwareConfig>,
74220
74221    /// Output only. Customer-managed encryption key spec for the notebook runtime.
74222    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
74223
74224    /// Output only. Reserved for future use.
74225    pub satisfies_pzs: bool,
74226
74227    /// Output only. Reserved for future use.
74228    pub satisfies_pzi: bool,
74229
74230    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
74231}
74232
74233#[cfg(feature = "notebook-service")]
74234impl NotebookRuntime {
74235    pub fn new() -> Self {
74236        std::default::Default::default()
74237    }
74238
74239    /// Sets the value of [name][crate::model::NotebookRuntime::name].
74240    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
74241        self.name = v.into();
74242        self
74243    }
74244
74245    /// Sets the value of [runtime_user][crate::model::NotebookRuntime::runtime_user].
74246    pub fn set_runtime_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
74247        self.runtime_user = v.into();
74248        self
74249    }
74250
74251    /// Sets the value of [notebook_runtime_template_ref][crate::model::NotebookRuntime::notebook_runtime_template_ref].
74252    pub fn set_notebook_runtime_template_ref<T>(mut self, v: T) -> Self
74253    where
74254        T: std::convert::Into<crate::model::NotebookRuntimeTemplateRef>,
74255    {
74256        self.notebook_runtime_template_ref = std::option::Option::Some(v.into());
74257        self
74258    }
74259
74260    /// Sets or clears the value of [notebook_runtime_template_ref][crate::model::NotebookRuntime::notebook_runtime_template_ref].
74261    pub fn set_or_clear_notebook_runtime_template_ref<T>(
74262        mut self,
74263        v: std::option::Option<T>,
74264    ) -> Self
74265    where
74266        T: std::convert::Into<crate::model::NotebookRuntimeTemplateRef>,
74267    {
74268        self.notebook_runtime_template_ref = v.map(|x| x.into());
74269        self
74270    }
74271
74272    /// Sets the value of [proxy_uri][crate::model::NotebookRuntime::proxy_uri].
74273    pub fn set_proxy_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
74274        self.proxy_uri = v.into();
74275        self
74276    }
74277
74278    /// Sets the value of [create_time][crate::model::NotebookRuntime::create_time].
74279    pub fn set_create_time<T>(mut self, v: T) -> Self
74280    where
74281        T: std::convert::Into<wkt::Timestamp>,
74282    {
74283        self.create_time = std::option::Option::Some(v.into());
74284        self
74285    }
74286
74287    /// Sets or clears the value of [create_time][crate::model::NotebookRuntime::create_time].
74288    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
74289    where
74290        T: std::convert::Into<wkt::Timestamp>,
74291    {
74292        self.create_time = v.map(|x| x.into());
74293        self
74294    }
74295
74296    /// Sets the value of [update_time][crate::model::NotebookRuntime::update_time].
74297    pub fn set_update_time<T>(mut self, v: T) -> Self
74298    where
74299        T: std::convert::Into<wkt::Timestamp>,
74300    {
74301        self.update_time = std::option::Option::Some(v.into());
74302        self
74303    }
74304
74305    /// Sets or clears the value of [update_time][crate::model::NotebookRuntime::update_time].
74306    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
74307    where
74308        T: std::convert::Into<wkt::Timestamp>,
74309    {
74310        self.update_time = v.map(|x| x.into());
74311        self
74312    }
74313
74314    /// Sets the value of [health_state][crate::model::NotebookRuntime::health_state].
74315    pub fn set_health_state<T: std::convert::Into<crate::model::notebook_runtime::HealthState>>(
74316        mut self,
74317        v: T,
74318    ) -> Self {
74319        self.health_state = v.into();
74320        self
74321    }
74322
74323    /// Sets the value of [display_name][crate::model::NotebookRuntime::display_name].
74324    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
74325        self.display_name = v.into();
74326        self
74327    }
74328
74329    /// Sets the value of [description][crate::model::NotebookRuntime::description].
74330    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
74331        self.description = v.into();
74332        self
74333    }
74334
74335    /// Sets the value of [service_account][crate::model::NotebookRuntime::service_account].
74336    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
74337        self.service_account = v.into();
74338        self
74339    }
74340
74341    /// Sets the value of [runtime_state][crate::model::NotebookRuntime::runtime_state].
74342    pub fn set_runtime_state<
74343        T: std::convert::Into<crate::model::notebook_runtime::RuntimeState>,
74344    >(
74345        mut self,
74346        v: T,
74347    ) -> Self {
74348        self.runtime_state = v.into();
74349        self
74350    }
74351
74352    /// Sets the value of [is_upgradable][crate::model::NotebookRuntime::is_upgradable].
74353    pub fn set_is_upgradable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
74354        self.is_upgradable = v.into();
74355        self
74356    }
74357
74358    /// Sets the value of [labels][crate::model::NotebookRuntime::labels].
74359    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
74360    where
74361        T: std::iter::IntoIterator<Item = (K, V)>,
74362        K: std::convert::Into<std::string::String>,
74363        V: std::convert::Into<std::string::String>,
74364    {
74365        use std::iter::Iterator;
74366        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
74367        self
74368    }
74369
74370    /// Sets the value of [expiration_time][crate::model::NotebookRuntime::expiration_time].
74371    pub fn set_expiration_time<T>(mut self, v: T) -> Self
74372    where
74373        T: std::convert::Into<wkt::Timestamp>,
74374    {
74375        self.expiration_time = std::option::Option::Some(v.into());
74376        self
74377    }
74378
74379    /// Sets or clears the value of [expiration_time][crate::model::NotebookRuntime::expiration_time].
74380    pub fn set_or_clear_expiration_time<T>(mut self, v: std::option::Option<T>) -> Self
74381    where
74382        T: std::convert::Into<wkt::Timestamp>,
74383    {
74384        self.expiration_time = v.map(|x| x.into());
74385        self
74386    }
74387
74388    /// Sets the value of [version][crate::model::NotebookRuntime::version].
74389    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
74390        self.version = v.into();
74391        self
74392    }
74393
74394    /// Sets the value of [notebook_runtime_type][crate::model::NotebookRuntime::notebook_runtime_type].
74395    pub fn set_notebook_runtime_type<T: std::convert::Into<crate::model::NotebookRuntimeType>>(
74396        mut self,
74397        v: T,
74398    ) -> Self {
74399        self.notebook_runtime_type = v.into();
74400        self
74401    }
74402
74403    /// Sets the value of [machine_spec][crate::model::NotebookRuntime::machine_spec].
74404    pub fn set_machine_spec<T>(mut self, v: T) -> Self
74405    where
74406        T: std::convert::Into<crate::model::MachineSpec>,
74407    {
74408        self.machine_spec = std::option::Option::Some(v.into());
74409        self
74410    }
74411
74412    /// Sets or clears the value of [machine_spec][crate::model::NotebookRuntime::machine_spec].
74413    pub fn set_or_clear_machine_spec<T>(mut self, v: std::option::Option<T>) -> Self
74414    where
74415        T: std::convert::Into<crate::model::MachineSpec>,
74416    {
74417        self.machine_spec = v.map(|x| x.into());
74418        self
74419    }
74420
74421    /// Sets the value of [data_persistent_disk_spec][crate::model::NotebookRuntime::data_persistent_disk_spec].
74422    pub fn set_data_persistent_disk_spec<T>(mut self, v: T) -> Self
74423    where
74424        T: std::convert::Into<crate::model::PersistentDiskSpec>,
74425    {
74426        self.data_persistent_disk_spec = std::option::Option::Some(v.into());
74427        self
74428    }
74429
74430    /// Sets or clears the value of [data_persistent_disk_spec][crate::model::NotebookRuntime::data_persistent_disk_spec].
74431    pub fn set_or_clear_data_persistent_disk_spec<T>(mut self, v: std::option::Option<T>) -> Self
74432    where
74433        T: std::convert::Into<crate::model::PersistentDiskSpec>,
74434    {
74435        self.data_persistent_disk_spec = v.map(|x| x.into());
74436        self
74437    }
74438
74439    /// Sets the value of [network_spec][crate::model::NotebookRuntime::network_spec].
74440    pub fn set_network_spec<T>(mut self, v: T) -> Self
74441    where
74442        T: std::convert::Into<crate::model::NetworkSpec>,
74443    {
74444        self.network_spec = std::option::Option::Some(v.into());
74445        self
74446    }
74447
74448    /// Sets or clears the value of [network_spec][crate::model::NotebookRuntime::network_spec].
74449    pub fn set_or_clear_network_spec<T>(mut self, v: std::option::Option<T>) -> Self
74450    where
74451        T: std::convert::Into<crate::model::NetworkSpec>,
74452    {
74453        self.network_spec = v.map(|x| x.into());
74454        self
74455    }
74456
74457    /// Sets the value of [idle_shutdown_config][crate::model::NotebookRuntime::idle_shutdown_config].
74458    pub fn set_idle_shutdown_config<T>(mut self, v: T) -> Self
74459    where
74460        T: std::convert::Into<crate::model::NotebookIdleShutdownConfig>,
74461    {
74462        self.idle_shutdown_config = std::option::Option::Some(v.into());
74463        self
74464    }
74465
74466    /// Sets or clears the value of [idle_shutdown_config][crate::model::NotebookRuntime::idle_shutdown_config].
74467    pub fn set_or_clear_idle_shutdown_config<T>(mut self, v: std::option::Option<T>) -> Self
74468    where
74469        T: std::convert::Into<crate::model::NotebookIdleShutdownConfig>,
74470    {
74471        self.idle_shutdown_config = v.map(|x| x.into());
74472        self
74473    }
74474
74475    /// Sets the value of [euc_config][crate::model::NotebookRuntime::euc_config].
74476    pub fn set_euc_config<T>(mut self, v: T) -> Self
74477    where
74478        T: std::convert::Into<crate::model::NotebookEucConfig>,
74479    {
74480        self.euc_config = std::option::Option::Some(v.into());
74481        self
74482    }
74483
74484    /// Sets or clears the value of [euc_config][crate::model::NotebookRuntime::euc_config].
74485    pub fn set_or_clear_euc_config<T>(mut self, v: std::option::Option<T>) -> Self
74486    where
74487        T: std::convert::Into<crate::model::NotebookEucConfig>,
74488    {
74489        self.euc_config = v.map(|x| x.into());
74490        self
74491    }
74492
74493    /// Sets the value of [shielded_vm_config][crate::model::NotebookRuntime::shielded_vm_config].
74494    pub fn set_shielded_vm_config<T>(mut self, v: T) -> Self
74495    where
74496        T: std::convert::Into<crate::model::ShieldedVmConfig>,
74497    {
74498        self.shielded_vm_config = std::option::Option::Some(v.into());
74499        self
74500    }
74501
74502    /// Sets or clears the value of [shielded_vm_config][crate::model::NotebookRuntime::shielded_vm_config].
74503    pub fn set_or_clear_shielded_vm_config<T>(mut self, v: std::option::Option<T>) -> Self
74504    where
74505        T: std::convert::Into<crate::model::ShieldedVmConfig>,
74506    {
74507        self.shielded_vm_config = v.map(|x| x.into());
74508        self
74509    }
74510
74511    /// Sets the value of [network_tags][crate::model::NotebookRuntime::network_tags].
74512    pub fn set_network_tags<T, V>(mut self, v: T) -> Self
74513    where
74514        T: std::iter::IntoIterator<Item = V>,
74515        V: std::convert::Into<std::string::String>,
74516    {
74517        use std::iter::Iterator;
74518        self.network_tags = v.into_iter().map(|i| i.into()).collect();
74519        self
74520    }
74521
74522    /// Sets the value of [software_config][crate::model::NotebookRuntime::software_config].
74523    pub fn set_software_config<T>(mut self, v: T) -> Self
74524    where
74525        T: std::convert::Into<crate::model::NotebookSoftwareConfig>,
74526    {
74527        self.software_config = std::option::Option::Some(v.into());
74528        self
74529    }
74530
74531    /// Sets or clears the value of [software_config][crate::model::NotebookRuntime::software_config].
74532    pub fn set_or_clear_software_config<T>(mut self, v: std::option::Option<T>) -> Self
74533    where
74534        T: std::convert::Into<crate::model::NotebookSoftwareConfig>,
74535    {
74536        self.software_config = v.map(|x| x.into());
74537        self
74538    }
74539
74540    /// Sets the value of [encryption_spec][crate::model::NotebookRuntime::encryption_spec].
74541    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
74542    where
74543        T: std::convert::Into<crate::model::EncryptionSpec>,
74544    {
74545        self.encryption_spec = std::option::Option::Some(v.into());
74546        self
74547    }
74548
74549    /// Sets or clears the value of [encryption_spec][crate::model::NotebookRuntime::encryption_spec].
74550    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
74551    where
74552        T: std::convert::Into<crate::model::EncryptionSpec>,
74553    {
74554        self.encryption_spec = v.map(|x| x.into());
74555        self
74556    }
74557
74558    /// Sets the value of [satisfies_pzs][crate::model::NotebookRuntime::satisfies_pzs].
74559    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
74560        self.satisfies_pzs = v.into();
74561        self
74562    }
74563
74564    /// Sets the value of [satisfies_pzi][crate::model::NotebookRuntime::satisfies_pzi].
74565    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
74566        self.satisfies_pzi = v.into();
74567        self
74568    }
74569}
74570
74571#[cfg(feature = "notebook-service")]
74572impl wkt::message::Message for NotebookRuntime {
74573    fn typename() -> &'static str {
74574        "type.googleapis.com/google.cloud.aiplatform.v1.NotebookRuntime"
74575    }
74576}
74577
74578/// Defines additional types related to [NotebookRuntime].
74579#[cfg(feature = "notebook-service")]
74580pub mod notebook_runtime {
74581    #[allow(unused_imports)]
74582    use super::*;
74583
74584    /// The substate of the NotebookRuntime to display health information.
74585    ///
74586    /// # Working with unknown values
74587    ///
74588    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
74589    /// additional enum variants at any time. Adding new variants is not considered
74590    /// a breaking change. Applications should write their code in anticipation of:
74591    ///
74592    /// - New values appearing in future releases of the client library, **and**
74593    /// - New values received dynamically, without application changes.
74594    ///
74595    /// Please consult the [Working with enums] section in the user guide for some
74596    /// guidelines.
74597    ///
74598    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
74599    #[cfg(feature = "notebook-service")]
74600    #[derive(Clone, Debug, PartialEq)]
74601    #[non_exhaustive]
74602    pub enum HealthState {
74603        /// Unspecified health state.
74604        Unspecified,
74605        /// NotebookRuntime is in healthy state. Applies to ACTIVE state.
74606        Healthy,
74607        /// NotebookRuntime is in unhealthy state. Applies to ACTIVE state.
74608        Unhealthy,
74609        /// If set, the enum was initialized with an unknown value.
74610        ///
74611        /// Applications can examine the value using [HealthState::value] or
74612        /// [HealthState::name].
74613        UnknownValue(health_state::UnknownValue),
74614    }
74615
74616    #[doc(hidden)]
74617    #[cfg(feature = "notebook-service")]
74618    pub mod health_state {
74619        #[allow(unused_imports)]
74620        use super::*;
74621        #[derive(Clone, Debug, PartialEq)]
74622        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
74623    }
74624
74625    #[cfg(feature = "notebook-service")]
74626    impl HealthState {
74627        /// Gets the enum value.
74628        ///
74629        /// Returns `None` if the enum contains an unknown value deserialized from
74630        /// the string representation of enums.
74631        pub fn value(&self) -> std::option::Option<i32> {
74632            match self {
74633                Self::Unspecified => std::option::Option::Some(0),
74634                Self::Healthy => std::option::Option::Some(1),
74635                Self::Unhealthy => std::option::Option::Some(2),
74636                Self::UnknownValue(u) => u.0.value(),
74637            }
74638        }
74639
74640        /// Gets the enum value as a string.
74641        ///
74642        /// Returns `None` if the enum contains an unknown value deserialized from
74643        /// the integer representation of enums.
74644        pub fn name(&self) -> std::option::Option<&str> {
74645            match self {
74646                Self::Unspecified => std::option::Option::Some("HEALTH_STATE_UNSPECIFIED"),
74647                Self::Healthy => std::option::Option::Some("HEALTHY"),
74648                Self::Unhealthy => std::option::Option::Some("UNHEALTHY"),
74649                Self::UnknownValue(u) => u.0.name(),
74650            }
74651        }
74652    }
74653
74654    #[cfg(feature = "notebook-service")]
74655    impl std::default::Default for HealthState {
74656        fn default() -> Self {
74657            use std::convert::From;
74658            Self::from(0)
74659        }
74660    }
74661
74662    #[cfg(feature = "notebook-service")]
74663    impl std::fmt::Display for HealthState {
74664        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
74665            wkt::internal::display_enum(f, self.name(), self.value())
74666        }
74667    }
74668
74669    #[cfg(feature = "notebook-service")]
74670    impl std::convert::From<i32> for HealthState {
74671        fn from(value: i32) -> Self {
74672            match value {
74673                0 => Self::Unspecified,
74674                1 => Self::Healthy,
74675                2 => Self::Unhealthy,
74676                _ => Self::UnknownValue(health_state::UnknownValue(
74677                    wkt::internal::UnknownEnumValue::Integer(value),
74678                )),
74679            }
74680        }
74681    }
74682
74683    #[cfg(feature = "notebook-service")]
74684    impl std::convert::From<&str> for HealthState {
74685        fn from(value: &str) -> Self {
74686            use std::string::ToString;
74687            match value {
74688                "HEALTH_STATE_UNSPECIFIED" => Self::Unspecified,
74689                "HEALTHY" => Self::Healthy,
74690                "UNHEALTHY" => Self::Unhealthy,
74691                _ => Self::UnknownValue(health_state::UnknownValue(
74692                    wkt::internal::UnknownEnumValue::String(value.to_string()),
74693                )),
74694            }
74695        }
74696    }
74697
74698    #[cfg(feature = "notebook-service")]
74699    impl serde::ser::Serialize for HealthState {
74700        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
74701        where
74702            S: serde::Serializer,
74703        {
74704            match self {
74705                Self::Unspecified => serializer.serialize_i32(0),
74706                Self::Healthy => serializer.serialize_i32(1),
74707                Self::Unhealthy => serializer.serialize_i32(2),
74708                Self::UnknownValue(u) => u.0.serialize(serializer),
74709            }
74710        }
74711    }
74712
74713    #[cfg(feature = "notebook-service")]
74714    impl<'de> serde::de::Deserialize<'de> for HealthState {
74715        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
74716        where
74717            D: serde::Deserializer<'de>,
74718        {
74719            deserializer.deserialize_any(wkt::internal::EnumVisitor::<HealthState>::new(
74720                ".google.cloud.aiplatform.v1.NotebookRuntime.HealthState",
74721            ))
74722        }
74723    }
74724
74725    /// The substate of the NotebookRuntime to display state of runtime.
74726    /// The resource of NotebookRuntime is in ACTIVE state for these sub state.
74727    ///
74728    /// # Working with unknown values
74729    ///
74730    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
74731    /// additional enum variants at any time. Adding new variants is not considered
74732    /// a breaking change. Applications should write their code in anticipation of:
74733    ///
74734    /// - New values appearing in future releases of the client library, **and**
74735    /// - New values received dynamically, without application changes.
74736    ///
74737    /// Please consult the [Working with enums] section in the user guide for some
74738    /// guidelines.
74739    ///
74740    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
74741    #[cfg(feature = "notebook-service")]
74742    #[derive(Clone, Debug, PartialEq)]
74743    #[non_exhaustive]
74744    pub enum RuntimeState {
74745        /// Unspecified runtime state.
74746        Unspecified,
74747        /// NotebookRuntime is in running state.
74748        Running,
74749        /// NotebookRuntime is in starting state. This is when the runtime is being
74750        /// started from a stopped state.
74751        BeingStarted,
74752        /// NotebookRuntime is in stopping state.
74753        BeingStopped,
74754        /// NotebookRuntime is in stopped state.
74755        Stopped,
74756        /// NotebookRuntime is in upgrading state. It is in the middle of upgrading
74757        /// process.
74758        BeingUpgraded,
74759        /// NotebookRuntime was unable to start/stop properly.
74760        Error,
74761        /// NotebookRuntime is in invalid state. Cannot be recovered.
74762        Invalid,
74763        /// If set, the enum was initialized with an unknown value.
74764        ///
74765        /// Applications can examine the value using [RuntimeState::value] or
74766        /// [RuntimeState::name].
74767        UnknownValue(runtime_state::UnknownValue),
74768    }
74769
74770    #[doc(hidden)]
74771    #[cfg(feature = "notebook-service")]
74772    pub mod runtime_state {
74773        #[allow(unused_imports)]
74774        use super::*;
74775        #[derive(Clone, Debug, PartialEq)]
74776        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
74777    }
74778
74779    #[cfg(feature = "notebook-service")]
74780    impl RuntimeState {
74781        /// Gets the enum value.
74782        ///
74783        /// Returns `None` if the enum contains an unknown value deserialized from
74784        /// the string representation of enums.
74785        pub fn value(&self) -> std::option::Option<i32> {
74786            match self {
74787                Self::Unspecified => std::option::Option::Some(0),
74788                Self::Running => std::option::Option::Some(1),
74789                Self::BeingStarted => std::option::Option::Some(2),
74790                Self::BeingStopped => std::option::Option::Some(3),
74791                Self::Stopped => std::option::Option::Some(4),
74792                Self::BeingUpgraded => std::option::Option::Some(5),
74793                Self::Error => std::option::Option::Some(100),
74794                Self::Invalid => std::option::Option::Some(101),
74795                Self::UnknownValue(u) => u.0.value(),
74796            }
74797        }
74798
74799        /// Gets the enum value as a string.
74800        ///
74801        /// Returns `None` if the enum contains an unknown value deserialized from
74802        /// the integer representation of enums.
74803        pub fn name(&self) -> std::option::Option<&str> {
74804            match self {
74805                Self::Unspecified => std::option::Option::Some("RUNTIME_STATE_UNSPECIFIED"),
74806                Self::Running => std::option::Option::Some("RUNNING"),
74807                Self::BeingStarted => std::option::Option::Some("BEING_STARTED"),
74808                Self::BeingStopped => std::option::Option::Some("BEING_STOPPED"),
74809                Self::Stopped => std::option::Option::Some("STOPPED"),
74810                Self::BeingUpgraded => std::option::Option::Some("BEING_UPGRADED"),
74811                Self::Error => std::option::Option::Some("ERROR"),
74812                Self::Invalid => std::option::Option::Some("INVALID"),
74813                Self::UnknownValue(u) => u.0.name(),
74814            }
74815        }
74816    }
74817
74818    #[cfg(feature = "notebook-service")]
74819    impl std::default::Default for RuntimeState {
74820        fn default() -> Self {
74821            use std::convert::From;
74822            Self::from(0)
74823        }
74824    }
74825
74826    #[cfg(feature = "notebook-service")]
74827    impl std::fmt::Display for RuntimeState {
74828        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
74829            wkt::internal::display_enum(f, self.name(), self.value())
74830        }
74831    }
74832
74833    #[cfg(feature = "notebook-service")]
74834    impl std::convert::From<i32> for RuntimeState {
74835        fn from(value: i32) -> Self {
74836            match value {
74837                0 => Self::Unspecified,
74838                1 => Self::Running,
74839                2 => Self::BeingStarted,
74840                3 => Self::BeingStopped,
74841                4 => Self::Stopped,
74842                5 => Self::BeingUpgraded,
74843                100 => Self::Error,
74844                101 => Self::Invalid,
74845                _ => Self::UnknownValue(runtime_state::UnknownValue(
74846                    wkt::internal::UnknownEnumValue::Integer(value),
74847                )),
74848            }
74849        }
74850    }
74851
74852    #[cfg(feature = "notebook-service")]
74853    impl std::convert::From<&str> for RuntimeState {
74854        fn from(value: &str) -> Self {
74855            use std::string::ToString;
74856            match value {
74857                "RUNTIME_STATE_UNSPECIFIED" => Self::Unspecified,
74858                "RUNNING" => Self::Running,
74859                "BEING_STARTED" => Self::BeingStarted,
74860                "BEING_STOPPED" => Self::BeingStopped,
74861                "STOPPED" => Self::Stopped,
74862                "BEING_UPGRADED" => Self::BeingUpgraded,
74863                "ERROR" => Self::Error,
74864                "INVALID" => Self::Invalid,
74865                _ => Self::UnknownValue(runtime_state::UnknownValue(
74866                    wkt::internal::UnknownEnumValue::String(value.to_string()),
74867                )),
74868            }
74869        }
74870    }
74871
74872    #[cfg(feature = "notebook-service")]
74873    impl serde::ser::Serialize for RuntimeState {
74874        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
74875        where
74876            S: serde::Serializer,
74877        {
74878            match self {
74879                Self::Unspecified => serializer.serialize_i32(0),
74880                Self::Running => serializer.serialize_i32(1),
74881                Self::BeingStarted => serializer.serialize_i32(2),
74882                Self::BeingStopped => serializer.serialize_i32(3),
74883                Self::Stopped => serializer.serialize_i32(4),
74884                Self::BeingUpgraded => serializer.serialize_i32(5),
74885                Self::Error => serializer.serialize_i32(100),
74886                Self::Invalid => serializer.serialize_i32(101),
74887                Self::UnknownValue(u) => u.0.serialize(serializer),
74888            }
74889        }
74890    }
74891
74892    #[cfg(feature = "notebook-service")]
74893    impl<'de> serde::de::Deserialize<'de> for RuntimeState {
74894        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
74895        where
74896            D: serde::Deserializer<'de>,
74897        {
74898            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RuntimeState>::new(
74899                ".google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState",
74900            ))
74901        }
74902    }
74903}
74904
74905/// Points to a NotebookRuntimeTemplateRef.
74906#[cfg(feature = "notebook-service")]
74907#[derive(Clone, Default, PartialEq)]
74908#[non_exhaustive]
74909pub struct NotebookRuntimeTemplateRef {
74910    /// Immutable. A resource name of the NotebookRuntimeTemplate.
74911    pub notebook_runtime_template: std::string::String,
74912
74913    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
74914}
74915
74916#[cfg(feature = "notebook-service")]
74917impl NotebookRuntimeTemplateRef {
74918    pub fn new() -> Self {
74919        std::default::Default::default()
74920    }
74921
74922    /// Sets the value of [notebook_runtime_template][crate::model::NotebookRuntimeTemplateRef::notebook_runtime_template].
74923    pub fn set_notebook_runtime_template<T: std::convert::Into<std::string::String>>(
74924        mut self,
74925        v: T,
74926    ) -> Self {
74927        self.notebook_runtime_template = v.into();
74928        self
74929    }
74930}
74931
74932#[cfg(feature = "notebook-service")]
74933impl wkt::message::Message for NotebookRuntimeTemplateRef {
74934    fn typename() -> &'static str {
74935        "type.googleapis.com/google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef"
74936    }
74937}
74938
74939/// Request message for
74940/// [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.CreateNotebookRuntimeTemplate].
74941///
74942/// [google.cloud.aiplatform.v1.NotebookService.CreateNotebookRuntimeTemplate]: crate::client::NotebookService::create_notebook_runtime_template
74943#[cfg(feature = "notebook-service")]
74944#[derive(Clone, Default, PartialEq)]
74945#[non_exhaustive]
74946pub struct CreateNotebookRuntimeTemplateRequest {
74947    /// Required. The resource name of the Location to create the
74948    /// NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`
74949    pub parent: std::string::String,
74950
74951    /// Required. The NotebookRuntimeTemplate to create.
74952    pub notebook_runtime_template: std::option::Option<crate::model::NotebookRuntimeTemplate>,
74953
74954    /// Optional. User specified ID for the notebook runtime template.
74955    pub notebook_runtime_template_id: std::string::String,
74956
74957    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
74958}
74959
74960#[cfg(feature = "notebook-service")]
74961impl CreateNotebookRuntimeTemplateRequest {
74962    pub fn new() -> Self {
74963        std::default::Default::default()
74964    }
74965
74966    /// Sets the value of [parent][crate::model::CreateNotebookRuntimeTemplateRequest::parent].
74967    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
74968        self.parent = v.into();
74969        self
74970    }
74971
74972    /// Sets the value of [notebook_runtime_template][crate::model::CreateNotebookRuntimeTemplateRequest::notebook_runtime_template].
74973    pub fn set_notebook_runtime_template<T>(mut self, v: T) -> Self
74974    where
74975        T: std::convert::Into<crate::model::NotebookRuntimeTemplate>,
74976    {
74977        self.notebook_runtime_template = std::option::Option::Some(v.into());
74978        self
74979    }
74980
74981    /// Sets or clears the value of [notebook_runtime_template][crate::model::CreateNotebookRuntimeTemplateRequest::notebook_runtime_template].
74982    pub fn set_or_clear_notebook_runtime_template<T>(mut self, v: std::option::Option<T>) -> Self
74983    where
74984        T: std::convert::Into<crate::model::NotebookRuntimeTemplate>,
74985    {
74986        self.notebook_runtime_template = v.map(|x| x.into());
74987        self
74988    }
74989
74990    /// Sets the value of [notebook_runtime_template_id][crate::model::CreateNotebookRuntimeTemplateRequest::notebook_runtime_template_id].
74991    pub fn set_notebook_runtime_template_id<T: std::convert::Into<std::string::String>>(
74992        mut self,
74993        v: T,
74994    ) -> Self {
74995        self.notebook_runtime_template_id = v.into();
74996        self
74997    }
74998}
74999
75000#[cfg(feature = "notebook-service")]
75001impl wkt::message::Message for CreateNotebookRuntimeTemplateRequest {
75002    fn typename() -> &'static str {
75003        "type.googleapis.com/google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest"
75004    }
75005}
75006
75007/// Metadata information for
75008/// [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.CreateNotebookRuntimeTemplate].
75009///
75010/// [google.cloud.aiplatform.v1.NotebookService.CreateNotebookRuntimeTemplate]: crate::client::NotebookService::create_notebook_runtime_template
75011#[cfg(feature = "notebook-service")]
75012#[derive(Clone, Default, PartialEq)]
75013#[non_exhaustive]
75014pub struct CreateNotebookRuntimeTemplateOperationMetadata {
75015    /// The operation generic information.
75016    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
75017
75018    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75019}
75020
75021#[cfg(feature = "notebook-service")]
75022impl CreateNotebookRuntimeTemplateOperationMetadata {
75023    pub fn new() -> Self {
75024        std::default::Default::default()
75025    }
75026
75027    /// Sets the value of [generic_metadata][crate::model::CreateNotebookRuntimeTemplateOperationMetadata::generic_metadata].
75028    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
75029    where
75030        T: std::convert::Into<crate::model::GenericOperationMetadata>,
75031    {
75032        self.generic_metadata = std::option::Option::Some(v.into());
75033        self
75034    }
75035
75036    /// Sets or clears the value of [generic_metadata][crate::model::CreateNotebookRuntimeTemplateOperationMetadata::generic_metadata].
75037    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
75038    where
75039        T: std::convert::Into<crate::model::GenericOperationMetadata>,
75040    {
75041        self.generic_metadata = v.map(|x| x.into());
75042        self
75043    }
75044}
75045
75046#[cfg(feature = "notebook-service")]
75047impl wkt::message::Message for CreateNotebookRuntimeTemplateOperationMetadata {
75048    fn typename() -> &'static str {
75049        "type.googleapis.com/google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata"
75050    }
75051}
75052
75053/// Request message for
75054/// [NotebookService.GetNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.GetNotebookRuntimeTemplate]
75055///
75056/// [google.cloud.aiplatform.v1.NotebookService.GetNotebookRuntimeTemplate]: crate::client::NotebookService::get_notebook_runtime_template
75057#[cfg(feature = "notebook-service")]
75058#[derive(Clone, Default, PartialEq)]
75059#[non_exhaustive]
75060pub struct GetNotebookRuntimeTemplateRequest {
75061    /// Required. The name of the NotebookRuntimeTemplate resource.
75062    /// Format:
75063    /// `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
75064    pub name: std::string::String,
75065
75066    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75067}
75068
75069#[cfg(feature = "notebook-service")]
75070impl GetNotebookRuntimeTemplateRequest {
75071    pub fn new() -> Self {
75072        std::default::Default::default()
75073    }
75074
75075    /// Sets the value of [name][crate::model::GetNotebookRuntimeTemplateRequest::name].
75076    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75077        self.name = v.into();
75078        self
75079    }
75080}
75081
75082#[cfg(feature = "notebook-service")]
75083impl wkt::message::Message for GetNotebookRuntimeTemplateRequest {
75084    fn typename() -> &'static str {
75085        "type.googleapis.com/google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest"
75086    }
75087}
75088
75089/// Request message for
75090/// [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates].
75091///
75092/// [google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]: crate::client::NotebookService::list_notebook_runtime_templates
75093#[cfg(feature = "notebook-service")]
75094#[derive(Clone, Default, PartialEq)]
75095#[non_exhaustive]
75096pub struct ListNotebookRuntimeTemplatesRequest {
75097    /// Required. The resource name of the Location from which to list the
75098    /// NotebookRuntimeTemplates.
75099    /// Format: `projects/{project}/locations/{location}`
75100    pub parent: std::string::String,
75101
75102    /// Optional. An expression for filtering the results of the request. For field
75103    /// names both snake_case and camelCase are supported.
75104    ///
75105    /// * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
75106    ///   represents the NotebookRuntimeTemplate ID,
75107    ///   i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
75108    ///   [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
75109    /// * `display_name` supports = and !=
75110    /// * `labels` supports general map functions that is:
75111    ///   * `labels.key=value` - key:value equality
75112    ///   * `labels.key:* or labels:key - key existence
75113    ///   * A key including a space must be quoted. `labels."a key"`.
75114    /// * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
75115    ///   [USER_DEFINED, ONE_CLICK].
75116    /// * `machineType` supports = and !=.
75117    /// * `acceleratorType` supports = and !=.
75118    ///
75119    /// Some examples:
75120    ///
75121    /// * `notebookRuntimeTemplate=notebookRuntimeTemplate123`
75122    /// * `displayName="myDisplayName"`
75123    /// * `labels.myKey="myValue"`
75124    /// * `notebookRuntimeType=USER_DEFINED`
75125    /// * `machineType=e2-standard-4`
75126    /// * `acceleratorType=NVIDIA_TESLA_T4`
75127    pub filter: std::string::String,
75128
75129    /// Optional. The standard list page size.
75130    pub page_size: i32,
75131
75132    /// Optional. The standard list page token.
75133    /// Typically obtained via
75134    /// [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token]
75135    /// of the previous
75136    /// [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]
75137    /// call.
75138    ///
75139    /// [google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token]: crate::model::ListNotebookRuntimeTemplatesResponse::next_page_token
75140    /// [google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]: crate::client::NotebookService::list_notebook_runtime_templates
75141    pub page_token: std::string::String,
75142
75143    /// Optional. Mask specifying which fields to read.
75144    pub read_mask: std::option::Option<wkt::FieldMask>,
75145
75146    /// Optional. A comma-separated list of fields to order by, sorted in ascending
75147    /// order. Use "desc" after a field name for descending. Supported fields:
75148    ///
75149    /// * `display_name`
75150    /// * `create_time`
75151    /// * `update_time`
75152    ///
75153    /// Example: `display_name, create_time desc`.
75154    pub order_by: std::string::String,
75155
75156    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75157}
75158
75159#[cfg(feature = "notebook-service")]
75160impl ListNotebookRuntimeTemplatesRequest {
75161    pub fn new() -> Self {
75162        std::default::Default::default()
75163    }
75164
75165    /// Sets the value of [parent][crate::model::ListNotebookRuntimeTemplatesRequest::parent].
75166    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75167        self.parent = v.into();
75168        self
75169    }
75170
75171    /// Sets the value of [filter][crate::model::ListNotebookRuntimeTemplatesRequest::filter].
75172    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75173        self.filter = v.into();
75174        self
75175    }
75176
75177    /// Sets the value of [page_size][crate::model::ListNotebookRuntimeTemplatesRequest::page_size].
75178    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
75179        self.page_size = v.into();
75180        self
75181    }
75182
75183    /// Sets the value of [page_token][crate::model::ListNotebookRuntimeTemplatesRequest::page_token].
75184    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75185        self.page_token = v.into();
75186        self
75187    }
75188
75189    /// Sets the value of [read_mask][crate::model::ListNotebookRuntimeTemplatesRequest::read_mask].
75190    pub fn set_read_mask<T>(mut self, v: T) -> Self
75191    where
75192        T: std::convert::Into<wkt::FieldMask>,
75193    {
75194        self.read_mask = std::option::Option::Some(v.into());
75195        self
75196    }
75197
75198    /// Sets or clears the value of [read_mask][crate::model::ListNotebookRuntimeTemplatesRequest::read_mask].
75199    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
75200    where
75201        T: std::convert::Into<wkt::FieldMask>,
75202    {
75203        self.read_mask = v.map(|x| x.into());
75204        self
75205    }
75206
75207    /// Sets the value of [order_by][crate::model::ListNotebookRuntimeTemplatesRequest::order_by].
75208    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75209        self.order_by = v.into();
75210        self
75211    }
75212}
75213
75214#[cfg(feature = "notebook-service")]
75215impl wkt::message::Message for ListNotebookRuntimeTemplatesRequest {
75216    fn typename() -> &'static str {
75217        "type.googleapis.com/google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest"
75218    }
75219}
75220
75221/// Response message for
75222/// [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates].
75223///
75224/// [google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]: crate::client::NotebookService::list_notebook_runtime_templates
75225#[cfg(feature = "notebook-service")]
75226#[derive(Clone, Default, PartialEq)]
75227#[non_exhaustive]
75228pub struct ListNotebookRuntimeTemplatesResponse {
75229    /// List of NotebookRuntimeTemplates in the requested page.
75230    pub notebook_runtime_templates: std::vec::Vec<crate::model::NotebookRuntimeTemplate>,
75231
75232    /// A token to retrieve next page of results.
75233    /// Pass to
75234    /// [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token]
75235    /// to obtain that page.
75236    ///
75237    /// [google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token]: crate::model::ListNotebookRuntimeTemplatesRequest::page_token
75238    pub next_page_token: std::string::String,
75239
75240    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75241}
75242
75243#[cfg(feature = "notebook-service")]
75244impl ListNotebookRuntimeTemplatesResponse {
75245    pub fn new() -> Self {
75246        std::default::Default::default()
75247    }
75248
75249    /// Sets the value of [notebook_runtime_templates][crate::model::ListNotebookRuntimeTemplatesResponse::notebook_runtime_templates].
75250    pub fn set_notebook_runtime_templates<T, V>(mut self, v: T) -> Self
75251    where
75252        T: std::iter::IntoIterator<Item = V>,
75253        V: std::convert::Into<crate::model::NotebookRuntimeTemplate>,
75254    {
75255        use std::iter::Iterator;
75256        self.notebook_runtime_templates = v.into_iter().map(|i| i.into()).collect();
75257        self
75258    }
75259
75260    /// Sets the value of [next_page_token][crate::model::ListNotebookRuntimeTemplatesResponse::next_page_token].
75261    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75262        self.next_page_token = v.into();
75263        self
75264    }
75265}
75266
75267#[cfg(feature = "notebook-service")]
75268impl wkt::message::Message for ListNotebookRuntimeTemplatesResponse {
75269    fn typename() -> &'static str {
75270        "type.googleapis.com/google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse"
75271    }
75272}
75273
75274#[cfg(feature = "notebook-service")]
75275#[doc(hidden)]
75276impl gax::paginator::internal::PageableResponse for ListNotebookRuntimeTemplatesResponse {
75277    type PageItem = crate::model::NotebookRuntimeTemplate;
75278
75279    fn items(self) -> std::vec::Vec<Self::PageItem> {
75280        self.notebook_runtime_templates
75281    }
75282
75283    fn next_page_token(&self) -> std::string::String {
75284        use std::clone::Clone;
75285        self.next_page_token.clone()
75286    }
75287}
75288
75289/// Request message for
75290/// [NotebookService.DeleteNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.DeleteNotebookRuntimeTemplate].
75291///
75292/// [google.cloud.aiplatform.v1.NotebookService.DeleteNotebookRuntimeTemplate]: crate::client::NotebookService::delete_notebook_runtime_template
75293#[cfg(feature = "notebook-service")]
75294#[derive(Clone, Default, PartialEq)]
75295#[non_exhaustive]
75296pub struct DeleteNotebookRuntimeTemplateRequest {
75297    /// Required. The name of the NotebookRuntimeTemplate resource to be deleted.
75298    /// Format:
75299    /// `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`
75300    pub name: std::string::String,
75301
75302    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75303}
75304
75305#[cfg(feature = "notebook-service")]
75306impl DeleteNotebookRuntimeTemplateRequest {
75307    pub fn new() -> Self {
75308        std::default::Default::default()
75309    }
75310
75311    /// Sets the value of [name][crate::model::DeleteNotebookRuntimeTemplateRequest::name].
75312    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75313        self.name = v.into();
75314        self
75315    }
75316}
75317
75318#[cfg(feature = "notebook-service")]
75319impl wkt::message::Message for DeleteNotebookRuntimeTemplateRequest {
75320    fn typename() -> &'static str {
75321        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest"
75322    }
75323}
75324
75325/// Request message for
75326/// [NotebookService.UpdateNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.UpdateNotebookRuntimeTemplate].
75327///
75328/// [google.cloud.aiplatform.v1.NotebookService.UpdateNotebookRuntimeTemplate]: crate::client::NotebookService::update_notebook_runtime_template
75329#[cfg(feature = "notebook-service")]
75330#[derive(Clone, Default, PartialEq)]
75331#[non_exhaustive]
75332pub struct UpdateNotebookRuntimeTemplateRequest {
75333    /// Required. The NotebookRuntimeTemplate to update.
75334    pub notebook_runtime_template: std::option::Option<crate::model::NotebookRuntimeTemplate>,
75335
75336    /// Required. The update mask applies to the resource.
75337    /// For the `FieldMask` definition, see
75338    /// [google.protobuf.FieldMask][google.protobuf.FieldMask]. Input format:
75339    /// `{paths: "${updated_filed}"}` Updatable fields:
75340    ///
75341    /// * `encryption_spec.kms_key_name`
75342    ///
75343    /// [google.protobuf.FieldMask]: wkt::FieldMask
75344    pub update_mask: std::option::Option<wkt::FieldMask>,
75345
75346    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75347}
75348
75349#[cfg(feature = "notebook-service")]
75350impl UpdateNotebookRuntimeTemplateRequest {
75351    pub fn new() -> Self {
75352        std::default::Default::default()
75353    }
75354
75355    /// Sets the value of [notebook_runtime_template][crate::model::UpdateNotebookRuntimeTemplateRequest::notebook_runtime_template].
75356    pub fn set_notebook_runtime_template<T>(mut self, v: T) -> Self
75357    where
75358        T: std::convert::Into<crate::model::NotebookRuntimeTemplate>,
75359    {
75360        self.notebook_runtime_template = std::option::Option::Some(v.into());
75361        self
75362    }
75363
75364    /// Sets or clears the value of [notebook_runtime_template][crate::model::UpdateNotebookRuntimeTemplateRequest::notebook_runtime_template].
75365    pub fn set_or_clear_notebook_runtime_template<T>(mut self, v: std::option::Option<T>) -> Self
75366    where
75367        T: std::convert::Into<crate::model::NotebookRuntimeTemplate>,
75368    {
75369        self.notebook_runtime_template = v.map(|x| x.into());
75370        self
75371    }
75372
75373    /// Sets the value of [update_mask][crate::model::UpdateNotebookRuntimeTemplateRequest::update_mask].
75374    pub fn set_update_mask<T>(mut self, v: T) -> Self
75375    where
75376        T: std::convert::Into<wkt::FieldMask>,
75377    {
75378        self.update_mask = std::option::Option::Some(v.into());
75379        self
75380    }
75381
75382    /// Sets or clears the value of [update_mask][crate::model::UpdateNotebookRuntimeTemplateRequest::update_mask].
75383    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
75384    where
75385        T: std::convert::Into<wkt::FieldMask>,
75386    {
75387        self.update_mask = v.map(|x| x.into());
75388        self
75389    }
75390}
75391
75392#[cfg(feature = "notebook-service")]
75393impl wkt::message::Message for UpdateNotebookRuntimeTemplateRequest {
75394    fn typename() -> &'static str {
75395        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateNotebookRuntimeTemplateRequest"
75396    }
75397}
75398
75399/// Request message for
75400/// [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.AssignNotebookRuntime].
75401///
75402/// [google.cloud.aiplatform.v1.NotebookService.AssignNotebookRuntime]: crate::client::NotebookService::assign_notebook_runtime
75403#[cfg(feature = "notebook-service")]
75404#[derive(Clone, Default, PartialEq)]
75405#[non_exhaustive]
75406pub struct AssignNotebookRuntimeRequest {
75407    /// Required. The resource name of the Location to get the NotebookRuntime
75408    /// assignment. Format: `projects/{project}/locations/{location}`
75409    pub parent: std::string::String,
75410
75411    /// Required. The resource name of the NotebookRuntimeTemplate based on which a
75412    /// NotebookRuntime will be assigned (reuse or create a new one).
75413    pub notebook_runtime_template: std::string::String,
75414
75415    /// Required. Provide runtime specific information (e.g. runtime owner,
75416    /// notebook id) used for NotebookRuntime assignment.
75417    pub notebook_runtime: std::option::Option<crate::model::NotebookRuntime>,
75418
75419    /// Optional. User specified ID for the notebook runtime.
75420    pub notebook_runtime_id: std::string::String,
75421
75422    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75423}
75424
75425#[cfg(feature = "notebook-service")]
75426impl AssignNotebookRuntimeRequest {
75427    pub fn new() -> Self {
75428        std::default::Default::default()
75429    }
75430
75431    /// Sets the value of [parent][crate::model::AssignNotebookRuntimeRequest::parent].
75432    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75433        self.parent = v.into();
75434        self
75435    }
75436
75437    /// Sets the value of [notebook_runtime_template][crate::model::AssignNotebookRuntimeRequest::notebook_runtime_template].
75438    pub fn set_notebook_runtime_template<T: std::convert::Into<std::string::String>>(
75439        mut self,
75440        v: T,
75441    ) -> Self {
75442        self.notebook_runtime_template = v.into();
75443        self
75444    }
75445
75446    /// Sets the value of [notebook_runtime][crate::model::AssignNotebookRuntimeRequest::notebook_runtime].
75447    pub fn set_notebook_runtime<T>(mut self, v: T) -> Self
75448    where
75449        T: std::convert::Into<crate::model::NotebookRuntime>,
75450    {
75451        self.notebook_runtime = std::option::Option::Some(v.into());
75452        self
75453    }
75454
75455    /// Sets or clears the value of [notebook_runtime][crate::model::AssignNotebookRuntimeRequest::notebook_runtime].
75456    pub fn set_or_clear_notebook_runtime<T>(mut self, v: std::option::Option<T>) -> Self
75457    where
75458        T: std::convert::Into<crate::model::NotebookRuntime>,
75459    {
75460        self.notebook_runtime = v.map(|x| x.into());
75461        self
75462    }
75463
75464    /// Sets the value of [notebook_runtime_id][crate::model::AssignNotebookRuntimeRequest::notebook_runtime_id].
75465    pub fn set_notebook_runtime_id<T: std::convert::Into<std::string::String>>(
75466        mut self,
75467        v: T,
75468    ) -> Self {
75469        self.notebook_runtime_id = v.into();
75470        self
75471    }
75472}
75473
75474#[cfg(feature = "notebook-service")]
75475impl wkt::message::Message for AssignNotebookRuntimeRequest {
75476    fn typename() -> &'static str {
75477        "type.googleapis.com/google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest"
75478    }
75479}
75480
75481/// Metadata information for
75482/// [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.AssignNotebookRuntime].
75483///
75484/// [google.cloud.aiplatform.v1.NotebookService.AssignNotebookRuntime]: crate::client::NotebookService::assign_notebook_runtime
75485#[cfg(feature = "notebook-service")]
75486#[derive(Clone, Default, PartialEq)]
75487#[non_exhaustive]
75488pub struct AssignNotebookRuntimeOperationMetadata {
75489    /// The operation generic information.
75490    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
75491
75492    /// A human-readable message that shows the intermediate progress details of
75493    /// NotebookRuntime.
75494    pub progress_message: std::string::String,
75495
75496    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75497}
75498
75499#[cfg(feature = "notebook-service")]
75500impl AssignNotebookRuntimeOperationMetadata {
75501    pub fn new() -> Self {
75502        std::default::Default::default()
75503    }
75504
75505    /// Sets the value of [generic_metadata][crate::model::AssignNotebookRuntimeOperationMetadata::generic_metadata].
75506    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
75507    where
75508        T: std::convert::Into<crate::model::GenericOperationMetadata>,
75509    {
75510        self.generic_metadata = std::option::Option::Some(v.into());
75511        self
75512    }
75513
75514    /// Sets or clears the value of [generic_metadata][crate::model::AssignNotebookRuntimeOperationMetadata::generic_metadata].
75515    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
75516    where
75517        T: std::convert::Into<crate::model::GenericOperationMetadata>,
75518    {
75519        self.generic_metadata = v.map(|x| x.into());
75520        self
75521    }
75522
75523    /// Sets the value of [progress_message][crate::model::AssignNotebookRuntimeOperationMetadata::progress_message].
75524    pub fn set_progress_message<T: std::convert::Into<std::string::String>>(
75525        mut self,
75526        v: T,
75527    ) -> Self {
75528        self.progress_message = v.into();
75529        self
75530    }
75531}
75532
75533#[cfg(feature = "notebook-service")]
75534impl wkt::message::Message for AssignNotebookRuntimeOperationMetadata {
75535    fn typename() -> &'static str {
75536        "type.googleapis.com/google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata"
75537    }
75538}
75539
75540/// Request message for
75541/// [NotebookService.GetNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.GetNotebookRuntime]
75542///
75543/// [google.cloud.aiplatform.v1.NotebookService.GetNotebookRuntime]: crate::client::NotebookService::get_notebook_runtime
75544#[cfg(feature = "notebook-service")]
75545#[derive(Clone, Default, PartialEq)]
75546#[non_exhaustive]
75547pub struct GetNotebookRuntimeRequest {
75548    /// Required. The name of the NotebookRuntime resource.
75549    /// Instead of checking whether the name is in valid NotebookRuntime resource
75550    /// name format, directly throw NotFound exception if there is no such
75551    /// NotebookRuntime in spanner.
75552    pub name: std::string::String,
75553
75554    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75555}
75556
75557#[cfg(feature = "notebook-service")]
75558impl GetNotebookRuntimeRequest {
75559    pub fn new() -> Self {
75560        std::default::Default::default()
75561    }
75562
75563    /// Sets the value of [name][crate::model::GetNotebookRuntimeRequest::name].
75564    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75565        self.name = v.into();
75566        self
75567    }
75568}
75569
75570#[cfg(feature = "notebook-service")]
75571impl wkt::message::Message for GetNotebookRuntimeRequest {
75572    fn typename() -> &'static str {
75573        "type.googleapis.com/google.cloud.aiplatform.v1.GetNotebookRuntimeRequest"
75574    }
75575}
75576
75577/// Request message for
75578/// [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes].
75579///
75580/// [google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]: crate::client::NotebookService::list_notebook_runtimes
75581#[cfg(feature = "notebook-service")]
75582#[derive(Clone, Default, PartialEq)]
75583#[non_exhaustive]
75584pub struct ListNotebookRuntimesRequest {
75585    /// Required. The resource name of the Location from which to list the
75586    /// NotebookRuntimes.
75587    /// Format: `projects/{project}/locations/{location}`
75588    pub parent: std::string::String,
75589
75590    /// Optional. An expression for filtering the results of the request. For field
75591    /// names both snake_case and camelCase are supported.
75592    ///
75593    /// * `notebookRuntime` supports = and !=. `notebookRuntime` represents the
75594    ///   NotebookRuntime ID,
75595    ///   i.e. the last segment of the NotebookRuntime's [resource name]
75596    ///   [google.cloud.aiplatform.v1.NotebookRuntime.name].
75597    /// * `displayName` supports = and != and regex.
75598    /// * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate`
75599    ///   represents the NotebookRuntimeTemplate ID,
75600    ///   i.e. the last segment of the NotebookRuntimeTemplate's [resource name]
75601    ///   [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
75602    /// * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY,
75603    ///   HEALTH_STATE_UNSPECIFIED].
75604    /// * `runtimeState` supports = and !=. runtimeState enum:
75605    ///   [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED,
75606    ///   STOPPED, BEING_UPGRADED, ERROR, INVALID].
75607    /// * `runtimeUser` supports = and !=.
75608    /// * API version is UI only: `uiState` supports = and !=. uiState enum:
75609    ///   [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED,
75610    ///   UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED,
75611    ///   UI_RESOURCE_STATE_CREATION_FAILED].
75612    /// * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum:
75613    ///   [USER_DEFINED, ONE_CLICK].
75614    /// * `machineType` supports = and !=.
75615    /// * `acceleratorType` supports = and !=.
75616    ///
75617    /// Some examples:
75618    ///
75619    /// * `notebookRuntime="notebookRuntime123"`
75620    /// * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
75621    /// * `notebookRuntimeTemplate="notebookRuntimeTemplate321"`
75622    /// * `healthState=HEALTHY`
75623    /// * `runtimeState=RUNNING`
75624    /// * `runtimeUser="test@google.com"`
75625    /// * `uiState=UI_RESOURCE_STATE_BEING_DELETED`
75626    /// * `notebookRuntimeType=USER_DEFINED`
75627    /// * `machineType=e2-standard-4`
75628    /// * `acceleratorType=NVIDIA_TESLA_T4`
75629    pub filter: std::string::String,
75630
75631    /// Optional. The standard list page size.
75632    pub page_size: i32,
75633
75634    /// Optional. The standard list page token.
75635    /// Typically obtained via
75636    /// [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token]
75637    /// of the previous
75638    /// [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]
75639    /// call.
75640    ///
75641    /// [google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token]: crate::model::ListNotebookRuntimesResponse::next_page_token
75642    /// [google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]: crate::client::NotebookService::list_notebook_runtimes
75643    pub page_token: std::string::String,
75644
75645    /// Optional. Mask specifying which fields to read.
75646    pub read_mask: std::option::Option<wkt::FieldMask>,
75647
75648    /// Optional. A comma-separated list of fields to order by, sorted in ascending
75649    /// order. Use "desc" after a field name for descending. Supported fields:
75650    ///
75651    /// * `display_name`
75652    /// * `create_time`
75653    /// * `update_time`
75654    ///
75655    /// Example: `display_name, create_time desc`.
75656    pub order_by: std::string::String,
75657
75658    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75659}
75660
75661#[cfg(feature = "notebook-service")]
75662impl ListNotebookRuntimesRequest {
75663    pub fn new() -> Self {
75664        std::default::Default::default()
75665    }
75666
75667    /// Sets the value of [parent][crate::model::ListNotebookRuntimesRequest::parent].
75668    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75669        self.parent = v.into();
75670        self
75671    }
75672
75673    /// Sets the value of [filter][crate::model::ListNotebookRuntimesRequest::filter].
75674    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75675        self.filter = v.into();
75676        self
75677    }
75678
75679    /// Sets the value of [page_size][crate::model::ListNotebookRuntimesRequest::page_size].
75680    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
75681        self.page_size = v.into();
75682        self
75683    }
75684
75685    /// Sets the value of [page_token][crate::model::ListNotebookRuntimesRequest::page_token].
75686    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75687        self.page_token = v.into();
75688        self
75689    }
75690
75691    /// Sets the value of [read_mask][crate::model::ListNotebookRuntimesRequest::read_mask].
75692    pub fn set_read_mask<T>(mut self, v: T) -> Self
75693    where
75694        T: std::convert::Into<wkt::FieldMask>,
75695    {
75696        self.read_mask = std::option::Option::Some(v.into());
75697        self
75698    }
75699
75700    /// Sets or clears the value of [read_mask][crate::model::ListNotebookRuntimesRequest::read_mask].
75701    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
75702    where
75703        T: std::convert::Into<wkt::FieldMask>,
75704    {
75705        self.read_mask = v.map(|x| x.into());
75706        self
75707    }
75708
75709    /// Sets the value of [order_by][crate::model::ListNotebookRuntimesRequest::order_by].
75710    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75711        self.order_by = v.into();
75712        self
75713    }
75714}
75715
75716#[cfg(feature = "notebook-service")]
75717impl wkt::message::Message for ListNotebookRuntimesRequest {
75718    fn typename() -> &'static str {
75719        "type.googleapis.com/google.cloud.aiplatform.v1.ListNotebookRuntimesRequest"
75720    }
75721}
75722
75723/// Response message for
75724/// [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes].
75725///
75726/// [google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]: crate::client::NotebookService::list_notebook_runtimes
75727#[cfg(feature = "notebook-service")]
75728#[derive(Clone, Default, PartialEq)]
75729#[non_exhaustive]
75730pub struct ListNotebookRuntimesResponse {
75731    /// List of NotebookRuntimes in the requested page.
75732    pub notebook_runtimes: std::vec::Vec<crate::model::NotebookRuntime>,
75733
75734    /// A token to retrieve next page of results.
75735    /// Pass to
75736    /// [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token]
75737    /// to obtain that page.
75738    ///
75739    /// [google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token]: crate::model::ListNotebookRuntimesRequest::page_token
75740    pub next_page_token: std::string::String,
75741
75742    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75743}
75744
75745#[cfg(feature = "notebook-service")]
75746impl ListNotebookRuntimesResponse {
75747    pub fn new() -> Self {
75748        std::default::Default::default()
75749    }
75750
75751    /// Sets the value of [notebook_runtimes][crate::model::ListNotebookRuntimesResponse::notebook_runtimes].
75752    pub fn set_notebook_runtimes<T, V>(mut self, v: T) -> Self
75753    where
75754        T: std::iter::IntoIterator<Item = V>,
75755        V: std::convert::Into<crate::model::NotebookRuntime>,
75756    {
75757        use std::iter::Iterator;
75758        self.notebook_runtimes = v.into_iter().map(|i| i.into()).collect();
75759        self
75760    }
75761
75762    /// Sets the value of [next_page_token][crate::model::ListNotebookRuntimesResponse::next_page_token].
75763    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75764        self.next_page_token = v.into();
75765        self
75766    }
75767}
75768
75769#[cfg(feature = "notebook-service")]
75770impl wkt::message::Message for ListNotebookRuntimesResponse {
75771    fn typename() -> &'static str {
75772        "type.googleapis.com/google.cloud.aiplatform.v1.ListNotebookRuntimesResponse"
75773    }
75774}
75775
75776#[cfg(feature = "notebook-service")]
75777#[doc(hidden)]
75778impl gax::paginator::internal::PageableResponse for ListNotebookRuntimesResponse {
75779    type PageItem = crate::model::NotebookRuntime;
75780
75781    fn items(self) -> std::vec::Vec<Self::PageItem> {
75782        self.notebook_runtimes
75783    }
75784
75785    fn next_page_token(&self) -> std::string::String {
75786        use std::clone::Clone;
75787        self.next_page_token.clone()
75788    }
75789}
75790
75791/// Request message for
75792/// [NotebookService.DeleteNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.DeleteNotebookRuntime].
75793///
75794/// [google.cloud.aiplatform.v1.NotebookService.DeleteNotebookRuntime]: crate::client::NotebookService::delete_notebook_runtime
75795#[cfg(feature = "notebook-service")]
75796#[derive(Clone, Default, PartialEq)]
75797#[non_exhaustive]
75798pub struct DeleteNotebookRuntimeRequest {
75799    /// Required. The name of the NotebookRuntime resource to be deleted.
75800    /// Instead of checking whether the name is in valid NotebookRuntime resource
75801    /// name format, directly throw NotFound exception if there is no such
75802    /// NotebookRuntime in spanner.
75803    pub name: std::string::String,
75804
75805    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75806}
75807
75808#[cfg(feature = "notebook-service")]
75809impl DeleteNotebookRuntimeRequest {
75810    pub fn new() -> Self {
75811        std::default::Default::default()
75812    }
75813
75814    /// Sets the value of [name][crate::model::DeleteNotebookRuntimeRequest::name].
75815    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75816        self.name = v.into();
75817        self
75818    }
75819}
75820
75821#[cfg(feature = "notebook-service")]
75822impl wkt::message::Message for DeleteNotebookRuntimeRequest {
75823    fn typename() -> &'static str {
75824        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest"
75825    }
75826}
75827
75828/// Request message for
75829/// [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime].
75830///
75831/// [google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime]: crate::client::NotebookService::upgrade_notebook_runtime
75832#[cfg(feature = "notebook-service")]
75833#[derive(Clone, Default, PartialEq)]
75834#[non_exhaustive]
75835pub struct UpgradeNotebookRuntimeRequest {
75836    /// Required. The name of the NotebookRuntime resource to be upgrade.
75837    /// Instead of checking whether the name is in valid NotebookRuntime resource
75838    /// name format, directly throw NotFound exception if there is no such
75839    /// NotebookRuntime in spanner.
75840    pub name: std::string::String,
75841
75842    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75843}
75844
75845#[cfg(feature = "notebook-service")]
75846impl UpgradeNotebookRuntimeRequest {
75847    pub fn new() -> Self {
75848        std::default::Default::default()
75849    }
75850
75851    /// Sets the value of [name][crate::model::UpgradeNotebookRuntimeRequest::name].
75852    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75853        self.name = v.into();
75854        self
75855    }
75856}
75857
75858#[cfg(feature = "notebook-service")]
75859impl wkt::message::Message for UpgradeNotebookRuntimeRequest {
75860    fn typename() -> &'static str {
75861        "type.googleapis.com/google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest"
75862    }
75863}
75864
75865/// Metadata information for
75866/// [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime].
75867///
75868/// [google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime]: crate::client::NotebookService::upgrade_notebook_runtime
75869#[cfg(feature = "notebook-service")]
75870#[derive(Clone, Default, PartialEq)]
75871#[non_exhaustive]
75872pub struct UpgradeNotebookRuntimeOperationMetadata {
75873    /// The operation generic information.
75874    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
75875
75876    /// A human-readable message that shows the intermediate progress details of
75877    /// NotebookRuntime.
75878    pub progress_message: std::string::String,
75879
75880    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75881}
75882
75883#[cfg(feature = "notebook-service")]
75884impl UpgradeNotebookRuntimeOperationMetadata {
75885    pub fn new() -> Self {
75886        std::default::Default::default()
75887    }
75888
75889    /// Sets the value of [generic_metadata][crate::model::UpgradeNotebookRuntimeOperationMetadata::generic_metadata].
75890    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
75891    where
75892        T: std::convert::Into<crate::model::GenericOperationMetadata>,
75893    {
75894        self.generic_metadata = std::option::Option::Some(v.into());
75895        self
75896    }
75897
75898    /// Sets or clears the value of [generic_metadata][crate::model::UpgradeNotebookRuntimeOperationMetadata::generic_metadata].
75899    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
75900    where
75901        T: std::convert::Into<crate::model::GenericOperationMetadata>,
75902    {
75903        self.generic_metadata = v.map(|x| x.into());
75904        self
75905    }
75906
75907    /// Sets the value of [progress_message][crate::model::UpgradeNotebookRuntimeOperationMetadata::progress_message].
75908    pub fn set_progress_message<T: std::convert::Into<std::string::String>>(
75909        mut self,
75910        v: T,
75911    ) -> Self {
75912        self.progress_message = v.into();
75913        self
75914    }
75915}
75916
75917#[cfg(feature = "notebook-service")]
75918impl wkt::message::Message for UpgradeNotebookRuntimeOperationMetadata {
75919    fn typename() -> &'static str {
75920        "type.googleapis.com/google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata"
75921    }
75922}
75923
75924/// Response message for
75925/// [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime].
75926///
75927/// [google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime]: crate::client::NotebookService::upgrade_notebook_runtime
75928#[cfg(feature = "notebook-service")]
75929#[derive(Clone, Default, PartialEq)]
75930#[non_exhaustive]
75931pub struct UpgradeNotebookRuntimeResponse {
75932    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75933}
75934
75935#[cfg(feature = "notebook-service")]
75936impl UpgradeNotebookRuntimeResponse {
75937    pub fn new() -> Self {
75938        std::default::Default::default()
75939    }
75940}
75941
75942#[cfg(feature = "notebook-service")]
75943impl wkt::message::Message for UpgradeNotebookRuntimeResponse {
75944    fn typename() -> &'static str {
75945        "type.googleapis.com/google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse"
75946    }
75947}
75948
75949/// Request message for
75950/// [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime].
75951///
75952/// [google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime]: crate::client::NotebookService::start_notebook_runtime
75953#[cfg(feature = "notebook-service")]
75954#[derive(Clone, Default, PartialEq)]
75955#[non_exhaustive]
75956pub struct StartNotebookRuntimeRequest {
75957    /// Required. The name of the NotebookRuntime resource to be started.
75958    /// Instead of checking whether the name is in valid NotebookRuntime resource
75959    /// name format, directly throw NotFound exception if there is no such
75960    /// NotebookRuntime in spanner.
75961    pub name: std::string::String,
75962
75963    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
75964}
75965
75966#[cfg(feature = "notebook-service")]
75967impl StartNotebookRuntimeRequest {
75968    pub fn new() -> Self {
75969        std::default::Default::default()
75970    }
75971
75972    /// Sets the value of [name][crate::model::StartNotebookRuntimeRequest::name].
75973    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
75974        self.name = v.into();
75975        self
75976    }
75977}
75978
75979#[cfg(feature = "notebook-service")]
75980impl wkt::message::Message for StartNotebookRuntimeRequest {
75981    fn typename() -> &'static str {
75982        "type.googleapis.com/google.cloud.aiplatform.v1.StartNotebookRuntimeRequest"
75983    }
75984}
75985
75986/// Metadata information for
75987/// [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime].
75988///
75989/// [google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime]: crate::client::NotebookService::start_notebook_runtime
75990#[cfg(feature = "notebook-service")]
75991#[derive(Clone, Default, PartialEq)]
75992#[non_exhaustive]
75993pub struct StartNotebookRuntimeOperationMetadata {
75994    /// The operation generic information.
75995    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
75996
75997    /// A human-readable message that shows the intermediate progress details of
75998    /// NotebookRuntime.
75999    pub progress_message: std::string::String,
76000
76001    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
76002}
76003
76004#[cfg(feature = "notebook-service")]
76005impl StartNotebookRuntimeOperationMetadata {
76006    pub fn new() -> Self {
76007        std::default::Default::default()
76008    }
76009
76010    /// Sets the value of [generic_metadata][crate::model::StartNotebookRuntimeOperationMetadata::generic_metadata].
76011    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
76012    where
76013        T: std::convert::Into<crate::model::GenericOperationMetadata>,
76014    {
76015        self.generic_metadata = std::option::Option::Some(v.into());
76016        self
76017    }
76018
76019    /// Sets or clears the value of [generic_metadata][crate::model::StartNotebookRuntimeOperationMetadata::generic_metadata].
76020    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
76021    where
76022        T: std::convert::Into<crate::model::GenericOperationMetadata>,
76023    {
76024        self.generic_metadata = v.map(|x| x.into());
76025        self
76026    }
76027
76028    /// Sets the value of [progress_message][crate::model::StartNotebookRuntimeOperationMetadata::progress_message].
76029    pub fn set_progress_message<T: std::convert::Into<std::string::String>>(
76030        mut self,
76031        v: T,
76032    ) -> Self {
76033        self.progress_message = v.into();
76034        self
76035    }
76036}
76037
76038#[cfg(feature = "notebook-service")]
76039impl wkt::message::Message for StartNotebookRuntimeOperationMetadata {
76040    fn typename() -> &'static str {
76041        "type.googleapis.com/google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata"
76042    }
76043}
76044
76045/// Response message for
76046/// [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime].
76047///
76048/// [google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime]: crate::client::NotebookService::start_notebook_runtime
76049#[cfg(feature = "notebook-service")]
76050#[derive(Clone, Default, PartialEq)]
76051#[non_exhaustive]
76052pub struct StartNotebookRuntimeResponse {
76053    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
76054}
76055
76056#[cfg(feature = "notebook-service")]
76057impl StartNotebookRuntimeResponse {
76058    pub fn new() -> Self {
76059        std::default::Default::default()
76060    }
76061}
76062
76063#[cfg(feature = "notebook-service")]
76064impl wkt::message::Message for StartNotebookRuntimeResponse {
76065    fn typename() -> &'static str {
76066        "type.googleapis.com/google.cloud.aiplatform.v1.StartNotebookRuntimeResponse"
76067    }
76068}
76069
76070/// Request message for
76071/// [NotebookService.StopNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StopNotebookRuntime].
76072///
76073/// [google.cloud.aiplatform.v1.NotebookService.StopNotebookRuntime]: crate::client::NotebookService::stop_notebook_runtime
76074#[cfg(feature = "notebook-service")]
76075#[derive(Clone, Default, PartialEq)]
76076#[non_exhaustive]
76077pub struct StopNotebookRuntimeRequest {
76078    /// Required. The name of the NotebookRuntime resource to be stopped.
76079    /// Instead of checking whether the name is in valid NotebookRuntime resource
76080    /// name format, directly throw NotFound exception if there is no such
76081    /// NotebookRuntime in spanner.
76082    pub name: std::string::String,
76083
76084    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
76085}
76086
76087#[cfg(feature = "notebook-service")]
76088impl StopNotebookRuntimeRequest {
76089    pub fn new() -> Self {
76090        std::default::Default::default()
76091    }
76092
76093    /// Sets the value of [name][crate::model::StopNotebookRuntimeRequest::name].
76094    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
76095        self.name = v.into();
76096        self
76097    }
76098}
76099
76100#[cfg(feature = "notebook-service")]
76101impl wkt::message::Message for StopNotebookRuntimeRequest {
76102    fn typename() -> &'static str {
76103        "type.googleapis.com/google.cloud.aiplatform.v1.StopNotebookRuntimeRequest"
76104    }
76105}
76106
76107/// Metadata information for
76108/// [NotebookService.StopNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StopNotebookRuntime].
76109///
76110/// [google.cloud.aiplatform.v1.NotebookService.StopNotebookRuntime]: crate::client::NotebookService::stop_notebook_runtime
76111#[cfg(feature = "notebook-service")]
76112#[derive(Clone, Default, PartialEq)]
76113#[non_exhaustive]
76114pub struct StopNotebookRuntimeOperationMetadata {
76115    /// The operation generic information.
76116    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
76117
76118    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
76119}
76120
76121#[cfg(feature = "notebook-service")]
76122impl StopNotebookRuntimeOperationMetadata {
76123    pub fn new() -> Self {
76124        std::default::Default::default()
76125    }
76126
76127    /// Sets the value of [generic_metadata][crate::model::StopNotebookRuntimeOperationMetadata::generic_metadata].
76128    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
76129    where
76130        T: std::convert::Into<crate::model::GenericOperationMetadata>,
76131    {
76132        self.generic_metadata = std::option::Option::Some(v.into());
76133        self
76134    }
76135
76136    /// Sets or clears the value of [generic_metadata][crate::model::StopNotebookRuntimeOperationMetadata::generic_metadata].
76137    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
76138    where
76139        T: std::convert::Into<crate::model::GenericOperationMetadata>,
76140    {
76141        self.generic_metadata = v.map(|x| x.into());
76142        self
76143    }
76144}
76145
76146#[cfg(feature = "notebook-service")]
76147impl wkt::message::Message for StopNotebookRuntimeOperationMetadata {
76148    fn typename() -> &'static str {
76149        "type.googleapis.com/google.cloud.aiplatform.v1.StopNotebookRuntimeOperationMetadata"
76150    }
76151}
76152
76153/// Response message for
76154/// [NotebookService.StopNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StopNotebookRuntime].
76155///
76156/// [google.cloud.aiplatform.v1.NotebookService.StopNotebookRuntime]: crate::client::NotebookService::stop_notebook_runtime
76157#[cfg(feature = "notebook-service")]
76158#[derive(Clone, Default, PartialEq)]
76159#[non_exhaustive]
76160pub struct StopNotebookRuntimeResponse {
76161    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
76162}
76163
76164#[cfg(feature = "notebook-service")]
76165impl StopNotebookRuntimeResponse {
76166    pub fn new() -> Self {
76167        std::default::Default::default()
76168    }
76169}
76170
76171#[cfg(feature = "notebook-service")]
76172impl wkt::message::Message for StopNotebookRuntimeResponse {
76173    fn typename() -> &'static str {
76174        "type.googleapis.com/google.cloud.aiplatform.v1.StopNotebookRuntimeResponse"
76175    }
76176}
76177
76178/// Request message for [NotebookService.CreateNotebookExecutionJob]
76179#[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
76180#[derive(Clone, Default, PartialEq)]
76181#[non_exhaustive]
76182pub struct CreateNotebookExecutionJobRequest {
76183    /// Required. The resource name of the Location to create the
76184    /// NotebookExecutionJob. Format: `projects/{project}/locations/{location}`
76185    pub parent: std::string::String,
76186
76187    /// Required. The NotebookExecutionJob to create.
76188    pub notebook_execution_job: std::option::Option<crate::model::NotebookExecutionJob>,
76189
76190    /// Optional. User specified ID for the NotebookExecutionJob.
76191    pub notebook_execution_job_id: std::string::String,
76192
76193    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
76194}
76195
76196#[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
76197impl CreateNotebookExecutionJobRequest {
76198    pub fn new() -> Self {
76199        std::default::Default::default()
76200    }
76201
76202    /// Sets the value of [parent][crate::model::CreateNotebookExecutionJobRequest::parent].
76203    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
76204        self.parent = v.into();
76205        self
76206    }
76207
76208    /// Sets the value of [notebook_execution_job][crate::model::CreateNotebookExecutionJobRequest::notebook_execution_job].
76209    pub fn set_notebook_execution_job<T>(mut self, v: T) -> Self
76210    where
76211        T: std::convert::Into<crate::model::NotebookExecutionJob>,
76212    {
76213        self.notebook_execution_job = std::option::Option::Some(v.into());
76214        self
76215    }
76216
76217    /// Sets or clears the value of [notebook_execution_job][crate::model::CreateNotebookExecutionJobRequest::notebook_execution_job].
76218    pub fn set_or_clear_notebook_execution_job<T>(mut self, v: std::option::Option<T>) -> Self
76219    where
76220        T: std::convert::Into<crate::model::NotebookExecutionJob>,
76221    {
76222        self.notebook_execution_job = v.map(|x| x.into());
76223        self
76224    }
76225
76226    /// Sets the value of [notebook_execution_job_id][crate::model::CreateNotebookExecutionJobRequest::notebook_execution_job_id].
76227    pub fn set_notebook_execution_job_id<T: std::convert::Into<std::string::String>>(
76228        mut self,
76229        v: T,
76230    ) -> Self {
76231        self.notebook_execution_job_id = v.into();
76232        self
76233    }
76234}
76235
76236#[cfg(any(feature = "notebook-service", feature = "schedule-service",))]
76237impl wkt::message::Message for CreateNotebookExecutionJobRequest {
76238    fn typename() -> &'static str {
76239        "type.googleapis.com/google.cloud.aiplatform.v1.CreateNotebookExecutionJobRequest"
76240    }
76241}
76242
76243/// Metadata information for
76244/// [NotebookService.CreateNotebookExecutionJob][google.cloud.aiplatform.v1.NotebookService.CreateNotebookExecutionJob].
76245///
76246/// [google.cloud.aiplatform.v1.NotebookService.CreateNotebookExecutionJob]: crate::client::NotebookService::create_notebook_execution_job
76247#[cfg(feature = "notebook-service")]
76248#[derive(Clone, Default, PartialEq)]
76249#[non_exhaustive]
76250pub struct CreateNotebookExecutionJobOperationMetadata {
76251    /// The operation generic information.
76252    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
76253
76254    /// A human-readable message that shows the intermediate progress details of
76255    /// NotebookRuntime.
76256    pub progress_message: std::string::String,
76257
76258    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
76259}
76260
76261#[cfg(feature = "notebook-service")]
76262impl CreateNotebookExecutionJobOperationMetadata {
76263    pub fn new() -> Self {
76264        std::default::Default::default()
76265    }
76266
76267    /// Sets the value of [generic_metadata][crate::model::CreateNotebookExecutionJobOperationMetadata::generic_metadata].
76268    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
76269    where
76270        T: std::convert::Into<crate::model::GenericOperationMetadata>,
76271    {
76272        self.generic_metadata = std::option::Option::Some(v.into());
76273        self
76274    }
76275
76276    /// Sets or clears the value of [generic_metadata][crate::model::CreateNotebookExecutionJobOperationMetadata::generic_metadata].
76277    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
76278    where
76279        T: std::convert::Into<crate::model::GenericOperationMetadata>,
76280    {
76281        self.generic_metadata = v.map(|x| x.into());
76282        self
76283    }
76284
76285    /// Sets the value of [progress_message][crate::model::CreateNotebookExecutionJobOperationMetadata::progress_message].
76286    pub fn set_progress_message<T: std::convert::Into<std::string::String>>(
76287        mut self,
76288        v: T,
76289    ) -> Self {
76290        self.progress_message = v.into();
76291        self
76292    }
76293}
76294
76295#[cfg(feature = "notebook-service")]
76296impl wkt::message::Message for CreateNotebookExecutionJobOperationMetadata {
76297    fn typename() -> &'static str {
76298        "type.googleapis.com/google.cloud.aiplatform.v1.CreateNotebookExecutionJobOperationMetadata"
76299    }
76300}
76301
76302/// Request message for [NotebookService.GetNotebookExecutionJob]
76303#[cfg(feature = "notebook-service")]
76304#[derive(Clone, Default, PartialEq)]
76305#[non_exhaustive]
76306pub struct GetNotebookExecutionJobRequest {
76307    /// Required. The name of the NotebookExecutionJob resource.
76308    pub name: std::string::String,
76309
76310    /// Optional. The NotebookExecutionJob view. Defaults to BASIC.
76311    pub view: crate::model::NotebookExecutionJobView,
76312
76313    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
76314}
76315
76316#[cfg(feature = "notebook-service")]
76317impl GetNotebookExecutionJobRequest {
76318    pub fn new() -> Self {
76319        std::default::Default::default()
76320    }
76321
76322    /// Sets the value of [name][crate::model::GetNotebookExecutionJobRequest::name].
76323    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
76324        self.name = v.into();
76325        self
76326    }
76327
76328    /// Sets the value of [view][crate::model::GetNotebookExecutionJobRequest::view].
76329    pub fn set_view<T: std::convert::Into<crate::model::NotebookExecutionJobView>>(
76330        mut self,
76331        v: T,
76332    ) -> Self {
76333        self.view = v.into();
76334        self
76335    }
76336}
76337
76338#[cfg(feature = "notebook-service")]
76339impl wkt::message::Message for GetNotebookExecutionJobRequest {
76340    fn typename() -> &'static str {
76341        "type.googleapis.com/google.cloud.aiplatform.v1.GetNotebookExecutionJobRequest"
76342    }
76343}
76344
76345/// Request message for [NotebookService.ListNotebookExecutionJobs]
76346#[cfg(feature = "notebook-service")]
76347#[derive(Clone, Default, PartialEq)]
76348#[non_exhaustive]
76349pub struct ListNotebookExecutionJobsRequest {
76350    /// Required. The resource name of the Location from which to list the
76351    /// NotebookExecutionJobs.
76352    /// Format: `projects/{project}/locations/{location}`
76353    pub parent: std::string::String,
76354
76355    /// Optional. An expression for filtering the results of the request. For field
76356    /// names both snake_case and camelCase are supported.
76357    ///
76358    /// * `notebookExecutionJob` supports = and !=. `notebookExecutionJob`
76359    ///   represents the NotebookExecutionJob ID.
76360    /// * `displayName` supports = and != and regex.
76361    /// * `schedule` supports = and != and regex.
76362    ///
76363    /// Some examples:
76364    ///
76365    /// * `notebookExecutionJob="123"`
76366    /// * `notebookExecutionJob="my-execution-job"`
76367    /// * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"`
76368    pub filter: std::string::String,
76369
76370    /// Optional. The standard list page size.
76371    pub page_size: i32,
76372
76373    /// Optional. The standard list page token.
76374    /// Typically obtained via
76375    /// [ListNotebookExecutionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookExecutionJobsResponse.next_page_token]
76376    /// of the previous
76377    /// [NotebookService.ListNotebookExecutionJobs][google.cloud.aiplatform.v1.NotebookService.ListNotebookExecutionJobs]
76378    /// call.
76379    ///
76380    /// [google.cloud.aiplatform.v1.ListNotebookExecutionJobsResponse.next_page_token]: crate::model::ListNotebookExecutionJobsResponse::next_page_token
76381    /// [google.cloud.aiplatform.v1.NotebookService.ListNotebookExecutionJobs]: crate::client::NotebookService::list_notebook_execution_jobs
76382    pub page_token: std::string::String,
76383
76384    /// Optional. A comma-separated list of fields to order by, sorted in ascending
76385    /// order. Use "desc" after a field name for descending. Supported fields:
76386    ///
76387    /// * `display_name`
76388    /// * `create_time`
76389    /// * `update_time`
76390    ///
76391    /// Example: `display_name, create_time desc`.
76392    pub order_by: std::string::String,
76393
76394    /// Optional. The NotebookExecutionJob view. Defaults to BASIC.
76395    pub view: crate::model::NotebookExecutionJobView,
76396
76397    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
76398}
76399
76400#[cfg(feature = "notebook-service")]
76401impl ListNotebookExecutionJobsRequest {
76402    pub fn new() -> Self {
76403        std::default::Default::default()
76404    }
76405
76406    /// Sets the value of [parent][crate::model::ListNotebookExecutionJobsRequest::parent].
76407    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
76408        self.parent = v.into();
76409        self
76410    }
76411
76412    /// Sets the value of [filter][crate::model::ListNotebookExecutionJobsRequest::filter].
76413    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
76414        self.filter = v.into();
76415        self
76416    }
76417
76418    /// Sets the value of [page_size][crate::model::ListNotebookExecutionJobsRequest::page_size].
76419    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
76420        self.page_size = v.into();
76421        self
76422    }
76423
76424    /// Sets the value of [page_token][crate::model::ListNotebookExecutionJobsRequest::page_token].
76425    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
76426        self.page_token = v.into();
76427        self
76428    }
76429
76430    /// Sets the value of [order_by][crate::model::ListNotebookExecutionJobsRequest::order_by].
76431    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
76432        self.order_by = v.into();
76433        self
76434    }
76435
76436    /// Sets the value of [view][crate::model::ListNotebookExecutionJobsRequest::view].
76437    pub fn set_view<T: std::convert::Into<crate::model::NotebookExecutionJobView>>(
76438        mut self,
76439        v: T,
76440    ) -> Self {
76441        self.view = v.into();
76442        self
76443    }
76444}
76445
76446#[cfg(feature = "notebook-service")]
76447impl wkt::message::Message for ListNotebookExecutionJobsRequest {
76448    fn typename() -> &'static str {
76449        "type.googleapis.com/google.cloud.aiplatform.v1.ListNotebookExecutionJobsRequest"
76450    }
76451}
76452
76453/// Response message for [NotebookService.CreateNotebookExecutionJob]
76454#[cfg(feature = "notebook-service")]
76455#[derive(Clone, Default, PartialEq)]
76456#[non_exhaustive]
76457pub struct ListNotebookExecutionJobsResponse {
76458    /// List of NotebookExecutionJobs in the requested page.
76459    pub notebook_execution_jobs: std::vec::Vec<crate::model::NotebookExecutionJob>,
76460
76461    /// A token to retrieve next page of results.
76462    /// Pass to
76463    /// [ListNotebookExecutionJobsRequest.page_token][google.cloud.aiplatform.v1.ListNotebookExecutionJobsRequest.page_token]
76464    /// to obtain that page.
76465    ///
76466    /// [google.cloud.aiplatform.v1.ListNotebookExecutionJobsRequest.page_token]: crate::model::ListNotebookExecutionJobsRequest::page_token
76467    pub next_page_token: std::string::String,
76468
76469    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
76470}
76471
76472#[cfg(feature = "notebook-service")]
76473impl ListNotebookExecutionJobsResponse {
76474    pub fn new() -> Self {
76475        std::default::Default::default()
76476    }
76477
76478    /// Sets the value of [notebook_execution_jobs][crate::model::ListNotebookExecutionJobsResponse::notebook_execution_jobs].
76479    pub fn set_notebook_execution_jobs<T, V>(mut self, v: T) -> Self
76480    where
76481        T: std::iter::IntoIterator<Item = V>,
76482        V: std::convert::Into<crate::model::NotebookExecutionJob>,
76483    {
76484        use std::iter::Iterator;
76485        self.notebook_execution_jobs = v.into_iter().map(|i| i.into()).collect();
76486        self
76487    }
76488
76489    /// Sets the value of [next_page_token][crate::model::ListNotebookExecutionJobsResponse::next_page_token].
76490    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
76491        self.next_page_token = v.into();
76492        self
76493    }
76494}
76495
76496#[cfg(feature = "notebook-service")]
76497impl wkt::message::Message for ListNotebookExecutionJobsResponse {
76498    fn typename() -> &'static str {
76499        "type.googleapis.com/google.cloud.aiplatform.v1.ListNotebookExecutionJobsResponse"
76500    }
76501}
76502
76503#[cfg(feature = "notebook-service")]
76504#[doc(hidden)]
76505impl gax::paginator::internal::PageableResponse for ListNotebookExecutionJobsResponse {
76506    type PageItem = crate::model::NotebookExecutionJob;
76507
76508    fn items(self) -> std::vec::Vec<Self::PageItem> {
76509        self.notebook_execution_jobs
76510    }
76511
76512    fn next_page_token(&self) -> std::string::String {
76513        use std::clone::Clone;
76514        self.next_page_token.clone()
76515    }
76516}
76517
76518/// Request message for [NotebookService.DeleteNotebookExecutionJob]
76519#[cfg(feature = "notebook-service")]
76520#[derive(Clone, Default, PartialEq)]
76521#[non_exhaustive]
76522pub struct DeleteNotebookExecutionJobRequest {
76523    /// Required. The name of the NotebookExecutionJob resource to be deleted.
76524    pub name: std::string::String,
76525
76526    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
76527}
76528
76529#[cfg(feature = "notebook-service")]
76530impl DeleteNotebookExecutionJobRequest {
76531    pub fn new() -> Self {
76532        std::default::Default::default()
76533    }
76534
76535    /// Sets the value of [name][crate::model::DeleteNotebookExecutionJobRequest::name].
76536    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
76537        self.name = v.into();
76538        self
76539    }
76540}
76541
76542#[cfg(feature = "notebook-service")]
76543impl wkt::message::Message for DeleteNotebookExecutionJobRequest {
76544    fn typename() -> &'static str {
76545        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteNotebookExecutionJobRequest"
76546    }
76547}
76548
76549/// Post startup script config.
76550#[cfg(feature = "notebook-service")]
76551#[derive(Clone, Default, PartialEq)]
76552#[non_exhaustive]
76553pub struct PostStartupScriptConfig {
76554    /// Optional. Post startup script to run after runtime is started.
76555    pub post_startup_script: std::string::String,
76556
76557    /// Optional. Post startup script url to download. Example:
76558    /// `gs://bucket/script.sh`
76559    pub post_startup_script_url: std::string::String,
76560
76561    /// Optional. Post startup script behavior that defines download and execution
76562    /// behavior.
76563    pub post_startup_script_behavior:
76564        crate::model::post_startup_script_config::PostStartupScriptBehavior,
76565
76566    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
76567}
76568
76569#[cfg(feature = "notebook-service")]
76570impl PostStartupScriptConfig {
76571    pub fn new() -> Self {
76572        std::default::Default::default()
76573    }
76574
76575    /// Sets the value of [post_startup_script][crate::model::PostStartupScriptConfig::post_startup_script].
76576    pub fn set_post_startup_script<T: std::convert::Into<std::string::String>>(
76577        mut self,
76578        v: T,
76579    ) -> Self {
76580        self.post_startup_script = v.into();
76581        self
76582    }
76583
76584    /// Sets the value of [post_startup_script_url][crate::model::PostStartupScriptConfig::post_startup_script_url].
76585    pub fn set_post_startup_script_url<T: std::convert::Into<std::string::String>>(
76586        mut self,
76587        v: T,
76588    ) -> Self {
76589        self.post_startup_script_url = v.into();
76590        self
76591    }
76592
76593    /// Sets the value of [post_startup_script_behavior][crate::model::PostStartupScriptConfig::post_startup_script_behavior].
76594    pub fn set_post_startup_script_behavior<
76595        T: std::convert::Into<crate::model::post_startup_script_config::PostStartupScriptBehavior>,
76596    >(
76597        mut self,
76598        v: T,
76599    ) -> Self {
76600        self.post_startup_script_behavior = v.into();
76601        self
76602    }
76603}
76604
76605#[cfg(feature = "notebook-service")]
76606impl wkt::message::Message for PostStartupScriptConfig {
76607    fn typename() -> &'static str {
76608        "type.googleapis.com/google.cloud.aiplatform.v1.PostStartupScriptConfig"
76609    }
76610}
76611
76612/// Defines additional types related to [PostStartupScriptConfig].
76613#[cfg(feature = "notebook-service")]
76614pub mod post_startup_script_config {
76615    #[allow(unused_imports)]
76616    use super::*;
76617
76618    /// Represents a notebook runtime post startup script behavior.
76619    ///
76620    /// # Working with unknown values
76621    ///
76622    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
76623    /// additional enum variants at any time. Adding new variants is not considered
76624    /// a breaking change. Applications should write their code in anticipation of:
76625    ///
76626    /// - New values appearing in future releases of the client library, **and**
76627    /// - New values received dynamically, without application changes.
76628    ///
76629    /// Please consult the [Working with enums] section in the user guide for some
76630    /// guidelines.
76631    ///
76632    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
76633    #[cfg(feature = "notebook-service")]
76634    #[derive(Clone, Debug, PartialEq)]
76635    #[non_exhaustive]
76636    pub enum PostStartupScriptBehavior {
76637        /// Unspecified post startup script behavior.
76638        Unspecified,
76639        /// Run post startup script after runtime is started.
76640        RunOnce,
76641        /// Run post startup script after runtime is stopped.
76642        RunEveryStart,
76643        /// Download and run post startup script every time runtime is started.
76644        DownloadAndRunEveryStart,
76645        /// If set, the enum was initialized with an unknown value.
76646        ///
76647        /// Applications can examine the value using [PostStartupScriptBehavior::value] or
76648        /// [PostStartupScriptBehavior::name].
76649        UnknownValue(post_startup_script_behavior::UnknownValue),
76650    }
76651
76652    #[doc(hidden)]
76653    #[cfg(feature = "notebook-service")]
76654    pub mod post_startup_script_behavior {
76655        #[allow(unused_imports)]
76656        use super::*;
76657        #[derive(Clone, Debug, PartialEq)]
76658        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
76659    }
76660
76661    #[cfg(feature = "notebook-service")]
76662    impl PostStartupScriptBehavior {
76663        /// Gets the enum value.
76664        ///
76665        /// Returns `None` if the enum contains an unknown value deserialized from
76666        /// the string representation of enums.
76667        pub fn value(&self) -> std::option::Option<i32> {
76668            match self {
76669                Self::Unspecified => std::option::Option::Some(0),
76670                Self::RunOnce => std::option::Option::Some(1),
76671                Self::RunEveryStart => std::option::Option::Some(2),
76672                Self::DownloadAndRunEveryStart => std::option::Option::Some(3),
76673                Self::UnknownValue(u) => u.0.value(),
76674            }
76675        }
76676
76677        /// Gets the enum value as a string.
76678        ///
76679        /// Returns `None` if the enum contains an unknown value deserialized from
76680        /// the integer representation of enums.
76681        pub fn name(&self) -> std::option::Option<&str> {
76682            match self {
76683                Self::Unspecified => {
76684                    std::option::Option::Some("POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED")
76685                }
76686                Self::RunOnce => std::option::Option::Some("RUN_ONCE"),
76687                Self::RunEveryStart => std::option::Option::Some("RUN_EVERY_START"),
76688                Self::DownloadAndRunEveryStart => {
76689                    std::option::Option::Some("DOWNLOAD_AND_RUN_EVERY_START")
76690                }
76691                Self::UnknownValue(u) => u.0.name(),
76692            }
76693        }
76694    }
76695
76696    #[cfg(feature = "notebook-service")]
76697    impl std::default::Default for PostStartupScriptBehavior {
76698        fn default() -> Self {
76699            use std::convert::From;
76700            Self::from(0)
76701        }
76702    }
76703
76704    #[cfg(feature = "notebook-service")]
76705    impl std::fmt::Display for PostStartupScriptBehavior {
76706        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
76707            wkt::internal::display_enum(f, self.name(), self.value())
76708        }
76709    }
76710
76711    #[cfg(feature = "notebook-service")]
76712    impl std::convert::From<i32> for PostStartupScriptBehavior {
76713        fn from(value: i32) -> Self {
76714            match value {
76715                0 => Self::Unspecified,
76716                1 => Self::RunOnce,
76717                2 => Self::RunEveryStart,
76718                3 => Self::DownloadAndRunEveryStart,
76719                _ => Self::UnknownValue(post_startup_script_behavior::UnknownValue(
76720                    wkt::internal::UnknownEnumValue::Integer(value),
76721                )),
76722            }
76723        }
76724    }
76725
76726    #[cfg(feature = "notebook-service")]
76727    impl std::convert::From<&str> for PostStartupScriptBehavior {
76728        fn from(value: &str) -> Self {
76729            use std::string::ToString;
76730            match value {
76731                "POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED" => Self::Unspecified,
76732                "RUN_ONCE" => Self::RunOnce,
76733                "RUN_EVERY_START" => Self::RunEveryStart,
76734                "DOWNLOAD_AND_RUN_EVERY_START" => Self::DownloadAndRunEveryStart,
76735                _ => Self::UnknownValue(post_startup_script_behavior::UnknownValue(
76736                    wkt::internal::UnknownEnumValue::String(value.to_string()),
76737                )),
76738            }
76739        }
76740    }
76741
76742    #[cfg(feature = "notebook-service")]
76743    impl serde::ser::Serialize for PostStartupScriptBehavior {
76744        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
76745        where
76746            S: serde::Serializer,
76747        {
76748            match self {
76749                Self::Unspecified => serializer.serialize_i32(0),
76750                Self::RunOnce => serializer.serialize_i32(1),
76751                Self::RunEveryStart => serializer.serialize_i32(2),
76752                Self::DownloadAndRunEveryStart => serializer.serialize_i32(3),
76753                Self::UnknownValue(u) => u.0.serialize(serializer),
76754            }
76755        }
76756    }
76757
76758    #[cfg(feature = "notebook-service")]
76759    impl<'de> serde::de::Deserialize<'de> for PostStartupScriptBehavior {
76760        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
76761        where
76762            D: serde::Deserializer<'de>,
76763        {
76764            deserializer.deserialize_any(
76765                wkt::internal::EnumVisitor::<PostStartupScriptBehavior>::new(
76766                    ".google.cloud.aiplatform.v1.PostStartupScriptConfig.PostStartupScriptBehavior",
76767                ),
76768            )
76769        }
76770    }
76771}
76772
76773/// Colab image of the runtime.
76774#[cfg(feature = "notebook-service")]
76775#[derive(Clone, Default, PartialEq)]
76776#[non_exhaustive]
76777pub struct ColabImage {
76778    /// Optional. The release name of the NotebookRuntime Colab image, e.g.
76779    /// "py310". If not specified, detault to the latest release.
76780    pub release_name: std::string::String,
76781
76782    /// Output only. A human-readable description of the specified colab image
76783    /// release, populated by the system. Example: "Python 3.10", "Latest - current
76784    /// Python 3.11"
76785    pub description: std::string::String,
76786
76787    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
76788}
76789
76790#[cfg(feature = "notebook-service")]
76791impl ColabImage {
76792    pub fn new() -> Self {
76793        std::default::Default::default()
76794    }
76795
76796    /// Sets the value of [release_name][crate::model::ColabImage::release_name].
76797    pub fn set_release_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
76798        self.release_name = v.into();
76799        self
76800    }
76801
76802    /// Sets the value of [description][crate::model::ColabImage::description].
76803    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
76804        self.description = v.into();
76805        self
76806    }
76807}
76808
76809#[cfg(feature = "notebook-service")]
76810impl wkt::message::Message for ColabImage {
76811    fn typename() -> &'static str {
76812        "type.googleapis.com/google.cloud.aiplatform.v1.ColabImage"
76813    }
76814}
76815
76816/// Notebook Software Config. This is passed to the backend when user
76817/// makes software configurations in UI.
76818#[cfg(feature = "notebook-service")]
76819#[derive(Clone, Default, PartialEq)]
76820#[non_exhaustive]
76821pub struct NotebookSoftwareConfig {
76822    /// Optional. Environment variables to be passed to the container.
76823    /// Maximum limit is 100.
76824    pub env: std::vec::Vec<crate::model::EnvVar>,
76825
76826    /// Optional. Post startup script config.
76827    pub post_startup_script_config: std::option::Option<crate::model::PostStartupScriptConfig>,
76828
76829    /// The image to be used by the notebook runtime.
76830    pub runtime_image: std::option::Option<crate::model::notebook_software_config::RuntimeImage>,
76831
76832    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
76833}
76834
76835#[cfg(feature = "notebook-service")]
76836impl NotebookSoftwareConfig {
76837    pub fn new() -> Self {
76838        std::default::Default::default()
76839    }
76840
76841    /// Sets the value of [env][crate::model::NotebookSoftwareConfig::env].
76842    pub fn set_env<T, V>(mut self, v: T) -> Self
76843    where
76844        T: std::iter::IntoIterator<Item = V>,
76845        V: std::convert::Into<crate::model::EnvVar>,
76846    {
76847        use std::iter::Iterator;
76848        self.env = v.into_iter().map(|i| i.into()).collect();
76849        self
76850    }
76851
76852    /// Sets the value of [post_startup_script_config][crate::model::NotebookSoftwareConfig::post_startup_script_config].
76853    pub fn set_post_startup_script_config<T>(mut self, v: T) -> Self
76854    where
76855        T: std::convert::Into<crate::model::PostStartupScriptConfig>,
76856    {
76857        self.post_startup_script_config = std::option::Option::Some(v.into());
76858        self
76859    }
76860
76861    /// Sets or clears the value of [post_startup_script_config][crate::model::NotebookSoftwareConfig::post_startup_script_config].
76862    pub fn set_or_clear_post_startup_script_config<T>(mut self, v: std::option::Option<T>) -> Self
76863    where
76864        T: std::convert::Into<crate::model::PostStartupScriptConfig>,
76865    {
76866        self.post_startup_script_config = v.map(|x| x.into());
76867        self
76868    }
76869
76870    /// Sets the value of [runtime_image][crate::model::NotebookSoftwareConfig::runtime_image].
76871    ///
76872    /// Note that all the setters affecting `runtime_image` are mutually
76873    /// exclusive.
76874    pub fn set_runtime_image<
76875        T: std::convert::Into<
76876                std::option::Option<crate::model::notebook_software_config::RuntimeImage>,
76877            >,
76878    >(
76879        mut self,
76880        v: T,
76881    ) -> Self {
76882        self.runtime_image = v.into();
76883        self
76884    }
76885
76886    /// The value of [runtime_image][crate::model::NotebookSoftwareConfig::runtime_image]
76887    /// if it holds a `ColabImage`, `None` if the field is not set or
76888    /// holds a different branch.
76889    pub fn colab_image(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColabImage>> {
76890        #[allow(unreachable_patterns)]
76891        self.runtime_image.as_ref().and_then(|v| match v {
76892            crate::model::notebook_software_config::RuntimeImage::ColabImage(v) => {
76893                std::option::Option::Some(v)
76894            }
76895            _ => std::option::Option::None,
76896        })
76897    }
76898
76899    /// Sets the value of [runtime_image][crate::model::NotebookSoftwareConfig::runtime_image]
76900    /// to hold a `ColabImage`.
76901    ///
76902    /// Note that all the setters affecting `runtime_image` are
76903    /// mutually exclusive.
76904    pub fn set_colab_image<T: std::convert::Into<std::boxed::Box<crate::model::ColabImage>>>(
76905        mut self,
76906        v: T,
76907    ) -> Self {
76908        self.runtime_image = std::option::Option::Some(
76909            crate::model::notebook_software_config::RuntimeImage::ColabImage(v.into()),
76910        );
76911        self
76912    }
76913}
76914
76915#[cfg(feature = "notebook-service")]
76916impl wkt::message::Message for NotebookSoftwareConfig {
76917    fn typename() -> &'static str {
76918        "type.googleapis.com/google.cloud.aiplatform.v1.NotebookSoftwareConfig"
76919    }
76920}
76921
76922/// Defines additional types related to [NotebookSoftwareConfig].
76923#[cfg(feature = "notebook-service")]
76924pub mod notebook_software_config {
76925    #[allow(unused_imports)]
76926    use super::*;
76927
76928    /// The image to be used by the notebook runtime.
76929    #[cfg(feature = "notebook-service")]
76930    #[derive(Clone, Debug, PartialEq)]
76931    #[non_exhaustive]
76932    pub enum RuntimeImage {
76933        /// Optional. Google-managed NotebookRuntime colab image.
76934        ColabImage(std::boxed::Box<crate::model::ColabImage>),
76935    }
76936}
76937
76938/// Schema is used to define the format of input/output data. Represents a select
76939/// subset of an [OpenAPI 3.0 schema
76940/// object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
76941/// be added in the future as needed.
76942#[cfg(any(
76943    feature = "gen-ai-cache-service",
76944    feature = "llm-utility-service",
76945    feature = "prediction-service",
76946))]
76947#[derive(Clone, Default, PartialEq)]
76948#[non_exhaustive]
76949pub struct Schema {
76950    /// Optional. The type of the data.
76951    pub r#type: crate::model::Type,
76952
76953    /// Optional. The format of the data.
76954    /// Supported formats:
76955    /// for NUMBER type: "float", "double"
76956    /// for INTEGER type: "int32", "int64"
76957    /// for STRING type: "email", "byte", etc
76958    pub format: std::string::String,
76959
76960    /// Optional. The title of the Schema.
76961    pub title: std::string::String,
76962
76963    /// Optional. The description of the data.
76964    pub description: std::string::String,
76965
76966    /// Optional. Indicates if the value may be null.
76967    pub nullable: bool,
76968
76969    /// Optional. Default value of the data.
76970    pub default: std::option::Option<wkt::Value>,
76971
76972    /// Optional. SCHEMA FIELDS FOR TYPE ARRAY
76973    /// Schema of the elements of Type.ARRAY.
76974    pub items: std::option::Option<std::boxed::Box<crate::model::Schema>>,
76975
76976    /// Optional. Minimum number of the elements for Type.ARRAY.
76977    pub min_items: i64,
76978
76979    /// Optional. Maximum number of the elements for Type.ARRAY.
76980    pub max_items: i64,
76981
76982    /// Optional. Possible values of the element of primitive type with enum
76983    /// format. Examples:
76984    ///
76985    /// 1. We can define direction as :
76986    ///    {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
76987    /// 1. We can define apartment number as :
76988    ///    {type:INTEGER, format:enum, enum:["101", "201", "301"]}
76989    pub r#enum: std::vec::Vec<std::string::String>,
76990
76991    /// Optional. SCHEMA FIELDS FOR TYPE OBJECT
76992    /// Properties of Type.OBJECT.
76993    pub properties: std::collections::HashMap<std::string::String, crate::model::Schema>,
76994
76995    /// Optional. The order of the properties.
76996    /// Not a standard field in open api spec. Only used to support the order of
76997    /// the properties.
76998    pub property_ordering: std::vec::Vec<std::string::String>,
76999
77000    /// Optional. Required properties of Type.OBJECT.
77001    pub required: std::vec::Vec<std::string::String>,
77002
77003    /// Optional. Minimum number of the properties for Type.OBJECT.
77004    pub min_properties: i64,
77005
77006    /// Optional. Maximum number of the properties for Type.OBJECT.
77007    pub max_properties: i64,
77008
77009    /// Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
77010    /// Minimum value of the Type.INTEGER and Type.NUMBER
77011    pub minimum: f64,
77012
77013    /// Optional. Maximum value of the Type.INTEGER and Type.NUMBER
77014    pub maximum: f64,
77015
77016    /// Optional. SCHEMA FIELDS FOR TYPE STRING
77017    /// Minimum length of the Type.STRING
77018    pub min_length: i64,
77019
77020    /// Optional. Maximum length of the Type.STRING
77021    pub max_length: i64,
77022
77023    /// Optional. Pattern of the Type.STRING to restrict a string to a regular
77024    /// expression.
77025    pub pattern: std::string::String,
77026
77027    /// Optional. Example of the object. Will only populated when the object is the
77028    /// root.
77029    pub example: std::option::Option<wkt::Value>,
77030
77031    /// Optional. The value should be validated against any (one or more) of the
77032    /// subschemas in the list.
77033    pub any_of: std::vec::Vec<crate::model::Schema>,
77034
77035    /// Optional. Can either be a boolean or an object; controls the presence of
77036    /// additional properties.
77037    pub additional_properties: std::option::Option<wkt::Value>,
77038
77039    /// Optional. Allows indirect references between schema nodes. The value should
77040    /// be a valid reference to a child of the root `defs`.
77041    ///
77042    /// For example, the following schema defines a reference to a schema node
77043    /// named "Pet":
77044    ///
77045    /// type: object
77046    /// properties:
77047    /// pet:
77048    /// ref: #/defs/Pet
77049    /// defs:
77050    /// Pet:
77051    /// type: object
77052    /// properties:
77053    /// name:
77054    /// type: string
77055    ///
77056    /// The value of the "pet" property is a reference to the schema node
77057    /// named "Pet".
77058    /// See details in
77059    /// <https://json-schema.org/understanding-json-schema/structuring>
77060    pub r#ref: std::string::String,
77061
77062    /// Optional. A map of definitions for use by `ref`
77063    /// Only allowed at the root of the schema.
77064    pub defs: std::collections::HashMap<std::string::String, crate::model::Schema>,
77065
77066    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
77067}
77068
77069#[cfg(any(
77070    feature = "gen-ai-cache-service",
77071    feature = "llm-utility-service",
77072    feature = "prediction-service",
77073))]
77074impl Schema {
77075    pub fn new() -> Self {
77076        std::default::Default::default()
77077    }
77078
77079    /// Sets the value of [r#type][crate::model::Schema::type].
77080    pub fn set_type<T: std::convert::Into<crate::model::Type>>(mut self, v: T) -> Self {
77081        self.r#type = v.into();
77082        self
77083    }
77084
77085    /// Sets the value of [format][crate::model::Schema::format].
77086    pub fn set_format<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
77087        self.format = v.into();
77088        self
77089    }
77090
77091    /// Sets the value of [title][crate::model::Schema::title].
77092    pub fn set_title<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
77093        self.title = v.into();
77094        self
77095    }
77096
77097    /// Sets the value of [description][crate::model::Schema::description].
77098    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
77099        self.description = v.into();
77100        self
77101    }
77102
77103    /// Sets the value of [nullable][crate::model::Schema::nullable].
77104    pub fn set_nullable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
77105        self.nullable = v.into();
77106        self
77107    }
77108
77109    /// Sets the value of [default][crate::model::Schema::default].
77110    pub fn set_default<T>(mut self, v: T) -> Self
77111    where
77112        T: std::convert::Into<wkt::Value>,
77113    {
77114        self.default = std::option::Option::Some(v.into());
77115        self
77116    }
77117
77118    /// Sets or clears the value of [default][crate::model::Schema::default].
77119    pub fn set_or_clear_default<T>(mut self, v: std::option::Option<T>) -> Self
77120    where
77121        T: std::convert::Into<wkt::Value>,
77122    {
77123        self.default = v.map(|x| x.into());
77124        self
77125    }
77126
77127    /// Sets the value of [items][crate::model::Schema::items].
77128    pub fn set_items<T>(mut self, v: T) -> Self
77129    where
77130        T: std::convert::Into<crate::model::Schema>,
77131    {
77132        self.items = std::option::Option::Some(std::boxed::Box::new(v.into()));
77133        self
77134    }
77135
77136    /// Sets or clears the value of [items][crate::model::Schema::items].
77137    pub fn set_or_clear_items<T>(mut self, v: std::option::Option<T>) -> Self
77138    where
77139        T: std::convert::Into<crate::model::Schema>,
77140    {
77141        self.items = v.map(|x| std::boxed::Box::new(x.into()));
77142        self
77143    }
77144
77145    /// Sets the value of [min_items][crate::model::Schema::min_items].
77146    pub fn set_min_items<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
77147        self.min_items = v.into();
77148        self
77149    }
77150
77151    /// Sets the value of [max_items][crate::model::Schema::max_items].
77152    pub fn set_max_items<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
77153        self.max_items = v.into();
77154        self
77155    }
77156
77157    /// Sets the value of [r#enum][crate::model::Schema::enum].
77158    pub fn set_enum<T, V>(mut self, v: T) -> Self
77159    where
77160        T: std::iter::IntoIterator<Item = V>,
77161        V: std::convert::Into<std::string::String>,
77162    {
77163        use std::iter::Iterator;
77164        self.r#enum = v.into_iter().map(|i| i.into()).collect();
77165        self
77166    }
77167
77168    /// Sets the value of [properties][crate::model::Schema::properties].
77169    pub fn set_properties<T, K, V>(mut self, v: T) -> Self
77170    where
77171        T: std::iter::IntoIterator<Item = (K, V)>,
77172        K: std::convert::Into<std::string::String>,
77173        V: std::convert::Into<crate::model::Schema>,
77174    {
77175        use std::iter::Iterator;
77176        self.properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
77177        self
77178    }
77179
77180    /// Sets the value of [property_ordering][crate::model::Schema::property_ordering].
77181    pub fn set_property_ordering<T, V>(mut self, v: T) -> Self
77182    where
77183        T: std::iter::IntoIterator<Item = V>,
77184        V: std::convert::Into<std::string::String>,
77185    {
77186        use std::iter::Iterator;
77187        self.property_ordering = v.into_iter().map(|i| i.into()).collect();
77188        self
77189    }
77190
77191    /// Sets the value of [required][crate::model::Schema::required].
77192    pub fn set_required<T, V>(mut self, v: T) -> Self
77193    where
77194        T: std::iter::IntoIterator<Item = V>,
77195        V: std::convert::Into<std::string::String>,
77196    {
77197        use std::iter::Iterator;
77198        self.required = v.into_iter().map(|i| i.into()).collect();
77199        self
77200    }
77201
77202    /// Sets the value of [min_properties][crate::model::Schema::min_properties].
77203    pub fn set_min_properties<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
77204        self.min_properties = v.into();
77205        self
77206    }
77207
77208    /// Sets the value of [max_properties][crate::model::Schema::max_properties].
77209    pub fn set_max_properties<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
77210        self.max_properties = v.into();
77211        self
77212    }
77213
77214    /// Sets the value of [minimum][crate::model::Schema::minimum].
77215    pub fn set_minimum<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
77216        self.minimum = v.into();
77217        self
77218    }
77219
77220    /// Sets the value of [maximum][crate::model::Schema::maximum].
77221    pub fn set_maximum<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
77222        self.maximum = v.into();
77223        self
77224    }
77225
77226    /// Sets the value of [min_length][crate::model::Schema::min_length].
77227    pub fn set_min_length<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
77228        self.min_length = v.into();
77229        self
77230    }
77231
77232    /// Sets the value of [max_length][crate::model::Schema::max_length].
77233    pub fn set_max_length<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
77234        self.max_length = v.into();
77235        self
77236    }
77237
77238    /// Sets the value of [pattern][crate::model::Schema::pattern].
77239    pub fn set_pattern<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
77240        self.pattern = v.into();
77241        self
77242    }
77243
77244    /// Sets the value of [example][crate::model::Schema::example].
77245    pub fn set_example<T>(mut self, v: T) -> Self
77246    where
77247        T: std::convert::Into<wkt::Value>,
77248    {
77249        self.example = std::option::Option::Some(v.into());
77250        self
77251    }
77252
77253    /// Sets or clears the value of [example][crate::model::Schema::example].
77254    pub fn set_or_clear_example<T>(mut self, v: std::option::Option<T>) -> Self
77255    where
77256        T: std::convert::Into<wkt::Value>,
77257    {
77258        self.example = v.map(|x| x.into());
77259        self
77260    }
77261
77262    /// Sets the value of [any_of][crate::model::Schema::any_of].
77263    pub fn set_any_of<T, V>(mut self, v: T) -> Self
77264    where
77265        T: std::iter::IntoIterator<Item = V>,
77266        V: std::convert::Into<crate::model::Schema>,
77267    {
77268        use std::iter::Iterator;
77269        self.any_of = v.into_iter().map(|i| i.into()).collect();
77270        self
77271    }
77272
77273    /// Sets the value of [additional_properties][crate::model::Schema::additional_properties].
77274    pub fn set_additional_properties<T>(mut self, v: T) -> Self
77275    where
77276        T: std::convert::Into<wkt::Value>,
77277    {
77278        self.additional_properties = std::option::Option::Some(v.into());
77279        self
77280    }
77281
77282    /// Sets or clears the value of [additional_properties][crate::model::Schema::additional_properties].
77283    pub fn set_or_clear_additional_properties<T>(mut self, v: std::option::Option<T>) -> Self
77284    where
77285        T: std::convert::Into<wkt::Value>,
77286    {
77287        self.additional_properties = v.map(|x| x.into());
77288        self
77289    }
77290
77291    /// Sets the value of [r#ref][crate::model::Schema::ref].
77292    pub fn set_ref<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
77293        self.r#ref = v.into();
77294        self
77295    }
77296
77297    /// Sets the value of [defs][crate::model::Schema::defs].
77298    pub fn set_defs<T, K, V>(mut self, v: T) -> Self
77299    where
77300        T: std::iter::IntoIterator<Item = (K, V)>,
77301        K: std::convert::Into<std::string::String>,
77302        V: std::convert::Into<crate::model::Schema>,
77303    {
77304        use std::iter::Iterator;
77305        self.defs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
77306        self
77307    }
77308}
77309
77310#[cfg(any(
77311    feature = "gen-ai-cache-service",
77312    feature = "llm-utility-service",
77313    feature = "prediction-service",
77314))]
77315impl wkt::message::Message for Schema {
77316    fn typename() -> &'static str {
77317        "type.googleapis.com/google.cloud.aiplatform.v1.Schema"
77318    }
77319}
77320
77321/// Generic Metadata shared by all operations.
77322#[cfg(any(
77323    feature = "dataset-service",
77324    feature = "deployment-resource-pool-service",
77325    feature = "endpoint-service",
77326    feature = "feature-online-store-admin-service",
77327    feature = "feature-registry-service",
77328    feature = "featurestore-service",
77329    feature = "gen-ai-tuning-service",
77330    feature = "index-endpoint-service",
77331    feature = "index-service",
77332    feature = "job-service",
77333    feature = "metadata-service",
77334    feature = "migration-service",
77335    feature = "model-garden-service",
77336    feature = "model-service",
77337    feature = "notebook-service",
77338    feature = "persistent-resource-service",
77339    feature = "pipeline-service",
77340    feature = "reasoning-engine-service",
77341    feature = "schedule-service",
77342    feature = "specialist-pool-service",
77343    feature = "tensorboard-service",
77344    feature = "vertex-rag-data-service",
77345    feature = "vizier-service",
77346))]
77347#[derive(Clone, Default, PartialEq)]
77348#[non_exhaustive]
77349pub struct GenericOperationMetadata {
77350    /// Output only. Partial failures encountered.
77351    /// E.g. single files that couldn't be read.
77352    /// This field should never exceed 20 entries.
77353    /// Status details field will contain standard Google Cloud error details.
77354    pub partial_failures: std::vec::Vec<rpc::model::Status>,
77355
77356    /// Output only. Time when the operation was created.
77357    pub create_time: std::option::Option<wkt::Timestamp>,
77358
77359    /// Output only. Time when the operation was updated for the last time.
77360    /// If the operation has finished (successfully or not), this is the finish
77361    /// time.
77362    pub update_time: std::option::Option<wkt::Timestamp>,
77363
77364    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
77365}
77366
77367#[cfg(any(
77368    feature = "dataset-service",
77369    feature = "deployment-resource-pool-service",
77370    feature = "endpoint-service",
77371    feature = "feature-online-store-admin-service",
77372    feature = "feature-registry-service",
77373    feature = "featurestore-service",
77374    feature = "gen-ai-tuning-service",
77375    feature = "index-endpoint-service",
77376    feature = "index-service",
77377    feature = "job-service",
77378    feature = "metadata-service",
77379    feature = "migration-service",
77380    feature = "model-garden-service",
77381    feature = "model-service",
77382    feature = "notebook-service",
77383    feature = "persistent-resource-service",
77384    feature = "pipeline-service",
77385    feature = "reasoning-engine-service",
77386    feature = "schedule-service",
77387    feature = "specialist-pool-service",
77388    feature = "tensorboard-service",
77389    feature = "vertex-rag-data-service",
77390    feature = "vizier-service",
77391))]
77392impl GenericOperationMetadata {
77393    pub fn new() -> Self {
77394        std::default::Default::default()
77395    }
77396
77397    /// Sets the value of [partial_failures][crate::model::GenericOperationMetadata::partial_failures].
77398    pub fn set_partial_failures<T, V>(mut self, v: T) -> Self
77399    where
77400        T: std::iter::IntoIterator<Item = V>,
77401        V: std::convert::Into<rpc::model::Status>,
77402    {
77403        use std::iter::Iterator;
77404        self.partial_failures = v.into_iter().map(|i| i.into()).collect();
77405        self
77406    }
77407
77408    /// Sets the value of [create_time][crate::model::GenericOperationMetadata::create_time].
77409    pub fn set_create_time<T>(mut self, v: T) -> Self
77410    where
77411        T: std::convert::Into<wkt::Timestamp>,
77412    {
77413        self.create_time = std::option::Option::Some(v.into());
77414        self
77415    }
77416
77417    /// Sets or clears the value of [create_time][crate::model::GenericOperationMetadata::create_time].
77418    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
77419    where
77420        T: std::convert::Into<wkt::Timestamp>,
77421    {
77422        self.create_time = v.map(|x| x.into());
77423        self
77424    }
77425
77426    /// Sets the value of [update_time][crate::model::GenericOperationMetadata::update_time].
77427    pub fn set_update_time<T>(mut self, v: T) -> Self
77428    where
77429        T: std::convert::Into<wkt::Timestamp>,
77430    {
77431        self.update_time = std::option::Option::Some(v.into());
77432        self
77433    }
77434
77435    /// Sets or clears the value of [update_time][crate::model::GenericOperationMetadata::update_time].
77436    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
77437    where
77438        T: std::convert::Into<wkt::Timestamp>,
77439    {
77440        self.update_time = v.map(|x| x.into());
77441        self
77442    }
77443}
77444
77445#[cfg(any(
77446    feature = "dataset-service",
77447    feature = "deployment-resource-pool-service",
77448    feature = "endpoint-service",
77449    feature = "feature-online-store-admin-service",
77450    feature = "feature-registry-service",
77451    feature = "featurestore-service",
77452    feature = "gen-ai-tuning-service",
77453    feature = "index-endpoint-service",
77454    feature = "index-service",
77455    feature = "job-service",
77456    feature = "metadata-service",
77457    feature = "migration-service",
77458    feature = "model-garden-service",
77459    feature = "model-service",
77460    feature = "notebook-service",
77461    feature = "persistent-resource-service",
77462    feature = "pipeline-service",
77463    feature = "reasoning-engine-service",
77464    feature = "schedule-service",
77465    feature = "specialist-pool-service",
77466    feature = "tensorboard-service",
77467    feature = "vertex-rag-data-service",
77468    feature = "vizier-service",
77469))]
77470impl wkt::message::Message for GenericOperationMetadata {
77471    fn typename() -> &'static str {
77472        "type.googleapis.com/google.cloud.aiplatform.v1.GenericOperationMetadata"
77473    }
77474}
77475
77476/// Details of operations that perform deletes of any entities.
77477#[cfg(any(
77478    feature = "dataset-service",
77479    feature = "deployment-resource-pool-service",
77480    feature = "endpoint-service",
77481    feature = "feature-online-store-admin-service",
77482    feature = "feature-registry-service",
77483    feature = "featurestore-service",
77484    feature = "index-endpoint-service",
77485    feature = "index-service",
77486    feature = "job-service",
77487    feature = "metadata-service",
77488    feature = "model-service",
77489    feature = "notebook-service",
77490    feature = "persistent-resource-service",
77491    feature = "pipeline-service",
77492    feature = "reasoning-engine-service",
77493    feature = "schedule-service",
77494    feature = "specialist-pool-service",
77495    feature = "tensorboard-service",
77496    feature = "vertex-rag-data-service",
77497))]
77498#[derive(Clone, Default, PartialEq)]
77499#[non_exhaustive]
77500pub struct DeleteOperationMetadata {
77501    /// The common part of the operation metadata.
77502    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
77503
77504    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
77505}
77506
77507#[cfg(any(
77508    feature = "dataset-service",
77509    feature = "deployment-resource-pool-service",
77510    feature = "endpoint-service",
77511    feature = "feature-online-store-admin-service",
77512    feature = "feature-registry-service",
77513    feature = "featurestore-service",
77514    feature = "index-endpoint-service",
77515    feature = "index-service",
77516    feature = "job-service",
77517    feature = "metadata-service",
77518    feature = "model-service",
77519    feature = "notebook-service",
77520    feature = "persistent-resource-service",
77521    feature = "pipeline-service",
77522    feature = "reasoning-engine-service",
77523    feature = "schedule-service",
77524    feature = "specialist-pool-service",
77525    feature = "tensorboard-service",
77526    feature = "vertex-rag-data-service",
77527))]
77528impl DeleteOperationMetadata {
77529    pub fn new() -> Self {
77530        std::default::Default::default()
77531    }
77532
77533    /// Sets the value of [generic_metadata][crate::model::DeleteOperationMetadata::generic_metadata].
77534    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
77535    where
77536        T: std::convert::Into<crate::model::GenericOperationMetadata>,
77537    {
77538        self.generic_metadata = std::option::Option::Some(v.into());
77539        self
77540    }
77541
77542    /// Sets or clears the value of [generic_metadata][crate::model::DeleteOperationMetadata::generic_metadata].
77543    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
77544    where
77545        T: std::convert::Into<crate::model::GenericOperationMetadata>,
77546    {
77547        self.generic_metadata = v.map(|x| x.into());
77548        self
77549    }
77550}
77551
77552#[cfg(any(
77553    feature = "dataset-service",
77554    feature = "deployment-resource-pool-service",
77555    feature = "endpoint-service",
77556    feature = "feature-online-store-admin-service",
77557    feature = "feature-registry-service",
77558    feature = "featurestore-service",
77559    feature = "index-endpoint-service",
77560    feature = "index-service",
77561    feature = "job-service",
77562    feature = "metadata-service",
77563    feature = "model-service",
77564    feature = "notebook-service",
77565    feature = "persistent-resource-service",
77566    feature = "pipeline-service",
77567    feature = "reasoning-engine-service",
77568    feature = "schedule-service",
77569    feature = "specialist-pool-service",
77570    feature = "tensorboard-service",
77571    feature = "vertex-rag-data-service",
77572))]
77573impl wkt::message::Message for DeleteOperationMetadata {
77574    fn typename() -> &'static str {
77575        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteOperationMetadata"
77576    }
77577}
77578
77579/// Represents long-lasting resources that are dedicated to users to runs custom
77580/// workloads.
77581/// A PersistentResource can have multiple node pools and each node
77582/// pool can have its own machine spec.
77583#[cfg(feature = "persistent-resource-service")]
77584#[derive(Clone, Default, PartialEq)]
77585#[non_exhaustive]
77586pub struct PersistentResource {
77587    /// Immutable. Resource name of a PersistentResource.
77588    pub name: std::string::String,
77589
77590    /// Optional. The display name of the PersistentResource.
77591    /// The name can be up to 128 characters long and can consist of any UTF-8
77592    /// characters.
77593    pub display_name: std::string::String,
77594
77595    /// Required. The spec of the pools of different resources.
77596    pub resource_pools: std::vec::Vec<crate::model::ResourcePool>,
77597
77598    /// Output only. The detailed state of a Study.
77599    pub state: crate::model::persistent_resource::State,
77600
77601    /// Output only. Only populated when persistent resource's state is `STOPPING`
77602    /// or `ERROR`.
77603    pub error: std::option::Option<rpc::model::Status>,
77604
77605    /// Output only. Time when the PersistentResource was created.
77606    pub create_time: std::option::Option<wkt::Timestamp>,
77607
77608    /// Output only. Time when the PersistentResource for the first time entered
77609    /// the `RUNNING` state.
77610    pub start_time: std::option::Option<wkt::Timestamp>,
77611
77612    /// Output only. Time when the PersistentResource was most recently updated.
77613    pub update_time: std::option::Option<wkt::Timestamp>,
77614
77615    /// Optional. The labels with user-defined metadata to organize
77616    /// PersistentResource.
77617    ///
77618    /// Label keys and values can be no longer than 64 characters
77619    /// (Unicode codepoints), can only contain lowercase letters, numeric
77620    /// characters, underscores and dashes. International characters are allowed.
77621    ///
77622    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
77623    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
77624
77625    /// Optional. The full name of the Compute Engine
77626    /// [network](/compute/docs/networks-and-firewalls#networks) to peered with
77627    /// Vertex AI to host the persistent resources.
77628    /// For example, `projects/12345/global/networks/myVPC`.
77629    /// [Format](/compute/docs/reference/rest/v1/networks/insert)
77630    /// is of the form `projects/{project}/global/networks/{network}`.
77631    /// Where {project} is a project number, as in `12345`, and {network} is a
77632    /// network name.
77633    ///
77634    /// To specify this field, you must have already [configured VPC Network
77635    /// Peering for Vertex
77636    /// AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering).
77637    ///
77638    /// If this field is left unspecified, the resources aren't peered with any
77639    /// network.
77640    pub network: std::string::String,
77641
77642    /// Optional. Configuration for PSC-I for PersistentResource.
77643    pub psc_interface_config: std::option::Option<crate::model::PscInterfaceConfig>,
77644
77645    /// Optional. Customer-managed encryption key spec for a PersistentResource.
77646    /// If set, this PersistentResource and all sub-resources of this
77647    /// PersistentResource will be secured by this key.
77648    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
77649
77650    /// Optional. Persistent Resource runtime spec.
77651    /// For example, used for Ray cluster configuration.
77652    pub resource_runtime_spec: std::option::Option<crate::model::ResourceRuntimeSpec>,
77653
77654    /// Output only. Runtime information of the Persistent Resource.
77655    pub resource_runtime: std::option::Option<crate::model::ResourceRuntime>,
77656
77657    /// Optional. A list of names for the reserved IP ranges under the VPC network
77658    /// that can be used for this persistent resource.
77659    ///
77660    /// If set, we will deploy the persistent resource within the provided IP
77661    /// ranges. Otherwise, the persistent resource is deployed to any IP
77662    /// ranges under the provided VPC network.
77663    ///
77664    /// Example: ['vertex-ai-ip-range'].
77665    pub reserved_ip_ranges: std::vec::Vec<std::string::String>,
77666
77667    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
77668}
77669
77670#[cfg(feature = "persistent-resource-service")]
77671impl PersistentResource {
77672    pub fn new() -> Self {
77673        std::default::Default::default()
77674    }
77675
77676    /// Sets the value of [name][crate::model::PersistentResource::name].
77677    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
77678        self.name = v.into();
77679        self
77680    }
77681
77682    /// Sets the value of [display_name][crate::model::PersistentResource::display_name].
77683    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
77684        self.display_name = v.into();
77685        self
77686    }
77687
77688    /// Sets the value of [resource_pools][crate::model::PersistentResource::resource_pools].
77689    pub fn set_resource_pools<T, V>(mut self, v: T) -> Self
77690    where
77691        T: std::iter::IntoIterator<Item = V>,
77692        V: std::convert::Into<crate::model::ResourcePool>,
77693    {
77694        use std::iter::Iterator;
77695        self.resource_pools = v.into_iter().map(|i| i.into()).collect();
77696        self
77697    }
77698
77699    /// Sets the value of [state][crate::model::PersistentResource::state].
77700    pub fn set_state<T: std::convert::Into<crate::model::persistent_resource::State>>(
77701        mut self,
77702        v: T,
77703    ) -> Self {
77704        self.state = v.into();
77705        self
77706    }
77707
77708    /// Sets the value of [error][crate::model::PersistentResource::error].
77709    pub fn set_error<T>(mut self, v: T) -> Self
77710    where
77711        T: std::convert::Into<rpc::model::Status>,
77712    {
77713        self.error = std::option::Option::Some(v.into());
77714        self
77715    }
77716
77717    /// Sets or clears the value of [error][crate::model::PersistentResource::error].
77718    pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
77719    where
77720        T: std::convert::Into<rpc::model::Status>,
77721    {
77722        self.error = v.map(|x| x.into());
77723        self
77724    }
77725
77726    /// Sets the value of [create_time][crate::model::PersistentResource::create_time].
77727    pub fn set_create_time<T>(mut self, v: T) -> Self
77728    where
77729        T: std::convert::Into<wkt::Timestamp>,
77730    {
77731        self.create_time = std::option::Option::Some(v.into());
77732        self
77733    }
77734
77735    /// Sets or clears the value of [create_time][crate::model::PersistentResource::create_time].
77736    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
77737    where
77738        T: std::convert::Into<wkt::Timestamp>,
77739    {
77740        self.create_time = v.map(|x| x.into());
77741        self
77742    }
77743
77744    /// Sets the value of [start_time][crate::model::PersistentResource::start_time].
77745    pub fn set_start_time<T>(mut self, v: T) -> Self
77746    where
77747        T: std::convert::Into<wkt::Timestamp>,
77748    {
77749        self.start_time = std::option::Option::Some(v.into());
77750        self
77751    }
77752
77753    /// Sets or clears the value of [start_time][crate::model::PersistentResource::start_time].
77754    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
77755    where
77756        T: std::convert::Into<wkt::Timestamp>,
77757    {
77758        self.start_time = v.map(|x| x.into());
77759        self
77760    }
77761
77762    /// Sets the value of [update_time][crate::model::PersistentResource::update_time].
77763    pub fn set_update_time<T>(mut self, v: T) -> Self
77764    where
77765        T: std::convert::Into<wkt::Timestamp>,
77766    {
77767        self.update_time = std::option::Option::Some(v.into());
77768        self
77769    }
77770
77771    /// Sets or clears the value of [update_time][crate::model::PersistentResource::update_time].
77772    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
77773    where
77774        T: std::convert::Into<wkt::Timestamp>,
77775    {
77776        self.update_time = v.map(|x| x.into());
77777        self
77778    }
77779
77780    /// Sets the value of [labels][crate::model::PersistentResource::labels].
77781    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
77782    where
77783        T: std::iter::IntoIterator<Item = (K, V)>,
77784        K: std::convert::Into<std::string::String>,
77785        V: std::convert::Into<std::string::String>,
77786    {
77787        use std::iter::Iterator;
77788        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
77789        self
77790    }
77791
77792    /// Sets the value of [network][crate::model::PersistentResource::network].
77793    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
77794        self.network = v.into();
77795        self
77796    }
77797
77798    /// Sets the value of [psc_interface_config][crate::model::PersistentResource::psc_interface_config].
77799    pub fn set_psc_interface_config<T>(mut self, v: T) -> Self
77800    where
77801        T: std::convert::Into<crate::model::PscInterfaceConfig>,
77802    {
77803        self.psc_interface_config = std::option::Option::Some(v.into());
77804        self
77805    }
77806
77807    /// Sets or clears the value of [psc_interface_config][crate::model::PersistentResource::psc_interface_config].
77808    pub fn set_or_clear_psc_interface_config<T>(mut self, v: std::option::Option<T>) -> Self
77809    where
77810        T: std::convert::Into<crate::model::PscInterfaceConfig>,
77811    {
77812        self.psc_interface_config = v.map(|x| x.into());
77813        self
77814    }
77815
77816    /// Sets the value of [encryption_spec][crate::model::PersistentResource::encryption_spec].
77817    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
77818    where
77819        T: std::convert::Into<crate::model::EncryptionSpec>,
77820    {
77821        self.encryption_spec = std::option::Option::Some(v.into());
77822        self
77823    }
77824
77825    /// Sets or clears the value of [encryption_spec][crate::model::PersistentResource::encryption_spec].
77826    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
77827    where
77828        T: std::convert::Into<crate::model::EncryptionSpec>,
77829    {
77830        self.encryption_spec = v.map(|x| x.into());
77831        self
77832    }
77833
77834    /// Sets the value of [resource_runtime_spec][crate::model::PersistentResource::resource_runtime_spec].
77835    pub fn set_resource_runtime_spec<T>(mut self, v: T) -> Self
77836    where
77837        T: std::convert::Into<crate::model::ResourceRuntimeSpec>,
77838    {
77839        self.resource_runtime_spec = std::option::Option::Some(v.into());
77840        self
77841    }
77842
77843    /// Sets or clears the value of [resource_runtime_spec][crate::model::PersistentResource::resource_runtime_spec].
77844    pub fn set_or_clear_resource_runtime_spec<T>(mut self, v: std::option::Option<T>) -> Self
77845    where
77846        T: std::convert::Into<crate::model::ResourceRuntimeSpec>,
77847    {
77848        self.resource_runtime_spec = v.map(|x| x.into());
77849        self
77850    }
77851
77852    /// Sets the value of [resource_runtime][crate::model::PersistentResource::resource_runtime].
77853    pub fn set_resource_runtime<T>(mut self, v: T) -> Self
77854    where
77855        T: std::convert::Into<crate::model::ResourceRuntime>,
77856    {
77857        self.resource_runtime = std::option::Option::Some(v.into());
77858        self
77859    }
77860
77861    /// Sets or clears the value of [resource_runtime][crate::model::PersistentResource::resource_runtime].
77862    pub fn set_or_clear_resource_runtime<T>(mut self, v: std::option::Option<T>) -> Self
77863    where
77864        T: std::convert::Into<crate::model::ResourceRuntime>,
77865    {
77866        self.resource_runtime = v.map(|x| x.into());
77867        self
77868    }
77869
77870    /// Sets the value of [reserved_ip_ranges][crate::model::PersistentResource::reserved_ip_ranges].
77871    pub fn set_reserved_ip_ranges<T, V>(mut self, v: T) -> Self
77872    where
77873        T: std::iter::IntoIterator<Item = V>,
77874        V: std::convert::Into<std::string::String>,
77875    {
77876        use std::iter::Iterator;
77877        self.reserved_ip_ranges = v.into_iter().map(|i| i.into()).collect();
77878        self
77879    }
77880}
77881
77882#[cfg(feature = "persistent-resource-service")]
77883impl wkt::message::Message for PersistentResource {
77884    fn typename() -> &'static str {
77885        "type.googleapis.com/google.cloud.aiplatform.v1.PersistentResource"
77886    }
77887}
77888
77889/// Defines additional types related to [PersistentResource].
77890#[cfg(feature = "persistent-resource-service")]
77891pub mod persistent_resource {
77892    #[allow(unused_imports)]
77893    use super::*;
77894
77895    /// Describes the PersistentResource state.
77896    ///
77897    /// # Working with unknown values
77898    ///
77899    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
77900    /// additional enum variants at any time. Adding new variants is not considered
77901    /// a breaking change. Applications should write their code in anticipation of:
77902    ///
77903    /// - New values appearing in future releases of the client library, **and**
77904    /// - New values received dynamically, without application changes.
77905    ///
77906    /// Please consult the [Working with enums] section in the user guide for some
77907    /// guidelines.
77908    ///
77909    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
77910    #[cfg(feature = "persistent-resource-service")]
77911    #[derive(Clone, Debug, PartialEq)]
77912    #[non_exhaustive]
77913    pub enum State {
77914        /// Not set.
77915        Unspecified,
77916        /// The PROVISIONING state indicates the persistent resources is being
77917        /// created.
77918        Provisioning,
77919        /// The RUNNING state indicates the persistent resource is healthy and fully
77920        /// usable.
77921        Running,
77922        /// The STOPPING state indicates the persistent resource is being deleted.
77923        Stopping,
77924        /// The ERROR state indicates the persistent resource may be unusable.
77925        /// Details can be found in the `error` field.
77926        Error,
77927        /// The REBOOTING state indicates the persistent resource is being rebooted
77928        /// (PR is not available right now but is expected to be ready again later).
77929        Rebooting,
77930        /// The UPDATING state indicates the persistent resource is being updated.
77931        Updating,
77932        /// If set, the enum was initialized with an unknown value.
77933        ///
77934        /// Applications can examine the value using [State::value] or
77935        /// [State::name].
77936        UnknownValue(state::UnknownValue),
77937    }
77938
77939    #[doc(hidden)]
77940    #[cfg(feature = "persistent-resource-service")]
77941    pub mod state {
77942        #[allow(unused_imports)]
77943        use super::*;
77944        #[derive(Clone, Debug, PartialEq)]
77945        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
77946    }
77947
77948    #[cfg(feature = "persistent-resource-service")]
77949    impl State {
77950        /// Gets the enum value.
77951        ///
77952        /// Returns `None` if the enum contains an unknown value deserialized from
77953        /// the string representation of enums.
77954        pub fn value(&self) -> std::option::Option<i32> {
77955            match self {
77956                Self::Unspecified => std::option::Option::Some(0),
77957                Self::Provisioning => std::option::Option::Some(1),
77958                Self::Running => std::option::Option::Some(3),
77959                Self::Stopping => std::option::Option::Some(4),
77960                Self::Error => std::option::Option::Some(5),
77961                Self::Rebooting => std::option::Option::Some(6),
77962                Self::Updating => std::option::Option::Some(7),
77963                Self::UnknownValue(u) => u.0.value(),
77964            }
77965        }
77966
77967        /// Gets the enum value as a string.
77968        ///
77969        /// Returns `None` if the enum contains an unknown value deserialized from
77970        /// the integer representation of enums.
77971        pub fn name(&self) -> std::option::Option<&str> {
77972            match self {
77973                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
77974                Self::Provisioning => std::option::Option::Some("PROVISIONING"),
77975                Self::Running => std::option::Option::Some("RUNNING"),
77976                Self::Stopping => std::option::Option::Some("STOPPING"),
77977                Self::Error => std::option::Option::Some("ERROR"),
77978                Self::Rebooting => std::option::Option::Some("REBOOTING"),
77979                Self::Updating => std::option::Option::Some("UPDATING"),
77980                Self::UnknownValue(u) => u.0.name(),
77981            }
77982        }
77983    }
77984
77985    #[cfg(feature = "persistent-resource-service")]
77986    impl std::default::Default for State {
77987        fn default() -> Self {
77988            use std::convert::From;
77989            Self::from(0)
77990        }
77991    }
77992
77993    #[cfg(feature = "persistent-resource-service")]
77994    impl std::fmt::Display for State {
77995        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
77996            wkt::internal::display_enum(f, self.name(), self.value())
77997        }
77998    }
77999
78000    #[cfg(feature = "persistent-resource-service")]
78001    impl std::convert::From<i32> for State {
78002        fn from(value: i32) -> Self {
78003            match value {
78004                0 => Self::Unspecified,
78005                1 => Self::Provisioning,
78006                3 => Self::Running,
78007                4 => Self::Stopping,
78008                5 => Self::Error,
78009                6 => Self::Rebooting,
78010                7 => Self::Updating,
78011                _ => Self::UnknownValue(state::UnknownValue(
78012                    wkt::internal::UnknownEnumValue::Integer(value),
78013                )),
78014            }
78015        }
78016    }
78017
78018    #[cfg(feature = "persistent-resource-service")]
78019    impl std::convert::From<&str> for State {
78020        fn from(value: &str) -> Self {
78021            use std::string::ToString;
78022            match value {
78023                "STATE_UNSPECIFIED" => Self::Unspecified,
78024                "PROVISIONING" => Self::Provisioning,
78025                "RUNNING" => Self::Running,
78026                "STOPPING" => Self::Stopping,
78027                "ERROR" => Self::Error,
78028                "REBOOTING" => Self::Rebooting,
78029                "UPDATING" => Self::Updating,
78030                _ => Self::UnknownValue(state::UnknownValue(
78031                    wkt::internal::UnknownEnumValue::String(value.to_string()),
78032                )),
78033            }
78034        }
78035    }
78036
78037    #[cfg(feature = "persistent-resource-service")]
78038    impl serde::ser::Serialize for State {
78039        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
78040        where
78041            S: serde::Serializer,
78042        {
78043            match self {
78044                Self::Unspecified => serializer.serialize_i32(0),
78045                Self::Provisioning => serializer.serialize_i32(1),
78046                Self::Running => serializer.serialize_i32(3),
78047                Self::Stopping => serializer.serialize_i32(4),
78048                Self::Error => serializer.serialize_i32(5),
78049                Self::Rebooting => serializer.serialize_i32(6),
78050                Self::Updating => serializer.serialize_i32(7),
78051                Self::UnknownValue(u) => u.0.serialize(serializer),
78052            }
78053        }
78054    }
78055
78056    #[cfg(feature = "persistent-resource-service")]
78057    impl<'de> serde::de::Deserialize<'de> for State {
78058        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
78059        where
78060            D: serde::Deserializer<'de>,
78061        {
78062            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
78063                ".google.cloud.aiplatform.v1.PersistentResource.State",
78064            ))
78065        }
78066    }
78067}
78068
78069/// Represents the spec of a group of resources of the same type,
78070/// for example machine type, disk, and accelerators, in a PersistentResource.
78071#[cfg(feature = "persistent-resource-service")]
78072#[derive(Clone, Default, PartialEq)]
78073#[non_exhaustive]
78074pub struct ResourcePool {
78075    /// Immutable. The unique ID in a PersistentResource for referring to this
78076    /// resource pool. User can specify it if necessary. Otherwise, it's generated
78077    /// automatically.
78078    pub id: std::string::String,
78079
78080    /// Required. Immutable. The specification of a single machine.
78081    pub machine_spec: std::option::Option<crate::model::MachineSpec>,
78082
78083    /// Optional. The total number of machines to use for this resource pool.
78084    pub replica_count: std::option::Option<i64>,
78085
78086    /// Optional. Disk spec for the machine in this node pool.
78087    pub disk_spec: std::option::Option<crate::model::DiskSpec>,
78088
78089    /// Output only. The number of machines currently in use by training jobs for
78090    /// this resource pool. Will replace idle_replica_count.
78091    pub used_replica_count: i64,
78092
78093    /// Optional. Optional spec to configure GKE or Ray-on-Vertex autoscaling
78094    pub autoscaling_spec: std::option::Option<crate::model::resource_pool::AutoscalingSpec>,
78095
78096    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78097}
78098
78099#[cfg(feature = "persistent-resource-service")]
78100impl ResourcePool {
78101    pub fn new() -> Self {
78102        std::default::Default::default()
78103    }
78104
78105    /// Sets the value of [id][crate::model::ResourcePool::id].
78106    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
78107        self.id = v.into();
78108        self
78109    }
78110
78111    /// Sets the value of [machine_spec][crate::model::ResourcePool::machine_spec].
78112    pub fn set_machine_spec<T>(mut self, v: T) -> Self
78113    where
78114        T: std::convert::Into<crate::model::MachineSpec>,
78115    {
78116        self.machine_spec = std::option::Option::Some(v.into());
78117        self
78118    }
78119
78120    /// Sets or clears the value of [machine_spec][crate::model::ResourcePool::machine_spec].
78121    pub fn set_or_clear_machine_spec<T>(mut self, v: std::option::Option<T>) -> Self
78122    where
78123        T: std::convert::Into<crate::model::MachineSpec>,
78124    {
78125        self.machine_spec = v.map(|x| x.into());
78126        self
78127    }
78128
78129    /// Sets the value of [replica_count][crate::model::ResourcePool::replica_count].
78130    pub fn set_replica_count<T>(mut self, v: T) -> Self
78131    where
78132        T: std::convert::Into<i64>,
78133    {
78134        self.replica_count = std::option::Option::Some(v.into());
78135        self
78136    }
78137
78138    /// Sets or clears the value of [replica_count][crate::model::ResourcePool::replica_count].
78139    pub fn set_or_clear_replica_count<T>(mut self, v: std::option::Option<T>) -> Self
78140    where
78141        T: std::convert::Into<i64>,
78142    {
78143        self.replica_count = v.map(|x| x.into());
78144        self
78145    }
78146
78147    /// Sets the value of [disk_spec][crate::model::ResourcePool::disk_spec].
78148    pub fn set_disk_spec<T>(mut self, v: T) -> Self
78149    where
78150        T: std::convert::Into<crate::model::DiskSpec>,
78151    {
78152        self.disk_spec = std::option::Option::Some(v.into());
78153        self
78154    }
78155
78156    /// Sets or clears the value of [disk_spec][crate::model::ResourcePool::disk_spec].
78157    pub fn set_or_clear_disk_spec<T>(mut self, v: std::option::Option<T>) -> Self
78158    where
78159        T: std::convert::Into<crate::model::DiskSpec>,
78160    {
78161        self.disk_spec = v.map(|x| x.into());
78162        self
78163    }
78164
78165    /// Sets the value of [used_replica_count][crate::model::ResourcePool::used_replica_count].
78166    pub fn set_used_replica_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
78167        self.used_replica_count = v.into();
78168        self
78169    }
78170
78171    /// Sets the value of [autoscaling_spec][crate::model::ResourcePool::autoscaling_spec].
78172    pub fn set_autoscaling_spec<T>(mut self, v: T) -> Self
78173    where
78174        T: std::convert::Into<crate::model::resource_pool::AutoscalingSpec>,
78175    {
78176        self.autoscaling_spec = std::option::Option::Some(v.into());
78177        self
78178    }
78179
78180    /// Sets or clears the value of [autoscaling_spec][crate::model::ResourcePool::autoscaling_spec].
78181    pub fn set_or_clear_autoscaling_spec<T>(mut self, v: std::option::Option<T>) -> Self
78182    where
78183        T: std::convert::Into<crate::model::resource_pool::AutoscalingSpec>,
78184    {
78185        self.autoscaling_spec = v.map(|x| x.into());
78186        self
78187    }
78188}
78189
78190#[cfg(feature = "persistent-resource-service")]
78191impl wkt::message::Message for ResourcePool {
78192    fn typename() -> &'static str {
78193        "type.googleapis.com/google.cloud.aiplatform.v1.ResourcePool"
78194    }
78195}
78196
78197/// Defines additional types related to [ResourcePool].
78198#[cfg(feature = "persistent-resource-service")]
78199pub mod resource_pool {
78200    #[allow(unused_imports)]
78201    use super::*;
78202
78203    /// The min/max number of replicas allowed if enabling autoscaling
78204    #[cfg(feature = "persistent-resource-service")]
78205    #[derive(Clone, Default, PartialEq)]
78206    #[non_exhaustive]
78207    pub struct AutoscalingSpec {
78208        /// Optional. min replicas in the node pool,
78209        /// must be ≤ replica_count and < max_replica_count or will throw error.
78210        /// For autoscaling enabled Ray-on-Vertex, we allow min_replica_count of a
78211        /// resource_pool to be 0 to match the OSS Ray
78212        /// behavior(<https://docs.ray.io/en/latest/cluster/vms/user-guides/configuring-autoscaling.html#cluster-config-parameters>).
78213        /// As for Persistent Resource, the min_replica_count must be > 0, we added
78214        /// a corresponding validation inside
78215        /// CreatePersistentResourceRequestValidator.java.
78216        pub min_replica_count: std::option::Option<i64>,
78217
78218        /// Optional. max replicas in the node pool,
78219        /// must be ≥ replica_count and > min_replica_count or will throw error
78220        pub max_replica_count: std::option::Option<i64>,
78221
78222        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78223    }
78224
78225    #[cfg(feature = "persistent-resource-service")]
78226    impl AutoscalingSpec {
78227        pub fn new() -> Self {
78228            std::default::Default::default()
78229        }
78230
78231        /// Sets the value of [min_replica_count][crate::model::resource_pool::AutoscalingSpec::min_replica_count].
78232        pub fn set_min_replica_count<T>(mut self, v: T) -> Self
78233        where
78234            T: std::convert::Into<i64>,
78235        {
78236            self.min_replica_count = std::option::Option::Some(v.into());
78237            self
78238        }
78239
78240        /// Sets or clears the value of [min_replica_count][crate::model::resource_pool::AutoscalingSpec::min_replica_count].
78241        pub fn set_or_clear_min_replica_count<T>(mut self, v: std::option::Option<T>) -> Self
78242        where
78243            T: std::convert::Into<i64>,
78244        {
78245            self.min_replica_count = v.map(|x| x.into());
78246            self
78247        }
78248
78249        /// Sets the value of [max_replica_count][crate::model::resource_pool::AutoscalingSpec::max_replica_count].
78250        pub fn set_max_replica_count<T>(mut self, v: T) -> Self
78251        where
78252            T: std::convert::Into<i64>,
78253        {
78254            self.max_replica_count = std::option::Option::Some(v.into());
78255            self
78256        }
78257
78258        /// Sets or clears the value of [max_replica_count][crate::model::resource_pool::AutoscalingSpec::max_replica_count].
78259        pub fn set_or_clear_max_replica_count<T>(mut self, v: std::option::Option<T>) -> Self
78260        where
78261            T: std::convert::Into<i64>,
78262        {
78263            self.max_replica_count = v.map(|x| x.into());
78264            self
78265        }
78266    }
78267
78268    #[cfg(feature = "persistent-resource-service")]
78269    impl wkt::message::Message for AutoscalingSpec {
78270        fn typename() -> &'static str {
78271            "type.googleapis.com/google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec"
78272        }
78273    }
78274}
78275
78276/// Configuration for the runtime on a PersistentResource instance, including
78277/// but not limited to:
78278///
78279/// * Service accounts used to run the workloads.
78280/// * Whether to make it a dedicated Ray Cluster.
78281#[cfg(feature = "persistent-resource-service")]
78282#[derive(Clone, Default, PartialEq)]
78283#[non_exhaustive]
78284pub struct ResourceRuntimeSpec {
78285    /// Optional. Configure the use of workload identity on the PersistentResource
78286    pub service_account_spec: std::option::Option<crate::model::ServiceAccountSpec>,
78287
78288    /// Optional. Ray cluster configuration.
78289    /// Required when creating a dedicated RayCluster on the PersistentResource.
78290    pub ray_spec: std::option::Option<crate::model::RaySpec>,
78291
78292    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78293}
78294
78295#[cfg(feature = "persistent-resource-service")]
78296impl ResourceRuntimeSpec {
78297    pub fn new() -> Self {
78298        std::default::Default::default()
78299    }
78300
78301    /// Sets the value of [service_account_spec][crate::model::ResourceRuntimeSpec::service_account_spec].
78302    pub fn set_service_account_spec<T>(mut self, v: T) -> Self
78303    where
78304        T: std::convert::Into<crate::model::ServiceAccountSpec>,
78305    {
78306        self.service_account_spec = std::option::Option::Some(v.into());
78307        self
78308    }
78309
78310    /// Sets or clears the value of [service_account_spec][crate::model::ResourceRuntimeSpec::service_account_spec].
78311    pub fn set_or_clear_service_account_spec<T>(mut self, v: std::option::Option<T>) -> Self
78312    where
78313        T: std::convert::Into<crate::model::ServiceAccountSpec>,
78314    {
78315        self.service_account_spec = v.map(|x| x.into());
78316        self
78317    }
78318
78319    /// Sets the value of [ray_spec][crate::model::ResourceRuntimeSpec::ray_spec].
78320    pub fn set_ray_spec<T>(mut self, v: T) -> Self
78321    where
78322        T: std::convert::Into<crate::model::RaySpec>,
78323    {
78324        self.ray_spec = std::option::Option::Some(v.into());
78325        self
78326    }
78327
78328    /// Sets or clears the value of [ray_spec][crate::model::ResourceRuntimeSpec::ray_spec].
78329    pub fn set_or_clear_ray_spec<T>(mut self, v: std::option::Option<T>) -> Self
78330    where
78331        T: std::convert::Into<crate::model::RaySpec>,
78332    {
78333        self.ray_spec = v.map(|x| x.into());
78334        self
78335    }
78336}
78337
78338#[cfg(feature = "persistent-resource-service")]
78339impl wkt::message::Message for ResourceRuntimeSpec {
78340    fn typename() -> &'static str {
78341        "type.googleapis.com/google.cloud.aiplatform.v1.ResourceRuntimeSpec"
78342    }
78343}
78344
78345/// Configuration information for the Ray cluster.
78346/// For experimental launch, Ray cluster creation and Persistent
78347/// cluster creation are 1:1 mapping: We will provision all the nodes within the
78348/// Persistent cluster as Ray nodes.
78349#[cfg(feature = "persistent-resource-service")]
78350#[derive(Clone, Default, PartialEq)]
78351#[non_exhaustive]
78352pub struct RaySpec {
78353    /// Optional. Default image for user to choose a preferred ML framework
78354    /// (for example, TensorFlow or Pytorch) by choosing from [Vertex prebuilt
78355    /// images](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers).
78356    /// Either this or the resource_pool_images is required. Use this field if
78357    /// you need all the resource pools to have the same Ray image. Otherwise, use
78358    /// the {@code resource_pool_images} field.
78359    pub image_uri: std::string::String,
78360
78361    /// Optional. Required if image_uri isn't set. A map of resource_pool_id to
78362    /// prebuild Ray image if user need to use different images for different
78363    /// head/worker pools. This map needs to cover all the resource pool ids.
78364    /// Example:
78365    /// {
78366    /// "ray_head_node_pool": "head image"
78367    /// "ray_worker_node_pool1": "worker image"
78368    /// "ray_worker_node_pool2": "another worker image"
78369    /// }
78370    pub resource_pool_images: std::collections::HashMap<std::string::String, std::string::String>,
78371
78372    /// Optional. This will be used to indicate which resource pool will serve as
78373    /// the Ray head node(the first node within that pool). Will use the machine
78374    /// from the first workerpool as the head node by default if this field isn't
78375    /// set.
78376    pub head_node_resource_pool_id: std::string::String,
78377
78378    /// Optional. Ray metrics configurations.
78379    pub ray_metric_spec: std::option::Option<crate::model::RayMetricSpec>,
78380
78381    /// Optional. OSS Ray logging configurations.
78382    pub ray_logs_spec: std::option::Option<crate::model::RayLogsSpec>,
78383
78384    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78385}
78386
78387#[cfg(feature = "persistent-resource-service")]
78388impl RaySpec {
78389    pub fn new() -> Self {
78390        std::default::Default::default()
78391    }
78392
78393    /// Sets the value of [image_uri][crate::model::RaySpec::image_uri].
78394    pub fn set_image_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
78395        self.image_uri = v.into();
78396        self
78397    }
78398
78399    /// Sets the value of [resource_pool_images][crate::model::RaySpec::resource_pool_images].
78400    pub fn set_resource_pool_images<T, K, V>(mut self, v: T) -> Self
78401    where
78402        T: std::iter::IntoIterator<Item = (K, V)>,
78403        K: std::convert::Into<std::string::String>,
78404        V: std::convert::Into<std::string::String>,
78405    {
78406        use std::iter::Iterator;
78407        self.resource_pool_images = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
78408        self
78409    }
78410
78411    /// Sets the value of [head_node_resource_pool_id][crate::model::RaySpec::head_node_resource_pool_id].
78412    pub fn set_head_node_resource_pool_id<T: std::convert::Into<std::string::String>>(
78413        mut self,
78414        v: T,
78415    ) -> Self {
78416        self.head_node_resource_pool_id = v.into();
78417        self
78418    }
78419
78420    /// Sets the value of [ray_metric_spec][crate::model::RaySpec::ray_metric_spec].
78421    pub fn set_ray_metric_spec<T>(mut self, v: T) -> Self
78422    where
78423        T: std::convert::Into<crate::model::RayMetricSpec>,
78424    {
78425        self.ray_metric_spec = std::option::Option::Some(v.into());
78426        self
78427    }
78428
78429    /// Sets or clears the value of [ray_metric_spec][crate::model::RaySpec::ray_metric_spec].
78430    pub fn set_or_clear_ray_metric_spec<T>(mut self, v: std::option::Option<T>) -> Self
78431    where
78432        T: std::convert::Into<crate::model::RayMetricSpec>,
78433    {
78434        self.ray_metric_spec = v.map(|x| x.into());
78435        self
78436    }
78437
78438    /// Sets the value of [ray_logs_spec][crate::model::RaySpec::ray_logs_spec].
78439    pub fn set_ray_logs_spec<T>(mut self, v: T) -> Self
78440    where
78441        T: std::convert::Into<crate::model::RayLogsSpec>,
78442    {
78443        self.ray_logs_spec = std::option::Option::Some(v.into());
78444        self
78445    }
78446
78447    /// Sets or clears the value of [ray_logs_spec][crate::model::RaySpec::ray_logs_spec].
78448    pub fn set_or_clear_ray_logs_spec<T>(mut self, v: std::option::Option<T>) -> Self
78449    where
78450        T: std::convert::Into<crate::model::RayLogsSpec>,
78451    {
78452        self.ray_logs_spec = v.map(|x| x.into());
78453        self
78454    }
78455}
78456
78457#[cfg(feature = "persistent-resource-service")]
78458impl wkt::message::Message for RaySpec {
78459    fn typename() -> &'static str {
78460        "type.googleapis.com/google.cloud.aiplatform.v1.RaySpec"
78461    }
78462}
78463
78464/// Persistent Cluster runtime information as output
78465#[cfg(feature = "persistent-resource-service")]
78466#[derive(Clone, Default, PartialEq)]
78467#[non_exhaustive]
78468pub struct ResourceRuntime {
78469    /// Output only. URIs for user to connect to the Cluster.
78470    /// Example:
78471    /// {
78472    /// "RAY_HEAD_NODE_INTERNAL_IP": "head-node-IP:10001"
78473    /// "RAY_DASHBOARD_URI": "ray-dashboard-address:8888"
78474    /// }
78475    pub access_uris: std::collections::HashMap<std::string::String, std::string::String>,
78476
78477    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78478}
78479
78480#[cfg(feature = "persistent-resource-service")]
78481impl ResourceRuntime {
78482    pub fn new() -> Self {
78483        std::default::Default::default()
78484    }
78485
78486    /// Sets the value of [access_uris][crate::model::ResourceRuntime::access_uris].
78487    pub fn set_access_uris<T, K, V>(mut self, v: T) -> Self
78488    where
78489        T: std::iter::IntoIterator<Item = (K, V)>,
78490        K: std::convert::Into<std::string::String>,
78491        V: std::convert::Into<std::string::String>,
78492    {
78493        use std::iter::Iterator;
78494        self.access_uris = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
78495        self
78496    }
78497}
78498
78499#[cfg(feature = "persistent-resource-service")]
78500impl wkt::message::Message for ResourceRuntime {
78501    fn typename() -> &'static str {
78502        "type.googleapis.com/google.cloud.aiplatform.v1.ResourceRuntime"
78503    }
78504}
78505
78506/// Configuration for the use of custom service account to run the workloads.
78507#[cfg(feature = "persistent-resource-service")]
78508#[derive(Clone, Default, PartialEq)]
78509#[non_exhaustive]
78510pub struct ServiceAccountSpec {
78511    /// Required. If true, custom user-managed service account is enforced to run
78512    /// any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses
78513    /// the [Vertex AI Custom Code Service
78514    /// Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
78515    pub enable_custom_service_account: bool,
78516
78517    /// Optional. Required when all below conditions are met
78518    ///
78519    /// * `enable_custom_service_account` is true;
78520    /// * any runtime is specified via `ResourceRuntimeSpec` on creation time,
78521    ///   for example, Ray
78522    ///
78523    /// The users must have `iam.serviceAccounts.actAs` permission on this service
78524    /// account and then the specified runtime containers will run as it.
78525    ///
78526    /// Do not set this field if you want to submit jobs using custom service
78527    /// account to this PersistentResource after creation, but only specify the
78528    /// `service_account` inside the job.
78529    pub service_account: std::string::String,
78530
78531    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78532}
78533
78534#[cfg(feature = "persistent-resource-service")]
78535impl ServiceAccountSpec {
78536    pub fn new() -> Self {
78537        std::default::Default::default()
78538    }
78539
78540    /// Sets the value of [enable_custom_service_account][crate::model::ServiceAccountSpec::enable_custom_service_account].
78541    pub fn set_enable_custom_service_account<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
78542        self.enable_custom_service_account = v.into();
78543        self
78544    }
78545
78546    /// Sets the value of [service_account][crate::model::ServiceAccountSpec::service_account].
78547    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
78548        self.service_account = v.into();
78549        self
78550    }
78551}
78552
78553#[cfg(feature = "persistent-resource-service")]
78554impl wkt::message::Message for ServiceAccountSpec {
78555    fn typename() -> &'static str {
78556        "type.googleapis.com/google.cloud.aiplatform.v1.ServiceAccountSpec"
78557    }
78558}
78559
78560/// Configuration for the Ray metrics.
78561#[cfg(feature = "persistent-resource-service")]
78562#[derive(Clone, Default, PartialEq)]
78563#[non_exhaustive]
78564pub struct RayMetricSpec {
78565    /// Optional. Flag to disable the Ray metrics collection.
78566    pub disabled: bool,
78567
78568    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78569}
78570
78571#[cfg(feature = "persistent-resource-service")]
78572impl RayMetricSpec {
78573    pub fn new() -> Self {
78574        std::default::Default::default()
78575    }
78576
78577    /// Sets the value of [disabled][crate::model::RayMetricSpec::disabled].
78578    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
78579        self.disabled = v.into();
78580        self
78581    }
78582}
78583
78584#[cfg(feature = "persistent-resource-service")]
78585impl wkt::message::Message for RayMetricSpec {
78586    fn typename() -> &'static str {
78587        "type.googleapis.com/google.cloud.aiplatform.v1.RayMetricSpec"
78588    }
78589}
78590
78591/// Configuration for the Ray OSS Logs.
78592#[cfg(feature = "persistent-resource-service")]
78593#[derive(Clone, Default, PartialEq)]
78594#[non_exhaustive]
78595pub struct RayLogsSpec {
78596    /// Optional. Flag to disable the export of Ray OSS logs to Cloud Logging.
78597    pub disabled: bool,
78598
78599    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78600}
78601
78602#[cfg(feature = "persistent-resource-service")]
78603impl RayLogsSpec {
78604    pub fn new() -> Self {
78605        std::default::Default::default()
78606    }
78607
78608    /// Sets the value of [disabled][crate::model::RayLogsSpec::disabled].
78609    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
78610        self.disabled = v.into();
78611        self
78612    }
78613}
78614
78615#[cfg(feature = "persistent-resource-service")]
78616impl wkt::message::Message for RayLogsSpec {
78617    fn typename() -> &'static str {
78618        "type.googleapis.com/google.cloud.aiplatform.v1.RayLogsSpec"
78619    }
78620}
78621
78622/// Request message for
78623/// [PersistentResourceService.CreatePersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.CreatePersistentResource].
78624///
78625/// [google.cloud.aiplatform.v1.PersistentResourceService.CreatePersistentResource]: crate::client::PersistentResourceService::create_persistent_resource
78626#[cfg(feature = "persistent-resource-service")]
78627#[derive(Clone, Default, PartialEq)]
78628#[non_exhaustive]
78629pub struct CreatePersistentResourceRequest {
78630    /// Required. The resource name of the Location to create the
78631    /// PersistentResource in. Format: `projects/{project}/locations/{location}`
78632    pub parent: std::string::String,
78633
78634    /// Required. The PersistentResource to create.
78635    pub persistent_resource: std::option::Option<crate::model::PersistentResource>,
78636
78637    /// Required. The ID to use for the PersistentResource, which become the final
78638    /// component of the PersistentResource's resource name.
78639    ///
78640    /// The maximum length is 63 characters, and valid characters
78641    /// are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
78642    pub persistent_resource_id: std::string::String,
78643
78644    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78645}
78646
78647#[cfg(feature = "persistent-resource-service")]
78648impl CreatePersistentResourceRequest {
78649    pub fn new() -> Self {
78650        std::default::Default::default()
78651    }
78652
78653    /// Sets the value of [parent][crate::model::CreatePersistentResourceRequest::parent].
78654    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
78655        self.parent = v.into();
78656        self
78657    }
78658
78659    /// Sets the value of [persistent_resource][crate::model::CreatePersistentResourceRequest::persistent_resource].
78660    pub fn set_persistent_resource<T>(mut self, v: T) -> Self
78661    where
78662        T: std::convert::Into<crate::model::PersistentResource>,
78663    {
78664        self.persistent_resource = std::option::Option::Some(v.into());
78665        self
78666    }
78667
78668    /// Sets or clears the value of [persistent_resource][crate::model::CreatePersistentResourceRequest::persistent_resource].
78669    pub fn set_or_clear_persistent_resource<T>(mut self, v: std::option::Option<T>) -> Self
78670    where
78671        T: std::convert::Into<crate::model::PersistentResource>,
78672    {
78673        self.persistent_resource = v.map(|x| x.into());
78674        self
78675    }
78676
78677    /// Sets the value of [persistent_resource_id][crate::model::CreatePersistentResourceRequest::persistent_resource_id].
78678    pub fn set_persistent_resource_id<T: std::convert::Into<std::string::String>>(
78679        mut self,
78680        v: T,
78681    ) -> Self {
78682        self.persistent_resource_id = v.into();
78683        self
78684    }
78685}
78686
78687#[cfg(feature = "persistent-resource-service")]
78688impl wkt::message::Message for CreatePersistentResourceRequest {
78689    fn typename() -> &'static str {
78690        "type.googleapis.com/google.cloud.aiplatform.v1.CreatePersistentResourceRequest"
78691    }
78692}
78693
78694/// Details of operations that perform create PersistentResource.
78695#[cfg(feature = "persistent-resource-service")]
78696#[derive(Clone, Default, PartialEq)]
78697#[non_exhaustive]
78698pub struct CreatePersistentResourceOperationMetadata {
78699    /// Operation metadata for PersistentResource.
78700    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
78701
78702    /// Progress Message for Create LRO
78703    pub progress_message: std::string::String,
78704
78705    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78706}
78707
78708#[cfg(feature = "persistent-resource-service")]
78709impl CreatePersistentResourceOperationMetadata {
78710    pub fn new() -> Self {
78711        std::default::Default::default()
78712    }
78713
78714    /// Sets the value of [generic_metadata][crate::model::CreatePersistentResourceOperationMetadata::generic_metadata].
78715    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
78716    where
78717        T: std::convert::Into<crate::model::GenericOperationMetadata>,
78718    {
78719        self.generic_metadata = std::option::Option::Some(v.into());
78720        self
78721    }
78722
78723    /// Sets or clears the value of [generic_metadata][crate::model::CreatePersistentResourceOperationMetadata::generic_metadata].
78724    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
78725    where
78726        T: std::convert::Into<crate::model::GenericOperationMetadata>,
78727    {
78728        self.generic_metadata = v.map(|x| x.into());
78729        self
78730    }
78731
78732    /// Sets the value of [progress_message][crate::model::CreatePersistentResourceOperationMetadata::progress_message].
78733    pub fn set_progress_message<T: std::convert::Into<std::string::String>>(
78734        mut self,
78735        v: T,
78736    ) -> Self {
78737        self.progress_message = v.into();
78738        self
78739    }
78740}
78741
78742#[cfg(feature = "persistent-resource-service")]
78743impl wkt::message::Message for CreatePersistentResourceOperationMetadata {
78744    fn typename() -> &'static str {
78745        "type.googleapis.com/google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata"
78746    }
78747}
78748
78749/// Details of operations that perform update PersistentResource.
78750#[cfg(feature = "persistent-resource-service")]
78751#[derive(Clone, Default, PartialEq)]
78752#[non_exhaustive]
78753pub struct UpdatePersistentResourceOperationMetadata {
78754    /// Operation metadata for PersistentResource.
78755    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
78756
78757    /// Progress Message for Update LRO
78758    pub progress_message: std::string::String,
78759
78760    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78761}
78762
78763#[cfg(feature = "persistent-resource-service")]
78764impl UpdatePersistentResourceOperationMetadata {
78765    pub fn new() -> Self {
78766        std::default::Default::default()
78767    }
78768
78769    /// Sets the value of [generic_metadata][crate::model::UpdatePersistentResourceOperationMetadata::generic_metadata].
78770    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
78771    where
78772        T: std::convert::Into<crate::model::GenericOperationMetadata>,
78773    {
78774        self.generic_metadata = std::option::Option::Some(v.into());
78775        self
78776    }
78777
78778    /// Sets or clears the value of [generic_metadata][crate::model::UpdatePersistentResourceOperationMetadata::generic_metadata].
78779    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
78780    where
78781        T: std::convert::Into<crate::model::GenericOperationMetadata>,
78782    {
78783        self.generic_metadata = v.map(|x| x.into());
78784        self
78785    }
78786
78787    /// Sets the value of [progress_message][crate::model::UpdatePersistentResourceOperationMetadata::progress_message].
78788    pub fn set_progress_message<T: std::convert::Into<std::string::String>>(
78789        mut self,
78790        v: T,
78791    ) -> Self {
78792        self.progress_message = v.into();
78793        self
78794    }
78795}
78796
78797#[cfg(feature = "persistent-resource-service")]
78798impl wkt::message::Message for UpdatePersistentResourceOperationMetadata {
78799    fn typename() -> &'static str {
78800        "type.googleapis.com/google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata"
78801    }
78802}
78803
78804/// Details of operations that perform reboot PersistentResource.
78805#[cfg(feature = "persistent-resource-service")]
78806#[derive(Clone, Default, PartialEq)]
78807#[non_exhaustive]
78808pub struct RebootPersistentResourceOperationMetadata {
78809    /// Operation metadata for PersistentResource.
78810    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
78811
78812    /// Progress Message for Reboot LRO
78813    pub progress_message: std::string::String,
78814
78815    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78816}
78817
78818#[cfg(feature = "persistent-resource-service")]
78819impl RebootPersistentResourceOperationMetadata {
78820    pub fn new() -> Self {
78821        std::default::Default::default()
78822    }
78823
78824    /// Sets the value of [generic_metadata][crate::model::RebootPersistentResourceOperationMetadata::generic_metadata].
78825    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
78826    where
78827        T: std::convert::Into<crate::model::GenericOperationMetadata>,
78828    {
78829        self.generic_metadata = std::option::Option::Some(v.into());
78830        self
78831    }
78832
78833    /// Sets or clears the value of [generic_metadata][crate::model::RebootPersistentResourceOperationMetadata::generic_metadata].
78834    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
78835    where
78836        T: std::convert::Into<crate::model::GenericOperationMetadata>,
78837    {
78838        self.generic_metadata = v.map(|x| x.into());
78839        self
78840    }
78841
78842    /// Sets the value of [progress_message][crate::model::RebootPersistentResourceOperationMetadata::progress_message].
78843    pub fn set_progress_message<T: std::convert::Into<std::string::String>>(
78844        mut self,
78845        v: T,
78846    ) -> Self {
78847        self.progress_message = v.into();
78848        self
78849    }
78850}
78851
78852#[cfg(feature = "persistent-resource-service")]
78853impl wkt::message::Message for RebootPersistentResourceOperationMetadata {
78854    fn typename() -> &'static str {
78855        "type.googleapis.com/google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata"
78856    }
78857}
78858
78859/// Request message for
78860/// [PersistentResourceService.GetPersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.GetPersistentResource].
78861///
78862/// [google.cloud.aiplatform.v1.PersistentResourceService.GetPersistentResource]: crate::client::PersistentResourceService::get_persistent_resource
78863#[cfg(feature = "persistent-resource-service")]
78864#[derive(Clone, Default, PartialEq)]
78865#[non_exhaustive]
78866pub struct GetPersistentResourceRequest {
78867    /// Required. The name of the PersistentResource resource.
78868    /// Format:
78869    /// `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
78870    pub name: std::string::String,
78871
78872    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78873}
78874
78875#[cfg(feature = "persistent-resource-service")]
78876impl GetPersistentResourceRequest {
78877    pub fn new() -> Self {
78878        std::default::Default::default()
78879    }
78880
78881    /// Sets the value of [name][crate::model::GetPersistentResourceRequest::name].
78882    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
78883        self.name = v.into();
78884        self
78885    }
78886}
78887
78888#[cfg(feature = "persistent-resource-service")]
78889impl wkt::message::Message for GetPersistentResourceRequest {
78890    fn typename() -> &'static str {
78891        "type.googleapis.com/google.cloud.aiplatform.v1.GetPersistentResourceRequest"
78892    }
78893}
78894
78895/// Request message for
78896/// [PersistentResourceService.ListPersistentResources][google.cloud.aiplatform.v1.PersistentResourceService.ListPersistentResources].
78897///
78898/// [google.cloud.aiplatform.v1.PersistentResourceService.ListPersistentResources]: crate::client::PersistentResourceService::list_persistent_resources
78899#[cfg(feature = "persistent-resource-service")]
78900#[derive(Clone, Default, PartialEq)]
78901#[non_exhaustive]
78902pub struct ListPersistentResourcesRequest {
78903    /// Required. The resource name of the Location to list the PersistentResources
78904    /// from. Format: `projects/{project}/locations/{location}`
78905    pub parent: std::string::String,
78906
78907    /// Optional. The standard list page size.
78908    pub page_size: i32,
78909
78910    /// Optional. The standard list page token.
78911    /// Typically obtained via
78912    /// [ListPersistentResourcesResponse.next_page_token][google.cloud.aiplatform.v1.ListPersistentResourcesResponse.next_page_token]
78913    /// of the previous [PersistentResourceService.ListPersistentResource][] call.
78914    ///
78915    /// [google.cloud.aiplatform.v1.ListPersistentResourcesResponse.next_page_token]: crate::model::ListPersistentResourcesResponse::next_page_token
78916    pub page_token: std::string::String,
78917
78918    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78919}
78920
78921#[cfg(feature = "persistent-resource-service")]
78922impl ListPersistentResourcesRequest {
78923    pub fn new() -> Self {
78924        std::default::Default::default()
78925    }
78926
78927    /// Sets the value of [parent][crate::model::ListPersistentResourcesRequest::parent].
78928    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
78929        self.parent = v.into();
78930        self
78931    }
78932
78933    /// Sets the value of [page_size][crate::model::ListPersistentResourcesRequest::page_size].
78934    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
78935        self.page_size = v.into();
78936        self
78937    }
78938
78939    /// Sets the value of [page_token][crate::model::ListPersistentResourcesRequest::page_token].
78940    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
78941        self.page_token = v.into();
78942        self
78943    }
78944}
78945
78946#[cfg(feature = "persistent-resource-service")]
78947impl wkt::message::Message for ListPersistentResourcesRequest {
78948    fn typename() -> &'static str {
78949        "type.googleapis.com/google.cloud.aiplatform.v1.ListPersistentResourcesRequest"
78950    }
78951}
78952
78953/// Response message for
78954/// [PersistentResourceService.ListPersistentResources][google.cloud.aiplatform.v1.PersistentResourceService.ListPersistentResources]
78955///
78956/// [google.cloud.aiplatform.v1.PersistentResourceService.ListPersistentResources]: crate::client::PersistentResourceService::list_persistent_resources
78957#[cfg(feature = "persistent-resource-service")]
78958#[derive(Clone, Default, PartialEq)]
78959#[non_exhaustive]
78960pub struct ListPersistentResourcesResponse {
78961    pub persistent_resources: std::vec::Vec<crate::model::PersistentResource>,
78962
78963    /// A token to retrieve next page of results.
78964    /// Pass to
78965    /// [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token]
78966    /// to obtain that page.
78967    ///
78968    /// [google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token]: crate::model::ListPersistentResourcesRequest::page_token
78969    pub next_page_token: std::string::String,
78970
78971    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78972}
78973
78974#[cfg(feature = "persistent-resource-service")]
78975impl ListPersistentResourcesResponse {
78976    pub fn new() -> Self {
78977        std::default::Default::default()
78978    }
78979
78980    /// Sets the value of [persistent_resources][crate::model::ListPersistentResourcesResponse::persistent_resources].
78981    pub fn set_persistent_resources<T, V>(mut self, v: T) -> Self
78982    where
78983        T: std::iter::IntoIterator<Item = V>,
78984        V: std::convert::Into<crate::model::PersistentResource>,
78985    {
78986        use std::iter::Iterator;
78987        self.persistent_resources = v.into_iter().map(|i| i.into()).collect();
78988        self
78989    }
78990
78991    /// Sets the value of [next_page_token][crate::model::ListPersistentResourcesResponse::next_page_token].
78992    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
78993        self.next_page_token = v.into();
78994        self
78995    }
78996}
78997
78998#[cfg(feature = "persistent-resource-service")]
78999impl wkt::message::Message for ListPersistentResourcesResponse {
79000    fn typename() -> &'static str {
79001        "type.googleapis.com/google.cloud.aiplatform.v1.ListPersistentResourcesResponse"
79002    }
79003}
79004
79005#[cfg(feature = "persistent-resource-service")]
79006#[doc(hidden)]
79007impl gax::paginator::internal::PageableResponse for ListPersistentResourcesResponse {
79008    type PageItem = crate::model::PersistentResource;
79009
79010    fn items(self) -> std::vec::Vec<Self::PageItem> {
79011        self.persistent_resources
79012    }
79013
79014    fn next_page_token(&self) -> std::string::String {
79015        use std::clone::Clone;
79016        self.next_page_token.clone()
79017    }
79018}
79019
79020/// Request message for
79021/// [PersistentResourceService.DeletePersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.DeletePersistentResource].
79022///
79023/// [google.cloud.aiplatform.v1.PersistentResourceService.DeletePersistentResource]: crate::client::PersistentResourceService::delete_persistent_resource
79024#[cfg(feature = "persistent-resource-service")]
79025#[derive(Clone, Default, PartialEq)]
79026#[non_exhaustive]
79027pub struct DeletePersistentResourceRequest {
79028    /// Required. The name of the PersistentResource to be deleted.
79029    /// Format:
79030    /// `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
79031    pub name: std::string::String,
79032
79033    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
79034}
79035
79036#[cfg(feature = "persistent-resource-service")]
79037impl DeletePersistentResourceRequest {
79038    pub fn new() -> Self {
79039        std::default::Default::default()
79040    }
79041
79042    /// Sets the value of [name][crate::model::DeletePersistentResourceRequest::name].
79043    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
79044        self.name = v.into();
79045        self
79046    }
79047}
79048
79049#[cfg(feature = "persistent-resource-service")]
79050impl wkt::message::Message for DeletePersistentResourceRequest {
79051    fn typename() -> &'static str {
79052        "type.googleapis.com/google.cloud.aiplatform.v1.DeletePersistentResourceRequest"
79053    }
79054}
79055
79056/// Request message for UpdatePersistentResource method.
79057#[cfg(feature = "persistent-resource-service")]
79058#[derive(Clone, Default, PartialEq)]
79059#[non_exhaustive]
79060pub struct UpdatePersistentResourceRequest {
79061    /// Required. The PersistentResource to update.
79062    ///
79063    /// The PersistentResource's `name` field is used to identify the
79064    /// PersistentResource to update. Format:
79065    /// `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
79066    pub persistent_resource: std::option::Option<crate::model::PersistentResource>,
79067
79068    /// Required. Specify the fields to be overwritten in the PersistentResource by
79069    /// the update method.
79070    pub update_mask: std::option::Option<wkt::FieldMask>,
79071
79072    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
79073}
79074
79075#[cfg(feature = "persistent-resource-service")]
79076impl UpdatePersistentResourceRequest {
79077    pub fn new() -> Self {
79078        std::default::Default::default()
79079    }
79080
79081    /// Sets the value of [persistent_resource][crate::model::UpdatePersistentResourceRequest::persistent_resource].
79082    pub fn set_persistent_resource<T>(mut self, v: T) -> Self
79083    where
79084        T: std::convert::Into<crate::model::PersistentResource>,
79085    {
79086        self.persistent_resource = std::option::Option::Some(v.into());
79087        self
79088    }
79089
79090    /// Sets or clears the value of [persistent_resource][crate::model::UpdatePersistentResourceRequest::persistent_resource].
79091    pub fn set_or_clear_persistent_resource<T>(mut self, v: std::option::Option<T>) -> Self
79092    where
79093        T: std::convert::Into<crate::model::PersistentResource>,
79094    {
79095        self.persistent_resource = v.map(|x| x.into());
79096        self
79097    }
79098
79099    /// Sets the value of [update_mask][crate::model::UpdatePersistentResourceRequest::update_mask].
79100    pub fn set_update_mask<T>(mut self, v: T) -> Self
79101    where
79102        T: std::convert::Into<wkt::FieldMask>,
79103    {
79104        self.update_mask = std::option::Option::Some(v.into());
79105        self
79106    }
79107
79108    /// Sets or clears the value of [update_mask][crate::model::UpdatePersistentResourceRequest::update_mask].
79109    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
79110    where
79111        T: std::convert::Into<wkt::FieldMask>,
79112    {
79113        self.update_mask = v.map(|x| x.into());
79114        self
79115    }
79116}
79117
79118#[cfg(feature = "persistent-resource-service")]
79119impl wkt::message::Message for UpdatePersistentResourceRequest {
79120    fn typename() -> &'static str {
79121        "type.googleapis.com/google.cloud.aiplatform.v1.UpdatePersistentResourceRequest"
79122    }
79123}
79124
79125/// Request message for
79126/// [PersistentResourceService.RebootPersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.RebootPersistentResource].
79127///
79128/// [google.cloud.aiplatform.v1.PersistentResourceService.RebootPersistentResource]: crate::client::PersistentResourceService::reboot_persistent_resource
79129#[cfg(feature = "persistent-resource-service")]
79130#[derive(Clone, Default, PartialEq)]
79131#[non_exhaustive]
79132pub struct RebootPersistentResourceRequest {
79133    /// Required. The name of the PersistentResource resource.
79134    /// Format:
79135    /// `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
79136    pub name: std::string::String,
79137
79138    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
79139}
79140
79141#[cfg(feature = "persistent-resource-service")]
79142impl RebootPersistentResourceRequest {
79143    pub fn new() -> Self {
79144        std::default::Default::default()
79145    }
79146
79147    /// Sets the value of [name][crate::model::RebootPersistentResourceRequest::name].
79148    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
79149        self.name = v.into();
79150        self
79151    }
79152}
79153
79154#[cfg(feature = "persistent-resource-service")]
79155impl wkt::message::Message for RebootPersistentResourceRequest {
79156    fn typename() -> &'static str {
79157        "type.googleapis.com/google.cloud.aiplatform.v1.RebootPersistentResourceRequest"
79158    }
79159}
79160
79161/// An instance of a machine learning PipelineJob.
79162#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79163#[derive(Clone, Default, PartialEq)]
79164#[non_exhaustive]
79165pub struct PipelineJob {
79166    /// Output only. The resource name of the PipelineJob.
79167    pub name: std::string::String,
79168
79169    /// The display name of the Pipeline.
79170    /// The name can be up to 128 characters long and can consist of any UTF-8
79171    /// characters.
79172    pub display_name: std::string::String,
79173
79174    /// Output only. Pipeline creation time.
79175    pub create_time: std::option::Option<wkt::Timestamp>,
79176
79177    /// Output only. Pipeline start time.
79178    pub start_time: std::option::Option<wkt::Timestamp>,
79179
79180    /// Output only. Pipeline end time.
79181    pub end_time: std::option::Option<wkt::Timestamp>,
79182
79183    /// Output only. Timestamp when this PipelineJob was most recently updated.
79184    pub update_time: std::option::Option<wkt::Timestamp>,
79185
79186    /// The spec of the pipeline.
79187    pub pipeline_spec: std::option::Option<wkt::Struct>,
79188
79189    /// Output only. The detailed state of the job.
79190    pub state: crate::model::PipelineState,
79191
79192    /// Output only. The details of pipeline run. Not available in the list view.
79193    pub job_detail: std::option::Option<crate::model::PipelineJobDetail>,
79194
79195    /// Output only. The error that occurred during pipeline execution.
79196    /// Only populated when the pipeline's state is FAILED or CANCELLED.
79197    pub error: std::option::Option<rpc::model::Status>,
79198
79199    /// The labels with user-defined metadata to organize PipelineJob.
79200    ///
79201    /// Label keys and values can be no longer than 64 characters
79202    /// (Unicode codepoints), can only contain lowercase letters, numeric
79203    /// characters, underscores and dashes. International characters are allowed.
79204    ///
79205    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
79206    ///
79207    /// Note there is some reserved label key for Vertex AI Pipelines.
79208    ///
79209    /// - `vertex-ai-pipelines-run-billing-id`, user set value will get overrided.
79210    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
79211
79212    /// Runtime config of the pipeline.
79213    pub runtime_config: std::option::Option<crate::model::pipeline_job::RuntimeConfig>,
79214
79215    /// Customer-managed encryption key spec for a pipelineJob. If set, this
79216    /// PipelineJob and all of its sub-resources will be secured by this key.
79217    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
79218
79219    /// The service account that the pipeline workload runs as.
79220    /// If not specified, the Compute Engine default service account in the project
79221    /// will be used.
79222    /// See
79223    /// <https://cloud.google.com/compute/docs/access/service-accounts#default_service_account>
79224    ///
79225    /// Users starting the pipeline must have the `iam.serviceAccounts.actAs`
79226    /// permission on this service account.
79227    pub service_account: std::string::String,
79228
79229    /// The full name of the Compute Engine
79230    /// [network](/compute/docs/networks-and-firewalls#networks) to which the
79231    /// Pipeline Job's workload should be peered. For example,
79232    /// `projects/12345/global/networks/myVPC`.
79233    /// [Format](/compute/docs/reference/rest/v1/networks/insert)
79234    /// is of the form `projects/{project}/global/networks/{network}`.
79235    /// Where {project} is a project number, as in `12345`, and {network} is a
79236    /// network name.
79237    ///
79238    /// Private services access must already be configured for the network.
79239    /// Pipeline job will apply the network configuration to the Google Cloud
79240    /// resources being launched, if applied, such as Vertex AI
79241    /// Training or Dataflow job. If left unspecified, the workload is not peered
79242    /// with any network.
79243    pub network: std::string::String,
79244
79245    /// A list of names for the reserved ip ranges under the VPC network
79246    /// that can be used for this Pipeline Job's workload.
79247    ///
79248    /// If set, we will deploy the Pipeline Job's workload within the provided ip
79249    /// ranges. Otherwise, the job will be deployed to any ip ranges under the
79250    /// provided VPC network.
79251    ///
79252    /// Example: ['vertex-ai-ip-range'].
79253    pub reserved_ip_ranges: std::vec::Vec<std::string::String>,
79254
79255    /// Optional. Configuration for PSC-I for PipelineJob.
79256    pub psc_interface_config: std::option::Option<crate::model::PscInterfaceConfig>,
79257
79258    /// A template uri from where the
79259    /// [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec],
79260    /// if empty, will be downloaded. Currently, only uri from Vertex Template
79261    /// Registry & Gallery is supported. Reference to
79262    /// <https://cloud.google.com/vertex-ai/docs/pipelines/create-pipeline-template>.
79263    ///
79264    /// [google.cloud.aiplatform.v1.PipelineJob.pipeline_spec]: crate::model::PipelineJob::pipeline_spec
79265    pub template_uri: std::string::String,
79266
79267    /// Output only. Pipeline template metadata. Will fill up fields if
79268    /// [PipelineJob.template_uri][google.cloud.aiplatform.v1.PipelineJob.template_uri]
79269    /// is from supported template registry.
79270    ///
79271    /// [google.cloud.aiplatform.v1.PipelineJob.template_uri]: crate::model::PipelineJob::template_uri
79272    pub template_metadata: std::option::Option<crate::model::PipelineTemplateMetadata>,
79273
79274    /// Output only. The schedule resource name.
79275    /// Only returned if the Pipeline is created by Schedule API.
79276    pub schedule_name: std::string::String,
79277
79278    /// Optional. Whether to do component level validations before job creation.
79279    pub preflight_validations: bool,
79280
79281    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
79282}
79283
79284#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79285impl PipelineJob {
79286    pub fn new() -> Self {
79287        std::default::Default::default()
79288    }
79289
79290    /// Sets the value of [name][crate::model::PipelineJob::name].
79291    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
79292        self.name = v.into();
79293        self
79294    }
79295
79296    /// Sets the value of [display_name][crate::model::PipelineJob::display_name].
79297    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
79298        self.display_name = v.into();
79299        self
79300    }
79301
79302    /// Sets the value of [create_time][crate::model::PipelineJob::create_time].
79303    pub fn set_create_time<T>(mut self, v: T) -> Self
79304    where
79305        T: std::convert::Into<wkt::Timestamp>,
79306    {
79307        self.create_time = std::option::Option::Some(v.into());
79308        self
79309    }
79310
79311    /// Sets or clears the value of [create_time][crate::model::PipelineJob::create_time].
79312    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
79313    where
79314        T: std::convert::Into<wkt::Timestamp>,
79315    {
79316        self.create_time = v.map(|x| x.into());
79317        self
79318    }
79319
79320    /// Sets the value of [start_time][crate::model::PipelineJob::start_time].
79321    pub fn set_start_time<T>(mut self, v: T) -> Self
79322    where
79323        T: std::convert::Into<wkt::Timestamp>,
79324    {
79325        self.start_time = std::option::Option::Some(v.into());
79326        self
79327    }
79328
79329    /// Sets or clears the value of [start_time][crate::model::PipelineJob::start_time].
79330    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
79331    where
79332        T: std::convert::Into<wkt::Timestamp>,
79333    {
79334        self.start_time = v.map(|x| x.into());
79335        self
79336    }
79337
79338    /// Sets the value of [end_time][crate::model::PipelineJob::end_time].
79339    pub fn set_end_time<T>(mut self, v: T) -> Self
79340    where
79341        T: std::convert::Into<wkt::Timestamp>,
79342    {
79343        self.end_time = std::option::Option::Some(v.into());
79344        self
79345    }
79346
79347    /// Sets or clears the value of [end_time][crate::model::PipelineJob::end_time].
79348    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
79349    where
79350        T: std::convert::Into<wkt::Timestamp>,
79351    {
79352        self.end_time = v.map(|x| x.into());
79353        self
79354    }
79355
79356    /// Sets the value of [update_time][crate::model::PipelineJob::update_time].
79357    pub fn set_update_time<T>(mut self, v: T) -> Self
79358    where
79359        T: std::convert::Into<wkt::Timestamp>,
79360    {
79361        self.update_time = std::option::Option::Some(v.into());
79362        self
79363    }
79364
79365    /// Sets or clears the value of [update_time][crate::model::PipelineJob::update_time].
79366    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
79367    where
79368        T: std::convert::Into<wkt::Timestamp>,
79369    {
79370        self.update_time = v.map(|x| x.into());
79371        self
79372    }
79373
79374    /// Sets the value of [pipeline_spec][crate::model::PipelineJob::pipeline_spec].
79375    pub fn set_pipeline_spec<T>(mut self, v: T) -> Self
79376    where
79377        T: std::convert::Into<wkt::Struct>,
79378    {
79379        self.pipeline_spec = std::option::Option::Some(v.into());
79380        self
79381    }
79382
79383    /// Sets or clears the value of [pipeline_spec][crate::model::PipelineJob::pipeline_spec].
79384    pub fn set_or_clear_pipeline_spec<T>(mut self, v: std::option::Option<T>) -> Self
79385    where
79386        T: std::convert::Into<wkt::Struct>,
79387    {
79388        self.pipeline_spec = v.map(|x| x.into());
79389        self
79390    }
79391
79392    /// Sets the value of [state][crate::model::PipelineJob::state].
79393    pub fn set_state<T: std::convert::Into<crate::model::PipelineState>>(mut self, v: T) -> Self {
79394        self.state = v.into();
79395        self
79396    }
79397
79398    /// Sets the value of [job_detail][crate::model::PipelineJob::job_detail].
79399    pub fn set_job_detail<T>(mut self, v: T) -> Self
79400    where
79401        T: std::convert::Into<crate::model::PipelineJobDetail>,
79402    {
79403        self.job_detail = std::option::Option::Some(v.into());
79404        self
79405    }
79406
79407    /// Sets or clears the value of [job_detail][crate::model::PipelineJob::job_detail].
79408    pub fn set_or_clear_job_detail<T>(mut self, v: std::option::Option<T>) -> Self
79409    where
79410        T: std::convert::Into<crate::model::PipelineJobDetail>,
79411    {
79412        self.job_detail = v.map(|x| x.into());
79413        self
79414    }
79415
79416    /// Sets the value of [error][crate::model::PipelineJob::error].
79417    pub fn set_error<T>(mut self, v: T) -> Self
79418    where
79419        T: std::convert::Into<rpc::model::Status>,
79420    {
79421        self.error = std::option::Option::Some(v.into());
79422        self
79423    }
79424
79425    /// Sets or clears the value of [error][crate::model::PipelineJob::error].
79426    pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
79427    where
79428        T: std::convert::Into<rpc::model::Status>,
79429    {
79430        self.error = v.map(|x| x.into());
79431        self
79432    }
79433
79434    /// Sets the value of [labels][crate::model::PipelineJob::labels].
79435    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
79436    where
79437        T: std::iter::IntoIterator<Item = (K, V)>,
79438        K: std::convert::Into<std::string::String>,
79439        V: std::convert::Into<std::string::String>,
79440    {
79441        use std::iter::Iterator;
79442        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
79443        self
79444    }
79445
79446    /// Sets the value of [runtime_config][crate::model::PipelineJob::runtime_config].
79447    pub fn set_runtime_config<T>(mut self, v: T) -> Self
79448    where
79449        T: std::convert::Into<crate::model::pipeline_job::RuntimeConfig>,
79450    {
79451        self.runtime_config = std::option::Option::Some(v.into());
79452        self
79453    }
79454
79455    /// Sets or clears the value of [runtime_config][crate::model::PipelineJob::runtime_config].
79456    pub fn set_or_clear_runtime_config<T>(mut self, v: std::option::Option<T>) -> Self
79457    where
79458        T: std::convert::Into<crate::model::pipeline_job::RuntimeConfig>,
79459    {
79460        self.runtime_config = v.map(|x| x.into());
79461        self
79462    }
79463
79464    /// Sets the value of [encryption_spec][crate::model::PipelineJob::encryption_spec].
79465    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
79466    where
79467        T: std::convert::Into<crate::model::EncryptionSpec>,
79468    {
79469        self.encryption_spec = std::option::Option::Some(v.into());
79470        self
79471    }
79472
79473    /// Sets or clears the value of [encryption_spec][crate::model::PipelineJob::encryption_spec].
79474    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
79475    where
79476        T: std::convert::Into<crate::model::EncryptionSpec>,
79477    {
79478        self.encryption_spec = v.map(|x| x.into());
79479        self
79480    }
79481
79482    /// Sets the value of [service_account][crate::model::PipelineJob::service_account].
79483    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
79484        self.service_account = v.into();
79485        self
79486    }
79487
79488    /// Sets the value of [network][crate::model::PipelineJob::network].
79489    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
79490        self.network = v.into();
79491        self
79492    }
79493
79494    /// Sets the value of [reserved_ip_ranges][crate::model::PipelineJob::reserved_ip_ranges].
79495    pub fn set_reserved_ip_ranges<T, V>(mut self, v: T) -> Self
79496    where
79497        T: std::iter::IntoIterator<Item = V>,
79498        V: std::convert::Into<std::string::String>,
79499    {
79500        use std::iter::Iterator;
79501        self.reserved_ip_ranges = v.into_iter().map(|i| i.into()).collect();
79502        self
79503    }
79504
79505    /// Sets the value of [psc_interface_config][crate::model::PipelineJob::psc_interface_config].
79506    pub fn set_psc_interface_config<T>(mut self, v: T) -> Self
79507    where
79508        T: std::convert::Into<crate::model::PscInterfaceConfig>,
79509    {
79510        self.psc_interface_config = std::option::Option::Some(v.into());
79511        self
79512    }
79513
79514    /// Sets or clears the value of [psc_interface_config][crate::model::PipelineJob::psc_interface_config].
79515    pub fn set_or_clear_psc_interface_config<T>(mut self, v: std::option::Option<T>) -> Self
79516    where
79517        T: std::convert::Into<crate::model::PscInterfaceConfig>,
79518    {
79519        self.psc_interface_config = v.map(|x| x.into());
79520        self
79521    }
79522
79523    /// Sets the value of [template_uri][crate::model::PipelineJob::template_uri].
79524    pub fn set_template_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
79525        self.template_uri = v.into();
79526        self
79527    }
79528
79529    /// Sets the value of [template_metadata][crate::model::PipelineJob::template_metadata].
79530    pub fn set_template_metadata<T>(mut self, v: T) -> Self
79531    where
79532        T: std::convert::Into<crate::model::PipelineTemplateMetadata>,
79533    {
79534        self.template_metadata = std::option::Option::Some(v.into());
79535        self
79536    }
79537
79538    /// Sets or clears the value of [template_metadata][crate::model::PipelineJob::template_metadata].
79539    pub fn set_or_clear_template_metadata<T>(mut self, v: std::option::Option<T>) -> Self
79540    where
79541        T: std::convert::Into<crate::model::PipelineTemplateMetadata>,
79542    {
79543        self.template_metadata = v.map(|x| x.into());
79544        self
79545    }
79546
79547    /// Sets the value of [schedule_name][crate::model::PipelineJob::schedule_name].
79548    pub fn set_schedule_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
79549        self.schedule_name = v.into();
79550        self
79551    }
79552
79553    /// Sets the value of [preflight_validations][crate::model::PipelineJob::preflight_validations].
79554    pub fn set_preflight_validations<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
79555        self.preflight_validations = v.into();
79556        self
79557    }
79558}
79559
79560#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79561impl wkt::message::Message for PipelineJob {
79562    fn typename() -> &'static str {
79563        "type.googleapis.com/google.cloud.aiplatform.v1.PipelineJob"
79564    }
79565}
79566
79567/// Defines additional types related to [PipelineJob].
79568#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79569pub mod pipeline_job {
79570    #[allow(unused_imports)]
79571    use super::*;
79572
79573    /// The runtime config of a PipelineJob.
79574    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79575    #[derive(Clone, Default, PartialEq)]
79576    #[non_exhaustive]
79577    pub struct RuntimeConfig {
79578        /// Deprecated. Use
79579        /// [RuntimeConfig.parameter_values][google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.parameter_values]
79580        /// instead. The runtime parameters of the PipelineJob. The parameters will
79581        /// be passed into
79582        /// [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec]
79583        /// to replace the placeholders at runtime. This field is used by pipelines
79584        /// built using `PipelineJob.pipeline_spec.schema_version` 2.0.0 or lower,
79585        /// such as pipelines built using Kubeflow Pipelines SDK 1.8 or lower.
79586        ///
79587        /// [google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.parameter_values]: crate::model::pipeline_job::RuntimeConfig::parameter_values
79588        /// [google.cloud.aiplatform.v1.PipelineJob.pipeline_spec]: crate::model::PipelineJob::pipeline_spec
79589        #[deprecated]
79590        pub parameters: std::collections::HashMap<std::string::String, crate::model::Value>,
79591
79592        /// Required. A path in a Cloud Storage bucket, which will be treated as the
79593        /// root output directory of the pipeline. It is used by the system to
79594        /// generate the paths of output artifacts. The artifact paths are generated
79595        /// with a sub-path pattern `{job_id}/{task_id}/{output_key}` under the
79596        /// specified output directory. The service account specified in this
79597        /// pipeline must have the `storage.objects.get` and `storage.objects.create`
79598        /// permissions for this bucket.
79599        pub gcs_output_directory: std::string::String,
79600
79601        /// The runtime parameters of the PipelineJob. The parameters will be
79602        /// passed into
79603        /// [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec]
79604        /// to replace the placeholders at runtime. This field is used by pipelines
79605        /// built using `PipelineJob.pipeline_spec.schema_version` 2.1.0, such as
79606        /// pipelines built using Kubeflow Pipelines SDK 1.9 or higher and the v2
79607        /// DSL.
79608        ///
79609        /// [google.cloud.aiplatform.v1.PipelineJob.pipeline_spec]: crate::model::PipelineJob::pipeline_spec
79610        pub parameter_values: std::collections::HashMap<std::string::String, wkt::Value>,
79611
79612        /// Represents the failure policy of a pipeline. Currently, the default of a
79613        /// pipeline is that the pipeline will continue to run until no more tasks
79614        /// can be executed, also known as PIPELINE_FAILURE_POLICY_FAIL_SLOW.
79615        /// However, if a pipeline is set to PIPELINE_FAILURE_POLICY_FAIL_FAST, it
79616        /// will stop scheduling any new tasks when a task has failed. Any scheduled
79617        /// tasks will continue to completion.
79618        pub failure_policy: crate::model::PipelineFailurePolicy,
79619
79620        /// The runtime artifacts of the PipelineJob. The key will be the input
79621        /// artifact name and the value would be one of the InputArtifact.
79622        pub input_artifacts: std::collections::HashMap<
79623            std::string::String,
79624            crate::model::pipeline_job::runtime_config::InputArtifact,
79625        >,
79626
79627        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
79628    }
79629
79630    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79631    impl RuntimeConfig {
79632        pub fn new() -> Self {
79633            std::default::Default::default()
79634        }
79635
79636        /// Sets the value of [parameters][crate::model::pipeline_job::RuntimeConfig::parameters].
79637        #[deprecated]
79638        pub fn set_parameters<T, K, V>(mut self, v: T) -> Self
79639        where
79640            T: std::iter::IntoIterator<Item = (K, V)>,
79641            K: std::convert::Into<std::string::String>,
79642            V: std::convert::Into<crate::model::Value>,
79643        {
79644            use std::iter::Iterator;
79645            self.parameters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
79646            self
79647        }
79648
79649        /// Sets the value of [gcs_output_directory][crate::model::pipeline_job::RuntimeConfig::gcs_output_directory].
79650        pub fn set_gcs_output_directory<T: std::convert::Into<std::string::String>>(
79651            mut self,
79652            v: T,
79653        ) -> Self {
79654            self.gcs_output_directory = v.into();
79655            self
79656        }
79657
79658        /// Sets the value of [parameter_values][crate::model::pipeline_job::RuntimeConfig::parameter_values].
79659        pub fn set_parameter_values<T, K, V>(mut self, v: T) -> Self
79660        where
79661            T: std::iter::IntoIterator<Item = (K, V)>,
79662            K: std::convert::Into<std::string::String>,
79663            V: std::convert::Into<wkt::Value>,
79664        {
79665            use std::iter::Iterator;
79666            self.parameter_values = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
79667            self
79668        }
79669
79670        /// Sets the value of [failure_policy][crate::model::pipeline_job::RuntimeConfig::failure_policy].
79671        pub fn set_failure_policy<T: std::convert::Into<crate::model::PipelineFailurePolicy>>(
79672            mut self,
79673            v: T,
79674        ) -> Self {
79675            self.failure_policy = v.into();
79676            self
79677        }
79678
79679        /// Sets the value of [input_artifacts][crate::model::pipeline_job::RuntimeConfig::input_artifacts].
79680        pub fn set_input_artifacts<T, K, V>(mut self, v: T) -> Self
79681        where
79682            T: std::iter::IntoIterator<Item = (K, V)>,
79683            K: std::convert::Into<std::string::String>,
79684            V: std::convert::Into<crate::model::pipeline_job::runtime_config::InputArtifact>,
79685        {
79686            use std::iter::Iterator;
79687            self.input_artifacts = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
79688            self
79689        }
79690    }
79691
79692    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79693    impl wkt::message::Message for RuntimeConfig {
79694        fn typename() -> &'static str {
79695            "type.googleapis.com/google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig"
79696        }
79697    }
79698
79699    /// Defines additional types related to [RuntimeConfig].
79700    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79701    pub mod runtime_config {
79702        #[allow(unused_imports)]
79703        use super::*;
79704
79705        /// The type of an input artifact.
79706        #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79707        #[derive(Clone, Default, PartialEq)]
79708        #[non_exhaustive]
79709        pub struct InputArtifact {
79710            pub kind: std::option::Option<
79711                crate::model::pipeline_job::runtime_config::input_artifact::Kind,
79712            >,
79713
79714            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
79715        }
79716
79717        #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79718        impl InputArtifact {
79719            pub fn new() -> Self {
79720                std::default::Default::default()
79721            }
79722
79723            /// Sets the value of [kind][crate::model::pipeline_job::runtime_config::InputArtifact::kind].
79724            ///
79725            /// Note that all the setters affecting `kind` are mutually
79726            /// exclusive.
79727            pub fn set_kind<
79728                T: std::convert::Into<
79729                        std::option::Option<
79730                            crate::model::pipeline_job::runtime_config::input_artifact::Kind,
79731                        >,
79732                    >,
79733            >(
79734                mut self,
79735                v: T,
79736            ) -> Self {
79737                self.kind = v.into();
79738                self
79739            }
79740
79741            /// The value of [kind][crate::model::pipeline_job::runtime_config::InputArtifact::kind]
79742            /// if it holds a `ArtifactId`, `None` if the field is not set or
79743            /// holds a different branch.
79744            pub fn artifact_id(&self) -> std::option::Option<&std::string::String> {
79745                #[allow(unreachable_patterns)]
79746                self.kind.as_ref().and_then(|v| match v {
79747                    crate::model::pipeline_job::runtime_config::input_artifact::Kind::ArtifactId(v) => std::option::Option::Some(v),
79748                    _ => std::option::Option::None,
79749                })
79750            }
79751
79752            /// Sets the value of [kind][crate::model::pipeline_job::runtime_config::InputArtifact::kind]
79753            /// to hold a `ArtifactId`.
79754            ///
79755            /// Note that all the setters affecting `kind` are
79756            /// mutually exclusive.
79757            pub fn set_artifact_id<T: std::convert::Into<std::string::String>>(
79758                mut self,
79759                v: T,
79760            ) -> Self {
79761                self.kind = std::option::Option::Some(
79762                    crate::model::pipeline_job::runtime_config::input_artifact::Kind::ArtifactId(
79763                        v.into(),
79764                    ),
79765                );
79766                self
79767            }
79768        }
79769
79770        #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79771        impl wkt::message::Message for InputArtifact {
79772            fn typename() -> &'static str {
79773                "type.googleapis.com/google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.InputArtifact"
79774            }
79775        }
79776
79777        /// Defines additional types related to [InputArtifact].
79778        #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79779        pub mod input_artifact {
79780            #[allow(unused_imports)]
79781            use super::*;
79782
79783            #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79784            #[derive(Clone, Debug, PartialEq)]
79785            #[non_exhaustive]
79786            pub enum Kind {
79787                /// Artifact resource id from MLMD. Which is the last portion of an
79788                /// artifact resource name:
79789                /// `projects/{project}/locations/{location}/metadataStores/default/artifacts/{artifact_id}`.
79790                /// The artifact must stay within the same project, location and default
79791                /// metadatastore as the pipeline.
79792                ArtifactId(std::string::String),
79793            }
79794        }
79795    }
79796}
79797
79798/// Pipeline template metadata if
79799/// [PipelineJob.template_uri][google.cloud.aiplatform.v1.PipelineJob.template_uri]
79800/// is from supported template registry. Currently, the only supported registry
79801/// is Artifact Registry.
79802///
79803/// [google.cloud.aiplatform.v1.PipelineJob.template_uri]: crate::model::PipelineJob::template_uri
79804#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79805#[derive(Clone, Default, PartialEq)]
79806#[non_exhaustive]
79807pub struct PipelineTemplateMetadata {
79808    /// The version_name in artifact registry.
79809    ///
79810    /// Will always be presented in output if the
79811    /// [PipelineJob.template_uri][google.cloud.aiplatform.v1.PipelineJob.template_uri]
79812    /// is from supported template registry.
79813    ///
79814    /// Format is "sha256:abcdef123456...".
79815    ///
79816    /// [google.cloud.aiplatform.v1.PipelineJob.template_uri]: crate::model::PipelineJob::template_uri
79817    pub version: std::string::String,
79818
79819    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
79820}
79821
79822#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79823impl PipelineTemplateMetadata {
79824    pub fn new() -> Self {
79825        std::default::Default::default()
79826    }
79827
79828    /// Sets the value of [version][crate::model::PipelineTemplateMetadata::version].
79829    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
79830        self.version = v.into();
79831        self
79832    }
79833}
79834
79835#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79836impl wkt::message::Message for PipelineTemplateMetadata {
79837    fn typename() -> &'static str {
79838        "type.googleapis.com/google.cloud.aiplatform.v1.PipelineTemplateMetadata"
79839    }
79840}
79841
79842/// The runtime detail of PipelineJob.
79843#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79844#[derive(Clone, Default, PartialEq)]
79845#[non_exhaustive]
79846pub struct PipelineJobDetail {
79847    /// Output only. The context of the pipeline.
79848    pub pipeline_context: std::option::Option<crate::model::Context>,
79849
79850    /// Output only. The context of the current pipeline run.
79851    pub pipeline_run_context: std::option::Option<crate::model::Context>,
79852
79853    /// Output only. The runtime details of the tasks under the pipeline.
79854    pub task_details: std::vec::Vec<crate::model::PipelineTaskDetail>,
79855
79856    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
79857}
79858
79859#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79860impl PipelineJobDetail {
79861    pub fn new() -> Self {
79862        std::default::Default::default()
79863    }
79864
79865    /// Sets the value of [pipeline_context][crate::model::PipelineJobDetail::pipeline_context].
79866    pub fn set_pipeline_context<T>(mut self, v: T) -> Self
79867    where
79868        T: std::convert::Into<crate::model::Context>,
79869    {
79870        self.pipeline_context = std::option::Option::Some(v.into());
79871        self
79872    }
79873
79874    /// Sets or clears the value of [pipeline_context][crate::model::PipelineJobDetail::pipeline_context].
79875    pub fn set_or_clear_pipeline_context<T>(mut self, v: std::option::Option<T>) -> Self
79876    where
79877        T: std::convert::Into<crate::model::Context>,
79878    {
79879        self.pipeline_context = v.map(|x| x.into());
79880        self
79881    }
79882
79883    /// Sets the value of [pipeline_run_context][crate::model::PipelineJobDetail::pipeline_run_context].
79884    pub fn set_pipeline_run_context<T>(mut self, v: T) -> Self
79885    where
79886        T: std::convert::Into<crate::model::Context>,
79887    {
79888        self.pipeline_run_context = std::option::Option::Some(v.into());
79889        self
79890    }
79891
79892    /// Sets or clears the value of [pipeline_run_context][crate::model::PipelineJobDetail::pipeline_run_context].
79893    pub fn set_or_clear_pipeline_run_context<T>(mut self, v: std::option::Option<T>) -> Self
79894    where
79895        T: std::convert::Into<crate::model::Context>,
79896    {
79897        self.pipeline_run_context = v.map(|x| x.into());
79898        self
79899    }
79900
79901    /// Sets the value of [task_details][crate::model::PipelineJobDetail::task_details].
79902    pub fn set_task_details<T, V>(mut self, v: T) -> Self
79903    where
79904        T: std::iter::IntoIterator<Item = V>,
79905        V: std::convert::Into<crate::model::PipelineTaskDetail>,
79906    {
79907        use std::iter::Iterator;
79908        self.task_details = v.into_iter().map(|i| i.into()).collect();
79909        self
79910    }
79911}
79912
79913#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79914impl wkt::message::Message for PipelineJobDetail {
79915    fn typename() -> &'static str {
79916        "type.googleapis.com/google.cloud.aiplatform.v1.PipelineJobDetail"
79917    }
79918}
79919
79920/// The runtime detail of a task execution.
79921#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79922#[derive(Clone, Default, PartialEq)]
79923#[non_exhaustive]
79924pub struct PipelineTaskDetail {
79925    /// Output only. The system generated ID of the task.
79926    pub task_id: i64,
79927
79928    /// Output only. The id of the parent task if the task is within a component
79929    /// scope. Empty if the task is at the root level.
79930    pub parent_task_id: i64,
79931
79932    /// Output only. The user specified name of the task that is defined in
79933    /// [pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec].
79934    ///
79935    /// [google.cloud.aiplatform.v1.PipelineJob.pipeline_spec]: crate::model::PipelineJob::pipeline_spec
79936    pub task_name: std::string::String,
79937
79938    /// Output only. Task create time.
79939    pub create_time: std::option::Option<wkt::Timestamp>,
79940
79941    /// Output only. Task start time.
79942    pub start_time: std::option::Option<wkt::Timestamp>,
79943
79944    /// Output only. Task end time.
79945    pub end_time: std::option::Option<wkt::Timestamp>,
79946
79947    /// Output only. The detailed execution info.
79948    pub executor_detail: std::option::Option<crate::model::PipelineTaskExecutorDetail>,
79949
79950    /// Output only. State of the task.
79951    pub state: crate::model::pipeline_task_detail::State,
79952
79953    /// Output only. The execution metadata of the task.
79954    pub execution: std::option::Option<crate::model::Execution>,
79955
79956    /// Output only. The error that occurred during task execution.
79957    /// Only populated when the task's state is FAILED or CANCELLED.
79958    pub error: std::option::Option<rpc::model::Status>,
79959
79960    /// Output only. A list of task status. This field keeps a record of task
79961    /// status evolving over time.
79962    pub pipeline_task_status: std::vec::Vec<crate::model::pipeline_task_detail::PipelineTaskStatus>,
79963
79964    /// Output only. The runtime input artifacts of the task.
79965    pub inputs: std::collections::HashMap<
79966        std::string::String,
79967        crate::model::pipeline_task_detail::ArtifactList,
79968    >,
79969
79970    /// Output only. The runtime output artifacts of the task.
79971    pub outputs: std::collections::HashMap<
79972        std::string::String,
79973        crate::model::pipeline_task_detail::ArtifactList,
79974    >,
79975
79976    /// Output only. The unique name of a task.
79977    /// This field is used by rerun pipeline job.
79978    /// Console UI and Vertex AI SDK will support triggering pipeline job reruns.
79979    /// The name is constructed by concatenating all the parent tasks name with
79980    /// the task name. For example, if a task named "child_task" has a parent task
79981    /// named "parent_task_1" and parent task 1 has a parent task named
79982    /// "parent_task_2", the task unique name will be
79983    /// "parent_task_2.parent_task_1.child_task".
79984    pub task_unique_name: std::string::String,
79985
79986    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
79987}
79988
79989#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
79990impl PipelineTaskDetail {
79991    pub fn new() -> Self {
79992        std::default::Default::default()
79993    }
79994
79995    /// Sets the value of [task_id][crate::model::PipelineTaskDetail::task_id].
79996    pub fn set_task_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
79997        self.task_id = v.into();
79998        self
79999    }
80000
80001    /// Sets the value of [parent_task_id][crate::model::PipelineTaskDetail::parent_task_id].
80002    pub fn set_parent_task_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
80003        self.parent_task_id = v.into();
80004        self
80005    }
80006
80007    /// Sets the value of [task_name][crate::model::PipelineTaskDetail::task_name].
80008    pub fn set_task_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
80009        self.task_name = v.into();
80010        self
80011    }
80012
80013    /// Sets the value of [create_time][crate::model::PipelineTaskDetail::create_time].
80014    pub fn set_create_time<T>(mut self, v: T) -> Self
80015    where
80016        T: std::convert::Into<wkt::Timestamp>,
80017    {
80018        self.create_time = std::option::Option::Some(v.into());
80019        self
80020    }
80021
80022    /// Sets or clears the value of [create_time][crate::model::PipelineTaskDetail::create_time].
80023    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
80024    where
80025        T: std::convert::Into<wkt::Timestamp>,
80026    {
80027        self.create_time = v.map(|x| x.into());
80028        self
80029    }
80030
80031    /// Sets the value of [start_time][crate::model::PipelineTaskDetail::start_time].
80032    pub fn set_start_time<T>(mut self, v: T) -> Self
80033    where
80034        T: std::convert::Into<wkt::Timestamp>,
80035    {
80036        self.start_time = std::option::Option::Some(v.into());
80037        self
80038    }
80039
80040    /// Sets or clears the value of [start_time][crate::model::PipelineTaskDetail::start_time].
80041    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
80042    where
80043        T: std::convert::Into<wkt::Timestamp>,
80044    {
80045        self.start_time = v.map(|x| x.into());
80046        self
80047    }
80048
80049    /// Sets the value of [end_time][crate::model::PipelineTaskDetail::end_time].
80050    pub fn set_end_time<T>(mut self, v: T) -> Self
80051    where
80052        T: std::convert::Into<wkt::Timestamp>,
80053    {
80054        self.end_time = std::option::Option::Some(v.into());
80055        self
80056    }
80057
80058    /// Sets or clears the value of [end_time][crate::model::PipelineTaskDetail::end_time].
80059    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
80060    where
80061        T: std::convert::Into<wkt::Timestamp>,
80062    {
80063        self.end_time = v.map(|x| x.into());
80064        self
80065    }
80066
80067    /// Sets the value of [executor_detail][crate::model::PipelineTaskDetail::executor_detail].
80068    pub fn set_executor_detail<T>(mut self, v: T) -> Self
80069    where
80070        T: std::convert::Into<crate::model::PipelineTaskExecutorDetail>,
80071    {
80072        self.executor_detail = std::option::Option::Some(v.into());
80073        self
80074    }
80075
80076    /// Sets or clears the value of [executor_detail][crate::model::PipelineTaskDetail::executor_detail].
80077    pub fn set_or_clear_executor_detail<T>(mut self, v: std::option::Option<T>) -> Self
80078    where
80079        T: std::convert::Into<crate::model::PipelineTaskExecutorDetail>,
80080    {
80081        self.executor_detail = v.map(|x| x.into());
80082        self
80083    }
80084
80085    /// Sets the value of [state][crate::model::PipelineTaskDetail::state].
80086    pub fn set_state<T: std::convert::Into<crate::model::pipeline_task_detail::State>>(
80087        mut self,
80088        v: T,
80089    ) -> Self {
80090        self.state = v.into();
80091        self
80092    }
80093
80094    /// Sets the value of [execution][crate::model::PipelineTaskDetail::execution].
80095    pub fn set_execution<T>(mut self, v: T) -> Self
80096    where
80097        T: std::convert::Into<crate::model::Execution>,
80098    {
80099        self.execution = std::option::Option::Some(v.into());
80100        self
80101    }
80102
80103    /// Sets or clears the value of [execution][crate::model::PipelineTaskDetail::execution].
80104    pub fn set_or_clear_execution<T>(mut self, v: std::option::Option<T>) -> Self
80105    where
80106        T: std::convert::Into<crate::model::Execution>,
80107    {
80108        self.execution = v.map(|x| x.into());
80109        self
80110    }
80111
80112    /// Sets the value of [error][crate::model::PipelineTaskDetail::error].
80113    pub fn set_error<T>(mut self, v: T) -> Self
80114    where
80115        T: std::convert::Into<rpc::model::Status>,
80116    {
80117        self.error = std::option::Option::Some(v.into());
80118        self
80119    }
80120
80121    /// Sets or clears the value of [error][crate::model::PipelineTaskDetail::error].
80122    pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
80123    where
80124        T: std::convert::Into<rpc::model::Status>,
80125    {
80126        self.error = v.map(|x| x.into());
80127        self
80128    }
80129
80130    /// Sets the value of [pipeline_task_status][crate::model::PipelineTaskDetail::pipeline_task_status].
80131    pub fn set_pipeline_task_status<T, V>(mut self, v: T) -> Self
80132    where
80133        T: std::iter::IntoIterator<Item = V>,
80134        V: std::convert::Into<crate::model::pipeline_task_detail::PipelineTaskStatus>,
80135    {
80136        use std::iter::Iterator;
80137        self.pipeline_task_status = v.into_iter().map(|i| i.into()).collect();
80138        self
80139    }
80140
80141    /// Sets the value of [inputs][crate::model::PipelineTaskDetail::inputs].
80142    pub fn set_inputs<T, K, V>(mut self, v: T) -> Self
80143    where
80144        T: std::iter::IntoIterator<Item = (K, V)>,
80145        K: std::convert::Into<std::string::String>,
80146        V: std::convert::Into<crate::model::pipeline_task_detail::ArtifactList>,
80147    {
80148        use std::iter::Iterator;
80149        self.inputs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
80150        self
80151    }
80152
80153    /// Sets the value of [outputs][crate::model::PipelineTaskDetail::outputs].
80154    pub fn set_outputs<T, K, V>(mut self, v: T) -> Self
80155    where
80156        T: std::iter::IntoIterator<Item = (K, V)>,
80157        K: std::convert::Into<std::string::String>,
80158        V: std::convert::Into<crate::model::pipeline_task_detail::ArtifactList>,
80159    {
80160        use std::iter::Iterator;
80161        self.outputs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
80162        self
80163    }
80164
80165    /// Sets the value of [task_unique_name][crate::model::PipelineTaskDetail::task_unique_name].
80166    pub fn set_task_unique_name<T: std::convert::Into<std::string::String>>(
80167        mut self,
80168        v: T,
80169    ) -> Self {
80170        self.task_unique_name = v.into();
80171        self
80172    }
80173}
80174
80175#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80176impl wkt::message::Message for PipelineTaskDetail {
80177    fn typename() -> &'static str {
80178        "type.googleapis.com/google.cloud.aiplatform.v1.PipelineTaskDetail"
80179    }
80180}
80181
80182/// Defines additional types related to [PipelineTaskDetail].
80183#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80184pub mod pipeline_task_detail {
80185    #[allow(unused_imports)]
80186    use super::*;
80187
80188    /// A single record of the task status.
80189    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80190    #[derive(Clone, Default, PartialEq)]
80191    #[non_exhaustive]
80192    pub struct PipelineTaskStatus {
80193        /// Output only. Update time of this status.
80194        pub update_time: std::option::Option<wkt::Timestamp>,
80195
80196        /// Output only. The state of the task.
80197        pub state: crate::model::pipeline_task_detail::State,
80198
80199        /// Output only. The error that occurred during the state. May be set when
80200        /// the state is any of the non-final state (PENDING/RUNNING/CANCELLING) or
80201        /// FAILED state. If the state is FAILED, the error here is final and not
80202        /// going to be retried. If the state is a non-final state, the error
80203        /// indicates a system-error being retried.
80204        pub error: std::option::Option<rpc::model::Status>,
80205
80206        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
80207    }
80208
80209    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80210    impl PipelineTaskStatus {
80211        pub fn new() -> Self {
80212            std::default::Default::default()
80213        }
80214
80215        /// Sets the value of [update_time][crate::model::pipeline_task_detail::PipelineTaskStatus::update_time].
80216        pub fn set_update_time<T>(mut self, v: T) -> Self
80217        where
80218            T: std::convert::Into<wkt::Timestamp>,
80219        {
80220            self.update_time = std::option::Option::Some(v.into());
80221            self
80222        }
80223
80224        /// Sets or clears the value of [update_time][crate::model::pipeline_task_detail::PipelineTaskStatus::update_time].
80225        pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
80226        where
80227            T: std::convert::Into<wkt::Timestamp>,
80228        {
80229            self.update_time = v.map(|x| x.into());
80230            self
80231        }
80232
80233        /// Sets the value of [state][crate::model::pipeline_task_detail::PipelineTaskStatus::state].
80234        pub fn set_state<T: std::convert::Into<crate::model::pipeline_task_detail::State>>(
80235            mut self,
80236            v: T,
80237        ) -> Self {
80238            self.state = v.into();
80239            self
80240        }
80241
80242        /// Sets the value of [error][crate::model::pipeline_task_detail::PipelineTaskStatus::error].
80243        pub fn set_error<T>(mut self, v: T) -> Self
80244        where
80245            T: std::convert::Into<rpc::model::Status>,
80246        {
80247            self.error = std::option::Option::Some(v.into());
80248            self
80249        }
80250
80251        /// Sets or clears the value of [error][crate::model::pipeline_task_detail::PipelineTaskStatus::error].
80252        pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
80253        where
80254            T: std::convert::Into<rpc::model::Status>,
80255        {
80256            self.error = v.map(|x| x.into());
80257            self
80258        }
80259    }
80260
80261    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80262    impl wkt::message::Message for PipelineTaskStatus {
80263        fn typename() -> &'static str {
80264            "type.googleapis.com/google.cloud.aiplatform.v1.PipelineTaskDetail.PipelineTaskStatus"
80265        }
80266    }
80267
80268    /// A list of artifact metadata.
80269    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80270    #[derive(Clone, Default, PartialEq)]
80271    #[non_exhaustive]
80272    pub struct ArtifactList {
80273        /// Output only. A list of artifact metadata.
80274        pub artifacts: std::vec::Vec<crate::model::Artifact>,
80275
80276        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
80277    }
80278
80279    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80280    impl ArtifactList {
80281        pub fn new() -> Self {
80282            std::default::Default::default()
80283        }
80284
80285        /// Sets the value of [artifacts][crate::model::pipeline_task_detail::ArtifactList::artifacts].
80286        pub fn set_artifacts<T, V>(mut self, v: T) -> Self
80287        where
80288            T: std::iter::IntoIterator<Item = V>,
80289            V: std::convert::Into<crate::model::Artifact>,
80290        {
80291            use std::iter::Iterator;
80292            self.artifacts = v.into_iter().map(|i| i.into()).collect();
80293            self
80294        }
80295    }
80296
80297    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80298    impl wkt::message::Message for ArtifactList {
80299        fn typename() -> &'static str {
80300            "type.googleapis.com/google.cloud.aiplatform.v1.PipelineTaskDetail.ArtifactList"
80301        }
80302    }
80303
80304    /// Specifies state of TaskExecution
80305    ///
80306    /// # Working with unknown values
80307    ///
80308    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
80309    /// additional enum variants at any time. Adding new variants is not considered
80310    /// a breaking change. Applications should write their code in anticipation of:
80311    ///
80312    /// - New values appearing in future releases of the client library, **and**
80313    /// - New values received dynamically, without application changes.
80314    ///
80315    /// Please consult the [Working with enums] section in the user guide for some
80316    /// guidelines.
80317    ///
80318    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
80319    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80320    #[derive(Clone, Debug, PartialEq)]
80321    #[non_exhaustive]
80322    pub enum State {
80323        /// Unspecified.
80324        Unspecified,
80325        /// Specifies pending state for the task.
80326        Pending,
80327        /// Specifies task is being executed.
80328        Running,
80329        /// Specifies task completed successfully.
80330        Succeeded,
80331        /// Specifies Task cancel is in pending state.
80332        CancelPending,
80333        /// Specifies task is being cancelled.
80334        Cancelling,
80335        /// Specifies task was cancelled.
80336        Cancelled,
80337        /// Specifies task failed.
80338        Failed,
80339        /// Specifies task was skipped due to cache hit.
80340        Skipped,
80341        /// Specifies that the task was not triggered because the task's trigger
80342        /// policy is not satisfied. The trigger policy is specified in the
80343        /// `condition` field of
80344        /// [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec].
80345        ///
80346        /// [google.cloud.aiplatform.v1.PipelineJob.pipeline_spec]: crate::model::PipelineJob::pipeline_spec
80347        NotTriggered,
80348        /// If set, the enum was initialized with an unknown value.
80349        ///
80350        /// Applications can examine the value using [State::value] or
80351        /// [State::name].
80352        UnknownValue(state::UnknownValue),
80353    }
80354
80355    #[doc(hidden)]
80356    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80357    pub mod state {
80358        #[allow(unused_imports)]
80359        use super::*;
80360        #[derive(Clone, Debug, PartialEq)]
80361        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
80362    }
80363
80364    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80365    impl State {
80366        /// Gets the enum value.
80367        ///
80368        /// Returns `None` if the enum contains an unknown value deserialized from
80369        /// the string representation of enums.
80370        pub fn value(&self) -> std::option::Option<i32> {
80371            match self {
80372                Self::Unspecified => std::option::Option::Some(0),
80373                Self::Pending => std::option::Option::Some(1),
80374                Self::Running => std::option::Option::Some(2),
80375                Self::Succeeded => std::option::Option::Some(3),
80376                Self::CancelPending => std::option::Option::Some(4),
80377                Self::Cancelling => std::option::Option::Some(5),
80378                Self::Cancelled => std::option::Option::Some(6),
80379                Self::Failed => std::option::Option::Some(7),
80380                Self::Skipped => std::option::Option::Some(8),
80381                Self::NotTriggered => std::option::Option::Some(9),
80382                Self::UnknownValue(u) => u.0.value(),
80383            }
80384        }
80385
80386        /// Gets the enum value as a string.
80387        ///
80388        /// Returns `None` if the enum contains an unknown value deserialized from
80389        /// the integer representation of enums.
80390        pub fn name(&self) -> std::option::Option<&str> {
80391            match self {
80392                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
80393                Self::Pending => std::option::Option::Some("PENDING"),
80394                Self::Running => std::option::Option::Some("RUNNING"),
80395                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
80396                Self::CancelPending => std::option::Option::Some("CANCEL_PENDING"),
80397                Self::Cancelling => std::option::Option::Some("CANCELLING"),
80398                Self::Cancelled => std::option::Option::Some("CANCELLED"),
80399                Self::Failed => std::option::Option::Some("FAILED"),
80400                Self::Skipped => std::option::Option::Some("SKIPPED"),
80401                Self::NotTriggered => std::option::Option::Some("NOT_TRIGGERED"),
80402                Self::UnknownValue(u) => u.0.name(),
80403            }
80404        }
80405    }
80406
80407    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80408    impl std::default::Default for State {
80409        fn default() -> Self {
80410            use std::convert::From;
80411            Self::from(0)
80412        }
80413    }
80414
80415    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80416    impl std::fmt::Display for State {
80417        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
80418            wkt::internal::display_enum(f, self.name(), self.value())
80419        }
80420    }
80421
80422    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80423    impl std::convert::From<i32> for State {
80424        fn from(value: i32) -> Self {
80425            match value {
80426                0 => Self::Unspecified,
80427                1 => Self::Pending,
80428                2 => Self::Running,
80429                3 => Self::Succeeded,
80430                4 => Self::CancelPending,
80431                5 => Self::Cancelling,
80432                6 => Self::Cancelled,
80433                7 => Self::Failed,
80434                8 => Self::Skipped,
80435                9 => Self::NotTriggered,
80436                _ => Self::UnknownValue(state::UnknownValue(
80437                    wkt::internal::UnknownEnumValue::Integer(value),
80438                )),
80439            }
80440        }
80441    }
80442
80443    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80444    impl std::convert::From<&str> for State {
80445        fn from(value: &str) -> Self {
80446            use std::string::ToString;
80447            match value {
80448                "STATE_UNSPECIFIED" => Self::Unspecified,
80449                "PENDING" => Self::Pending,
80450                "RUNNING" => Self::Running,
80451                "SUCCEEDED" => Self::Succeeded,
80452                "CANCEL_PENDING" => Self::CancelPending,
80453                "CANCELLING" => Self::Cancelling,
80454                "CANCELLED" => Self::Cancelled,
80455                "FAILED" => Self::Failed,
80456                "SKIPPED" => Self::Skipped,
80457                "NOT_TRIGGERED" => Self::NotTriggered,
80458                _ => Self::UnknownValue(state::UnknownValue(
80459                    wkt::internal::UnknownEnumValue::String(value.to_string()),
80460                )),
80461            }
80462        }
80463    }
80464
80465    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80466    impl serde::ser::Serialize for State {
80467        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
80468        where
80469            S: serde::Serializer,
80470        {
80471            match self {
80472                Self::Unspecified => serializer.serialize_i32(0),
80473                Self::Pending => serializer.serialize_i32(1),
80474                Self::Running => serializer.serialize_i32(2),
80475                Self::Succeeded => serializer.serialize_i32(3),
80476                Self::CancelPending => serializer.serialize_i32(4),
80477                Self::Cancelling => serializer.serialize_i32(5),
80478                Self::Cancelled => serializer.serialize_i32(6),
80479                Self::Failed => serializer.serialize_i32(7),
80480                Self::Skipped => serializer.serialize_i32(8),
80481                Self::NotTriggered => serializer.serialize_i32(9),
80482                Self::UnknownValue(u) => u.0.serialize(serializer),
80483            }
80484        }
80485    }
80486
80487    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80488    impl<'de> serde::de::Deserialize<'de> for State {
80489        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
80490        where
80491            D: serde::Deserializer<'de>,
80492        {
80493            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
80494                ".google.cloud.aiplatform.v1.PipelineTaskDetail.State",
80495            ))
80496        }
80497    }
80498}
80499
80500/// The runtime detail of a pipeline executor.
80501#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80502#[derive(Clone, Default, PartialEq)]
80503#[non_exhaustive]
80504pub struct PipelineTaskExecutorDetail {
80505    pub details: std::option::Option<crate::model::pipeline_task_executor_detail::Details>,
80506
80507    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
80508}
80509
80510#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80511impl PipelineTaskExecutorDetail {
80512    pub fn new() -> Self {
80513        std::default::Default::default()
80514    }
80515
80516    /// Sets the value of [details][crate::model::PipelineTaskExecutorDetail::details].
80517    ///
80518    /// Note that all the setters affecting `details` are mutually
80519    /// exclusive.
80520    pub fn set_details<
80521        T: std::convert::Into<
80522                std::option::Option<crate::model::pipeline_task_executor_detail::Details>,
80523            >,
80524    >(
80525        mut self,
80526        v: T,
80527    ) -> Self {
80528        self.details = v.into();
80529        self
80530    }
80531
80532    /// The value of [details][crate::model::PipelineTaskExecutorDetail::details]
80533    /// if it holds a `ContainerDetail`, `None` if the field is not set or
80534    /// holds a different branch.
80535    pub fn container_detail(
80536        &self,
80537    ) -> std::option::Option<
80538        &std::boxed::Box<crate::model::pipeline_task_executor_detail::ContainerDetail>,
80539    > {
80540        #[allow(unreachable_patterns)]
80541        self.details.as_ref().and_then(|v| match v {
80542            crate::model::pipeline_task_executor_detail::Details::ContainerDetail(v) => {
80543                std::option::Option::Some(v)
80544            }
80545            _ => std::option::Option::None,
80546        })
80547    }
80548
80549    /// Sets the value of [details][crate::model::PipelineTaskExecutorDetail::details]
80550    /// to hold a `ContainerDetail`.
80551    ///
80552    /// Note that all the setters affecting `details` are
80553    /// mutually exclusive.
80554    pub fn set_container_detail<
80555        T: std::convert::Into<
80556                std::boxed::Box<crate::model::pipeline_task_executor_detail::ContainerDetail>,
80557            >,
80558    >(
80559        mut self,
80560        v: T,
80561    ) -> Self {
80562        self.details = std::option::Option::Some(
80563            crate::model::pipeline_task_executor_detail::Details::ContainerDetail(v.into()),
80564        );
80565        self
80566    }
80567
80568    /// The value of [details][crate::model::PipelineTaskExecutorDetail::details]
80569    /// if it holds a `CustomJobDetail`, `None` if the field is not set or
80570    /// holds a different branch.
80571    pub fn custom_job_detail(
80572        &self,
80573    ) -> std::option::Option<
80574        &std::boxed::Box<crate::model::pipeline_task_executor_detail::CustomJobDetail>,
80575    > {
80576        #[allow(unreachable_patterns)]
80577        self.details.as_ref().and_then(|v| match v {
80578            crate::model::pipeline_task_executor_detail::Details::CustomJobDetail(v) => {
80579                std::option::Option::Some(v)
80580            }
80581            _ => std::option::Option::None,
80582        })
80583    }
80584
80585    /// Sets the value of [details][crate::model::PipelineTaskExecutorDetail::details]
80586    /// to hold a `CustomJobDetail`.
80587    ///
80588    /// Note that all the setters affecting `details` are
80589    /// mutually exclusive.
80590    pub fn set_custom_job_detail<
80591        T: std::convert::Into<
80592                std::boxed::Box<crate::model::pipeline_task_executor_detail::CustomJobDetail>,
80593            >,
80594    >(
80595        mut self,
80596        v: T,
80597    ) -> Self {
80598        self.details = std::option::Option::Some(
80599            crate::model::pipeline_task_executor_detail::Details::CustomJobDetail(v.into()),
80600        );
80601        self
80602    }
80603}
80604
80605#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80606impl wkt::message::Message for PipelineTaskExecutorDetail {
80607    fn typename() -> &'static str {
80608        "type.googleapis.com/google.cloud.aiplatform.v1.PipelineTaskExecutorDetail"
80609    }
80610}
80611
80612/// Defines additional types related to [PipelineTaskExecutorDetail].
80613#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80614pub mod pipeline_task_executor_detail {
80615    #[allow(unused_imports)]
80616    use super::*;
80617
80618    /// The detail of a container execution. It contains the job names of the
80619    /// lifecycle of a container execution.
80620    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80621    #[derive(Clone, Default, PartialEq)]
80622    #[non_exhaustive]
80623    pub struct ContainerDetail {
80624        /// Output only. The name of the
80625        /// [CustomJob][google.cloud.aiplatform.v1.CustomJob] for the main container
80626        /// execution.
80627        ///
80628        /// [google.cloud.aiplatform.v1.CustomJob]: crate::model::CustomJob
80629        pub main_job: std::string::String,
80630
80631        /// Output only. The name of the
80632        /// [CustomJob][google.cloud.aiplatform.v1.CustomJob] for the
80633        /// pre-caching-check container execution. This job will be available if the
80634        /// [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec]
80635        /// specifies the `pre_caching_check` hook in the lifecycle events.
80636        ///
80637        /// [google.cloud.aiplatform.v1.CustomJob]: crate::model::CustomJob
80638        /// [google.cloud.aiplatform.v1.PipelineJob.pipeline_spec]: crate::model::PipelineJob::pipeline_spec
80639        pub pre_caching_check_job: std::string::String,
80640
80641        /// Output only. The names of the previously failed
80642        /// [CustomJob][google.cloud.aiplatform.v1.CustomJob] for the main container
80643        /// executions. The list includes the all attempts in chronological order.
80644        ///
80645        /// [google.cloud.aiplatform.v1.CustomJob]: crate::model::CustomJob
80646        pub failed_main_jobs: std::vec::Vec<std::string::String>,
80647
80648        /// Output only. The names of the previously failed
80649        /// [CustomJob][google.cloud.aiplatform.v1.CustomJob] for the
80650        /// pre-caching-check container executions. This job will be available if the
80651        /// [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec]
80652        /// specifies the `pre_caching_check` hook in the lifecycle events. The list
80653        /// includes the all attempts in chronological order.
80654        ///
80655        /// [google.cloud.aiplatform.v1.CustomJob]: crate::model::CustomJob
80656        /// [google.cloud.aiplatform.v1.PipelineJob.pipeline_spec]: crate::model::PipelineJob::pipeline_spec
80657        pub failed_pre_caching_check_jobs: std::vec::Vec<std::string::String>,
80658
80659        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
80660    }
80661
80662    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80663    impl ContainerDetail {
80664        pub fn new() -> Self {
80665            std::default::Default::default()
80666        }
80667
80668        /// Sets the value of [main_job][crate::model::pipeline_task_executor_detail::ContainerDetail::main_job].
80669        pub fn set_main_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
80670            self.main_job = v.into();
80671            self
80672        }
80673
80674        /// Sets the value of [pre_caching_check_job][crate::model::pipeline_task_executor_detail::ContainerDetail::pre_caching_check_job].
80675        pub fn set_pre_caching_check_job<T: std::convert::Into<std::string::String>>(
80676            mut self,
80677            v: T,
80678        ) -> Self {
80679            self.pre_caching_check_job = v.into();
80680            self
80681        }
80682
80683        /// Sets the value of [failed_main_jobs][crate::model::pipeline_task_executor_detail::ContainerDetail::failed_main_jobs].
80684        pub fn set_failed_main_jobs<T, V>(mut self, v: T) -> Self
80685        where
80686            T: std::iter::IntoIterator<Item = V>,
80687            V: std::convert::Into<std::string::String>,
80688        {
80689            use std::iter::Iterator;
80690            self.failed_main_jobs = v.into_iter().map(|i| i.into()).collect();
80691            self
80692        }
80693
80694        /// Sets the value of [failed_pre_caching_check_jobs][crate::model::pipeline_task_executor_detail::ContainerDetail::failed_pre_caching_check_jobs].
80695        pub fn set_failed_pre_caching_check_jobs<T, V>(mut self, v: T) -> Self
80696        where
80697            T: std::iter::IntoIterator<Item = V>,
80698            V: std::convert::Into<std::string::String>,
80699        {
80700            use std::iter::Iterator;
80701            self.failed_pre_caching_check_jobs = v.into_iter().map(|i| i.into()).collect();
80702            self
80703        }
80704    }
80705
80706    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80707    impl wkt::message::Message for ContainerDetail {
80708        fn typename() -> &'static str {
80709            "type.googleapis.com/google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.ContainerDetail"
80710        }
80711    }
80712
80713    /// The detailed info for a custom job executor.
80714    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80715    #[derive(Clone, Default, PartialEq)]
80716    #[non_exhaustive]
80717    pub struct CustomJobDetail {
80718        /// Output only. The name of the
80719        /// [CustomJob][google.cloud.aiplatform.v1.CustomJob].
80720        ///
80721        /// [google.cloud.aiplatform.v1.CustomJob]: crate::model::CustomJob
80722        pub job: std::string::String,
80723
80724        /// Output only. The names of the previously failed
80725        /// [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
80726        /// all attempts in chronological order.
80727        ///
80728        /// [google.cloud.aiplatform.v1.CustomJob]: crate::model::CustomJob
80729        pub failed_jobs: std::vec::Vec<std::string::String>,
80730
80731        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
80732    }
80733
80734    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80735    impl CustomJobDetail {
80736        pub fn new() -> Self {
80737            std::default::Default::default()
80738        }
80739
80740        /// Sets the value of [job][crate::model::pipeline_task_executor_detail::CustomJobDetail::job].
80741        pub fn set_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
80742            self.job = v.into();
80743            self
80744        }
80745
80746        /// Sets the value of [failed_jobs][crate::model::pipeline_task_executor_detail::CustomJobDetail::failed_jobs].
80747        pub fn set_failed_jobs<T, V>(mut self, v: T) -> Self
80748        where
80749            T: std::iter::IntoIterator<Item = V>,
80750            V: std::convert::Into<std::string::String>,
80751        {
80752            use std::iter::Iterator;
80753            self.failed_jobs = v.into_iter().map(|i| i.into()).collect();
80754            self
80755        }
80756    }
80757
80758    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80759    impl wkt::message::Message for CustomJobDetail {
80760        fn typename() -> &'static str {
80761            "type.googleapis.com/google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail"
80762        }
80763    }
80764
80765    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
80766    #[derive(Clone, Debug, PartialEq)]
80767    #[non_exhaustive]
80768    pub enum Details {
80769        /// Output only. The detailed info for a container executor.
80770        ContainerDetail(
80771            std::boxed::Box<crate::model::pipeline_task_executor_detail::ContainerDetail>,
80772        ),
80773        /// Output only. The detailed info for a custom job executor.
80774        CustomJobDetail(
80775            std::boxed::Box<crate::model::pipeline_task_executor_detail::CustomJobDetail>,
80776        ),
80777    }
80778}
80779
80780/// Runtime operation information for
80781/// [PipelineService.BatchCancelPipelineJobs][google.cloud.aiplatform.v1.PipelineService.BatchCancelPipelineJobs].
80782///
80783/// [google.cloud.aiplatform.v1.PipelineService.BatchCancelPipelineJobs]: crate::client::PipelineService::batch_cancel_pipeline_jobs
80784#[cfg(feature = "pipeline-service")]
80785#[derive(Clone, Default, PartialEq)]
80786#[non_exhaustive]
80787pub struct BatchCancelPipelineJobsOperationMetadata {
80788    /// The common part of the operation metadata.
80789    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
80790
80791    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
80792}
80793
80794#[cfg(feature = "pipeline-service")]
80795impl BatchCancelPipelineJobsOperationMetadata {
80796    pub fn new() -> Self {
80797        std::default::Default::default()
80798    }
80799
80800    /// Sets the value of [generic_metadata][crate::model::BatchCancelPipelineJobsOperationMetadata::generic_metadata].
80801    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
80802    where
80803        T: std::convert::Into<crate::model::GenericOperationMetadata>,
80804    {
80805        self.generic_metadata = std::option::Option::Some(v.into());
80806        self
80807    }
80808
80809    /// Sets or clears the value of [generic_metadata][crate::model::BatchCancelPipelineJobsOperationMetadata::generic_metadata].
80810    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
80811    where
80812        T: std::convert::Into<crate::model::GenericOperationMetadata>,
80813    {
80814        self.generic_metadata = v.map(|x| x.into());
80815        self
80816    }
80817}
80818
80819#[cfg(feature = "pipeline-service")]
80820impl wkt::message::Message for BatchCancelPipelineJobsOperationMetadata {
80821    fn typename() -> &'static str {
80822        "type.googleapis.com/google.cloud.aiplatform.v1.BatchCancelPipelineJobsOperationMetadata"
80823    }
80824}
80825
80826/// Request message for
80827/// [PipelineService.CreateTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.CreateTrainingPipeline].
80828///
80829/// [google.cloud.aiplatform.v1.PipelineService.CreateTrainingPipeline]: crate::client::PipelineService::create_training_pipeline
80830#[cfg(feature = "pipeline-service")]
80831#[derive(Clone, Default, PartialEq)]
80832#[non_exhaustive]
80833pub struct CreateTrainingPipelineRequest {
80834    /// Required. The resource name of the Location to create the TrainingPipeline
80835    /// in. Format: `projects/{project}/locations/{location}`
80836    pub parent: std::string::String,
80837
80838    /// Required. The TrainingPipeline to create.
80839    pub training_pipeline: std::option::Option<crate::model::TrainingPipeline>,
80840
80841    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
80842}
80843
80844#[cfg(feature = "pipeline-service")]
80845impl CreateTrainingPipelineRequest {
80846    pub fn new() -> Self {
80847        std::default::Default::default()
80848    }
80849
80850    /// Sets the value of [parent][crate::model::CreateTrainingPipelineRequest::parent].
80851    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
80852        self.parent = v.into();
80853        self
80854    }
80855
80856    /// Sets the value of [training_pipeline][crate::model::CreateTrainingPipelineRequest::training_pipeline].
80857    pub fn set_training_pipeline<T>(mut self, v: T) -> Self
80858    where
80859        T: std::convert::Into<crate::model::TrainingPipeline>,
80860    {
80861        self.training_pipeline = std::option::Option::Some(v.into());
80862        self
80863    }
80864
80865    /// Sets or clears the value of [training_pipeline][crate::model::CreateTrainingPipelineRequest::training_pipeline].
80866    pub fn set_or_clear_training_pipeline<T>(mut self, v: std::option::Option<T>) -> Self
80867    where
80868        T: std::convert::Into<crate::model::TrainingPipeline>,
80869    {
80870        self.training_pipeline = v.map(|x| x.into());
80871        self
80872    }
80873}
80874
80875#[cfg(feature = "pipeline-service")]
80876impl wkt::message::Message for CreateTrainingPipelineRequest {
80877    fn typename() -> &'static str {
80878        "type.googleapis.com/google.cloud.aiplatform.v1.CreateTrainingPipelineRequest"
80879    }
80880}
80881
80882/// Request message for
80883/// [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline].
80884///
80885/// [google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline]: crate::client::PipelineService::get_training_pipeline
80886#[cfg(feature = "pipeline-service")]
80887#[derive(Clone, Default, PartialEq)]
80888#[non_exhaustive]
80889pub struct GetTrainingPipelineRequest {
80890    /// Required. The name of the TrainingPipeline resource.
80891    /// Format:
80892    /// `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
80893    pub name: std::string::String,
80894
80895    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
80896}
80897
80898#[cfg(feature = "pipeline-service")]
80899impl GetTrainingPipelineRequest {
80900    pub fn new() -> Self {
80901        std::default::Default::default()
80902    }
80903
80904    /// Sets the value of [name][crate::model::GetTrainingPipelineRequest::name].
80905    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
80906        self.name = v.into();
80907        self
80908    }
80909}
80910
80911#[cfg(feature = "pipeline-service")]
80912impl wkt::message::Message for GetTrainingPipelineRequest {
80913    fn typename() -> &'static str {
80914        "type.googleapis.com/google.cloud.aiplatform.v1.GetTrainingPipelineRequest"
80915    }
80916}
80917
80918/// Request message for
80919/// [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines].
80920///
80921/// [google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines]: crate::client::PipelineService::list_training_pipelines
80922#[cfg(feature = "pipeline-service")]
80923#[derive(Clone, Default, PartialEq)]
80924#[non_exhaustive]
80925pub struct ListTrainingPipelinesRequest {
80926    /// Required. The resource name of the Location to list the TrainingPipelines
80927    /// from. Format: `projects/{project}/locations/{location}`
80928    pub parent: std::string::String,
80929
80930    /// The standard list filter.
80931    ///
80932    /// Supported fields:
80933    ///
80934    /// * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
80935    /// * `state` supports `=`, `!=` comparisons.
80936    /// * `training_task_definition` `=`, `!=` comparisons, and `:` wildcard.
80937    /// * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
80938    ///   `create_time` must be in RFC 3339 format.
80939    /// * `labels` supports general map functions that is:
80940    ///   `labels.key=value` - key:value equality
80941    ///   `labels.key:* - key existence
80942    ///
80943    /// Some examples of using the filter are:
80944    ///
80945    /// * `state="PIPELINE_STATE_SUCCEEDED" AND display_name:"my_pipeline_*"`
80946    /// * `state!="PIPELINE_STATE_FAILED" OR display_name="my_pipeline"`
80947    /// * `NOT display_name="my_pipeline"`
80948    /// * `create_time>"2021-05-18T00:00:00Z"`
80949    /// * `training_task_definition:"*automl_text_classification*"`
80950    pub filter: std::string::String,
80951
80952    /// The standard list page size.
80953    pub page_size: i32,
80954
80955    /// The standard list page token.
80956    /// Typically obtained via
80957    /// [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token]
80958    /// of the previous
80959    /// [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines]
80960    /// call.
80961    ///
80962    /// [google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token]: crate::model::ListTrainingPipelinesResponse::next_page_token
80963    /// [google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines]: crate::client::PipelineService::list_training_pipelines
80964    pub page_token: std::string::String,
80965
80966    /// Mask specifying which fields to read.
80967    pub read_mask: std::option::Option<wkt::FieldMask>,
80968
80969    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
80970}
80971
80972#[cfg(feature = "pipeline-service")]
80973impl ListTrainingPipelinesRequest {
80974    pub fn new() -> Self {
80975        std::default::Default::default()
80976    }
80977
80978    /// Sets the value of [parent][crate::model::ListTrainingPipelinesRequest::parent].
80979    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
80980        self.parent = v.into();
80981        self
80982    }
80983
80984    /// Sets the value of [filter][crate::model::ListTrainingPipelinesRequest::filter].
80985    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
80986        self.filter = v.into();
80987        self
80988    }
80989
80990    /// Sets the value of [page_size][crate::model::ListTrainingPipelinesRequest::page_size].
80991    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
80992        self.page_size = v.into();
80993        self
80994    }
80995
80996    /// Sets the value of [page_token][crate::model::ListTrainingPipelinesRequest::page_token].
80997    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
80998        self.page_token = v.into();
80999        self
81000    }
81001
81002    /// Sets the value of [read_mask][crate::model::ListTrainingPipelinesRequest::read_mask].
81003    pub fn set_read_mask<T>(mut self, v: T) -> Self
81004    where
81005        T: std::convert::Into<wkt::FieldMask>,
81006    {
81007        self.read_mask = std::option::Option::Some(v.into());
81008        self
81009    }
81010
81011    /// Sets or clears the value of [read_mask][crate::model::ListTrainingPipelinesRequest::read_mask].
81012    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
81013    where
81014        T: std::convert::Into<wkt::FieldMask>,
81015    {
81016        self.read_mask = v.map(|x| x.into());
81017        self
81018    }
81019}
81020
81021#[cfg(feature = "pipeline-service")]
81022impl wkt::message::Message for ListTrainingPipelinesRequest {
81023    fn typename() -> &'static str {
81024        "type.googleapis.com/google.cloud.aiplatform.v1.ListTrainingPipelinesRequest"
81025    }
81026}
81027
81028/// Response message for
81029/// [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines]
81030///
81031/// [google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines]: crate::client::PipelineService::list_training_pipelines
81032#[cfg(feature = "pipeline-service")]
81033#[derive(Clone, Default, PartialEq)]
81034#[non_exhaustive]
81035pub struct ListTrainingPipelinesResponse {
81036    /// List of TrainingPipelines in the requested page.
81037    pub training_pipelines: std::vec::Vec<crate::model::TrainingPipeline>,
81038
81039    /// A token to retrieve the next page of results.
81040    /// Pass to
81041    /// [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.page_token]
81042    /// to obtain that page.
81043    ///
81044    /// [google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.page_token]: crate::model::ListTrainingPipelinesRequest::page_token
81045    pub next_page_token: std::string::String,
81046
81047    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81048}
81049
81050#[cfg(feature = "pipeline-service")]
81051impl ListTrainingPipelinesResponse {
81052    pub fn new() -> Self {
81053        std::default::Default::default()
81054    }
81055
81056    /// Sets the value of [training_pipelines][crate::model::ListTrainingPipelinesResponse::training_pipelines].
81057    pub fn set_training_pipelines<T, V>(mut self, v: T) -> Self
81058    where
81059        T: std::iter::IntoIterator<Item = V>,
81060        V: std::convert::Into<crate::model::TrainingPipeline>,
81061    {
81062        use std::iter::Iterator;
81063        self.training_pipelines = v.into_iter().map(|i| i.into()).collect();
81064        self
81065    }
81066
81067    /// Sets the value of [next_page_token][crate::model::ListTrainingPipelinesResponse::next_page_token].
81068    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81069        self.next_page_token = v.into();
81070        self
81071    }
81072}
81073
81074#[cfg(feature = "pipeline-service")]
81075impl wkt::message::Message for ListTrainingPipelinesResponse {
81076    fn typename() -> &'static str {
81077        "type.googleapis.com/google.cloud.aiplatform.v1.ListTrainingPipelinesResponse"
81078    }
81079}
81080
81081#[cfg(feature = "pipeline-service")]
81082#[doc(hidden)]
81083impl gax::paginator::internal::PageableResponse for ListTrainingPipelinesResponse {
81084    type PageItem = crate::model::TrainingPipeline;
81085
81086    fn items(self) -> std::vec::Vec<Self::PageItem> {
81087        self.training_pipelines
81088    }
81089
81090    fn next_page_token(&self) -> std::string::String {
81091        use std::clone::Clone;
81092        self.next_page_token.clone()
81093    }
81094}
81095
81096/// Request message for
81097/// [PipelineService.DeleteTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.DeleteTrainingPipeline].
81098///
81099/// [google.cloud.aiplatform.v1.PipelineService.DeleteTrainingPipeline]: crate::client::PipelineService::delete_training_pipeline
81100#[cfg(feature = "pipeline-service")]
81101#[derive(Clone, Default, PartialEq)]
81102#[non_exhaustive]
81103pub struct DeleteTrainingPipelineRequest {
81104    /// Required. The name of the TrainingPipeline resource to be deleted.
81105    /// Format:
81106    /// `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
81107    pub name: std::string::String,
81108
81109    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81110}
81111
81112#[cfg(feature = "pipeline-service")]
81113impl DeleteTrainingPipelineRequest {
81114    pub fn new() -> Self {
81115        std::default::Default::default()
81116    }
81117
81118    /// Sets the value of [name][crate::model::DeleteTrainingPipelineRequest::name].
81119    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81120        self.name = v.into();
81121        self
81122    }
81123}
81124
81125#[cfg(feature = "pipeline-service")]
81126impl wkt::message::Message for DeleteTrainingPipelineRequest {
81127    fn typename() -> &'static str {
81128        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteTrainingPipelineRequest"
81129    }
81130}
81131
81132/// Request message for
81133/// [PipelineService.CancelTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.CancelTrainingPipeline].
81134///
81135/// [google.cloud.aiplatform.v1.PipelineService.CancelTrainingPipeline]: crate::client::PipelineService::cancel_training_pipeline
81136#[cfg(feature = "pipeline-service")]
81137#[derive(Clone, Default, PartialEq)]
81138#[non_exhaustive]
81139pub struct CancelTrainingPipelineRequest {
81140    /// Required. The name of the TrainingPipeline to cancel.
81141    /// Format:
81142    /// `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
81143    pub name: std::string::String,
81144
81145    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81146}
81147
81148#[cfg(feature = "pipeline-service")]
81149impl CancelTrainingPipelineRequest {
81150    pub fn new() -> Self {
81151        std::default::Default::default()
81152    }
81153
81154    /// Sets the value of [name][crate::model::CancelTrainingPipelineRequest::name].
81155    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81156        self.name = v.into();
81157        self
81158    }
81159}
81160
81161#[cfg(feature = "pipeline-service")]
81162impl wkt::message::Message for CancelTrainingPipelineRequest {
81163    fn typename() -> &'static str {
81164        "type.googleapis.com/google.cloud.aiplatform.v1.CancelTrainingPipelineRequest"
81165    }
81166}
81167
81168/// Request message for
81169/// [PipelineService.CreatePipelineJob][google.cloud.aiplatform.v1.PipelineService.CreatePipelineJob].
81170///
81171/// [google.cloud.aiplatform.v1.PipelineService.CreatePipelineJob]: crate::client::PipelineService::create_pipeline_job
81172#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
81173#[derive(Clone, Default, PartialEq)]
81174#[non_exhaustive]
81175pub struct CreatePipelineJobRequest {
81176    /// Required. The resource name of the Location to create the PipelineJob in.
81177    /// Format: `projects/{project}/locations/{location}`
81178    pub parent: std::string::String,
81179
81180    /// Required. The PipelineJob to create.
81181    pub pipeline_job: std::option::Option<crate::model::PipelineJob>,
81182
81183    /// The ID to use for the PipelineJob, which will become the final component of
81184    /// the PipelineJob name. If not provided, an ID will be automatically
81185    /// generated.
81186    ///
81187    /// This value should be less than 128 characters, and valid characters
81188    /// are `/[a-z][0-9]-/`.
81189    pub pipeline_job_id: std::string::String,
81190
81191    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81192}
81193
81194#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
81195impl CreatePipelineJobRequest {
81196    pub fn new() -> Self {
81197        std::default::Default::default()
81198    }
81199
81200    /// Sets the value of [parent][crate::model::CreatePipelineJobRequest::parent].
81201    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81202        self.parent = v.into();
81203        self
81204    }
81205
81206    /// Sets the value of [pipeline_job][crate::model::CreatePipelineJobRequest::pipeline_job].
81207    pub fn set_pipeline_job<T>(mut self, v: T) -> Self
81208    where
81209        T: std::convert::Into<crate::model::PipelineJob>,
81210    {
81211        self.pipeline_job = std::option::Option::Some(v.into());
81212        self
81213    }
81214
81215    /// Sets or clears the value of [pipeline_job][crate::model::CreatePipelineJobRequest::pipeline_job].
81216    pub fn set_or_clear_pipeline_job<T>(mut self, v: std::option::Option<T>) -> Self
81217    where
81218        T: std::convert::Into<crate::model::PipelineJob>,
81219    {
81220        self.pipeline_job = v.map(|x| x.into());
81221        self
81222    }
81223
81224    /// Sets the value of [pipeline_job_id][crate::model::CreatePipelineJobRequest::pipeline_job_id].
81225    pub fn set_pipeline_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81226        self.pipeline_job_id = v.into();
81227        self
81228    }
81229}
81230
81231#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
81232impl wkt::message::Message for CreatePipelineJobRequest {
81233    fn typename() -> &'static str {
81234        "type.googleapis.com/google.cloud.aiplatform.v1.CreatePipelineJobRequest"
81235    }
81236}
81237
81238/// Request message for
81239/// [PipelineService.GetPipelineJob][google.cloud.aiplatform.v1.PipelineService.GetPipelineJob].
81240///
81241/// [google.cloud.aiplatform.v1.PipelineService.GetPipelineJob]: crate::client::PipelineService::get_pipeline_job
81242#[cfg(feature = "pipeline-service")]
81243#[derive(Clone, Default, PartialEq)]
81244#[non_exhaustive]
81245pub struct GetPipelineJobRequest {
81246    /// Required. The name of the PipelineJob resource.
81247    /// Format:
81248    /// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`
81249    pub name: std::string::String,
81250
81251    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81252}
81253
81254#[cfg(feature = "pipeline-service")]
81255impl GetPipelineJobRequest {
81256    pub fn new() -> Self {
81257        std::default::Default::default()
81258    }
81259
81260    /// Sets the value of [name][crate::model::GetPipelineJobRequest::name].
81261    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81262        self.name = v.into();
81263        self
81264    }
81265}
81266
81267#[cfg(feature = "pipeline-service")]
81268impl wkt::message::Message for GetPipelineJobRequest {
81269    fn typename() -> &'static str {
81270        "type.googleapis.com/google.cloud.aiplatform.v1.GetPipelineJobRequest"
81271    }
81272}
81273
81274/// Request message for
81275/// [PipelineService.ListPipelineJobs][google.cloud.aiplatform.v1.PipelineService.ListPipelineJobs].
81276///
81277/// [google.cloud.aiplatform.v1.PipelineService.ListPipelineJobs]: crate::client::PipelineService::list_pipeline_jobs
81278#[cfg(feature = "pipeline-service")]
81279#[derive(Clone, Default, PartialEq)]
81280#[non_exhaustive]
81281pub struct ListPipelineJobsRequest {
81282    /// Required. The resource name of the Location to list the PipelineJobs from.
81283    /// Format: `projects/{project}/locations/{location}`
81284    pub parent: std::string::String,
81285
81286    /// Lists the PipelineJobs that match the filter expression. The following
81287    /// fields are supported:
81288    ///
81289    /// * `pipeline_name`: Supports `=` and `!=` comparisons.
81290    /// * `display_name`: Supports `=`, `!=` comparisons, and `:` wildcard.
81291    /// * `pipeline_job_user_id`: Supports `=`, `!=` comparisons, and `:` wildcard.
81292    ///   for example, can check if pipeline's display_name contains *step* by
81293    ///   doing display_name:\"*step*\"
81294    /// * `state`: Supports `=` and `!=` comparisons.
81295    /// * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
81296    ///   Values must be in RFC 3339 format.
81297    /// * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
81298    ///   Values must be in RFC 3339 format.
81299    /// * `end_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
81300    ///   Values must be in RFC 3339 format.
81301    /// * `labels`: Supports key-value equality and key presence.
81302    /// * `template_uri`: Supports `=`, `!=` comparisons, and `:` wildcard.
81303    /// * `template_metadata.version`: Supports `=`, `!=` comparisons, and `:`
81304    ///   wildcard.
81305    ///
81306    /// Filter expressions can be combined together using logical operators
81307    /// (`AND` & `OR`).
81308    /// For example: `pipeline_name="test" AND create_time>"2020-05-18T13:30:00Z"`.
81309    ///
81310    /// The syntax to define filter expression is based on
81311    /// <https://google.aip.dev/160>.
81312    ///
81313    /// Examples:
81314    ///
81315    /// * `create_time>"2021-05-18T00:00:00Z" OR
81316    ///   update_time>"2020-05-18T00:00:00Z"` PipelineJobs created or updated
81317    ///   after 2020-05-18 00:00:00 UTC.
81318    /// * `labels.env = "prod"`
81319    ///   PipelineJobs with label "env" set to "prod".
81320    pub filter: std::string::String,
81321
81322    /// The standard list page size.
81323    pub page_size: i32,
81324
81325    /// The standard list page token.
81326    /// Typically obtained via
81327    /// [ListPipelineJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListPipelineJobsResponse.next_page_token]
81328    /// of the previous
81329    /// [PipelineService.ListPipelineJobs][google.cloud.aiplatform.v1.PipelineService.ListPipelineJobs]
81330    /// call.
81331    ///
81332    /// [google.cloud.aiplatform.v1.ListPipelineJobsResponse.next_page_token]: crate::model::ListPipelineJobsResponse::next_page_token
81333    /// [google.cloud.aiplatform.v1.PipelineService.ListPipelineJobs]: crate::client::PipelineService::list_pipeline_jobs
81334    pub page_token: std::string::String,
81335
81336    /// A comma-separated list of fields to order by. The default sort order is in
81337    /// ascending order. Use "desc" after a field name for descending. You can have
81338    /// multiple order_by fields provided e.g. "create_time desc, end_time",
81339    /// "end_time, start_time, update_time" For example, using "create_time desc,
81340    /// end_time" will order results by create time in descending order, and if
81341    /// there are multiple jobs having the same create time, order them by the end
81342    /// time in ascending order. if order_by is not specified, it will order by
81343    /// default order is create time in descending order. Supported fields:
81344    ///
81345    /// * `create_time`
81346    /// * `update_time`
81347    /// * `end_time`
81348    /// * `start_time`
81349    pub order_by: std::string::String,
81350
81351    /// Mask specifying which fields to read.
81352    pub read_mask: std::option::Option<wkt::FieldMask>,
81353
81354    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81355}
81356
81357#[cfg(feature = "pipeline-service")]
81358impl ListPipelineJobsRequest {
81359    pub fn new() -> Self {
81360        std::default::Default::default()
81361    }
81362
81363    /// Sets the value of [parent][crate::model::ListPipelineJobsRequest::parent].
81364    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81365        self.parent = v.into();
81366        self
81367    }
81368
81369    /// Sets the value of [filter][crate::model::ListPipelineJobsRequest::filter].
81370    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81371        self.filter = v.into();
81372        self
81373    }
81374
81375    /// Sets the value of [page_size][crate::model::ListPipelineJobsRequest::page_size].
81376    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
81377        self.page_size = v.into();
81378        self
81379    }
81380
81381    /// Sets the value of [page_token][crate::model::ListPipelineJobsRequest::page_token].
81382    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81383        self.page_token = v.into();
81384        self
81385    }
81386
81387    /// Sets the value of [order_by][crate::model::ListPipelineJobsRequest::order_by].
81388    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81389        self.order_by = v.into();
81390        self
81391    }
81392
81393    /// Sets the value of [read_mask][crate::model::ListPipelineJobsRequest::read_mask].
81394    pub fn set_read_mask<T>(mut self, v: T) -> Self
81395    where
81396        T: std::convert::Into<wkt::FieldMask>,
81397    {
81398        self.read_mask = std::option::Option::Some(v.into());
81399        self
81400    }
81401
81402    /// Sets or clears the value of [read_mask][crate::model::ListPipelineJobsRequest::read_mask].
81403    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
81404    where
81405        T: std::convert::Into<wkt::FieldMask>,
81406    {
81407        self.read_mask = v.map(|x| x.into());
81408        self
81409    }
81410}
81411
81412#[cfg(feature = "pipeline-service")]
81413impl wkt::message::Message for ListPipelineJobsRequest {
81414    fn typename() -> &'static str {
81415        "type.googleapis.com/google.cloud.aiplatform.v1.ListPipelineJobsRequest"
81416    }
81417}
81418
81419/// Response message for
81420/// [PipelineService.ListPipelineJobs][google.cloud.aiplatform.v1.PipelineService.ListPipelineJobs]
81421///
81422/// [google.cloud.aiplatform.v1.PipelineService.ListPipelineJobs]: crate::client::PipelineService::list_pipeline_jobs
81423#[cfg(feature = "pipeline-service")]
81424#[derive(Clone, Default, PartialEq)]
81425#[non_exhaustive]
81426pub struct ListPipelineJobsResponse {
81427    /// List of PipelineJobs in the requested page.
81428    pub pipeline_jobs: std::vec::Vec<crate::model::PipelineJob>,
81429
81430    /// A token to retrieve the next page of results.
81431    /// Pass to
81432    /// [ListPipelineJobsRequest.page_token][google.cloud.aiplatform.v1.ListPipelineJobsRequest.page_token]
81433    /// to obtain that page.
81434    ///
81435    /// [google.cloud.aiplatform.v1.ListPipelineJobsRequest.page_token]: crate::model::ListPipelineJobsRequest::page_token
81436    pub next_page_token: std::string::String,
81437
81438    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81439}
81440
81441#[cfg(feature = "pipeline-service")]
81442impl ListPipelineJobsResponse {
81443    pub fn new() -> Self {
81444        std::default::Default::default()
81445    }
81446
81447    /// Sets the value of [pipeline_jobs][crate::model::ListPipelineJobsResponse::pipeline_jobs].
81448    pub fn set_pipeline_jobs<T, V>(mut self, v: T) -> Self
81449    where
81450        T: std::iter::IntoIterator<Item = V>,
81451        V: std::convert::Into<crate::model::PipelineJob>,
81452    {
81453        use std::iter::Iterator;
81454        self.pipeline_jobs = v.into_iter().map(|i| i.into()).collect();
81455        self
81456    }
81457
81458    /// Sets the value of [next_page_token][crate::model::ListPipelineJobsResponse::next_page_token].
81459    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81460        self.next_page_token = v.into();
81461        self
81462    }
81463}
81464
81465#[cfg(feature = "pipeline-service")]
81466impl wkt::message::Message for ListPipelineJobsResponse {
81467    fn typename() -> &'static str {
81468        "type.googleapis.com/google.cloud.aiplatform.v1.ListPipelineJobsResponse"
81469    }
81470}
81471
81472#[cfg(feature = "pipeline-service")]
81473#[doc(hidden)]
81474impl gax::paginator::internal::PageableResponse for ListPipelineJobsResponse {
81475    type PageItem = crate::model::PipelineJob;
81476
81477    fn items(self) -> std::vec::Vec<Self::PageItem> {
81478        self.pipeline_jobs
81479    }
81480
81481    fn next_page_token(&self) -> std::string::String {
81482        use std::clone::Clone;
81483        self.next_page_token.clone()
81484    }
81485}
81486
81487/// Request message for
81488/// [PipelineService.DeletePipelineJob][google.cloud.aiplatform.v1.PipelineService.DeletePipelineJob].
81489///
81490/// [google.cloud.aiplatform.v1.PipelineService.DeletePipelineJob]: crate::client::PipelineService::delete_pipeline_job
81491#[cfg(feature = "pipeline-service")]
81492#[derive(Clone, Default, PartialEq)]
81493#[non_exhaustive]
81494pub struct DeletePipelineJobRequest {
81495    /// Required. The name of the PipelineJob resource to be deleted.
81496    /// Format:
81497    /// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`
81498    pub name: std::string::String,
81499
81500    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81501}
81502
81503#[cfg(feature = "pipeline-service")]
81504impl DeletePipelineJobRequest {
81505    pub fn new() -> Self {
81506        std::default::Default::default()
81507    }
81508
81509    /// Sets the value of [name][crate::model::DeletePipelineJobRequest::name].
81510    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81511        self.name = v.into();
81512        self
81513    }
81514}
81515
81516#[cfg(feature = "pipeline-service")]
81517impl wkt::message::Message for DeletePipelineJobRequest {
81518    fn typename() -> &'static str {
81519        "type.googleapis.com/google.cloud.aiplatform.v1.DeletePipelineJobRequest"
81520    }
81521}
81522
81523/// Request message for
81524/// [PipelineService.BatchDeletePipelineJobs][google.cloud.aiplatform.v1.PipelineService.BatchDeletePipelineJobs].
81525///
81526/// [google.cloud.aiplatform.v1.PipelineService.BatchDeletePipelineJobs]: crate::client::PipelineService::batch_delete_pipeline_jobs
81527#[cfg(feature = "pipeline-service")]
81528#[derive(Clone, Default, PartialEq)]
81529#[non_exhaustive]
81530pub struct BatchDeletePipelineJobsRequest {
81531    /// Required. The name of the PipelineJobs' parent resource.
81532    /// Format: `projects/{project}/locations/{location}`
81533    pub parent: std::string::String,
81534
81535    /// Required. The names of the PipelineJobs to delete.
81536    /// A maximum of 32 PipelineJobs can be deleted in a batch.
81537    /// Format:
81538    /// `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
81539    pub names: std::vec::Vec<std::string::String>,
81540
81541    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81542}
81543
81544#[cfg(feature = "pipeline-service")]
81545impl BatchDeletePipelineJobsRequest {
81546    pub fn new() -> Self {
81547        std::default::Default::default()
81548    }
81549
81550    /// Sets the value of [parent][crate::model::BatchDeletePipelineJobsRequest::parent].
81551    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81552        self.parent = v.into();
81553        self
81554    }
81555
81556    /// Sets the value of [names][crate::model::BatchDeletePipelineJobsRequest::names].
81557    pub fn set_names<T, V>(mut self, v: T) -> Self
81558    where
81559        T: std::iter::IntoIterator<Item = V>,
81560        V: std::convert::Into<std::string::String>,
81561    {
81562        use std::iter::Iterator;
81563        self.names = v.into_iter().map(|i| i.into()).collect();
81564        self
81565    }
81566}
81567
81568#[cfg(feature = "pipeline-service")]
81569impl wkt::message::Message for BatchDeletePipelineJobsRequest {
81570    fn typename() -> &'static str {
81571        "type.googleapis.com/google.cloud.aiplatform.v1.BatchDeletePipelineJobsRequest"
81572    }
81573}
81574
81575/// Response message for
81576/// [PipelineService.BatchDeletePipelineJobs][google.cloud.aiplatform.v1.PipelineService.BatchDeletePipelineJobs].
81577///
81578/// [google.cloud.aiplatform.v1.PipelineService.BatchDeletePipelineJobs]: crate::client::PipelineService::batch_delete_pipeline_jobs
81579#[cfg(feature = "pipeline-service")]
81580#[derive(Clone, Default, PartialEq)]
81581#[non_exhaustive]
81582pub struct BatchDeletePipelineJobsResponse {
81583    /// PipelineJobs deleted.
81584    pub pipeline_jobs: std::vec::Vec<crate::model::PipelineJob>,
81585
81586    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81587}
81588
81589#[cfg(feature = "pipeline-service")]
81590impl BatchDeletePipelineJobsResponse {
81591    pub fn new() -> Self {
81592        std::default::Default::default()
81593    }
81594
81595    /// Sets the value of [pipeline_jobs][crate::model::BatchDeletePipelineJobsResponse::pipeline_jobs].
81596    pub fn set_pipeline_jobs<T, V>(mut self, v: T) -> Self
81597    where
81598        T: std::iter::IntoIterator<Item = V>,
81599        V: std::convert::Into<crate::model::PipelineJob>,
81600    {
81601        use std::iter::Iterator;
81602        self.pipeline_jobs = v.into_iter().map(|i| i.into()).collect();
81603        self
81604    }
81605}
81606
81607#[cfg(feature = "pipeline-service")]
81608impl wkt::message::Message for BatchDeletePipelineJobsResponse {
81609    fn typename() -> &'static str {
81610        "type.googleapis.com/google.cloud.aiplatform.v1.BatchDeletePipelineJobsResponse"
81611    }
81612}
81613
81614/// Request message for
81615/// [PipelineService.CancelPipelineJob][google.cloud.aiplatform.v1.PipelineService.CancelPipelineJob].
81616///
81617/// [google.cloud.aiplatform.v1.PipelineService.CancelPipelineJob]: crate::client::PipelineService::cancel_pipeline_job
81618#[cfg(feature = "pipeline-service")]
81619#[derive(Clone, Default, PartialEq)]
81620#[non_exhaustive]
81621pub struct CancelPipelineJobRequest {
81622    /// Required. The name of the PipelineJob to cancel.
81623    /// Format:
81624    /// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`
81625    pub name: std::string::String,
81626
81627    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81628}
81629
81630#[cfg(feature = "pipeline-service")]
81631impl CancelPipelineJobRequest {
81632    pub fn new() -> Self {
81633        std::default::Default::default()
81634    }
81635
81636    /// Sets the value of [name][crate::model::CancelPipelineJobRequest::name].
81637    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81638        self.name = v.into();
81639        self
81640    }
81641}
81642
81643#[cfg(feature = "pipeline-service")]
81644impl wkt::message::Message for CancelPipelineJobRequest {
81645    fn typename() -> &'static str {
81646        "type.googleapis.com/google.cloud.aiplatform.v1.CancelPipelineJobRequest"
81647    }
81648}
81649
81650/// Request message for
81651/// [PipelineService.BatchCancelPipelineJobs][google.cloud.aiplatform.v1.PipelineService.BatchCancelPipelineJobs].
81652///
81653/// [google.cloud.aiplatform.v1.PipelineService.BatchCancelPipelineJobs]: crate::client::PipelineService::batch_cancel_pipeline_jobs
81654#[cfg(feature = "pipeline-service")]
81655#[derive(Clone, Default, PartialEq)]
81656#[non_exhaustive]
81657pub struct BatchCancelPipelineJobsRequest {
81658    /// Required. The name of the PipelineJobs' parent resource.
81659    /// Format: `projects/{project}/locations/{location}`
81660    pub parent: std::string::String,
81661
81662    /// Required. The names of the PipelineJobs to cancel.
81663    /// A maximum of 32 PipelineJobs can be cancelled in a batch.
81664    /// Format:
81665    /// `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
81666    pub names: std::vec::Vec<std::string::String>,
81667
81668    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81669}
81670
81671#[cfg(feature = "pipeline-service")]
81672impl BatchCancelPipelineJobsRequest {
81673    pub fn new() -> Self {
81674        std::default::Default::default()
81675    }
81676
81677    /// Sets the value of [parent][crate::model::BatchCancelPipelineJobsRequest::parent].
81678    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81679        self.parent = v.into();
81680        self
81681    }
81682
81683    /// Sets the value of [names][crate::model::BatchCancelPipelineJobsRequest::names].
81684    pub fn set_names<T, V>(mut self, v: T) -> Self
81685    where
81686        T: std::iter::IntoIterator<Item = V>,
81687        V: std::convert::Into<std::string::String>,
81688    {
81689        use std::iter::Iterator;
81690        self.names = v.into_iter().map(|i| i.into()).collect();
81691        self
81692    }
81693}
81694
81695#[cfg(feature = "pipeline-service")]
81696impl wkt::message::Message for BatchCancelPipelineJobsRequest {
81697    fn typename() -> &'static str {
81698        "type.googleapis.com/google.cloud.aiplatform.v1.BatchCancelPipelineJobsRequest"
81699    }
81700}
81701
81702/// Response message for
81703/// [PipelineService.BatchCancelPipelineJobs][google.cloud.aiplatform.v1.PipelineService.BatchCancelPipelineJobs].
81704///
81705/// [google.cloud.aiplatform.v1.PipelineService.BatchCancelPipelineJobs]: crate::client::PipelineService::batch_cancel_pipeline_jobs
81706#[cfg(feature = "pipeline-service")]
81707#[derive(Clone, Default, PartialEq)]
81708#[non_exhaustive]
81709pub struct BatchCancelPipelineJobsResponse {
81710    /// PipelineJobs cancelled.
81711    pub pipeline_jobs: std::vec::Vec<crate::model::PipelineJob>,
81712
81713    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81714}
81715
81716#[cfg(feature = "pipeline-service")]
81717impl BatchCancelPipelineJobsResponse {
81718    pub fn new() -> Self {
81719        std::default::Default::default()
81720    }
81721
81722    /// Sets the value of [pipeline_jobs][crate::model::BatchCancelPipelineJobsResponse::pipeline_jobs].
81723    pub fn set_pipeline_jobs<T, V>(mut self, v: T) -> Self
81724    where
81725        T: std::iter::IntoIterator<Item = V>,
81726        V: std::convert::Into<crate::model::PipelineJob>,
81727    {
81728        use std::iter::Iterator;
81729        self.pipeline_jobs = v.into_iter().map(|i| i.into()).collect();
81730        self
81731    }
81732}
81733
81734#[cfg(feature = "pipeline-service")]
81735impl wkt::message::Message for BatchCancelPipelineJobsResponse {
81736    fn typename() -> &'static str {
81737        "type.googleapis.com/google.cloud.aiplatform.v1.BatchCancelPipelineJobsResponse"
81738    }
81739}
81740
81741/// Request message for
81742/// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict].
81743///
81744/// [google.cloud.aiplatform.v1.PredictionService.Predict]: crate::client::PredictionService::predict
81745#[cfg(feature = "prediction-service")]
81746#[derive(Clone, Default, PartialEq)]
81747#[non_exhaustive]
81748pub struct PredictRequest {
81749    /// Required. The name of the Endpoint requested to serve the prediction.
81750    /// Format:
81751    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
81752    pub endpoint: std::string::String,
81753
81754    /// Required. The instances that are the input to the prediction call.
81755    /// A DeployedModel may have an upper limit on the number of instances it
81756    /// supports per request, and when it is exceeded the prediction call errors
81757    /// in case of AutoML Models, or, in case of customer created Models, the
81758    /// behaviour is as documented by that Model.
81759    /// The schema of any single instance may be specified via Endpoint's
81760    /// DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
81761    /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
81762    /// [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
81763    ///
81764    /// [google.cloud.aiplatform.v1.DeployedModel.model]: crate::model::DeployedModel::model
81765    /// [google.cloud.aiplatform.v1.Model.predict_schemata]: crate::model::Model::predict_schemata
81766    /// [google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]: crate::model::PredictSchemata::instance_schema_uri
81767    pub instances: std::vec::Vec<wkt::Value>,
81768
81769    /// The parameters that govern the prediction. The schema of the parameters may
81770    /// be specified via Endpoint's DeployedModels' [Model's
81771    /// ][google.cloud.aiplatform.v1.DeployedModel.model]
81772    /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
81773    /// [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
81774    ///
81775    /// [google.cloud.aiplatform.v1.DeployedModel.model]: crate::model::DeployedModel::model
81776    /// [google.cloud.aiplatform.v1.Model.predict_schemata]: crate::model::Model::predict_schemata
81777    /// [google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]: crate::model::PredictSchemata::parameters_schema_uri
81778    pub parameters: std::option::Option<wkt::Value>,
81779
81780    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81781}
81782
81783#[cfg(feature = "prediction-service")]
81784impl PredictRequest {
81785    pub fn new() -> Self {
81786        std::default::Default::default()
81787    }
81788
81789    /// Sets the value of [endpoint][crate::model::PredictRequest::endpoint].
81790    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81791        self.endpoint = v.into();
81792        self
81793    }
81794
81795    /// Sets the value of [instances][crate::model::PredictRequest::instances].
81796    pub fn set_instances<T, V>(mut self, v: T) -> Self
81797    where
81798        T: std::iter::IntoIterator<Item = V>,
81799        V: std::convert::Into<wkt::Value>,
81800    {
81801        use std::iter::Iterator;
81802        self.instances = v.into_iter().map(|i| i.into()).collect();
81803        self
81804    }
81805
81806    /// Sets the value of [parameters][crate::model::PredictRequest::parameters].
81807    pub fn set_parameters<T>(mut self, v: T) -> Self
81808    where
81809        T: std::convert::Into<wkt::Value>,
81810    {
81811        self.parameters = std::option::Option::Some(v.into());
81812        self
81813    }
81814
81815    /// Sets or clears the value of [parameters][crate::model::PredictRequest::parameters].
81816    pub fn set_or_clear_parameters<T>(mut self, v: std::option::Option<T>) -> Self
81817    where
81818        T: std::convert::Into<wkt::Value>,
81819    {
81820        self.parameters = v.map(|x| x.into());
81821        self
81822    }
81823}
81824
81825#[cfg(feature = "prediction-service")]
81826impl wkt::message::Message for PredictRequest {
81827    fn typename() -> &'static str {
81828        "type.googleapis.com/google.cloud.aiplatform.v1.PredictRequest"
81829    }
81830}
81831
81832/// Response message for
81833/// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict].
81834///
81835/// [google.cloud.aiplatform.v1.PredictionService.Predict]: crate::client::PredictionService::predict
81836#[cfg(feature = "prediction-service")]
81837#[derive(Clone, Default, PartialEq)]
81838#[non_exhaustive]
81839pub struct PredictResponse {
81840    /// The predictions that are the output of the predictions call.
81841    /// The schema of any single prediction may be specified via Endpoint's
81842    /// DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model]
81843    /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
81844    /// [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri].
81845    ///
81846    /// [google.cloud.aiplatform.v1.DeployedModel.model]: crate::model::DeployedModel::model
81847    /// [google.cloud.aiplatform.v1.Model.predict_schemata]: crate::model::Model::predict_schemata
81848    /// [google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri]: crate::model::PredictSchemata::prediction_schema_uri
81849    pub predictions: std::vec::Vec<wkt::Value>,
81850
81851    /// ID of the Endpoint's DeployedModel that served this prediction.
81852    pub deployed_model_id: std::string::String,
81853
81854    /// Output only. The resource name of the Model which is deployed as the
81855    /// DeployedModel that this prediction hits.
81856    pub model: std::string::String,
81857
81858    /// Output only. The version ID of the Model which is deployed as the
81859    /// DeployedModel that this prediction hits.
81860    pub model_version_id: std::string::String,
81861
81862    /// Output only. The [display
81863    /// name][google.cloud.aiplatform.v1.Model.display_name] of the Model which is
81864    /// deployed as the DeployedModel that this prediction hits.
81865    ///
81866    /// [google.cloud.aiplatform.v1.Model.display_name]: crate::model::Model::display_name
81867    pub model_display_name: std::string::String,
81868
81869    /// Output only. Request-level metadata returned by the model. The metadata
81870    /// type will be dependent upon the model implementation.
81871    pub metadata: std::option::Option<wkt::Value>,
81872
81873    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81874}
81875
81876#[cfg(feature = "prediction-service")]
81877impl PredictResponse {
81878    pub fn new() -> Self {
81879        std::default::Default::default()
81880    }
81881
81882    /// Sets the value of [predictions][crate::model::PredictResponse::predictions].
81883    pub fn set_predictions<T, V>(mut self, v: T) -> Self
81884    where
81885        T: std::iter::IntoIterator<Item = V>,
81886        V: std::convert::Into<wkt::Value>,
81887    {
81888        use std::iter::Iterator;
81889        self.predictions = v.into_iter().map(|i| i.into()).collect();
81890        self
81891    }
81892
81893    /// Sets the value of [deployed_model_id][crate::model::PredictResponse::deployed_model_id].
81894    pub fn set_deployed_model_id<T: std::convert::Into<std::string::String>>(
81895        mut self,
81896        v: T,
81897    ) -> Self {
81898        self.deployed_model_id = v.into();
81899        self
81900    }
81901
81902    /// Sets the value of [model][crate::model::PredictResponse::model].
81903    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81904        self.model = v.into();
81905        self
81906    }
81907
81908    /// Sets the value of [model_version_id][crate::model::PredictResponse::model_version_id].
81909    pub fn set_model_version_id<T: std::convert::Into<std::string::String>>(
81910        mut self,
81911        v: T,
81912    ) -> Self {
81913        self.model_version_id = v.into();
81914        self
81915    }
81916
81917    /// Sets the value of [model_display_name][crate::model::PredictResponse::model_display_name].
81918    pub fn set_model_display_name<T: std::convert::Into<std::string::String>>(
81919        mut self,
81920        v: T,
81921    ) -> Self {
81922        self.model_display_name = v.into();
81923        self
81924    }
81925
81926    /// Sets the value of [metadata][crate::model::PredictResponse::metadata].
81927    pub fn set_metadata<T>(mut self, v: T) -> Self
81928    where
81929        T: std::convert::Into<wkt::Value>,
81930    {
81931        self.metadata = std::option::Option::Some(v.into());
81932        self
81933    }
81934
81935    /// Sets or clears the value of [metadata][crate::model::PredictResponse::metadata].
81936    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
81937    where
81938        T: std::convert::Into<wkt::Value>,
81939    {
81940        self.metadata = v.map(|x| x.into());
81941        self
81942    }
81943}
81944
81945#[cfg(feature = "prediction-service")]
81946impl wkt::message::Message for PredictResponse {
81947    fn typename() -> &'static str {
81948        "type.googleapis.com/google.cloud.aiplatform.v1.PredictResponse"
81949    }
81950}
81951
81952/// Request message for
81953/// [PredictionService.RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict].
81954///
81955/// [google.cloud.aiplatform.v1.PredictionService.RawPredict]: crate::client::PredictionService::raw_predict
81956#[cfg(feature = "prediction-service")]
81957#[derive(Clone, Default, PartialEq)]
81958#[non_exhaustive]
81959pub struct RawPredictRequest {
81960    /// Required. The name of the Endpoint requested to serve the prediction.
81961    /// Format:
81962    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
81963    pub endpoint: std::string::String,
81964
81965    /// The prediction input. Supports HTTP headers and arbitrary data payload.
81966    ///
81967    /// A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an
81968    /// upper limit on the number of instances it supports per request. When this
81969    /// limit it is exceeded for an AutoML model, the
81970    /// [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
81971    /// method returns an error. When this limit is exceeded for a custom-trained
81972    /// model, the behavior varies depending on the model.
81973    ///
81974    /// You can specify the schema for each instance in the
81975    /// [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
81976    /// field when you create a [Model][google.cloud.aiplatform.v1.Model]. This
81977    /// schema applies when you deploy the `Model` as a `DeployedModel` to an
81978    /// [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict`
81979    /// method.
81980    ///
81981    /// [google.cloud.aiplatform.v1.DeployedModel]: crate::model::DeployedModel
81982    /// [google.cloud.aiplatform.v1.Endpoint]: crate::model::Endpoint
81983    /// [google.cloud.aiplatform.v1.Model]: crate::model::Model
81984    /// [google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]: crate::model::PredictSchemata::instance_schema_uri
81985    /// [google.cloud.aiplatform.v1.PredictionService.RawPredict]: crate::client::PredictionService::raw_predict
81986    pub http_body: std::option::Option<api::model::HttpBody>,
81987
81988    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
81989}
81990
81991#[cfg(feature = "prediction-service")]
81992impl RawPredictRequest {
81993    pub fn new() -> Self {
81994        std::default::Default::default()
81995    }
81996
81997    /// Sets the value of [endpoint][crate::model::RawPredictRequest::endpoint].
81998    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81999        self.endpoint = v.into();
82000        self
82001    }
82002
82003    /// Sets the value of [http_body][crate::model::RawPredictRequest::http_body].
82004    pub fn set_http_body<T>(mut self, v: T) -> Self
82005    where
82006        T: std::convert::Into<api::model::HttpBody>,
82007    {
82008        self.http_body = std::option::Option::Some(v.into());
82009        self
82010    }
82011
82012    /// Sets or clears the value of [http_body][crate::model::RawPredictRequest::http_body].
82013    pub fn set_or_clear_http_body<T>(mut self, v: std::option::Option<T>) -> Self
82014    where
82015        T: std::convert::Into<api::model::HttpBody>,
82016    {
82017        self.http_body = v.map(|x| x.into());
82018        self
82019    }
82020}
82021
82022#[cfg(feature = "prediction-service")]
82023impl wkt::message::Message for RawPredictRequest {
82024    fn typename() -> &'static str {
82025        "type.googleapis.com/google.cloud.aiplatform.v1.RawPredictRequest"
82026    }
82027}
82028
82029/// Request message for
82030/// [PredictionService.StreamRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamRawPredict].
82031#[cfg(feature = "prediction-service")]
82032#[derive(Clone, Default, PartialEq)]
82033#[non_exhaustive]
82034pub struct StreamRawPredictRequest {
82035    /// Required. The name of the Endpoint requested to serve the prediction.
82036    /// Format:
82037    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
82038    pub endpoint: std::string::String,
82039
82040    /// The prediction input. Supports HTTP headers and arbitrary data payload.
82041    pub http_body: std::option::Option<api::model::HttpBody>,
82042
82043    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82044}
82045
82046#[cfg(feature = "prediction-service")]
82047impl StreamRawPredictRequest {
82048    pub fn new() -> Self {
82049        std::default::Default::default()
82050    }
82051
82052    /// Sets the value of [endpoint][crate::model::StreamRawPredictRequest::endpoint].
82053    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
82054        self.endpoint = v.into();
82055        self
82056    }
82057
82058    /// Sets the value of [http_body][crate::model::StreamRawPredictRequest::http_body].
82059    pub fn set_http_body<T>(mut self, v: T) -> Self
82060    where
82061        T: std::convert::Into<api::model::HttpBody>,
82062    {
82063        self.http_body = std::option::Option::Some(v.into());
82064        self
82065    }
82066
82067    /// Sets or clears the value of [http_body][crate::model::StreamRawPredictRequest::http_body].
82068    pub fn set_or_clear_http_body<T>(mut self, v: std::option::Option<T>) -> Self
82069    where
82070        T: std::convert::Into<api::model::HttpBody>,
82071    {
82072        self.http_body = v.map(|x| x.into());
82073        self
82074    }
82075}
82076
82077#[cfg(feature = "prediction-service")]
82078impl wkt::message::Message for StreamRawPredictRequest {
82079    fn typename() -> &'static str {
82080        "type.googleapis.com/google.cloud.aiplatform.v1.StreamRawPredictRequest"
82081    }
82082}
82083
82084/// Request message for
82085/// [PredictionService.DirectPredict][google.cloud.aiplatform.v1.PredictionService.DirectPredict].
82086///
82087/// [google.cloud.aiplatform.v1.PredictionService.DirectPredict]: crate::client::PredictionService::direct_predict
82088#[cfg(feature = "prediction-service")]
82089#[derive(Clone, Default, PartialEq)]
82090#[non_exhaustive]
82091pub struct DirectPredictRequest {
82092    /// Required. The name of the Endpoint requested to serve the prediction.
82093    /// Format:
82094    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
82095    pub endpoint: std::string::String,
82096
82097    /// The prediction input.
82098    pub inputs: std::vec::Vec<crate::model::Tensor>,
82099
82100    /// The parameters that govern the prediction.
82101    pub parameters: std::option::Option<crate::model::Tensor>,
82102
82103    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82104}
82105
82106#[cfg(feature = "prediction-service")]
82107impl DirectPredictRequest {
82108    pub fn new() -> Self {
82109        std::default::Default::default()
82110    }
82111
82112    /// Sets the value of [endpoint][crate::model::DirectPredictRequest::endpoint].
82113    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
82114        self.endpoint = v.into();
82115        self
82116    }
82117
82118    /// Sets the value of [inputs][crate::model::DirectPredictRequest::inputs].
82119    pub fn set_inputs<T, V>(mut self, v: T) -> Self
82120    where
82121        T: std::iter::IntoIterator<Item = V>,
82122        V: std::convert::Into<crate::model::Tensor>,
82123    {
82124        use std::iter::Iterator;
82125        self.inputs = v.into_iter().map(|i| i.into()).collect();
82126        self
82127    }
82128
82129    /// Sets the value of [parameters][crate::model::DirectPredictRequest::parameters].
82130    pub fn set_parameters<T>(mut self, v: T) -> Self
82131    where
82132        T: std::convert::Into<crate::model::Tensor>,
82133    {
82134        self.parameters = std::option::Option::Some(v.into());
82135        self
82136    }
82137
82138    /// Sets or clears the value of [parameters][crate::model::DirectPredictRequest::parameters].
82139    pub fn set_or_clear_parameters<T>(mut self, v: std::option::Option<T>) -> Self
82140    where
82141        T: std::convert::Into<crate::model::Tensor>,
82142    {
82143        self.parameters = v.map(|x| x.into());
82144        self
82145    }
82146}
82147
82148#[cfg(feature = "prediction-service")]
82149impl wkt::message::Message for DirectPredictRequest {
82150    fn typename() -> &'static str {
82151        "type.googleapis.com/google.cloud.aiplatform.v1.DirectPredictRequest"
82152    }
82153}
82154
82155/// Response message for
82156/// [PredictionService.DirectPredict][google.cloud.aiplatform.v1.PredictionService.DirectPredict].
82157///
82158/// [google.cloud.aiplatform.v1.PredictionService.DirectPredict]: crate::client::PredictionService::direct_predict
82159#[cfg(feature = "prediction-service")]
82160#[derive(Clone, Default, PartialEq)]
82161#[non_exhaustive]
82162pub struct DirectPredictResponse {
82163    /// The prediction output.
82164    pub outputs: std::vec::Vec<crate::model::Tensor>,
82165
82166    /// The parameters that govern the prediction.
82167    pub parameters: std::option::Option<crate::model::Tensor>,
82168
82169    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82170}
82171
82172#[cfg(feature = "prediction-service")]
82173impl DirectPredictResponse {
82174    pub fn new() -> Self {
82175        std::default::Default::default()
82176    }
82177
82178    /// Sets the value of [outputs][crate::model::DirectPredictResponse::outputs].
82179    pub fn set_outputs<T, V>(mut self, v: T) -> Self
82180    where
82181        T: std::iter::IntoIterator<Item = V>,
82182        V: std::convert::Into<crate::model::Tensor>,
82183    {
82184        use std::iter::Iterator;
82185        self.outputs = v.into_iter().map(|i| i.into()).collect();
82186        self
82187    }
82188
82189    /// Sets the value of [parameters][crate::model::DirectPredictResponse::parameters].
82190    pub fn set_parameters<T>(mut self, v: T) -> Self
82191    where
82192        T: std::convert::Into<crate::model::Tensor>,
82193    {
82194        self.parameters = std::option::Option::Some(v.into());
82195        self
82196    }
82197
82198    /// Sets or clears the value of [parameters][crate::model::DirectPredictResponse::parameters].
82199    pub fn set_or_clear_parameters<T>(mut self, v: std::option::Option<T>) -> Self
82200    where
82201        T: std::convert::Into<crate::model::Tensor>,
82202    {
82203        self.parameters = v.map(|x| x.into());
82204        self
82205    }
82206}
82207
82208#[cfg(feature = "prediction-service")]
82209impl wkt::message::Message for DirectPredictResponse {
82210    fn typename() -> &'static str {
82211        "type.googleapis.com/google.cloud.aiplatform.v1.DirectPredictResponse"
82212    }
82213}
82214
82215/// Request message for
82216/// [PredictionService.DirectRawPredict][google.cloud.aiplatform.v1.PredictionService.DirectRawPredict].
82217///
82218/// [google.cloud.aiplatform.v1.PredictionService.DirectRawPredict]: crate::client::PredictionService::direct_raw_predict
82219#[cfg(feature = "prediction-service")]
82220#[derive(Clone, Default, PartialEq)]
82221#[non_exhaustive]
82222pub struct DirectRawPredictRequest {
82223    /// Required. The name of the Endpoint requested to serve the prediction.
82224    /// Format:
82225    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
82226    pub endpoint: std::string::String,
82227
82228    /// Fully qualified name of the API method being invoked to perform
82229    /// predictions.
82230    ///
82231    /// Format:
82232    /// `/namespace.Service/Method/`
82233    /// Example:
82234    /// `/tensorflow.serving.PredictionService/Predict`
82235    pub method_name: std::string::String,
82236
82237    /// The prediction input.
82238    pub input: ::bytes::Bytes,
82239
82240    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82241}
82242
82243#[cfg(feature = "prediction-service")]
82244impl DirectRawPredictRequest {
82245    pub fn new() -> Self {
82246        std::default::Default::default()
82247    }
82248
82249    /// Sets the value of [endpoint][crate::model::DirectRawPredictRequest::endpoint].
82250    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
82251        self.endpoint = v.into();
82252        self
82253    }
82254
82255    /// Sets the value of [method_name][crate::model::DirectRawPredictRequest::method_name].
82256    pub fn set_method_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
82257        self.method_name = v.into();
82258        self
82259    }
82260
82261    /// Sets the value of [input][crate::model::DirectRawPredictRequest::input].
82262    pub fn set_input<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
82263        self.input = v.into();
82264        self
82265    }
82266}
82267
82268#[cfg(feature = "prediction-service")]
82269impl wkt::message::Message for DirectRawPredictRequest {
82270    fn typename() -> &'static str {
82271        "type.googleapis.com/google.cloud.aiplatform.v1.DirectRawPredictRequest"
82272    }
82273}
82274
82275/// Response message for
82276/// [PredictionService.DirectRawPredict][google.cloud.aiplatform.v1.PredictionService.DirectRawPredict].
82277///
82278/// [google.cloud.aiplatform.v1.PredictionService.DirectRawPredict]: crate::client::PredictionService::direct_raw_predict
82279#[cfg(feature = "prediction-service")]
82280#[derive(Clone, Default, PartialEq)]
82281#[non_exhaustive]
82282pub struct DirectRawPredictResponse {
82283    /// The prediction output.
82284    pub output: ::bytes::Bytes,
82285
82286    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82287}
82288
82289#[cfg(feature = "prediction-service")]
82290impl DirectRawPredictResponse {
82291    pub fn new() -> Self {
82292        std::default::Default::default()
82293    }
82294
82295    /// Sets the value of [output][crate::model::DirectRawPredictResponse::output].
82296    pub fn set_output<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
82297        self.output = v.into();
82298        self
82299    }
82300}
82301
82302#[cfg(feature = "prediction-service")]
82303impl wkt::message::Message for DirectRawPredictResponse {
82304    fn typename() -> &'static str {
82305        "type.googleapis.com/google.cloud.aiplatform.v1.DirectRawPredictResponse"
82306    }
82307}
82308
82309/// Request message for
82310/// [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict].
82311///
82312/// The first message must contain
82313/// [endpoint][google.cloud.aiplatform.v1.StreamDirectPredictRequest.endpoint]
82314/// field and optionally [input][]. The subsequent messages must contain
82315/// [input][].
82316///
82317/// [google.cloud.aiplatform.v1.StreamDirectPredictRequest.endpoint]: crate::model::StreamDirectPredictRequest::endpoint
82318#[cfg(feature = "prediction-service")]
82319#[derive(Clone, Default, PartialEq)]
82320#[non_exhaustive]
82321pub struct StreamDirectPredictRequest {
82322    /// Required. The name of the Endpoint requested to serve the prediction.
82323    /// Format:
82324    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
82325    pub endpoint: std::string::String,
82326
82327    /// Optional. The prediction input.
82328    pub inputs: std::vec::Vec<crate::model::Tensor>,
82329
82330    /// Optional. The parameters that govern the prediction.
82331    pub parameters: std::option::Option<crate::model::Tensor>,
82332
82333    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82334}
82335
82336#[cfg(feature = "prediction-service")]
82337impl StreamDirectPredictRequest {
82338    pub fn new() -> Self {
82339        std::default::Default::default()
82340    }
82341
82342    /// Sets the value of [endpoint][crate::model::StreamDirectPredictRequest::endpoint].
82343    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
82344        self.endpoint = v.into();
82345        self
82346    }
82347
82348    /// Sets the value of [inputs][crate::model::StreamDirectPredictRequest::inputs].
82349    pub fn set_inputs<T, V>(mut self, v: T) -> Self
82350    where
82351        T: std::iter::IntoIterator<Item = V>,
82352        V: std::convert::Into<crate::model::Tensor>,
82353    {
82354        use std::iter::Iterator;
82355        self.inputs = v.into_iter().map(|i| i.into()).collect();
82356        self
82357    }
82358
82359    /// Sets the value of [parameters][crate::model::StreamDirectPredictRequest::parameters].
82360    pub fn set_parameters<T>(mut self, v: T) -> Self
82361    where
82362        T: std::convert::Into<crate::model::Tensor>,
82363    {
82364        self.parameters = std::option::Option::Some(v.into());
82365        self
82366    }
82367
82368    /// Sets or clears the value of [parameters][crate::model::StreamDirectPredictRequest::parameters].
82369    pub fn set_or_clear_parameters<T>(mut self, v: std::option::Option<T>) -> Self
82370    where
82371        T: std::convert::Into<crate::model::Tensor>,
82372    {
82373        self.parameters = v.map(|x| x.into());
82374        self
82375    }
82376}
82377
82378#[cfg(feature = "prediction-service")]
82379impl wkt::message::Message for StreamDirectPredictRequest {
82380    fn typename() -> &'static str {
82381        "type.googleapis.com/google.cloud.aiplatform.v1.StreamDirectPredictRequest"
82382    }
82383}
82384
82385/// Response message for
82386/// [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict].
82387#[cfg(feature = "prediction-service")]
82388#[derive(Clone, Default, PartialEq)]
82389#[non_exhaustive]
82390pub struct StreamDirectPredictResponse {
82391    /// The prediction output.
82392    pub outputs: std::vec::Vec<crate::model::Tensor>,
82393
82394    /// The parameters that govern the prediction.
82395    pub parameters: std::option::Option<crate::model::Tensor>,
82396
82397    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82398}
82399
82400#[cfg(feature = "prediction-service")]
82401impl StreamDirectPredictResponse {
82402    pub fn new() -> Self {
82403        std::default::Default::default()
82404    }
82405
82406    /// Sets the value of [outputs][crate::model::StreamDirectPredictResponse::outputs].
82407    pub fn set_outputs<T, V>(mut self, v: T) -> Self
82408    where
82409        T: std::iter::IntoIterator<Item = V>,
82410        V: std::convert::Into<crate::model::Tensor>,
82411    {
82412        use std::iter::Iterator;
82413        self.outputs = v.into_iter().map(|i| i.into()).collect();
82414        self
82415    }
82416
82417    /// Sets the value of [parameters][crate::model::StreamDirectPredictResponse::parameters].
82418    pub fn set_parameters<T>(mut self, v: T) -> Self
82419    where
82420        T: std::convert::Into<crate::model::Tensor>,
82421    {
82422        self.parameters = std::option::Option::Some(v.into());
82423        self
82424    }
82425
82426    /// Sets or clears the value of [parameters][crate::model::StreamDirectPredictResponse::parameters].
82427    pub fn set_or_clear_parameters<T>(mut self, v: std::option::Option<T>) -> Self
82428    where
82429        T: std::convert::Into<crate::model::Tensor>,
82430    {
82431        self.parameters = v.map(|x| x.into());
82432        self
82433    }
82434}
82435
82436#[cfg(feature = "prediction-service")]
82437impl wkt::message::Message for StreamDirectPredictResponse {
82438    fn typename() -> &'static str {
82439        "type.googleapis.com/google.cloud.aiplatform.v1.StreamDirectPredictResponse"
82440    }
82441}
82442
82443/// Request message for
82444/// [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict].
82445///
82446/// The first message must contain
82447/// [endpoint][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.endpoint]
82448/// and
82449/// [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name]
82450/// fields and optionally
82451/// [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input]. The
82452/// subsequent messages must contain
82453/// [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input].
82454/// [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name]
82455/// in the subsequent messages have no effect.
82456///
82457/// [google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.endpoint]: crate::model::StreamDirectRawPredictRequest::endpoint
82458/// [google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input]: crate::model::StreamDirectRawPredictRequest::input
82459/// [google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name]: crate::model::StreamDirectRawPredictRequest::method_name
82460#[cfg(feature = "prediction-service")]
82461#[derive(Clone, Default, PartialEq)]
82462#[non_exhaustive]
82463pub struct StreamDirectRawPredictRequest {
82464    /// Required. The name of the Endpoint requested to serve the prediction.
82465    /// Format:
82466    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
82467    pub endpoint: std::string::String,
82468
82469    /// Optional. Fully qualified name of the API method being invoked to perform
82470    /// predictions.
82471    ///
82472    /// Format:
82473    /// `/namespace.Service/Method/`
82474    /// Example:
82475    /// `/tensorflow.serving.PredictionService/Predict`
82476    pub method_name: std::string::String,
82477
82478    /// Optional. The prediction input.
82479    pub input: ::bytes::Bytes,
82480
82481    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82482}
82483
82484#[cfg(feature = "prediction-service")]
82485impl StreamDirectRawPredictRequest {
82486    pub fn new() -> Self {
82487        std::default::Default::default()
82488    }
82489
82490    /// Sets the value of [endpoint][crate::model::StreamDirectRawPredictRequest::endpoint].
82491    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
82492        self.endpoint = v.into();
82493        self
82494    }
82495
82496    /// Sets the value of [method_name][crate::model::StreamDirectRawPredictRequest::method_name].
82497    pub fn set_method_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
82498        self.method_name = v.into();
82499        self
82500    }
82501
82502    /// Sets the value of [input][crate::model::StreamDirectRawPredictRequest::input].
82503    pub fn set_input<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
82504        self.input = v.into();
82505        self
82506    }
82507}
82508
82509#[cfg(feature = "prediction-service")]
82510impl wkt::message::Message for StreamDirectRawPredictRequest {
82511    fn typename() -> &'static str {
82512        "type.googleapis.com/google.cloud.aiplatform.v1.StreamDirectRawPredictRequest"
82513    }
82514}
82515
82516/// Response message for
82517/// [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict].
82518#[cfg(feature = "prediction-service")]
82519#[derive(Clone, Default, PartialEq)]
82520#[non_exhaustive]
82521pub struct StreamDirectRawPredictResponse {
82522    /// The prediction output.
82523    pub output: ::bytes::Bytes,
82524
82525    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82526}
82527
82528#[cfg(feature = "prediction-service")]
82529impl StreamDirectRawPredictResponse {
82530    pub fn new() -> Self {
82531        std::default::Default::default()
82532    }
82533
82534    /// Sets the value of [output][crate::model::StreamDirectRawPredictResponse::output].
82535    pub fn set_output<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
82536        self.output = v.into();
82537        self
82538    }
82539}
82540
82541#[cfg(feature = "prediction-service")]
82542impl wkt::message::Message for StreamDirectRawPredictResponse {
82543    fn typename() -> &'static str {
82544        "type.googleapis.com/google.cloud.aiplatform.v1.StreamDirectRawPredictResponse"
82545    }
82546}
82547
82548/// Request message for
82549/// [PredictionService.StreamingPredict][google.cloud.aiplatform.v1.PredictionService.StreamingPredict].
82550///
82551/// The first message must contain
82552/// [endpoint][google.cloud.aiplatform.v1.StreamingPredictRequest.endpoint] field
82553/// and optionally [input][]. The subsequent messages must contain [input][].
82554///
82555/// [google.cloud.aiplatform.v1.StreamingPredictRequest.endpoint]: crate::model::StreamingPredictRequest::endpoint
82556#[cfg(feature = "prediction-service")]
82557#[derive(Clone, Default, PartialEq)]
82558#[non_exhaustive]
82559pub struct StreamingPredictRequest {
82560    /// Required. The name of the Endpoint requested to serve the prediction.
82561    /// Format:
82562    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
82563    pub endpoint: std::string::String,
82564
82565    /// The prediction input.
82566    pub inputs: std::vec::Vec<crate::model::Tensor>,
82567
82568    /// The parameters that govern the prediction.
82569    pub parameters: std::option::Option<crate::model::Tensor>,
82570
82571    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82572}
82573
82574#[cfg(feature = "prediction-service")]
82575impl StreamingPredictRequest {
82576    pub fn new() -> Self {
82577        std::default::Default::default()
82578    }
82579
82580    /// Sets the value of [endpoint][crate::model::StreamingPredictRequest::endpoint].
82581    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
82582        self.endpoint = v.into();
82583        self
82584    }
82585
82586    /// Sets the value of [inputs][crate::model::StreamingPredictRequest::inputs].
82587    pub fn set_inputs<T, V>(mut self, v: T) -> Self
82588    where
82589        T: std::iter::IntoIterator<Item = V>,
82590        V: std::convert::Into<crate::model::Tensor>,
82591    {
82592        use std::iter::Iterator;
82593        self.inputs = v.into_iter().map(|i| i.into()).collect();
82594        self
82595    }
82596
82597    /// Sets the value of [parameters][crate::model::StreamingPredictRequest::parameters].
82598    pub fn set_parameters<T>(mut self, v: T) -> Self
82599    where
82600        T: std::convert::Into<crate::model::Tensor>,
82601    {
82602        self.parameters = std::option::Option::Some(v.into());
82603        self
82604    }
82605
82606    /// Sets or clears the value of [parameters][crate::model::StreamingPredictRequest::parameters].
82607    pub fn set_or_clear_parameters<T>(mut self, v: std::option::Option<T>) -> Self
82608    where
82609        T: std::convert::Into<crate::model::Tensor>,
82610    {
82611        self.parameters = v.map(|x| x.into());
82612        self
82613    }
82614}
82615
82616#[cfg(feature = "prediction-service")]
82617impl wkt::message::Message for StreamingPredictRequest {
82618    fn typename() -> &'static str {
82619        "type.googleapis.com/google.cloud.aiplatform.v1.StreamingPredictRequest"
82620    }
82621}
82622
82623/// Response message for
82624/// [PredictionService.StreamingPredict][google.cloud.aiplatform.v1.PredictionService.StreamingPredict].
82625#[cfg(feature = "prediction-service")]
82626#[derive(Clone, Default, PartialEq)]
82627#[non_exhaustive]
82628pub struct StreamingPredictResponse {
82629    /// The prediction output.
82630    pub outputs: std::vec::Vec<crate::model::Tensor>,
82631
82632    /// The parameters that govern the prediction.
82633    pub parameters: std::option::Option<crate::model::Tensor>,
82634
82635    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82636}
82637
82638#[cfg(feature = "prediction-service")]
82639impl StreamingPredictResponse {
82640    pub fn new() -> Self {
82641        std::default::Default::default()
82642    }
82643
82644    /// Sets the value of [outputs][crate::model::StreamingPredictResponse::outputs].
82645    pub fn set_outputs<T, V>(mut self, v: T) -> Self
82646    where
82647        T: std::iter::IntoIterator<Item = V>,
82648        V: std::convert::Into<crate::model::Tensor>,
82649    {
82650        use std::iter::Iterator;
82651        self.outputs = v.into_iter().map(|i| i.into()).collect();
82652        self
82653    }
82654
82655    /// Sets the value of [parameters][crate::model::StreamingPredictResponse::parameters].
82656    pub fn set_parameters<T>(mut self, v: T) -> Self
82657    where
82658        T: std::convert::Into<crate::model::Tensor>,
82659    {
82660        self.parameters = std::option::Option::Some(v.into());
82661        self
82662    }
82663
82664    /// Sets or clears the value of [parameters][crate::model::StreamingPredictResponse::parameters].
82665    pub fn set_or_clear_parameters<T>(mut self, v: std::option::Option<T>) -> Self
82666    where
82667        T: std::convert::Into<crate::model::Tensor>,
82668    {
82669        self.parameters = v.map(|x| x.into());
82670        self
82671    }
82672}
82673
82674#[cfg(feature = "prediction-service")]
82675impl wkt::message::Message for StreamingPredictResponse {
82676    fn typename() -> &'static str {
82677        "type.googleapis.com/google.cloud.aiplatform.v1.StreamingPredictResponse"
82678    }
82679}
82680
82681/// Request message for
82682/// [PredictionService.StreamingRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamingRawPredict].
82683///
82684/// The first message must contain
82685/// [endpoint][google.cloud.aiplatform.v1.StreamingRawPredictRequest.endpoint]
82686/// and
82687/// [method_name][google.cloud.aiplatform.v1.StreamingRawPredictRequest.method_name]
82688/// fields and optionally
82689/// [input][google.cloud.aiplatform.v1.StreamingRawPredictRequest.input]. The
82690/// subsequent messages must contain
82691/// [input][google.cloud.aiplatform.v1.StreamingRawPredictRequest.input].
82692/// [method_name][google.cloud.aiplatform.v1.StreamingRawPredictRequest.method_name]
82693/// in the subsequent messages have no effect.
82694///
82695/// [google.cloud.aiplatform.v1.StreamingRawPredictRequest.endpoint]: crate::model::StreamingRawPredictRequest::endpoint
82696/// [google.cloud.aiplatform.v1.StreamingRawPredictRequest.input]: crate::model::StreamingRawPredictRequest::input
82697/// [google.cloud.aiplatform.v1.StreamingRawPredictRequest.method_name]: crate::model::StreamingRawPredictRequest::method_name
82698#[cfg(feature = "prediction-service")]
82699#[derive(Clone, Default, PartialEq)]
82700#[non_exhaustive]
82701pub struct StreamingRawPredictRequest {
82702    /// Required. The name of the Endpoint requested to serve the prediction.
82703    /// Format:
82704    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
82705    pub endpoint: std::string::String,
82706
82707    /// Fully qualified name of the API method being invoked to perform
82708    /// predictions.
82709    ///
82710    /// Format:
82711    /// `/namespace.Service/Method/`
82712    /// Example:
82713    /// `/tensorflow.serving.PredictionService/Predict`
82714    pub method_name: std::string::String,
82715
82716    /// The prediction input.
82717    pub input: ::bytes::Bytes,
82718
82719    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82720}
82721
82722#[cfg(feature = "prediction-service")]
82723impl StreamingRawPredictRequest {
82724    pub fn new() -> Self {
82725        std::default::Default::default()
82726    }
82727
82728    /// Sets the value of [endpoint][crate::model::StreamingRawPredictRequest::endpoint].
82729    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
82730        self.endpoint = v.into();
82731        self
82732    }
82733
82734    /// Sets the value of [method_name][crate::model::StreamingRawPredictRequest::method_name].
82735    pub fn set_method_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
82736        self.method_name = v.into();
82737        self
82738    }
82739
82740    /// Sets the value of [input][crate::model::StreamingRawPredictRequest::input].
82741    pub fn set_input<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
82742        self.input = v.into();
82743        self
82744    }
82745}
82746
82747#[cfg(feature = "prediction-service")]
82748impl wkt::message::Message for StreamingRawPredictRequest {
82749    fn typename() -> &'static str {
82750        "type.googleapis.com/google.cloud.aiplatform.v1.StreamingRawPredictRequest"
82751    }
82752}
82753
82754/// Response message for
82755/// [PredictionService.StreamingRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamingRawPredict].
82756#[cfg(feature = "prediction-service")]
82757#[derive(Clone, Default, PartialEq)]
82758#[non_exhaustive]
82759pub struct StreamingRawPredictResponse {
82760    /// The prediction output.
82761    pub output: ::bytes::Bytes,
82762
82763    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82764}
82765
82766#[cfg(feature = "prediction-service")]
82767impl StreamingRawPredictResponse {
82768    pub fn new() -> Self {
82769        std::default::Default::default()
82770    }
82771
82772    /// Sets the value of [output][crate::model::StreamingRawPredictResponse::output].
82773    pub fn set_output<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
82774        self.output = v.into();
82775        self
82776    }
82777}
82778
82779#[cfg(feature = "prediction-service")]
82780impl wkt::message::Message for StreamingRawPredictResponse {
82781    fn typename() -> &'static str {
82782        "type.googleapis.com/google.cloud.aiplatform.v1.StreamingRawPredictResponse"
82783    }
82784}
82785
82786/// Request message for
82787/// [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain].
82788///
82789/// [google.cloud.aiplatform.v1.PredictionService.Explain]: crate::client::PredictionService::explain
82790#[cfg(feature = "prediction-service")]
82791#[derive(Clone, Default, PartialEq)]
82792#[non_exhaustive]
82793pub struct ExplainRequest {
82794    /// Required. The name of the Endpoint requested to serve the explanation.
82795    /// Format:
82796    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
82797    pub endpoint: std::string::String,
82798
82799    /// Required. The instances that are the input to the explanation call.
82800    /// A DeployedModel may have an upper limit on the number of instances it
82801    /// supports per request, and when it is exceeded the explanation call errors
82802    /// in case of AutoML Models, or, in case of customer created Models, the
82803    /// behaviour is as documented by that Model.
82804    /// The schema of any single instance may be specified via Endpoint's
82805    /// DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
82806    /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
82807    /// [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
82808    ///
82809    /// [google.cloud.aiplatform.v1.DeployedModel.model]: crate::model::DeployedModel::model
82810    /// [google.cloud.aiplatform.v1.Model.predict_schemata]: crate::model::Model::predict_schemata
82811    /// [google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]: crate::model::PredictSchemata::instance_schema_uri
82812    pub instances: std::vec::Vec<wkt::Value>,
82813
82814    /// The parameters that govern the prediction. The schema of the parameters may
82815    /// be specified via Endpoint's DeployedModels' [Model's
82816    /// ][google.cloud.aiplatform.v1.DeployedModel.model]
82817    /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
82818    /// [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
82819    ///
82820    /// [google.cloud.aiplatform.v1.DeployedModel.model]: crate::model::DeployedModel::model
82821    /// [google.cloud.aiplatform.v1.Model.predict_schemata]: crate::model::Model::predict_schemata
82822    /// [google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]: crate::model::PredictSchemata::parameters_schema_uri
82823    pub parameters: std::option::Option<wkt::Value>,
82824
82825    /// If specified, overrides the
82826    /// [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]
82827    /// of the DeployedModel. Can be used for explaining prediction results with
82828    /// different configurations, such as:
82829    ///
82830    /// - Explaining top-5 predictions results as opposed to top-1;
82831    /// - Increasing path count or step count of the attribution methods to reduce
82832    ///   approximate errors;
82833    /// - Using different baselines for explaining the prediction results.
82834    ///
82835    /// [google.cloud.aiplatform.v1.DeployedModel.explanation_spec]: crate::model::DeployedModel::explanation_spec
82836    pub explanation_spec_override: std::option::Option<crate::model::ExplanationSpecOverride>,
82837
82838    /// If specified, this ExplainRequest will be served by the chosen
82839    /// DeployedModel, overriding
82840    /// [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split].
82841    ///
82842    /// [google.cloud.aiplatform.v1.Endpoint.traffic_split]: crate::model::Endpoint::traffic_split
82843    pub deployed_model_id: std::string::String,
82844
82845    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82846}
82847
82848#[cfg(feature = "prediction-service")]
82849impl ExplainRequest {
82850    pub fn new() -> Self {
82851        std::default::Default::default()
82852    }
82853
82854    /// Sets the value of [endpoint][crate::model::ExplainRequest::endpoint].
82855    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
82856        self.endpoint = v.into();
82857        self
82858    }
82859
82860    /// Sets the value of [instances][crate::model::ExplainRequest::instances].
82861    pub fn set_instances<T, V>(mut self, v: T) -> Self
82862    where
82863        T: std::iter::IntoIterator<Item = V>,
82864        V: std::convert::Into<wkt::Value>,
82865    {
82866        use std::iter::Iterator;
82867        self.instances = v.into_iter().map(|i| i.into()).collect();
82868        self
82869    }
82870
82871    /// Sets the value of [parameters][crate::model::ExplainRequest::parameters].
82872    pub fn set_parameters<T>(mut self, v: T) -> Self
82873    where
82874        T: std::convert::Into<wkt::Value>,
82875    {
82876        self.parameters = std::option::Option::Some(v.into());
82877        self
82878    }
82879
82880    /// Sets or clears the value of [parameters][crate::model::ExplainRequest::parameters].
82881    pub fn set_or_clear_parameters<T>(mut self, v: std::option::Option<T>) -> Self
82882    where
82883        T: std::convert::Into<wkt::Value>,
82884    {
82885        self.parameters = v.map(|x| x.into());
82886        self
82887    }
82888
82889    /// Sets the value of [explanation_spec_override][crate::model::ExplainRequest::explanation_spec_override].
82890    pub fn set_explanation_spec_override<T>(mut self, v: T) -> Self
82891    where
82892        T: std::convert::Into<crate::model::ExplanationSpecOverride>,
82893    {
82894        self.explanation_spec_override = std::option::Option::Some(v.into());
82895        self
82896    }
82897
82898    /// Sets or clears the value of [explanation_spec_override][crate::model::ExplainRequest::explanation_spec_override].
82899    pub fn set_or_clear_explanation_spec_override<T>(mut self, v: std::option::Option<T>) -> Self
82900    where
82901        T: std::convert::Into<crate::model::ExplanationSpecOverride>,
82902    {
82903        self.explanation_spec_override = v.map(|x| x.into());
82904        self
82905    }
82906
82907    /// Sets the value of [deployed_model_id][crate::model::ExplainRequest::deployed_model_id].
82908    pub fn set_deployed_model_id<T: std::convert::Into<std::string::String>>(
82909        mut self,
82910        v: T,
82911    ) -> Self {
82912        self.deployed_model_id = v.into();
82913        self
82914    }
82915}
82916
82917#[cfg(feature = "prediction-service")]
82918impl wkt::message::Message for ExplainRequest {
82919    fn typename() -> &'static str {
82920        "type.googleapis.com/google.cloud.aiplatform.v1.ExplainRequest"
82921    }
82922}
82923
82924/// Response message for
82925/// [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain].
82926///
82927/// [google.cloud.aiplatform.v1.PredictionService.Explain]: crate::client::PredictionService::explain
82928#[cfg(feature = "prediction-service")]
82929#[derive(Clone, Default, PartialEq)]
82930#[non_exhaustive]
82931pub struct ExplainResponse {
82932    /// The explanations of the Model's
82933    /// [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
82934    ///
82935    /// It has the same number of elements as
82936    /// [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] to be
82937    /// explained.
82938    ///
82939    /// [google.cloud.aiplatform.v1.ExplainRequest.instances]: crate::model::ExplainRequest::instances
82940    /// [google.cloud.aiplatform.v1.PredictResponse.predictions]: crate::model::PredictResponse::predictions
82941    pub explanations: std::vec::Vec<crate::model::Explanation>,
82942
82943    /// ID of the Endpoint's DeployedModel that served this explanation.
82944    pub deployed_model_id: std::string::String,
82945
82946    /// The predictions that are the output of the predictions call.
82947    /// Same as
82948    /// [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions].
82949    ///
82950    /// [google.cloud.aiplatform.v1.PredictResponse.predictions]: crate::model::PredictResponse::predictions
82951    pub predictions: std::vec::Vec<wkt::Value>,
82952
82953    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
82954}
82955
82956#[cfg(feature = "prediction-service")]
82957impl ExplainResponse {
82958    pub fn new() -> Self {
82959        std::default::Default::default()
82960    }
82961
82962    /// Sets the value of [explanations][crate::model::ExplainResponse::explanations].
82963    pub fn set_explanations<T, V>(mut self, v: T) -> Self
82964    where
82965        T: std::iter::IntoIterator<Item = V>,
82966        V: std::convert::Into<crate::model::Explanation>,
82967    {
82968        use std::iter::Iterator;
82969        self.explanations = v.into_iter().map(|i| i.into()).collect();
82970        self
82971    }
82972
82973    /// Sets the value of [deployed_model_id][crate::model::ExplainResponse::deployed_model_id].
82974    pub fn set_deployed_model_id<T: std::convert::Into<std::string::String>>(
82975        mut self,
82976        v: T,
82977    ) -> Self {
82978        self.deployed_model_id = v.into();
82979        self
82980    }
82981
82982    /// Sets the value of [predictions][crate::model::ExplainResponse::predictions].
82983    pub fn set_predictions<T, V>(mut self, v: T) -> Self
82984    where
82985        T: std::iter::IntoIterator<Item = V>,
82986        V: std::convert::Into<wkt::Value>,
82987    {
82988        use std::iter::Iterator;
82989        self.predictions = v.into_iter().map(|i| i.into()).collect();
82990        self
82991    }
82992}
82993
82994#[cfg(feature = "prediction-service")]
82995impl wkt::message::Message for ExplainResponse {
82996    fn typename() -> &'static str {
82997        "type.googleapis.com/google.cloud.aiplatform.v1.ExplainResponse"
82998    }
82999}
83000
83001/// Request message for [PredictionService.CountTokens][].
83002#[cfg(feature = "llm-utility-service")]
83003#[derive(Clone, Default, PartialEq)]
83004#[non_exhaustive]
83005pub struct CountTokensRequest {
83006    /// Required. The name of the Endpoint requested to perform token counting.
83007    /// Format:
83008    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
83009    pub endpoint: std::string::String,
83010
83011    /// Optional. The name of the publisher model requested to serve the
83012    /// prediction. Format:
83013    /// `projects/{project}/locations/{location}/publishers/*/models/*`
83014    pub model: std::string::String,
83015
83016    /// Optional. The instances that are the input to token counting call.
83017    /// Schema is identical to the prediction schema of the underlying model.
83018    pub instances: std::vec::Vec<wkt::Value>,
83019
83020    /// Optional. Input content.
83021    pub contents: std::vec::Vec<crate::model::Content>,
83022
83023    /// Optional. The user provided system instructions for the model.
83024    /// Note: only text should be used in parts and content in each part will be in
83025    /// a separate paragraph.
83026    pub system_instruction: std::option::Option<crate::model::Content>,
83027
83028    /// Optional. A list of `Tools` the model may use to generate the next
83029    /// response.
83030    ///
83031    /// A `Tool` is a piece of code that enables the system to interact with
83032    /// external systems to perform an action, or set of actions, outside of
83033    /// knowledge and scope of the model.
83034    pub tools: std::vec::Vec<crate::model::Tool>,
83035
83036    /// Optional. Generation config that the model will use to generate the
83037    /// response.
83038    pub generation_config: std::option::Option<crate::model::GenerationConfig>,
83039
83040    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
83041}
83042
83043#[cfg(feature = "llm-utility-service")]
83044impl CountTokensRequest {
83045    pub fn new() -> Self {
83046        std::default::Default::default()
83047    }
83048
83049    /// Sets the value of [endpoint][crate::model::CountTokensRequest::endpoint].
83050    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
83051        self.endpoint = v.into();
83052        self
83053    }
83054
83055    /// Sets the value of [model][crate::model::CountTokensRequest::model].
83056    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
83057        self.model = v.into();
83058        self
83059    }
83060
83061    /// Sets the value of [instances][crate::model::CountTokensRequest::instances].
83062    pub fn set_instances<T, V>(mut self, v: T) -> Self
83063    where
83064        T: std::iter::IntoIterator<Item = V>,
83065        V: std::convert::Into<wkt::Value>,
83066    {
83067        use std::iter::Iterator;
83068        self.instances = v.into_iter().map(|i| i.into()).collect();
83069        self
83070    }
83071
83072    /// Sets the value of [contents][crate::model::CountTokensRequest::contents].
83073    pub fn set_contents<T, V>(mut self, v: T) -> Self
83074    where
83075        T: std::iter::IntoIterator<Item = V>,
83076        V: std::convert::Into<crate::model::Content>,
83077    {
83078        use std::iter::Iterator;
83079        self.contents = v.into_iter().map(|i| i.into()).collect();
83080        self
83081    }
83082
83083    /// Sets the value of [system_instruction][crate::model::CountTokensRequest::system_instruction].
83084    pub fn set_system_instruction<T>(mut self, v: T) -> Self
83085    where
83086        T: std::convert::Into<crate::model::Content>,
83087    {
83088        self.system_instruction = std::option::Option::Some(v.into());
83089        self
83090    }
83091
83092    /// Sets or clears the value of [system_instruction][crate::model::CountTokensRequest::system_instruction].
83093    pub fn set_or_clear_system_instruction<T>(mut self, v: std::option::Option<T>) -> Self
83094    where
83095        T: std::convert::Into<crate::model::Content>,
83096    {
83097        self.system_instruction = v.map(|x| x.into());
83098        self
83099    }
83100
83101    /// Sets the value of [tools][crate::model::CountTokensRequest::tools].
83102    pub fn set_tools<T, V>(mut self, v: T) -> Self
83103    where
83104        T: std::iter::IntoIterator<Item = V>,
83105        V: std::convert::Into<crate::model::Tool>,
83106    {
83107        use std::iter::Iterator;
83108        self.tools = v.into_iter().map(|i| i.into()).collect();
83109        self
83110    }
83111
83112    /// Sets the value of [generation_config][crate::model::CountTokensRequest::generation_config].
83113    pub fn set_generation_config<T>(mut self, v: T) -> Self
83114    where
83115        T: std::convert::Into<crate::model::GenerationConfig>,
83116    {
83117        self.generation_config = std::option::Option::Some(v.into());
83118        self
83119    }
83120
83121    /// Sets or clears the value of [generation_config][crate::model::CountTokensRequest::generation_config].
83122    pub fn set_or_clear_generation_config<T>(mut self, v: std::option::Option<T>) -> Self
83123    where
83124        T: std::convert::Into<crate::model::GenerationConfig>,
83125    {
83126        self.generation_config = v.map(|x| x.into());
83127        self
83128    }
83129}
83130
83131#[cfg(feature = "llm-utility-service")]
83132impl wkt::message::Message for CountTokensRequest {
83133    fn typename() -> &'static str {
83134        "type.googleapis.com/google.cloud.aiplatform.v1.CountTokensRequest"
83135    }
83136}
83137
83138/// Response message for [PredictionService.CountTokens][].
83139#[cfg(feature = "llm-utility-service")]
83140#[derive(Clone, Default, PartialEq)]
83141#[non_exhaustive]
83142pub struct CountTokensResponse {
83143    /// The total number of tokens counted across all instances from the request.
83144    pub total_tokens: i32,
83145
83146    /// The total number of billable characters counted across all instances from
83147    /// the request.
83148    pub total_billable_characters: i32,
83149
83150    /// Output only. List of modalities that were processed in the request input.
83151    pub prompt_tokens_details: std::vec::Vec<crate::model::ModalityTokenCount>,
83152
83153    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
83154}
83155
83156#[cfg(feature = "llm-utility-service")]
83157impl CountTokensResponse {
83158    pub fn new() -> Self {
83159        std::default::Default::default()
83160    }
83161
83162    /// Sets the value of [total_tokens][crate::model::CountTokensResponse::total_tokens].
83163    pub fn set_total_tokens<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
83164        self.total_tokens = v.into();
83165        self
83166    }
83167
83168    /// Sets the value of [total_billable_characters][crate::model::CountTokensResponse::total_billable_characters].
83169    pub fn set_total_billable_characters<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
83170        self.total_billable_characters = v.into();
83171        self
83172    }
83173
83174    /// Sets the value of [prompt_tokens_details][crate::model::CountTokensResponse::prompt_tokens_details].
83175    pub fn set_prompt_tokens_details<T, V>(mut self, v: T) -> Self
83176    where
83177        T: std::iter::IntoIterator<Item = V>,
83178        V: std::convert::Into<crate::model::ModalityTokenCount>,
83179    {
83180        use std::iter::Iterator;
83181        self.prompt_tokens_details = v.into_iter().map(|i| i.into()).collect();
83182        self
83183    }
83184}
83185
83186#[cfg(feature = "llm-utility-service")]
83187impl wkt::message::Message for CountTokensResponse {
83188    fn typename() -> &'static str {
83189        "type.googleapis.com/google.cloud.aiplatform.v1.CountTokensResponse"
83190    }
83191}
83192
83193/// Request message for [PredictionService.GenerateContent].
83194#[cfg(feature = "prediction-service")]
83195#[derive(Clone, Default, PartialEq)]
83196#[non_exhaustive]
83197pub struct GenerateContentRequest {
83198    /// Required. The fully qualified name of the publisher model or tuned model
83199    /// endpoint to use.
83200    ///
83201    /// Publisher model format:
83202    /// `projects/{project}/locations/{location}/publishers/*/models/*`
83203    ///
83204    /// Tuned model endpoint format:
83205    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
83206    pub model: std::string::String,
83207
83208    /// Required. The content of the current conversation with the model.
83209    ///
83210    /// For single-turn queries, this is a single instance. For multi-turn queries,
83211    /// this is a repeated field that contains conversation history + latest
83212    /// request.
83213    pub contents: std::vec::Vec<crate::model::Content>,
83214
83215    /// Optional. The user provided system instructions for the model.
83216    /// Note: only text should be used in parts and content in each part will be in
83217    /// a separate paragraph.
83218    pub system_instruction: std::option::Option<crate::model::Content>,
83219
83220    /// Optional. The name of the cached content used as context to serve the
83221    /// prediction. Note: only used in explicit caching, where users can have
83222    /// control over caching (e.g. what content to cache) and enjoy guaranteed cost
83223    /// savings. Format:
83224    /// `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
83225    pub cached_content: std::string::String,
83226
83227    /// Optional. A list of `Tools` the model may use to generate the next
83228    /// response.
83229    ///
83230    /// A `Tool` is a piece of code that enables the system to interact with
83231    /// external systems to perform an action, or set of actions, outside of
83232    /// knowledge and scope of the model.
83233    pub tools: std::vec::Vec<crate::model::Tool>,
83234
83235    /// Optional. Tool config. This config is shared for all tools provided in the
83236    /// request.
83237    pub tool_config: std::option::Option<crate::model::ToolConfig>,
83238
83239    /// Optional. The labels with user-defined metadata for the request. It is used
83240    /// for billing and reporting only.
83241    ///
83242    /// Label keys and values can be no longer than 63 characters
83243    /// (Unicode codepoints) and can only contain lowercase letters, numeric
83244    /// characters, underscores, and dashes. International characters are allowed.
83245    /// Label values are optional. Label keys must start with a letter.
83246    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
83247
83248    /// Optional. Per request settings for blocking unsafe content.
83249    /// Enforced on GenerateContentResponse.candidates.
83250    pub safety_settings: std::vec::Vec<crate::model::SafetySetting>,
83251
83252    /// Optional. Settings for prompt and response sanitization using the Model
83253    /// Armor service. If supplied, safety_settings must not be supplied.
83254    pub model_armor_config: std::option::Option<crate::model::ModelArmorConfig>,
83255
83256    /// Optional. Generation config.
83257    pub generation_config: std::option::Option<crate::model::GenerationConfig>,
83258
83259    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
83260}
83261
83262#[cfg(feature = "prediction-service")]
83263impl GenerateContentRequest {
83264    pub fn new() -> Self {
83265        std::default::Default::default()
83266    }
83267
83268    /// Sets the value of [model][crate::model::GenerateContentRequest::model].
83269    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
83270        self.model = v.into();
83271        self
83272    }
83273
83274    /// Sets the value of [contents][crate::model::GenerateContentRequest::contents].
83275    pub fn set_contents<T, V>(mut self, v: T) -> Self
83276    where
83277        T: std::iter::IntoIterator<Item = V>,
83278        V: std::convert::Into<crate::model::Content>,
83279    {
83280        use std::iter::Iterator;
83281        self.contents = v.into_iter().map(|i| i.into()).collect();
83282        self
83283    }
83284
83285    /// Sets the value of [system_instruction][crate::model::GenerateContentRequest::system_instruction].
83286    pub fn set_system_instruction<T>(mut self, v: T) -> Self
83287    where
83288        T: std::convert::Into<crate::model::Content>,
83289    {
83290        self.system_instruction = std::option::Option::Some(v.into());
83291        self
83292    }
83293
83294    /// Sets or clears the value of [system_instruction][crate::model::GenerateContentRequest::system_instruction].
83295    pub fn set_or_clear_system_instruction<T>(mut self, v: std::option::Option<T>) -> Self
83296    where
83297        T: std::convert::Into<crate::model::Content>,
83298    {
83299        self.system_instruction = v.map(|x| x.into());
83300        self
83301    }
83302
83303    /// Sets the value of [cached_content][crate::model::GenerateContentRequest::cached_content].
83304    pub fn set_cached_content<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
83305        self.cached_content = v.into();
83306        self
83307    }
83308
83309    /// Sets the value of [tools][crate::model::GenerateContentRequest::tools].
83310    pub fn set_tools<T, V>(mut self, v: T) -> Self
83311    where
83312        T: std::iter::IntoIterator<Item = V>,
83313        V: std::convert::Into<crate::model::Tool>,
83314    {
83315        use std::iter::Iterator;
83316        self.tools = v.into_iter().map(|i| i.into()).collect();
83317        self
83318    }
83319
83320    /// Sets the value of [tool_config][crate::model::GenerateContentRequest::tool_config].
83321    pub fn set_tool_config<T>(mut self, v: T) -> Self
83322    where
83323        T: std::convert::Into<crate::model::ToolConfig>,
83324    {
83325        self.tool_config = std::option::Option::Some(v.into());
83326        self
83327    }
83328
83329    /// Sets or clears the value of [tool_config][crate::model::GenerateContentRequest::tool_config].
83330    pub fn set_or_clear_tool_config<T>(mut self, v: std::option::Option<T>) -> Self
83331    where
83332        T: std::convert::Into<crate::model::ToolConfig>,
83333    {
83334        self.tool_config = v.map(|x| x.into());
83335        self
83336    }
83337
83338    /// Sets the value of [labels][crate::model::GenerateContentRequest::labels].
83339    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
83340    where
83341        T: std::iter::IntoIterator<Item = (K, V)>,
83342        K: std::convert::Into<std::string::String>,
83343        V: std::convert::Into<std::string::String>,
83344    {
83345        use std::iter::Iterator;
83346        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
83347        self
83348    }
83349
83350    /// Sets the value of [safety_settings][crate::model::GenerateContentRequest::safety_settings].
83351    pub fn set_safety_settings<T, V>(mut self, v: T) -> Self
83352    where
83353        T: std::iter::IntoIterator<Item = V>,
83354        V: std::convert::Into<crate::model::SafetySetting>,
83355    {
83356        use std::iter::Iterator;
83357        self.safety_settings = v.into_iter().map(|i| i.into()).collect();
83358        self
83359    }
83360
83361    /// Sets the value of [model_armor_config][crate::model::GenerateContentRequest::model_armor_config].
83362    pub fn set_model_armor_config<T>(mut self, v: T) -> Self
83363    where
83364        T: std::convert::Into<crate::model::ModelArmorConfig>,
83365    {
83366        self.model_armor_config = std::option::Option::Some(v.into());
83367        self
83368    }
83369
83370    /// Sets or clears the value of [model_armor_config][crate::model::GenerateContentRequest::model_armor_config].
83371    pub fn set_or_clear_model_armor_config<T>(mut self, v: std::option::Option<T>) -> Self
83372    where
83373        T: std::convert::Into<crate::model::ModelArmorConfig>,
83374    {
83375        self.model_armor_config = v.map(|x| x.into());
83376        self
83377    }
83378
83379    /// Sets the value of [generation_config][crate::model::GenerateContentRequest::generation_config].
83380    pub fn set_generation_config<T>(mut self, v: T) -> Self
83381    where
83382        T: std::convert::Into<crate::model::GenerationConfig>,
83383    {
83384        self.generation_config = std::option::Option::Some(v.into());
83385        self
83386    }
83387
83388    /// Sets or clears the value of [generation_config][crate::model::GenerateContentRequest::generation_config].
83389    pub fn set_or_clear_generation_config<T>(mut self, v: std::option::Option<T>) -> Self
83390    where
83391        T: std::convert::Into<crate::model::GenerationConfig>,
83392    {
83393        self.generation_config = v.map(|x| x.into());
83394        self
83395    }
83396}
83397
83398#[cfg(feature = "prediction-service")]
83399impl wkt::message::Message for GenerateContentRequest {
83400    fn typename() -> &'static str {
83401        "type.googleapis.com/google.cloud.aiplatform.v1.GenerateContentRequest"
83402    }
83403}
83404
83405/// Response message for [PredictionService.GenerateContent].
83406#[cfg(feature = "prediction-service")]
83407#[derive(Clone, Default, PartialEq)]
83408#[non_exhaustive]
83409pub struct GenerateContentResponse {
83410    /// Output only. Generated candidates.
83411    pub candidates: std::vec::Vec<crate::model::Candidate>,
83412
83413    /// Output only. The model version used to generate the response.
83414    pub model_version: std::string::String,
83415
83416    /// Output only. Timestamp when the request is made to the server.
83417    pub create_time: std::option::Option<wkt::Timestamp>,
83418
83419    /// Output only. response_id is used to identify each response. It is the
83420    /// encoding of the event_id.
83421    pub response_id: std::string::String,
83422
83423    /// Output only. Content filter results for a prompt sent in the request.
83424    /// Note: Sent only in the first stream chunk.
83425    /// Only happens when no candidates were generated due to content violations.
83426    pub prompt_feedback:
83427        std::option::Option<crate::model::generate_content_response::PromptFeedback>,
83428
83429    /// Usage metadata about the response(s).
83430    pub usage_metadata: std::option::Option<crate::model::generate_content_response::UsageMetadata>,
83431
83432    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
83433}
83434
83435#[cfg(feature = "prediction-service")]
83436impl GenerateContentResponse {
83437    pub fn new() -> Self {
83438        std::default::Default::default()
83439    }
83440
83441    /// Sets the value of [candidates][crate::model::GenerateContentResponse::candidates].
83442    pub fn set_candidates<T, V>(mut self, v: T) -> Self
83443    where
83444        T: std::iter::IntoIterator<Item = V>,
83445        V: std::convert::Into<crate::model::Candidate>,
83446    {
83447        use std::iter::Iterator;
83448        self.candidates = v.into_iter().map(|i| i.into()).collect();
83449        self
83450    }
83451
83452    /// Sets the value of [model_version][crate::model::GenerateContentResponse::model_version].
83453    pub fn set_model_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
83454        self.model_version = v.into();
83455        self
83456    }
83457
83458    /// Sets the value of [create_time][crate::model::GenerateContentResponse::create_time].
83459    pub fn set_create_time<T>(mut self, v: T) -> Self
83460    where
83461        T: std::convert::Into<wkt::Timestamp>,
83462    {
83463        self.create_time = std::option::Option::Some(v.into());
83464        self
83465    }
83466
83467    /// Sets or clears the value of [create_time][crate::model::GenerateContentResponse::create_time].
83468    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
83469    where
83470        T: std::convert::Into<wkt::Timestamp>,
83471    {
83472        self.create_time = v.map(|x| x.into());
83473        self
83474    }
83475
83476    /// Sets the value of [response_id][crate::model::GenerateContentResponse::response_id].
83477    pub fn set_response_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
83478        self.response_id = v.into();
83479        self
83480    }
83481
83482    /// Sets the value of [prompt_feedback][crate::model::GenerateContentResponse::prompt_feedback].
83483    pub fn set_prompt_feedback<T>(mut self, v: T) -> Self
83484    where
83485        T: std::convert::Into<crate::model::generate_content_response::PromptFeedback>,
83486    {
83487        self.prompt_feedback = std::option::Option::Some(v.into());
83488        self
83489    }
83490
83491    /// Sets or clears the value of [prompt_feedback][crate::model::GenerateContentResponse::prompt_feedback].
83492    pub fn set_or_clear_prompt_feedback<T>(mut self, v: std::option::Option<T>) -> Self
83493    where
83494        T: std::convert::Into<crate::model::generate_content_response::PromptFeedback>,
83495    {
83496        self.prompt_feedback = v.map(|x| x.into());
83497        self
83498    }
83499
83500    /// Sets the value of [usage_metadata][crate::model::GenerateContentResponse::usage_metadata].
83501    pub fn set_usage_metadata<T>(mut self, v: T) -> Self
83502    where
83503        T: std::convert::Into<crate::model::generate_content_response::UsageMetadata>,
83504    {
83505        self.usage_metadata = std::option::Option::Some(v.into());
83506        self
83507    }
83508
83509    /// Sets or clears the value of [usage_metadata][crate::model::GenerateContentResponse::usage_metadata].
83510    pub fn set_or_clear_usage_metadata<T>(mut self, v: std::option::Option<T>) -> Self
83511    where
83512        T: std::convert::Into<crate::model::generate_content_response::UsageMetadata>,
83513    {
83514        self.usage_metadata = v.map(|x| x.into());
83515        self
83516    }
83517}
83518
83519#[cfg(feature = "prediction-service")]
83520impl wkt::message::Message for GenerateContentResponse {
83521    fn typename() -> &'static str {
83522        "type.googleapis.com/google.cloud.aiplatform.v1.GenerateContentResponse"
83523    }
83524}
83525
83526/// Defines additional types related to [GenerateContentResponse].
83527#[cfg(feature = "prediction-service")]
83528pub mod generate_content_response {
83529    #[allow(unused_imports)]
83530    use super::*;
83531
83532    /// Content filter results for a prompt sent in the request.
83533    #[cfg(feature = "prediction-service")]
83534    #[derive(Clone, Default, PartialEq)]
83535    #[non_exhaustive]
83536    pub struct PromptFeedback {
83537        /// Output only. Blocked reason.
83538        pub block_reason: crate::model::generate_content_response::prompt_feedback::BlockedReason,
83539
83540        /// Output only. Safety ratings.
83541        pub safety_ratings: std::vec::Vec<crate::model::SafetyRating>,
83542
83543        /// Output only. A readable block reason message.
83544        pub block_reason_message: std::string::String,
83545
83546        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
83547    }
83548
83549    #[cfg(feature = "prediction-service")]
83550    impl PromptFeedback {
83551        pub fn new() -> Self {
83552            std::default::Default::default()
83553        }
83554
83555        /// Sets the value of [block_reason][crate::model::generate_content_response::PromptFeedback::block_reason].
83556        pub fn set_block_reason<
83557            T: std::convert::Into<
83558                    crate::model::generate_content_response::prompt_feedback::BlockedReason,
83559                >,
83560        >(
83561            mut self,
83562            v: T,
83563        ) -> Self {
83564            self.block_reason = v.into();
83565            self
83566        }
83567
83568        /// Sets the value of [safety_ratings][crate::model::generate_content_response::PromptFeedback::safety_ratings].
83569        pub fn set_safety_ratings<T, V>(mut self, v: T) -> Self
83570        where
83571            T: std::iter::IntoIterator<Item = V>,
83572            V: std::convert::Into<crate::model::SafetyRating>,
83573        {
83574            use std::iter::Iterator;
83575            self.safety_ratings = v.into_iter().map(|i| i.into()).collect();
83576            self
83577        }
83578
83579        /// Sets the value of [block_reason_message][crate::model::generate_content_response::PromptFeedback::block_reason_message].
83580        pub fn set_block_reason_message<T: std::convert::Into<std::string::String>>(
83581            mut self,
83582            v: T,
83583        ) -> Self {
83584            self.block_reason_message = v.into();
83585            self
83586        }
83587    }
83588
83589    #[cfg(feature = "prediction-service")]
83590    impl wkt::message::Message for PromptFeedback {
83591        fn typename() -> &'static str {
83592            "type.googleapis.com/google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback"
83593        }
83594    }
83595
83596    /// Defines additional types related to [PromptFeedback].
83597    #[cfg(feature = "prediction-service")]
83598    pub mod prompt_feedback {
83599        #[allow(unused_imports)]
83600        use super::*;
83601
83602        /// Blocked reason enumeration.
83603        ///
83604        /// # Working with unknown values
83605        ///
83606        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
83607        /// additional enum variants at any time. Adding new variants is not considered
83608        /// a breaking change. Applications should write their code in anticipation of:
83609        ///
83610        /// - New values appearing in future releases of the client library, **and**
83611        /// - New values received dynamically, without application changes.
83612        ///
83613        /// Please consult the [Working with enums] section in the user guide for some
83614        /// guidelines.
83615        ///
83616        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
83617        #[cfg(feature = "prediction-service")]
83618        #[derive(Clone, Debug, PartialEq)]
83619        #[non_exhaustive]
83620        pub enum BlockedReason {
83621            /// Unspecified blocked reason.
83622            Unspecified,
83623            /// Candidates blocked due to safety.
83624            Safety,
83625            /// Candidates blocked due to other reason.
83626            Other,
83627            /// Candidates blocked due to the terms which are included from the
83628            /// terminology blocklist.
83629            Blocklist,
83630            /// Candidates blocked due to prohibited content.
83631            ProhibitedContent,
83632            /// The user prompt was blocked by Model Armor.
83633            ModelArmor,
83634            /// If set, the enum was initialized with an unknown value.
83635            ///
83636            /// Applications can examine the value using [BlockedReason::value] or
83637            /// [BlockedReason::name].
83638            UnknownValue(blocked_reason::UnknownValue),
83639        }
83640
83641        #[doc(hidden)]
83642        #[cfg(feature = "prediction-service")]
83643        pub mod blocked_reason {
83644            #[allow(unused_imports)]
83645            use super::*;
83646            #[derive(Clone, Debug, PartialEq)]
83647            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
83648        }
83649
83650        #[cfg(feature = "prediction-service")]
83651        impl BlockedReason {
83652            /// Gets the enum value.
83653            ///
83654            /// Returns `None` if the enum contains an unknown value deserialized from
83655            /// the string representation of enums.
83656            pub fn value(&self) -> std::option::Option<i32> {
83657                match self {
83658                    Self::Unspecified => std::option::Option::Some(0),
83659                    Self::Safety => std::option::Option::Some(1),
83660                    Self::Other => std::option::Option::Some(2),
83661                    Self::Blocklist => std::option::Option::Some(3),
83662                    Self::ProhibitedContent => std::option::Option::Some(4),
83663                    Self::ModelArmor => std::option::Option::Some(5),
83664                    Self::UnknownValue(u) => u.0.value(),
83665                }
83666            }
83667
83668            /// Gets the enum value as a string.
83669            ///
83670            /// Returns `None` if the enum contains an unknown value deserialized from
83671            /// the integer representation of enums.
83672            pub fn name(&self) -> std::option::Option<&str> {
83673                match self {
83674                    Self::Unspecified => std::option::Option::Some("BLOCKED_REASON_UNSPECIFIED"),
83675                    Self::Safety => std::option::Option::Some("SAFETY"),
83676                    Self::Other => std::option::Option::Some("OTHER"),
83677                    Self::Blocklist => std::option::Option::Some("BLOCKLIST"),
83678                    Self::ProhibitedContent => std::option::Option::Some("PROHIBITED_CONTENT"),
83679                    Self::ModelArmor => std::option::Option::Some("MODEL_ARMOR"),
83680                    Self::UnknownValue(u) => u.0.name(),
83681                }
83682            }
83683        }
83684
83685        #[cfg(feature = "prediction-service")]
83686        impl std::default::Default for BlockedReason {
83687            fn default() -> Self {
83688                use std::convert::From;
83689                Self::from(0)
83690            }
83691        }
83692
83693        #[cfg(feature = "prediction-service")]
83694        impl std::fmt::Display for BlockedReason {
83695            fn fmt(
83696                &self,
83697                f: &mut std::fmt::Formatter<'_>,
83698            ) -> std::result::Result<(), std::fmt::Error> {
83699                wkt::internal::display_enum(f, self.name(), self.value())
83700            }
83701        }
83702
83703        #[cfg(feature = "prediction-service")]
83704        impl std::convert::From<i32> for BlockedReason {
83705            fn from(value: i32) -> Self {
83706                match value {
83707                    0 => Self::Unspecified,
83708                    1 => Self::Safety,
83709                    2 => Self::Other,
83710                    3 => Self::Blocklist,
83711                    4 => Self::ProhibitedContent,
83712                    5 => Self::ModelArmor,
83713                    _ => Self::UnknownValue(blocked_reason::UnknownValue(
83714                        wkt::internal::UnknownEnumValue::Integer(value),
83715                    )),
83716                }
83717            }
83718        }
83719
83720        #[cfg(feature = "prediction-service")]
83721        impl std::convert::From<&str> for BlockedReason {
83722            fn from(value: &str) -> Self {
83723                use std::string::ToString;
83724                match value {
83725                    "BLOCKED_REASON_UNSPECIFIED" => Self::Unspecified,
83726                    "SAFETY" => Self::Safety,
83727                    "OTHER" => Self::Other,
83728                    "BLOCKLIST" => Self::Blocklist,
83729                    "PROHIBITED_CONTENT" => Self::ProhibitedContent,
83730                    "MODEL_ARMOR" => Self::ModelArmor,
83731                    _ => Self::UnknownValue(blocked_reason::UnknownValue(
83732                        wkt::internal::UnknownEnumValue::String(value.to_string()),
83733                    )),
83734                }
83735            }
83736        }
83737
83738        #[cfg(feature = "prediction-service")]
83739        impl serde::ser::Serialize for BlockedReason {
83740            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
83741            where
83742                S: serde::Serializer,
83743            {
83744                match self {
83745                    Self::Unspecified => serializer.serialize_i32(0),
83746                    Self::Safety => serializer.serialize_i32(1),
83747                    Self::Other => serializer.serialize_i32(2),
83748                    Self::Blocklist => serializer.serialize_i32(3),
83749                    Self::ProhibitedContent => serializer.serialize_i32(4),
83750                    Self::ModelArmor => serializer.serialize_i32(5),
83751                    Self::UnknownValue(u) => u.0.serialize(serializer),
83752                }
83753            }
83754        }
83755
83756        #[cfg(feature = "prediction-service")]
83757        impl<'de> serde::de::Deserialize<'de> for BlockedReason {
83758            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
83759            where
83760                D: serde::Deserializer<'de>,
83761            {
83762                deserializer.deserialize_any(wkt::internal::EnumVisitor::<BlockedReason>::new(
83763                    ".google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.BlockedReason"))
83764            }
83765        }
83766    }
83767
83768    /// Usage metadata about response(s).
83769    #[cfg(feature = "prediction-service")]
83770    #[derive(Clone, Default, PartialEq)]
83771    #[non_exhaustive]
83772    pub struct UsageMetadata {
83773        /// Number of tokens in the request. When `cached_content` is set, this is
83774        /// still the total effective prompt size meaning this includes the number of
83775        /// tokens in the cached content.
83776        pub prompt_token_count: i32,
83777
83778        /// Number of tokens in the response(s).
83779        pub candidates_token_count: i32,
83780
83781        /// Output only. Number of tokens present in thoughts output.
83782        pub thoughts_token_count: i32,
83783
83784        /// Total token count for prompt and response candidates.
83785        pub total_token_count: i32,
83786
83787        /// Output only. Number of tokens in the cached part in the input (the cached
83788        /// content).
83789        pub cached_content_token_count: i32,
83790
83791        /// Output only. List of modalities that were processed in the request input.
83792        pub prompt_tokens_details: std::vec::Vec<crate::model::ModalityTokenCount>,
83793
83794        /// Output only. List of modalities of the cached content in the request
83795        /// input.
83796        pub cache_tokens_details: std::vec::Vec<crate::model::ModalityTokenCount>,
83797
83798        /// Output only. List of modalities that were returned in the response.
83799        pub candidates_tokens_details: std::vec::Vec<crate::model::ModalityTokenCount>,
83800
83801        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
83802    }
83803
83804    #[cfg(feature = "prediction-service")]
83805    impl UsageMetadata {
83806        pub fn new() -> Self {
83807            std::default::Default::default()
83808        }
83809
83810        /// Sets the value of [prompt_token_count][crate::model::generate_content_response::UsageMetadata::prompt_token_count].
83811        pub fn set_prompt_token_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
83812            self.prompt_token_count = v.into();
83813            self
83814        }
83815
83816        /// Sets the value of [candidates_token_count][crate::model::generate_content_response::UsageMetadata::candidates_token_count].
83817        pub fn set_candidates_token_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
83818            self.candidates_token_count = v.into();
83819            self
83820        }
83821
83822        /// Sets the value of [thoughts_token_count][crate::model::generate_content_response::UsageMetadata::thoughts_token_count].
83823        pub fn set_thoughts_token_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
83824            self.thoughts_token_count = v.into();
83825            self
83826        }
83827
83828        /// Sets the value of [total_token_count][crate::model::generate_content_response::UsageMetadata::total_token_count].
83829        pub fn set_total_token_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
83830            self.total_token_count = v.into();
83831            self
83832        }
83833
83834        /// Sets the value of [cached_content_token_count][crate::model::generate_content_response::UsageMetadata::cached_content_token_count].
83835        pub fn set_cached_content_token_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
83836            self.cached_content_token_count = v.into();
83837            self
83838        }
83839
83840        /// Sets the value of [prompt_tokens_details][crate::model::generate_content_response::UsageMetadata::prompt_tokens_details].
83841        pub fn set_prompt_tokens_details<T, V>(mut self, v: T) -> Self
83842        where
83843            T: std::iter::IntoIterator<Item = V>,
83844            V: std::convert::Into<crate::model::ModalityTokenCount>,
83845        {
83846            use std::iter::Iterator;
83847            self.prompt_tokens_details = v.into_iter().map(|i| i.into()).collect();
83848            self
83849        }
83850
83851        /// Sets the value of [cache_tokens_details][crate::model::generate_content_response::UsageMetadata::cache_tokens_details].
83852        pub fn set_cache_tokens_details<T, V>(mut self, v: T) -> Self
83853        where
83854            T: std::iter::IntoIterator<Item = V>,
83855            V: std::convert::Into<crate::model::ModalityTokenCount>,
83856        {
83857            use std::iter::Iterator;
83858            self.cache_tokens_details = v.into_iter().map(|i| i.into()).collect();
83859            self
83860        }
83861
83862        /// Sets the value of [candidates_tokens_details][crate::model::generate_content_response::UsageMetadata::candidates_tokens_details].
83863        pub fn set_candidates_tokens_details<T, V>(mut self, v: T) -> Self
83864        where
83865            T: std::iter::IntoIterator<Item = V>,
83866            V: std::convert::Into<crate::model::ModalityTokenCount>,
83867        {
83868            use std::iter::Iterator;
83869            self.candidates_tokens_details = v.into_iter().map(|i| i.into()).collect();
83870            self
83871        }
83872    }
83873
83874    #[cfg(feature = "prediction-service")]
83875    impl wkt::message::Message for UsageMetadata {
83876        fn typename() -> &'static str {
83877            "type.googleapis.com/google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata"
83878        }
83879    }
83880}
83881
83882/// A Model Garden Publisher Model.
83883#[cfg(feature = "model-garden-service")]
83884#[derive(Clone, Default, PartialEq)]
83885#[non_exhaustive]
83886pub struct PublisherModel {
83887    /// Output only. The resource name of the PublisherModel.
83888    pub name: std::string::String,
83889
83890    /// Output only. Immutable. The version ID of the PublisherModel.
83891    /// A new version is committed when a new model version is uploaded under an
83892    /// existing model id. It is an auto-incrementing decimal number in string
83893    /// representation.
83894    pub version_id: std::string::String,
83895
83896    /// Required. Indicates the open source category of the publisher model.
83897    pub open_source_category: crate::model::publisher_model::OpenSourceCategory,
83898
83899    /// Optional. Supported call-to-action options.
83900    pub supported_actions: std::option::Option<crate::model::publisher_model::CallToAction>,
83901
83902    /// Optional. Additional information about the model's Frameworks.
83903    pub frameworks: std::vec::Vec<std::string::String>,
83904
83905    /// Optional. Indicates the launch stage of the model.
83906    pub launch_stage: crate::model::publisher_model::LaunchStage,
83907
83908    /// Optional. Indicates the state of the model version.
83909    pub version_state: crate::model::publisher_model::VersionState,
83910
83911    /// Optional. Output only. Immutable. Used to indicate this model has a
83912    /// publisher model and provide the template of the publisher model resource
83913    /// name.
83914    pub publisher_model_template: std::string::String,
83915
83916    /// Optional. The schemata that describes formats of the PublisherModel's
83917    /// predictions and explanations as given and returned via
83918    /// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict].
83919    ///
83920    /// [google.cloud.aiplatform.v1.PredictionService.Predict]: crate::client::PredictionService::predict
83921    pub predict_schemata: std::option::Option<crate::model::PredictSchemata>,
83922
83923    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
83924}
83925
83926#[cfg(feature = "model-garden-service")]
83927impl PublisherModel {
83928    pub fn new() -> Self {
83929        std::default::Default::default()
83930    }
83931
83932    /// Sets the value of [name][crate::model::PublisherModel::name].
83933    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
83934        self.name = v.into();
83935        self
83936    }
83937
83938    /// Sets the value of [version_id][crate::model::PublisherModel::version_id].
83939    pub fn set_version_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
83940        self.version_id = v.into();
83941        self
83942    }
83943
83944    /// Sets the value of [open_source_category][crate::model::PublisherModel::open_source_category].
83945    pub fn set_open_source_category<
83946        T: std::convert::Into<crate::model::publisher_model::OpenSourceCategory>,
83947    >(
83948        mut self,
83949        v: T,
83950    ) -> Self {
83951        self.open_source_category = v.into();
83952        self
83953    }
83954
83955    /// Sets the value of [supported_actions][crate::model::PublisherModel::supported_actions].
83956    pub fn set_supported_actions<T>(mut self, v: T) -> Self
83957    where
83958        T: std::convert::Into<crate::model::publisher_model::CallToAction>,
83959    {
83960        self.supported_actions = std::option::Option::Some(v.into());
83961        self
83962    }
83963
83964    /// Sets or clears the value of [supported_actions][crate::model::PublisherModel::supported_actions].
83965    pub fn set_or_clear_supported_actions<T>(mut self, v: std::option::Option<T>) -> Self
83966    where
83967        T: std::convert::Into<crate::model::publisher_model::CallToAction>,
83968    {
83969        self.supported_actions = v.map(|x| x.into());
83970        self
83971    }
83972
83973    /// Sets the value of [frameworks][crate::model::PublisherModel::frameworks].
83974    pub fn set_frameworks<T, V>(mut self, v: T) -> Self
83975    where
83976        T: std::iter::IntoIterator<Item = V>,
83977        V: std::convert::Into<std::string::String>,
83978    {
83979        use std::iter::Iterator;
83980        self.frameworks = v.into_iter().map(|i| i.into()).collect();
83981        self
83982    }
83983
83984    /// Sets the value of [launch_stage][crate::model::PublisherModel::launch_stage].
83985    pub fn set_launch_stage<T: std::convert::Into<crate::model::publisher_model::LaunchStage>>(
83986        mut self,
83987        v: T,
83988    ) -> Self {
83989        self.launch_stage = v.into();
83990        self
83991    }
83992
83993    /// Sets the value of [version_state][crate::model::PublisherModel::version_state].
83994    pub fn set_version_state<T: std::convert::Into<crate::model::publisher_model::VersionState>>(
83995        mut self,
83996        v: T,
83997    ) -> Self {
83998        self.version_state = v.into();
83999        self
84000    }
84001
84002    /// Sets the value of [publisher_model_template][crate::model::PublisherModel::publisher_model_template].
84003    pub fn set_publisher_model_template<T: std::convert::Into<std::string::String>>(
84004        mut self,
84005        v: T,
84006    ) -> Self {
84007        self.publisher_model_template = v.into();
84008        self
84009    }
84010
84011    /// Sets the value of [predict_schemata][crate::model::PublisherModel::predict_schemata].
84012    pub fn set_predict_schemata<T>(mut self, v: T) -> Self
84013    where
84014        T: std::convert::Into<crate::model::PredictSchemata>,
84015    {
84016        self.predict_schemata = std::option::Option::Some(v.into());
84017        self
84018    }
84019
84020    /// Sets or clears the value of [predict_schemata][crate::model::PublisherModel::predict_schemata].
84021    pub fn set_or_clear_predict_schemata<T>(mut self, v: std::option::Option<T>) -> Self
84022    where
84023        T: std::convert::Into<crate::model::PredictSchemata>,
84024    {
84025        self.predict_schemata = v.map(|x| x.into());
84026        self
84027    }
84028}
84029
84030#[cfg(feature = "model-garden-service")]
84031impl wkt::message::Message for PublisherModel {
84032    fn typename() -> &'static str {
84033        "type.googleapis.com/google.cloud.aiplatform.v1.PublisherModel"
84034    }
84035}
84036
84037/// Defines additional types related to [PublisherModel].
84038#[cfg(feature = "model-garden-service")]
84039pub mod publisher_model {
84040    #[allow(unused_imports)]
84041    use super::*;
84042
84043    /// Reference to a resource.
84044    #[cfg(feature = "model-garden-service")]
84045    #[derive(Clone, Default, PartialEq)]
84046    #[non_exhaustive]
84047    pub struct ResourceReference {
84048        pub reference:
84049            std::option::Option<crate::model::publisher_model::resource_reference::Reference>,
84050
84051        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
84052    }
84053
84054    #[cfg(feature = "model-garden-service")]
84055    impl ResourceReference {
84056        pub fn new() -> Self {
84057            std::default::Default::default()
84058        }
84059
84060        /// Sets the value of [reference][crate::model::publisher_model::ResourceReference::reference].
84061        ///
84062        /// Note that all the setters affecting `reference` are mutually
84063        /// exclusive.
84064        pub fn set_reference<
84065            T: std::convert::Into<
84066                    std::option::Option<
84067                        crate::model::publisher_model::resource_reference::Reference,
84068                    >,
84069                >,
84070        >(
84071            mut self,
84072            v: T,
84073        ) -> Self {
84074            self.reference = v.into();
84075            self
84076        }
84077
84078        /// The value of [reference][crate::model::publisher_model::ResourceReference::reference]
84079        /// if it holds a `Uri`, `None` if the field is not set or
84080        /// holds a different branch.
84081        pub fn uri(&self) -> std::option::Option<&std::string::String> {
84082            #[allow(unreachable_patterns)]
84083            self.reference.as_ref().and_then(|v| match v {
84084                crate::model::publisher_model::resource_reference::Reference::Uri(v) => {
84085                    std::option::Option::Some(v)
84086                }
84087                _ => std::option::Option::None,
84088            })
84089        }
84090
84091        /// Sets the value of [reference][crate::model::publisher_model::ResourceReference::reference]
84092        /// to hold a `Uri`.
84093        ///
84094        /// Note that all the setters affecting `reference` are
84095        /// mutually exclusive.
84096        pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
84097            self.reference = std::option::Option::Some(
84098                crate::model::publisher_model::resource_reference::Reference::Uri(v.into()),
84099            );
84100            self
84101        }
84102
84103        /// The value of [reference][crate::model::publisher_model::ResourceReference::reference]
84104        /// if it holds a `ResourceName`, `None` if the field is not set or
84105        /// holds a different branch.
84106        pub fn resource_name(&self) -> std::option::Option<&std::string::String> {
84107            #[allow(unreachable_patterns)]
84108            self.reference.as_ref().and_then(|v| match v {
84109                crate::model::publisher_model::resource_reference::Reference::ResourceName(v) => {
84110                    std::option::Option::Some(v)
84111                }
84112                _ => std::option::Option::None,
84113            })
84114        }
84115
84116        /// Sets the value of [reference][crate::model::publisher_model::ResourceReference::reference]
84117        /// to hold a `ResourceName`.
84118        ///
84119        /// Note that all the setters affecting `reference` are
84120        /// mutually exclusive.
84121        pub fn set_resource_name<T: std::convert::Into<std::string::String>>(
84122            mut self,
84123            v: T,
84124        ) -> Self {
84125            self.reference = std::option::Option::Some(
84126                crate::model::publisher_model::resource_reference::Reference::ResourceName(
84127                    v.into(),
84128                ),
84129            );
84130            self
84131        }
84132
84133        /// The value of [reference][crate::model::publisher_model::ResourceReference::reference]
84134        /// if it holds a `UseCase`, `None` if the field is not set or
84135        /// holds a different branch.
84136        #[deprecated]
84137        pub fn use_case(&self) -> std::option::Option<&std::string::String> {
84138            #[allow(unreachable_patterns)]
84139            self.reference.as_ref().and_then(|v| match v {
84140                crate::model::publisher_model::resource_reference::Reference::UseCase(v) => {
84141                    std::option::Option::Some(v)
84142                }
84143                _ => std::option::Option::None,
84144            })
84145        }
84146
84147        /// Sets the value of [reference][crate::model::publisher_model::ResourceReference::reference]
84148        /// to hold a `UseCase`.
84149        ///
84150        /// Note that all the setters affecting `reference` are
84151        /// mutually exclusive.
84152        #[deprecated]
84153        pub fn set_use_case<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
84154            self.reference = std::option::Option::Some(
84155                crate::model::publisher_model::resource_reference::Reference::UseCase(v.into()),
84156            );
84157            self
84158        }
84159
84160        /// The value of [reference][crate::model::publisher_model::ResourceReference::reference]
84161        /// if it holds a `Description`, `None` if the field is not set or
84162        /// holds a different branch.
84163        #[deprecated]
84164        pub fn description(&self) -> std::option::Option<&std::string::String> {
84165            #[allow(unreachable_patterns)]
84166            self.reference.as_ref().and_then(|v| match v {
84167                crate::model::publisher_model::resource_reference::Reference::Description(v) => {
84168                    std::option::Option::Some(v)
84169                }
84170                _ => std::option::Option::None,
84171            })
84172        }
84173
84174        /// Sets the value of [reference][crate::model::publisher_model::ResourceReference::reference]
84175        /// to hold a `Description`.
84176        ///
84177        /// Note that all the setters affecting `reference` are
84178        /// mutually exclusive.
84179        #[deprecated]
84180        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
84181            self.reference = std::option::Option::Some(
84182                crate::model::publisher_model::resource_reference::Reference::Description(v.into()),
84183            );
84184            self
84185        }
84186    }
84187
84188    #[cfg(feature = "model-garden-service")]
84189    impl wkt::message::Message for ResourceReference {
84190        fn typename() -> &'static str {
84191            "type.googleapis.com/google.cloud.aiplatform.v1.PublisherModel.ResourceReference"
84192        }
84193    }
84194
84195    /// Defines additional types related to [ResourceReference].
84196    #[cfg(feature = "model-garden-service")]
84197    pub mod resource_reference {
84198        #[allow(unused_imports)]
84199        use super::*;
84200
84201        #[cfg(feature = "model-garden-service")]
84202        #[derive(Clone, Debug, PartialEq)]
84203        #[non_exhaustive]
84204        pub enum Reference {
84205            /// The URI of the resource.
84206            Uri(std::string::String),
84207            /// The resource name of the Google Cloud resource.
84208            ResourceName(std::string::String),
84209            /// Use case (CUJ) of the resource.
84210            #[deprecated]
84211            UseCase(std::string::String),
84212            /// Description of the resource.
84213            #[deprecated]
84214            Description(std::string::String),
84215        }
84216    }
84217
84218    /// A named piece of documentation.
84219    #[cfg(feature = "model-garden-service")]
84220    #[derive(Clone, Default, PartialEq)]
84221    #[non_exhaustive]
84222    pub struct Documentation {
84223        /// Required. E.g., OVERVIEW, USE CASES, DOCUMENTATION, SDK & SAMPLES, JAVA,
84224        /// NODE.JS, etc..
84225        pub title: std::string::String,
84226
84227        /// Required. Content of this piece of document (in Markdown format).
84228        pub content: std::string::String,
84229
84230        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
84231    }
84232
84233    #[cfg(feature = "model-garden-service")]
84234    impl Documentation {
84235        pub fn new() -> Self {
84236            std::default::Default::default()
84237        }
84238
84239        /// Sets the value of [title][crate::model::publisher_model::Documentation::title].
84240        pub fn set_title<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
84241            self.title = v.into();
84242            self
84243        }
84244
84245        /// Sets the value of [content][crate::model::publisher_model::Documentation::content].
84246        pub fn set_content<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
84247            self.content = v.into();
84248            self
84249        }
84250    }
84251
84252    #[cfg(feature = "model-garden-service")]
84253    impl wkt::message::Message for Documentation {
84254        fn typename() -> &'static str {
84255            "type.googleapis.com/google.cloud.aiplatform.v1.PublisherModel.Documentation"
84256        }
84257    }
84258
84259    /// Actions could take on this Publisher Model.
84260    #[cfg(feature = "model-garden-service")]
84261    #[derive(Clone, Default, PartialEq)]
84262    #[non_exhaustive]
84263    pub struct CallToAction {
84264        /// Optional. To view Rest API docs.
84265        pub view_rest_api:
84266            std::option::Option<crate::model::publisher_model::call_to_action::ViewRestApi>,
84267
84268        /// Optional. Open notebook of the PublisherModel.
84269        pub open_notebook: std::option::Option<
84270            crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84271        >,
84272
84273        /// Optional. Open notebooks of the PublisherModel.
84274        pub open_notebooks:
84275            std::option::Option<crate::model::publisher_model::call_to_action::OpenNotebooks>,
84276
84277        /// Optional. Create application using the PublisherModel.
84278        pub create_application: std::option::Option<
84279            crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84280        >,
84281
84282        /// Optional. Open fine-tuning pipeline of the PublisherModel.
84283        pub open_fine_tuning_pipeline: std::option::Option<
84284            crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84285        >,
84286
84287        /// Optional. Open fine-tuning pipelines of the PublisherModel.
84288        pub open_fine_tuning_pipelines: std::option::Option<
84289            crate::model::publisher_model::call_to_action::OpenFineTuningPipelines,
84290        >,
84291
84292        /// Optional. Open prompt-tuning pipeline of the PublisherModel.
84293        pub open_prompt_tuning_pipeline: std::option::Option<
84294            crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84295        >,
84296
84297        /// Optional. Open Genie / Playground.
84298        pub open_genie: std::option::Option<
84299            crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84300        >,
84301
84302        /// Optional. Deploy the PublisherModel to Vertex Endpoint.
84303        pub deploy: std::option::Option<crate::model::publisher_model::call_to_action::Deploy>,
84304
84305        /// Optional. Deploy PublisherModel to Google Kubernetes Engine.
84306        pub deploy_gke:
84307            std::option::Option<crate::model::publisher_model::call_to_action::DeployGke>,
84308
84309        /// Optional. Open in Generation AI Studio.
84310        pub open_generation_ai_studio: std::option::Option<
84311            crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84312        >,
84313
84314        /// Optional. Request for access.
84315        pub request_access: std::option::Option<
84316            crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84317        >,
84318
84319        /// Optional. Open evaluation pipeline of the PublisherModel.
84320        pub open_evaluation_pipeline: std::option::Option<
84321            crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84322        >,
84323
84324        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
84325    }
84326
84327    #[cfg(feature = "model-garden-service")]
84328    impl CallToAction {
84329        pub fn new() -> Self {
84330            std::default::Default::default()
84331        }
84332
84333        /// Sets the value of [view_rest_api][crate::model::publisher_model::CallToAction::view_rest_api].
84334        pub fn set_view_rest_api<T>(mut self, v: T) -> Self
84335        where
84336            T: std::convert::Into<crate::model::publisher_model::call_to_action::ViewRestApi>,
84337        {
84338            self.view_rest_api = std::option::Option::Some(v.into());
84339            self
84340        }
84341
84342        /// Sets or clears the value of [view_rest_api][crate::model::publisher_model::CallToAction::view_rest_api].
84343        pub fn set_or_clear_view_rest_api<T>(mut self, v: std::option::Option<T>) -> Self
84344        where
84345            T: std::convert::Into<crate::model::publisher_model::call_to_action::ViewRestApi>,
84346        {
84347            self.view_rest_api = v.map(|x| x.into());
84348            self
84349        }
84350
84351        /// Sets the value of [open_notebook][crate::model::publisher_model::CallToAction::open_notebook].
84352        pub fn set_open_notebook<T>(mut self, v: T) -> Self
84353        where
84354            T: std::convert::Into<
84355                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84356                >,
84357        {
84358            self.open_notebook = std::option::Option::Some(v.into());
84359            self
84360        }
84361
84362        /// Sets or clears the value of [open_notebook][crate::model::publisher_model::CallToAction::open_notebook].
84363        pub fn set_or_clear_open_notebook<T>(mut self, v: std::option::Option<T>) -> Self
84364        where
84365            T: std::convert::Into<
84366                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84367                >,
84368        {
84369            self.open_notebook = v.map(|x| x.into());
84370            self
84371        }
84372
84373        /// Sets the value of [open_notebooks][crate::model::publisher_model::CallToAction::open_notebooks].
84374        pub fn set_open_notebooks<T>(mut self, v: T) -> Self
84375        where
84376            T: std::convert::Into<crate::model::publisher_model::call_to_action::OpenNotebooks>,
84377        {
84378            self.open_notebooks = std::option::Option::Some(v.into());
84379            self
84380        }
84381
84382        /// Sets or clears the value of [open_notebooks][crate::model::publisher_model::CallToAction::open_notebooks].
84383        pub fn set_or_clear_open_notebooks<T>(mut self, v: std::option::Option<T>) -> Self
84384        where
84385            T: std::convert::Into<crate::model::publisher_model::call_to_action::OpenNotebooks>,
84386        {
84387            self.open_notebooks = v.map(|x| x.into());
84388            self
84389        }
84390
84391        /// Sets the value of [create_application][crate::model::publisher_model::CallToAction::create_application].
84392        pub fn set_create_application<T>(mut self, v: T) -> Self
84393        where
84394            T: std::convert::Into<
84395                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84396                >,
84397        {
84398            self.create_application = std::option::Option::Some(v.into());
84399            self
84400        }
84401
84402        /// Sets or clears the value of [create_application][crate::model::publisher_model::CallToAction::create_application].
84403        pub fn set_or_clear_create_application<T>(mut self, v: std::option::Option<T>) -> Self
84404        where
84405            T: std::convert::Into<
84406                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84407                >,
84408        {
84409            self.create_application = v.map(|x| x.into());
84410            self
84411        }
84412
84413        /// Sets the value of [open_fine_tuning_pipeline][crate::model::publisher_model::CallToAction::open_fine_tuning_pipeline].
84414        pub fn set_open_fine_tuning_pipeline<T>(mut self, v: T) -> Self
84415        where
84416            T: std::convert::Into<
84417                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84418                >,
84419        {
84420            self.open_fine_tuning_pipeline = std::option::Option::Some(v.into());
84421            self
84422        }
84423
84424        /// Sets or clears the value of [open_fine_tuning_pipeline][crate::model::publisher_model::CallToAction::open_fine_tuning_pipeline].
84425        pub fn set_or_clear_open_fine_tuning_pipeline<T>(
84426            mut self,
84427            v: std::option::Option<T>,
84428        ) -> Self
84429        where
84430            T: std::convert::Into<
84431                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84432                >,
84433        {
84434            self.open_fine_tuning_pipeline = v.map(|x| x.into());
84435            self
84436        }
84437
84438        /// Sets the value of [open_fine_tuning_pipelines][crate::model::publisher_model::CallToAction::open_fine_tuning_pipelines].
84439        pub fn set_open_fine_tuning_pipelines<T>(mut self, v: T) -> Self
84440        where
84441            T: std::convert::Into<
84442                    crate::model::publisher_model::call_to_action::OpenFineTuningPipelines,
84443                >,
84444        {
84445            self.open_fine_tuning_pipelines = std::option::Option::Some(v.into());
84446            self
84447        }
84448
84449        /// Sets or clears the value of [open_fine_tuning_pipelines][crate::model::publisher_model::CallToAction::open_fine_tuning_pipelines].
84450        pub fn set_or_clear_open_fine_tuning_pipelines<T>(
84451            mut self,
84452            v: std::option::Option<T>,
84453        ) -> Self
84454        where
84455            T: std::convert::Into<
84456                    crate::model::publisher_model::call_to_action::OpenFineTuningPipelines,
84457                >,
84458        {
84459            self.open_fine_tuning_pipelines = v.map(|x| x.into());
84460            self
84461        }
84462
84463        /// Sets the value of [open_prompt_tuning_pipeline][crate::model::publisher_model::CallToAction::open_prompt_tuning_pipeline].
84464        pub fn set_open_prompt_tuning_pipeline<T>(mut self, v: T) -> Self
84465        where
84466            T: std::convert::Into<
84467                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84468                >,
84469        {
84470            self.open_prompt_tuning_pipeline = std::option::Option::Some(v.into());
84471            self
84472        }
84473
84474        /// Sets or clears the value of [open_prompt_tuning_pipeline][crate::model::publisher_model::CallToAction::open_prompt_tuning_pipeline].
84475        pub fn set_or_clear_open_prompt_tuning_pipeline<T>(
84476            mut self,
84477            v: std::option::Option<T>,
84478        ) -> Self
84479        where
84480            T: std::convert::Into<
84481                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84482                >,
84483        {
84484            self.open_prompt_tuning_pipeline = v.map(|x| x.into());
84485            self
84486        }
84487
84488        /// Sets the value of [open_genie][crate::model::publisher_model::CallToAction::open_genie].
84489        pub fn set_open_genie<T>(mut self, v: T) -> Self
84490        where
84491            T: std::convert::Into<
84492                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84493                >,
84494        {
84495            self.open_genie = std::option::Option::Some(v.into());
84496            self
84497        }
84498
84499        /// Sets or clears the value of [open_genie][crate::model::publisher_model::CallToAction::open_genie].
84500        pub fn set_or_clear_open_genie<T>(mut self, v: std::option::Option<T>) -> Self
84501        where
84502            T: std::convert::Into<
84503                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84504                >,
84505        {
84506            self.open_genie = v.map(|x| x.into());
84507            self
84508        }
84509
84510        /// Sets the value of [deploy][crate::model::publisher_model::CallToAction::deploy].
84511        pub fn set_deploy<T>(mut self, v: T) -> Self
84512        where
84513            T: std::convert::Into<crate::model::publisher_model::call_to_action::Deploy>,
84514        {
84515            self.deploy = std::option::Option::Some(v.into());
84516            self
84517        }
84518
84519        /// Sets or clears the value of [deploy][crate::model::publisher_model::CallToAction::deploy].
84520        pub fn set_or_clear_deploy<T>(mut self, v: std::option::Option<T>) -> Self
84521        where
84522            T: std::convert::Into<crate::model::publisher_model::call_to_action::Deploy>,
84523        {
84524            self.deploy = v.map(|x| x.into());
84525            self
84526        }
84527
84528        /// Sets the value of [deploy_gke][crate::model::publisher_model::CallToAction::deploy_gke].
84529        pub fn set_deploy_gke<T>(mut self, v: T) -> Self
84530        where
84531            T: std::convert::Into<crate::model::publisher_model::call_to_action::DeployGke>,
84532        {
84533            self.deploy_gke = std::option::Option::Some(v.into());
84534            self
84535        }
84536
84537        /// Sets or clears the value of [deploy_gke][crate::model::publisher_model::CallToAction::deploy_gke].
84538        pub fn set_or_clear_deploy_gke<T>(mut self, v: std::option::Option<T>) -> Self
84539        where
84540            T: std::convert::Into<crate::model::publisher_model::call_to_action::DeployGke>,
84541        {
84542            self.deploy_gke = v.map(|x| x.into());
84543            self
84544        }
84545
84546        /// Sets the value of [open_generation_ai_studio][crate::model::publisher_model::CallToAction::open_generation_ai_studio].
84547        pub fn set_open_generation_ai_studio<T>(mut self, v: T) -> Self
84548        where
84549            T: std::convert::Into<
84550                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84551                >,
84552        {
84553            self.open_generation_ai_studio = std::option::Option::Some(v.into());
84554            self
84555        }
84556
84557        /// Sets or clears the value of [open_generation_ai_studio][crate::model::publisher_model::CallToAction::open_generation_ai_studio].
84558        pub fn set_or_clear_open_generation_ai_studio<T>(
84559            mut self,
84560            v: std::option::Option<T>,
84561        ) -> Self
84562        where
84563            T: std::convert::Into<
84564                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84565                >,
84566        {
84567            self.open_generation_ai_studio = v.map(|x| x.into());
84568            self
84569        }
84570
84571        /// Sets the value of [request_access][crate::model::publisher_model::CallToAction::request_access].
84572        pub fn set_request_access<T>(mut self, v: T) -> Self
84573        where
84574            T: std::convert::Into<
84575                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84576                >,
84577        {
84578            self.request_access = std::option::Option::Some(v.into());
84579            self
84580        }
84581
84582        /// Sets or clears the value of [request_access][crate::model::publisher_model::CallToAction::request_access].
84583        pub fn set_or_clear_request_access<T>(mut self, v: std::option::Option<T>) -> Self
84584        where
84585            T: std::convert::Into<
84586                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84587                >,
84588        {
84589            self.request_access = v.map(|x| x.into());
84590            self
84591        }
84592
84593        /// Sets the value of [open_evaluation_pipeline][crate::model::publisher_model::CallToAction::open_evaluation_pipeline].
84594        pub fn set_open_evaluation_pipeline<T>(mut self, v: T) -> Self
84595        where
84596            T: std::convert::Into<
84597                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84598                >,
84599        {
84600            self.open_evaluation_pipeline = std::option::Option::Some(v.into());
84601            self
84602        }
84603
84604        /// Sets or clears the value of [open_evaluation_pipeline][crate::model::publisher_model::CallToAction::open_evaluation_pipeline].
84605        pub fn set_or_clear_open_evaluation_pipeline<T>(mut self, v: std::option::Option<T>) -> Self
84606        where
84607            T: std::convert::Into<
84608                    crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84609                >,
84610        {
84611            self.open_evaluation_pipeline = v.map(|x| x.into());
84612            self
84613        }
84614    }
84615
84616    #[cfg(feature = "model-garden-service")]
84617    impl wkt::message::Message for CallToAction {
84618        fn typename() -> &'static str {
84619            "type.googleapis.com/google.cloud.aiplatform.v1.PublisherModel.CallToAction"
84620        }
84621    }
84622
84623    /// Defines additional types related to [CallToAction].
84624    #[cfg(feature = "model-garden-service")]
84625    pub mod call_to_action {
84626        #[allow(unused_imports)]
84627        use super::*;
84628
84629        /// The regional resource name or the URI. Key is region, e.g.,
84630        /// us-central1, europe-west2, global, etc..
84631        #[cfg(feature = "model-garden-service")]
84632        #[derive(Clone, Default, PartialEq)]
84633        #[non_exhaustive]
84634        pub struct RegionalResourceReferences {
84635            /// Required.
84636            pub references: std::collections::HashMap<
84637                std::string::String,
84638                crate::model::publisher_model::ResourceReference,
84639            >,
84640
84641            /// Required.
84642            pub title: std::string::String,
84643
84644            /// Optional. Title of the resource.
84645            pub resource_title: std::option::Option<std::string::String>,
84646
84647            /// Optional. Use case (CUJ) of the resource.
84648            pub resource_use_case: std::option::Option<std::string::String>,
84649
84650            /// Optional. Description of the resource.
84651            pub resource_description: std::option::Option<std::string::String>,
84652
84653            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
84654        }
84655
84656        #[cfg(feature = "model-garden-service")]
84657        impl RegionalResourceReferences {
84658            pub fn new() -> Self {
84659                std::default::Default::default()
84660            }
84661
84662            /// Sets the value of [references][crate::model::publisher_model::call_to_action::RegionalResourceReferences::references].
84663            pub fn set_references<T, K, V>(mut self, v: T) -> Self
84664            where
84665                T: std::iter::IntoIterator<Item = (K, V)>,
84666                K: std::convert::Into<std::string::String>,
84667                V: std::convert::Into<crate::model::publisher_model::ResourceReference>,
84668            {
84669                use std::iter::Iterator;
84670                self.references = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
84671                self
84672            }
84673
84674            /// Sets the value of [title][crate::model::publisher_model::call_to_action::RegionalResourceReferences::title].
84675            pub fn set_title<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
84676                self.title = v.into();
84677                self
84678            }
84679
84680            /// Sets the value of [resource_title][crate::model::publisher_model::call_to_action::RegionalResourceReferences::resource_title].
84681            pub fn set_resource_title<T>(mut self, v: T) -> Self
84682            where
84683                T: std::convert::Into<std::string::String>,
84684            {
84685                self.resource_title = std::option::Option::Some(v.into());
84686                self
84687            }
84688
84689            /// Sets or clears the value of [resource_title][crate::model::publisher_model::call_to_action::RegionalResourceReferences::resource_title].
84690            pub fn set_or_clear_resource_title<T>(mut self, v: std::option::Option<T>) -> Self
84691            where
84692                T: std::convert::Into<std::string::String>,
84693            {
84694                self.resource_title = v.map(|x| x.into());
84695                self
84696            }
84697
84698            /// Sets the value of [resource_use_case][crate::model::publisher_model::call_to_action::RegionalResourceReferences::resource_use_case].
84699            pub fn set_resource_use_case<T>(mut self, v: T) -> Self
84700            where
84701                T: std::convert::Into<std::string::String>,
84702            {
84703                self.resource_use_case = std::option::Option::Some(v.into());
84704                self
84705            }
84706
84707            /// Sets or clears the value of [resource_use_case][crate::model::publisher_model::call_to_action::RegionalResourceReferences::resource_use_case].
84708            pub fn set_or_clear_resource_use_case<T>(mut self, v: std::option::Option<T>) -> Self
84709            where
84710                T: std::convert::Into<std::string::String>,
84711            {
84712                self.resource_use_case = v.map(|x| x.into());
84713                self
84714            }
84715
84716            /// Sets the value of [resource_description][crate::model::publisher_model::call_to_action::RegionalResourceReferences::resource_description].
84717            pub fn set_resource_description<T>(mut self, v: T) -> Self
84718            where
84719                T: std::convert::Into<std::string::String>,
84720            {
84721                self.resource_description = std::option::Option::Some(v.into());
84722                self
84723            }
84724
84725            /// Sets or clears the value of [resource_description][crate::model::publisher_model::call_to_action::RegionalResourceReferences::resource_description].
84726            pub fn set_or_clear_resource_description<T>(mut self, v: std::option::Option<T>) -> Self
84727            where
84728                T: std::convert::Into<std::string::String>,
84729            {
84730                self.resource_description = v.map(|x| x.into());
84731                self
84732            }
84733        }
84734
84735        #[cfg(feature = "model-garden-service")]
84736        impl wkt::message::Message for RegionalResourceReferences {
84737            fn typename() -> &'static str {
84738                "type.googleapis.com/google.cloud.aiplatform.v1.PublisherModel.CallToAction.RegionalResourceReferences"
84739            }
84740        }
84741
84742        /// Rest API docs.
84743        #[cfg(feature = "model-garden-service")]
84744        #[derive(Clone, Default, PartialEq)]
84745        #[non_exhaustive]
84746        pub struct ViewRestApi {
84747            /// Required.
84748            pub documentations: std::vec::Vec<crate::model::publisher_model::Documentation>,
84749
84750            /// Required. The title of the view rest API.
84751            pub title: std::string::String,
84752
84753            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
84754        }
84755
84756        #[cfg(feature = "model-garden-service")]
84757        impl ViewRestApi {
84758            pub fn new() -> Self {
84759                std::default::Default::default()
84760            }
84761
84762            /// Sets the value of [documentations][crate::model::publisher_model::call_to_action::ViewRestApi::documentations].
84763            pub fn set_documentations<T, V>(mut self, v: T) -> Self
84764            where
84765                T: std::iter::IntoIterator<Item = V>,
84766                V: std::convert::Into<crate::model::publisher_model::Documentation>,
84767            {
84768                use std::iter::Iterator;
84769                self.documentations = v.into_iter().map(|i| i.into()).collect();
84770                self
84771            }
84772
84773            /// Sets the value of [title][crate::model::publisher_model::call_to_action::ViewRestApi::title].
84774            pub fn set_title<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
84775                self.title = v.into();
84776                self
84777            }
84778        }
84779
84780        #[cfg(feature = "model-garden-service")]
84781        impl wkt::message::Message for ViewRestApi {
84782            fn typename() -> &'static str {
84783                "type.googleapis.com/google.cloud.aiplatform.v1.PublisherModel.CallToAction.ViewRestApi"
84784            }
84785        }
84786
84787        /// Open notebooks.
84788        #[cfg(feature = "model-garden-service")]
84789        #[derive(Clone, Default, PartialEq)]
84790        #[non_exhaustive]
84791        pub struct OpenNotebooks {
84792            /// Required. Regional resource references to notebooks.
84793            pub notebooks: std::vec::Vec<
84794                crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84795            >,
84796
84797            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
84798        }
84799
84800        #[cfg(feature = "model-garden-service")]
84801        impl OpenNotebooks {
84802            pub fn new() -> Self {
84803                std::default::Default::default()
84804            }
84805
84806            /// Sets the value of [notebooks][crate::model::publisher_model::call_to_action::OpenNotebooks::notebooks].
84807            pub fn set_notebooks<T, V>(mut self, v: T) -> Self
84808            where
84809                T: std::iter::IntoIterator<Item = V>,
84810                V: std::convert::Into<
84811                        crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84812                    >,
84813            {
84814                use std::iter::Iterator;
84815                self.notebooks = v.into_iter().map(|i| i.into()).collect();
84816                self
84817            }
84818        }
84819
84820        #[cfg(feature = "model-garden-service")]
84821        impl wkt::message::Message for OpenNotebooks {
84822            fn typename() -> &'static str {
84823                "type.googleapis.com/google.cloud.aiplatform.v1.PublisherModel.CallToAction.OpenNotebooks"
84824            }
84825        }
84826
84827        /// Open fine tuning pipelines.
84828        #[cfg(feature = "model-garden-service")]
84829        #[derive(Clone, Default, PartialEq)]
84830        #[non_exhaustive]
84831        pub struct OpenFineTuningPipelines {
84832            /// Required. Regional resource references to fine tuning pipelines.
84833            pub fine_tuning_pipelines: std::vec::Vec<
84834                crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84835            >,
84836
84837            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
84838        }
84839
84840        #[cfg(feature = "model-garden-service")]
84841        impl OpenFineTuningPipelines {
84842            pub fn new() -> Self {
84843                std::default::Default::default()
84844            }
84845
84846            /// Sets the value of [fine_tuning_pipelines][crate::model::publisher_model::call_to_action::OpenFineTuningPipelines::fine_tuning_pipelines].
84847            pub fn set_fine_tuning_pipelines<T, V>(mut self, v: T) -> Self
84848            where
84849                T: std::iter::IntoIterator<Item = V>,
84850                V: std::convert::Into<
84851                        crate::model::publisher_model::call_to_action::RegionalResourceReferences,
84852                    >,
84853            {
84854                use std::iter::Iterator;
84855                self.fine_tuning_pipelines = v.into_iter().map(|i| i.into()).collect();
84856                self
84857            }
84858        }
84859
84860        #[cfg(feature = "model-garden-service")]
84861        impl wkt::message::Message for OpenFineTuningPipelines {
84862            fn typename() -> &'static str {
84863                "type.googleapis.com/google.cloud.aiplatform.v1.PublisherModel.CallToAction.OpenFineTuningPipelines"
84864            }
84865        }
84866
84867        /// Model metadata that is needed for UploadModel or
84868        /// DeployModel/CreateEndpoint requests.
84869        #[cfg(feature = "model-garden-service")]
84870        #[derive(Clone, Default, PartialEq)]
84871        #[non_exhaustive]
84872        pub struct Deploy {
84873            /// Optional. Default model display name.
84874            pub model_display_name: std::string::String,
84875
84876            /// Optional. Large model reference. When this is set, model_artifact_spec
84877            /// is not needed.
84878            pub large_model_reference: std::option::Option<crate::model::LargeModelReference>,
84879
84880            /// Optional. The specification of the container that is to be used when
84881            /// deploying this Model in Vertex AI. Not present for Large Models.
84882            pub container_spec: std::option::Option<crate::model::ModelContainerSpec>,
84883
84884            /// Optional. The path to the directory containing the Model artifact and
84885            /// any of its supporting files.
84886            pub artifact_uri: std::string::String,
84887
84888            /// Optional. The name of the deploy task (e.g., "text to image
84889            /// generation").
84890            pub deploy_task_name: std::option::Option<std::string::String>,
84891
84892            /// Optional. Metadata information about this deployment config.
84893            pub deploy_metadata: std::option::Option<
84894                crate::model::publisher_model::call_to_action::deploy::DeployMetadata,
84895            >,
84896
84897            /// Required. The title of the regional resource reference.
84898            pub title: std::string::String,
84899
84900            /// Optional. The signed URI for ephemeral Cloud Storage access to model
84901            /// artifact.
84902            pub public_artifact_uri: std::string::String,
84903
84904            /// The prediction (for example, the machine) resources that the
84905            /// DeployedModel uses.
84906            pub prediction_resources: std::option::Option<
84907                crate::model::publisher_model::call_to_action::deploy::PredictionResources,
84908            >,
84909
84910            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
84911        }
84912
84913        #[cfg(feature = "model-garden-service")]
84914        impl Deploy {
84915            pub fn new() -> Self {
84916                std::default::Default::default()
84917            }
84918
84919            /// Sets the value of [model_display_name][crate::model::publisher_model::call_to_action::Deploy::model_display_name].
84920            pub fn set_model_display_name<T: std::convert::Into<std::string::String>>(
84921                mut self,
84922                v: T,
84923            ) -> Self {
84924                self.model_display_name = v.into();
84925                self
84926            }
84927
84928            /// Sets the value of [large_model_reference][crate::model::publisher_model::call_to_action::Deploy::large_model_reference].
84929            pub fn set_large_model_reference<T>(mut self, v: T) -> Self
84930            where
84931                T: std::convert::Into<crate::model::LargeModelReference>,
84932            {
84933                self.large_model_reference = std::option::Option::Some(v.into());
84934                self
84935            }
84936
84937            /// Sets or clears the value of [large_model_reference][crate::model::publisher_model::call_to_action::Deploy::large_model_reference].
84938            pub fn set_or_clear_large_model_reference<T>(
84939                mut self,
84940                v: std::option::Option<T>,
84941            ) -> Self
84942            where
84943                T: std::convert::Into<crate::model::LargeModelReference>,
84944            {
84945                self.large_model_reference = v.map(|x| x.into());
84946                self
84947            }
84948
84949            /// Sets the value of [container_spec][crate::model::publisher_model::call_to_action::Deploy::container_spec].
84950            pub fn set_container_spec<T>(mut self, v: T) -> Self
84951            where
84952                T: std::convert::Into<crate::model::ModelContainerSpec>,
84953            {
84954                self.container_spec = std::option::Option::Some(v.into());
84955                self
84956            }
84957
84958            /// Sets or clears the value of [container_spec][crate::model::publisher_model::call_to_action::Deploy::container_spec].
84959            pub fn set_or_clear_container_spec<T>(mut self, v: std::option::Option<T>) -> Self
84960            where
84961                T: std::convert::Into<crate::model::ModelContainerSpec>,
84962            {
84963                self.container_spec = v.map(|x| x.into());
84964                self
84965            }
84966
84967            /// Sets the value of [artifact_uri][crate::model::publisher_model::call_to_action::Deploy::artifact_uri].
84968            pub fn set_artifact_uri<T: std::convert::Into<std::string::String>>(
84969                mut self,
84970                v: T,
84971            ) -> Self {
84972                self.artifact_uri = v.into();
84973                self
84974            }
84975
84976            /// Sets the value of [deploy_task_name][crate::model::publisher_model::call_to_action::Deploy::deploy_task_name].
84977            pub fn set_deploy_task_name<T>(mut self, v: T) -> Self
84978            where
84979                T: std::convert::Into<std::string::String>,
84980            {
84981                self.deploy_task_name = std::option::Option::Some(v.into());
84982                self
84983            }
84984
84985            /// Sets or clears the value of [deploy_task_name][crate::model::publisher_model::call_to_action::Deploy::deploy_task_name].
84986            pub fn set_or_clear_deploy_task_name<T>(mut self, v: std::option::Option<T>) -> Self
84987            where
84988                T: std::convert::Into<std::string::String>,
84989            {
84990                self.deploy_task_name = v.map(|x| x.into());
84991                self
84992            }
84993
84994            /// Sets the value of [deploy_metadata][crate::model::publisher_model::call_to_action::Deploy::deploy_metadata].
84995            pub fn set_deploy_metadata<T>(mut self, v: T) -> Self
84996            where
84997                T: std::convert::Into<
84998                        crate::model::publisher_model::call_to_action::deploy::DeployMetadata,
84999                    >,
85000            {
85001                self.deploy_metadata = std::option::Option::Some(v.into());
85002                self
85003            }
85004
85005            /// Sets or clears the value of [deploy_metadata][crate::model::publisher_model::call_to_action::Deploy::deploy_metadata].
85006            pub fn set_or_clear_deploy_metadata<T>(mut self, v: std::option::Option<T>) -> Self
85007            where
85008                T: std::convert::Into<
85009                        crate::model::publisher_model::call_to_action::deploy::DeployMetadata,
85010                    >,
85011            {
85012                self.deploy_metadata = v.map(|x| x.into());
85013                self
85014            }
85015
85016            /// Sets the value of [title][crate::model::publisher_model::call_to_action::Deploy::title].
85017            pub fn set_title<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
85018                self.title = v.into();
85019                self
85020            }
85021
85022            /// Sets the value of [public_artifact_uri][crate::model::publisher_model::call_to_action::Deploy::public_artifact_uri].
85023            pub fn set_public_artifact_uri<T: std::convert::Into<std::string::String>>(
85024                mut self,
85025                v: T,
85026            ) -> Self {
85027                self.public_artifact_uri = v.into();
85028                self
85029            }
85030
85031            /// Sets the value of [prediction_resources][crate::model::publisher_model::call_to_action::Deploy::prediction_resources].
85032            ///
85033            /// Note that all the setters affecting `prediction_resources` are mutually
85034            /// exclusive.
85035            pub fn set_prediction_resources<T: std::convert::Into<std::option::Option<crate::model::publisher_model::call_to_action::deploy::PredictionResources>>>(mut self, v: T) -> Self
85036            {
85037                self.prediction_resources = v.into();
85038                self
85039            }
85040
85041            /// The value of [prediction_resources][crate::model::publisher_model::call_to_action::Deploy::prediction_resources]
85042            /// if it holds a `DedicatedResources`, `None` if the field is not set or
85043            /// holds a different branch.
85044            pub fn dedicated_resources(
85045                &self,
85046            ) -> std::option::Option<&std::boxed::Box<crate::model::DedicatedResources>>
85047            {
85048                #[allow(unreachable_patterns)]
85049                self.prediction_resources.as_ref().and_then(|v| match v {
85050                    crate::model::publisher_model::call_to_action::deploy::PredictionResources::DedicatedResources(v) => std::option::Option::Some(v),
85051                    _ => std::option::Option::None,
85052                })
85053            }
85054
85055            /// Sets the value of [prediction_resources][crate::model::publisher_model::call_to_action::Deploy::prediction_resources]
85056            /// to hold a `DedicatedResources`.
85057            ///
85058            /// Note that all the setters affecting `prediction_resources` are
85059            /// mutually exclusive.
85060            pub fn set_dedicated_resources<
85061                T: std::convert::Into<std::boxed::Box<crate::model::DedicatedResources>>,
85062            >(
85063                mut self,
85064                v: T,
85065            ) -> Self {
85066                self.prediction_resources = std::option::Option::Some(
85067                    crate::model::publisher_model::call_to_action::deploy::PredictionResources::DedicatedResources(
85068                        v.into()
85069                    )
85070                );
85071                self
85072            }
85073
85074            /// The value of [prediction_resources][crate::model::publisher_model::call_to_action::Deploy::prediction_resources]
85075            /// if it holds a `AutomaticResources`, `None` if the field is not set or
85076            /// holds a different branch.
85077            pub fn automatic_resources(
85078                &self,
85079            ) -> std::option::Option<&std::boxed::Box<crate::model::AutomaticResources>>
85080            {
85081                #[allow(unreachable_patterns)]
85082                self.prediction_resources.as_ref().and_then(|v| match v {
85083                    crate::model::publisher_model::call_to_action::deploy::PredictionResources::AutomaticResources(v) => std::option::Option::Some(v),
85084                    _ => std::option::Option::None,
85085                })
85086            }
85087
85088            /// Sets the value of [prediction_resources][crate::model::publisher_model::call_to_action::Deploy::prediction_resources]
85089            /// to hold a `AutomaticResources`.
85090            ///
85091            /// Note that all the setters affecting `prediction_resources` are
85092            /// mutually exclusive.
85093            pub fn set_automatic_resources<
85094                T: std::convert::Into<std::boxed::Box<crate::model::AutomaticResources>>,
85095            >(
85096                mut self,
85097                v: T,
85098            ) -> Self {
85099                self.prediction_resources = std::option::Option::Some(
85100                    crate::model::publisher_model::call_to_action::deploy::PredictionResources::AutomaticResources(
85101                        v.into()
85102                    )
85103                );
85104                self
85105            }
85106
85107            /// The value of [prediction_resources][crate::model::publisher_model::call_to_action::Deploy::prediction_resources]
85108            /// if it holds a `SharedResources`, `None` if the field is not set or
85109            /// holds a different branch.
85110            pub fn shared_resources(&self) -> std::option::Option<&std::string::String> {
85111                #[allow(unreachable_patterns)]
85112                self.prediction_resources.as_ref().and_then(|v| match v {
85113                    crate::model::publisher_model::call_to_action::deploy::PredictionResources::SharedResources(v) => std::option::Option::Some(v),
85114                    _ => std::option::Option::None,
85115                })
85116            }
85117
85118            /// Sets the value of [prediction_resources][crate::model::publisher_model::call_to_action::Deploy::prediction_resources]
85119            /// to hold a `SharedResources`.
85120            ///
85121            /// Note that all the setters affecting `prediction_resources` are
85122            /// mutually exclusive.
85123            pub fn set_shared_resources<T: std::convert::Into<std::string::String>>(
85124                mut self,
85125                v: T,
85126            ) -> Self {
85127                self.prediction_resources = std::option::Option::Some(
85128                    crate::model::publisher_model::call_to_action::deploy::PredictionResources::SharedResources(
85129                        v.into()
85130                    )
85131                );
85132                self
85133            }
85134        }
85135
85136        #[cfg(feature = "model-garden-service")]
85137        impl wkt::message::Message for Deploy {
85138            fn typename() -> &'static str {
85139                "type.googleapis.com/google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy"
85140            }
85141        }
85142
85143        /// Defines additional types related to [Deploy].
85144        #[cfg(feature = "model-garden-service")]
85145        pub mod deploy {
85146            #[allow(unused_imports)]
85147            use super::*;
85148
85149            /// Metadata information about the deployment for managing deployment
85150            /// config.
85151            #[cfg(feature = "model-garden-service")]
85152            #[derive(Clone, Default, PartialEq)]
85153            #[non_exhaustive]
85154            pub struct DeployMetadata {
85155                /// Optional. Labels for the deployment. For managing deployment config
85156                /// like verifying, source of deployment config, etc.
85157                pub labels: std::collections::HashMap<std::string::String, std::string::String>,
85158
85159                /// Optional. Sample request for deployed endpoint.
85160                pub sample_request: std::string::String,
85161
85162                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
85163            }
85164
85165            #[cfg(feature = "model-garden-service")]
85166            impl DeployMetadata {
85167                pub fn new() -> Self {
85168                    std::default::Default::default()
85169                }
85170
85171                /// Sets the value of [labels][crate::model::publisher_model::call_to_action::deploy::DeployMetadata::labels].
85172                pub fn set_labels<T, K, V>(mut self, v: T) -> Self
85173                where
85174                    T: std::iter::IntoIterator<Item = (K, V)>,
85175                    K: std::convert::Into<std::string::String>,
85176                    V: std::convert::Into<std::string::String>,
85177                {
85178                    use std::iter::Iterator;
85179                    self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
85180                    self
85181                }
85182
85183                /// Sets the value of [sample_request][crate::model::publisher_model::call_to_action::deploy::DeployMetadata::sample_request].
85184                pub fn set_sample_request<T: std::convert::Into<std::string::String>>(
85185                    mut self,
85186                    v: T,
85187                ) -> Self {
85188                    self.sample_request = v.into();
85189                    self
85190                }
85191            }
85192
85193            #[cfg(feature = "model-garden-service")]
85194            impl wkt::message::Message for DeployMetadata {
85195                fn typename() -> &'static str {
85196                    "type.googleapis.com/google.cloud.aiplatform.v1.PublisherModel.CallToAction.Deploy.DeployMetadata"
85197                }
85198            }
85199
85200            /// The prediction (for example, the machine) resources that the
85201            /// DeployedModel uses.
85202            #[cfg(feature = "model-garden-service")]
85203            #[derive(Clone, Debug, PartialEq)]
85204            #[non_exhaustive]
85205            pub enum PredictionResources {
85206                /// A description of resources that are dedicated to the DeployedModel,
85207                /// and that need a higher degree of manual configuration.
85208                DedicatedResources(std::boxed::Box<crate::model::DedicatedResources>),
85209                /// A description of resources that to large degree are decided by Vertex
85210                /// AI, and require only a modest additional configuration.
85211                AutomaticResources(std::boxed::Box<crate::model::AutomaticResources>),
85212                /// The resource name of the shared DeploymentResourcePool to deploy on.
85213                /// Format:
85214                /// `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
85215                SharedResources(std::string::String),
85216            }
85217        }
85218
85219        /// Configurations for PublisherModel GKE deployment
85220        #[cfg(feature = "model-garden-service")]
85221        #[derive(Clone, Default, PartialEq)]
85222        #[non_exhaustive]
85223        pub struct DeployGke {
85224            /// Optional. GKE deployment configuration in yaml format.
85225            pub gke_yaml_configs: std::vec::Vec<std::string::String>,
85226
85227            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
85228        }
85229
85230        #[cfg(feature = "model-garden-service")]
85231        impl DeployGke {
85232            pub fn new() -> Self {
85233                std::default::Default::default()
85234            }
85235
85236            /// Sets the value of [gke_yaml_configs][crate::model::publisher_model::call_to_action::DeployGke::gke_yaml_configs].
85237            pub fn set_gke_yaml_configs<T, V>(mut self, v: T) -> Self
85238            where
85239                T: std::iter::IntoIterator<Item = V>,
85240                V: std::convert::Into<std::string::String>,
85241            {
85242                use std::iter::Iterator;
85243                self.gke_yaml_configs = v.into_iter().map(|i| i.into()).collect();
85244                self
85245            }
85246        }
85247
85248        #[cfg(feature = "model-garden-service")]
85249        impl wkt::message::Message for DeployGke {
85250            fn typename() -> &'static str {
85251                "type.googleapis.com/google.cloud.aiplatform.v1.PublisherModel.CallToAction.DeployGke"
85252            }
85253        }
85254    }
85255
85256    /// An enum representing the open source category of a PublisherModel.
85257    ///
85258    /// # Working with unknown values
85259    ///
85260    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
85261    /// additional enum variants at any time. Adding new variants is not considered
85262    /// a breaking change. Applications should write their code in anticipation of:
85263    ///
85264    /// - New values appearing in future releases of the client library, **and**
85265    /// - New values received dynamically, without application changes.
85266    ///
85267    /// Please consult the [Working with enums] section in the user guide for some
85268    /// guidelines.
85269    ///
85270    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
85271    #[cfg(feature = "model-garden-service")]
85272    #[derive(Clone, Debug, PartialEq)]
85273    #[non_exhaustive]
85274    pub enum OpenSourceCategory {
85275        /// The open source category is unspecified, which should not be used.
85276        Unspecified,
85277        /// Used to indicate the PublisherModel is not open sourced.
85278        Proprietary,
85279        /// Used to indicate the PublisherModel is a Google-owned open source model
85280        /// w/ Google checkpoint.
85281        GoogleOwnedOssWithGoogleCheckpoint,
85282        /// Used to indicate the PublisherModel is a 3p-owned open source model w/
85283        /// Google checkpoint.
85284        ThirdPartyOwnedOssWithGoogleCheckpoint,
85285        /// Used to indicate the PublisherModel is a Google-owned pure open source
85286        /// model.
85287        GoogleOwnedOss,
85288        /// Used to indicate the PublisherModel is a 3p-owned pure open source model.
85289        ThirdPartyOwnedOss,
85290        /// If set, the enum was initialized with an unknown value.
85291        ///
85292        /// Applications can examine the value using [OpenSourceCategory::value] or
85293        /// [OpenSourceCategory::name].
85294        UnknownValue(open_source_category::UnknownValue),
85295    }
85296
85297    #[doc(hidden)]
85298    #[cfg(feature = "model-garden-service")]
85299    pub mod open_source_category {
85300        #[allow(unused_imports)]
85301        use super::*;
85302        #[derive(Clone, Debug, PartialEq)]
85303        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
85304    }
85305
85306    #[cfg(feature = "model-garden-service")]
85307    impl OpenSourceCategory {
85308        /// Gets the enum value.
85309        ///
85310        /// Returns `None` if the enum contains an unknown value deserialized from
85311        /// the string representation of enums.
85312        pub fn value(&self) -> std::option::Option<i32> {
85313            match self {
85314                Self::Unspecified => std::option::Option::Some(0),
85315                Self::Proprietary => std::option::Option::Some(1),
85316                Self::GoogleOwnedOssWithGoogleCheckpoint => std::option::Option::Some(2),
85317                Self::ThirdPartyOwnedOssWithGoogleCheckpoint => std::option::Option::Some(3),
85318                Self::GoogleOwnedOss => std::option::Option::Some(4),
85319                Self::ThirdPartyOwnedOss => std::option::Option::Some(5),
85320                Self::UnknownValue(u) => u.0.value(),
85321            }
85322        }
85323
85324        /// Gets the enum value as a string.
85325        ///
85326        /// Returns `None` if the enum contains an unknown value deserialized from
85327        /// the integer representation of enums.
85328        pub fn name(&self) -> std::option::Option<&str> {
85329            match self {
85330                Self::Unspecified => std::option::Option::Some("OPEN_SOURCE_CATEGORY_UNSPECIFIED"),
85331                Self::Proprietary => std::option::Option::Some("PROPRIETARY"),
85332                Self::GoogleOwnedOssWithGoogleCheckpoint => {
85333                    std::option::Option::Some("GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT")
85334                }
85335                Self::ThirdPartyOwnedOssWithGoogleCheckpoint => {
85336                    std::option::Option::Some("THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT")
85337                }
85338                Self::GoogleOwnedOss => std::option::Option::Some("GOOGLE_OWNED_OSS"),
85339                Self::ThirdPartyOwnedOss => std::option::Option::Some("THIRD_PARTY_OWNED_OSS"),
85340                Self::UnknownValue(u) => u.0.name(),
85341            }
85342        }
85343    }
85344
85345    #[cfg(feature = "model-garden-service")]
85346    impl std::default::Default for OpenSourceCategory {
85347        fn default() -> Self {
85348            use std::convert::From;
85349            Self::from(0)
85350        }
85351    }
85352
85353    #[cfg(feature = "model-garden-service")]
85354    impl std::fmt::Display for OpenSourceCategory {
85355        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
85356            wkt::internal::display_enum(f, self.name(), self.value())
85357        }
85358    }
85359
85360    #[cfg(feature = "model-garden-service")]
85361    impl std::convert::From<i32> for OpenSourceCategory {
85362        fn from(value: i32) -> Self {
85363            match value {
85364                0 => Self::Unspecified,
85365                1 => Self::Proprietary,
85366                2 => Self::GoogleOwnedOssWithGoogleCheckpoint,
85367                3 => Self::ThirdPartyOwnedOssWithGoogleCheckpoint,
85368                4 => Self::GoogleOwnedOss,
85369                5 => Self::ThirdPartyOwnedOss,
85370                _ => Self::UnknownValue(open_source_category::UnknownValue(
85371                    wkt::internal::UnknownEnumValue::Integer(value),
85372                )),
85373            }
85374        }
85375    }
85376
85377    #[cfg(feature = "model-garden-service")]
85378    impl std::convert::From<&str> for OpenSourceCategory {
85379        fn from(value: &str) -> Self {
85380            use std::string::ToString;
85381            match value {
85382                "OPEN_SOURCE_CATEGORY_UNSPECIFIED" => Self::Unspecified,
85383                "PROPRIETARY" => Self::Proprietary,
85384                "GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT" => {
85385                    Self::GoogleOwnedOssWithGoogleCheckpoint
85386                }
85387                "THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT" => {
85388                    Self::ThirdPartyOwnedOssWithGoogleCheckpoint
85389                }
85390                "GOOGLE_OWNED_OSS" => Self::GoogleOwnedOss,
85391                "THIRD_PARTY_OWNED_OSS" => Self::ThirdPartyOwnedOss,
85392                _ => Self::UnknownValue(open_source_category::UnknownValue(
85393                    wkt::internal::UnknownEnumValue::String(value.to_string()),
85394                )),
85395            }
85396        }
85397    }
85398
85399    #[cfg(feature = "model-garden-service")]
85400    impl serde::ser::Serialize for OpenSourceCategory {
85401        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
85402        where
85403            S: serde::Serializer,
85404        {
85405            match self {
85406                Self::Unspecified => serializer.serialize_i32(0),
85407                Self::Proprietary => serializer.serialize_i32(1),
85408                Self::GoogleOwnedOssWithGoogleCheckpoint => serializer.serialize_i32(2),
85409                Self::ThirdPartyOwnedOssWithGoogleCheckpoint => serializer.serialize_i32(3),
85410                Self::GoogleOwnedOss => serializer.serialize_i32(4),
85411                Self::ThirdPartyOwnedOss => serializer.serialize_i32(5),
85412                Self::UnknownValue(u) => u.0.serialize(serializer),
85413            }
85414        }
85415    }
85416
85417    #[cfg(feature = "model-garden-service")]
85418    impl<'de> serde::de::Deserialize<'de> for OpenSourceCategory {
85419        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
85420        where
85421            D: serde::Deserializer<'de>,
85422        {
85423            deserializer.deserialize_any(wkt::internal::EnumVisitor::<OpenSourceCategory>::new(
85424                ".google.cloud.aiplatform.v1.PublisherModel.OpenSourceCategory",
85425            ))
85426        }
85427    }
85428
85429    /// An enum representing the launch stage of a PublisherModel.
85430    ///
85431    /// # Working with unknown values
85432    ///
85433    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
85434    /// additional enum variants at any time. Adding new variants is not considered
85435    /// a breaking change. Applications should write their code in anticipation of:
85436    ///
85437    /// - New values appearing in future releases of the client library, **and**
85438    /// - New values received dynamically, without application changes.
85439    ///
85440    /// Please consult the [Working with enums] section in the user guide for some
85441    /// guidelines.
85442    ///
85443    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
85444    #[cfg(feature = "model-garden-service")]
85445    #[derive(Clone, Debug, PartialEq)]
85446    #[non_exhaustive]
85447    pub enum LaunchStage {
85448        /// The model launch stage is unspecified.
85449        Unspecified,
85450        /// Used to indicate the PublisherModel is at Experimental launch stage,
85451        /// available to a small set of customers.
85452        Experimental,
85453        /// Used to indicate the PublisherModel is at Private Preview launch stage,
85454        /// only available to a small set of customers, although a larger set of
85455        /// customers than an Experimental launch. Previews are the first launch
85456        /// stage used to get feedback from customers.
85457        PrivatePreview,
85458        /// Used to indicate the PublisherModel is at Public Preview launch stage,
85459        /// available to all customers, although not supported for production
85460        /// workloads.
85461        PublicPreview,
85462        /// Used to indicate the PublisherModel is at GA launch stage, available to
85463        /// all customers and ready for production workload.
85464        Ga,
85465        /// If set, the enum was initialized with an unknown value.
85466        ///
85467        /// Applications can examine the value using [LaunchStage::value] or
85468        /// [LaunchStage::name].
85469        UnknownValue(launch_stage::UnknownValue),
85470    }
85471
85472    #[doc(hidden)]
85473    #[cfg(feature = "model-garden-service")]
85474    pub mod launch_stage {
85475        #[allow(unused_imports)]
85476        use super::*;
85477        #[derive(Clone, Debug, PartialEq)]
85478        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
85479    }
85480
85481    #[cfg(feature = "model-garden-service")]
85482    impl LaunchStage {
85483        /// Gets the enum value.
85484        ///
85485        /// Returns `None` if the enum contains an unknown value deserialized from
85486        /// the string representation of enums.
85487        pub fn value(&self) -> std::option::Option<i32> {
85488            match self {
85489                Self::Unspecified => std::option::Option::Some(0),
85490                Self::Experimental => std::option::Option::Some(1),
85491                Self::PrivatePreview => std::option::Option::Some(2),
85492                Self::PublicPreview => std::option::Option::Some(3),
85493                Self::Ga => std::option::Option::Some(4),
85494                Self::UnknownValue(u) => u.0.value(),
85495            }
85496        }
85497
85498        /// Gets the enum value as a string.
85499        ///
85500        /// Returns `None` if the enum contains an unknown value deserialized from
85501        /// the integer representation of enums.
85502        pub fn name(&self) -> std::option::Option<&str> {
85503            match self {
85504                Self::Unspecified => std::option::Option::Some("LAUNCH_STAGE_UNSPECIFIED"),
85505                Self::Experimental => std::option::Option::Some("EXPERIMENTAL"),
85506                Self::PrivatePreview => std::option::Option::Some("PRIVATE_PREVIEW"),
85507                Self::PublicPreview => std::option::Option::Some("PUBLIC_PREVIEW"),
85508                Self::Ga => std::option::Option::Some("GA"),
85509                Self::UnknownValue(u) => u.0.name(),
85510            }
85511        }
85512    }
85513
85514    #[cfg(feature = "model-garden-service")]
85515    impl std::default::Default for LaunchStage {
85516        fn default() -> Self {
85517            use std::convert::From;
85518            Self::from(0)
85519        }
85520    }
85521
85522    #[cfg(feature = "model-garden-service")]
85523    impl std::fmt::Display for LaunchStage {
85524        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
85525            wkt::internal::display_enum(f, self.name(), self.value())
85526        }
85527    }
85528
85529    #[cfg(feature = "model-garden-service")]
85530    impl std::convert::From<i32> for LaunchStage {
85531        fn from(value: i32) -> Self {
85532            match value {
85533                0 => Self::Unspecified,
85534                1 => Self::Experimental,
85535                2 => Self::PrivatePreview,
85536                3 => Self::PublicPreview,
85537                4 => Self::Ga,
85538                _ => Self::UnknownValue(launch_stage::UnknownValue(
85539                    wkt::internal::UnknownEnumValue::Integer(value),
85540                )),
85541            }
85542        }
85543    }
85544
85545    #[cfg(feature = "model-garden-service")]
85546    impl std::convert::From<&str> for LaunchStage {
85547        fn from(value: &str) -> Self {
85548            use std::string::ToString;
85549            match value {
85550                "LAUNCH_STAGE_UNSPECIFIED" => Self::Unspecified,
85551                "EXPERIMENTAL" => Self::Experimental,
85552                "PRIVATE_PREVIEW" => Self::PrivatePreview,
85553                "PUBLIC_PREVIEW" => Self::PublicPreview,
85554                "GA" => Self::Ga,
85555                _ => Self::UnknownValue(launch_stage::UnknownValue(
85556                    wkt::internal::UnknownEnumValue::String(value.to_string()),
85557                )),
85558            }
85559        }
85560    }
85561
85562    #[cfg(feature = "model-garden-service")]
85563    impl serde::ser::Serialize for LaunchStage {
85564        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
85565        where
85566            S: serde::Serializer,
85567        {
85568            match self {
85569                Self::Unspecified => serializer.serialize_i32(0),
85570                Self::Experimental => serializer.serialize_i32(1),
85571                Self::PrivatePreview => serializer.serialize_i32(2),
85572                Self::PublicPreview => serializer.serialize_i32(3),
85573                Self::Ga => serializer.serialize_i32(4),
85574                Self::UnknownValue(u) => u.0.serialize(serializer),
85575            }
85576        }
85577    }
85578
85579    #[cfg(feature = "model-garden-service")]
85580    impl<'de> serde::de::Deserialize<'de> for LaunchStage {
85581        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
85582        where
85583            D: serde::Deserializer<'de>,
85584        {
85585            deserializer.deserialize_any(wkt::internal::EnumVisitor::<LaunchStage>::new(
85586                ".google.cloud.aiplatform.v1.PublisherModel.LaunchStage",
85587            ))
85588        }
85589    }
85590
85591    /// An enum representing the state of the PublicModelVersion.
85592    ///
85593    /// # Working with unknown values
85594    ///
85595    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
85596    /// additional enum variants at any time. Adding new variants is not considered
85597    /// a breaking change. Applications should write their code in anticipation of:
85598    ///
85599    /// - New values appearing in future releases of the client library, **and**
85600    /// - New values received dynamically, without application changes.
85601    ///
85602    /// Please consult the [Working with enums] section in the user guide for some
85603    /// guidelines.
85604    ///
85605    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
85606    #[cfg(feature = "model-garden-service")]
85607    #[derive(Clone, Debug, PartialEq)]
85608    #[non_exhaustive]
85609    pub enum VersionState {
85610        /// The version state is unspecified.
85611        Unspecified,
85612        /// Used to indicate the version is stable.
85613        Stable,
85614        /// Used to indicate the version is unstable.
85615        Unstable,
85616        /// If set, the enum was initialized with an unknown value.
85617        ///
85618        /// Applications can examine the value using [VersionState::value] or
85619        /// [VersionState::name].
85620        UnknownValue(version_state::UnknownValue),
85621    }
85622
85623    #[doc(hidden)]
85624    #[cfg(feature = "model-garden-service")]
85625    pub mod version_state {
85626        #[allow(unused_imports)]
85627        use super::*;
85628        #[derive(Clone, Debug, PartialEq)]
85629        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
85630    }
85631
85632    #[cfg(feature = "model-garden-service")]
85633    impl VersionState {
85634        /// Gets the enum value.
85635        ///
85636        /// Returns `None` if the enum contains an unknown value deserialized from
85637        /// the string representation of enums.
85638        pub fn value(&self) -> std::option::Option<i32> {
85639            match self {
85640                Self::Unspecified => std::option::Option::Some(0),
85641                Self::Stable => std::option::Option::Some(1),
85642                Self::Unstable => std::option::Option::Some(2),
85643                Self::UnknownValue(u) => u.0.value(),
85644            }
85645        }
85646
85647        /// Gets the enum value as a string.
85648        ///
85649        /// Returns `None` if the enum contains an unknown value deserialized from
85650        /// the integer representation of enums.
85651        pub fn name(&self) -> std::option::Option<&str> {
85652            match self {
85653                Self::Unspecified => std::option::Option::Some("VERSION_STATE_UNSPECIFIED"),
85654                Self::Stable => std::option::Option::Some("VERSION_STATE_STABLE"),
85655                Self::Unstable => std::option::Option::Some("VERSION_STATE_UNSTABLE"),
85656                Self::UnknownValue(u) => u.0.name(),
85657            }
85658        }
85659    }
85660
85661    #[cfg(feature = "model-garden-service")]
85662    impl std::default::Default for VersionState {
85663        fn default() -> Self {
85664            use std::convert::From;
85665            Self::from(0)
85666        }
85667    }
85668
85669    #[cfg(feature = "model-garden-service")]
85670    impl std::fmt::Display for VersionState {
85671        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
85672            wkt::internal::display_enum(f, self.name(), self.value())
85673        }
85674    }
85675
85676    #[cfg(feature = "model-garden-service")]
85677    impl std::convert::From<i32> for VersionState {
85678        fn from(value: i32) -> Self {
85679            match value {
85680                0 => Self::Unspecified,
85681                1 => Self::Stable,
85682                2 => Self::Unstable,
85683                _ => Self::UnknownValue(version_state::UnknownValue(
85684                    wkt::internal::UnknownEnumValue::Integer(value),
85685                )),
85686            }
85687        }
85688    }
85689
85690    #[cfg(feature = "model-garden-service")]
85691    impl std::convert::From<&str> for VersionState {
85692        fn from(value: &str) -> Self {
85693            use std::string::ToString;
85694            match value {
85695                "VERSION_STATE_UNSPECIFIED" => Self::Unspecified,
85696                "VERSION_STATE_STABLE" => Self::Stable,
85697                "VERSION_STATE_UNSTABLE" => Self::Unstable,
85698                _ => Self::UnknownValue(version_state::UnknownValue(
85699                    wkt::internal::UnknownEnumValue::String(value.to_string()),
85700                )),
85701            }
85702        }
85703    }
85704
85705    #[cfg(feature = "model-garden-service")]
85706    impl serde::ser::Serialize for VersionState {
85707        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
85708        where
85709            S: serde::Serializer,
85710        {
85711            match self {
85712                Self::Unspecified => serializer.serialize_i32(0),
85713                Self::Stable => serializer.serialize_i32(1),
85714                Self::Unstable => serializer.serialize_i32(2),
85715                Self::UnknownValue(u) => u.0.serialize(serializer),
85716            }
85717        }
85718    }
85719
85720    #[cfg(feature = "model-garden-service")]
85721    impl<'de> serde::de::Deserialize<'de> for VersionState {
85722        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
85723        where
85724            D: serde::Deserializer<'de>,
85725        {
85726            deserializer.deserialize_any(wkt::internal::EnumVisitor::<VersionState>::new(
85727                ".google.cloud.aiplatform.v1.PublisherModel.VersionState",
85728            ))
85729        }
85730    }
85731}
85732
85733/// ReasoningEngine configurations
85734#[cfg(feature = "reasoning-engine-service")]
85735#[derive(Clone, Default, PartialEq)]
85736#[non_exhaustive]
85737pub struct ReasoningEngineSpec {
85738    /// Optional. The service account that the Reasoning Engine artifact runs as.
85739    /// It should have "roles/storage.objectViewer" for reading the user project's
85740    /// Cloud Storage and "roles/aiplatform.user" for using Vertex extensions. If
85741    /// not specified, the Vertex AI Reasoning Engine Service Agent in the project
85742    /// will be used.
85743    pub service_account: std::option::Option<std::string::String>,
85744
85745    /// Optional. User provided package spec of the ReasoningEngine.
85746    /// Ignored when users directly specify a deployment image through
85747    /// `deployment_spec.first_party_image_override`, but keeping the
85748    /// field_behavior to avoid introducing breaking changes.
85749    pub package_spec: std::option::Option<crate::model::reasoning_engine_spec::PackageSpec>,
85750
85751    /// Optional. The specification of a Reasoning Engine deployment.
85752    pub deployment_spec: std::option::Option<crate::model::reasoning_engine_spec::DeploymentSpec>,
85753
85754    /// Optional. Declarations for object class methods in OpenAPI specification
85755    /// format.
85756    pub class_methods: std::vec::Vec<wkt::Struct>,
85757
85758    /// Optional. The OSS agent framework used to develop the agent.
85759    /// Currently supported values: "google-adk", "langchain", "langgraph", "ag2",
85760    /// "llama-index", "custom".
85761    pub agent_framework: std::string::String,
85762
85763    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
85764}
85765
85766#[cfg(feature = "reasoning-engine-service")]
85767impl ReasoningEngineSpec {
85768    pub fn new() -> Self {
85769        std::default::Default::default()
85770    }
85771
85772    /// Sets the value of [service_account][crate::model::ReasoningEngineSpec::service_account].
85773    pub fn set_service_account<T>(mut self, v: T) -> Self
85774    where
85775        T: std::convert::Into<std::string::String>,
85776    {
85777        self.service_account = std::option::Option::Some(v.into());
85778        self
85779    }
85780
85781    /// Sets or clears the value of [service_account][crate::model::ReasoningEngineSpec::service_account].
85782    pub fn set_or_clear_service_account<T>(mut self, v: std::option::Option<T>) -> Self
85783    where
85784        T: std::convert::Into<std::string::String>,
85785    {
85786        self.service_account = v.map(|x| x.into());
85787        self
85788    }
85789
85790    /// Sets the value of [package_spec][crate::model::ReasoningEngineSpec::package_spec].
85791    pub fn set_package_spec<T>(mut self, v: T) -> Self
85792    where
85793        T: std::convert::Into<crate::model::reasoning_engine_spec::PackageSpec>,
85794    {
85795        self.package_spec = std::option::Option::Some(v.into());
85796        self
85797    }
85798
85799    /// Sets or clears the value of [package_spec][crate::model::ReasoningEngineSpec::package_spec].
85800    pub fn set_or_clear_package_spec<T>(mut self, v: std::option::Option<T>) -> Self
85801    where
85802        T: std::convert::Into<crate::model::reasoning_engine_spec::PackageSpec>,
85803    {
85804        self.package_spec = v.map(|x| x.into());
85805        self
85806    }
85807
85808    /// Sets the value of [deployment_spec][crate::model::ReasoningEngineSpec::deployment_spec].
85809    pub fn set_deployment_spec<T>(mut self, v: T) -> Self
85810    where
85811        T: std::convert::Into<crate::model::reasoning_engine_spec::DeploymentSpec>,
85812    {
85813        self.deployment_spec = std::option::Option::Some(v.into());
85814        self
85815    }
85816
85817    /// Sets or clears the value of [deployment_spec][crate::model::ReasoningEngineSpec::deployment_spec].
85818    pub fn set_or_clear_deployment_spec<T>(mut self, v: std::option::Option<T>) -> Self
85819    where
85820        T: std::convert::Into<crate::model::reasoning_engine_spec::DeploymentSpec>,
85821    {
85822        self.deployment_spec = v.map(|x| x.into());
85823        self
85824    }
85825
85826    /// Sets the value of [class_methods][crate::model::ReasoningEngineSpec::class_methods].
85827    pub fn set_class_methods<T, V>(mut self, v: T) -> Self
85828    where
85829        T: std::iter::IntoIterator<Item = V>,
85830        V: std::convert::Into<wkt::Struct>,
85831    {
85832        use std::iter::Iterator;
85833        self.class_methods = v.into_iter().map(|i| i.into()).collect();
85834        self
85835    }
85836
85837    /// Sets the value of [agent_framework][crate::model::ReasoningEngineSpec::agent_framework].
85838    pub fn set_agent_framework<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
85839        self.agent_framework = v.into();
85840        self
85841    }
85842}
85843
85844#[cfg(feature = "reasoning-engine-service")]
85845impl wkt::message::Message for ReasoningEngineSpec {
85846    fn typename() -> &'static str {
85847        "type.googleapis.com/google.cloud.aiplatform.v1.ReasoningEngineSpec"
85848    }
85849}
85850
85851/// Defines additional types related to [ReasoningEngineSpec].
85852#[cfg(feature = "reasoning-engine-service")]
85853pub mod reasoning_engine_spec {
85854    #[allow(unused_imports)]
85855    use super::*;
85856
85857    /// User provided package spec like pickled object and package requirements.
85858    #[cfg(feature = "reasoning-engine-service")]
85859    #[derive(Clone, Default, PartialEq)]
85860    #[non_exhaustive]
85861    pub struct PackageSpec {
85862        /// Optional. The Cloud Storage URI of the pickled python object.
85863        pub pickle_object_gcs_uri: std::string::String,
85864
85865        /// Optional. The Cloud Storage URI of the dependency files in tar.gz format.
85866        pub dependency_files_gcs_uri: std::string::String,
85867
85868        /// Optional. The Cloud Storage URI of the `requirements.txt` file
85869        pub requirements_gcs_uri: std::string::String,
85870
85871        /// Optional. The Python version. Currently support 3.8, 3.9, 3.10, 3.11.
85872        /// If not specified, default value is 3.10.
85873        pub python_version: std::string::String,
85874
85875        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
85876    }
85877
85878    #[cfg(feature = "reasoning-engine-service")]
85879    impl PackageSpec {
85880        pub fn new() -> Self {
85881            std::default::Default::default()
85882        }
85883
85884        /// Sets the value of [pickle_object_gcs_uri][crate::model::reasoning_engine_spec::PackageSpec::pickle_object_gcs_uri].
85885        pub fn set_pickle_object_gcs_uri<T: std::convert::Into<std::string::String>>(
85886            mut self,
85887            v: T,
85888        ) -> Self {
85889            self.pickle_object_gcs_uri = v.into();
85890            self
85891        }
85892
85893        /// Sets the value of [dependency_files_gcs_uri][crate::model::reasoning_engine_spec::PackageSpec::dependency_files_gcs_uri].
85894        pub fn set_dependency_files_gcs_uri<T: std::convert::Into<std::string::String>>(
85895            mut self,
85896            v: T,
85897        ) -> Self {
85898            self.dependency_files_gcs_uri = v.into();
85899            self
85900        }
85901
85902        /// Sets the value of [requirements_gcs_uri][crate::model::reasoning_engine_spec::PackageSpec::requirements_gcs_uri].
85903        pub fn set_requirements_gcs_uri<T: std::convert::Into<std::string::String>>(
85904            mut self,
85905            v: T,
85906        ) -> Self {
85907            self.requirements_gcs_uri = v.into();
85908            self
85909        }
85910
85911        /// Sets the value of [python_version][crate::model::reasoning_engine_spec::PackageSpec::python_version].
85912        pub fn set_python_version<T: std::convert::Into<std::string::String>>(
85913            mut self,
85914            v: T,
85915        ) -> Self {
85916            self.python_version = v.into();
85917            self
85918        }
85919    }
85920
85921    #[cfg(feature = "reasoning-engine-service")]
85922    impl wkt::message::Message for PackageSpec {
85923        fn typename() -> &'static str {
85924            "type.googleapis.com/google.cloud.aiplatform.v1.ReasoningEngineSpec.PackageSpec"
85925        }
85926    }
85927
85928    /// The specification of a Reasoning Engine deployment.
85929    #[cfg(feature = "reasoning-engine-service")]
85930    #[derive(Clone, Default, PartialEq)]
85931    #[non_exhaustive]
85932    pub struct DeploymentSpec {
85933        /// Optional. Environment variables to be set with the Reasoning Engine
85934        /// deployment. The environment variables can be updated through the
85935        /// UpdateReasoningEngine API.
85936        pub env: std::vec::Vec<crate::model::EnvVar>,
85937
85938        /// Optional. Environment variables where the value is a secret in Cloud
85939        /// Secret Manager.
85940        /// To use this feature, add 'Secret Manager Secret Accessor' role
85941        /// (roles/secretmanager.secretAccessor) to AI Platform Reasoning Engine
85942        /// Service Agent.
85943        pub secret_env: std::vec::Vec<crate::model::SecretEnvVar>,
85944
85945        /// Optional. Configuration for PSC-I.
85946        pub psc_interface_config: std::option::Option<crate::model::PscInterfaceConfig>,
85947
85948        /// Optional. The minimum number of application instances that will be kept
85949        /// running at all times. Defaults to 1. Range: [0, 10].
85950        pub min_instances: std::option::Option<i32>,
85951
85952        /// Optional. The maximum number of application instances that can be
85953        /// launched to handle increased traffic. Defaults to 100. Range: [1, 1000].
85954        ///
85955        /// If VPC-SC or PSC-I is enabled, the acceptable range is [1, 100].
85956        pub max_instances: std::option::Option<i32>,
85957
85958        /// Optional. Resource limits for each container. Only 'cpu' and 'memory'
85959        /// keys are supported. Defaults to {"cpu": "4", "memory": "4Gi"}.
85960        ///
85961        /// * The only supported values for CPU are '1', '2', '4', '6' and '8'. For
85962        ///   more information, go to
85963        ///   <https://cloud.google.com/run/docs/configuring/cpu>.
85964        /// * The only supported values for memory are '1Gi', '2Gi', ... '32 Gi'.
85965        /// * For required cpu on different memory values, go to
85966        ///   <https://cloud.google.com/run/docs/configuring/memory-limits>
85967        pub resource_limits: std::collections::HashMap<std::string::String, std::string::String>,
85968
85969        /// Optional. Concurrency for each container and agent server. Recommended
85970        /// value: 2 * cpu + 1. Defaults to 9.
85971        pub container_concurrency: std::option::Option<i32>,
85972
85973        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
85974    }
85975
85976    #[cfg(feature = "reasoning-engine-service")]
85977    impl DeploymentSpec {
85978        pub fn new() -> Self {
85979            std::default::Default::default()
85980        }
85981
85982        /// Sets the value of [env][crate::model::reasoning_engine_spec::DeploymentSpec::env].
85983        pub fn set_env<T, V>(mut self, v: T) -> Self
85984        where
85985            T: std::iter::IntoIterator<Item = V>,
85986            V: std::convert::Into<crate::model::EnvVar>,
85987        {
85988            use std::iter::Iterator;
85989            self.env = v.into_iter().map(|i| i.into()).collect();
85990            self
85991        }
85992
85993        /// Sets the value of [secret_env][crate::model::reasoning_engine_spec::DeploymentSpec::secret_env].
85994        pub fn set_secret_env<T, V>(mut self, v: T) -> Self
85995        where
85996            T: std::iter::IntoIterator<Item = V>,
85997            V: std::convert::Into<crate::model::SecretEnvVar>,
85998        {
85999            use std::iter::Iterator;
86000            self.secret_env = v.into_iter().map(|i| i.into()).collect();
86001            self
86002        }
86003
86004        /// Sets the value of [psc_interface_config][crate::model::reasoning_engine_spec::DeploymentSpec::psc_interface_config].
86005        pub fn set_psc_interface_config<T>(mut self, v: T) -> Self
86006        where
86007            T: std::convert::Into<crate::model::PscInterfaceConfig>,
86008        {
86009            self.psc_interface_config = std::option::Option::Some(v.into());
86010            self
86011        }
86012
86013        /// Sets or clears the value of [psc_interface_config][crate::model::reasoning_engine_spec::DeploymentSpec::psc_interface_config].
86014        pub fn set_or_clear_psc_interface_config<T>(mut self, v: std::option::Option<T>) -> Self
86015        where
86016            T: std::convert::Into<crate::model::PscInterfaceConfig>,
86017        {
86018            self.psc_interface_config = v.map(|x| x.into());
86019            self
86020        }
86021
86022        /// Sets the value of [min_instances][crate::model::reasoning_engine_spec::DeploymentSpec::min_instances].
86023        pub fn set_min_instances<T>(mut self, v: T) -> Self
86024        where
86025            T: std::convert::Into<i32>,
86026        {
86027            self.min_instances = std::option::Option::Some(v.into());
86028            self
86029        }
86030
86031        /// Sets or clears the value of [min_instances][crate::model::reasoning_engine_spec::DeploymentSpec::min_instances].
86032        pub fn set_or_clear_min_instances<T>(mut self, v: std::option::Option<T>) -> Self
86033        where
86034            T: std::convert::Into<i32>,
86035        {
86036            self.min_instances = v.map(|x| x.into());
86037            self
86038        }
86039
86040        /// Sets the value of [max_instances][crate::model::reasoning_engine_spec::DeploymentSpec::max_instances].
86041        pub fn set_max_instances<T>(mut self, v: T) -> Self
86042        where
86043            T: std::convert::Into<i32>,
86044        {
86045            self.max_instances = std::option::Option::Some(v.into());
86046            self
86047        }
86048
86049        /// Sets or clears the value of [max_instances][crate::model::reasoning_engine_spec::DeploymentSpec::max_instances].
86050        pub fn set_or_clear_max_instances<T>(mut self, v: std::option::Option<T>) -> Self
86051        where
86052            T: std::convert::Into<i32>,
86053        {
86054            self.max_instances = v.map(|x| x.into());
86055            self
86056        }
86057
86058        /// Sets the value of [resource_limits][crate::model::reasoning_engine_spec::DeploymentSpec::resource_limits].
86059        pub fn set_resource_limits<T, K, V>(mut self, v: T) -> Self
86060        where
86061            T: std::iter::IntoIterator<Item = (K, V)>,
86062            K: std::convert::Into<std::string::String>,
86063            V: std::convert::Into<std::string::String>,
86064        {
86065            use std::iter::Iterator;
86066            self.resource_limits = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
86067            self
86068        }
86069
86070        /// Sets the value of [container_concurrency][crate::model::reasoning_engine_spec::DeploymentSpec::container_concurrency].
86071        pub fn set_container_concurrency<T>(mut self, v: T) -> Self
86072        where
86073            T: std::convert::Into<i32>,
86074        {
86075            self.container_concurrency = std::option::Option::Some(v.into());
86076            self
86077        }
86078
86079        /// Sets or clears the value of [container_concurrency][crate::model::reasoning_engine_spec::DeploymentSpec::container_concurrency].
86080        pub fn set_or_clear_container_concurrency<T>(mut self, v: std::option::Option<T>) -> Self
86081        where
86082            T: std::convert::Into<i32>,
86083        {
86084            self.container_concurrency = v.map(|x| x.into());
86085            self
86086        }
86087    }
86088
86089    #[cfg(feature = "reasoning-engine-service")]
86090    impl wkt::message::Message for DeploymentSpec {
86091        fn typename() -> &'static str {
86092            "type.googleapis.com/google.cloud.aiplatform.v1.ReasoningEngineSpec.DeploymentSpec"
86093        }
86094    }
86095}
86096
86097/// ReasoningEngine provides a customizable runtime for models to determine
86098/// which actions to take and in which order.
86099#[cfg(feature = "reasoning-engine-service")]
86100#[derive(Clone, Default, PartialEq)]
86101#[non_exhaustive]
86102pub struct ReasoningEngine {
86103    /// Identifier. The resource name of the ReasoningEngine.
86104    /// Format:
86105    /// `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
86106    pub name: std::string::String,
86107
86108    /// Required. The display name of the ReasoningEngine.
86109    pub display_name: std::string::String,
86110
86111    /// Optional. The description of the ReasoningEngine.
86112    pub description: std::string::String,
86113
86114    /// Optional. Configurations of the ReasoningEngine
86115    pub spec: std::option::Option<crate::model::ReasoningEngineSpec>,
86116
86117    /// Output only. Timestamp when this ReasoningEngine was created.
86118    pub create_time: std::option::Option<wkt::Timestamp>,
86119
86120    /// Output only. Timestamp when this ReasoningEngine was most recently updated.
86121    pub update_time: std::option::Option<wkt::Timestamp>,
86122
86123    /// Optional. Used to perform consistent read-modify-write updates. If not set,
86124    /// a blind "overwrite" update happens.
86125    pub etag: std::string::String,
86126
86127    /// Customer-managed encryption key spec for a ReasoningEngine. If set, this
86128    /// ReasoningEngine and all sub-resources of this ReasoningEngine will be
86129    /// secured by this key.
86130    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
86131
86132    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
86133}
86134
86135#[cfg(feature = "reasoning-engine-service")]
86136impl ReasoningEngine {
86137    pub fn new() -> Self {
86138        std::default::Default::default()
86139    }
86140
86141    /// Sets the value of [name][crate::model::ReasoningEngine::name].
86142    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86143        self.name = v.into();
86144        self
86145    }
86146
86147    /// Sets the value of [display_name][crate::model::ReasoningEngine::display_name].
86148    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86149        self.display_name = v.into();
86150        self
86151    }
86152
86153    /// Sets the value of [description][crate::model::ReasoningEngine::description].
86154    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86155        self.description = v.into();
86156        self
86157    }
86158
86159    /// Sets the value of [spec][crate::model::ReasoningEngine::spec].
86160    pub fn set_spec<T>(mut self, v: T) -> Self
86161    where
86162        T: std::convert::Into<crate::model::ReasoningEngineSpec>,
86163    {
86164        self.spec = std::option::Option::Some(v.into());
86165        self
86166    }
86167
86168    /// Sets or clears the value of [spec][crate::model::ReasoningEngine::spec].
86169    pub fn set_or_clear_spec<T>(mut self, v: std::option::Option<T>) -> Self
86170    where
86171        T: std::convert::Into<crate::model::ReasoningEngineSpec>,
86172    {
86173        self.spec = v.map(|x| x.into());
86174        self
86175    }
86176
86177    /// Sets the value of [create_time][crate::model::ReasoningEngine::create_time].
86178    pub fn set_create_time<T>(mut self, v: T) -> Self
86179    where
86180        T: std::convert::Into<wkt::Timestamp>,
86181    {
86182        self.create_time = std::option::Option::Some(v.into());
86183        self
86184    }
86185
86186    /// Sets or clears the value of [create_time][crate::model::ReasoningEngine::create_time].
86187    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
86188    where
86189        T: std::convert::Into<wkt::Timestamp>,
86190    {
86191        self.create_time = v.map(|x| x.into());
86192        self
86193    }
86194
86195    /// Sets the value of [update_time][crate::model::ReasoningEngine::update_time].
86196    pub fn set_update_time<T>(mut self, v: T) -> Self
86197    where
86198        T: std::convert::Into<wkt::Timestamp>,
86199    {
86200        self.update_time = std::option::Option::Some(v.into());
86201        self
86202    }
86203
86204    /// Sets or clears the value of [update_time][crate::model::ReasoningEngine::update_time].
86205    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
86206    where
86207        T: std::convert::Into<wkt::Timestamp>,
86208    {
86209        self.update_time = v.map(|x| x.into());
86210        self
86211    }
86212
86213    /// Sets the value of [etag][crate::model::ReasoningEngine::etag].
86214    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86215        self.etag = v.into();
86216        self
86217    }
86218
86219    /// Sets the value of [encryption_spec][crate::model::ReasoningEngine::encryption_spec].
86220    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
86221    where
86222        T: std::convert::Into<crate::model::EncryptionSpec>,
86223    {
86224        self.encryption_spec = std::option::Option::Some(v.into());
86225        self
86226    }
86227
86228    /// Sets or clears the value of [encryption_spec][crate::model::ReasoningEngine::encryption_spec].
86229    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
86230    where
86231        T: std::convert::Into<crate::model::EncryptionSpec>,
86232    {
86233        self.encryption_spec = v.map(|x| x.into());
86234        self
86235    }
86236}
86237
86238#[cfg(feature = "reasoning-engine-service")]
86239impl wkt::message::Message for ReasoningEngine {
86240    fn typename() -> &'static str {
86241        "type.googleapis.com/google.cloud.aiplatform.v1.ReasoningEngine"
86242    }
86243}
86244
86245/// Request message for [ReasoningEngineExecutionService.Query][].
86246#[cfg(feature = "reasoning-engine-execution-service")]
86247#[derive(Clone, Default, PartialEq)]
86248#[non_exhaustive]
86249pub struct QueryReasoningEngineRequest {
86250    /// Required. The name of the ReasoningEngine resource to use.
86251    /// Format:
86252    /// `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
86253    pub name: std::string::String,
86254
86255    /// Optional. Input content provided by users in JSON object format. Examples
86256    /// include text query, function calling parameters, media bytes, etc.
86257    pub input: std::option::Option<wkt::Struct>,
86258
86259    /// Optional. Class method to be used for the query.
86260    /// It is optional and defaults to "query" if unspecified.
86261    pub class_method: std::string::String,
86262
86263    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
86264}
86265
86266#[cfg(feature = "reasoning-engine-execution-service")]
86267impl QueryReasoningEngineRequest {
86268    pub fn new() -> Self {
86269        std::default::Default::default()
86270    }
86271
86272    /// Sets the value of [name][crate::model::QueryReasoningEngineRequest::name].
86273    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86274        self.name = v.into();
86275        self
86276    }
86277
86278    /// Sets the value of [input][crate::model::QueryReasoningEngineRequest::input].
86279    pub fn set_input<T>(mut self, v: T) -> Self
86280    where
86281        T: std::convert::Into<wkt::Struct>,
86282    {
86283        self.input = std::option::Option::Some(v.into());
86284        self
86285    }
86286
86287    /// Sets or clears the value of [input][crate::model::QueryReasoningEngineRequest::input].
86288    pub fn set_or_clear_input<T>(mut self, v: std::option::Option<T>) -> Self
86289    where
86290        T: std::convert::Into<wkt::Struct>,
86291    {
86292        self.input = v.map(|x| x.into());
86293        self
86294    }
86295
86296    /// Sets the value of [class_method][crate::model::QueryReasoningEngineRequest::class_method].
86297    pub fn set_class_method<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86298        self.class_method = v.into();
86299        self
86300    }
86301}
86302
86303#[cfg(feature = "reasoning-engine-execution-service")]
86304impl wkt::message::Message for QueryReasoningEngineRequest {
86305    fn typename() -> &'static str {
86306        "type.googleapis.com/google.cloud.aiplatform.v1.QueryReasoningEngineRequest"
86307    }
86308}
86309
86310/// Response message for [ReasoningEngineExecutionService.Query][]
86311#[cfg(feature = "reasoning-engine-execution-service")]
86312#[derive(Clone, Default, PartialEq)]
86313#[non_exhaustive]
86314pub struct QueryReasoningEngineResponse {
86315    /// Response provided by users in JSON object format.
86316    pub output: std::option::Option<wkt::Value>,
86317
86318    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
86319}
86320
86321#[cfg(feature = "reasoning-engine-execution-service")]
86322impl QueryReasoningEngineResponse {
86323    pub fn new() -> Self {
86324        std::default::Default::default()
86325    }
86326
86327    /// Sets the value of [output][crate::model::QueryReasoningEngineResponse::output].
86328    pub fn set_output<T>(mut self, v: T) -> Self
86329    where
86330        T: std::convert::Into<wkt::Value>,
86331    {
86332        self.output = std::option::Option::Some(v.into());
86333        self
86334    }
86335
86336    /// Sets or clears the value of [output][crate::model::QueryReasoningEngineResponse::output].
86337    pub fn set_or_clear_output<T>(mut self, v: std::option::Option<T>) -> Self
86338    where
86339        T: std::convert::Into<wkt::Value>,
86340    {
86341        self.output = v.map(|x| x.into());
86342        self
86343    }
86344}
86345
86346#[cfg(feature = "reasoning-engine-execution-service")]
86347impl wkt::message::Message for QueryReasoningEngineResponse {
86348    fn typename() -> &'static str {
86349        "type.googleapis.com/google.cloud.aiplatform.v1.QueryReasoningEngineResponse"
86350    }
86351}
86352
86353/// Request message for [ReasoningEngineExecutionService.StreamQuery][].
86354#[cfg(feature = "reasoning-engine-execution-service")]
86355#[derive(Clone, Default, PartialEq)]
86356#[non_exhaustive]
86357pub struct StreamQueryReasoningEngineRequest {
86358    /// Required. The name of the ReasoningEngine resource to use.
86359    /// Format:
86360    /// `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
86361    pub name: std::string::String,
86362
86363    /// Optional. Input content provided by users in JSON object format. Examples
86364    /// include text query, function calling parameters, media bytes, etc.
86365    pub input: std::option::Option<wkt::Struct>,
86366
86367    /// Optional. Class method to be used for the stream query.
86368    /// It is optional and defaults to "stream_query" if unspecified.
86369    pub class_method: std::string::String,
86370
86371    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
86372}
86373
86374#[cfg(feature = "reasoning-engine-execution-service")]
86375impl StreamQueryReasoningEngineRequest {
86376    pub fn new() -> Self {
86377        std::default::Default::default()
86378    }
86379
86380    /// Sets the value of [name][crate::model::StreamQueryReasoningEngineRequest::name].
86381    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86382        self.name = v.into();
86383        self
86384    }
86385
86386    /// Sets the value of [input][crate::model::StreamQueryReasoningEngineRequest::input].
86387    pub fn set_input<T>(mut self, v: T) -> Self
86388    where
86389        T: std::convert::Into<wkt::Struct>,
86390    {
86391        self.input = std::option::Option::Some(v.into());
86392        self
86393    }
86394
86395    /// Sets or clears the value of [input][crate::model::StreamQueryReasoningEngineRequest::input].
86396    pub fn set_or_clear_input<T>(mut self, v: std::option::Option<T>) -> Self
86397    where
86398        T: std::convert::Into<wkt::Struct>,
86399    {
86400        self.input = v.map(|x| x.into());
86401        self
86402    }
86403
86404    /// Sets the value of [class_method][crate::model::StreamQueryReasoningEngineRequest::class_method].
86405    pub fn set_class_method<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86406        self.class_method = v.into();
86407        self
86408    }
86409}
86410
86411#[cfg(feature = "reasoning-engine-execution-service")]
86412impl wkt::message::Message for StreamQueryReasoningEngineRequest {
86413    fn typename() -> &'static str {
86414        "type.googleapis.com/google.cloud.aiplatform.v1.StreamQueryReasoningEngineRequest"
86415    }
86416}
86417
86418/// Request message for
86419/// [ReasoningEngineService.CreateReasoningEngine][google.cloud.aiplatform.v1.ReasoningEngineService.CreateReasoningEngine].
86420///
86421/// [google.cloud.aiplatform.v1.ReasoningEngineService.CreateReasoningEngine]: crate::client::ReasoningEngineService::create_reasoning_engine
86422#[cfg(feature = "reasoning-engine-service")]
86423#[derive(Clone, Default, PartialEq)]
86424#[non_exhaustive]
86425pub struct CreateReasoningEngineRequest {
86426    /// Required. The resource name of the Location to create the ReasoningEngine
86427    /// in. Format: `projects/{project}/locations/{location}`
86428    pub parent: std::string::String,
86429
86430    /// Required. The ReasoningEngine to create.
86431    pub reasoning_engine: std::option::Option<crate::model::ReasoningEngine>,
86432
86433    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
86434}
86435
86436#[cfg(feature = "reasoning-engine-service")]
86437impl CreateReasoningEngineRequest {
86438    pub fn new() -> Self {
86439        std::default::Default::default()
86440    }
86441
86442    /// Sets the value of [parent][crate::model::CreateReasoningEngineRequest::parent].
86443    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86444        self.parent = v.into();
86445        self
86446    }
86447
86448    /// Sets the value of [reasoning_engine][crate::model::CreateReasoningEngineRequest::reasoning_engine].
86449    pub fn set_reasoning_engine<T>(mut self, v: T) -> Self
86450    where
86451        T: std::convert::Into<crate::model::ReasoningEngine>,
86452    {
86453        self.reasoning_engine = std::option::Option::Some(v.into());
86454        self
86455    }
86456
86457    /// Sets or clears the value of [reasoning_engine][crate::model::CreateReasoningEngineRequest::reasoning_engine].
86458    pub fn set_or_clear_reasoning_engine<T>(mut self, v: std::option::Option<T>) -> Self
86459    where
86460        T: std::convert::Into<crate::model::ReasoningEngine>,
86461    {
86462        self.reasoning_engine = v.map(|x| x.into());
86463        self
86464    }
86465}
86466
86467#[cfg(feature = "reasoning-engine-service")]
86468impl wkt::message::Message for CreateReasoningEngineRequest {
86469    fn typename() -> &'static str {
86470        "type.googleapis.com/google.cloud.aiplatform.v1.CreateReasoningEngineRequest"
86471    }
86472}
86473
86474/// Details of
86475/// [ReasoningEngineService.CreateReasoningEngine][google.cloud.aiplatform.v1.ReasoningEngineService.CreateReasoningEngine]
86476/// operation.
86477///
86478/// [google.cloud.aiplatform.v1.ReasoningEngineService.CreateReasoningEngine]: crate::client::ReasoningEngineService::create_reasoning_engine
86479#[cfg(feature = "reasoning-engine-service")]
86480#[derive(Clone, Default, PartialEq)]
86481#[non_exhaustive]
86482pub struct CreateReasoningEngineOperationMetadata {
86483    /// The common part of the operation metadata.
86484    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
86485
86486    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
86487}
86488
86489#[cfg(feature = "reasoning-engine-service")]
86490impl CreateReasoningEngineOperationMetadata {
86491    pub fn new() -> Self {
86492        std::default::Default::default()
86493    }
86494
86495    /// Sets the value of [generic_metadata][crate::model::CreateReasoningEngineOperationMetadata::generic_metadata].
86496    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
86497    where
86498        T: std::convert::Into<crate::model::GenericOperationMetadata>,
86499    {
86500        self.generic_metadata = std::option::Option::Some(v.into());
86501        self
86502    }
86503
86504    /// Sets or clears the value of [generic_metadata][crate::model::CreateReasoningEngineOperationMetadata::generic_metadata].
86505    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
86506    where
86507        T: std::convert::Into<crate::model::GenericOperationMetadata>,
86508    {
86509        self.generic_metadata = v.map(|x| x.into());
86510        self
86511    }
86512}
86513
86514#[cfg(feature = "reasoning-engine-service")]
86515impl wkt::message::Message for CreateReasoningEngineOperationMetadata {
86516    fn typename() -> &'static str {
86517        "type.googleapis.com/google.cloud.aiplatform.v1.CreateReasoningEngineOperationMetadata"
86518    }
86519}
86520
86521/// Request message for
86522/// [ReasoningEngineService.GetReasoningEngine][google.cloud.aiplatform.v1.ReasoningEngineService.GetReasoningEngine].
86523///
86524/// [google.cloud.aiplatform.v1.ReasoningEngineService.GetReasoningEngine]: crate::client::ReasoningEngineService::get_reasoning_engine
86525#[cfg(feature = "reasoning-engine-service")]
86526#[derive(Clone, Default, PartialEq)]
86527#[non_exhaustive]
86528pub struct GetReasoningEngineRequest {
86529    /// Required. The name of the ReasoningEngine resource.
86530    /// Format:
86531    /// `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
86532    pub name: std::string::String,
86533
86534    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
86535}
86536
86537#[cfg(feature = "reasoning-engine-service")]
86538impl GetReasoningEngineRequest {
86539    pub fn new() -> Self {
86540        std::default::Default::default()
86541    }
86542
86543    /// Sets the value of [name][crate::model::GetReasoningEngineRequest::name].
86544    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86545        self.name = v.into();
86546        self
86547    }
86548}
86549
86550#[cfg(feature = "reasoning-engine-service")]
86551impl wkt::message::Message for GetReasoningEngineRequest {
86552    fn typename() -> &'static str {
86553        "type.googleapis.com/google.cloud.aiplatform.v1.GetReasoningEngineRequest"
86554    }
86555}
86556
86557/// Request message for
86558/// [ReasoningEngineService.UpdateReasoningEngine][google.cloud.aiplatform.v1.ReasoningEngineService.UpdateReasoningEngine].
86559///
86560/// [google.cloud.aiplatform.v1.ReasoningEngineService.UpdateReasoningEngine]: crate::client::ReasoningEngineService::update_reasoning_engine
86561#[cfg(feature = "reasoning-engine-service")]
86562#[derive(Clone, Default, PartialEq)]
86563#[non_exhaustive]
86564pub struct UpdateReasoningEngineRequest {
86565    /// Required. The ReasoningEngine which replaces the resource on the server.
86566    pub reasoning_engine: std::option::Option<crate::model::ReasoningEngine>,
86567
86568    /// Optional. Mask specifying which fields to update.
86569    pub update_mask: std::option::Option<wkt::FieldMask>,
86570
86571    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
86572}
86573
86574#[cfg(feature = "reasoning-engine-service")]
86575impl UpdateReasoningEngineRequest {
86576    pub fn new() -> Self {
86577        std::default::Default::default()
86578    }
86579
86580    /// Sets the value of [reasoning_engine][crate::model::UpdateReasoningEngineRequest::reasoning_engine].
86581    pub fn set_reasoning_engine<T>(mut self, v: T) -> Self
86582    where
86583        T: std::convert::Into<crate::model::ReasoningEngine>,
86584    {
86585        self.reasoning_engine = std::option::Option::Some(v.into());
86586        self
86587    }
86588
86589    /// Sets or clears the value of [reasoning_engine][crate::model::UpdateReasoningEngineRequest::reasoning_engine].
86590    pub fn set_or_clear_reasoning_engine<T>(mut self, v: std::option::Option<T>) -> Self
86591    where
86592        T: std::convert::Into<crate::model::ReasoningEngine>,
86593    {
86594        self.reasoning_engine = v.map(|x| x.into());
86595        self
86596    }
86597
86598    /// Sets the value of [update_mask][crate::model::UpdateReasoningEngineRequest::update_mask].
86599    pub fn set_update_mask<T>(mut self, v: T) -> Self
86600    where
86601        T: std::convert::Into<wkt::FieldMask>,
86602    {
86603        self.update_mask = std::option::Option::Some(v.into());
86604        self
86605    }
86606
86607    /// Sets or clears the value of [update_mask][crate::model::UpdateReasoningEngineRequest::update_mask].
86608    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
86609    where
86610        T: std::convert::Into<wkt::FieldMask>,
86611    {
86612        self.update_mask = v.map(|x| x.into());
86613        self
86614    }
86615}
86616
86617#[cfg(feature = "reasoning-engine-service")]
86618impl wkt::message::Message for UpdateReasoningEngineRequest {
86619    fn typename() -> &'static str {
86620        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateReasoningEngineRequest"
86621    }
86622}
86623
86624/// Details of
86625/// [ReasoningEngineService.UpdateReasoningEngine][google.cloud.aiplatform.v1.ReasoningEngineService.UpdateReasoningEngine]
86626/// operation.
86627///
86628/// [google.cloud.aiplatform.v1.ReasoningEngineService.UpdateReasoningEngine]: crate::client::ReasoningEngineService::update_reasoning_engine
86629#[cfg(feature = "reasoning-engine-service")]
86630#[derive(Clone, Default, PartialEq)]
86631#[non_exhaustive]
86632pub struct UpdateReasoningEngineOperationMetadata {
86633    /// The common part of the operation metadata.
86634    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
86635
86636    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
86637}
86638
86639#[cfg(feature = "reasoning-engine-service")]
86640impl UpdateReasoningEngineOperationMetadata {
86641    pub fn new() -> Self {
86642        std::default::Default::default()
86643    }
86644
86645    /// Sets the value of [generic_metadata][crate::model::UpdateReasoningEngineOperationMetadata::generic_metadata].
86646    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
86647    where
86648        T: std::convert::Into<crate::model::GenericOperationMetadata>,
86649    {
86650        self.generic_metadata = std::option::Option::Some(v.into());
86651        self
86652    }
86653
86654    /// Sets or clears the value of [generic_metadata][crate::model::UpdateReasoningEngineOperationMetadata::generic_metadata].
86655    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
86656    where
86657        T: std::convert::Into<crate::model::GenericOperationMetadata>,
86658    {
86659        self.generic_metadata = v.map(|x| x.into());
86660        self
86661    }
86662}
86663
86664#[cfg(feature = "reasoning-engine-service")]
86665impl wkt::message::Message for UpdateReasoningEngineOperationMetadata {
86666    fn typename() -> &'static str {
86667        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateReasoningEngineOperationMetadata"
86668    }
86669}
86670
86671/// Request message for
86672/// [ReasoningEngineService.ListReasoningEngines][google.cloud.aiplatform.v1.ReasoningEngineService.ListReasoningEngines].
86673///
86674/// [google.cloud.aiplatform.v1.ReasoningEngineService.ListReasoningEngines]: crate::client::ReasoningEngineService::list_reasoning_engines
86675#[cfg(feature = "reasoning-engine-service")]
86676#[derive(Clone, Default, PartialEq)]
86677#[non_exhaustive]
86678pub struct ListReasoningEnginesRequest {
86679    /// Required. The resource name of the Location to list the ReasoningEngines
86680    /// from. Format: `projects/{project}/locations/{location}`
86681    pub parent: std::string::String,
86682
86683    /// Optional. The standard list filter.
86684    /// More detail in [AIP-160](https://google.aip.dev/160).
86685    pub filter: std::string::String,
86686
86687    /// Optional. The standard list page size.
86688    pub page_size: i32,
86689
86690    /// Optional. The standard list page token.
86691    pub page_token: std::string::String,
86692
86693    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
86694}
86695
86696#[cfg(feature = "reasoning-engine-service")]
86697impl ListReasoningEnginesRequest {
86698    pub fn new() -> Self {
86699        std::default::Default::default()
86700    }
86701
86702    /// Sets the value of [parent][crate::model::ListReasoningEnginesRequest::parent].
86703    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86704        self.parent = v.into();
86705        self
86706    }
86707
86708    /// Sets the value of [filter][crate::model::ListReasoningEnginesRequest::filter].
86709    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86710        self.filter = v.into();
86711        self
86712    }
86713
86714    /// Sets the value of [page_size][crate::model::ListReasoningEnginesRequest::page_size].
86715    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
86716        self.page_size = v.into();
86717        self
86718    }
86719
86720    /// Sets the value of [page_token][crate::model::ListReasoningEnginesRequest::page_token].
86721    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86722        self.page_token = v.into();
86723        self
86724    }
86725}
86726
86727#[cfg(feature = "reasoning-engine-service")]
86728impl wkt::message::Message for ListReasoningEnginesRequest {
86729    fn typename() -> &'static str {
86730        "type.googleapis.com/google.cloud.aiplatform.v1.ListReasoningEnginesRequest"
86731    }
86732}
86733
86734/// Response message for
86735/// [ReasoningEngineService.ListReasoningEngines][google.cloud.aiplatform.v1.ReasoningEngineService.ListReasoningEngines]
86736///
86737/// [google.cloud.aiplatform.v1.ReasoningEngineService.ListReasoningEngines]: crate::client::ReasoningEngineService::list_reasoning_engines
86738#[cfg(feature = "reasoning-engine-service")]
86739#[derive(Clone, Default, PartialEq)]
86740#[non_exhaustive]
86741pub struct ListReasoningEnginesResponse {
86742    /// List of ReasoningEngines in the requested page.
86743    pub reasoning_engines: std::vec::Vec<crate::model::ReasoningEngine>,
86744
86745    /// A token to retrieve the next page of results.
86746    /// Pass to
86747    /// [ListReasoningEnginesRequest.page_token][google.cloud.aiplatform.v1.ListReasoningEnginesRequest.page_token]
86748    /// to obtain that page.
86749    ///
86750    /// [google.cloud.aiplatform.v1.ListReasoningEnginesRequest.page_token]: crate::model::ListReasoningEnginesRequest::page_token
86751    pub next_page_token: std::string::String,
86752
86753    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
86754}
86755
86756#[cfg(feature = "reasoning-engine-service")]
86757impl ListReasoningEnginesResponse {
86758    pub fn new() -> Self {
86759        std::default::Default::default()
86760    }
86761
86762    /// Sets the value of [reasoning_engines][crate::model::ListReasoningEnginesResponse::reasoning_engines].
86763    pub fn set_reasoning_engines<T, V>(mut self, v: T) -> Self
86764    where
86765        T: std::iter::IntoIterator<Item = V>,
86766        V: std::convert::Into<crate::model::ReasoningEngine>,
86767    {
86768        use std::iter::Iterator;
86769        self.reasoning_engines = v.into_iter().map(|i| i.into()).collect();
86770        self
86771    }
86772
86773    /// Sets the value of [next_page_token][crate::model::ListReasoningEnginesResponse::next_page_token].
86774    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86775        self.next_page_token = v.into();
86776        self
86777    }
86778}
86779
86780#[cfg(feature = "reasoning-engine-service")]
86781impl wkt::message::Message for ListReasoningEnginesResponse {
86782    fn typename() -> &'static str {
86783        "type.googleapis.com/google.cloud.aiplatform.v1.ListReasoningEnginesResponse"
86784    }
86785}
86786
86787#[cfg(feature = "reasoning-engine-service")]
86788#[doc(hidden)]
86789impl gax::paginator::internal::PageableResponse for ListReasoningEnginesResponse {
86790    type PageItem = crate::model::ReasoningEngine;
86791
86792    fn items(self) -> std::vec::Vec<Self::PageItem> {
86793        self.reasoning_engines
86794    }
86795
86796    fn next_page_token(&self) -> std::string::String {
86797        use std::clone::Clone;
86798        self.next_page_token.clone()
86799    }
86800}
86801
86802/// Request message for
86803/// [ReasoningEngineService.DeleteReasoningEngine][google.cloud.aiplatform.v1.ReasoningEngineService.DeleteReasoningEngine].
86804///
86805/// [google.cloud.aiplatform.v1.ReasoningEngineService.DeleteReasoningEngine]: crate::client::ReasoningEngineService::delete_reasoning_engine
86806#[cfg(feature = "reasoning-engine-service")]
86807#[derive(Clone, Default, PartialEq)]
86808#[non_exhaustive]
86809pub struct DeleteReasoningEngineRequest {
86810    /// Required. The name of the ReasoningEngine resource to be deleted.
86811    /// Format:
86812    /// `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
86813    pub name: std::string::String,
86814
86815    /// Optional. If set to true, child resources of this reasoning engine will
86816    /// also be deleted. Otherwise, the request will fail with FAILED_PRECONDITION
86817    /// error when the reasoning engine has undeleted child resources.
86818    pub force: bool,
86819
86820    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
86821}
86822
86823#[cfg(feature = "reasoning-engine-service")]
86824impl DeleteReasoningEngineRequest {
86825    pub fn new() -> Self {
86826        std::default::Default::default()
86827    }
86828
86829    /// Sets the value of [name][crate::model::DeleteReasoningEngineRequest::name].
86830    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86831        self.name = v.into();
86832        self
86833    }
86834
86835    /// Sets the value of [force][crate::model::DeleteReasoningEngineRequest::force].
86836    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
86837        self.force = v.into();
86838        self
86839    }
86840}
86841
86842#[cfg(feature = "reasoning-engine-service")]
86843impl wkt::message::Message for DeleteReasoningEngineRequest {
86844    fn typename() -> &'static str {
86845        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteReasoningEngineRequest"
86846    }
86847}
86848
86849/// A ReservationAffinity can be used to configure a Vertex AI resource (e.g., a
86850/// DeployedModel) to draw its Compute Engine resources from a Shared
86851/// Reservation, or exclusively from on-demand capacity.
86852#[cfg(any(
86853    feature = "deployment-resource-pool-service",
86854    feature = "endpoint-service",
86855    feature = "index-endpoint-service",
86856    feature = "job-service",
86857    feature = "model-garden-service",
86858    feature = "notebook-service",
86859    feature = "persistent-resource-service",
86860    feature = "schedule-service",
86861))]
86862#[derive(Clone, Default, PartialEq)]
86863#[non_exhaustive]
86864pub struct ReservationAffinity {
86865    /// Required. Specifies the reservation affinity type.
86866    pub reservation_affinity_type: crate::model::reservation_affinity::Type,
86867
86868    /// Optional. Corresponds to the label key of a reservation resource. To target
86869    /// a SPECIFIC_RESERVATION by name, use
86870    /// `compute.googleapis.com/reservation-name` as the key and specify the name
86871    /// of your reservation as its value.
86872    pub key: std::string::String,
86873
86874    /// Optional. Corresponds to the label values of a reservation resource. This
86875    /// must be the full resource name of the reservation.
86876    pub values: std::vec::Vec<std::string::String>,
86877
86878    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
86879}
86880
86881#[cfg(any(
86882    feature = "deployment-resource-pool-service",
86883    feature = "endpoint-service",
86884    feature = "index-endpoint-service",
86885    feature = "job-service",
86886    feature = "model-garden-service",
86887    feature = "notebook-service",
86888    feature = "persistent-resource-service",
86889    feature = "schedule-service",
86890))]
86891impl ReservationAffinity {
86892    pub fn new() -> Self {
86893        std::default::Default::default()
86894    }
86895
86896    /// Sets the value of [reservation_affinity_type][crate::model::ReservationAffinity::reservation_affinity_type].
86897    pub fn set_reservation_affinity_type<
86898        T: std::convert::Into<crate::model::reservation_affinity::Type>,
86899    >(
86900        mut self,
86901        v: T,
86902    ) -> Self {
86903        self.reservation_affinity_type = v.into();
86904        self
86905    }
86906
86907    /// Sets the value of [key][crate::model::ReservationAffinity::key].
86908    pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
86909        self.key = v.into();
86910        self
86911    }
86912
86913    /// Sets the value of [values][crate::model::ReservationAffinity::values].
86914    pub fn set_values<T, V>(mut self, v: T) -> Self
86915    where
86916        T: std::iter::IntoIterator<Item = V>,
86917        V: std::convert::Into<std::string::String>,
86918    {
86919        use std::iter::Iterator;
86920        self.values = v.into_iter().map(|i| i.into()).collect();
86921        self
86922    }
86923}
86924
86925#[cfg(any(
86926    feature = "deployment-resource-pool-service",
86927    feature = "endpoint-service",
86928    feature = "index-endpoint-service",
86929    feature = "job-service",
86930    feature = "model-garden-service",
86931    feature = "notebook-service",
86932    feature = "persistent-resource-service",
86933    feature = "schedule-service",
86934))]
86935impl wkt::message::Message for ReservationAffinity {
86936    fn typename() -> &'static str {
86937        "type.googleapis.com/google.cloud.aiplatform.v1.ReservationAffinity"
86938    }
86939}
86940
86941/// Defines additional types related to [ReservationAffinity].
86942#[cfg(any(
86943    feature = "deployment-resource-pool-service",
86944    feature = "endpoint-service",
86945    feature = "index-endpoint-service",
86946    feature = "job-service",
86947    feature = "model-garden-service",
86948    feature = "notebook-service",
86949    feature = "persistent-resource-service",
86950    feature = "schedule-service",
86951))]
86952pub mod reservation_affinity {
86953    #[allow(unused_imports)]
86954    use super::*;
86955
86956    /// Identifies a type of reservation affinity.
86957    ///
86958    /// # Working with unknown values
86959    ///
86960    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
86961    /// additional enum variants at any time. Adding new variants is not considered
86962    /// a breaking change. Applications should write their code in anticipation of:
86963    ///
86964    /// - New values appearing in future releases of the client library, **and**
86965    /// - New values received dynamically, without application changes.
86966    ///
86967    /// Please consult the [Working with enums] section in the user guide for some
86968    /// guidelines.
86969    ///
86970    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
86971    #[cfg(any(
86972        feature = "deployment-resource-pool-service",
86973        feature = "endpoint-service",
86974        feature = "index-endpoint-service",
86975        feature = "job-service",
86976        feature = "model-garden-service",
86977        feature = "notebook-service",
86978        feature = "persistent-resource-service",
86979        feature = "schedule-service",
86980    ))]
86981    #[derive(Clone, Debug, PartialEq)]
86982    #[non_exhaustive]
86983    pub enum Type {
86984        /// Default value. This should not be used.
86985        Unspecified,
86986        /// Do not consume from any reserved capacity, only use on-demand.
86987        NoReservation,
86988        /// Consume any reservation available, falling back to on-demand.
86989        AnyReservation,
86990        /// Consume from a specific reservation. When chosen, the reservation
86991        /// must be identified via the `key` and `values` fields.
86992        SpecificReservation,
86993        /// If set, the enum was initialized with an unknown value.
86994        ///
86995        /// Applications can examine the value using [Type::value] or
86996        /// [Type::name].
86997        UnknownValue(r#type::UnknownValue),
86998    }
86999
87000    #[doc(hidden)]
87001    #[cfg(any(
87002        feature = "deployment-resource-pool-service",
87003        feature = "endpoint-service",
87004        feature = "index-endpoint-service",
87005        feature = "job-service",
87006        feature = "model-garden-service",
87007        feature = "notebook-service",
87008        feature = "persistent-resource-service",
87009        feature = "schedule-service",
87010    ))]
87011    pub mod r#type {
87012        #[allow(unused_imports)]
87013        use super::*;
87014        #[derive(Clone, Debug, PartialEq)]
87015        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
87016    }
87017
87018    #[cfg(any(
87019        feature = "deployment-resource-pool-service",
87020        feature = "endpoint-service",
87021        feature = "index-endpoint-service",
87022        feature = "job-service",
87023        feature = "model-garden-service",
87024        feature = "notebook-service",
87025        feature = "persistent-resource-service",
87026        feature = "schedule-service",
87027    ))]
87028    impl Type {
87029        /// Gets the enum value.
87030        ///
87031        /// Returns `None` if the enum contains an unknown value deserialized from
87032        /// the string representation of enums.
87033        pub fn value(&self) -> std::option::Option<i32> {
87034            match self {
87035                Self::Unspecified => std::option::Option::Some(0),
87036                Self::NoReservation => std::option::Option::Some(1),
87037                Self::AnyReservation => std::option::Option::Some(2),
87038                Self::SpecificReservation => std::option::Option::Some(3),
87039                Self::UnknownValue(u) => u.0.value(),
87040            }
87041        }
87042
87043        /// Gets the enum value as a string.
87044        ///
87045        /// Returns `None` if the enum contains an unknown value deserialized from
87046        /// the integer representation of enums.
87047        pub fn name(&self) -> std::option::Option<&str> {
87048            match self {
87049                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
87050                Self::NoReservation => std::option::Option::Some("NO_RESERVATION"),
87051                Self::AnyReservation => std::option::Option::Some("ANY_RESERVATION"),
87052                Self::SpecificReservation => std::option::Option::Some("SPECIFIC_RESERVATION"),
87053                Self::UnknownValue(u) => u.0.name(),
87054            }
87055        }
87056    }
87057
87058    #[cfg(any(
87059        feature = "deployment-resource-pool-service",
87060        feature = "endpoint-service",
87061        feature = "index-endpoint-service",
87062        feature = "job-service",
87063        feature = "model-garden-service",
87064        feature = "notebook-service",
87065        feature = "persistent-resource-service",
87066        feature = "schedule-service",
87067    ))]
87068    impl std::default::Default for Type {
87069        fn default() -> Self {
87070            use std::convert::From;
87071            Self::from(0)
87072        }
87073    }
87074
87075    #[cfg(any(
87076        feature = "deployment-resource-pool-service",
87077        feature = "endpoint-service",
87078        feature = "index-endpoint-service",
87079        feature = "job-service",
87080        feature = "model-garden-service",
87081        feature = "notebook-service",
87082        feature = "persistent-resource-service",
87083        feature = "schedule-service",
87084    ))]
87085    impl std::fmt::Display for Type {
87086        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
87087            wkt::internal::display_enum(f, self.name(), self.value())
87088        }
87089    }
87090
87091    #[cfg(any(
87092        feature = "deployment-resource-pool-service",
87093        feature = "endpoint-service",
87094        feature = "index-endpoint-service",
87095        feature = "job-service",
87096        feature = "model-garden-service",
87097        feature = "notebook-service",
87098        feature = "persistent-resource-service",
87099        feature = "schedule-service",
87100    ))]
87101    impl std::convert::From<i32> for Type {
87102        fn from(value: i32) -> Self {
87103            match value {
87104                0 => Self::Unspecified,
87105                1 => Self::NoReservation,
87106                2 => Self::AnyReservation,
87107                3 => Self::SpecificReservation,
87108                _ => Self::UnknownValue(r#type::UnknownValue(
87109                    wkt::internal::UnknownEnumValue::Integer(value),
87110                )),
87111            }
87112        }
87113    }
87114
87115    #[cfg(any(
87116        feature = "deployment-resource-pool-service",
87117        feature = "endpoint-service",
87118        feature = "index-endpoint-service",
87119        feature = "job-service",
87120        feature = "model-garden-service",
87121        feature = "notebook-service",
87122        feature = "persistent-resource-service",
87123        feature = "schedule-service",
87124    ))]
87125    impl std::convert::From<&str> for Type {
87126        fn from(value: &str) -> Self {
87127            use std::string::ToString;
87128            match value {
87129                "TYPE_UNSPECIFIED" => Self::Unspecified,
87130                "NO_RESERVATION" => Self::NoReservation,
87131                "ANY_RESERVATION" => Self::AnyReservation,
87132                "SPECIFIC_RESERVATION" => Self::SpecificReservation,
87133                _ => Self::UnknownValue(r#type::UnknownValue(
87134                    wkt::internal::UnknownEnumValue::String(value.to_string()),
87135                )),
87136            }
87137        }
87138    }
87139
87140    #[cfg(any(
87141        feature = "deployment-resource-pool-service",
87142        feature = "endpoint-service",
87143        feature = "index-endpoint-service",
87144        feature = "job-service",
87145        feature = "model-garden-service",
87146        feature = "notebook-service",
87147        feature = "persistent-resource-service",
87148        feature = "schedule-service",
87149    ))]
87150    impl serde::ser::Serialize for Type {
87151        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
87152        where
87153            S: serde::Serializer,
87154        {
87155            match self {
87156                Self::Unspecified => serializer.serialize_i32(0),
87157                Self::NoReservation => serializer.serialize_i32(1),
87158                Self::AnyReservation => serializer.serialize_i32(2),
87159                Self::SpecificReservation => serializer.serialize_i32(3),
87160                Self::UnknownValue(u) => u.0.serialize(serializer),
87161            }
87162        }
87163    }
87164
87165    #[cfg(any(
87166        feature = "deployment-resource-pool-service",
87167        feature = "endpoint-service",
87168        feature = "index-endpoint-service",
87169        feature = "job-service",
87170        feature = "model-garden-service",
87171        feature = "notebook-service",
87172        feature = "persistent-resource-service",
87173        feature = "schedule-service",
87174    ))]
87175    impl<'de> serde::de::Deserialize<'de> for Type {
87176        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
87177        where
87178            D: serde::Deserializer<'de>,
87179        {
87180            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
87181                ".google.cloud.aiplatform.v1.ReservationAffinity.Type",
87182            ))
87183        }
87184    }
87185}
87186
87187/// A SavedQuery is a view of the dataset. It references a subset of annotations
87188/// by problem type and filters.
87189#[cfg(feature = "dataset-service")]
87190#[derive(Clone, Default, PartialEq)]
87191#[non_exhaustive]
87192pub struct SavedQuery {
87193    /// Output only. Resource name of the SavedQuery.
87194    pub name: std::string::String,
87195
87196    /// Required. The user-defined name of the SavedQuery.
87197    /// The name can be up to 128 characters long and can consist of any UTF-8
87198    /// characters.
87199    pub display_name: std::string::String,
87200
87201    /// Some additional information about the SavedQuery.
87202    pub metadata: std::option::Option<wkt::Value>,
87203
87204    /// Output only. Timestamp when this SavedQuery was created.
87205    pub create_time: std::option::Option<wkt::Timestamp>,
87206
87207    /// Output only. Timestamp when SavedQuery was last updated.
87208    pub update_time: std::option::Option<wkt::Timestamp>,
87209
87210    /// Output only. Filters on the Annotations in the dataset.
87211    pub annotation_filter: std::string::String,
87212
87213    /// Required. Problem type of the SavedQuery.
87214    /// Allowed values:
87215    ///
87216    /// * IMAGE_CLASSIFICATION_SINGLE_LABEL
87217    /// * IMAGE_CLASSIFICATION_MULTI_LABEL
87218    /// * IMAGE_BOUNDING_POLY
87219    /// * IMAGE_BOUNDING_BOX
87220    /// * TEXT_CLASSIFICATION_SINGLE_LABEL
87221    /// * TEXT_CLASSIFICATION_MULTI_LABEL
87222    /// * TEXT_EXTRACTION
87223    /// * TEXT_SENTIMENT
87224    /// * VIDEO_CLASSIFICATION
87225    /// * VIDEO_OBJECT_TRACKING
87226    pub problem_type: std::string::String,
87227
87228    /// Output only. Number of AnnotationSpecs in the context of the SavedQuery.
87229    pub annotation_spec_count: i32,
87230
87231    /// Used to perform a consistent read-modify-write update. If not set, a blind
87232    /// "overwrite" update happens.
87233    pub etag: std::string::String,
87234
87235    /// Output only. If the Annotations belonging to the SavedQuery can be used for
87236    /// AutoML training.
87237    pub support_automl_training: bool,
87238
87239    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
87240}
87241
87242#[cfg(feature = "dataset-service")]
87243impl SavedQuery {
87244    pub fn new() -> Self {
87245        std::default::Default::default()
87246    }
87247
87248    /// Sets the value of [name][crate::model::SavedQuery::name].
87249    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
87250        self.name = v.into();
87251        self
87252    }
87253
87254    /// Sets the value of [display_name][crate::model::SavedQuery::display_name].
87255    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
87256        self.display_name = v.into();
87257        self
87258    }
87259
87260    /// Sets the value of [metadata][crate::model::SavedQuery::metadata].
87261    pub fn set_metadata<T>(mut self, v: T) -> Self
87262    where
87263        T: std::convert::Into<wkt::Value>,
87264    {
87265        self.metadata = std::option::Option::Some(v.into());
87266        self
87267    }
87268
87269    /// Sets or clears the value of [metadata][crate::model::SavedQuery::metadata].
87270    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
87271    where
87272        T: std::convert::Into<wkt::Value>,
87273    {
87274        self.metadata = v.map(|x| x.into());
87275        self
87276    }
87277
87278    /// Sets the value of [create_time][crate::model::SavedQuery::create_time].
87279    pub fn set_create_time<T>(mut self, v: T) -> Self
87280    where
87281        T: std::convert::Into<wkt::Timestamp>,
87282    {
87283        self.create_time = std::option::Option::Some(v.into());
87284        self
87285    }
87286
87287    /// Sets or clears the value of [create_time][crate::model::SavedQuery::create_time].
87288    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
87289    where
87290        T: std::convert::Into<wkt::Timestamp>,
87291    {
87292        self.create_time = v.map(|x| x.into());
87293        self
87294    }
87295
87296    /// Sets the value of [update_time][crate::model::SavedQuery::update_time].
87297    pub fn set_update_time<T>(mut self, v: T) -> Self
87298    where
87299        T: std::convert::Into<wkt::Timestamp>,
87300    {
87301        self.update_time = std::option::Option::Some(v.into());
87302        self
87303    }
87304
87305    /// Sets or clears the value of [update_time][crate::model::SavedQuery::update_time].
87306    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
87307    where
87308        T: std::convert::Into<wkt::Timestamp>,
87309    {
87310        self.update_time = v.map(|x| x.into());
87311        self
87312    }
87313
87314    /// Sets the value of [annotation_filter][crate::model::SavedQuery::annotation_filter].
87315    pub fn set_annotation_filter<T: std::convert::Into<std::string::String>>(
87316        mut self,
87317        v: T,
87318    ) -> Self {
87319        self.annotation_filter = v.into();
87320        self
87321    }
87322
87323    /// Sets the value of [problem_type][crate::model::SavedQuery::problem_type].
87324    pub fn set_problem_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
87325        self.problem_type = v.into();
87326        self
87327    }
87328
87329    /// Sets the value of [annotation_spec_count][crate::model::SavedQuery::annotation_spec_count].
87330    pub fn set_annotation_spec_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
87331        self.annotation_spec_count = v.into();
87332        self
87333    }
87334
87335    /// Sets the value of [etag][crate::model::SavedQuery::etag].
87336    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
87337        self.etag = v.into();
87338        self
87339    }
87340
87341    /// Sets the value of [support_automl_training][crate::model::SavedQuery::support_automl_training].
87342    pub fn set_support_automl_training<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
87343        self.support_automl_training = v.into();
87344        self
87345    }
87346}
87347
87348#[cfg(feature = "dataset-service")]
87349impl wkt::message::Message for SavedQuery {
87350    fn typename() -> &'static str {
87351        "type.googleapis.com/google.cloud.aiplatform.v1.SavedQuery"
87352    }
87353}
87354
87355/// An instance of a Schedule periodically schedules runs to make API calls based
87356/// on user specified time specification and API request type.
87357#[cfg(feature = "schedule-service")]
87358#[derive(Clone, Default, PartialEq)]
87359#[non_exhaustive]
87360pub struct Schedule {
87361    /// Immutable. The resource name of the Schedule.
87362    pub name: std::string::String,
87363
87364    /// Required. User provided name of the Schedule.
87365    /// The name can be up to 128 characters long and can consist of any UTF-8
87366    /// characters.
87367    pub display_name: std::string::String,
87368
87369    /// Optional. Timestamp after which the first run can be scheduled.
87370    /// Default to Schedule create time if not specified.
87371    pub start_time: std::option::Option<wkt::Timestamp>,
87372
87373    /// Optional. Timestamp after which no new runs can be scheduled.
87374    /// If specified, The schedule will be completed when either
87375    /// end_time is reached or when scheduled_run_count >= max_run_count.
87376    /// If not specified, new runs will keep getting scheduled until this Schedule
87377    /// is paused or deleted. Already scheduled runs will be allowed to complete.
87378    /// Unset if not specified.
87379    pub end_time: std::option::Option<wkt::Timestamp>,
87380
87381    /// Optional. Maximum run count of the schedule.
87382    /// If specified, The schedule will be completed when either
87383    /// started_run_count >= max_run_count or when end_time is reached.
87384    /// If not specified, new runs will keep getting scheduled until this Schedule
87385    /// is paused or deleted. Already scheduled runs will be allowed to complete.
87386    /// Unset if not specified.
87387    pub max_run_count: i64,
87388
87389    /// Output only. The number of runs started by this schedule.
87390    pub started_run_count: i64,
87391
87392    /// Output only. The state of this Schedule.
87393    pub state: crate::model::schedule::State,
87394
87395    /// Output only. Timestamp when this Schedule was created.
87396    pub create_time: std::option::Option<wkt::Timestamp>,
87397
87398    /// Output only. Timestamp when this Schedule was updated.
87399    pub update_time: std::option::Option<wkt::Timestamp>,
87400
87401    /// Output only. Timestamp when this Schedule should schedule the next run.
87402    /// Having a next_run_time in the past means the runs are being started
87403    /// behind schedule.
87404    pub next_run_time: std::option::Option<wkt::Timestamp>,
87405
87406    /// Output only. Timestamp when this Schedule was last paused.
87407    /// Unset if never paused.
87408    pub last_pause_time: std::option::Option<wkt::Timestamp>,
87409
87410    /// Output only. Timestamp when this Schedule was last resumed.
87411    /// Unset if never resumed from pause.
87412    pub last_resume_time: std::option::Option<wkt::Timestamp>,
87413
87414    /// Required. Maximum number of runs that can be started concurrently for this
87415    /// Schedule. This is the limit for starting the scheduled requests and not the
87416    /// execution of the operations/jobs created by the requests (if applicable).
87417    pub max_concurrent_run_count: i64,
87418
87419    /// Optional. Whether new scheduled runs can be queued when max_concurrent_runs
87420    /// limit is reached. If set to true, new runs will be queued instead of
87421    /// skipped. Default to false.
87422    pub allow_queueing: bool,
87423
87424    /// Output only. Whether to backfill missed runs when the schedule is resumed
87425    /// from PAUSED state. If set to true, all missed runs will be scheduled. New
87426    /// runs will be scheduled after the backfill is complete. Default to false.
87427    pub catch_up: bool,
87428
87429    /// Output only. Response of the last scheduled run.
87430    /// This is the response for starting the scheduled requests and not the
87431    /// execution of the operations/jobs created by the requests (if applicable).
87432    /// Unset if no run has been scheduled yet.
87433    pub last_scheduled_run_response: std::option::Option<crate::model::schedule::RunResponse>,
87434
87435    /// Required.
87436    /// The time specification to launch scheduled runs.
87437    pub time_specification: std::option::Option<crate::model::schedule::TimeSpecification>,
87438
87439    /// Required.
87440    /// The API request template to launch the scheduled runs.
87441    /// User-specified ID is not supported in the request template.
87442    pub request: std::option::Option<crate::model::schedule::Request>,
87443
87444    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
87445}
87446
87447#[cfg(feature = "schedule-service")]
87448impl Schedule {
87449    pub fn new() -> Self {
87450        std::default::Default::default()
87451    }
87452
87453    /// Sets the value of [name][crate::model::Schedule::name].
87454    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
87455        self.name = v.into();
87456        self
87457    }
87458
87459    /// Sets the value of [display_name][crate::model::Schedule::display_name].
87460    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
87461        self.display_name = v.into();
87462        self
87463    }
87464
87465    /// Sets the value of [start_time][crate::model::Schedule::start_time].
87466    pub fn set_start_time<T>(mut self, v: T) -> Self
87467    where
87468        T: std::convert::Into<wkt::Timestamp>,
87469    {
87470        self.start_time = std::option::Option::Some(v.into());
87471        self
87472    }
87473
87474    /// Sets or clears the value of [start_time][crate::model::Schedule::start_time].
87475    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
87476    where
87477        T: std::convert::Into<wkt::Timestamp>,
87478    {
87479        self.start_time = v.map(|x| x.into());
87480        self
87481    }
87482
87483    /// Sets the value of [end_time][crate::model::Schedule::end_time].
87484    pub fn set_end_time<T>(mut self, v: T) -> Self
87485    where
87486        T: std::convert::Into<wkt::Timestamp>,
87487    {
87488        self.end_time = std::option::Option::Some(v.into());
87489        self
87490    }
87491
87492    /// Sets or clears the value of [end_time][crate::model::Schedule::end_time].
87493    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
87494    where
87495        T: std::convert::Into<wkt::Timestamp>,
87496    {
87497        self.end_time = v.map(|x| x.into());
87498        self
87499    }
87500
87501    /// Sets the value of [max_run_count][crate::model::Schedule::max_run_count].
87502    pub fn set_max_run_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
87503        self.max_run_count = v.into();
87504        self
87505    }
87506
87507    /// Sets the value of [started_run_count][crate::model::Schedule::started_run_count].
87508    pub fn set_started_run_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
87509        self.started_run_count = v.into();
87510        self
87511    }
87512
87513    /// Sets the value of [state][crate::model::Schedule::state].
87514    pub fn set_state<T: std::convert::Into<crate::model::schedule::State>>(mut self, v: T) -> Self {
87515        self.state = v.into();
87516        self
87517    }
87518
87519    /// Sets the value of [create_time][crate::model::Schedule::create_time].
87520    pub fn set_create_time<T>(mut self, v: T) -> Self
87521    where
87522        T: std::convert::Into<wkt::Timestamp>,
87523    {
87524        self.create_time = std::option::Option::Some(v.into());
87525        self
87526    }
87527
87528    /// Sets or clears the value of [create_time][crate::model::Schedule::create_time].
87529    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
87530    where
87531        T: std::convert::Into<wkt::Timestamp>,
87532    {
87533        self.create_time = v.map(|x| x.into());
87534        self
87535    }
87536
87537    /// Sets the value of [update_time][crate::model::Schedule::update_time].
87538    pub fn set_update_time<T>(mut self, v: T) -> Self
87539    where
87540        T: std::convert::Into<wkt::Timestamp>,
87541    {
87542        self.update_time = std::option::Option::Some(v.into());
87543        self
87544    }
87545
87546    /// Sets or clears the value of [update_time][crate::model::Schedule::update_time].
87547    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
87548    where
87549        T: std::convert::Into<wkt::Timestamp>,
87550    {
87551        self.update_time = v.map(|x| x.into());
87552        self
87553    }
87554
87555    /// Sets the value of [next_run_time][crate::model::Schedule::next_run_time].
87556    pub fn set_next_run_time<T>(mut self, v: T) -> Self
87557    where
87558        T: std::convert::Into<wkt::Timestamp>,
87559    {
87560        self.next_run_time = std::option::Option::Some(v.into());
87561        self
87562    }
87563
87564    /// Sets or clears the value of [next_run_time][crate::model::Schedule::next_run_time].
87565    pub fn set_or_clear_next_run_time<T>(mut self, v: std::option::Option<T>) -> Self
87566    where
87567        T: std::convert::Into<wkt::Timestamp>,
87568    {
87569        self.next_run_time = v.map(|x| x.into());
87570        self
87571    }
87572
87573    /// Sets the value of [last_pause_time][crate::model::Schedule::last_pause_time].
87574    pub fn set_last_pause_time<T>(mut self, v: T) -> Self
87575    where
87576        T: std::convert::Into<wkt::Timestamp>,
87577    {
87578        self.last_pause_time = std::option::Option::Some(v.into());
87579        self
87580    }
87581
87582    /// Sets or clears the value of [last_pause_time][crate::model::Schedule::last_pause_time].
87583    pub fn set_or_clear_last_pause_time<T>(mut self, v: std::option::Option<T>) -> Self
87584    where
87585        T: std::convert::Into<wkt::Timestamp>,
87586    {
87587        self.last_pause_time = v.map(|x| x.into());
87588        self
87589    }
87590
87591    /// Sets the value of [last_resume_time][crate::model::Schedule::last_resume_time].
87592    pub fn set_last_resume_time<T>(mut self, v: T) -> Self
87593    where
87594        T: std::convert::Into<wkt::Timestamp>,
87595    {
87596        self.last_resume_time = std::option::Option::Some(v.into());
87597        self
87598    }
87599
87600    /// Sets or clears the value of [last_resume_time][crate::model::Schedule::last_resume_time].
87601    pub fn set_or_clear_last_resume_time<T>(mut self, v: std::option::Option<T>) -> Self
87602    where
87603        T: std::convert::Into<wkt::Timestamp>,
87604    {
87605        self.last_resume_time = v.map(|x| x.into());
87606        self
87607    }
87608
87609    /// Sets the value of [max_concurrent_run_count][crate::model::Schedule::max_concurrent_run_count].
87610    pub fn set_max_concurrent_run_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
87611        self.max_concurrent_run_count = v.into();
87612        self
87613    }
87614
87615    /// Sets the value of [allow_queueing][crate::model::Schedule::allow_queueing].
87616    pub fn set_allow_queueing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
87617        self.allow_queueing = v.into();
87618        self
87619    }
87620
87621    /// Sets the value of [catch_up][crate::model::Schedule::catch_up].
87622    pub fn set_catch_up<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
87623        self.catch_up = v.into();
87624        self
87625    }
87626
87627    /// Sets the value of [last_scheduled_run_response][crate::model::Schedule::last_scheduled_run_response].
87628    pub fn set_last_scheduled_run_response<T>(mut self, v: T) -> Self
87629    where
87630        T: std::convert::Into<crate::model::schedule::RunResponse>,
87631    {
87632        self.last_scheduled_run_response = std::option::Option::Some(v.into());
87633        self
87634    }
87635
87636    /// Sets or clears the value of [last_scheduled_run_response][crate::model::Schedule::last_scheduled_run_response].
87637    pub fn set_or_clear_last_scheduled_run_response<T>(mut self, v: std::option::Option<T>) -> Self
87638    where
87639        T: std::convert::Into<crate::model::schedule::RunResponse>,
87640    {
87641        self.last_scheduled_run_response = v.map(|x| x.into());
87642        self
87643    }
87644
87645    /// Sets the value of [time_specification][crate::model::Schedule::time_specification].
87646    ///
87647    /// Note that all the setters affecting `time_specification` are mutually
87648    /// exclusive.
87649    pub fn set_time_specification<
87650        T: std::convert::Into<std::option::Option<crate::model::schedule::TimeSpecification>>,
87651    >(
87652        mut self,
87653        v: T,
87654    ) -> Self {
87655        self.time_specification = v.into();
87656        self
87657    }
87658
87659    /// The value of [time_specification][crate::model::Schedule::time_specification]
87660    /// if it holds a `Cron`, `None` if the field is not set or
87661    /// holds a different branch.
87662    pub fn cron(&self) -> std::option::Option<&std::string::String> {
87663        #[allow(unreachable_patterns)]
87664        self.time_specification.as_ref().and_then(|v| match v {
87665            crate::model::schedule::TimeSpecification::Cron(v) => std::option::Option::Some(v),
87666            _ => std::option::Option::None,
87667        })
87668    }
87669
87670    /// Sets the value of [time_specification][crate::model::Schedule::time_specification]
87671    /// to hold a `Cron`.
87672    ///
87673    /// Note that all the setters affecting `time_specification` are
87674    /// mutually exclusive.
87675    pub fn set_cron<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
87676        self.time_specification =
87677            std::option::Option::Some(crate::model::schedule::TimeSpecification::Cron(v.into()));
87678        self
87679    }
87680
87681    /// Sets the value of [request][crate::model::Schedule::request].
87682    ///
87683    /// Note that all the setters affecting `request` are mutually
87684    /// exclusive.
87685    pub fn set_request<
87686        T: std::convert::Into<std::option::Option<crate::model::schedule::Request>>,
87687    >(
87688        mut self,
87689        v: T,
87690    ) -> Self {
87691        self.request = v.into();
87692        self
87693    }
87694
87695    /// The value of [request][crate::model::Schedule::request]
87696    /// if it holds a `CreatePipelineJobRequest`, `None` if the field is not set or
87697    /// holds a different branch.
87698    pub fn create_pipeline_job_request(
87699        &self,
87700    ) -> std::option::Option<&std::boxed::Box<crate::model::CreatePipelineJobRequest>> {
87701        #[allow(unreachable_patterns)]
87702        self.request.as_ref().and_then(|v| match v {
87703            crate::model::schedule::Request::CreatePipelineJobRequest(v) => {
87704                std::option::Option::Some(v)
87705            }
87706            _ => std::option::Option::None,
87707        })
87708    }
87709
87710    /// Sets the value of [request][crate::model::Schedule::request]
87711    /// to hold a `CreatePipelineJobRequest`.
87712    ///
87713    /// Note that all the setters affecting `request` are
87714    /// mutually exclusive.
87715    pub fn set_create_pipeline_job_request<
87716        T: std::convert::Into<std::boxed::Box<crate::model::CreatePipelineJobRequest>>,
87717    >(
87718        mut self,
87719        v: T,
87720    ) -> Self {
87721        self.request = std::option::Option::Some(
87722            crate::model::schedule::Request::CreatePipelineJobRequest(v.into()),
87723        );
87724        self
87725    }
87726
87727    /// The value of [request][crate::model::Schedule::request]
87728    /// if it holds a `CreateNotebookExecutionJobRequest`, `None` if the field is not set or
87729    /// holds a different branch.
87730    pub fn create_notebook_execution_job_request(
87731        &self,
87732    ) -> std::option::Option<&std::boxed::Box<crate::model::CreateNotebookExecutionJobRequest>>
87733    {
87734        #[allow(unreachable_patterns)]
87735        self.request.as_ref().and_then(|v| match v {
87736            crate::model::schedule::Request::CreateNotebookExecutionJobRequest(v) => {
87737                std::option::Option::Some(v)
87738            }
87739            _ => std::option::Option::None,
87740        })
87741    }
87742
87743    /// Sets the value of [request][crate::model::Schedule::request]
87744    /// to hold a `CreateNotebookExecutionJobRequest`.
87745    ///
87746    /// Note that all the setters affecting `request` are
87747    /// mutually exclusive.
87748    pub fn set_create_notebook_execution_job_request<
87749        T: std::convert::Into<std::boxed::Box<crate::model::CreateNotebookExecutionJobRequest>>,
87750    >(
87751        mut self,
87752        v: T,
87753    ) -> Self {
87754        self.request = std::option::Option::Some(
87755            crate::model::schedule::Request::CreateNotebookExecutionJobRequest(v.into()),
87756        );
87757        self
87758    }
87759}
87760
87761#[cfg(feature = "schedule-service")]
87762impl wkt::message::Message for Schedule {
87763    fn typename() -> &'static str {
87764        "type.googleapis.com/google.cloud.aiplatform.v1.Schedule"
87765    }
87766}
87767
87768/// Defines additional types related to [Schedule].
87769#[cfg(feature = "schedule-service")]
87770pub mod schedule {
87771    #[allow(unused_imports)]
87772    use super::*;
87773
87774    /// Status of a scheduled run.
87775    #[cfg(feature = "schedule-service")]
87776    #[derive(Clone, Default, PartialEq)]
87777    #[non_exhaustive]
87778    pub struct RunResponse {
87779        /// The scheduled run time based on the user-specified schedule.
87780        pub scheduled_run_time: std::option::Option<wkt::Timestamp>,
87781
87782        /// The response of the scheduled run.
87783        pub run_response: std::string::String,
87784
87785        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
87786    }
87787
87788    #[cfg(feature = "schedule-service")]
87789    impl RunResponse {
87790        pub fn new() -> Self {
87791            std::default::Default::default()
87792        }
87793
87794        /// Sets the value of [scheduled_run_time][crate::model::schedule::RunResponse::scheduled_run_time].
87795        pub fn set_scheduled_run_time<T>(mut self, v: T) -> Self
87796        where
87797            T: std::convert::Into<wkt::Timestamp>,
87798        {
87799            self.scheduled_run_time = std::option::Option::Some(v.into());
87800            self
87801        }
87802
87803        /// Sets or clears the value of [scheduled_run_time][crate::model::schedule::RunResponse::scheduled_run_time].
87804        pub fn set_or_clear_scheduled_run_time<T>(mut self, v: std::option::Option<T>) -> Self
87805        where
87806            T: std::convert::Into<wkt::Timestamp>,
87807        {
87808            self.scheduled_run_time = v.map(|x| x.into());
87809            self
87810        }
87811
87812        /// Sets the value of [run_response][crate::model::schedule::RunResponse::run_response].
87813        pub fn set_run_response<T: std::convert::Into<std::string::String>>(
87814            mut self,
87815            v: T,
87816        ) -> Self {
87817            self.run_response = v.into();
87818            self
87819        }
87820    }
87821
87822    #[cfg(feature = "schedule-service")]
87823    impl wkt::message::Message for RunResponse {
87824        fn typename() -> &'static str {
87825            "type.googleapis.com/google.cloud.aiplatform.v1.Schedule.RunResponse"
87826        }
87827    }
87828
87829    /// Possible state of the schedule.
87830    ///
87831    /// # Working with unknown values
87832    ///
87833    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
87834    /// additional enum variants at any time. Adding new variants is not considered
87835    /// a breaking change. Applications should write their code in anticipation of:
87836    ///
87837    /// - New values appearing in future releases of the client library, **and**
87838    /// - New values received dynamically, without application changes.
87839    ///
87840    /// Please consult the [Working with enums] section in the user guide for some
87841    /// guidelines.
87842    ///
87843    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
87844    #[cfg(feature = "schedule-service")]
87845    #[derive(Clone, Debug, PartialEq)]
87846    #[non_exhaustive]
87847    pub enum State {
87848        /// Unspecified.
87849        Unspecified,
87850        /// The Schedule is active. Runs are being scheduled on the user-specified
87851        /// timespec.
87852        Active,
87853        /// The schedule is paused. No new runs will be created until the schedule
87854        /// is resumed. Already started runs will be allowed to complete.
87855        Paused,
87856        /// The Schedule is completed. No new runs will be scheduled. Already started
87857        /// runs will be allowed to complete. Schedules in completed state cannot be
87858        /// paused or resumed.
87859        Completed,
87860        /// If set, the enum was initialized with an unknown value.
87861        ///
87862        /// Applications can examine the value using [State::value] or
87863        /// [State::name].
87864        UnknownValue(state::UnknownValue),
87865    }
87866
87867    #[doc(hidden)]
87868    #[cfg(feature = "schedule-service")]
87869    pub mod state {
87870        #[allow(unused_imports)]
87871        use super::*;
87872        #[derive(Clone, Debug, PartialEq)]
87873        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
87874    }
87875
87876    #[cfg(feature = "schedule-service")]
87877    impl State {
87878        /// Gets the enum value.
87879        ///
87880        /// Returns `None` if the enum contains an unknown value deserialized from
87881        /// the string representation of enums.
87882        pub fn value(&self) -> std::option::Option<i32> {
87883            match self {
87884                Self::Unspecified => std::option::Option::Some(0),
87885                Self::Active => std::option::Option::Some(1),
87886                Self::Paused => std::option::Option::Some(2),
87887                Self::Completed => std::option::Option::Some(3),
87888                Self::UnknownValue(u) => u.0.value(),
87889            }
87890        }
87891
87892        /// Gets the enum value as a string.
87893        ///
87894        /// Returns `None` if the enum contains an unknown value deserialized from
87895        /// the integer representation of enums.
87896        pub fn name(&self) -> std::option::Option<&str> {
87897            match self {
87898                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
87899                Self::Active => std::option::Option::Some("ACTIVE"),
87900                Self::Paused => std::option::Option::Some("PAUSED"),
87901                Self::Completed => std::option::Option::Some("COMPLETED"),
87902                Self::UnknownValue(u) => u.0.name(),
87903            }
87904        }
87905    }
87906
87907    #[cfg(feature = "schedule-service")]
87908    impl std::default::Default for State {
87909        fn default() -> Self {
87910            use std::convert::From;
87911            Self::from(0)
87912        }
87913    }
87914
87915    #[cfg(feature = "schedule-service")]
87916    impl std::fmt::Display for State {
87917        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
87918            wkt::internal::display_enum(f, self.name(), self.value())
87919        }
87920    }
87921
87922    #[cfg(feature = "schedule-service")]
87923    impl std::convert::From<i32> for State {
87924        fn from(value: i32) -> Self {
87925            match value {
87926                0 => Self::Unspecified,
87927                1 => Self::Active,
87928                2 => Self::Paused,
87929                3 => Self::Completed,
87930                _ => Self::UnknownValue(state::UnknownValue(
87931                    wkt::internal::UnknownEnumValue::Integer(value),
87932                )),
87933            }
87934        }
87935    }
87936
87937    #[cfg(feature = "schedule-service")]
87938    impl std::convert::From<&str> for State {
87939        fn from(value: &str) -> Self {
87940            use std::string::ToString;
87941            match value {
87942                "STATE_UNSPECIFIED" => Self::Unspecified,
87943                "ACTIVE" => Self::Active,
87944                "PAUSED" => Self::Paused,
87945                "COMPLETED" => Self::Completed,
87946                _ => Self::UnknownValue(state::UnknownValue(
87947                    wkt::internal::UnknownEnumValue::String(value.to_string()),
87948                )),
87949            }
87950        }
87951    }
87952
87953    #[cfg(feature = "schedule-service")]
87954    impl serde::ser::Serialize for State {
87955        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
87956        where
87957            S: serde::Serializer,
87958        {
87959            match self {
87960                Self::Unspecified => serializer.serialize_i32(0),
87961                Self::Active => serializer.serialize_i32(1),
87962                Self::Paused => serializer.serialize_i32(2),
87963                Self::Completed => serializer.serialize_i32(3),
87964                Self::UnknownValue(u) => u.0.serialize(serializer),
87965            }
87966        }
87967    }
87968
87969    #[cfg(feature = "schedule-service")]
87970    impl<'de> serde::de::Deserialize<'de> for State {
87971        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
87972        where
87973            D: serde::Deserializer<'de>,
87974        {
87975            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
87976                ".google.cloud.aiplatform.v1.Schedule.State",
87977            ))
87978        }
87979    }
87980
87981    /// Required.
87982    /// The time specification to launch scheduled runs.
87983    #[cfg(feature = "schedule-service")]
87984    #[derive(Clone, Debug, PartialEq)]
87985    #[non_exhaustive]
87986    pub enum TimeSpecification {
87987        /// Cron schedule (<https://en.wikipedia.org/wiki/Cron>) to launch scheduled
87988        /// runs. To explicitly set a timezone to the cron tab, apply a prefix in the
87989        /// cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
87990        /// The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
87991        /// database. For example, "CRON_TZ=America/New_York 1 * * * *", or
87992        /// "TZ=America/New_York 1 * * * *".
87993        Cron(std::string::String),
87994    }
87995
87996    /// Required.
87997    /// The API request template to launch the scheduled runs.
87998    /// User-specified ID is not supported in the request template.
87999    #[cfg(feature = "schedule-service")]
88000    #[derive(Clone, Debug, PartialEq)]
88001    #[non_exhaustive]
88002    pub enum Request {
88003        /// Request for
88004        /// [PipelineService.CreatePipelineJob][google.cloud.aiplatform.v1.PipelineService.CreatePipelineJob].
88005        /// CreatePipelineJobRequest.parent field is required (format:
88006        /// projects/{project}/locations/{location}).
88007        ///
88008        /// [google.cloud.aiplatform.v1.PipelineService.CreatePipelineJob]: crate::client::PipelineService::create_pipeline_job
88009        CreatePipelineJobRequest(std::boxed::Box<crate::model::CreatePipelineJobRequest>),
88010        /// Request for
88011        /// [NotebookService.CreateNotebookExecutionJob][google.cloud.aiplatform.v1.NotebookService.CreateNotebookExecutionJob].
88012        ///
88013        /// [google.cloud.aiplatform.v1.NotebookService.CreateNotebookExecutionJob]: crate::client::NotebookService::create_notebook_execution_job
88014        CreateNotebookExecutionJobRequest(
88015            std::boxed::Box<crate::model::CreateNotebookExecutionJobRequest>,
88016        ),
88017    }
88018}
88019
88020/// Request message for
88021/// [ScheduleService.CreateSchedule][google.cloud.aiplatform.v1.ScheduleService.CreateSchedule].
88022///
88023/// [google.cloud.aiplatform.v1.ScheduleService.CreateSchedule]: crate::client::ScheduleService::create_schedule
88024#[cfg(feature = "schedule-service")]
88025#[derive(Clone, Default, PartialEq)]
88026#[non_exhaustive]
88027pub struct CreateScheduleRequest {
88028    /// Required. The resource name of the Location to create the Schedule in.
88029    /// Format: `projects/{project}/locations/{location}`
88030    pub parent: std::string::String,
88031
88032    /// Required. The Schedule to create.
88033    pub schedule: std::option::Option<crate::model::Schedule>,
88034
88035    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
88036}
88037
88038#[cfg(feature = "schedule-service")]
88039impl CreateScheduleRequest {
88040    pub fn new() -> Self {
88041        std::default::Default::default()
88042    }
88043
88044    /// Sets the value of [parent][crate::model::CreateScheduleRequest::parent].
88045    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88046        self.parent = v.into();
88047        self
88048    }
88049
88050    /// Sets the value of [schedule][crate::model::CreateScheduleRequest::schedule].
88051    pub fn set_schedule<T>(mut self, v: T) -> Self
88052    where
88053        T: std::convert::Into<crate::model::Schedule>,
88054    {
88055        self.schedule = std::option::Option::Some(v.into());
88056        self
88057    }
88058
88059    /// Sets or clears the value of [schedule][crate::model::CreateScheduleRequest::schedule].
88060    pub fn set_or_clear_schedule<T>(mut self, v: std::option::Option<T>) -> Self
88061    where
88062        T: std::convert::Into<crate::model::Schedule>,
88063    {
88064        self.schedule = v.map(|x| x.into());
88065        self
88066    }
88067}
88068
88069#[cfg(feature = "schedule-service")]
88070impl wkt::message::Message for CreateScheduleRequest {
88071    fn typename() -> &'static str {
88072        "type.googleapis.com/google.cloud.aiplatform.v1.CreateScheduleRequest"
88073    }
88074}
88075
88076/// Request message for
88077/// [ScheduleService.GetSchedule][google.cloud.aiplatform.v1.ScheduleService.GetSchedule].
88078///
88079/// [google.cloud.aiplatform.v1.ScheduleService.GetSchedule]: crate::client::ScheduleService::get_schedule
88080#[cfg(feature = "schedule-service")]
88081#[derive(Clone, Default, PartialEq)]
88082#[non_exhaustive]
88083pub struct GetScheduleRequest {
88084    /// Required. The name of the Schedule resource.
88085    /// Format:
88086    /// `projects/{project}/locations/{location}/schedules/{schedule}`
88087    pub name: std::string::String,
88088
88089    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
88090}
88091
88092#[cfg(feature = "schedule-service")]
88093impl GetScheduleRequest {
88094    pub fn new() -> Self {
88095        std::default::Default::default()
88096    }
88097
88098    /// Sets the value of [name][crate::model::GetScheduleRequest::name].
88099    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88100        self.name = v.into();
88101        self
88102    }
88103}
88104
88105#[cfg(feature = "schedule-service")]
88106impl wkt::message::Message for GetScheduleRequest {
88107    fn typename() -> &'static str {
88108        "type.googleapis.com/google.cloud.aiplatform.v1.GetScheduleRequest"
88109    }
88110}
88111
88112/// Request message for
88113/// [ScheduleService.ListSchedules][google.cloud.aiplatform.v1.ScheduleService.ListSchedules].
88114///
88115/// [google.cloud.aiplatform.v1.ScheduleService.ListSchedules]: crate::client::ScheduleService::list_schedules
88116#[cfg(feature = "schedule-service")]
88117#[derive(Clone, Default, PartialEq)]
88118#[non_exhaustive]
88119pub struct ListSchedulesRequest {
88120    /// Required. The resource name of the Location to list the Schedules from.
88121    /// Format: `projects/{project}/locations/{location}`
88122    pub parent: std::string::String,
88123
88124    /// Lists the Schedules that match the filter expression. The following
88125    /// fields are supported:
88126    ///
88127    /// * `display_name`: Supports `=`, `!=` comparisons, and `:` wildcard.
88128    /// * `state`: Supports `=` and `!=` comparisons.
88129    /// * `request`: Supports existence of the <request_type> check.
88130    ///   (e.g. `create_pipeline_job_request:*` --> Schedule has
88131    ///   create_pipeline_job_request).
88132    /// * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
88133    ///   Values must be in RFC 3339 format.
88134    /// * `start_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
88135    ///   Values must be in RFC 3339 format.
88136    /// * `end_time`: Supports `=`, `!=`, `<`, `>`, `<=`, `>=` comparisons and `:*`
88137    ///   existence check. Values must be in RFC 3339 format.
88138    /// * `next_run_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=`
88139    ///   comparisons. Values must be in RFC 3339 format.
88140    ///
88141    /// Filter expressions can be combined together using logical operators
88142    /// (`NOT`, `AND` & `OR`).
88143    /// The syntax to define filter expression is based on
88144    /// <https://google.aip.dev/160>.
88145    ///
88146    /// Examples:
88147    ///
88148    /// * `state="ACTIVE" AND display_name:"my_schedule_*"`
88149    /// * `NOT display_name="my_schedule"`
88150    /// * `create_time>"2021-05-18T00:00:00Z"`
88151    /// * `end_time>"2021-05-18T00:00:00Z" OR NOT end_time:*`
88152    /// * `create_pipeline_job_request:*`
88153    pub filter: std::string::String,
88154
88155    /// The standard list page size.
88156    /// Default to 100 if not specified.
88157    pub page_size: i32,
88158
88159    /// The standard list page token.
88160    /// Typically obtained via
88161    /// [ListSchedulesResponse.next_page_token][google.cloud.aiplatform.v1.ListSchedulesResponse.next_page_token]
88162    /// of the previous
88163    /// [ScheduleService.ListSchedules][google.cloud.aiplatform.v1.ScheduleService.ListSchedules]
88164    /// call.
88165    ///
88166    /// [google.cloud.aiplatform.v1.ListSchedulesResponse.next_page_token]: crate::model::ListSchedulesResponse::next_page_token
88167    /// [google.cloud.aiplatform.v1.ScheduleService.ListSchedules]: crate::client::ScheduleService::list_schedules
88168    pub page_token: std::string::String,
88169
88170    /// A comma-separated list of fields to order by. The default sort order is in
88171    /// ascending order. Use "desc" after a field name for descending. You can have
88172    /// multiple order_by fields provided.
88173    ///
88174    /// For example, using "create_time desc, end_time" will order results by
88175    /// create time in descending order, and if there are multiple schedules having
88176    /// the same create time, order them by the end time in ascending order.
88177    ///
88178    /// If order_by is not specified, it will order by default with create_time in
88179    /// descending order.
88180    ///
88181    /// Supported fields:
88182    ///
88183    /// * `create_time`
88184    /// * `start_time`
88185    /// * `end_time`
88186    /// * `next_run_time`
88187    pub order_by: std::string::String,
88188
88189    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
88190}
88191
88192#[cfg(feature = "schedule-service")]
88193impl ListSchedulesRequest {
88194    pub fn new() -> Self {
88195        std::default::Default::default()
88196    }
88197
88198    /// Sets the value of [parent][crate::model::ListSchedulesRequest::parent].
88199    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88200        self.parent = v.into();
88201        self
88202    }
88203
88204    /// Sets the value of [filter][crate::model::ListSchedulesRequest::filter].
88205    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88206        self.filter = v.into();
88207        self
88208    }
88209
88210    /// Sets the value of [page_size][crate::model::ListSchedulesRequest::page_size].
88211    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
88212        self.page_size = v.into();
88213        self
88214    }
88215
88216    /// Sets the value of [page_token][crate::model::ListSchedulesRequest::page_token].
88217    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88218        self.page_token = v.into();
88219        self
88220    }
88221
88222    /// Sets the value of [order_by][crate::model::ListSchedulesRequest::order_by].
88223    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88224        self.order_by = v.into();
88225        self
88226    }
88227}
88228
88229#[cfg(feature = "schedule-service")]
88230impl wkt::message::Message for ListSchedulesRequest {
88231    fn typename() -> &'static str {
88232        "type.googleapis.com/google.cloud.aiplatform.v1.ListSchedulesRequest"
88233    }
88234}
88235
88236/// Response message for
88237/// [ScheduleService.ListSchedules][google.cloud.aiplatform.v1.ScheduleService.ListSchedules]
88238///
88239/// [google.cloud.aiplatform.v1.ScheduleService.ListSchedules]: crate::client::ScheduleService::list_schedules
88240#[cfg(feature = "schedule-service")]
88241#[derive(Clone, Default, PartialEq)]
88242#[non_exhaustive]
88243pub struct ListSchedulesResponse {
88244    /// List of Schedules in the requested page.
88245    pub schedules: std::vec::Vec<crate::model::Schedule>,
88246
88247    /// A token to retrieve the next page of results.
88248    /// Pass to
88249    /// [ListSchedulesRequest.page_token][google.cloud.aiplatform.v1.ListSchedulesRequest.page_token]
88250    /// to obtain that page.
88251    ///
88252    /// [google.cloud.aiplatform.v1.ListSchedulesRequest.page_token]: crate::model::ListSchedulesRequest::page_token
88253    pub next_page_token: std::string::String,
88254
88255    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
88256}
88257
88258#[cfg(feature = "schedule-service")]
88259impl ListSchedulesResponse {
88260    pub fn new() -> Self {
88261        std::default::Default::default()
88262    }
88263
88264    /// Sets the value of [schedules][crate::model::ListSchedulesResponse::schedules].
88265    pub fn set_schedules<T, V>(mut self, v: T) -> Self
88266    where
88267        T: std::iter::IntoIterator<Item = V>,
88268        V: std::convert::Into<crate::model::Schedule>,
88269    {
88270        use std::iter::Iterator;
88271        self.schedules = v.into_iter().map(|i| i.into()).collect();
88272        self
88273    }
88274
88275    /// Sets the value of [next_page_token][crate::model::ListSchedulesResponse::next_page_token].
88276    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88277        self.next_page_token = v.into();
88278        self
88279    }
88280}
88281
88282#[cfg(feature = "schedule-service")]
88283impl wkt::message::Message for ListSchedulesResponse {
88284    fn typename() -> &'static str {
88285        "type.googleapis.com/google.cloud.aiplatform.v1.ListSchedulesResponse"
88286    }
88287}
88288
88289#[cfg(feature = "schedule-service")]
88290#[doc(hidden)]
88291impl gax::paginator::internal::PageableResponse for ListSchedulesResponse {
88292    type PageItem = crate::model::Schedule;
88293
88294    fn items(self) -> std::vec::Vec<Self::PageItem> {
88295        self.schedules
88296    }
88297
88298    fn next_page_token(&self) -> std::string::String {
88299        use std::clone::Clone;
88300        self.next_page_token.clone()
88301    }
88302}
88303
88304/// Request message for
88305/// [ScheduleService.DeleteSchedule][google.cloud.aiplatform.v1.ScheduleService.DeleteSchedule].
88306///
88307/// [google.cloud.aiplatform.v1.ScheduleService.DeleteSchedule]: crate::client::ScheduleService::delete_schedule
88308#[cfg(feature = "schedule-service")]
88309#[derive(Clone, Default, PartialEq)]
88310#[non_exhaustive]
88311pub struct DeleteScheduleRequest {
88312    /// Required. The name of the Schedule resource to be deleted.
88313    /// Format:
88314    /// `projects/{project}/locations/{location}/schedules/{schedule}`
88315    pub name: std::string::String,
88316
88317    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
88318}
88319
88320#[cfg(feature = "schedule-service")]
88321impl DeleteScheduleRequest {
88322    pub fn new() -> Self {
88323        std::default::Default::default()
88324    }
88325
88326    /// Sets the value of [name][crate::model::DeleteScheduleRequest::name].
88327    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88328        self.name = v.into();
88329        self
88330    }
88331}
88332
88333#[cfg(feature = "schedule-service")]
88334impl wkt::message::Message for DeleteScheduleRequest {
88335    fn typename() -> &'static str {
88336        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteScheduleRequest"
88337    }
88338}
88339
88340/// Request message for
88341/// [ScheduleService.PauseSchedule][google.cloud.aiplatform.v1.ScheduleService.PauseSchedule].
88342///
88343/// [google.cloud.aiplatform.v1.ScheduleService.PauseSchedule]: crate::client::ScheduleService::pause_schedule
88344#[cfg(feature = "schedule-service")]
88345#[derive(Clone, Default, PartialEq)]
88346#[non_exhaustive]
88347pub struct PauseScheduleRequest {
88348    /// Required. The name of the Schedule resource to be paused.
88349    /// Format:
88350    /// `projects/{project}/locations/{location}/schedules/{schedule}`
88351    pub name: std::string::String,
88352
88353    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
88354}
88355
88356#[cfg(feature = "schedule-service")]
88357impl PauseScheduleRequest {
88358    pub fn new() -> Self {
88359        std::default::Default::default()
88360    }
88361
88362    /// Sets the value of [name][crate::model::PauseScheduleRequest::name].
88363    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88364        self.name = v.into();
88365        self
88366    }
88367}
88368
88369#[cfg(feature = "schedule-service")]
88370impl wkt::message::Message for PauseScheduleRequest {
88371    fn typename() -> &'static str {
88372        "type.googleapis.com/google.cloud.aiplatform.v1.PauseScheduleRequest"
88373    }
88374}
88375
88376/// Request message for
88377/// [ScheduleService.ResumeSchedule][google.cloud.aiplatform.v1.ScheduleService.ResumeSchedule].
88378///
88379/// [google.cloud.aiplatform.v1.ScheduleService.ResumeSchedule]: crate::client::ScheduleService::resume_schedule
88380#[cfg(feature = "schedule-service")]
88381#[derive(Clone, Default, PartialEq)]
88382#[non_exhaustive]
88383pub struct ResumeScheduleRequest {
88384    /// Required. The name of the Schedule resource to be resumed.
88385    /// Format:
88386    /// `projects/{project}/locations/{location}/schedules/{schedule}`
88387    pub name: std::string::String,
88388
88389    /// Optional. Whether to backfill missed runs when the schedule is resumed from
88390    /// PAUSED state. If set to true, all missed runs will be scheduled. New runs
88391    /// will be scheduled after the backfill is complete. This will also update
88392    /// [Schedule.catch_up][google.cloud.aiplatform.v1.Schedule.catch_up] field.
88393    /// Default to false.
88394    ///
88395    /// [google.cloud.aiplatform.v1.Schedule.catch_up]: crate::model::Schedule::catch_up
88396    pub catch_up: bool,
88397
88398    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
88399}
88400
88401#[cfg(feature = "schedule-service")]
88402impl ResumeScheduleRequest {
88403    pub fn new() -> Self {
88404        std::default::Default::default()
88405    }
88406
88407    /// Sets the value of [name][crate::model::ResumeScheduleRequest::name].
88408    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88409        self.name = v.into();
88410        self
88411    }
88412
88413    /// Sets the value of [catch_up][crate::model::ResumeScheduleRequest::catch_up].
88414    pub fn set_catch_up<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
88415        self.catch_up = v.into();
88416        self
88417    }
88418}
88419
88420#[cfg(feature = "schedule-service")]
88421impl wkt::message::Message for ResumeScheduleRequest {
88422    fn typename() -> &'static str {
88423        "type.googleapis.com/google.cloud.aiplatform.v1.ResumeScheduleRequest"
88424    }
88425}
88426
88427/// Request message for
88428/// [ScheduleService.UpdateSchedule][google.cloud.aiplatform.v1.ScheduleService.UpdateSchedule].
88429///
88430/// [google.cloud.aiplatform.v1.ScheduleService.UpdateSchedule]: crate::client::ScheduleService::update_schedule
88431#[cfg(feature = "schedule-service")]
88432#[derive(Clone, Default, PartialEq)]
88433#[non_exhaustive]
88434pub struct UpdateScheduleRequest {
88435    /// Required. The Schedule which replaces the resource on the server.
88436    /// The following restrictions will be applied:
88437    ///
88438    /// * The scheduled request type cannot be changed.
88439    /// * The non-empty fields cannot be unset.
88440    /// * The output_only fields will be ignored if specified.
88441    pub schedule: std::option::Option<crate::model::Schedule>,
88442
88443    /// Required. The update mask applies to the resource. See
88444    /// [google.protobuf.FieldMask][google.protobuf.FieldMask].
88445    ///
88446    /// [google.protobuf.FieldMask]: wkt::FieldMask
88447    pub update_mask: std::option::Option<wkt::FieldMask>,
88448
88449    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
88450}
88451
88452#[cfg(feature = "schedule-service")]
88453impl UpdateScheduleRequest {
88454    pub fn new() -> Self {
88455        std::default::Default::default()
88456    }
88457
88458    /// Sets the value of [schedule][crate::model::UpdateScheduleRequest::schedule].
88459    pub fn set_schedule<T>(mut self, v: T) -> Self
88460    where
88461        T: std::convert::Into<crate::model::Schedule>,
88462    {
88463        self.schedule = std::option::Option::Some(v.into());
88464        self
88465    }
88466
88467    /// Sets or clears the value of [schedule][crate::model::UpdateScheduleRequest::schedule].
88468    pub fn set_or_clear_schedule<T>(mut self, v: std::option::Option<T>) -> Self
88469    where
88470        T: std::convert::Into<crate::model::Schedule>,
88471    {
88472        self.schedule = v.map(|x| x.into());
88473        self
88474    }
88475
88476    /// Sets the value of [update_mask][crate::model::UpdateScheduleRequest::update_mask].
88477    pub fn set_update_mask<T>(mut self, v: T) -> Self
88478    where
88479        T: std::convert::Into<wkt::FieldMask>,
88480    {
88481        self.update_mask = std::option::Option::Some(v.into());
88482        self
88483    }
88484
88485    /// Sets or clears the value of [update_mask][crate::model::UpdateScheduleRequest::update_mask].
88486    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
88487    where
88488        T: std::convert::Into<wkt::FieldMask>,
88489    {
88490        self.update_mask = v.map(|x| x.into());
88491        self
88492    }
88493}
88494
88495#[cfg(feature = "schedule-service")]
88496impl wkt::message::Message for UpdateScheduleRequest {
88497    fn typename() -> &'static str {
88498        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateScheduleRequest"
88499    }
88500}
88501
88502/// PSC config that is used to automatically create PSC endpoints in the user
88503/// projects.
88504#[cfg(any(
88505    feature = "endpoint-service",
88506    feature = "feature-online-store-admin-service",
88507    feature = "index-endpoint-service",
88508))]
88509#[derive(Clone, Default, PartialEq)]
88510#[non_exhaustive]
88511pub struct PSCAutomationConfig {
88512    /// Required. Project id used to create forwarding rule.
88513    pub project_id: std::string::String,
88514
88515    /// Required. The full name of the Google Compute Engine
88516    /// [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
88517    /// [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get):
88518    /// `projects/{project}/global/networks/{network}`.
88519    pub network: std::string::String,
88520
88521    /// Output only. IP address rule created by the PSC service automation.
88522    pub ip_address: std::string::String,
88523
88524    /// Output only. Forwarding rule created by the PSC service automation.
88525    pub forwarding_rule: std::string::String,
88526
88527    /// Output only. The state of the PSC service automation.
88528    pub state: crate::model::PSCAutomationState,
88529
88530    /// Output only. Error message if the PSC service automation failed.
88531    pub error_message: std::string::String,
88532
88533    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
88534}
88535
88536#[cfg(any(
88537    feature = "endpoint-service",
88538    feature = "feature-online-store-admin-service",
88539    feature = "index-endpoint-service",
88540))]
88541impl PSCAutomationConfig {
88542    pub fn new() -> Self {
88543        std::default::Default::default()
88544    }
88545
88546    /// Sets the value of [project_id][crate::model::PSCAutomationConfig::project_id].
88547    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88548        self.project_id = v.into();
88549        self
88550    }
88551
88552    /// Sets the value of [network][crate::model::PSCAutomationConfig::network].
88553    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88554        self.network = v.into();
88555        self
88556    }
88557
88558    /// Sets the value of [ip_address][crate::model::PSCAutomationConfig::ip_address].
88559    pub fn set_ip_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88560        self.ip_address = v.into();
88561        self
88562    }
88563
88564    /// Sets the value of [forwarding_rule][crate::model::PSCAutomationConfig::forwarding_rule].
88565    pub fn set_forwarding_rule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88566        self.forwarding_rule = v.into();
88567        self
88568    }
88569
88570    /// Sets the value of [state][crate::model::PSCAutomationConfig::state].
88571    pub fn set_state<T: std::convert::Into<crate::model::PSCAutomationState>>(
88572        mut self,
88573        v: T,
88574    ) -> Self {
88575        self.state = v.into();
88576        self
88577    }
88578
88579    /// Sets the value of [error_message][crate::model::PSCAutomationConfig::error_message].
88580    pub fn set_error_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88581        self.error_message = v.into();
88582        self
88583    }
88584}
88585
88586#[cfg(any(
88587    feature = "endpoint-service",
88588    feature = "feature-online-store-admin-service",
88589    feature = "index-endpoint-service",
88590))]
88591impl wkt::message::Message for PSCAutomationConfig {
88592    fn typename() -> &'static str {
88593        "type.googleapis.com/google.cloud.aiplatform.v1.PSCAutomationConfig"
88594    }
88595}
88596
88597/// Represents configuration for private service connect.
88598#[cfg(any(
88599    feature = "endpoint-service",
88600    feature = "feature-online-store-admin-service",
88601    feature = "index-endpoint-service",
88602))]
88603#[derive(Clone, Default, PartialEq)]
88604#[non_exhaustive]
88605pub struct PrivateServiceConnectConfig {
88606    /// Required. If true, expose the IndexEndpoint via private service connect.
88607    pub enable_private_service_connect: bool,
88608
88609    /// A list of Projects from which the forwarding rule will target the service
88610    /// attachment.
88611    pub project_allowlist: std::vec::Vec<std::string::String>,
88612
88613    /// Optional. List of projects and networks where the PSC endpoints will be
88614    /// created. This field is used by Online Inference(Prediction) only.
88615    pub psc_automation_configs: std::vec::Vec<crate::model::PSCAutomationConfig>,
88616
88617    /// Output only. The name of the generated service attachment resource.
88618    /// This is only populated if the endpoint is deployed with
88619    /// PrivateServiceConnect.
88620    pub service_attachment: std::string::String,
88621
88622    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
88623}
88624
88625#[cfg(any(
88626    feature = "endpoint-service",
88627    feature = "feature-online-store-admin-service",
88628    feature = "index-endpoint-service",
88629))]
88630impl PrivateServiceConnectConfig {
88631    pub fn new() -> Self {
88632        std::default::Default::default()
88633    }
88634
88635    /// Sets the value of [enable_private_service_connect][crate::model::PrivateServiceConnectConfig::enable_private_service_connect].
88636    pub fn set_enable_private_service_connect<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
88637        self.enable_private_service_connect = v.into();
88638        self
88639    }
88640
88641    /// Sets the value of [project_allowlist][crate::model::PrivateServiceConnectConfig::project_allowlist].
88642    pub fn set_project_allowlist<T, V>(mut self, v: T) -> Self
88643    where
88644        T: std::iter::IntoIterator<Item = V>,
88645        V: std::convert::Into<std::string::String>,
88646    {
88647        use std::iter::Iterator;
88648        self.project_allowlist = v.into_iter().map(|i| i.into()).collect();
88649        self
88650    }
88651
88652    /// Sets the value of [psc_automation_configs][crate::model::PrivateServiceConnectConfig::psc_automation_configs].
88653    pub fn set_psc_automation_configs<T, V>(mut self, v: T) -> Self
88654    where
88655        T: std::iter::IntoIterator<Item = V>,
88656        V: std::convert::Into<crate::model::PSCAutomationConfig>,
88657    {
88658        use std::iter::Iterator;
88659        self.psc_automation_configs = v.into_iter().map(|i| i.into()).collect();
88660        self
88661    }
88662
88663    /// Sets the value of [service_attachment][crate::model::PrivateServiceConnectConfig::service_attachment].
88664    pub fn set_service_attachment<T: std::convert::Into<std::string::String>>(
88665        mut self,
88666        v: T,
88667    ) -> Self {
88668        self.service_attachment = v.into();
88669        self
88670    }
88671}
88672
88673#[cfg(any(
88674    feature = "endpoint-service",
88675    feature = "feature-online-store-admin-service",
88676    feature = "index-endpoint-service",
88677))]
88678impl wkt::message::Message for PrivateServiceConnectConfig {
88679    fn typename() -> &'static str {
88680        "type.googleapis.com/google.cloud.aiplatform.v1.PrivateServiceConnectConfig"
88681    }
88682}
88683
88684/// PscAutomatedEndpoints defines the output of the forwarding rule
88685/// automatically created by each PscAutomationConfig.
88686#[cfg(feature = "index-endpoint-service")]
88687#[derive(Clone, Default, PartialEq)]
88688#[non_exhaustive]
88689pub struct PscAutomatedEndpoints {
88690    /// Corresponding project_id in pscAutomationConfigs
88691    pub project_id: std::string::String,
88692
88693    /// Corresponding network in pscAutomationConfigs.
88694    pub network: std::string::String,
88695
88696    /// Ip Address created by the automated forwarding rule.
88697    pub match_address: std::string::String,
88698
88699    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
88700}
88701
88702#[cfg(feature = "index-endpoint-service")]
88703impl PscAutomatedEndpoints {
88704    pub fn new() -> Self {
88705        std::default::Default::default()
88706    }
88707
88708    /// Sets the value of [project_id][crate::model::PscAutomatedEndpoints::project_id].
88709    pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88710        self.project_id = v.into();
88711        self
88712    }
88713
88714    /// Sets the value of [network][crate::model::PscAutomatedEndpoints::network].
88715    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88716        self.network = v.into();
88717        self
88718    }
88719
88720    /// Sets the value of [match_address][crate::model::PscAutomatedEndpoints::match_address].
88721    pub fn set_match_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88722        self.match_address = v.into();
88723        self
88724    }
88725}
88726
88727#[cfg(feature = "index-endpoint-service")]
88728impl wkt::message::Message for PscAutomatedEndpoints {
88729    fn typename() -> &'static str {
88730        "type.googleapis.com/google.cloud.aiplatform.v1.PscAutomatedEndpoints"
88731    }
88732}
88733
88734/// Configuration for PSC-I.
88735#[cfg(any(
88736    feature = "job-service",
88737    feature = "persistent-resource-service",
88738    feature = "pipeline-service",
88739    feature = "reasoning-engine-service",
88740    feature = "schedule-service",
88741))]
88742#[derive(Clone, Default, PartialEq)]
88743#[non_exhaustive]
88744pub struct PscInterfaceConfig {
88745    /// Optional. The name of the Compute Engine
88746    /// [network
88747    /// attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to
88748    /// attach to the resource within the region and user project.
88749    /// To specify this field, you must have already [created a network attachment]
88750    /// (<https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments>).
88751    /// This field is only used for resources using PSC-I.
88752    pub network_attachment: std::string::String,
88753
88754    /// Optional. DNS peering configurations. When specified, Vertex AI will
88755    /// attempt to configure DNS peering zones in the tenant project VPC
88756    /// to resolve the specified domains using the target network's Cloud DNS.
88757    /// The user must grant the dns.peer role to the Vertex AI Service Agent
88758    /// on the target project.
88759    pub dns_peering_configs: std::vec::Vec<crate::model::DnsPeeringConfig>,
88760
88761    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
88762}
88763
88764#[cfg(any(
88765    feature = "job-service",
88766    feature = "persistent-resource-service",
88767    feature = "pipeline-service",
88768    feature = "reasoning-engine-service",
88769    feature = "schedule-service",
88770))]
88771impl PscInterfaceConfig {
88772    pub fn new() -> Self {
88773        std::default::Default::default()
88774    }
88775
88776    /// Sets the value of [network_attachment][crate::model::PscInterfaceConfig::network_attachment].
88777    pub fn set_network_attachment<T: std::convert::Into<std::string::String>>(
88778        mut self,
88779        v: T,
88780    ) -> Self {
88781        self.network_attachment = v.into();
88782        self
88783    }
88784
88785    /// Sets the value of [dns_peering_configs][crate::model::PscInterfaceConfig::dns_peering_configs].
88786    pub fn set_dns_peering_configs<T, V>(mut self, v: T) -> Self
88787    where
88788        T: std::iter::IntoIterator<Item = V>,
88789        V: std::convert::Into<crate::model::DnsPeeringConfig>,
88790    {
88791        use std::iter::Iterator;
88792        self.dns_peering_configs = v.into_iter().map(|i| i.into()).collect();
88793        self
88794    }
88795}
88796
88797#[cfg(any(
88798    feature = "job-service",
88799    feature = "persistent-resource-service",
88800    feature = "pipeline-service",
88801    feature = "reasoning-engine-service",
88802    feature = "schedule-service",
88803))]
88804impl wkt::message::Message for PscInterfaceConfig {
88805    fn typename() -> &'static str {
88806        "type.googleapis.com/google.cloud.aiplatform.v1.PscInterfaceConfig"
88807    }
88808}
88809
88810/// DNS peering configuration. These configurations are used to create
88811/// DNS peering zones in the Vertex tenant project VPC, enabling resolution
88812/// of records within the specified domain hosted in the target network's
88813/// Cloud DNS.
88814#[cfg(any(
88815    feature = "job-service",
88816    feature = "persistent-resource-service",
88817    feature = "pipeline-service",
88818    feature = "reasoning-engine-service",
88819    feature = "schedule-service",
88820))]
88821#[derive(Clone, Default, PartialEq)]
88822#[non_exhaustive]
88823pub struct DnsPeeringConfig {
88824    /// Required. The DNS name suffix of the zone being peered to, e.g.,
88825    /// "my-internal-domain.corp.". Must end with a dot.
88826    pub domain: std::string::String,
88827
88828    /// Required. The project ID hosting the Cloud DNS managed zone that
88829    /// contains the 'domain'. The Vertex AI Service Agent requires the
88830    /// dns.peer role on this project.
88831    pub target_project: std::string::String,
88832
88833    /// Required. The VPC network name
88834    /// in the target_project where the DNS zone specified by 'domain' is
88835    /// visible.
88836    pub target_network: std::string::String,
88837
88838    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
88839}
88840
88841#[cfg(any(
88842    feature = "job-service",
88843    feature = "persistent-resource-service",
88844    feature = "pipeline-service",
88845    feature = "reasoning-engine-service",
88846    feature = "schedule-service",
88847))]
88848impl DnsPeeringConfig {
88849    pub fn new() -> Self {
88850        std::default::Default::default()
88851    }
88852
88853    /// Sets the value of [domain][crate::model::DnsPeeringConfig::domain].
88854    pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88855        self.domain = v.into();
88856        self
88857    }
88858
88859    /// Sets the value of [target_project][crate::model::DnsPeeringConfig::target_project].
88860    pub fn set_target_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88861        self.target_project = v.into();
88862        self
88863    }
88864
88865    /// Sets the value of [target_network][crate::model::DnsPeeringConfig::target_network].
88866    pub fn set_target_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88867        self.target_network = v.into();
88868        self
88869    }
88870}
88871
88872#[cfg(any(
88873    feature = "job-service",
88874    feature = "persistent-resource-service",
88875    feature = "pipeline-service",
88876    feature = "reasoning-engine-service",
88877    feature = "schedule-service",
88878))]
88879impl wkt::message::Message for DnsPeeringConfig {
88880    fn typename() -> &'static str {
88881        "type.googleapis.com/google.cloud.aiplatform.v1.DnsPeeringConfig"
88882    }
88883}
88884
88885/// SpecialistPool represents customers' own workforce to work on their data
88886/// labeling jobs. It includes a group of specialist managers and workers.
88887/// Managers are responsible for managing the workers in this pool as well as
88888/// customers' data labeling jobs associated with this pool. Customers create
88889/// specialist pool as well as start data labeling jobs on Cloud, managers and
88890/// workers handle the jobs using CrowdCompute console.
88891#[cfg(feature = "specialist-pool-service")]
88892#[derive(Clone, Default, PartialEq)]
88893#[non_exhaustive]
88894pub struct SpecialistPool {
88895    /// Required. The resource name of the SpecialistPool.
88896    pub name: std::string::String,
88897
88898    /// Required. The user-defined name of the SpecialistPool.
88899    /// The name can be up to 128 characters long and can consist of any UTF-8
88900    /// characters.
88901    /// This field should be unique on project-level.
88902    pub display_name: std::string::String,
88903
88904    /// Output only. The number of managers in this SpecialistPool.
88905    pub specialist_managers_count: i32,
88906
88907    /// The email addresses of the managers in the SpecialistPool.
88908    pub specialist_manager_emails: std::vec::Vec<std::string::String>,
88909
88910    /// Output only. The resource name of the pending data labeling jobs.
88911    pub pending_data_labeling_jobs: std::vec::Vec<std::string::String>,
88912
88913    /// The email addresses of workers in the SpecialistPool.
88914    pub specialist_worker_emails: std::vec::Vec<std::string::String>,
88915
88916    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
88917}
88918
88919#[cfg(feature = "specialist-pool-service")]
88920impl SpecialistPool {
88921    pub fn new() -> Self {
88922        std::default::Default::default()
88923    }
88924
88925    /// Sets the value of [name][crate::model::SpecialistPool::name].
88926    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88927        self.name = v.into();
88928        self
88929    }
88930
88931    /// Sets the value of [display_name][crate::model::SpecialistPool::display_name].
88932    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
88933        self.display_name = v.into();
88934        self
88935    }
88936
88937    /// Sets the value of [specialist_managers_count][crate::model::SpecialistPool::specialist_managers_count].
88938    pub fn set_specialist_managers_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
88939        self.specialist_managers_count = v.into();
88940        self
88941    }
88942
88943    /// Sets the value of [specialist_manager_emails][crate::model::SpecialistPool::specialist_manager_emails].
88944    pub fn set_specialist_manager_emails<T, V>(mut self, v: T) -> Self
88945    where
88946        T: std::iter::IntoIterator<Item = V>,
88947        V: std::convert::Into<std::string::String>,
88948    {
88949        use std::iter::Iterator;
88950        self.specialist_manager_emails = v.into_iter().map(|i| i.into()).collect();
88951        self
88952    }
88953
88954    /// Sets the value of [pending_data_labeling_jobs][crate::model::SpecialistPool::pending_data_labeling_jobs].
88955    pub fn set_pending_data_labeling_jobs<T, V>(mut self, v: T) -> Self
88956    where
88957        T: std::iter::IntoIterator<Item = V>,
88958        V: std::convert::Into<std::string::String>,
88959    {
88960        use std::iter::Iterator;
88961        self.pending_data_labeling_jobs = v.into_iter().map(|i| i.into()).collect();
88962        self
88963    }
88964
88965    /// Sets the value of [specialist_worker_emails][crate::model::SpecialistPool::specialist_worker_emails].
88966    pub fn set_specialist_worker_emails<T, V>(mut self, v: T) -> Self
88967    where
88968        T: std::iter::IntoIterator<Item = V>,
88969        V: std::convert::Into<std::string::String>,
88970    {
88971        use std::iter::Iterator;
88972        self.specialist_worker_emails = v.into_iter().map(|i| i.into()).collect();
88973        self
88974    }
88975}
88976
88977#[cfg(feature = "specialist-pool-service")]
88978impl wkt::message::Message for SpecialistPool {
88979    fn typename() -> &'static str {
88980        "type.googleapis.com/google.cloud.aiplatform.v1.SpecialistPool"
88981    }
88982}
88983
88984/// Request message for
88985/// [SpecialistPoolService.CreateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool].
88986///
88987/// [google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool]: crate::client::SpecialistPoolService::create_specialist_pool
88988#[cfg(feature = "specialist-pool-service")]
88989#[derive(Clone, Default, PartialEq)]
88990#[non_exhaustive]
88991pub struct CreateSpecialistPoolRequest {
88992    /// Required. The parent Project name for the new SpecialistPool.
88993    /// The form is `projects/{project}/locations/{location}`.
88994    pub parent: std::string::String,
88995
88996    /// Required. The SpecialistPool to create.
88997    pub specialist_pool: std::option::Option<crate::model::SpecialistPool>,
88998
88999    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
89000}
89001
89002#[cfg(feature = "specialist-pool-service")]
89003impl CreateSpecialistPoolRequest {
89004    pub fn new() -> Self {
89005        std::default::Default::default()
89006    }
89007
89008    /// Sets the value of [parent][crate::model::CreateSpecialistPoolRequest::parent].
89009    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89010        self.parent = v.into();
89011        self
89012    }
89013
89014    /// Sets the value of [specialist_pool][crate::model::CreateSpecialistPoolRequest::specialist_pool].
89015    pub fn set_specialist_pool<T>(mut self, v: T) -> Self
89016    where
89017        T: std::convert::Into<crate::model::SpecialistPool>,
89018    {
89019        self.specialist_pool = std::option::Option::Some(v.into());
89020        self
89021    }
89022
89023    /// Sets or clears the value of [specialist_pool][crate::model::CreateSpecialistPoolRequest::specialist_pool].
89024    pub fn set_or_clear_specialist_pool<T>(mut self, v: std::option::Option<T>) -> Self
89025    where
89026        T: std::convert::Into<crate::model::SpecialistPool>,
89027    {
89028        self.specialist_pool = v.map(|x| x.into());
89029        self
89030    }
89031}
89032
89033#[cfg(feature = "specialist-pool-service")]
89034impl wkt::message::Message for CreateSpecialistPoolRequest {
89035    fn typename() -> &'static str {
89036        "type.googleapis.com/google.cloud.aiplatform.v1.CreateSpecialistPoolRequest"
89037    }
89038}
89039
89040/// Runtime operation information for
89041/// [SpecialistPoolService.CreateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool].
89042///
89043/// [google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool]: crate::client::SpecialistPoolService::create_specialist_pool
89044#[cfg(feature = "specialist-pool-service")]
89045#[derive(Clone, Default, PartialEq)]
89046#[non_exhaustive]
89047pub struct CreateSpecialistPoolOperationMetadata {
89048    /// The operation generic information.
89049    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
89050
89051    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
89052}
89053
89054#[cfg(feature = "specialist-pool-service")]
89055impl CreateSpecialistPoolOperationMetadata {
89056    pub fn new() -> Self {
89057        std::default::Default::default()
89058    }
89059
89060    /// Sets the value of [generic_metadata][crate::model::CreateSpecialistPoolOperationMetadata::generic_metadata].
89061    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
89062    where
89063        T: std::convert::Into<crate::model::GenericOperationMetadata>,
89064    {
89065        self.generic_metadata = std::option::Option::Some(v.into());
89066        self
89067    }
89068
89069    /// Sets or clears the value of [generic_metadata][crate::model::CreateSpecialistPoolOperationMetadata::generic_metadata].
89070    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
89071    where
89072        T: std::convert::Into<crate::model::GenericOperationMetadata>,
89073    {
89074        self.generic_metadata = v.map(|x| x.into());
89075        self
89076    }
89077}
89078
89079#[cfg(feature = "specialist-pool-service")]
89080impl wkt::message::Message for CreateSpecialistPoolOperationMetadata {
89081    fn typename() -> &'static str {
89082        "type.googleapis.com/google.cloud.aiplatform.v1.CreateSpecialistPoolOperationMetadata"
89083    }
89084}
89085
89086/// Request message for
89087/// [SpecialistPoolService.GetSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.GetSpecialistPool].
89088///
89089/// [google.cloud.aiplatform.v1.SpecialistPoolService.GetSpecialistPool]: crate::client::SpecialistPoolService::get_specialist_pool
89090#[cfg(feature = "specialist-pool-service")]
89091#[derive(Clone, Default, PartialEq)]
89092#[non_exhaustive]
89093pub struct GetSpecialistPoolRequest {
89094    /// Required. The name of the SpecialistPool resource.
89095    /// The form is
89096    /// `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`.
89097    pub name: std::string::String,
89098
89099    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
89100}
89101
89102#[cfg(feature = "specialist-pool-service")]
89103impl GetSpecialistPoolRequest {
89104    pub fn new() -> Self {
89105        std::default::Default::default()
89106    }
89107
89108    /// Sets the value of [name][crate::model::GetSpecialistPoolRequest::name].
89109    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89110        self.name = v.into();
89111        self
89112    }
89113}
89114
89115#[cfg(feature = "specialist-pool-service")]
89116impl wkt::message::Message for GetSpecialistPoolRequest {
89117    fn typename() -> &'static str {
89118        "type.googleapis.com/google.cloud.aiplatform.v1.GetSpecialistPoolRequest"
89119    }
89120}
89121
89122/// Request message for
89123/// [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools].
89124///
89125/// [google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools]: crate::client::SpecialistPoolService::list_specialist_pools
89126#[cfg(feature = "specialist-pool-service")]
89127#[derive(Clone, Default, PartialEq)]
89128#[non_exhaustive]
89129pub struct ListSpecialistPoolsRequest {
89130    /// Required. The name of the SpecialistPool's parent resource.
89131    /// Format: `projects/{project}/locations/{location}`
89132    pub parent: std::string::String,
89133
89134    /// The standard list page size.
89135    pub page_size: i32,
89136
89137    /// The standard list page token.
89138    /// Typically obtained by
89139    /// [ListSpecialistPoolsResponse.next_page_token][google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token]
89140    /// of the previous
89141    /// [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools]
89142    /// call. Return first page if empty.
89143    ///
89144    /// [google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token]: crate::model::ListSpecialistPoolsResponse::next_page_token
89145    /// [google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools]: crate::client::SpecialistPoolService::list_specialist_pools
89146    pub page_token: std::string::String,
89147
89148    /// Mask specifying which fields to read. FieldMask represents a set of
89149    pub read_mask: std::option::Option<wkt::FieldMask>,
89150
89151    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
89152}
89153
89154#[cfg(feature = "specialist-pool-service")]
89155impl ListSpecialistPoolsRequest {
89156    pub fn new() -> Self {
89157        std::default::Default::default()
89158    }
89159
89160    /// Sets the value of [parent][crate::model::ListSpecialistPoolsRequest::parent].
89161    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89162        self.parent = v.into();
89163        self
89164    }
89165
89166    /// Sets the value of [page_size][crate::model::ListSpecialistPoolsRequest::page_size].
89167    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
89168        self.page_size = v.into();
89169        self
89170    }
89171
89172    /// Sets the value of [page_token][crate::model::ListSpecialistPoolsRequest::page_token].
89173    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89174        self.page_token = v.into();
89175        self
89176    }
89177
89178    /// Sets the value of [read_mask][crate::model::ListSpecialistPoolsRequest::read_mask].
89179    pub fn set_read_mask<T>(mut self, v: T) -> Self
89180    where
89181        T: std::convert::Into<wkt::FieldMask>,
89182    {
89183        self.read_mask = std::option::Option::Some(v.into());
89184        self
89185    }
89186
89187    /// Sets or clears the value of [read_mask][crate::model::ListSpecialistPoolsRequest::read_mask].
89188    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
89189    where
89190        T: std::convert::Into<wkt::FieldMask>,
89191    {
89192        self.read_mask = v.map(|x| x.into());
89193        self
89194    }
89195}
89196
89197#[cfg(feature = "specialist-pool-service")]
89198impl wkt::message::Message for ListSpecialistPoolsRequest {
89199    fn typename() -> &'static str {
89200        "type.googleapis.com/google.cloud.aiplatform.v1.ListSpecialistPoolsRequest"
89201    }
89202}
89203
89204/// Response message for
89205/// [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools].
89206///
89207/// [google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools]: crate::client::SpecialistPoolService::list_specialist_pools
89208#[cfg(feature = "specialist-pool-service")]
89209#[derive(Clone, Default, PartialEq)]
89210#[non_exhaustive]
89211pub struct ListSpecialistPoolsResponse {
89212    /// A list of SpecialistPools that matches the specified filter in the request.
89213    pub specialist_pools: std::vec::Vec<crate::model::SpecialistPool>,
89214
89215    /// The standard List next-page token.
89216    pub next_page_token: std::string::String,
89217
89218    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
89219}
89220
89221#[cfg(feature = "specialist-pool-service")]
89222impl ListSpecialistPoolsResponse {
89223    pub fn new() -> Self {
89224        std::default::Default::default()
89225    }
89226
89227    /// Sets the value of [specialist_pools][crate::model::ListSpecialistPoolsResponse::specialist_pools].
89228    pub fn set_specialist_pools<T, V>(mut self, v: T) -> Self
89229    where
89230        T: std::iter::IntoIterator<Item = V>,
89231        V: std::convert::Into<crate::model::SpecialistPool>,
89232    {
89233        use std::iter::Iterator;
89234        self.specialist_pools = v.into_iter().map(|i| i.into()).collect();
89235        self
89236    }
89237
89238    /// Sets the value of [next_page_token][crate::model::ListSpecialistPoolsResponse::next_page_token].
89239    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89240        self.next_page_token = v.into();
89241        self
89242    }
89243}
89244
89245#[cfg(feature = "specialist-pool-service")]
89246impl wkt::message::Message for ListSpecialistPoolsResponse {
89247    fn typename() -> &'static str {
89248        "type.googleapis.com/google.cloud.aiplatform.v1.ListSpecialistPoolsResponse"
89249    }
89250}
89251
89252#[cfg(feature = "specialist-pool-service")]
89253#[doc(hidden)]
89254impl gax::paginator::internal::PageableResponse for ListSpecialistPoolsResponse {
89255    type PageItem = crate::model::SpecialistPool;
89256
89257    fn items(self) -> std::vec::Vec<Self::PageItem> {
89258        self.specialist_pools
89259    }
89260
89261    fn next_page_token(&self) -> std::string::String {
89262        use std::clone::Clone;
89263        self.next_page_token.clone()
89264    }
89265}
89266
89267/// Request message for
89268/// [SpecialistPoolService.DeleteSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.DeleteSpecialistPool].
89269///
89270/// [google.cloud.aiplatform.v1.SpecialistPoolService.DeleteSpecialistPool]: crate::client::SpecialistPoolService::delete_specialist_pool
89271#[cfg(feature = "specialist-pool-service")]
89272#[derive(Clone, Default, PartialEq)]
89273#[non_exhaustive]
89274pub struct DeleteSpecialistPoolRequest {
89275    /// Required. The resource name of the SpecialistPool to delete. Format:
89276    /// `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`
89277    pub name: std::string::String,
89278
89279    /// If set to true, any specialist managers in this SpecialistPool will also be
89280    /// deleted. (Otherwise, the request will only work if the SpecialistPool has
89281    /// no specialist managers.)
89282    pub force: bool,
89283
89284    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
89285}
89286
89287#[cfg(feature = "specialist-pool-service")]
89288impl DeleteSpecialistPoolRequest {
89289    pub fn new() -> Self {
89290        std::default::Default::default()
89291    }
89292
89293    /// Sets the value of [name][crate::model::DeleteSpecialistPoolRequest::name].
89294    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89295        self.name = v.into();
89296        self
89297    }
89298
89299    /// Sets the value of [force][crate::model::DeleteSpecialistPoolRequest::force].
89300    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
89301        self.force = v.into();
89302        self
89303    }
89304}
89305
89306#[cfg(feature = "specialist-pool-service")]
89307impl wkt::message::Message for DeleteSpecialistPoolRequest {
89308    fn typename() -> &'static str {
89309        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteSpecialistPoolRequest"
89310    }
89311}
89312
89313/// Request message for
89314/// [SpecialistPoolService.UpdateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool].
89315///
89316/// [google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool]: crate::client::SpecialistPoolService::update_specialist_pool
89317#[cfg(feature = "specialist-pool-service")]
89318#[derive(Clone, Default, PartialEq)]
89319#[non_exhaustive]
89320pub struct UpdateSpecialistPoolRequest {
89321    /// Required. The SpecialistPool which replaces the resource on the server.
89322    pub specialist_pool: std::option::Option<crate::model::SpecialistPool>,
89323
89324    /// Required. The update mask applies to the resource.
89325    pub update_mask: std::option::Option<wkt::FieldMask>,
89326
89327    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
89328}
89329
89330#[cfg(feature = "specialist-pool-service")]
89331impl UpdateSpecialistPoolRequest {
89332    pub fn new() -> Self {
89333        std::default::Default::default()
89334    }
89335
89336    /// Sets the value of [specialist_pool][crate::model::UpdateSpecialistPoolRequest::specialist_pool].
89337    pub fn set_specialist_pool<T>(mut self, v: T) -> Self
89338    where
89339        T: std::convert::Into<crate::model::SpecialistPool>,
89340    {
89341        self.specialist_pool = std::option::Option::Some(v.into());
89342        self
89343    }
89344
89345    /// Sets or clears the value of [specialist_pool][crate::model::UpdateSpecialistPoolRequest::specialist_pool].
89346    pub fn set_or_clear_specialist_pool<T>(mut self, v: std::option::Option<T>) -> Self
89347    where
89348        T: std::convert::Into<crate::model::SpecialistPool>,
89349    {
89350        self.specialist_pool = v.map(|x| x.into());
89351        self
89352    }
89353
89354    /// Sets the value of [update_mask][crate::model::UpdateSpecialistPoolRequest::update_mask].
89355    pub fn set_update_mask<T>(mut self, v: T) -> Self
89356    where
89357        T: std::convert::Into<wkt::FieldMask>,
89358    {
89359        self.update_mask = std::option::Option::Some(v.into());
89360        self
89361    }
89362
89363    /// Sets or clears the value of [update_mask][crate::model::UpdateSpecialistPoolRequest::update_mask].
89364    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
89365    where
89366        T: std::convert::Into<wkt::FieldMask>,
89367    {
89368        self.update_mask = v.map(|x| x.into());
89369        self
89370    }
89371}
89372
89373#[cfg(feature = "specialist-pool-service")]
89374impl wkt::message::Message for UpdateSpecialistPoolRequest {
89375    fn typename() -> &'static str {
89376        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateSpecialistPoolRequest"
89377    }
89378}
89379
89380/// Runtime operation metadata for
89381/// [SpecialistPoolService.UpdateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool].
89382///
89383/// [google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool]: crate::client::SpecialistPoolService::update_specialist_pool
89384#[cfg(feature = "specialist-pool-service")]
89385#[derive(Clone, Default, PartialEq)]
89386#[non_exhaustive]
89387pub struct UpdateSpecialistPoolOperationMetadata {
89388    /// Output only. The name of the SpecialistPool to which the specialists are
89389    /// being added. Format:
89390    /// `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_pool}`
89391    pub specialist_pool: std::string::String,
89392
89393    /// The operation generic information.
89394    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
89395
89396    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
89397}
89398
89399#[cfg(feature = "specialist-pool-service")]
89400impl UpdateSpecialistPoolOperationMetadata {
89401    pub fn new() -> Self {
89402        std::default::Default::default()
89403    }
89404
89405    /// Sets the value of [specialist_pool][crate::model::UpdateSpecialistPoolOperationMetadata::specialist_pool].
89406    pub fn set_specialist_pool<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89407        self.specialist_pool = v.into();
89408        self
89409    }
89410
89411    /// Sets the value of [generic_metadata][crate::model::UpdateSpecialistPoolOperationMetadata::generic_metadata].
89412    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
89413    where
89414        T: std::convert::Into<crate::model::GenericOperationMetadata>,
89415    {
89416        self.generic_metadata = std::option::Option::Some(v.into());
89417        self
89418    }
89419
89420    /// Sets or clears the value of [generic_metadata][crate::model::UpdateSpecialistPoolOperationMetadata::generic_metadata].
89421    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
89422    where
89423        T: std::convert::Into<crate::model::GenericOperationMetadata>,
89424    {
89425        self.generic_metadata = v.map(|x| x.into());
89426        self
89427    }
89428}
89429
89430#[cfg(feature = "specialist-pool-service")]
89431impl wkt::message::Message for UpdateSpecialistPoolOperationMetadata {
89432    fn typename() -> &'static str {
89433        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateSpecialistPoolOperationMetadata"
89434    }
89435}
89436
89437/// A message representing a Study.
89438#[cfg(feature = "vizier-service")]
89439#[derive(Clone, Default, PartialEq)]
89440#[non_exhaustive]
89441pub struct Study {
89442    /// Output only. The name of a study. The study's globally unique identifier.
89443    /// Format: `projects/{project}/locations/{location}/studies/{study}`
89444    pub name: std::string::String,
89445
89446    /// Required. Describes the Study, default value is empty string.
89447    pub display_name: std::string::String,
89448
89449    /// Required. Configuration of the Study.
89450    pub study_spec: std::option::Option<crate::model::StudySpec>,
89451
89452    /// Output only. The detailed state of a Study.
89453    pub state: crate::model::study::State,
89454
89455    /// Output only. Time at which the study was created.
89456    pub create_time: std::option::Option<wkt::Timestamp>,
89457
89458    /// Output only. A human readable reason why the Study is inactive.
89459    /// This should be empty if a study is ACTIVE or COMPLETED.
89460    pub inactive_reason: std::string::String,
89461
89462    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
89463}
89464
89465#[cfg(feature = "vizier-service")]
89466impl Study {
89467    pub fn new() -> Self {
89468        std::default::Default::default()
89469    }
89470
89471    /// Sets the value of [name][crate::model::Study::name].
89472    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89473        self.name = v.into();
89474        self
89475    }
89476
89477    /// Sets the value of [display_name][crate::model::Study::display_name].
89478    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89479        self.display_name = v.into();
89480        self
89481    }
89482
89483    /// Sets the value of [study_spec][crate::model::Study::study_spec].
89484    pub fn set_study_spec<T>(mut self, v: T) -> Self
89485    where
89486        T: std::convert::Into<crate::model::StudySpec>,
89487    {
89488        self.study_spec = std::option::Option::Some(v.into());
89489        self
89490    }
89491
89492    /// Sets or clears the value of [study_spec][crate::model::Study::study_spec].
89493    pub fn set_or_clear_study_spec<T>(mut self, v: std::option::Option<T>) -> Self
89494    where
89495        T: std::convert::Into<crate::model::StudySpec>,
89496    {
89497        self.study_spec = v.map(|x| x.into());
89498        self
89499    }
89500
89501    /// Sets the value of [state][crate::model::Study::state].
89502    pub fn set_state<T: std::convert::Into<crate::model::study::State>>(mut self, v: T) -> Self {
89503        self.state = v.into();
89504        self
89505    }
89506
89507    /// Sets the value of [create_time][crate::model::Study::create_time].
89508    pub fn set_create_time<T>(mut self, v: T) -> Self
89509    where
89510        T: std::convert::Into<wkt::Timestamp>,
89511    {
89512        self.create_time = std::option::Option::Some(v.into());
89513        self
89514    }
89515
89516    /// Sets or clears the value of [create_time][crate::model::Study::create_time].
89517    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
89518    where
89519        T: std::convert::Into<wkt::Timestamp>,
89520    {
89521        self.create_time = v.map(|x| x.into());
89522        self
89523    }
89524
89525    /// Sets the value of [inactive_reason][crate::model::Study::inactive_reason].
89526    pub fn set_inactive_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89527        self.inactive_reason = v.into();
89528        self
89529    }
89530}
89531
89532#[cfg(feature = "vizier-service")]
89533impl wkt::message::Message for Study {
89534    fn typename() -> &'static str {
89535        "type.googleapis.com/google.cloud.aiplatform.v1.Study"
89536    }
89537}
89538
89539/// Defines additional types related to [Study].
89540#[cfg(feature = "vizier-service")]
89541pub mod study {
89542    #[allow(unused_imports)]
89543    use super::*;
89544
89545    /// Describes the Study state.
89546    ///
89547    /// # Working with unknown values
89548    ///
89549    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
89550    /// additional enum variants at any time. Adding new variants is not considered
89551    /// a breaking change. Applications should write their code in anticipation of:
89552    ///
89553    /// - New values appearing in future releases of the client library, **and**
89554    /// - New values received dynamically, without application changes.
89555    ///
89556    /// Please consult the [Working with enums] section in the user guide for some
89557    /// guidelines.
89558    ///
89559    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
89560    #[cfg(feature = "vizier-service")]
89561    #[derive(Clone, Debug, PartialEq)]
89562    #[non_exhaustive]
89563    pub enum State {
89564        /// The study state is unspecified.
89565        Unspecified,
89566        /// The study is active.
89567        Active,
89568        /// The study is stopped due to an internal error.
89569        Inactive,
89570        /// The study is done when the service exhausts the parameter search space
89571        /// or max_trial_count is reached.
89572        Completed,
89573        /// If set, the enum was initialized with an unknown value.
89574        ///
89575        /// Applications can examine the value using [State::value] or
89576        /// [State::name].
89577        UnknownValue(state::UnknownValue),
89578    }
89579
89580    #[doc(hidden)]
89581    #[cfg(feature = "vizier-service")]
89582    pub mod state {
89583        #[allow(unused_imports)]
89584        use super::*;
89585        #[derive(Clone, Debug, PartialEq)]
89586        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
89587    }
89588
89589    #[cfg(feature = "vizier-service")]
89590    impl State {
89591        /// Gets the enum value.
89592        ///
89593        /// Returns `None` if the enum contains an unknown value deserialized from
89594        /// the string representation of enums.
89595        pub fn value(&self) -> std::option::Option<i32> {
89596            match self {
89597                Self::Unspecified => std::option::Option::Some(0),
89598                Self::Active => std::option::Option::Some(1),
89599                Self::Inactive => std::option::Option::Some(2),
89600                Self::Completed => std::option::Option::Some(3),
89601                Self::UnknownValue(u) => u.0.value(),
89602            }
89603        }
89604
89605        /// Gets the enum value as a string.
89606        ///
89607        /// Returns `None` if the enum contains an unknown value deserialized from
89608        /// the integer representation of enums.
89609        pub fn name(&self) -> std::option::Option<&str> {
89610            match self {
89611                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
89612                Self::Active => std::option::Option::Some("ACTIVE"),
89613                Self::Inactive => std::option::Option::Some("INACTIVE"),
89614                Self::Completed => std::option::Option::Some("COMPLETED"),
89615                Self::UnknownValue(u) => u.0.name(),
89616            }
89617        }
89618    }
89619
89620    #[cfg(feature = "vizier-service")]
89621    impl std::default::Default for State {
89622        fn default() -> Self {
89623            use std::convert::From;
89624            Self::from(0)
89625        }
89626    }
89627
89628    #[cfg(feature = "vizier-service")]
89629    impl std::fmt::Display for State {
89630        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
89631            wkt::internal::display_enum(f, self.name(), self.value())
89632        }
89633    }
89634
89635    #[cfg(feature = "vizier-service")]
89636    impl std::convert::From<i32> for State {
89637        fn from(value: i32) -> Self {
89638            match value {
89639                0 => Self::Unspecified,
89640                1 => Self::Active,
89641                2 => Self::Inactive,
89642                3 => Self::Completed,
89643                _ => Self::UnknownValue(state::UnknownValue(
89644                    wkt::internal::UnknownEnumValue::Integer(value),
89645                )),
89646            }
89647        }
89648    }
89649
89650    #[cfg(feature = "vizier-service")]
89651    impl std::convert::From<&str> for State {
89652        fn from(value: &str) -> Self {
89653            use std::string::ToString;
89654            match value {
89655                "STATE_UNSPECIFIED" => Self::Unspecified,
89656                "ACTIVE" => Self::Active,
89657                "INACTIVE" => Self::Inactive,
89658                "COMPLETED" => Self::Completed,
89659                _ => Self::UnknownValue(state::UnknownValue(
89660                    wkt::internal::UnknownEnumValue::String(value.to_string()),
89661                )),
89662            }
89663        }
89664    }
89665
89666    #[cfg(feature = "vizier-service")]
89667    impl serde::ser::Serialize for State {
89668        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
89669        where
89670            S: serde::Serializer,
89671        {
89672            match self {
89673                Self::Unspecified => serializer.serialize_i32(0),
89674                Self::Active => serializer.serialize_i32(1),
89675                Self::Inactive => serializer.serialize_i32(2),
89676                Self::Completed => serializer.serialize_i32(3),
89677                Self::UnknownValue(u) => u.0.serialize(serializer),
89678            }
89679        }
89680    }
89681
89682    #[cfg(feature = "vizier-service")]
89683    impl<'de> serde::de::Deserialize<'de> for State {
89684        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
89685        where
89686            D: serde::Deserializer<'de>,
89687        {
89688            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
89689                ".google.cloud.aiplatform.v1.Study.State",
89690            ))
89691        }
89692    }
89693}
89694
89695/// A message representing a Trial. A Trial contains a unique set of Parameters
89696/// that has been or will be evaluated, along with the objective metrics got by
89697/// running the Trial.
89698#[cfg(any(feature = "job-service", feature = "vizier-service",))]
89699#[derive(Clone, Default, PartialEq)]
89700#[non_exhaustive]
89701pub struct Trial {
89702    /// Output only. Resource name of the Trial assigned by the service.
89703    pub name: std::string::String,
89704
89705    /// Output only. The identifier of the Trial assigned by the service.
89706    pub id: std::string::String,
89707
89708    /// Output only. The detailed state of the Trial.
89709    pub state: crate::model::trial::State,
89710
89711    /// Output only. The parameters of the Trial.
89712    pub parameters: std::vec::Vec<crate::model::trial::Parameter>,
89713
89714    /// Output only. The final measurement containing the objective value.
89715    pub final_measurement: std::option::Option<crate::model::Measurement>,
89716
89717    /// Output only. A list of measurements that are strictly lexicographically
89718    /// ordered by their induced tuples (steps, elapsed_duration).
89719    /// These are used for early stopping computations.
89720    pub measurements: std::vec::Vec<crate::model::Measurement>,
89721
89722    /// Output only. Time when the Trial was started.
89723    pub start_time: std::option::Option<wkt::Timestamp>,
89724
89725    /// Output only. Time when the Trial's status changed to `SUCCEEDED` or
89726    /// `INFEASIBLE`.
89727    pub end_time: std::option::Option<wkt::Timestamp>,
89728
89729    /// Output only. The identifier of the client that originally requested this
89730    /// Trial. Each client is identified by a unique client_id. When a client asks
89731    /// for a suggestion, Vertex AI Vizier will assign it a Trial. The client
89732    /// should evaluate the Trial, complete it, and report back to Vertex AI
89733    /// Vizier. If suggestion is asked again by same client_id before the Trial is
89734    /// completed, the same Trial will be returned. Multiple clients with
89735    /// different client_ids can ask for suggestions simultaneously, each of them
89736    /// will get their own Trial.
89737    pub client_id: std::string::String,
89738
89739    /// Output only. A human readable string describing why the Trial is
89740    /// infeasible. This is set only if Trial state is `INFEASIBLE`.
89741    pub infeasible_reason: std::string::String,
89742
89743    /// Output only. The CustomJob name linked to the Trial.
89744    /// It's set for a HyperparameterTuningJob's Trial.
89745    pub custom_job: std::string::String,
89746
89747    /// Output only. URIs for accessing [interactive
89748    /// shells](https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell)
89749    /// (one URI for each training node). Only available if this trial is part of
89750    /// a
89751    /// [HyperparameterTuningJob][google.cloud.aiplatform.v1.HyperparameterTuningJob]
89752    /// and the job's
89753    /// [trial_job_spec.enable_web_access][google.cloud.aiplatform.v1.CustomJobSpec.enable_web_access]
89754    /// field is `true`.
89755    ///
89756    /// The keys are names of each node used for the trial; for example,
89757    /// `workerpool0-0` for the primary node, `workerpool1-0` for the first node in
89758    /// the second worker pool, and `workerpool1-1` for the second node in the
89759    /// second worker pool.
89760    ///
89761    /// The values are the URIs for each node's interactive shell.
89762    ///
89763    /// [google.cloud.aiplatform.v1.CustomJobSpec.enable_web_access]: crate::model::CustomJobSpec::enable_web_access
89764    /// [google.cloud.aiplatform.v1.HyperparameterTuningJob]: crate::model::HyperparameterTuningJob
89765    pub web_access_uris: std::collections::HashMap<std::string::String, std::string::String>,
89766
89767    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
89768}
89769
89770#[cfg(any(feature = "job-service", feature = "vizier-service",))]
89771impl Trial {
89772    pub fn new() -> Self {
89773        std::default::Default::default()
89774    }
89775
89776    /// Sets the value of [name][crate::model::Trial::name].
89777    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89778        self.name = v.into();
89779        self
89780    }
89781
89782    /// Sets the value of [id][crate::model::Trial::id].
89783    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89784        self.id = v.into();
89785        self
89786    }
89787
89788    /// Sets the value of [state][crate::model::Trial::state].
89789    pub fn set_state<T: std::convert::Into<crate::model::trial::State>>(mut self, v: T) -> Self {
89790        self.state = v.into();
89791        self
89792    }
89793
89794    /// Sets the value of [parameters][crate::model::Trial::parameters].
89795    pub fn set_parameters<T, V>(mut self, v: T) -> Self
89796    where
89797        T: std::iter::IntoIterator<Item = V>,
89798        V: std::convert::Into<crate::model::trial::Parameter>,
89799    {
89800        use std::iter::Iterator;
89801        self.parameters = v.into_iter().map(|i| i.into()).collect();
89802        self
89803    }
89804
89805    /// Sets the value of [final_measurement][crate::model::Trial::final_measurement].
89806    pub fn set_final_measurement<T>(mut self, v: T) -> Self
89807    where
89808        T: std::convert::Into<crate::model::Measurement>,
89809    {
89810        self.final_measurement = std::option::Option::Some(v.into());
89811        self
89812    }
89813
89814    /// Sets or clears the value of [final_measurement][crate::model::Trial::final_measurement].
89815    pub fn set_or_clear_final_measurement<T>(mut self, v: std::option::Option<T>) -> Self
89816    where
89817        T: std::convert::Into<crate::model::Measurement>,
89818    {
89819        self.final_measurement = v.map(|x| x.into());
89820        self
89821    }
89822
89823    /// Sets the value of [measurements][crate::model::Trial::measurements].
89824    pub fn set_measurements<T, V>(mut self, v: T) -> Self
89825    where
89826        T: std::iter::IntoIterator<Item = V>,
89827        V: std::convert::Into<crate::model::Measurement>,
89828    {
89829        use std::iter::Iterator;
89830        self.measurements = v.into_iter().map(|i| i.into()).collect();
89831        self
89832    }
89833
89834    /// Sets the value of [start_time][crate::model::Trial::start_time].
89835    pub fn set_start_time<T>(mut self, v: T) -> Self
89836    where
89837        T: std::convert::Into<wkt::Timestamp>,
89838    {
89839        self.start_time = std::option::Option::Some(v.into());
89840        self
89841    }
89842
89843    /// Sets or clears the value of [start_time][crate::model::Trial::start_time].
89844    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
89845    where
89846        T: std::convert::Into<wkt::Timestamp>,
89847    {
89848        self.start_time = v.map(|x| x.into());
89849        self
89850    }
89851
89852    /// Sets the value of [end_time][crate::model::Trial::end_time].
89853    pub fn set_end_time<T>(mut self, v: T) -> Self
89854    where
89855        T: std::convert::Into<wkt::Timestamp>,
89856    {
89857        self.end_time = std::option::Option::Some(v.into());
89858        self
89859    }
89860
89861    /// Sets or clears the value of [end_time][crate::model::Trial::end_time].
89862    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
89863    where
89864        T: std::convert::Into<wkt::Timestamp>,
89865    {
89866        self.end_time = v.map(|x| x.into());
89867        self
89868    }
89869
89870    /// Sets the value of [client_id][crate::model::Trial::client_id].
89871    pub fn set_client_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89872        self.client_id = v.into();
89873        self
89874    }
89875
89876    /// Sets the value of [infeasible_reason][crate::model::Trial::infeasible_reason].
89877    pub fn set_infeasible_reason<T: std::convert::Into<std::string::String>>(
89878        mut self,
89879        v: T,
89880    ) -> Self {
89881        self.infeasible_reason = v.into();
89882        self
89883    }
89884
89885    /// Sets the value of [custom_job][crate::model::Trial::custom_job].
89886    pub fn set_custom_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
89887        self.custom_job = v.into();
89888        self
89889    }
89890
89891    /// Sets the value of [web_access_uris][crate::model::Trial::web_access_uris].
89892    pub fn set_web_access_uris<T, K, V>(mut self, v: T) -> Self
89893    where
89894        T: std::iter::IntoIterator<Item = (K, V)>,
89895        K: std::convert::Into<std::string::String>,
89896        V: std::convert::Into<std::string::String>,
89897    {
89898        use std::iter::Iterator;
89899        self.web_access_uris = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
89900        self
89901    }
89902}
89903
89904#[cfg(any(feature = "job-service", feature = "vizier-service",))]
89905impl wkt::message::Message for Trial {
89906    fn typename() -> &'static str {
89907        "type.googleapis.com/google.cloud.aiplatform.v1.Trial"
89908    }
89909}
89910
89911/// Defines additional types related to [Trial].
89912#[cfg(any(feature = "job-service", feature = "vizier-service",))]
89913pub mod trial {
89914    #[allow(unused_imports)]
89915    use super::*;
89916
89917    /// A message representing a parameter to be tuned.
89918    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
89919    #[derive(Clone, Default, PartialEq)]
89920    #[non_exhaustive]
89921    pub struct Parameter {
89922        /// Output only. The ID of the parameter. The parameter should be defined in
89923        /// [StudySpec's
89924        /// Parameters][google.cloud.aiplatform.v1.StudySpec.parameters].
89925        ///
89926        /// [google.cloud.aiplatform.v1.StudySpec.parameters]: crate::model::StudySpec::parameters
89927        pub parameter_id: std::string::String,
89928
89929        /// Output only. The value of the parameter.
89930        /// `number_value` will be set if a parameter defined in StudySpec is
89931        /// in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
89932        /// `string_value` will be set if a parameter defined in StudySpec is
89933        /// in type 'CATEGORICAL'.
89934        pub value: std::option::Option<wkt::Value>,
89935
89936        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
89937    }
89938
89939    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
89940    impl Parameter {
89941        pub fn new() -> Self {
89942            std::default::Default::default()
89943        }
89944
89945        /// Sets the value of [parameter_id][crate::model::trial::Parameter::parameter_id].
89946        pub fn set_parameter_id<T: std::convert::Into<std::string::String>>(
89947            mut self,
89948            v: T,
89949        ) -> Self {
89950            self.parameter_id = v.into();
89951            self
89952        }
89953
89954        /// Sets the value of [value][crate::model::trial::Parameter::value].
89955        pub fn set_value<T>(mut self, v: T) -> Self
89956        where
89957            T: std::convert::Into<wkt::Value>,
89958        {
89959            self.value = std::option::Option::Some(v.into());
89960            self
89961        }
89962
89963        /// Sets or clears the value of [value][crate::model::trial::Parameter::value].
89964        pub fn set_or_clear_value<T>(mut self, v: std::option::Option<T>) -> Self
89965        where
89966            T: std::convert::Into<wkt::Value>,
89967        {
89968            self.value = v.map(|x| x.into());
89969            self
89970        }
89971    }
89972
89973    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
89974    impl wkt::message::Message for Parameter {
89975        fn typename() -> &'static str {
89976            "type.googleapis.com/google.cloud.aiplatform.v1.Trial.Parameter"
89977        }
89978    }
89979
89980    /// Describes a Trial state.
89981    ///
89982    /// # Working with unknown values
89983    ///
89984    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
89985    /// additional enum variants at any time. Adding new variants is not considered
89986    /// a breaking change. Applications should write their code in anticipation of:
89987    ///
89988    /// - New values appearing in future releases of the client library, **and**
89989    /// - New values received dynamically, without application changes.
89990    ///
89991    /// Please consult the [Working with enums] section in the user guide for some
89992    /// guidelines.
89993    ///
89994    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
89995    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
89996    #[derive(Clone, Debug, PartialEq)]
89997    #[non_exhaustive]
89998    pub enum State {
89999        /// The Trial state is unspecified.
90000        Unspecified,
90001        /// Indicates that a specific Trial has been requested, but it has not yet
90002        /// been suggested by the service.
90003        Requested,
90004        /// Indicates that the Trial has been suggested.
90005        Active,
90006        /// Indicates that the Trial should stop according to the service.
90007        Stopping,
90008        /// Indicates that the Trial is completed successfully.
90009        Succeeded,
90010        /// Indicates that the Trial should not be attempted again.
90011        /// The service will set a Trial to INFEASIBLE when it's done but missing
90012        /// the final_measurement.
90013        Infeasible,
90014        /// If set, the enum was initialized with an unknown value.
90015        ///
90016        /// Applications can examine the value using [State::value] or
90017        /// [State::name].
90018        UnknownValue(state::UnknownValue),
90019    }
90020
90021    #[doc(hidden)]
90022    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90023    pub mod state {
90024        #[allow(unused_imports)]
90025        use super::*;
90026        #[derive(Clone, Debug, PartialEq)]
90027        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
90028    }
90029
90030    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90031    impl State {
90032        /// Gets the enum value.
90033        ///
90034        /// Returns `None` if the enum contains an unknown value deserialized from
90035        /// the string representation of enums.
90036        pub fn value(&self) -> std::option::Option<i32> {
90037            match self {
90038                Self::Unspecified => std::option::Option::Some(0),
90039                Self::Requested => std::option::Option::Some(1),
90040                Self::Active => std::option::Option::Some(2),
90041                Self::Stopping => std::option::Option::Some(3),
90042                Self::Succeeded => std::option::Option::Some(4),
90043                Self::Infeasible => std::option::Option::Some(5),
90044                Self::UnknownValue(u) => u.0.value(),
90045            }
90046        }
90047
90048        /// Gets the enum value as a string.
90049        ///
90050        /// Returns `None` if the enum contains an unknown value deserialized from
90051        /// the integer representation of enums.
90052        pub fn name(&self) -> std::option::Option<&str> {
90053            match self {
90054                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
90055                Self::Requested => std::option::Option::Some("REQUESTED"),
90056                Self::Active => std::option::Option::Some("ACTIVE"),
90057                Self::Stopping => std::option::Option::Some("STOPPING"),
90058                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
90059                Self::Infeasible => std::option::Option::Some("INFEASIBLE"),
90060                Self::UnknownValue(u) => u.0.name(),
90061            }
90062        }
90063    }
90064
90065    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90066    impl std::default::Default for State {
90067        fn default() -> Self {
90068            use std::convert::From;
90069            Self::from(0)
90070        }
90071    }
90072
90073    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90074    impl std::fmt::Display for State {
90075        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
90076            wkt::internal::display_enum(f, self.name(), self.value())
90077        }
90078    }
90079
90080    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90081    impl std::convert::From<i32> for State {
90082        fn from(value: i32) -> Self {
90083            match value {
90084                0 => Self::Unspecified,
90085                1 => Self::Requested,
90086                2 => Self::Active,
90087                3 => Self::Stopping,
90088                4 => Self::Succeeded,
90089                5 => Self::Infeasible,
90090                _ => Self::UnknownValue(state::UnknownValue(
90091                    wkt::internal::UnknownEnumValue::Integer(value),
90092                )),
90093            }
90094        }
90095    }
90096
90097    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90098    impl std::convert::From<&str> for State {
90099        fn from(value: &str) -> Self {
90100            use std::string::ToString;
90101            match value {
90102                "STATE_UNSPECIFIED" => Self::Unspecified,
90103                "REQUESTED" => Self::Requested,
90104                "ACTIVE" => Self::Active,
90105                "STOPPING" => Self::Stopping,
90106                "SUCCEEDED" => Self::Succeeded,
90107                "INFEASIBLE" => Self::Infeasible,
90108                _ => Self::UnknownValue(state::UnknownValue(
90109                    wkt::internal::UnknownEnumValue::String(value.to_string()),
90110                )),
90111            }
90112        }
90113    }
90114
90115    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90116    impl serde::ser::Serialize for State {
90117        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
90118        where
90119            S: serde::Serializer,
90120        {
90121            match self {
90122                Self::Unspecified => serializer.serialize_i32(0),
90123                Self::Requested => serializer.serialize_i32(1),
90124                Self::Active => serializer.serialize_i32(2),
90125                Self::Stopping => serializer.serialize_i32(3),
90126                Self::Succeeded => serializer.serialize_i32(4),
90127                Self::Infeasible => serializer.serialize_i32(5),
90128                Self::UnknownValue(u) => u.0.serialize(serializer),
90129            }
90130        }
90131    }
90132
90133    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90134    impl<'de> serde::de::Deserialize<'de> for State {
90135        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
90136        where
90137            D: serde::Deserializer<'de>,
90138        {
90139            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
90140                ".google.cloud.aiplatform.v1.Trial.State",
90141            ))
90142        }
90143    }
90144}
90145
90146#[cfg(feature = "vizier-service")]
90147#[derive(Clone, Default, PartialEq)]
90148#[non_exhaustive]
90149pub struct TrialContext {
90150    /// A human-readable field which can store a description of this context.
90151    /// This will become part of the resulting Trial's description field.
90152    pub description: std::string::String,
90153
90154    /// If/when a Trial is generated or selected from this Context,
90155    /// its Parameters will match any parameters specified here.
90156    /// (I.e. if this context specifies parameter name:'a' int_value:3,
90157    /// then a resulting Trial will have int_value:3 for its parameter named
90158    /// 'a'.) Note that we first attempt to match existing REQUESTED Trials with
90159    /// contexts, and if there are no matches, we generate suggestions in the
90160    /// subspace defined by the parameters specified here.
90161    /// NOTE: a Context without any Parameters matches the entire feasible search
90162    /// space.
90163    pub parameters: std::vec::Vec<crate::model::trial::Parameter>,
90164
90165    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
90166}
90167
90168#[cfg(feature = "vizier-service")]
90169impl TrialContext {
90170    pub fn new() -> Self {
90171        std::default::Default::default()
90172    }
90173
90174    /// Sets the value of [description][crate::model::TrialContext::description].
90175    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
90176        self.description = v.into();
90177        self
90178    }
90179
90180    /// Sets the value of [parameters][crate::model::TrialContext::parameters].
90181    pub fn set_parameters<T, V>(mut self, v: T) -> Self
90182    where
90183        T: std::iter::IntoIterator<Item = V>,
90184        V: std::convert::Into<crate::model::trial::Parameter>,
90185    {
90186        use std::iter::Iterator;
90187        self.parameters = v.into_iter().map(|i| i.into()).collect();
90188        self
90189    }
90190}
90191
90192#[cfg(feature = "vizier-service")]
90193impl wkt::message::Message for TrialContext {
90194    fn typename() -> &'static str {
90195        "type.googleapis.com/google.cloud.aiplatform.v1.TrialContext"
90196    }
90197}
90198
90199/// Time-based Constraint for Study
90200#[cfg(any(feature = "job-service", feature = "vizier-service",))]
90201#[derive(Clone, Default, PartialEq)]
90202#[non_exhaustive]
90203pub struct StudyTimeConstraint {
90204    pub constraint: std::option::Option<crate::model::study_time_constraint::Constraint>,
90205
90206    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
90207}
90208
90209#[cfg(any(feature = "job-service", feature = "vizier-service",))]
90210impl StudyTimeConstraint {
90211    pub fn new() -> Self {
90212        std::default::Default::default()
90213    }
90214
90215    /// Sets the value of [constraint][crate::model::StudyTimeConstraint::constraint].
90216    ///
90217    /// Note that all the setters affecting `constraint` are mutually
90218    /// exclusive.
90219    pub fn set_constraint<
90220        T: std::convert::Into<std::option::Option<crate::model::study_time_constraint::Constraint>>,
90221    >(
90222        mut self,
90223        v: T,
90224    ) -> Self {
90225        self.constraint = v.into();
90226        self
90227    }
90228
90229    /// The value of [constraint][crate::model::StudyTimeConstraint::constraint]
90230    /// if it holds a `MaxDuration`, `None` if the field is not set or
90231    /// holds a different branch.
90232    pub fn max_duration(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
90233        #[allow(unreachable_patterns)]
90234        self.constraint.as_ref().and_then(|v| match v {
90235            crate::model::study_time_constraint::Constraint::MaxDuration(v) => {
90236                std::option::Option::Some(v)
90237            }
90238            _ => std::option::Option::None,
90239        })
90240    }
90241
90242    /// Sets the value of [constraint][crate::model::StudyTimeConstraint::constraint]
90243    /// to hold a `MaxDuration`.
90244    ///
90245    /// Note that all the setters affecting `constraint` are
90246    /// mutually exclusive.
90247    pub fn set_max_duration<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
90248        mut self,
90249        v: T,
90250    ) -> Self {
90251        self.constraint = std::option::Option::Some(
90252            crate::model::study_time_constraint::Constraint::MaxDuration(v.into()),
90253        );
90254        self
90255    }
90256
90257    /// The value of [constraint][crate::model::StudyTimeConstraint::constraint]
90258    /// if it holds a `EndTime`, `None` if the field is not set or
90259    /// holds a different branch.
90260    pub fn end_time(&self) -> std::option::Option<&std::boxed::Box<wkt::Timestamp>> {
90261        #[allow(unreachable_patterns)]
90262        self.constraint.as_ref().and_then(|v| match v {
90263            crate::model::study_time_constraint::Constraint::EndTime(v) => {
90264                std::option::Option::Some(v)
90265            }
90266            _ => std::option::Option::None,
90267        })
90268    }
90269
90270    /// Sets the value of [constraint][crate::model::StudyTimeConstraint::constraint]
90271    /// to hold a `EndTime`.
90272    ///
90273    /// Note that all the setters affecting `constraint` are
90274    /// mutually exclusive.
90275    pub fn set_end_time<T: std::convert::Into<std::boxed::Box<wkt::Timestamp>>>(
90276        mut self,
90277        v: T,
90278    ) -> Self {
90279        self.constraint = std::option::Option::Some(
90280            crate::model::study_time_constraint::Constraint::EndTime(v.into()),
90281        );
90282        self
90283    }
90284}
90285
90286#[cfg(any(feature = "job-service", feature = "vizier-service",))]
90287impl wkt::message::Message for StudyTimeConstraint {
90288    fn typename() -> &'static str {
90289        "type.googleapis.com/google.cloud.aiplatform.v1.StudyTimeConstraint"
90290    }
90291}
90292
90293/// Defines additional types related to [StudyTimeConstraint].
90294#[cfg(any(feature = "job-service", feature = "vizier-service",))]
90295pub mod study_time_constraint {
90296    #[allow(unused_imports)]
90297    use super::*;
90298
90299    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90300    #[derive(Clone, Debug, PartialEq)]
90301    #[non_exhaustive]
90302    pub enum Constraint {
90303        /// Counts the wallclock time passed since the creation of this Study.
90304        MaxDuration(std::boxed::Box<wkt::Duration>),
90305        /// Compares the wallclock time to this time. Must use UTC timezone.
90306        EndTime(std::boxed::Box<wkt::Timestamp>),
90307    }
90308}
90309
90310/// Represents specification of a Study.
90311#[cfg(any(feature = "job-service", feature = "vizier-service",))]
90312#[derive(Clone, Default, PartialEq)]
90313#[non_exhaustive]
90314pub struct StudySpec {
90315    /// Required. Metric specs for the Study.
90316    pub metrics: std::vec::Vec<crate::model::study_spec::MetricSpec>,
90317
90318    /// Required. The set of parameters to tune.
90319    pub parameters: std::vec::Vec<crate::model::study_spec::ParameterSpec>,
90320
90321    /// The search algorithm specified for the Study.
90322    pub algorithm: crate::model::study_spec::Algorithm,
90323
90324    /// The observation noise level of the study.
90325    /// Currently only supported by the Vertex AI Vizier service. Not supported by
90326    /// HyperparameterTuningJob or TrainingPipeline.
90327    pub observation_noise: crate::model::study_spec::ObservationNoise,
90328
90329    /// Describe which measurement selection type will be used
90330    pub measurement_selection_type: crate::model::study_spec::MeasurementSelectionType,
90331
90332    /// Conditions for automated stopping of a Study. Enable automated stopping by
90333    /// configuring at least one condition.
90334    pub study_stopping_config: std::option::Option<crate::model::study_spec::StudyStoppingConfig>,
90335
90336    pub automated_stopping_spec:
90337        std::option::Option<crate::model::study_spec::AutomatedStoppingSpec>,
90338
90339    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
90340}
90341
90342#[cfg(any(feature = "job-service", feature = "vizier-service",))]
90343impl StudySpec {
90344    pub fn new() -> Self {
90345        std::default::Default::default()
90346    }
90347
90348    /// Sets the value of [metrics][crate::model::StudySpec::metrics].
90349    pub fn set_metrics<T, V>(mut self, v: T) -> Self
90350    where
90351        T: std::iter::IntoIterator<Item = V>,
90352        V: std::convert::Into<crate::model::study_spec::MetricSpec>,
90353    {
90354        use std::iter::Iterator;
90355        self.metrics = v.into_iter().map(|i| i.into()).collect();
90356        self
90357    }
90358
90359    /// Sets the value of [parameters][crate::model::StudySpec::parameters].
90360    pub fn set_parameters<T, V>(mut self, v: T) -> Self
90361    where
90362        T: std::iter::IntoIterator<Item = V>,
90363        V: std::convert::Into<crate::model::study_spec::ParameterSpec>,
90364    {
90365        use std::iter::Iterator;
90366        self.parameters = v.into_iter().map(|i| i.into()).collect();
90367        self
90368    }
90369
90370    /// Sets the value of [algorithm][crate::model::StudySpec::algorithm].
90371    pub fn set_algorithm<T: std::convert::Into<crate::model::study_spec::Algorithm>>(
90372        mut self,
90373        v: T,
90374    ) -> Self {
90375        self.algorithm = v.into();
90376        self
90377    }
90378
90379    /// Sets the value of [observation_noise][crate::model::StudySpec::observation_noise].
90380    pub fn set_observation_noise<
90381        T: std::convert::Into<crate::model::study_spec::ObservationNoise>,
90382    >(
90383        mut self,
90384        v: T,
90385    ) -> Self {
90386        self.observation_noise = v.into();
90387        self
90388    }
90389
90390    /// Sets the value of [measurement_selection_type][crate::model::StudySpec::measurement_selection_type].
90391    pub fn set_measurement_selection_type<
90392        T: std::convert::Into<crate::model::study_spec::MeasurementSelectionType>,
90393    >(
90394        mut self,
90395        v: T,
90396    ) -> Self {
90397        self.measurement_selection_type = v.into();
90398        self
90399    }
90400
90401    /// Sets the value of [study_stopping_config][crate::model::StudySpec::study_stopping_config].
90402    pub fn set_study_stopping_config<T>(mut self, v: T) -> Self
90403    where
90404        T: std::convert::Into<crate::model::study_spec::StudyStoppingConfig>,
90405    {
90406        self.study_stopping_config = std::option::Option::Some(v.into());
90407        self
90408    }
90409
90410    /// Sets or clears the value of [study_stopping_config][crate::model::StudySpec::study_stopping_config].
90411    pub fn set_or_clear_study_stopping_config<T>(mut self, v: std::option::Option<T>) -> Self
90412    where
90413        T: std::convert::Into<crate::model::study_spec::StudyStoppingConfig>,
90414    {
90415        self.study_stopping_config = v.map(|x| x.into());
90416        self
90417    }
90418
90419    /// Sets the value of [automated_stopping_spec][crate::model::StudySpec::automated_stopping_spec].
90420    ///
90421    /// Note that all the setters affecting `automated_stopping_spec` are mutually
90422    /// exclusive.
90423    pub fn set_automated_stopping_spec<
90424        T: std::convert::Into<std::option::Option<crate::model::study_spec::AutomatedStoppingSpec>>,
90425    >(
90426        mut self,
90427        v: T,
90428    ) -> Self {
90429        self.automated_stopping_spec = v.into();
90430        self
90431    }
90432
90433    /// The value of [automated_stopping_spec][crate::model::StudySpec::automated_stopping_spec]
90434    /// if it holds a `DecayCurveStoppingSpec`, `None` if the field is not set or
90435    /// holds a different branch.
90436    pub fn decay_curve_stopping_spec(
90437        &self,
90438    ) -> std::option::Option<
90439        &std::boxed::Box<crate::model::study_spec::DecayCurveAutomatedStoppingSpec>,
90440    > {
90441        #[allow(unreachable_patterns)]
90442        self.automated_stopping_spec.as_ref().and_then(|v| match v {
90443            crate::model::study_spec::AutomatedStoppingSpec::DecayCurveStoppingSpec(v) => {
90444                std::option::Option::Some(v)
90445            }
90446            _ => std::option::Option::None,
90447        })
90448    }
90449
90450    /// Sets the value of [automated_stopping_spec][crate::model::StudySpec::automated_stopping_spec]
90451    /// to hold a `DecayCurveStoppingSpec`.
90452    ///
90453    /// Note that all the setters affecting `automated_stopping_spec` are
90454    /// mutually exclusive.
90455    pub fn set_decay_curve_stopping_spec<
90456        T: std::convert::Into<
90457                std::boxed::Box<crate::model::study_spec::DecayCurveAutomatedStoppingSpec>,
90458            >,
90459    >(
90460        mut self,
90461        v: T,
90462    ) -> Self {
90463        self.automated_stopping_spec = std::option::Option::Some(
90464            crate::model::study_spec::AutomatedStoppingSpec::DecayCurveStoppingSpec(v.into()),
90465        );
90466        self
90467    }
90468
90469    /// The value of [automated_stopping_spec][crate::model::StudySpec::automated_stopping_spec]
90470    /// if it holds a `MedianAutomatedStoppingSpec`, `None` if the field is not set or
90471    /// holds a different branch.
90472    pub fn median_automated_stopping_spec(
90473        &self,
90474    ) -> std::option::Option<&std::boxed::Box<crate::model::study_spec::MedianAutomatedStoppingSpec>>
90475    {
90476        #[allow(unreachable_patterns)]
90477        self.automated_stopping_spec.as_ref().and_then(|v| match v {
90478            crate::model::study_spec::AutomatedStoppingSpec::MedianAutomatedStoppingSpec(v) => {
90479                std::option::Option::Some(v)
90480            }
90481            _ => std::option::Option::None,
90482        })
90483    }
90484
90485    /// Sets the value of [automated_stopping_spec][crate::model::StudySpec::automated_stopping_spec]
90486    /// to hold a `MedianAutomatedStoppingSpec`.
90487    ///
90488    /// Note that all the setters affecting `automated_stopping_spec` are
90489    /// mutually exclusive.
90490    pub fn set_median_automated_stopping_spec<
90491        T: std::convert::Into<std::boxed::Box<crate::model::study_spec::MedianAutomatedStoppingSpec>>,
90492    >(
90493        mut self,
90494        v: T,
90495    ) -> Self {
90496        self.automated_stopping_spec = std::option::Option::Some(
90497            crate::model::study_spec::AutomatedStoppingSpec::MedianAutomatedStoppingSpec(v.into()),
90498        );
90499        self
90500    }
90501
90502    /// The value of [automated_stopping_spec][crate::model::StudySpec::automated_stopping_spec]
90503    /// if it holds a `ConvexAutomatedStoppingSpec`, `None` if the field is not set or
90504    /// holds a different branch.
90505    pub fn convex_automated_stopping_spec(
90506        &self,
90507    ) -> std::option::Option<&std::boxed::Box<crate::model::study_spec::ConvexAutomatedStoppingSpec>>
90508    {
90509        #[allow(unreachable_patterns)]
90510        self.automated_stopping_spec.as_ref().and_then(|v| match v {
90511            crate::model::study_spec::AutomatedStoppingSpec::ConvexAutomatedStoppingSpec(v) => {
90512                std::option::Option::Some(v)
90513            }
90514            _ => std::option::Option::None,
90515        })
90516    }
90517
90518    /// Sets the value of [automated_stopping_spec][crate::model::StudySpec::automated_stopping_spec]
90519    /// to hold a `ConvexAutomatedStoppingSpec`.
90520    ///
90521    /// Note that all the setters affecting `automated_stopping_spec` are
90522    /// mutually exclusive.
90523    pub fn set_convex_automated_stopping_spec<
90524        T: std::convert::Into<std::boxed::Box<crate::model::study_spec::ConvexAutomatedStoppingSpec>>,
90525    >(
90526        mut self,
90527        v: T,
90528    ) -> Self {
90529        self.automated_stopping_spec = std::option::Option::Some(
90530            crate::model::study_spec::AutomatedStoppingSpec::ConvexAutomatedStoppingSpec(v.into()),
90531        );
90532        self
90533    }
90534}
90535
90536#[cfg(any(feature = "job-service", feature = "vizier-service",))]
90537impl wkt::message::Message for StudySpec {
90538    fn typename() -> &'static str {
90539        "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec"
90540    }
90541}
90542
90543/// Defines additional types related to [StudySpec].
90544#[cfg(any(feature = "job-service", feature = "vizier-service",))]
90545pub mod study_spec {
90546    #[allow(unused_imports)]
90547    use super::*;
90548
90549    /// Represents a metric to optimize.
90550    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90551    #[derive(Clone, Default, PartialEq)]
90552    #[non_exhaustive]
90553    pub struct MetricSpec {
90554        /// Required. The ID of the metric. Must not contain whitespaces and must be
90555        /// unique amongst all MetricSpecs.
90556        pub metric_id: std::string::String,
90557
90558        /// Required. The optimization goal of the metric.
90559        pub goal: crate::model::study_spec::metric_spec::GoalType,
90560
90561        /// Used for safe search. In the case, the metric will be a safety
90562        /// metric. You must provide a separate metric for objective metric.
90563        pub safety_config:
90564            std::option::Option<crate::model::study_spec::metric_spec::SafetyMetricConfig>,
90565
90566        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
90567    }
90568
90569    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90570    impl MetricSpec {
90571        pub fn new() -> Self {
90572            std::default::Default::default()
90573        }
90574
90575        /// Sets the value of [metric_id][crate::model::study_spec::MetricSpec::metric_id].
90576        pub fn set_metric_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
90577            self.metric_id = v.into();
90578            self
90579        }
90580
90581        /// Sets the value of [goal][crate::model::study_spec::MetricSpec::goal].
90582        pub fn set_goal<T: std::convert::Into<crate::model::study_spec::metric_spec::GoalType>>(
90583            mut self,
90584            v: T,
90585        ) -> Self {
90586            self.goal = v.into();
90587            self
90588        }
90589
90590        /// Sets the value of [safety_config][crate::model::study_spec::MetricSpec::safety_config].
90591        pub fn set_safety_config<T>(mut self, v: T) -> Self
90592        where
90593            T: std::convert::Into<crate::model::study_spec::metric_spec::SafetyMetricConfig>,
90594        {
90595            self.safety_config = std::option::Option::Some(v.into());
90596            self
90597        }
90598
90599        /// Sets or clears the value of [safety_config][crate::model::study_spec::MetricSpec::safety_config].
90600        pub fn set_or_clear_safety_config<T>(mut self, v: std::option::Option<T>) -> Self
90601        where
90602            T: std::convert::Into<crate::model::study_spec::metric_spec::SafetyMetricConfig>,
90603        {
90604            self.safety_config = v.map(|x| x.into());
90605            self
90606        }
90607    }
90608
90609    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90610    impl wkt::message::Message for MetricSpec {
90611        fn typename() -> &'static str {
90612            "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.MetricSpec"
90613        }
90614    }
90615
90616    /// Defines additional types related to [MetricSpec].
90617    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90618    pub mod metric_spec {
90619        #[allow(unused_imports)]
90620        use super::*;
90621
90622        /// Used in safe optimization to specify threshold levels and risk tolerance.
90623        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90624        #[derive(Clone, Default, PartialEq)]
90625        #[non_exhaustive]
90626        pub struct SafetyMetricConfig {
90627            /// Safety threshold (boundary value between safe and unsafe). NOTE that if
90628            /// you leave SafetyMetricConfig unset, a default value of 0 will be used.
90629            pub safety_threshold: f64,
90630
90631            /// Desired minimum fraction of safe trials (over total number of trials)
90632            /// that should be targeted by the algorithm at any time during the
90633            /// study (best effort). This should be between 0.0 and 1.0 and a value of
90634            /// 0.0 means that there is no minimum and an algorithm proceeds without
90635            /// targeting any specific fraction. A value of 1.0 means that the
90636            /// algorithm attempts to only Suggest safe Trials.
90637            pub desired_min_safe_trials_fraction: std::option::Option<f64>,
90638
90639            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
90640        }
90641
90642        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90643        impl SafetyMetricConfig {
90644            pub fn new() -> Self {
90645                std::default::Default::default()
90646            }
90647
90648            /// Sets the value of [safety_threshold][crate::model::study_spec::metric_spec::SafetyMetricConfig::safety_threshold].
90649            pub fn set_safety_threshold<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
90650                self.safety_threshold = v.into();
90651                self
90652            }
90653
90654            /// Sets the value of [desired_min_safe_trials_fraction][crate::model::study_spec::metric_spec::SafetyMetricConfig::desired_min_safe_trials_fraction].
90655            pub fn set_desired_min_safe_trials_fraction<T>(mut self, v: T) -> Self
90656            where
90657                T: std::convert::Into<f64>,
90658            {
90659                self.desired_min_safe_trials_fraction = std::option::Option::Some(v.into());
90660                self
90661            }
90662
90663            /// Sets or clears the value of [desired_min_safe_trials_fraction][crate::model::study_spec::metric_spec::SafetyMetricConfig::desired_min_safe_trials_fraction].
90664            pub fn set_or_clear_desired_min_safe_trials_fraction<T>(
90665                mut self,
90666                v: std::option::Option<T>,
90667            ) -> Self
90668            where
90669                T: std::convert::Into<f64>,
90670            {
90671                self.desired_min_safe_trials_fraction = v.map(|x| x.into());
90672                self
90673            }
90674        }
90675
90676        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90677        impl wkt::message::Message for SafetyMetricConfig {
90678            fn typename() -> &'static str {
90679                "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig"
90680            }
90681        }
90682
90683        /// The available types of optimization goals.
90684        ///
90685        /// # Working with unknown values
90686        ///
90687        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
90688        /// additional enum variants at any time. Adding new variants is not considered
90689        /// a breaking change. Applications should write their code in anticipation of:
90690        ///
90691        /// - New values appearing in future releases of the client library, **and**
90692        /// - New values received dynamically, without application changes.
90693        ///
90694        /// Please consult the [Working with enums] section in the user guide for some
90695        /// guidelines.
90696        ///
90697        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
90698        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90699        #[derive(Clone, Debug, PartialEq)]
90700        #[non_exhaustive]
90701        pub enum GoalType {
90702            /// Goal Type will default to maximize.
90703            Unspecified,
90704            /// Maximize the goal metric.
90705            Maximize,
90706            /// Minimize the goal metric.
90707            Minimize,
90708            /// If set, the enum was initialized with an unknown value.
90709            ///
90710            /// Applications can examine the value using [GoalType::value] or
90711            /// [GoalType::name].
90712            UnknownValue(goal_type::UnknownValue),
90713        }
90714
90715        #[doc(hidden)]
90716        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90717        pub mod goal_type {
90718            #[allow(unused_imports)]
90719            use super::*;
90720            #[derive(Clone, Debug, PartialEq)]
90721            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
90722        }
90723
90724        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90725        impl GoalType {
90726            /// Gets the enum value.
90727            ///
90728            /// Returns `None` if the enum contains an unknown value deserialized from
90729            /// the string representation of enums.
90730            pub fn value(&self) -> std::option::Option<i32> {
90731                match self {
90732                    Self::Unspecified => std::option::Option::Some(0),
90733                    Self::Maximize => std::option::Option::Some(1),
90734                    Self::Minimize => std::option::Option::Some(2),
90735                    Self::UnknownValue(u) => u.0.value(),
90736                }
90737            }
90738
90739            /// Gets the enum value as a string.
90740            ///
90741            /// Returns `None` if the enum contains an unknown value deserialized from
90742            /// the integer representation of enums.
90743            pub fn name(&self) -> std::option::Option<&str> {
90744                match self {
90745                    Self::Unspecified => std::option::Option::Some("GOAL_TYPE_UNSPECIFIED"),
90746                    Self::Maximize => std::option::Option::Some("MAXIMIZE"),
90747                    Self::Minimize => std::option::Option::Some("MINIMIZE"),
90748                    Self::UnknownValue(u) => u.0.name(),
90749                }
90750            }
90751        }
90752
90753        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90754        impl std::default::Default for GoalType {
90755            fn default() -> Self {
90756                use std::convert::From;
90757                Self::from(0)
90758            }
90759        }
90760
90761        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90762        impl std::fmt::Display for GoalType {
90763            fn fmt(
90764                &self,
90765                f: &mut std::fmt::Formatter<'_>,
90766            ) -> std::result::Result<(), std::fmt::Error> {
90767                wkt::internal::display_enum(f, self.name(), self.value())
90768            }
90769        }
90770
90771        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90772        impl std::convert::From<i32> for GoalType {
90773            fn from(value: i32) -> Self {
90774                match value {
90775                    0 => Self::Unspecified,
90776                    1 => Self::Maximize,
90777                    2 => Self::Minimize,
90778                    _ => Self::UnknownValue(goal_type::UnknownValue(
90779                        wkt::internal::UnknownEnumValue::Integer(value),
90780                    )),
90781                }
90782            }
90783        }
90784
90785        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90786        impl std::convert::From<&str> for GoalType {
90787            fn from(value: &str) -> Self {
90788                use std::string::ToString;
90789                match value {
90790                    "GOAL_TYPE_UNSPECIFIED" => Self::Unspecified,
90791                    "MAXIMIZE" => Self::Maximize,
90792                    "MINIMIZE" => Self::Minimize,
90793                    _ => Self::UnknownValue(goal_type::UnknownValue(
90794                        wkt::internal::UnknownEnumValue::String(value.to_string()),
90795                    )),
90796                }
90797            }
90798        }
90799
90800        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90801        impl serde::ser::Serialize for GoalType {
90802            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
90803            where
90804                S: serde::Serializer,
90805            {
90806                match self {
90807                    Self::Unspecified => serializer.serialize_i32(0),
90808                    Self::Maximize => serializer.serialize_i32(1),
90809                    Self::Minimize => serializer.serialize_i32(2),
90810                    Self::UnknownValue(u) => u.0.serialize(serializer),
90811                }
90812            }
90813        }
90814
90815        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90816        impl<'de> serde::de::Deserialize<'de> for GoalType {
90817            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
90818            where
90819                D: serde::Deserializer<'de>,
90820            {
90821                deserializer.deserialize_any(wkt::internal::EnumVisitor::<GoalType>::new(
90822                    ".google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType",
90823                ))
90824            }
90825        }
90826    }
90827
90828    /// Represents a single parameter to optimize.
90829    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90830    #[derive(Clone, Default, PartialEq)]
90831    #[non_exhaustive]
90832    pub struct ParameterSpec {
90833        /// Required. The ID of the parameter. Must not contain whitespaces and must
90834        /// be unique amongst all ParameterSpecs.
90835        pub parameter_id: std::string::String,
90836
90837        /// How the parameter should be scaled.
90838        /// Leave unset for `CATEGORICAL` parameters.
90839        pub scale_type: crate::model::study_spec::parameter_spec::ScaleType,
90840
90841        /// A conditional parameter node is active if the parameter's value matches
90842        /// the conditional node's parent_value_condition.
90843        ///
90844        /// If two items in conditional_parameter_specs have the same name, they
90845        /// must have disjoint parent_value_condition.
90846        pub conditional_parameter_specs:
90847            std::vec::Vec<crate::model::study_spec::parameter_spec::ConditionalParameterSpec>,
90848
90849        pub parameter_value_spec:
90850            std::option::Option<crate::model::study_spec::parameter_spec::ParameterValueSpec>,
90851
90852        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
90853    }
90854
90855    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
90856    impl ParameterSpec {
90857        pub fn new() -> Self {
90858            std::default::Default::default()
90859        }
90860
90861        /// Sets the value of [parameter_id][crate::model::study_spec::ParameterSpec::parameter_id].
90862        pub fn set_parameter_id<T: std::convert::Into<std::string::String>>(
90863            mut self,
90864            v: T,
90865        ) -> Self {
90866            self.parameter_id = v.into();
90867            self
90868        }
90869
90870        /// Sets the value of [scale_type][crate::model::study_spec::ParameterSpec::scale_type].
90871        pub fn set_scale_type<
90872            T: std::convert::Into<crate::model::study_spec::parameter_spec::ScaleType>,
90873        >(
90874            mut self,
90875            v: T,
90876        ) -> Self {
90877            self.scale_type = v.into();
90878            self
90879        }
90880
90881        /// Sets the value of [conditional_parameter_specs][crate::model::study_spec::ParameterSpec::conditional_parameter_specs].
90882        pub fn set_conditional_parameter_specs<T, V>(mut self, v: T) -> Self
90883        where
90884            T: std::iter::IntoIterator<Item = V>,
90885            V: std::convert::Into<
90886                    crate::model::study_spec::parameter_spec::ConditionalParameterSpec,
90887                >,
90888        {
90889            use std::iter::Iterator;
90890            self.conditional_parameter_specs = v.into_iter().map(|i| i.into()).collect();
90891            self
90892        }
90893
90894        /// Sets the value of [parameter_value_spec][crate::model::study_spec::ParameterSpec::parameter_value_spec].
90895        ///
90896        /// Note that all the setters affecting `parameter_value_spec` are mutually
90897        /// exclusive.
90898        pub fn set_parameter_value_spec<
90899            T: std::convert::Into<
90900                    std::option::Option<
90901                        crate::model::study_spec::parameter_spec::ParameterValueSpec,
90902                    >,
90903                >,
90904        >(
90905            mut self,
90906            v: T,
90907        ) -> Self {
90908            self.parameter_value_spec = v.into();
90909            self
90910        }
90911
90912        /// The value of [parameter_value_spec][crate::model::study_spec::ParameterSpec::parameter_value_spec]
90913        /// if it holds a `DoubleValueSpec`, `None` if the field is not set or
90914        /// holds a different branch.
90915        pub fn double_value_spec(
90916            &self,
90917        ) -> std::option::Option<
90918            &std::boxed::Box<crate::model::study_spec::parameter_spec::DoubleValueSpec>,
90919        > {
90920            #[allow(unreachable_patterns)]
90921            self.parameter_value_spec.as_ref().and_then(|v| match v {
90922                crate::model::study_spec::parameter_spec::ParameterValueSpec::DoubleValueSpec(
90923                    v,
90924                ) => std::option::Option::Some(v),
90925                _ => std::option::Option::None,
90926            })
90927        }
90928
90929        /// Sets the value of [parameter_value_spec][crate::model::study_spec::ParameterSpec::parameter_value_spec]
90930        /// to hold a `DoubleValueSpec`.
90931        ///
90932        /// Note that all the setters affecting `parameter_value_spec` are
90933        /// mutually exclusive.
90934        pub fn set_double_value_spec<
90935            T: std::convert::Into<
90936                    std::boxed::Box<crate::model::study_spec::parameter_spec::DoubleValueSpec>,
90937                >,
90938        >(
90939            mut self,
90940            v: T,
90941        ) -> Self {
90942            self.parameter_value_spec = std::option::Option::Some(
90943                crate::model::study_spec::parameter_spec::ParameterValueSpec::DoubleValueSpec(
90944                    v.into(),
90945                ),
90946            );
90947            self
90948        }
90949
90950        /// The value of [parameter_value_spec][crate::model::study_spec::ParameterSpec::parameter_value_spec]
90951        /// if it holds a `IntegerValueSpec`, `None` if the field is not set or
90952        /// holds a different branch.
90953        pub fn integer_value_spec(
90954            &self,
90955        ) -> std::option::Option<
90956            &std::boxed::Box<crate::model::study_spec::parameter_spec::IntegerValueSpec>,
90957        > {
90958            #[allow(unreachable_patterns)]
90959            self.parameter_value_spec.as_ref().and_then(|v| match v {
90960                crate::model::study_spec::parameter_spec::ParameterValueSpec::IntegerValueSpec(
90961                    v,
90962                ) => std::option::Option::Some(v),
90963                _ => std::option::Option::None,
90964            })
90965        }
90966
90967        /// Sets the value of [parameter_value_spec][crate::model::study_spec::ParameterSpec::parameter_value_spec]
90968        /// to hold a `IntegerValueSpec`.
90969        ///
90970        /// Note that all the setters affecting `parameter_value_spec` are
90971        /// mutually exclusive.
90972        pub fn set_integer_value_spec<
90973            T: std::convert::Into<
90974                    std::boxed::Box<crate::model::study_spec::parameter_spec::IntegerValueSpec>,
90975                >,
90976        >(
90977            mut self,
90978            v: T,
90979        ) -> Self {
90980            self.parameter_value_spec = std::option::Option::Some(
90981                crate::model::study_spec::parameter_spec::ParameterValueSpec::IntegerValueSpec(
90982                    v.into(),
90983                ),
90984            );
90985            self
90986        }
90987
90988        /// The value of [parameter_value_spec][crate::model::study_spec::ParameterSpec::parameter_value_spec]
90989        /// if it holds a `CategoricalValueSpec`, `None` if the field is not set or
90990        /// holds a different branch.
90991        pub fn categorical_value_spec(
90992            &self,
90993        ) -> std::option::Option<
90994            &std::boxed::Box<crate::model::study_spec::parameter_spec::CategoricalValueSpec>,
90995        > {
90996            #[allow(unreachable_patterns)]
90997            self.parameter_value_spec.as_ref().and_then(|v| match v {
90998                crate::model::study_spec::parameter_spec::ParameterValueSpec::CategoricalValueSpec(v) => std::option::Option::Some(v),
90999                _ => std::option::Option::None,
91000            })
91001        }
91002
91003        /// Sets the value of [parameter_value_spec][crate::model::study_spec::ParameterSpec::parameter_value_spec]
91004        /// to hold a `CategoricalValueSpec`.
91005        ///
91006        /// Note that all the setters affecting `parameter_value_spec` are
91007        /// mutually exclusive.
91008        pub fn set_categorical_value_spec<
91009            T: std::convert::Into<
91010                    std::boxed::Box<crate::model::study_spec::parameter_spec::CategoricalValueSpec>,
91011                >,
91012        >(
91013            mut self,
91014            v: T,
91015        ) -> Self {
91016            self.parameter_value_spec = std::option::Option::Some(
91017                crate::model::study_spec::parameter_spec::ParameterValueSpec::CategoricalValueSpec(
91018                    v.into(),
91019                ),
91020            );
91021            self
91022        }
91023
91024        /// The value of [parameter_value_spec][crate::model::study_spec::ParameterSpec::parameter_value_spec]
91025        /// if it holds a `DiscreteValueSpec`, `None` if the field is not set or
91026        /// holds a different branch.
91027        pub fn discrete_value_spec(
91028            &self,
91029        ) -> std::option::Option<
91030            &std::boxed::Box<crate::model::study_spec::parameter_spec::DiscreteValueSpec>,
91031        > {
91032            #[allow(unreachable_patterns)]
91033            self.parameter_value_spec.as_ref().and_then(|v| match v {
91034                crate::model::study_spec::parameter_spec::ParameterValueSpec::DiscreteValueSpec(
91035                    v,
91036                ) => std::option::Option::Some(v),
91037                _ => std::option::Option::None,
91038            })
91039        }
91040
91041        /// Sets the value of [parameter_value_spec][crate::model::study_spec::ParameterSpec::parameter_value_spec]
91042        /// to hold a `DiscreteValueSpec`.
91043        ///
91044        /// Note that all the setters affecting `parameter_value_spec` are
91045        /// mutually exclusive.
91046        pub fn set_discrete_value_spec<
91047            T: std::convert::Into<
91048                    std::boxed::Box<crate::model::study_spec::parameter_spec::DiscreteValueSpec>,
91049                >,
91050        >(
91051            mut self,
91052            v: T,
91053        ) -> Self {
91054            self.parameter_value_spec = std::option::Option::Some(
91055                crate::model::study_spec::parameter_spec::ParameterValueSpec::DiscreteValueSpec(
91056                    v.into(),
91057                ),
91058            );
91059            self
91060        }
91061    }
91062
91063    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91064    impl wkt::message::Message for ParameterSpec {
91065        fn typename() -> &'static str {
91066            "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.ParameterSpec"
91067        }
91068    }
91069
91070    /// Defines additional types related to [ParameterSpec].
91071    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91072    pub mod parameter_spec {
91073        #[allow(unused_imports)]
91074        use super::*;
91075
91076        /// Value specification for a parameter in `DOUBLE` type.
91077        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91078        #[derive(Clone, Default, PartialEq)]
91079        #[non_exhaustive]
91080        pub struct DoubleValueSpec {
91081            /// Required. Inclusive minimum value of the parameter.
91082            pub min_value: f64,
91083
91084            /// Required. Inclusive maximum value of the parameter.
91085            pub max_value: f64,
91086
91087            /// A default value for a `DOUBLE` parameter that is assumed to be a
91088            /// relatively good starting point.  Unset value signals that there is no
91089            /// offered starting point.
91090            ///
91091            /// Currently only supported by the Vertex AI Vizier service. Not supported
91092            /// by HyperparameterTuningJob or TrainingPipeline.
91093            pub default_value: std::option::Option<f64>,
91094
91095            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
91096        }
91097
91098        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91099        impl DoubleValueSpec {
91100            pub fn new() -> Self {
91101                std::default::Default::default()
91102            }
91103
91104            /// Sets the value of [min_value][crate::model::study_spec::parameter_spec::DoubleValueSpec::min_value].
91105            pub fn set_min_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
91106                self.min_value = v.into();
91107                self
91108            }
91109
91110            /// Sets the value of [max_value][crate::model::study_spec::parameter_spec::DoubleValueSpec::max_value].
91111            pub fn set_max_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
91112                self.max_value = v.into();
91113                self
91114            }
91115
91116            /// Sets the value of [default_value][crate::model::study_spec::parameter_spec::DoubleValueSpec::default_value].
91117            pub fn set_default_value<T>(mut self, v: T) -> Self
91118            where
91119                T: std::convert::Into<f64>,
91120            {
91121                self.default_value = std::option::Option::Some(v.into());
91122                self
91123            }
91124
91125            /// Sets or clears the value of [default_value][crate::model::study_spec::parameter_spec::DoubleValueSpec::default_value].
91126            pub fn set_or_clear_default_value<T>(mut self, v: std::option::Option<T>) -> Self
91127            where
91128                T: std::convert::Into<f64>,
91129            {
91130                self.default_value = v.map(|x| x.into());
91131                self
91132            }
91133        }
91134
91135        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91136        impl wkt::message::Message for DoubleValueSpec {
91137            fn typename() -> &'static str {
91138                "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec"
91139            }
91140        }
91141
91142        /// Value specification for a parameter in `INTEGER` type.
91143        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91144        #[derive(Clone, Default, PartialEq)]
91145        #[non_exhaustive]
91146        pub struct IntegerValueSpec {
91147            /// Required. Inclusive minimum value of the parameter.
91148            pub min_value: i64,
91149
91150            /// Required. Inclusive maximum value of the parameter.
91151            pub max_value: i64,
91152
91153            /// A default value for an `INTEGER` parameter that is assumed to be a
91154            /// relatively good starting point.  Unset value signals that there is no
91155            /// offered starting point.
91156            ///
91157            /// Currently only supported by the Vertex AI Vizier service. Not supported
91158            /// by HyperparameterTuningJob or TrainingPipeline.
91159            pub default_value: std::option::Option<i64>,
91160
91161            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
91162        }
91163
91164        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91165        impl IntegerValueSpec {
91166            pub fn new() -> Self {
91167                std::default::Default::default()
91168            }
91169
91170            /// Sets the value of [min_value][crate::model::study_spec::parameter_spec::IntegerValueSpec::min_value].
91171            pub fn set_min_value<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
91172                self.min_value = v.into();
91173                self
91174            }
91175
91176            /// Sets the value of [max_value][crate::model::study_spec::parameter_spec::IntegerValueSpec::max_value].
91177            pub fn set_max_value<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
91178                self.max_value = v.into();
91179                self
91180            }
91181
91182            /// Sets the value of [default_value][crate::model::study_spec::parameter_spec::IntegerValueSpec::default_value].
91183            pub fn set_default_value<T>(mut self, v: T) -> Self
91184            where
91185                T: std::convert::Into<i64>,
91186            {
91187                self.default_value = std::option::Option::Some(v.into());
91188                self
91189            }
91190
91191            /// Sets or clears the value of [default_value][crate::model::study_spec::parameter_spec::IntegerValueSpec::default_value].
91192            pub fn set_or_clear_default_value<T>(mut self, v: std::option::Option<T>) -> Self
91193            where
91194                T: std::convert::Into<i64>,
91195            {
91196                self.default_value = v.map(|x| x.into());
91197                self
91198            }
91199        }
91200
91201        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91202        impl wkt::message::Message for IntegerValueSpec {
91203            fn typename() -> &'static str {
91204                "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.ParameterSpec.IntegerValueSpec"
91205            }
91206        }
91207
91208        /// Value specification for a parameter in `CATEGORICAL` type.
91209        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91210        #[derive(Clone, Default, PartialEq)]
91211        #[non_exhaustive]
91212        pub struct CategoricalValueSpec {
91213            /// Required. The list of possible categories.
91214            pub values: std::vec::Vec<std::string::String>,
91215
91216            /// A default value for a `CATEGORICAL` parameter that is assumed to be a
91217            /// relatively good starting point.  Unset value signals that there is no
91218            /// offered starting point.
91219            ///
91220            /// Currently only supported by the Vertex AI Vizier service. Not supported
91221            /// by HyperparameterTuningJob or TrainingPipeline.
91222            pub default_value: std::option::Option<std::string::String>,
91223
91224            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
91225        }
91226
91227        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91228        impl CategoricalValueSpec {
91229            pub fn new() -> Self {
91230                std::default::Default::default()
91231            }
91232
91233            /// Sets the value of [values][crate::model::study_spec::parameter_spec::CategoricalValueSpec::values].
91234            pub fn set_values<T, V>(mut self, v: T) -> Self
91235            where
91236                T: std::iter::IntoIterator<Item = V>,
91237                V: std::convert::Into<std::string::String>,
91238            {
91239                use std::iter::Iterator;
91240                self.values = v.into_iter().map(|i| i.into()).collect();
91241                self
91242            }
91243
91244            /// Sets the value of [default_value][crate::model::study_spec::parameter_spec::CategoricalValueSpec::default_value].
91245            pub fn set_default_value<T>(mut self, v: T) -> Self
91246            where
91247                T: std::convert::Into<std::string::String>,
91248            {
91249                self.default_value = std::option::Option::Some(v.into());
91250                self
91251            }
91252
91253            /// Sets or clears the value of [default_value][crate::model::study_spec::parameter_spec::CategoricalValueSpec::default_value].
91254            pub fn set_or_clear_default_value<T>(mut self, v: std::option::Option<T>) -> Self
91255            where
91256                T: std::convert::Into<std::string::String>,
91257            {
91258                self.default_value = v.map(|x| x.into());
91259                self
91260            }
91261        }
91262
91263        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91264        impl wkt::message::Message for CategoricalValueSpec {
91265            fn typename() -> &'static str {
91266                "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec"
91267            }
91268        }
91269
91270        /// Value specification for a parameter in `DISCRETE` type.
91271        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91272        #[derive(Clone, Default, PartialEq)]
91273        #[non_exhaustive]
91274        pub struct DiscreteValueSpec {
91275            /// Required. A list of possible values.
91276            /// The list should be in increasing order and at least 1e-10 apart.
91277            /// For instance, this parameter might have possible settings of 1.5, 2.5,
91278            /// and 4.0. This list should not contain more than 1,000 values.
91279            pub values: std::vec::Vec<f64>,
91280
91281            /// A default value for a `DISCRETE` parameter that is assumed to be a
91282            /// relatively good starting point.  Unset value signals that there is no
91283            /// offered starting point.  It automatically rounds to the
91284            /// nearest feasible discrete point.
91285            ///
91286            /// Currently only supported by the Vertex AI Vizier service. Not supported
91287            /// by HyperparameterTuningJob or TrainingPipeline.
91288            pub default_value: std::option::Option<f64>,
91289
91290            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
91291        }
91292
91293        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91294        impl DiscreteValueSpec {
91295            pub fn new() -> Self {
91296                std::default::Default::default()
91297            }
91298
91299            /// Sets the value of [values][crate::model::study_spec::parameter_spec::DiscreteValueSpec::values].
91300            pub fn set_values<T, V>(mut self, v: T) -> Self
91301            where
91302                T: std::iter::IntoIterator<Item = V>,
91303                V: std::convert::Into<f64>,
91304            {
91305                use std::iter::Iterator;
91306                self.values = v.into_iter().map(|i| i.into()).collect();
91307                self
91308            }
91309
91310            /// Sets the value of [default_value][crate::model::study_spec::parameter_spec::DiscreteValueSpec::default_value].
91311            pub fn set_default_value<T>(mut self, v: T) -> Self
91312            where
91313                T: std::convert::Into<f64>,
91314            {
91315                self.default_value = std::option::Option::Some(v.into());
91316                self
91317            }
91318
91319            /// Sets or clears the value of [default_value][crate::model::study_spec::parameter_spec::DiscreteValueSpec::default_value].
91320            pub fn set_or_clear_default_value<T>(mut self, v: std::option::Option<T>) -> Self
91321            where
91322                T: std::convert::Into<f64>,
91323            {
91324                self.default_value = v.map(|x| x.into());
91325                self
91326            }
91327        }
91328
91329        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91330        impl wkt::message::Message for DiscreteValueSpec {
91331            fn typename() -> &'static str {
91332                "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DiscreteValueSpec"
91333            }
91334        }
91335
91336        /// Represents a parameter spec with condition from its parent parameter.
91337        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91338        #[derive(Clone, Default, PartialEq)]
91339        #[non_exhaustive]
91340        pub struct ConditionalParameterSpec {
91341
91342            /// Required. The spec for a conditional parameter.
91343            pub parameter_spec: std::option::Option<std::boxed::Box<crate::model::study_spec::ParameterSpec>>,
91344
91345            /// A set of parameter values from the parent ParameterSpec's feasible
91346            /// space.
91347            pub parent_value_condition: std::option::Option<crate::model::study_spec::parameter_spec::conditional_parameter_spec::ParentValueCondition>,
91348
91349            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
91350        }
91351
91352        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91353        impl ConditionalParameterSpec {
91354            pub fn new() -> Self {
91355                std::default::Default::default()
91356            }
91357
91358            /// Sets the value of [parameter_spec][crate::model::study_spec::parameter_spec::ConditionalParameterSpec::parameter_spec].
91359            pub fn set_parameter_spec<T>(mut self, v: T) -> Self
91360            where
91361                T: std::convert::Into<crate::model::study_spec::ParameterSpec>,
91362            {
91363                self.parameter_spec = std::option::Option::Some(std::boxed::Box::new(v.into()));
91364                self
91365            }
91366
91367            /// Sets or clears the value of [parameter_spec][crate::model::study_spec::parameter_spec::ConditionalParameterSpec::parameter_spec].
91368            pub fn set_or_clear_parameter_spec<T>(mut self, v: std::option::Option<T>) -> Self
91369            where
91370                T: std::convert::Into<crate::model::study_spec::ParameterSpec>,
91371            {
91372                self.parameter_spec = v.map(|x| std::boxed::Box::new(x.into()));
91373                self
91374            }
91375
91376            /// Sets the value of [parent_value_condition][crate::model::study_spec::parameter_spec::ConditionalParameterSpec::parent_value_condition].
91377            ///
91378            /// Note that all the setters affecting `parent_value_condition` are mutually
91379            /// exclusive.
91380            pub fn set_parent_value_condition<T: std::convert::Into<std::option::Option<crate::model::study_spec::parameter_spec::conditional_parameter_spec::ParentValueCondition>>>(mut self, v: T) -> Self
91381            {
91382                self.parent_value_condition = v.into();
91383                self
91384            }
91385
91386            /// The value of [parent_value_condition][crate::model::study_spec::parameter_spec::ConditionalParameterSpec::parent_value_condition]
91387            /// if it holds a `ParentDiscreteValues`, `None` if the field is not set or
91388            /// holds a different branch.
91389            pub fn parent_discrete_values(&self) -> std::option::Option<&std::boxed::Box<crate::model::study_spec::parameter_spec::conditional_parameter_spec::DiscreteValueCondition>>{
91390                #[allow(unreachable_patterns)]
91391                self.parent_value_condition.as_ref().and_then(|v| match v {
91392                    crate::model::study_spec::parameter_spec::conditional_parameter_spec::ParentValueCondition::ParentDiscreteValues(v) => std::option::Option::Some(v),
91393                    _ => std::option::Option::None,
91394                })
91395            }
91396
91397            /// Sets the value of [parent_value_condition][crate::model::study_spec::parameter_spec::ConditionalParameterSpec::parent_value_condition]
91398            /// to hold a `ParentDiscreteValues`.
91399            ///
91400            /// Note that all the setters affecting `parent_value_condition` are
91401            /// mutually exclusive.
91402            pub fn set_parent_discrete_values<T: std::convert::Into<std::boxed::Box<crate::model::study_spec::parameter_spec::conditional_parameter_spec::DiscreteValueCondition>>>(mut self, v: T) -> Self{
91403                self.parent_value_condition = std::option::Option::Some(
91404                    crate::model::study_spec::parameter_spec::conditional_parameter_spec::ParentValueCondition::ParentDiscreteValues(
91405                        v.into()
91406                    )
91407                );
91408                self
91409            }
91410
91411            /// The value of [parent_value_condition][crate::model::study_spec::parameter_spec::ConditionalParameterSpec::parent_value_condition]
91412            /// if it holds a `ParentIntValues`, `None` if the field is not set or
91413            /// holds a different branch.
91414            pub fn parent_int_values(&self) -> std::option::Option<&std::boxed::Box<crate::model::study_spec::parameter_spec::conditional_parameter_spec::IntValueCondition>>{
91415                #[allow(unreachable_patterns)]
91416                self.parent_value_condition.as_ref().and_then(|v| match v {
91417                    crate::model::study_spec::parameter_spec::conditional_parameter_spec::ParentValueCondition::ParentIntValues(v) => std::option::Option::Some(v),
91418                    _ => std::option::Option::None,
91419                })
91420            }
91421
91422            /// Sets the value of [parent_value_condition][crate::model::study_spec::parameter_spec::ConditionalParameterSpec::parent_value_condition]
91423            /// to hold a `ParentIntValues`.
91424            ///
91425            /// Note that all the setters affecting `parent_value_condition` are
91426            /// mutually exclusive.
91427            pub fn set_parent_int_values<T: std::convert::Into<std::boxed::Box<crate::model::study_spec::parameter_spec::conditional_parameter_spec::IntValueCondition>>>(mut self, v: T) -> Self{
91428                self.parent_value_condition = std::option::Option::Some(
91429                    crate::model::study_spec::parameter_spec::conditional_parameter_spec::ParentValueCondition::ParentIntValues(
91430                        v.into()
91431                    )
91432                );
91433                self
91434            }
91435
91436            /// The value of [parent_value_condition][crate::model::study_spec::parameter_spec::ConditionalParameterSpec::parent_value_condition]
91437            /// if it holds a `ParentCategoricalValues`, `None` if the field is not set or
91438            /// holds a different branch.
91439            pub fn parent_categorical_values(&self) -> std::option::Option<&std::boxed::Box<crate::model::study_spec::parameter_spec::conditional_parameter_spec::CategoricalValueCondition>>{
91440                #[allow(unreachable_patterns)]
91441                self.parent_value_condition.as_ref().and_then(|v| match v {
91442                    crate::model::study_spec::parameter_spec::conditional_parameter_spec::ParentValueCondition::ParentCategoricalValues(v) => std::option::Option::Some(v),
91443                    _ => std::option::Option::None,
91444                })
91445            }
91446
91447            /// Sets the value of [parent_value_condition][crate::model::study_spec::parameter_spec::ConditionalParameterSpec::parent_value_condition]
91448            /// to hold a `ParentCategoricalValues`.
91449            ///
91450            /// Note that all the setters affecting `parent_value_condition` are
91451            /// mutually exclusive.
91452            pub fn set_parent_categorical_values<T: std::convert::Into<std::boxed::Box<crate::model::study_spec::parameter_spec::conditional_parameter_spec::CategoricalValueCondition>>>(mut self, v: T) -> Self{
91453                self.parent_value_condition = std::option::Option::Some(
91454                    crate::model::study_spec::parameter_spec::conditional_parameter_spec::ParentValueCondition::ParentCategoricalValues(
91455                        v.into()
91456                    )
91457                );
91458                self
91459            }
91460        }
91461
91462        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91463        impl wkt::message::Message for ConditionalParameterSpec {
91464            fn typename() -> &'static str {
91465                "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec"
91466            }
91467        }
91468
91469        /// Defines additional types related to [ConditionalParameterSpec].
91470        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91471        pub mod conditional_parameter_spec {
91472            #[allow(unused_imports)]
91473            use super::*;
91474
91475            /// Represents the spec to match discrete values from parent parameter.
91476            #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91477            #[derive(Clone, Default, PartialEq)]
91478            #[non_exhaustive]
91479            pub struct DiscreteValueCondition {
91480                /// Required. Matches values of the parent parameter of 'DISCRETE' type.
91481                /// All values must exist in `discrete_value_spec` of parent parameter.
91482                ///
91483                /// The Epsilon of the value matching is 1e-10.
91484                pub values: std::vec::Vec<f64>,
91485
91486                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
91487            }
91488
91489            #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91490            impl DiscreteValueCondition {
91491                pub fn new() -> Self {
91492                    std::default::Default::default()
91493                }
91494
91495                /// Sets the value of [values][crate::model::study_spec::parameter_spec::conditional_parameter_spec::DiscreteValueCondition::values].
91496                pub fn set_values<T, V>(mut self, v: T) -> Self
91497                where
91498                    T: std::iter::IntoIterator<Item = V>,
91499                    V: std::convert::Into<f64>,
91500                {
91501                    use std::iter::Iterator;
91502                    self.values = v.into_iter().map(|i| i.into()).collect();
91503                    self
91504                }
91505            }
91506
91507            #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91508            impl wkt::message::Message for DiscreteValueCondition {
91509                fn typename() -> &'static str {
91510                    "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition"
91511                }
91512            }
91513
91514            /// Represents the spec to match integer values from parent parameter.
91515            #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91516            #[derive(Clone, Default, PartialEq)]
91517            #[non_exhaustive]
91518            pub struct IntValueCondition {
91519                /// Required. Matches values of the parent parameter of 'INTEGER' type.
91520                /// All values must lie in `integer_value_spec` of parent parameter.
91521                pub values: std::vec::Vec<i64>,
91522
91523                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
91524            }
91525
91526            #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91527            impl IntValueCondition {
91528                pub fn new() -> Self {
91529                    std::default::Default::default()
91530                }
91531
91532                /// Sets the value of [values][crate::model::study_spec::parameter_spec::conditional_parameter_spec::IntValueCondition::values].
91533                pub fn set_values<T, V>(mut self, v: T) -> Self
91534                where
91535                    T: std::iter::IntoIterator<Item = V>,
91536                    V: std::convert::Into<i64>,
91537                {
91538                    use std::iter::Iterator;
91539                    self.values = v.into_iter().map(|i| i.into()).collect();
91540                    self
91541                }
91542            }
91543
91544            #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91545            impl wkt::message::Message for IntValueCondition {
91546                fn typename() -> &'static str {
91547                    "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition"
91548                }
91549            }
91550
91551            /// Represents the spec to match categorical values from parent parameter.
91552            #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91553            #[derive(Clone, Default, PartialEq)]
91554            #[non_exhaustive]
91555            pub struct CategoricalValueCondition {
91556                /// Required. Matches values of the parent parameter of 'CATEGORICAL'
91557                /// type. All values must exist in `categorical_value_spec` of parent
91558                /// parameter.
91559                pub values: std::vec::Vec<std::string::String>,
91560
91561                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
91562            }
91563
91564            #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91565            impl CategoricalValueCondition {
91566                pub fn new() -> Self {
91567                    std::default::Default::default()
91568                }
91569
91570                /// Sets the value of [values][crate::model::study_spec::parameter_spec::conditional_parameter_spec::CategoricalValueCondition::values].
91571                pub fn set_values<T, V>(mut self, v: T) -> Self
91572                where
91573                    T: std::iter::IntoIterator<Item = V>,
91574                    V: std::convert::Into<std::string::String>,
91575                {
91576                    use std::iter::Iterator;
91577                    self.values = v.into_iter().map(|i| i.into()).collect();
91578                    self
91579                }
91580            }
91581
91582            #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91583            impl wkt::message::Message for CategoricalValueCondition {
91584                fn typename() -> &'static str {
91585                    "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition"
91586                }
91587            }
91588
91589            /// A set of parameter values from the parent ParameterSpec's feasible
91590            /// space.
91591            #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91592            #[derive(Clone, Debug, PartialEq)]
91593            #[non_exhaustive]
91594            pub enum ParentValueCondition {
91595                /// The spec for matching values from a parent parameter of
91596                /// `DISCRETE` type.
91597                ParentDiscreteValues(std::boxed::Box<crate::model::study_spec::parameter_spec::conditional_parameter_spec::DiscreteValueCondition>),
91598                /// The spec for matching values from a parent parameter of `INTEGER`
91599                /// type.
91600                ParentIntValues(std::boxed::Box<crate::model::study_spec::parameter_spec::conditional_parameter_spec::IntValueCondition>),
91601                /// The spec for matching values from a parent parameter of
91602                /// `CATEGORICAL` type.
91603                ParentCategoricalValues(std::boxed::Box<crate::model::study_spec::parameter_spec::conditional_parameter_spec::CategoricalValueCondition>),
91604            }
91605        }
91606
91607        /// The type of scaling that should be applied to this parameter.
91608        ///
91609        /// # Working with unknown values
91610        ///
91611        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
91612        /// additional enum variants at any time. Adding new variants is not considered
91613        /// a breaking change. Applications should write their code in anticipation of:
91614        ///
91615        /// - New values appearing in future releases of the client library, **and**
91616        /// - New values received dynamically, without application changes.
91617        ///
91618        /// Please consult the [Working with enums] section in the user guide for some
91619        /// guidelines.
91620        ///
91621        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
91622        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91623        #[derive(Clone, Debug, PartialEq)]
91624        #[non_exhaustive]
91625        pub enum ScaleType {
91626            /// By default, no scaling is applied.
91627            Unspecified,
91628            /// Scales the feasible space to (0, 1) linearly.
91629            UnitLinearScale,
91630            /// Scales the feasible space logarithmically to (0, 1). The entire
91631            /// feasible space must be strictly positive.
91632            UnitLogScale,
91633            /// Scales the feasible space "reverse" logarithmically to (0, 1). The
91634            /// result is that values close to the top of the feasible space are spread
91635            /// out more than points near the bottom. The entire feasible space must be
91636            /// strictly positive.
91637            UnitReverseLogScale,
91638            /// If set, the enum was initialized with an unknown value.
91639            ///
91640            /// Applications can examine the value using [ScaleType::value] or
91641            /// [ScaleType::name].
91642            UnknownValue(scale_type::UnknownValue),
91643        }
91644
91645        #[doc(hidden)]
91646        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91647        pub mod scale_type {
91648            #[allow(unused_imports)]
91649            use super::*;
91650            #[derive(Clone, Debug, PartialEq)]
91651            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
91652        }
91653
91654        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91655        impl ScaleType {
91656            /// Gets the enum value.
91657            ///
91658            /// Returns `None` if the enum contains an unknown value deserialized from
91659            /// the string representation of enums.
91660            pub fn value(&self) -> std::option::Option<i32> {
91661                match self {
91662                    Self::Unspecified => std::option::Option::Some(0),
91663                    Self::UnitLinearScale => std::option::Option::Some(1),
91664                    Self::UnitLogScale => std::option::Option::Some(2),
91665                    Self::UnitReverseLogScale => std::option::Option::Some(3),
91666                    Self::UnknownValue(u) => u.0.value(),
91667                }
91668            }
91669
91670            /// Gets the enum value as a string.
91671            ///
91672            /// Returns `None` if the enum contains an unknown value deserialized from
91673            /// the integer representation of enums.
91674            pub fn name(&self) -> std::option::Option<&str> {
91675                match self {
91676                    Self::Unspecified => std::option::Option::Some("SCALE_TYPE_UNSPECIFIED"),
91677                    Self::UnitLinearScale => std::option::Option::Some("UNIT_LINEAR_SCALE"),
91678                    Self::UnitLogScale => std::option::Option::Some("UNIT_LOG_SCALE"),
91679                    Self::UnitReverseLogScale => {
91680                        std::option::Option::Some("UNIT_REVERSE_LOG_SCALE")
91681                    }
91682                    Self::UnknownValue(u) => u.0.name(),
91683                }
91684            }
91685        }
91686
91687        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91688        impl std::default::Default for ScaleType {
91689            fn default() -> Self {
91690                use std::convert::From;
91691                Self::from(0)
91692            }
91693        }
91694
91695        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91696        impl std::fmt::Display for ScaleType {
91697            fn fmt(
91698                &self,
91699                f: &mut std::fmt::Formatter<'_>,
91700            ) -> std::result::Result<(), std::fmt::Error> {
91701                wkt::internal::display_enum(f, self.name(), self.value())
91702            }
91703        }
91704
91705        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91706        impl std::convert::From<i32> for ScaleType {
91707            fn from(value: i32) -> Self {
91708                match value {
91709                    0 => Self::Unspecified,
91710                    1 => Self::UnitLinearScale,
91711                    2 => Self::UnitLogScale,
91712                    3 => Self::UnitReverseLogScale,
91713                    _ => Self::UnknownValue(scale_type::UnknownValue(
91714                        wkt::internal::UnknownEnumValue::Integer(value),
91715                    )),
91716                }
91717            }
91718        }
91719
91720        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91721        impl std::convert::From<&str> for ScaleType {
91722            fn from(value: &str) -> Self {
91723                use std::string::ToString;
91724                match value {
91725                    "SCALE_TYPE_UNSPECIFIED" => Self::Unspecified,
91726                    "UNIT_LINEAR_SCALE" => Self::UnitLinearScale,
91727                    "UNIT_LOG_SCALE" => Self::UnitLogScale,
91728                    "UNIT_REVERSE_LOG_SCALE" => Self::UnitReverseLogScale,
91729                    _ => Self::UnknownValue(scale_type::UnknownValue(
91730                        wkt::internal::UnknownEnumValue::String(value.to_string()),
91731                    )),
91732                }
91733            }
91734        }
91735
91736        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91737        impl serde::ser::Serialize for ScaleType {
91738            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
91739            where
91740                S: serde::Serializer,
91741            {
91742                match self {
91743                    Self::Unspecified => serializer.serialize_i32(0),
91744                    Self::UnitLinearScale => serializer.serialize_i32(1),
91745                    Self::UnitLogScale => serializer.serialize_i32(2),
91746                    Self::UnitReverseLogScale => serializer.serialize_i32(3),
91747                    Self::UnknownValue(u) => u.0.serialize(serializer),
91748                }
91749            }
91750        }
91751
91752        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91753        impl<'de> serde::de::Deserialize<'de> for ScaleType {
91754            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
91755            where
91756                D: serde::Deserializer<'de>,
91757            {
91758                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ScaleType>::new(
91759                    ".google.cloud.aiplatform.v1.StudySpec.ParameterSpec.ScaleType",
91760                ))
91761            }
91762        }
91763
91764        #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91765        #[derive(Clone, Debug, PartialEq)]
91766        #[non_exhaustive]
91767        pub enum ParameterValueSpec {
91768            /// The value spec for a 'DOUBLE' parameter.
91769            DoubleValueSpec(
91770                std::boxed::Box<crate::model::study_spec::parameter_spec::DoubleValueSpec>,
91771            ),
91772            /// The value spec for an 'INTEGER' parameter.
91773            IntegerValueSpec(
91774                std::boxed::Box<crate::model::study_spec::parameter_spec::IntegerValueSpec>,
91775            ),
91776            /// The value spec for a 'CATEGORICAL' parameter.
91777            CategoricalValueSpec(
91778                std::boxed::Box<crate::model::study_spec::parameter_spec::CategoricalValueSpec>,
91779            ),
91780            /// The value spec for a 'DISCRETE' parameter.
91781            DiscreteValueSpec(
91782                std::boxed::Box<crate::model::study_spec::parameter_spec::DiscreteValueSpec>,
91783            ),
91784        }
91785    }
91786
91787    /// The decay curve automated stopping rule builds a Gaussian Process
91788    /// Regressor to predict the final objective value of a Trial based on the
91789    /// already completed Trials and the intermediate measurements of the current
91790    /// Trial. Early stopping is requested for the current Trial if there is very
91791    /// low probability to exceed the optimal value found so far.
91792    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91793    #[derive(Clone, Default, PartialEq)]
91794    #[non_exhaustive]
91795    pub struct DecayCurveAutomatedStoppingSpec {
91796        /// True if
91797        /// [Measurement.elapsed_duration][google.cloud.aiplatform.v1.Measurement.elapsed_duration]
91798        /// is used as the x-axis of each Trials Decay Curve. Otherwise,
91799        /// [Measurement.step_count][google.cloud.aiplatform.v1.Measurement.step_count]
91800        /// will be used as the x-axis.
91801        ///
91802        /// [google.cloud.aiplatform.v1.Measurement.elapsed_duration]: crate::model::Measurement::elapsed_duration
91803        /// [google.cloud.aiplatform.v1.Measurement.step_count]: crate::model::Measurement::step_count
91804        pub use_elapsed_duration: bool,
91805
91806        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
91807    }
91808
91809    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91810    impl DecayCurveAutomatedStoppingSpec {
91811        pub fn new() -> Self {
91812            std::default::Default::default()
91813        }
91814
91815        /// Sets the value of [use_elapsed_duration][crate::model::study_spec::DecayCurveAutomatedStoppingSpec::use_elapsed_duration].
91816        pub fn set_use_elapsed_duration<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
91817            self.use_elapsed_duration = v.into();
91818            self
91819        }
91820    }
91821
91822    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91823    impl wkt::message::Message for DecayCurveAutomatedStoppingSpec {
91824        fn typename() -> &'static str {
91825            "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.DecayCurveAutomatedStoppingSpec"
91826        }
91827    }
91828
91829    /// The median automated stopping rule stops a pending Trial if the Trial's
91830    /// best objective_value is strictly below the median 'performance' of all
91831    /// completed Trials reported up to the Trial's last measurement.
91832    /// Currently, 'performance' refers to the running average of the objective
91833    /// values reported by the Trial in each measurement.
91834    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91835    #[derive(Clone, Default, PartialEq)]
91836    #[non_exhaustive]
91837    pub struct MedianAutomatedStoppingSpec {
91838        /// True if median automated stopping rule applies on
91839        /// [Measurement.elapsed_duration][google.cloud.aiplatform.v1.Measurement.elapsed_duration].
91840        /// It means that elapsed_duration field of latest measurement of current
91841        /// Trial is used to compute median objective value for each completed
91842        /// Trials.
91843        ///
91844        /// [google.cloud.aiplatform.v1.Measurement.elapsed_duration]: crate::model::Measurement::elapsed_duration
91845        pub use_elapsed_duration: bool,
91846
91847        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
91848    }
91849
91850    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91851    impl MedianAutomatedStoppingSpec {
91852        pub fn new() -> Self {
91853            std::default::Default::default()
91854        }
91855
91856        /// Sets the value of [use_elapsed_duration][crate::model::study_spec::MedianAutomatedStoppingSpec::use_elapsed_duration].
91857        pub fn set_use_elapsed_duration<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
91858            self.use_elapsed_duration = v.into();
91859            self
91860        }
91861    }
91862
91863    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91864    impl wkt::message::Message for MedianAutomatedStoppingSpec {
91865        fn typename() -> &'static str {
91866            "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.MedianAutomatedStoppingSpec"
91867        }
91868    }
91869
91870    /// Configuration for ConvexAutomatedStoppingSpec.
91871    /// When there are enough completed trials (configured by
91872    /// min_measurement_count), for pending trials with enough measurements and
91873    /// steps, the policy first computes an overestimate of the objective value at
91874    /// max_num_steps according to the slope of the incomplete objective value
91875    /// curve. No prediction can be made if the curve is completely flat. If the
91876    /// overestimation is worse than the best objective value of the completed
91877    /// trials, this pending trial will be early-stopped, but a last measurement
91878    /// will be added to the pending trial with max_num_steps and predicted
91879    /// objective value from the autoregression model.
91880    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91881    #[derive(Clone, Default, PartialEq)]
91882    #[non_exhaustive]
91883    pub struct ConvexAutomatedStoppingSpec {
91884        /// Steps used in predicting the final objective for early stopped trials. In
91885        /// general, it's set to be the same as the defined steps in training /
91886        /// tuning. If not defined, it will learn it from the completed trials. When
91887        /// use_steps is false, this field is set to the maximum elapsed seconds.
91888        pub max_step_count: i64,
91889
91890        /// Minimum number of steps for a trial to complete. Trials which do not have
91891        /// a measurement with step_count > min_step_count won't be considered for
91892        /// early stopping. It's ok to set it to 0, and a trial can be early stopped
91893        /// at any stage. By default, min_step_count is set to be one-tenth of the
91894        /// max_step_count.
91895        /// When use_elapsed_duration is true, this field is set to the minimum
91896        /// elapsed seconds.
91897        pub min_step_count: i64,
91898
91899        /// The minimal number of measurements in a Trial.  Early-stopping checks
91900        /// will not trigger if less than min_measurement_count+1 completed trials or
91901        /// pending trials with less than min_measurement_count measurements. If not
91902        /// defined, the default value is 5.
91903        pub min_measurement_count: i64,
91904
91905        /// The hyper-parameter name used in the tuning job that stands for learning
91906        /// rate. Leave it blank if learning rate is not in a parameter in tuning.
91907        /// The learning_rate is used to estimate the objective value of the ongoing
91908        /// trial.
91909        pub learning_rate_parameter_name: std::string::String,
91910
91911        /// This bool determines whether or not the rule is applied based on
91912        /// elapsed_secs or steps. If use_elapsed_duration==false, the early stopping
91913        /// decision is made according to the predicted objective values according to
91914        /// the target steps. If use_elapsed_duration==true, elapsed_secs is used
91915        /// instead of steps. Also, in this case, the parameters max_num_steps and
91916        /// min_num_steps are overloaded to contain max_elapsed_seconds and
91917        /// min_elapsed_seconds.
91918        pub use_elapsed_duration: bool,
91919
91920        /// ConvexAutomatedStoppingSpec by default only updates the trials that needs
91921        /// to be early stopped using a newly trained auto-regressive model. When
91922        /// this flag is set to True, all stopped trials from the beginning are
91923        /// potentially updated in terms of their `final_measurement`. Also, note
91924        /// that the training logic of autoregressive models is different in this
91925        /// case. Enabling this option has shown better results and this may be the
91926        /// default option in the future.
91927        pub update_all_stopped_trials: std::option::Option<bool>,
91928
91929        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
91930    }
91931
91932    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91933    impl ConvexAutomatedStoppingSpec {
91934        pub fn new() -> Self {
91935            std::default::Default::default()
91936        }
91937
91938        /// Sets the value of [max_step_count][crate::model::study_spec::ConvexAutomatedStoppingSpec::max_step_count].
91939        pub fn set_max_step_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
91940            self.max_step_count = v.into();
91941            self
91942        }
91943
91944        /// Sets the value of [min_step_count][crate::model::study_spec::ConvexAutomatedStoppingSpec::min_step_count].
91945        pub fn set_min_step_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
91946            self.min_step_count = v.into();
91947            self
91948        }
91949
91950        /// Sets the value of [min_measurement_count][crate::model::study_spec::ConvexAutomatedStoppingSpec::min_measurement_count].
91951        pub fn set_min_measurement_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
91952            self.min_measurement_count = v.into();
91953            self
91954        }
91955
91956        /// Sets the value of [learning_rate_parameter_name][crate::model::study_spec::ConvexAutomatedStoppingSpec::learning_rate_parameter_name].
91957        pub fn set_learning_rate_parameter_name<T: std::convert::Into<std::string::String>>(
91958            mut self,
91959            v: T,
91960        ) -> Self {
91961            self.learning_rate_parameter_name = v.into();
91962            self
91963        }
91964
91965        /// Sets the value of [use_elapsed_duration][crate::model::study_spec::ConvexAutomatedStoppingSpec::use_elapsed_duration].
91966        pub fn set_use_elapsed_duration<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
91967            self.use_elapsed_duration = v.into();
91968            self
91969        }
91970
91971        /// Sets the value of [update_all_stopped_trials][crate::model::study_spec::ConvexAutomatedStoppingSpec::update_all_stopped_trials].
91972        pub fn set_update_all_stopped_trials<T>(mut self, v: T) -> Self
91973        where
91974            T: std::convert::Into<bool>,
91975        {
91976            self.update_all_stopped_trials = std::option::Option::Some(v.into());
91977            self
91978        }
91979
91980        /// Sets or clears the value of [update_all_stopped_trials][crate::model::study_spec::ConvexAutomatedStoppingSpec::update_all_stopped_trials].
91981        pub fn set_or_clear_update_all_stopped_trials<T>(
91982            mut self,
91983            v: std::option::Option<T>,
91984        ) -> Self
91985        where
91986            T: std::convert::Into<bool>,
91987        {
91988            self.update_all_stopped_trials = v.map(|x| x.into());
91989            self
91990        }
91991    }
91992
91993    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
91994    impl wkt::message::Message for ConvexAutomatedStoppingSpec {
91995        fn typename() -> &'static str {
91996            "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.ConvexAutomatedStoppingSpec"
91997        }
91998    }
91999
92000    /// The configuration (stopping conditions) for automated stopping of a Study.
92001    /// Conditions include trial budgets, time budgets, and convergence detection.
92002    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92003    #[derive(Clone, Default, PartialEq)]
92004    #[non_exhaustive]
92005    pub struct StudyStoppingConfig {
92006        /// If true, a Study enters STOPPING_ASAP whenever it would normally enters
92007        /// STOPPING state.
92008        ///
92009        /// The bottom line is: set to true if you want to interrupt on-going
92010        /// evaluations of Trials as soon as the study stopping condition is met.
92011        /// (Please see Study.State documentation for the source of truth).
92012        pub should_stop_asap: std::option::Option<wkt::BoolValue>,
92013
92014        /// Each "stopping rule" in this proto specifies an "if" condition. Before
92015        /// Vizier would generate a new suggestion, it first checks each specified
92016        /// stopping rule, from top to bottom in this list.
92017        /// Note that the first few rules (e.g. minimum_runtime_constraint,
92018        /// min_num_trials) will prevent other stopping rules from being evaluated
92019        /// until they are met. For example, setting `min_num_trials=5` and
92020        /// `always_stop_after= 1 hour` means that the Study will ONLY stop after it
92021        /// has 5 COMPLETED trials, even if more than an hour has passed since its
92022        /// creation. It follows the first applicable rule (whose "if" condition is
92023        /// satisfied) to make a stopping decision. If none of the specified rules
92024        /// are applicable, then Vizier decides that the study should not stop.
92025        /// If Vizier decides that the study should stop, the study enters
92026        /// STOPPING state (or STOPPING_ASAP if should_stop_asap = true).
92027        /// IMPORTANT: The automatic study state transition happens precisely as
92028        /// described above; that is, deleting trials or updating StudyConfig NEVER
92029        /// automatically moves the study state back to ACTIVE. If you want to
92030        /// _resume_ a Study that was stopped, 1) change the stopping conditions if
92031        /// necessary, 2) activate the study, and then 3) ask for suggestions.
92032        /// If the specified time or duration has not passed, do not stop the
92033        /// study.
92034        pub minimum_runtime_constraint: std::option::Option<crate::model::StudyTimeConstraint>,
92035
92036        /// If the specified time or duration has passed, stop the study.
92037        pub maximum_runtime_constraint: std::option::Option<crate::model::StudyTimeConstraint>,
92038
92039        /// If there are fewer than this many COMPLETED trials, do not stop the
92040        /// study.
92041        pub min_num_trials: std::option::Option<wkt::Int32Value>,
92042
92043        /// If there are more than this many trials, stop the study.
92044        pub max_num_trials: std::option::Option<wkt::Int32Value>,
92045
92046        /// If the objective value has not improved for this many consecutive
92047        /// trials, stop the study.
92048        ///
92049        /// WARNING: Effective only for single-objective studies.
92050        pub max_num_trials_no_progress: std::option::Option<wkt::Int32Value>,
92051
92052        /// If the objective value has not improved for this much time, stop the
92053        /// study.
92054        ///
92055        /// WARNING: Effective only for single-objective studies.
92056        pub max_duration_no_progress: std::option::Option<wkt::Duration>,
92057
92058        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
92059    }
92060
92061    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92062    impl StudyStoppingConfig {
92063        pub fn new() -> Self {
92064            std::default::Default::default()
92065        }
92066
92067        /// Sets the value of [should_stop_asap][crate::model::study_spec::StudyStoppingConfig::should_stop_asap].
92068        pub fn set_should_stop_asap<T>(mut self, v: T) -> Self
92069        where
92070            T: std::convert::Into<wkt::BoolValue>,
92071        {
92072            self.should_stop_asap = std::option::Option::Some(v.into());
92073            self
92074        }
92075
92076        /// Sets or clears the value of [should_stop_asap][crate::model::study_spec::StudyStoppingConfig::should_stop_asap].
92077        pub fn set_or_clear_should_stop_asap<T>(mut self, v: std::option::Option<T>) -> Self
92078        where
92079            T: std::convert::Into<wkt::BoolValue>,
92080        {
92081            self.should_stop_asap = v.map(|x| x.into());
92082            self
92083        }
92084
92085        /// Sets the value of [minimum_runtime_constraint][crate::model::study_spec::StudyStoppingConfig::minimum_runtime_constraint].
92086        pub fn set_minimum_runtime_constraint<T>(mut self, v: T) -> Self
92087        where
92088            T: std::convert::Into<crate::model::StudyTimeConstraint>,
92089        {
92090            self.minimum_runtime_constraint = std::option::Option::Some(v.into());
92091            self
92092        }
92093
92094        /// Sets or clears the value of [minimum_runtime_constraint][crate::model::study_spec::StudyStoppingConfig::minimum_runtime_constraint].
92095        pub fn set_or_clear_minimum_runtime_constraint<T>(
92096            mut self,
92097            v: std::option::Option<T>,
92098        ) -> Self
92099        where
92100            T: std::convert::Into<crate::model::StudyTimeConstraint>,
92101        {
92102            self.minimum_runtime_constraint = v.map(|x| x.into());
92103            self
92104        }
92105
92106        /// Sets the value of [maximum_runtime_constraint][crate::model::study_spec::StudyStoppingConfig::maximum_runtime_constraint].
92107        pub fn set_maximum_runtime_constraint<T>(mut self, v: T) -> Self
92108        where
92109            T: std::convert::Into<crate::model::StudyTimeConstraint>,
92110        {
92111            self.maximum_runtime_constraint = std::option::Option::Some(v.into());
92112            self
92113        }
92114
92115        /// Sets or clears the value of [maximum_runtime_constraint][crate::model::study_spec::StudyStoppingConfig::maximum_runtime_constraint].
92116        pub fn set_or_clear_maximum_runtime_constraint<T>(
92117            mut self,
92118            v: std::option::Option<T>,
92119        ) -> Self
92120        where
92121            T: std::convert::Into<crate::model::StudyTimeConstraint>,
92122        {
92123            self.maximum_runtime_constraint = v.map(|x| x.into());
92124            self
92125        }
92126
92127        /// Sets the value of [min_num_trials][crate::model::study_spec::StudyStoppingConfig::min_num_trials].
92128        pub fn set_min_num_trials<T>(mut self, v: T) -> Self
92129        where
92130            T: std::convert::Into<wkt::Int32Value>,
92131        {
92132            self.min_num_trials = std::option::Option::Some(v.into());
92133            self
92134        }
92135
92136        /// Sets or clears the value of [min_num_trials][crate::model::study_spec::StudyStoppingConfig::min_num_trials].
92137        pub fn set_or_clear_min_num_trials<T>(mut self, v: std::option::Option<T>) -> Self
92138        where
92139            T: std::convert::Into<wkt::Int32Value>,
92140        {
92141            self.min_num_trials = v.map(|x| x.into());
92142            self
92143        }
92144
92145        /// Sets the value of [max_num_trials][crate::model::study_spec::StudyStoppingConfig::max_num_trials].
92146        pub fn set_max_num_trials<T>(mut self, v: T) -> Self
92147        where
92148            T: std::convert::Into<wkt::Int32Value>,
92149        {
92150            self.max_num_trials = std::option::Option::Some(v.into());
92151            self
92152        }
92153
92154        /// Sets or clears the value of [max_num_trials][crate::model::study_spec::StudyStoppingConfig::max_num_trials].
92155        pub fn set_or_clear_max_num_trials<T>(mut self, v: std::option::Option<T>) -> Self
92156        where
92157            T: std::convert::Into<wkt::Int32Value>,
92158        {
92159            self.max_num_trials = v.map(|x| x.into());
92160            self
92161        }
92162
92163        /// Sets the value of [max_num_trials_no_progress][crate::model::study_spec::StudyStoppingConfig::max_num_trials_no_progress].
92164        pub fn set_max_num_trials_no_progress<T>(mut self, v: T) -> Self
92165        where
92166            T: std::convert::Into<wkt::Int32Value>,
92167        {
92168            self.max_num_trials_no_progress = std::option::Option::Some(v.into());
92169            self
92170        }
92171
92172        /// Sets or clears the value of [max_num_trials_no_progress][crate::model::study_spec::StudyStoppingConfig::max_num_trials_no_progress].
92173        pub fn set_or_clear_max_num_trials_no_progress<T>(
92174            mut self,
92175            v: std::option::Option<T>,
92176        ) -> Self
92177        where
92178            T: std::convert::Into<wkt::Int32Value>,
92179        {
92180            self.max_num_trials_no_progress = v.map(|x| x.into());
92181            self
92182        }
92183
92184        /// Sets the value of [max_duration_no_progress][crate::model::study_spec::StudyStoppingConfig::max_duration_no_progress].
92185        pub fn set_max_duration_no_progress<T>(mut self, v: T) -> Self
92186        where
92187            T: std::convert::Into<wkt::Duration>,
92188        {
92189            self.max_duration_no_progress = std::option::Option::Some(v.into());
92190            self
92191        }
92192
92193        /// Sets or clears the value of [max_duration_no_progress][crate::model::study_spec::StudyStoppingConfig::max_duration_no_progress].
92194        pub fn set_or_clear_max_duration_no_progress<T>(mut self, v: std::option::Option<T>) -> Self
92195        where
92196            T: std::convert::Into<wkt::Duration>,
92197        {
92198            self.max_duration_no_progress = v.map(|x| x.into());
92199            self
92200        }
92201    }
92202
92203    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92204    impl wkt::message::Message for StudyStoppingConfig {
92205        fn typename() -> &'static str {
92206            "type.googleapis.com/google.cloud.aiplatform.v1.StudySpec.StudyStoppingConfig"
92207        }
92208    }
92209
92210    /// The available search algorithms for the Study.
92211    ///
92212    /// # Working with unknown values
92213    ///
92214    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
92215    /// additional enum variants at any time. Adding new variants is not considered
92216    /// a breaking change. Applications should write their code in anticipation of:
92217    ///
92218    /// - New values appearing in future releases of the client library, **and**
92219    /// - New values received dynamically, without application changes.
92220    ///
92221    /// Please consult the [Working with enums] section in the user guide for some
92222    /// guidelines.
92223    ///
92224    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
92225    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92226    #[derive(Clone, Debug, PartialEq)]
92227    #[non_exhaustive]
92228    pub enum Algorithm {
92229        /// The default algorithm used by Vertex AI for [hyperparameter
92230        /// tuning](https://cloud.google.com/vertex-ai/docs/training/hyperparameter-tuning-overview)
92231        /// and [Vertex AI Vizier](https://cloud.google.com/vertex-ai/docs/vizier).
92232        Unspecified,
92233        /// Simple grid search within the feasible space. To use grid search,
92234        /// all parameters must be `INTEGER`, `CATEGORICAL`, or `DISCRETE`.
92235        GridSearch,
92236        /// Simple random search within the feasible space.
92237        RandomSearch,
92238        /// If set, the enum was initialized with an unknown value.
92239        ///
92240        /// Applications can examine the value using [Algorithm::value] or
92241        /// [Algorithm::name].
92242        UnknownValue(algorithm::UnknownValue),
92243    }
92244
92245    #[doc(hidden)]
92246    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92247    pub mod algorithm {
92248        #[allow(unused_imports)]
92249        use super::*;
92250        #[derive(Clone, Debug, PartialEq)]
92251        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
92252    }
92253
92254    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92255    impl Algorithm {
92256        /// Gets the enum value.
92257        ///
92258        /// Returns `None` if the enum contains an unknown value deserialized from
92259        /// the string representation of enums.
92260        pub fn value(&self) -> std::option::Option<i32> {
92261            match self {
92262                Self::Unspecified => std::option::Option::Some(0),
92263                Self::GridSearch => std::option::Option::Some(2),
92264                Self::RandomSearch => std::option::Option::Some(3),
92265                Self::UnknownValue(u) => u.0.value(),
92266            }
92267        }
92268
92269        /// Gets the enum value as a string.
92270        ///
92271        /// Returns `None` if the enum contains an unknown value deserialized from
92272        /// the integer representation of enums.
92273        pub fn name(&self) -> std::option::Option<&str> {
92274            match self {
92275                Self::Unspecified => std::option::Option::Some("ALGORITHM_UNSPECIFIED"),
92276                Self::GridSearch => std::option::Option::Some("GRID_SEARCH"),
92277                Self::RandomSearch => std::option::Option::Some("RANDOM_SEARCH"),
92278                Self::UnknownValue(u) => u.0.name(),
92279            }
92280        }
92281    }
92282
92283    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92284    impl std::default::Default for Algorithm {
92285        fn default() -> Self {
92286            use std::convert::From;
92287            Self::from(0)
92288        }
92289    }
92290
92291    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92292    impl std::fmt::Display for Algorithm {
92293        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
92294            wkt::internal::display_enum(f, self.name(), self.value())
92295        }
92296    }
92297
92298    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92299    impl std::convert::From<i32> for Algorithm {
92300        fn from(value: i32) -> Self {
92301            match value {
92302                0 => Self::Unspecified,
92303                2 => Self::GridSearch,
92304                3 => Self::RandomSearch,
92305                _ => Self::UnknownValue(algorithm::UnknownValue(
92306                    wkt::internal::UnknownEnumValue::Integer(value),
92307                )),
92308            }
92309        }
92310    }
92311
92312    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92313    impl std::convert::From<&str> for Algorithm {
92314        fn from(value: &str) -> Self {
92315            use std::string::ToString;
92316            match value {
92317                "ALGORITHM_UNSPECIFIED" => Self::Unspecified,
92318                "GRID_SEARCH" => Self::GridSearch,
92319                "RANDOM_SEARCH" => Self::RandomSearch,
92320                _ => Self::UnknownValue(algorithm::UnknownValue(
92321                    wkt::internal::UnknownEnumValue::String(value.to_string()),
92322                )),
92323            }
92324        }
92325    }
92326
92327    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92328    impl serde::ser::Serialize for Algorithm {
92329        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
92330        where
92331            S: serde::Serializer,
92332        {
92333            match self {
92334                Self::Unspecified => serializer.serialize_i32(0),
92335                Self::GridSearch => serializer.serialize_i32(2),
92336                Self::RandomSearch => serializer.serialize_i32(3),
92337                Self::UnknownValue(u) => u.0.serialize(serializer),
92338            }
92339        }
92340    }
92341
92342    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92343    impl<'de> serde::de::Deserialize<'de> for Algorithm {
92344        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
92345        where
92346            D: serde::Deserializer<'de>,
92347        {
92348            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Algorithm>::new(
92349                ".google.cloud.aiplatform.v1.StudySpec.Algorithm",
92350            ))
92351        }
92352    }
92353
92354    /// Describes the noise level of the repeated observations.
92355    ///
92356    /// "Noisy" means that the repeated observations with the same Trial parameters
92357    /// may lead to different metric evaluations.
92358    ///
92359    /// # Working with unknown values
92360    ///
92361    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
92362    /// additional enum variants at any time. Adding new variants is not considered
92363    /// a breaking change. Applications should write their code in anticipation of:
92364    ///
92365    /// - New values appearing in future releases of the client library, **and**
92366    /// - New values received dynamically, without application changes.
92367    ///
92368    /// Please consult the [Working with enums] section in the user guide for some
92369    /// guidelines.
92370    ///
92371    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
92372    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92373    #[derive(Clone, Debug, PartialEq)]
92374    #[non_exhaustive]
92375    pub enum ObservationNoise {
92376        /// The default noise level chosen by Vertex AI.
92377        Unspecified,
92378        /// Vertex AI assumes that the objective function is (nearly)
92379        /// perfectly reproducible, and will never repeat the same Trial
92380        /// parameters.
92381        Low,
92382        /// Vertex AI will estimate the amount of noise in metric
92383        /// evaluations, it may repeat the same Trial parameters more than once.
92384        High,
92385        /// If set, the enum was initialized with an unknown value.
92386        ///
92387        /// Applications can examine the value using [ObservationNoise::value] or
92388        /// [ObservationNoise::name].
92389        UnknownValue(observation_noise::UnknownValue),
92390    }
92391
92392    #[doc(hidden)]
92393    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92394    pub mod observation_noise {
92395        #[allow(unused_imports)]
92396        use super::*;
92397        #[derive(Clone, Debug, PartialEq)]
92398        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
92399    }
92400
92401    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92402    impl ObservationNoise {
92403        /// Gets the enum value.
92404        ///
92405        /// Returns `None` if the enum contains an unknown value deserialized from
92406        /// the string representation of enums.
92407        pub fn value(&self) -> std::option::Option<i32> {
92408            match self {
92409                Self::Unspecified => std::option::Option::Some(0),
92410                Self::Low => std::option::Option::Some(1),
92411                Self::High => std::option::Option::Some(2),
92412                Self::UnknownValue(u) => u.0.value(),
92413            }
92414        }
92415
92416        /// Gets the enum value as a string.
92417        ///
92418        /// Returns `None` if the enum contains an unknown value deserialized from
92419        /// the integer representation of enums.
92420        pub fn name(&self) -> std::option::Option<&str> {
92421            match self {
92422                Self::Unspecified => std::option::Option::Some("OBSERVATION_NOISE_UNSPECIFIED"),
92423                Self::Low => std::option::Option::Some("LOW"),
92424                Self::High => std::option::Option::Some("HIGH"),
92425                Self::UnknownValue(u) => u.0.name(),
92426            }
92427        }
92428    }
92429
92430    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92431    impl std::default::Default for ObservationNoise {
92432        fn default() -> Self {
92433            use std::convert::From;
92434            Self::from(0)
92435        }
92436    }
92437
92438    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92439    impl std::fmt::Display for ObservationNoise {
92440        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
92441            wkt::internal::display_enum(f, self.name(), self.value())
92442        }
92443    }
92444
92445    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92446    impl std::convert::From<i32> for ObservationNoise {
92447        fn from(value: i32) -> Self {
92448            match value {
92449                0 => Self::Unspecified,
92450                1 => Self::Low,
92451                2 => Self::High,
92452                _ => Self::UnknownValue(observation_noise::UnknownValue(
92453                    wkt::internal::UnknownEnumValue::Integer(value),
92454                )),
92455            }
92456        }
92457    }
92458
92459    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92460    impl std::convert::From<&str> for ObservationNoise {
92461        fn from(value: &str) -> Self {
92462            use std::string::ToString;
92463            match value {
92464                "OBSERVATION_NOISE_UNSPECIFIED" => Self::Unspecified,
92465                "LOW" => Self::Low,
92466                "HIGH" => Self::High,
92467                _ => Self::UnknownValue(observation_noise::UnknownValue(
92468                    wkt::internal::UnknownEnumValue::String(value.to_string()),
92469                )),
92470            }
92471        }
92472    }
92473
92474    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92475    impl serde::ser::Serialize for ObservationNoise {
92476        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
92477        where
92478            S: serde::Serializer,
92479        {
92480            match self {
92481                Self::Unspecified => serializer.serialize_i32(0),
92482                Self::Low => serializer.serialize_i32(1),
92483                Self::High => serializer.serialize_i32(2),
92484                Self::UnknownValue(u) => u.0.serialize(serializer),
92485            }
92486        }
92487    }
92488
92489    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92490    impl<'de> serde::de::Deserialize<'de> for ObservationNoise {
92491        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
92492        where
92493            D: serde::Deserializer<'de>,
92494        {
92495            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ObservationNoise>::new(
92496                ".google.cloud.aiplatform.v1.StudySpec.ObservationNoise",
92497            ))
92498        }
92499    }
92500
92501    /// This indicates which measurement to use if/when the service automatically
92502    /// selects the final measurement from previously reported intermediate
92503    /// measurements. Choose this based on two considerations:
92504    /// A) Do you expect your measurements to monotonically improve?
92505    /// If so, choose LAST_MEASUREMENT. On the other hand, if you're in a
92506    /// situation where your system can "over-train" and you expect the
92507    /// performance to get better for a while but then start declining,
92508    /// choose BEST_MEASUREMENT.
92509    /// B) Are your measurements significantly noisy and/or irreproducible?
92510    /// If so, BEST_MEASUREMENT will tend to be over-optimistic, and it
92511    /// may be better to choose LAST_MEASUREMENT.
92512    /// If both or neither of (A) and (B) apply, it doesn't matter which
92513    /// selection type is chosen.
92514    ///
92515    /// # Working with unknown values
92516    ///
92517    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
92518    /// additional enum variants at any time. Adding new variants is not considered
92519    /// a breaking change. Applications should write their code in anticipation of:
92520    ///
92521    /// - New values appearing in future releases of the client library, **and**
92522    /// - New values received dynamically, without application changes.
92523    ///
92524    /// Please consult the [Working with enums] section in the user guide for some
92525    /// guidelines.
92526    ///
92527    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
92528    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92529    #[derive(Clone, Debug, PartialEq)]
92530    #[non_exhaustive]
92531    pub enum MeasurementSelectionType {
92532        /// Will be treated as LAST_MEASUREMENT.
92533        Unspecified,
92534        /// Use the last measurement reported.
92535        LastMeasurement,
92536        /// Use the best measurement reported.
92537        BestMeasurement,
92538        /// If set, the enum was initialized with an unknown value.
92539        ///
92540        /// Applications can examine the value using [MeasurementSelectionType::value] or
92541        /// [MeasurementSelectionType::name].
92542        UnknownValue(measurement_selection_type::UnknownValue),
92543    }
92544
92545    #[doc(hidden)]
92546    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92547    pub mod measurement_selection_type {
92548        #[allow(unused_imports)]
92549        use super::*;
92550        #[derive(Clone, Debug, PartialEq)]
92551        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
92552    }
92553
92554    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92555    impl MeasurementSelectionType {
92556        /// Gets the enum value.
92557        ///
92558        /// Returns `None` if the enum contains an unknown value deserialized from
92559        /// the string representation of enums.
92560        pub fn value(&self) -> std::option::Option<i32> {
92561            match self {
92562                Self::Unspecified => std::option::Option::Some(0),
92563                Self::LastMeasurement => std::option::Option::Some(1),
92564                Self::BestMeasurement => std::option::Option::Some(2),
92565                Self::UnknownValue(u) => u.0.value(),
92566            }
92567        }
92568
92569        /// Gets the enum value as a string.
92570        ///
92571        /// Returns `None` if the enum contains an unknown value deserialized from
92572        /// the integer representation of enums.
92573        pub fn name(&self) -> std::option::Option<&str> {
92574            match self {
92575                Self::Unspecified => {
92576                    std::option::Option::Some("MEASUREMENT_SELECTION_TYPE_UNSPECIFIED")
92577                }
92578                Self::LastMeasurement => std::option::Option::Some("LAST_MEASUREMENT"),
92579                Self::BestMeasurement => std::option::Option::Some("BEST_MEASUREMENT"),
92580                Self::UnknownValue(u) => u.0.name(),
92581            }
92582        }
92583    }
92584
92585    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92586    impl std::default::Default for MeasurementSelectionType {
92587        fn default() -> Self {
92588            use std::convert::From;
92589            Self::from(0)
92590        }
92591    }
92592
92593    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92594    impl std::fmt::Display for MeasurementSelectionType {
92595        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
92596            wkt::internal::display_enum(f, self.name(), self.value())
92597        }
92598    }
92599
92600    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92601    impl std::convert::From<i32> for MeasurementSelectionType {
92602        fn from(value: i32) -> Self {
92603            match value {
92604                0 => Self::Unspecified,
92605                1 => Self::LastMeasurement,
92606                2 => Self::BestMeasurement,
92607                _ => Self::UnknownValue(measurement_selection_type::UnknownValue(
92608                    wkt::internal::UnknownEnumValue::Integer(value),
92609                )),
92610            }
92611        }
92612    }
92613
92614    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92615    impl std::convert::From<&str> for MeasurementSelectionType {
92616        fn from(value: &str) -> Self {
92617            use std::string::ToString;
92618            match value {
92619                "MEASUREMENT_SELECTION_TYPE_UNSPECIFIED" => Self::Unspecified,
92620                "LAST_MEASUREMENT" => Self::LastMeasurement,
92621                "BEST_MEASUREMENT" => Self::BestMeasurement,
92622                _ => Self::UnknownValue(measurement_selection_type::UnknownValue(
92623                    wkt::internal::UnknownEnumValue::String(value.to_string()),
92624                )),
92625            }
92626        }
92627    }
92628
92629    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92630    impl serde::ser::Serialize for MeasurementSelectionType {
92631        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
92632        where
92633            S: serde::Serializer,
92634        {
92635            match self {
92636                Self::Unspecified => serializer.serialize_i32(0),
92637                Self::LastMeasurement => serializer.serialize_i32(1),
92638                Self::BestMeasurement => serializer.serialize_i32(2),
92639                Self::UnknownValue(u) => u.0.serialize(serializer),
92640            }
92641        }
92642    }
92643
92644    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92645    impl<'de> serde::de::Deserialize<'de> for MeasurementSelectionType {
92646        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
92647        where
92648            D: serde::Deserializer<'de>,
92649        {
92650            deserializer.deserialize_any(
92651                wkt::internal::EnumVisitor::<MeasurementSelectionType>::new(
92652                    ".google.cloud.aiplatform.v1.StudySpec.MeasurementSelectionType",
92653                ),
92654            )
92655        }
92656    }
92657
92658    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92659    #[derive(Clone, Debug, PartialEq)]
92660    #[non_exhaustive]
92661    pub enum AutomatedStoppingSpec {
92662        /// The automated early stopping spec using decay curve rule.
92663        DecayCurveStoppingSpec(
92664            std::boxed::Box<crate::model::study_spec::DecayCurveAutomatedStoppingSpec>,
92665        ),
92666        /// The automated early stopping spec using median rule.
92667        MedianAutomatedStoppingSpec(
92668            std::boxed::Box<crate::model::study_spec::MedianAutomatedStoppingSpec>,
92669        ),
92670        /// The automated early stopping spec using convex stopping rule.
92671        ConvexAutomatedStoppingSpec(
92672            std::boxed::Box<crate::model::study_spec::ConvexAutomatedStoppingSpec>,
92673        ),
92674    }
92675}
92676
92677/// A message representing a Measurement of a Trial. A Measurement contains
92678/// the Metrics got by executing a Trial using suggested hyperparameter
92679/// values.
92680#[cfg(any(feature = "job-service", feature = "vizier-service",))]
92681#[derive(Clone, Default, PartialEq)]
92682#[non_exhaustive]
92683pub struct Measurement {
92684    /// Output only. Time that the Trial has been running at the point of this
92685    /// Measurement.
92686    pub elapsed_duration: std::option::Option<wkt::Duration>,
92687
92688    /// Output only. The number of steps the machine learning model has been
92689    /// trained for. Must be non-negative.
92690    pub step_count: i64,
92691
92692    /// Output only. A list of metrics got by evaluating the objective functions
92693    /// using suggested Parameter values.
92694    pub metrics: std::vec::Vec<crate::model::measurement::Metric>,
92695
92696    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
92697}
92698
92699#[cfg(any(feature = "job-service", feature = "vizier-service",))]
92700impl Measurement {
92701    pub fn new() -> Self {
92702        std::default::Default::default()
92703    }
92704
92705    /// Sets the value of [elapsed_duration][crate::model::Measurement::elapsed_duration].
92706    pub fn set_elapsed_duration<T>(mut self, v: T) -> Self
92707    where
92708        T: std::convert::Into<wkt::Duration>,
92709    {
92710        self.elapsed_duration = std::option::Option::Some(v.into());
92711        self
92712    }
92713
92714    /// Sets or clears the value of [elapsed_duration][crate::model::Measurement::elapsed_duration].
92715    pub fn set_or_clear_elapsed_duration<T>(mut self, v: std::option::Option<T>) -> Self
92716    where
92717        T: std::convert::Into<wkt::Duration>,
92718    {
92719        self.elapsed_duration = v.map(|x| x.into());
92720        self
92721    }
92722
92723    /// Sets the value of [step_count][crate::model::Measurement::step_count].
92724    pub fn set_step_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
92725        self.step_count = v.into();
92726        self
92727    }
92728
92729    /// Sets the value of [metrics][crate::model::Measurement::metrics].
92730    pub fn set_metrics<T, V>(mut self, v: T) -> Self
92731    where
92732        T: std::iter::IntoIterator<Item = V>,
92733        V: std::convert::Into<crate::model::measurement::Metric>,
92734    {
92735        use std::iter::Iterator;
92736        self.metrics = v.into_iter().map(|i| i.into()).collect();
92737        self
92738    }
92739}
92740
92741#[cfg(any(feature = "job-service", feature = "vizier-service",))]
92742impl wkt::message::Message for Measurement {
92743    fn typename() -> &'static str {
92744        "type.googleapis.com/google.cloud.aiplatform.v1.Measurement"
92745    }
92746}
92747
92748/// Defines additional types related to [Measurement].
92749#[cfg(any(feature = "job-service", feature = "vizier-service",))]
92750pub mod measurement {
92751    #[allow(unused_imports)]
92752    use super::*;
92753
92754    /// A message representing a metric in the measurement.
92755    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92756    #[derive(Clone, Default, PartialEq)]
92757    #[non_exhaustive]
92758    pub struct Metric {
92759        /// Output only. The ID of the Metric. The Metric should be defined in
92760        /// [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics].
92761        ///
92762        /// [google.cloud.aiplatform.v1.StudySpec.metrics]: crate::model::StudySpec::metrics
92763        pub metric_id: std::string::String,
92764
92765        /// Output only. The value for this metric.
92766        pub value: f64,
92767
92768        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
92769    }
92770
92771    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92772    impl Metric {
92773        pub fn new() -> Self {
92774            std::default::Default::default()
92775        }
92776
92777        /// Sets the value of [metric_id][crate::model::measurement::Metric::metric_id].
92778        pub fn set_metric_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
92779            self.metric_id = v.into();
92780            self
92781        }
92782
92783        /// Sets the value of [value][crate::model::measurement::Metric::value].
92784        pub fn set_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
92785            self.value = v.into();
92786            self
92787        }
92788    }
92789
92790    #[cfg(any(feature = "job-service", feature = "vizier-service",))]
92791    impl wkt::message::Message for Metric {
92792        fn typename() -> &'static str {
92793            "type.googleapis.com/google.cloud.aiplatform.v1.Measurement.Metric"
92794        }
92795    }
92796}
92797
92798/// Tensorboard is a physical database that stores users' training metrics.
92799/// A default Tensorboard is provided in each region of a Google Cloud project.
92800/// If needed users can also create extra Tensorboards in their projects.
92801#[cfg(feature = "tensorboard-service")]
92802#[derive(Clone, Default, PartialEq)]
92803#[non_exhaustive]
92804pub struct Tensorboard {
92805    /// Output only. Name of the Tensorboard.
92806    /// Format:
92807    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
92808    pub name: std::string::String,
92809
92810    /// Required. User provided name of this Tensorboard.
92811    pub display_name: std::string::String,
92812
92813    /// Description of this Tensorboard.
92814    pub description: std::string::String,
92815
92816    /// Customer-managed encryption key spec for a Tensorboard. If set, this
92817    /// Tensorboard and all sub-resources of this Tensorboard will be secured by
92818    /// this key.
92819    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
92820
92821    /// Output only. Consumer project Cloud Storage path prefix used to store blob
92822    /// data, which can either be a bucket or directory. Does not end with a '/'.
92823    pub blob_storage_path_prefix: std::string::String,
92824
92825    /// Output only. The number of Runs stored in this Tensorboard.
92826    pub run_count: i32,
92827
92828    /// Output only. Timestamp when this Tensorboard was created.
92829    pub create_time: std::option::Option<wkt::Timestamp>,
92830
92831    /// Output only. Timestamp when this Tensorboard was last updated.
92832    pub update_time: std::option::Option<wkt::Timestamp>,
92833
92834    /// The labels with user-defined metadata to organize your Tensorboards.
92835    ///
92836    /// Label keys and values can be no longer than 64 characters
92837    /// (Unicode codepoints), can only contain lowercase letters, numeric
92838    /// characters, underscores and dashes. International characters are allowed.
92839    /// No more than 64 user labels can be associated with one Tensorboard
92840    /// (System labels are excluded).
92841    ///
92842    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
92843    /// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
92844    /// and are immutable.
92845    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
92846
92847    /// Used to perform a consistent read-modify-write updates. If not set, a blind
92848    /// "overwrite" update happens.
92849    pub etag: std::string::String,
92850
92851    /// Used to indicate if the TensorBoard instance is the default one.
92852    /// Each project & region can have at most one default TensorBoard instance.
92853    /// Creation of a default TensorBoard instance and updating an existing
92854    /// TensorBoard instance to be default will mark all other TensorBoard
92855    /// instances (if any) as non default.
92856    pub is_default: bool,
92857
92858    /// Output only. Reserved for future use.
92859    pub satisfies_pzs: bool,
92860
92861    /// Output only. Reserved for future use.
92862    pub satisfies_pzi: bool,
92863
92864    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
92865}
92866
92867#[cfg(feature = "tensorboard-service")]
92868impl Tensorboard {
92869    pub fn new() -> Self {
92870        std::default::Default::default()
92871    }
92872
92873    /// Sets the value of [name][crate::model::Tensorboard::name].
92874    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
92875        self.name = v.into();
92876        self
92877    }
92878
92879    /// Sets the value of [display_name][crate::model::Tensorboard::display_name].
92880    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
92881        self.display_name = v.into();
92882        self
92883    }
92884
92885    /// Sets the value of [description][crate::model::Tensorboard::description].
92886    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
92887        self.description = v.into();
92888        self
92889    }
92890
92891    /// Sets the value of [encryption_spec][crate::model::Tensorboard::encryption_spec].
92892    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
92893    where
92894        T: std::convert::Into<crate::model::EncryptionSpec>,
92895    {
92896        self.encryption_spec = std::option::Option::Some(v.into());
92897        self
92898    }
92899
92900    /// Sets or clears the value of [encryption_spec][crate::model::Tensorboard::encryption_spec].
92901    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
92902    where
92903        T: std::convert::Into<crate::model::EncryptionSpec>,
92904    {
92905        self.encryption_spec = v.map(|x| x.into());
92906        self
92907    }
92908
92909    /// Sets the value of [blob_storage_path_prefix][crate::model::Tensorboard::blob_storage_path_prefix].
92910    pub fn set_blob_storage_path_prefix<T: std::convert::Into<std::string::String>>(
92911        mut self,
92912        v: T,
92913    ) -> Self {
92914        self.blob_storage_path_prefix = v.into();
92915        self
92916    }
92917
92918    /// Sets the value of [run_count][crate::model::Tensorboard::run_count].
92919    pub fn set_run_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
92920        self.run_count = v.into();
92921        self
92922    }
92923
92924    /// Sets the value of [create_time][crate::model::Tensorboard::create_time].
92925    pub fn set_create_time<T>(mut self, v: T) -> Self
92926    where
92927        T: std::convert::Into<wkt::Timestamp>,
92928    {
92929        self.create_time = std::option::Option::Some(v.into());
92930        self
92931    }
92932
92933    /// Sets or clears the value of [create_time][crate::model::Tensorboard::create_time].
92934    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
92935    where
92936        T: std::convert::Into<wkt::Timestamp>,
92937    {
92938        self.create_time = v.map(|x| x.into());
92939        self
92940    }
92941
92942    /// Sets the value of [update_time][crate::model::Tensorboard::update_time].
92943    pub fn set_update_time<T>(mut self, v: T) -> Self
92944    where
92945        T: std::convert::Into<wkt::Timestamp>,
92946    {
92947        self.update_time = std::option::Option::Some(v.into());
92948        self
92949    }
92950
92951    /// Sets or clears the value of [update_time][crate::model::Tensorboard::update_time].
92952    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
92953    where
92954        T: std::convert::Into<wkt::Timestamp>,
92955    {
92956        self.update_time = v.map(|x| x.into());
92957        self
92958    }
92959
92960    /// Sets the value of [labels][crate::model::Tensorboard::labels].
92961    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
92962    where
92963        T: std::iter::IntoIterator<Item = (K, V)>,
92964        K: std::convert::Into<std::string::String>,
92965        V: std::convert::Into<std::string::String>,
92966    {
92967        use std::iter::Iterator;
92968        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
92969        self
92970    }
92971
92972    /// Sets the value of [etag][crate::model::Tensorboard::etag].
92973    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
92974        self.etag = v.into();
92975        self
92976    }
92977
92978    /// Sets the value of [is_default][crate::model::Tensorboard::is_default].
92979    pub fn set_is_default<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
92980        self.is_default = v.into();
92981        self
92982    }
92983
92984    /// Sets the value of [satisfies_pzs][crate::model::Tensorboard::satisfies_pzs].
92985    pub fn set_satisfies_pzs<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
92986        self.satisfies_pzs = v.into();
92987        self
92988    }
92989
92990    /// Sets the value of [satisfies_pzi][crate::model::Tensorboard::satisfies_pzi].
92991    pub fn set_satisfies_pzi<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
92992        self.satisfies_pzi = v.into();
92993        self
92994    }
92995}
92996
92997#[cfg(feature = "tensorboard-service")]
92998impl wkt::message::Message for Tensorboard {
92999    fn typename() -> &'static str {
93000        "type.googleapis.com/google.cloud.aiplatform.v1.Tensorboard"
93001    }
93002}
93003
93004/// All the data stored in a TensorboardTimeSeries.
93005#[cfg(feature = "tensorboard-service")]
93006#[derive(Clone, Default, PartialEq)]
93007#[non_exhaustive]
93008pub struct TimeSeriesData {
93009    /// Required. The ID of the TensorboardTimeSeries, which will become the final
93010    /// component of the TensorboardTimeSeries' resource name
93011    pub tensorboard_time_series_id: std::string::String,
93012
93013    /// Required. Immutable. The value type of this time series. All the values in
93014    /// this time series data must match this value type.
93015    pub value_type: crate::model::tensorboard_time_series::ValueType,
93016
93017    /// Required. Data points in this time series.
93018    pub values: std::vec::Vec<crate::model::TimeSeriesDataPoint>,
93019
93020    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
93021}
93022
93023#[cfg(feature = "tensorboard-service")]
93024impl TimeSeriesData {
93025    pub fn new() -> Self {
93026        std::default::Default::default()
93027    }
93028
93029    /// Sets the value of [tensorboard_time_series_id][crate::model::TimeSeriesData::tensorboard_time_series_id].
93030    pub fn set_tensorboard_time_series_id<T: std::convert::Into<std::string::String>>(
93031        mut self,
93032        v: T,
93033    ) -> Self {
93034        self.tensorboard_time_series_id = v.into();
93035        self
93036    }
93037
93038    /// Sets the value of [value_type][crate::model::TimeSeriesData::value_type].
93039    pub fn set_value_type<
93040        T: std::convert::Into<crate::model::tensorboard_time_series::ValueType>,
93041    >(
93042        mut self,
93043        v: T,
93044    ) -> Self {
93045        self.value_type = v.into();
93046        self
93047    }
93048
93049    /// Sets the value of [values][crate::model::TimeSeriesData::values].
93050    pub fn set_values<T, V>(mut self, v: T) -> Self
93051    where
93052        T: std::iter::IntoIterator<Item = V>,
93053        V: std::convert::Into<crate::model::TimeSeriesDataPoint>,
93054    {
93055        use std::iter::Iterator;
93056        self.values = v.into_iter().map(|i| i.into()).collect();
93057        self
93058    }
93059}
93060
93061#[cfg(feature = "tensorboard-service")]
93062impl wkt::message::Message for TimeSeriesData {
93063    fn typename() -> &'static str {
93064        "type.googleapis.com/google.cloud.aiplatform.v1.TimeSeriesData"
93065    }
93066}
93067
93068/// A TensorboardTimeSeries data point.
93069#[cfg(feature = "tensorboard-service")]
93070#[derive(Clone, Default, PartialEq)]
93071#[non_exhaustive]
93072pub struct TimeSeriesDataPoint {
93073    /// Wall clock timestamp when this data point is generated by the end user.
93074    pub wall_time: std::option::Option<wkt::Timestamp>,
93075
93076    /// Step index of this data point within the run.
93077    pub step: i64,
93078
93079    /// Value of this time series data point.
93080    pub value: std::option::Option<crate::model::time_series_data_point::Value>,
93081
93082    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
93083}
93084
93085#[cfg(feature = "tensorboard-service")]
93086impl TimeSeriesDataPoint {
93087    pub fn new() -> Self {
93088        std::default::Default::default()
93089    }
93090
93091    /// Sets the value of [wall_time][crate::model::TimeSeriesDataPoint::wall_time].
93092    pub fn set_wall_time<T>(mut self, v: T) -> Self
93093    where
93094        T: std::convert::Into<wkt::Timestamp>,
93095    {
93096        self.wall_time = std::option::Option::Some(v.into());
93097        self
93098    }
93099
93100    /// Sets or clears the value of [wall_time][crate::model::TimeSeriesDataPoint::wall_time].
93101    pub fn set_or_clear_wall_time<T>(mut self, v: std::option::Option<T>) -> Self
93102    where
93103        T: std::convert::Into<wkt::Timestamp>,
93104    {
93105        self.wall_time = v.map(|x| x.into());
93106        self
93107    }
93108
93109    /// Sets the value of [step][crate::model::TimeSeriesDataPoint::step].
93110    pub fn set_step<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
93111        self.step = v.into();
93112        self
93113    }
93114
93115    /// Sets the value of [value][crate::model::TimeSeriesDataPoint::value].
93116    ///
93117    /// Note that all the setters affecting `value` are mutually
93118    /// exclusive.
93119    pub fn set_value<
93120        T: std::convert::Into<std::option::Option<crate::model::time_series_data_point::Value>>,
93121    >(
93122        mut self,
93123        v: T,
93124    ) -> Self {
93125        self.value = v.into();
93126        self
93127    }
93128
93129    /// The value of [value][crate::model::TimeSeriesDataPoint::value]
93130    /// if it holds a `Scalar`, `None` if the field is not set or
93131    /// holds a different branch.
93132    pub fn scalar(&self) -> std::option::Option<&std::boxed::Box<crate::model::Scalar>> {
93133        #[allow(unreachable_patterns)]
93134        self.value.as_ref().and_then(|v| match v {
93135            crate::model::time_series_data_point::Value::Scalar(v) => std::option::Option::Some(v),
93136            _ => std::option::Option::None,
93137        })
93138    }
93139
93140    /// Sets the value of [value][crate::model::TimeSeriesDataPoint::value]
93141    /// to hold a `Scalar`.
93142    ///
93143    /// Note that all the setters affecting `value` are
93144    /// mutually exclusive.
93145    pub fn set_scalar<T: std::convert::Into<std::boxed::Box<crate::model::Scalar>>>(
93146        mut self,
93147        v: T,
93148    ) -> Self {
93149        self.value = std::option::Option::Some(
93150            crate::model::time_series_data_point::Value::Scalar(v.into()),
93151        );
93152        self
93153    }
93154
93155    /// The value of [value][crate::model::TimeSeriesDataPoint::value]
93156    /// if it holds a `Tensor`, `None` if the field is not set or
93157    /// holds a different branch.
93158    pub fn tensor(&self) -> std::option::Option<&std::boxed::Box<crate::model::TensorboardTensor>> {
93159        #[allow(unreachable_patterns)]
93160        self.value.as_ref().and_then(|v| match v {
93161            crate::model::time_series_data_point::Value::Tensor(v) => std::option::Option::Some(v),
93162            _ => std::option::Option::None,
93163        })
93164    }
93165
93166    /// Sets the value of [value][crate::model::TimeSeriesDataPoint::value]
93167    /// to hold a `Tensor`.
93168    ///
93169    /// Note that all the setters affecting `value` are
93170    /// mutually exclusive.
93171    pub fn set_tensor<T: std::convert::Into<std::boxed::Box<crate::model::TensorboardTensor>>>(
93172        mut self,
93173        v: T,
93174    ) -> Self {
93175        self.value = std::option::Option::Some(
93176            crate::model::time_series_data_point::Value::Tensor(v.into()),
93177        );
93178        self
93179    }
93180
93181    /// The value of [value][crate::model::TimeSeriesDataPoint::value]
93182    /// if it holds a `Blobs`, `None` if the field is not set or
93183    /// holds a different branch.
93184    pub fn blobs(
93185        &self,
93186    ) -> std::option::Option<&std::boxed::Box<crate::model::TensorboardBlobSequence>> {
93187        #[allow(unreachable_patterns)]
93188        self.value.as_ref().and_then(|v| match v {
93189            crate::model::time_series_data_point::Value::Blobs(v) => std::option::Option::Some(v),
93190            _ => std::option::Option::None,
93191        })
93192    }
93193
93194    /// Sets the value of [value][crate::model::TimeSeriesDataPoint::value]
93195    /// to hold a `Blobs`.
93196    ///
93197    /// Note that all the setters affecting `value` are
93198    /// mutually exclusive.
93199    pub fn set_blobs<
93200        T: std::convert::Into<std::boxed::Box<crate::model::TensorboardBlobSequence>>,
93201    >(
93202        mut self,
93203        v: T,
93204    ) -> Self {
93205        self.value =
93206            std::option::Option::Some(crate::model::time_series_data_point::Value::Blobs(v.into()));
93207        self
93208    }
93209}
93210
93211#[cfg(feature = "tensorboard-service")]
93212impl wkt::message::Message for TimeSeriesDataPoint {
93213    fn typename() -> &'static str {
93214        "type.googleapis.com/google.cloud.aiplatform.v1.TimeSeriesDataPoint"
93215    }
93216}
93217
93218/// Defines additional types related to [TimeSeriesDataPoint].
93219#[cfg(feature = "tensorboard-service")]
93220pub mod time_series_data_point {
93221    #[allow(unused_imports)]
93222    use super::*;
93223
93224    /// Value of this time series data point.
93225    #[cfg(feature = "tensorboard-service")]
93226    #[derive(Clone, Debug, PartialEq)]
93227    #[non_exhaustive]
93228    pub enum Value {
93229        /// A scalar value.
93230        Scalar(std::boxed::Box<crate::model::Scalar>),
93231        /// A tensor value.
93232        Tensor(std::boxed::Box<crate::model::TensorboardTensor>),
93233        /// A blob sequence value.
93234        Blobs(std::boxed::Box<crate::model::TensorboardBlobSequence>),
93235    }
93236}
93237
93238/// One point viewable on a scalar metric plot.
93239#[cfg(feature = "tensorboard-service")]
93240#[derive(Clone, Default, PartialEq)]
93241#[non_exhaustive]
93242pub struct Scalar {
93243    /// Value of the point at this step / timestamp.
93244    pub value: f64,
93245
93246    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
93247}
93248
93249#[cfg(feature = "tensorboard-service")]
93250impl Scalar {
93251    pub fn new() -> Self {
93252        std::default::Default::default()
93253    }
93254
93255    /// Sets the value of [value][crate::model::Scalar::value].
93256    pub fn set_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
93257        self.value = v.into();
93258        self
93259    }
93260}
93261
93262#[cfg(feature = "tensorboard-service")]
93263impl wkt::message::Message for Scalar {
93264    fn typename() -> &'static str {
93265        "type.googleapis.com/google.cloud.aiplatform.v1.Scalar"
93266    }
93267}
93268
93269/// One point viewable on a tensor metric plot.
93270#[cfg(feature = "tensorboard-service")]
93271#[derive(Clone, Default, PartialEq)]
93272#[non_exhaustive]
93273pub struct TensorboardTensor {
93274    /// Required. Serialized form of
93275    /// <https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/framework/tensor.proto>
93276    pub value: ::bytes::Bytes,
93277
93278    /// Optional. Version number of TensorProto used to serialize
93279    /// [value][google.cloud.aiplatform.v1.TensorboardTensor.value].
93280    ///
93281    /// [google.cloud.aiplatform.v1.TensorboardTensor.value]: crate::model::TensorboardTensor::value
93282    pub version_number: i32,
93283
93284    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
93285}
93286
93287#[cfg(feature = "tensorboard-service")]
93288impl TensorboardTensor {
93289    pub fn new() -> Self {
93290        std::default::Default::default()
93291    }
93292
93293    /// Sets the value of [value][crate::model::TensorboardTensor::value].
93294    pub fn set_value<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
93295        self.value = v.into();
93296        self
93297    }
93298
93299    /// Sets the value of [version_number][crate::model::TensorboardTensor::version_number].
93300    pub fn set_version_number<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
93301        self.version_number = v.into();
93302        self
93303    }
93304}
93305
93306#[cfg(feature = "tensorboard-service")]
93307impl wkt::message::Message for TensorboardTensor {
93308    fn typename() -> &'static str {
93309        "type.googleapis.com/google.cloud.aiplatform.v1.TensorboardTensor"
93310    }
93311}
93312
93313/// One point viewable on a blob metric plot, but mostly just a wrapper message
93314/// to work around repeated fields can't be used directly within `oneof` fields.
93315#[cfg(feature = "tensorboard-service")]
93316#[derive(Clone, Default, PartialEq)]
93317#[non_exhaustive]
93318pub struct TensorboardBlobSequence {
93319    /// List of blobs contained within the sequence.
93320    pub values: std::vec::Vec<crate::model::TensorboardBlob>,
93321
93322    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
93323}
93324
93325#[cfg(feature = "tensorboard-service")]
93326impl TensorboardBlobSequence {
93327    pub fn new() -> Self {
93328        std::default::Default::default()
93329    }
93330
93331    /// Sets the value of [values][crate::model::TensorboardBlobSequence::values].
93332    pub fn set_values<T, V>(mut self, v: T) -> Self
93333    where
93334        T: std::iter::IntoIterator<Item = V>,
93335        V: std::convert::Into<crate::model::TensorboardBlob>,
93336    {
93337        use std::iter::Iterator;
93338        self.values = v.into_iter().map(|i| i.into()).collect();
93339        self
93340    }
93341}
93342
93343#[cfg(feature = "tensorboard-service")]
93344impl wkt::message::Message for TensorboardBlobSequence {
93345    fn typename() -> &'static str {
93346        "type.googleapis.com/google.cloud.aiplatform.v1.TensorboardBlobSequence"
93347    }
93348}
93349
93350/// One blob (e.g, image, graph) viewable on a blob metric plot.
93351#[cfg(feature = "tensorboard-service")]
93352#[derive(Clone, Default, PartialEq)]
93353#[non_exhaustive]
93354pub struct TensorboardBlob {
93355    /// Output only. A URI safe key uniquely identifying a blob. Can be used to
93356    /// locate the blob stored in the Cloud Storage bucket of the consumer project.
93357    pub id: std::string::String,
93358
93359    /// Optional. The bytes of the blob is not present unless it's returned by the
93360    /// ReadTensorboardBlobData endpoint.
93361    pub data: ::bytes::Bytes,
93362
93363    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
93364}
93365
93366#[cfg(feature = "tensorboard-service")]
93367impl TensorboardBlob {
93368    pub fn new() -> Self {
93369        std::default::Default::default()
93370    }
93371
93372    /// Sets the value of [id][crate::model::TensorboardBlob::id].
93373    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93374        self.id = v.into();
93375        self
93376    }
93377
93378    /// Sets the value of [data][crate::model::TensorboardBlob::data].
93379    pub fn set_data<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
93380        self.data = v.into();
93381        self
93382    }
93383}
93384
93385#[cfg(feature = "tensorboard-service")]
93386impl wkt::message::Message for TensorboardBlob {
93387    fn typename() -> &'static str {
93388        "type.googleapis.com/google.cloud.aiplatform.v1.TensorboardBlob"
93389    }
93390}
93391
93392/// A TensorboardExperiment is a group of TensorboardRuns, that are typically the
93393/// results of a training job run, in a Tensorboard.
93394#[cfg(feature = "tensorboard-service")]
93395#[derive(Clone, Default, PartialEq)]
93396#[non_exhaustive]
93397pub struct TensorboardExperiment {
93398    /// Output only. Name of the TensorboardExperiment.
93399    /// Format:
93400    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`
93401    pub name: std::string::String,
93402
93403    /// User provided name of this TensorboardExperiment.
93404    pub display_name: std::string::String,
93405
93406    /// Description of this TensorboardExperiment.
93407    pub description: std::string::String,
93408
93409    /// Output only. Timestamp when this TensorboardExperiment was created.
93410    pub create_time: std::option::Option<wkt::Timestamp>,
93411
93412    /// Output only. Timestamp when this TensorboardExperiment was last updated.
93413    pub update_time: std::option::Option<wkt::Timestamp>,
93414
93415    /// The labels with user-defined metadata to organize your
93416    /// TensorboardExperiment.
93417    ///
93418    /// Label keys and values cannot be longer than 64 characters
93419    /// (Unicode codepoints), can only contain lowercase letters, numeric
93420    /// characters, underscores and dashes. International characters are allowed.
93421    /// No more than 64 user labels can be associated with one Dataset (System
93422    /// labels are excluded).
93423    ///
93424    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
93425    /// System reserved label keys are prefixed with `aiplatform.googleapis.com/`
93426    /// and are immutable. The following system labels exist for each Dataset:
93427    ///
93428    /// * `aiplatform.googleapis.com/dataset_metadata_schema`: output only. Its
93429    ///   value is the
93430    ///   [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]
93431    ///   title.
93432    ///
93433    /// [google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]: crate::model::Dataset::metadata_schema_uri
93434    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
93435
93436    /// Used to perform consistent read-modify-write updates. If not set, a blind
93437    /// "overwrite" update happens.
93438    pub etag: std::string::String,
93439
93440    /// Immutable. Source of the TensorboardExperiment. Example: a custom training
93441    /// job.
93442    pub source: std::string::String,
93443
93444    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
93445}
93446
93447#[cfg(feature = "tensorboard-service")]
93448impl TensorboardExperiment {
93449    pub fn new() -> Self {
93450        std::default::Default::default()
93451    }
93452
93453    /// Sets the value of [name][crate::model::TensorboardExperiment::name].
93454    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93455        self.name = v.into();
93456        self
93457    }
93458
93459    /// Sets the value of [display_name][crate::model::TensorboardExperiment::display_name].
93460    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93461        self.display_name = v.into();
93462        self
93463    }
93464
93465    /// Sets the value of [description][crate::model::TensorboardExperiment::description].
93466    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93467        self.description = v.into();
93468        self
93469    }
93470
93471    /// Sets the value of [create_time][crate::model::TensorboardExperiment::create_time].
93472    pub fn set_create_time<T>(mut self, v: T) -> Self
93473    where
93474        T: std::convert::Into<wkt::Timestamp>,
93475    {
93476        self.create_time = std::option::Option::Some(v.into());
93477        self
93478    }
93479
93480    /// Sets or clears the value of [create_time][crate::model::TensorboardExperiment::create_time].
93481    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
93482    where
93483        T: std::convert::Into<wkt::Timestamp>,
93484    {
93485        self.create_time = v.map(|x| x.into());
93486        self
93487    }
93488
93489    /// Sets the value of [update_time][crate::model::TensorboardExperiment::update_time].
93490    pub fn set_update_time<T>(mut self, v: T) -> Self
93491    where
93492        T: std::convert::Into<wkt::Timestamp>,
93493    {
93494        self.update_time = std::option::Option::Some(v.into());
93495        self
93496    }
93497
93498    /// Sets or clears the value of [update_time][crate::model::TensorboardExperiment::update_time].
93499    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
93500    where
93501        T: std::convert::Into<wkt::Timestamp>,
93502    {
93503        self.update_time = v.map(|x| x.into());
93504        self
93505    }
93506
93507    /// Sets the value of [labels][crate::model::TensorboardExperiment::labels].
93508    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
93509    where
93510        T: std::iter::IntoIterator<Item = (K, V)>,
93511        K: std::convert::Into<std::string::String>,
93512        V: std::convert::Into<std::string::String>,
93513    {
93514        use std::iter::Iterator;
93515        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
93516        self
93517    }
93518
93519    /// Sets the value of [etag][crate::model::TensorboardExperiment::etag].
93520    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93521        self.etag = v.into();
93522        self
93523    }
93524
93525    /// Sets the value of [source][crate::model::TensorboardExperiment::source].
93526    pub fn set_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93527        self.source = v.into();
93528        self
93529    }
93530}
93531
93532#[cfg(feature = "tensorboard-service")]
93533impl wkt::message::Message for TensorboardExperiment {
93534    fn typename() -> &'static str {
93535        "type.googleapis.com/google.cloud.aiplatform.v1.TensorboardExperiment"
93536    }
93537}
93538
93539/// TensorboardRun maps to a specific execution of a training job with a given
93540/// set of hyperparameter values, model definition, dataset, etc
93541#[cfg(feature = "tensorboard-service")]
93542#[derive(Clone, Default, PartialEq)]
93543#[non_exhaustive]
93544pub struct TensorboardRun {
93545    /// Output only. Name of the TensorboardRun.
93546    /// Format:
93547    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`
93548    pub name: std::string::String,
93549
93550    /// Required. User provided name of this TensorboardRun.
93551    /// This value must be unique among all TensorboardRuns
93552    /// belonging to the same parent TensorboardExperiment.
93553    pub display_name: std::string::String,
93554
93555    /// Description of this TensorboardRun.
93556    pub description: std::string::String,
93557
93558    /// Output only. Timestamp when this TensorboardRun was created.
93559    pub create_time: std::option::Option<wkt::Timestamp>,
93560
93561    /// Output only. Timestamp when this TensorboardRun was last updated.
93562    pub update_time: std::option::Option<wkt::Timestamp>,
93563
93564    /// The labels with user-defined metadata to organize your TensorboardRuns.
93565    ///
93566    /// This field will be used to filter and visualize Runs in the Tensorboard UI.
93567    /// For example, a Vertex AI training job can set a label
93568    /// aiplatform.googleapis.com/training_job_id=xxxxx to all the runs created
93569    /// within that job. An end user can set a label experiment_id=xxxxx for all
93570    /// the runs produced in a Jupyter notebook. These runs can be grouped by a
93571    /// label value and visualized together in the Tensorboard UI.
93572    ///
93573    /// Label keys and values can be no longer than 64 characters
93574    /// (Unicode codepoints), can only contain lowercase letters, numeric
93575    /// characters, underscores and dashes. International characters are allowed.
93576    /// No more than 64 user labels can be associated with one TensorboardRun
93577    /// (System labels are excluded).
93578    ///
93579    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
93580    /// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
93581    /// and are immutable.
93582    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
93583
93584    /// Used to perform a consistent read-modify-write updates. If not set, a blind
93585    /// "overwrite" update happens.
93586    pub etag: std::string::String,
93587
93588    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
93589}
93590
93591#[cfg(feature = "tensorboard-service")]
93592impl TensorboardRun {
93593    pub fn new() -> Self {
93594        std::default::Default::default()
93595    }
93596
93597    /// Sets the value of [name][crate::model::TensorboardRun::name].
93598    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93599        self.name = v.into();
93600        self
93601    }
93602
93603    /// Sets the value of [display_name][crate::model::TensorboardRun::display_name].
93604    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93605        self.display_name = v.into();
93606        self
93607    }
93608
93609    /// Sets the value of [description][crate::model::TensorboardRun::description].
93610    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93611        self.description = v.into();
93612        self
93613    }
93614
93615    /// Sets the value of [create_time][crate::model::TensorboardRun::create_time].
93616    pub fn set_create_time<T>(mut self, v: T) -> Self
93617    where
93618        T: std::convert::Into<wkt::Timestamp>,
93619    {
93620        self.create_time = std::option::Option::Some(v.into());
93621        self
93622    }
93623
93624    /// Sets or clears the value of [create_time][crate::model::TensorboardRun::create_time].
93625    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
93626    where
93627        T: std::convert::Into<wkt::Timestamp>,
93628    {
93629        self.create_time = v.map(|x| x.into());
93630        self
93631    }
93632
93633    /// Sets the value of [update_time][crate::model::TensorboardRun::update_time].
93634    pub fn set_update_time<T>(mut self, v: T) -> Self
93635    where
93636        T: std::convert::Into<wkt::Timestamp>,
93637    {
93638        self.update_time = std::option::Option::Some(v.into());
93639        self
93640    }
93641
93642    /// Sets or clears the value of [update_time][crate::model::TensorboardRun::update_time].
93643    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
93644    where
93645        T: std::convert::Into<wkt::Timestamp>,
93646    {
93647        self.update_time = v.map(|x| x.into());
93648        self
93649    }
93650
93651    /// Sets the value of [labels][crate::model::TensorboardRun::labels].
93652    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
93653    where
93654        T: std::iter::IntoIterator<Item = (K, V)>,
93655        K: std::convert::Into<std::string::String>,
93656        V: std::convert::Into<std::string::String>,
93657    {
93658        use std::iter::Iterator;
93659        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
93660        self
93661    }
93662
93663    /// Sets the value of [etag][crate::model::TensorboardRun::etag].
93664    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93665        self.etag = v.into();
93666        self
93667    }
93668}
93669
93670#[cfg(feature = "tensorboard-service")]
93671impl wkt::message::Message for TensorboardRun {
93672    fn typename() -> &'static str {
93673        "type.googleapis.com/google.cloud.aiplatform.v1.TensorboardRun"
93674    }
93675}
93676
93677/// Request message for
93678/// [TensorboardService.CreateTensorboard][google.cloud.aiplatform.v1.TensorboardService.CreateTensorboard].
93679///
93680/// [google.cloud.aiplatform.v1.TensorboardService.CreateTensorboard]: crate::client::TensorboardService::create_tensorboard
93681#[cfg(feature = "tensorboard-service")]
93682#[derive(Clone, Default, PartialEq)]
93683#[non_exhaustive]
93684pub struct CreateTensorboardRequest {
93685    /// Required. The resource name of the Location to create the Tensorboard in.
93686    /// Format: `projects/{project}/locations/{location}`
93687    pub parent: std::string::String,
93688
93689    /// Required. The Tensorboard to create.
93690    pub tensorboard: std::option::Option<crate::model::Tensorboard>,
93691
93692    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
93693}
93694
93695#[cfg(feature = "tensorboard-service")]
93696impl CreateTensorboardRequest {
93697    pub fn new() -> Self {
93698        std::default::Default::default()
93699    }
93700
93701    /// Sets the value of [parent][crate::model::CreateTensorboardRequest::parent].
93702    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93703        self.parent = v.into();
93704        self
93705    }
93706
93707    /// Sets the value of [tensorboard][crate::model::CreateTensorboardRequest::tensorboard].
93708    pub fn set_tensorboard<T>(mut self, v: T) -> Self
93709    where
93710        T: std::convert::Into<crate::model::Tensorboard>,
93711    {
93712        self.tensorboard = std::option::Option::Some(v.into());
93713        self
93714    }
93715
93716    /// Sets or clears the value of [tensorboard][crate::model::CreateTensorboardRequest::tensorboard].
93717    pub fn set_or_clear_tensorboard<T>(mut self, v: std::option::Option<T>) -> Self
93718    where
93719        T: std::convert::Into<crate::model::Tensorboard>,
93720    {
93721        self.tensorboard = v.map(|x| x.into());
93722        self
93723    }
93724}
93725
93726#[cfg(feature = "tensorboard-service")]
93727impl wkt::message::Message for CreateTensorboardRequest {
93728    fn typename() -> &'static str {
93729        "type.googleapis.com/google.cloud.aiplatform.v1.CreateTensorboardRequest"
93730    }
93731}
93732
93733/// Request message for
93734/// [TensorboardService.GetTensorboard][google.cloud.aiplatform.v1.TensorboardService.GetTensorboard].
93735///
93736/// [google.cloud.aiplatform.v1.TensorboardService.GetTensorboard]: crate::client::TensorboardService::get_tensorboard
93737#[cfg(feature = "tensorboard-service")]
93738#[derive(Clone, Default, PartialEq)]
93739#[non_exhaustive]
93740pub struct GetTensorboardRequest {
93741    /// Required. The name of the Tensorboard resource.
93742    /// Format:
93743    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
93744    pub name: std::string::String,
93745
93746    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
93747}
93748
93749#[cfg(feature = "tensorboard-service")]
93750impl GetTensorboardRequest {
93751    pub fn new() -> Self {
93752        std::default::Default::default()
93753    }
93754
93755    /// Sets the value of [name][crate::model::GetTensorboardRequest::name].
93756    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93757        self.name = v.into();
93758        self
93759    }
93760}
93761
93762#[cfg(feature = "tensorboard-service")]
93763impl wkt::message::Message for GetTensorboardRequest {
93764    fn typename() -> &'static str {
93765        "type.googleapis.com/google.cloud.aiplatform.v1.GetTensorboardRequest"
93766    }
93767}
93768
93769/// Request message for
93770/// [TensorboardService.ListTensorboards][google.cloud.aiplatform.v1.TensorboardService.ListTensorboards].
93771///
93772/// [google.cloud.aiplatform.v1.TensorboardService.ListTensorboards]: crate::client::TensorboardService::list_tensorboards
93773#[cfg(feature = "tensorboard-service")]
93774#[derive(Clone, Default, PartialEq)]
93775#[non_exhaustive]
93776pub struct ListTensorboardsRequest {
93777    /// Required. The resource name of the Location to list Tensorboards.
93778    /// Format:
93779    /// `projects/{project}/locations/{location}`
93780    pub parent: std::string::String,
93781
93782    /// Lists the Tensorboards that match the filter expression.
93783    pub filter: std::string::String,
93784
93785    /// The maximum number of Tensorboards to return. The service may return
93786    /// fewer than this value. If unspecified, at most 100 Tensorboards are
93787    /// returned. The maximum value is 100; values above 100 are coerced to
93788    /// 100.
93789    pub page_size: i32,
93790
93791    /// A page token, received from a previous
93792    /// [TensorboardService.ListTensorboards][google.cloud.aiplatform.v1.TensorboardService.ListTensorboards]
93793    /// call. Provide this to retrieve the subsequent page.
93794    ///
93795    /// When paginating, all other parameters provided to
93796    /// [TensorboardService.ListTensorboards][google.cloud.aiplatform.v1.TensorboardService.ListTensorboards]
93797    /// must match the call that provided the page token.
93798    ///
93799    /// [google.cloud.aiplatform.v1.TensorboardService.ListTensorboards]: crate::client::TensorboardService::list_tensorboards
93800    pub page_token: std::string::String,
93801
93802    /// Field to use to sort the list.
93803    pub order_by: std::string::String,
93804
93805    /// Mask specifying which fields to read.
93806    pub read_mask: std::option::Option<wkt::FieldMask>,
93807
93808    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
93809}
93810
93811#[cfg(feature = "tensorboard-service")]
93812impl ListTensorboardsRequest {
93813    pub fn new() -> Self {
93814        std::default::Default::default()
93815    }
93816
93817    /// Sets the value of [parent][crate::model::ListTensorboardsRequest::parent].
93818    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93819        self.parent = v.into();
93820        self
93821    }
93822
93823    /// Sets the value of [filter][crate::model::ListTensorboardsRequest::filter].
93824    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93825        self.filter = v.into();
93826        self
93827    }
93828
93829    /// Sets the value of [page_size][crate::model::ListTensorboardsRequest::page_size].
93830    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
93831        self.page_size = v.into();
93832        self
93833    }
93834
93835    /// Sets the value of [page_token][crate::model::ListTensorboardsRequest::page_token].
93836    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93837        self.page_token = v.into();
93838        self
93839    }
93840
93841    /// Sets the value of [order_by][crate::model::ListTensorboardsRequest::order_by].
93842    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93843        self.order_by = v.into();
93844        self
93845    }
93846
93847    /// Sets the value of [read_mask][crate::model::ListTensorboardsRequest::read_mask].
93848    pub fn set_read_mask<T>(mut self, v: T) -> Self
93849    where
93850        T: std::convert::Into<wkt::FieldMask>,
93851    {
93852        self.read_mask = std::option::Option::Some(v.into());
93853        self
93854    }
93855
93856    /// Sets or clears the value of [read_mask][crate::model::ListTensorboardsRequest::read_mask].
93857    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
93858    where
93859        T: std::convert::Into<wkt::FieldMask>,
93860    {
93861        self.read_mask = v.map(|x| x.into());
93862        self
93863    }
93864}
93865
93866#[cfg(feature = "tensorboard-service")]
93867impl wkt::message::Message for ListTensorboardsRequest {
93868    fn typename() -> &'static str {
93869        "type.googleapis.com/google.cloud.aiplatform.v1.ListTensorboardsRequest"
93870    }
93871}
93872
93873/// Response message for
93874/// [TensorboardService.ListTensorboards][google.cloud.aiplatform.v1.TensorboardService.ListTensorboards].
93875///
93876/// [google.cloud.aiplatform.v1.TensorboardService.ListTensorboards]: crate::client::TensorboardService::list_tensorboards
93877#[cfg(feature = "tensorboard-service")]
93878#[derive(Clone, Default, PartialEq)]
93879#[non_exhaustive]
93880pub struct ListTensorboardsResponse {
93881    /// The Tensorboards mathching the request.
93882    pub tensorboards: std::vec::Vec<crate::model::Tensorboard>,
93883
93884    /// A token, which can be sent as
93885    /// [ListTensorboardsRequest.page_token][google.cloud.aiplatform.v1.ListTensorboardsRequest.page_token]
93886    /// to retrieve the next page. If this field is omitted, there are no
93887    /// subsequent pages.
93888    ///
93889    /// [google.cloud.aiplatform.v1.ListTensorboardsRequest.page_token]: crate::model::ListTensorboardsRequest::page_token
93890    pub next_page_token: std::string::String,
93891
93892    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
93893}
93894
93895#[cfg(feature = "tensorboard-service")]
93896impl ListTensorboardsResponse {
93897    pub fn new() -> Self {
93898        std::default::Default::default()
93899    }
93900
93901    /// Sets the value of [tensorboards][crate::model::ListTensorboardsResponse::tensorboards].
93902    pub fn set_tensorboards<T, V>(mut self, v: T) -> Self
93903    where
93904        T: std::iter::IntoIterator<Item = V>,
93905        V: std::convert::Into<crate::model::Tensorboard>,
93906    {
93907        use std::iter::Iterator;
93908        self.tensorboards = v.into_iter().map(|i| i.into()).collect();
93909        self
93910    }
93911
93912    /// Sets the value of [next_page_token][crate::model::ListTensorboardsResponse::next_page_token].
93913    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93914        self.next_page_token = v.into();
93915        self
93916    }
93917}
93918
93919#[cfg(feature = "tensorboard-service")]
93920impl wkt::message::Message for ListTensorboardsResponse {
93921    fn typename() -> &'static str {
93922        "type.googleapis.com/google.cloud.aiplatform.v1.ListTensorboardsResponse"
93923    }
93924}
93925
93926#[cfg(feature = "tensorboard-service")]
93927#[doc(hidden)]
93928impl gax::paginator::internal::PageableResponse for ListTensorboardsResponse {
93929    type PageItem = crate::model::Tensorboard;
93930
93931    fn items(self) -> std::vec::Vec<Self::PageItem> {
93932        self.tensorboards
93933    }
93934
93935    fn next_page_token(&self) -> std::string::String {
93936        use std::clone::Clone;
93937        self.next_page_token.clone()
93938    }
93939}
93940
93941/// Request message for
93942/// [TensorboardService.UpdateTensorboard][google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboard].
93943///
93944/// [google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboard]: crate::client::TensorboardService::update_tensorboard
93945#[cfg(feature = "tensorboard-service")]
93946#[derive(Clone, Default, PartialEq)]
93947#[non_exhaustive]
93948pub struct UpdateTensorboardRequest {
93949    /// Required. Field mask is used to specify the fields to be overwritten in the
93950    /// Tensorboard resource by the update.
93951    /// The fields specified in the update_mask are relative to the resource, not
93952    /// the full request. A field is overwritten if it's in the mask. If the
93953    /// user does not provide a mask then all fields are overwritten if new
93954    /// values are specified.
93955    pub update_mask: std::option::Option<wkt::FieldMask>,
93956
93957    /// Required. The Tensorboard's `name` field is used to identify the
93958    /// Tensorboard to be updated. Format:
93959    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
93960    pub tensorboard: std::option::Option<crate::model::Tensorboard>,
93961
93962    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
93963}
93964
93965#[cfg(feature = "tensorboard-service")]
93966impl UpdateTensorboardRequest {
93967    pub fn new() -> Self {
93968        std::default::Default::default()
93969    }
93970
93971    /// Sets the value of [update_mask][crate::model::UpdateTensorboardRequest::update_mask].
93972    pub fn set_update_mask<T>(mut self, v: T) -> Self
93973    where
93974        T: std::convert::Into<wkt::FieldMask>,
93975    {
93976        self.update_mask = std::option::Option::Some(v.into());
93977        self
93978    }
93979
93980    /// Sets or clears the value of [update_mask][crate::model::UpdateTensorboardRequest::update_mask].
93981    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
93982    where
93983        T: std::convert::Into<wkt::FieldMask>,
93984    {
93985        self.update_mask = v.map(|x| x.into());
93986        self
93987    }
93988
93989    /// Sets the value of [tensorboard][crate::model::UpdateTensorboardRequest::tensorboard].
93990    pub fn set_tensorboard<T>(mut self, v: T) -> Self
93991    where
93992        T: std::convert::Into<crate::model::Tensorboard>,
93993    {
93994        self.tensorboard = std::option::Option::Some(v.into());
93995        self
93996    }
93997
93998    /// Sets or clears the value of [tensorboard][crate::model::UpdateTensorboardRequest::tensorboard].
93999    pub fn set_or_clear_tensorboard<T>(mut self, v: std::option::Option<T>) -> Self
94000    where
94001        T: std::convert::Into<crate::model::Tensorboard>,
94002    {
94003        self.tensorboard = v.map(|x| x.into());
94004        self
94005    }
94006}
94007
94008#[cfg(feature = "tensorboard-service")]
94009impl wkt::message::Message for UpdateTensorboardRequest {
94010    fn typename() -> &'static str {
94011        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateTensorboardRequest"
94012    }
94013}
94014
94015/// Request message for
94016/// [TensorboardService.DeleteTensorboard][google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboard].
94017///
94018/// [google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboard]: crate::client::TensorboardService::delete_tensorboard
94019#[cfg(feature = "tensorboard-service")]
94020#[derive(Clone, Default, PartialEq)]
94021#[non_exhaustive]
94022pub struct DeleteTensorboardRequest {
94023    /// Required. The name of the Tensorboard to be deleted.
94024    /// Format:
94025    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
94026    pub name: std::string::String,
94027
94028    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94029}
94030
94031#[cfg(feature = "tensorboard-service")]
94032impl DeleteTensorboardRequest {
94033    pub fn new() -> Self {
94034        std::default::Default::default()
94035    }
94036
94037    /// Sets the value of [name][crate::model::DeleteTensorboardRequest::name].
94038    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94039        self.name = v.into();
94040        self
94041    }
94042}
94043
94044#[cfg(feature = "tensorboard-service")]
94045impl wkt::message::Message for DeleteTensorboardRequest {
94046    fn typename() -> &'static str {
94047        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteTensorboardRequest"
94048    }
94049}
94050
94051/// Request message for
94052/// [TensorboardService.ReadTensorboardUsage][google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsage].
94053///
94054/// [google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsage]: crate::client::TensorboardService::read_tensorboard_usage
94055#[cfg(feature = "tensorboard-service")]
94056#[derive(Clone, Default, PartialEq)]
94057#[non_exhaustive]
94058pub struct ReadTensorboardUsageRequest {
94059    /// Required. The name of the Tensorboard resource.
94060    /// Format:
94061    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
94062    pub tensorboard: std::string::String,
94063
94064    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94065}
94066
94067#[cfg(feature = "tensorboard-service")]
94068impl ReadTensorboardUsageRequest {
94069    pub fn new() -> Self {
94070        std::default::Default::default()
94071    }
94072
94073    /// Sets the value of [tensorboard][crate::model::ReadTensorboardUsageRequest::tensorboard].
94074    pub fn set_tensorboard<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94075        self.tensorboard = v.into();
94076        self
94077    }
94078}
94079
94080#[cfg(feature = "tensorboard-service")]
94081impl wkt::message::Message for ReadTensorboardUsageRequest {
94082    fn typename() -> &'static str {
94083        "type.googleapis.com/google.cloud.aiplatform.v1.ReadTensorboardUsageRequest"
94084    }
94085}
94086
94087/// Response message for
94088/// [TensorboardService.ReadTensorboardUsage][google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsage].
94089///
94090/// [google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardUsage]: crate::client::TensorboardService::read_tensorboard_usage
94091#[cfg(feature = "tensorboard-service")]
94092#[derive(Clone, Default, PartialEq)]
94093#[non_exhaustive]
94094pub struct ReadTensorboardUsageResponse {
94095    /// Maps year-month (YYYYMM) string to per month usage data.
94096    pub monthly_usage_data: std::collections::HashMap<
94097        std::string::String,
94098        crate::model::read_tensorboard_usage_response::PerMonthUsageData,
94099    >,
94100
94101    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94102}
94103
94104#[cfg(feature = "tensorboard-service")]
94105impl ReadTensorboardUsageResponse {
94106    pub fn new() -> Self {
94107        std::default::Default::default()
94108    }
94109
94110    /// Sets the value of [monthly_usage_data][crate::model::ReadTensorboardUsageResponse::monthly_usage_data].
94111    pub fn set_monthly_usage_data<T, K, V>(mut self, v: T) -> Self
94112    where
94113        T: std::iter::IntoIterator<Item = (K, V)>,
94114        K: std::convert::Into<std::string::String>,
94115        V: std::convert::Into<crate::model::read_tensorboard_usage_response::PerMonthUsageData>,
94116    {
94117        use std::iter::Iterator;
94118        self.monthly_usage_data = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
94119        self
94120    }
94121}
94122
94123#[cfg(feature = "tensorboard-service")]
94124impl wkt::message::Message for ReadTensorboardUsageResponse {
94125    fn typename() -> &'static str {
94126        "type.googleapis.com/google.cloud.aiplatform.v1.ReadTensorboardUsageResponse"
94127    }
94128}
94129
94130/// Defines additional types related to [ReadTensorboardUsageResponse].
94131#[cfg(feature = "tensorboard-service")]
94132pub mod read_tensorboard_usage_response {
94133    #[allow(unused_imports)]
94134    use super::*;
94135
94136    /// Per user usage data.
94137    #[cfg(feature = "tensorboard-service")]
94138    #[derive(Clone, Default, PartialEq)]
94139    #[non_exhaustive]
94140    pub struct PerUserUsageData {
94141        /// User's username
94142        pub username: std::string::String,
94143
94144        /// Number of times the user has read data within the Tensorboard.
94145        pub view_count: i64,
94146
94147        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94148    }
94149
94150    #[cfg(feature = "tensorboard-service")]
94151    impl PerUserUsageData {
94152        pub fn new() -> Self {
94153            std::default::Default::default()
94154        }
94155
94156        /// Sets the value of [username][crate::model::read_tensorboard_usage_response::PerUserUsageData::username].
94157        pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94158            self.username = v.into();
94159            self
94160        }
94161
94162        /// Sets the value of [view_count][crate::model::read_tensorboard_usage_response::PerUserUsageData::view_count].
94163        pub fn set_view_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
94164            self.view_count = v.into();
94165            self
94166        }
94167    }
94168
94169    #[cfg(feature = "tensorboard-service")]
94170    impl wkt::message::Message for PerUserUsageData {
94171        fn typename() -> &'static str {
94172            "type.googleapis.com/google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerUserUsageData"
94173        }
94174    }
94175
94176    /// Per month usage data
94177    #[cfg(feature = "tensorboard-service")]
94178    #[derive(Clone, Default, PartialEq)]
94179    #[non_exhaustive]
94180    pub struct PerMonthUsageData {
94181        /// Usage data for each user in the given month.
94182        pub user_usage_data:
94183            std::vec::Vec<crate::model::read_tensorboard_usage_response::PerUserUsageData>,
94184
94185        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94186    }
94187
94188    #[cfg(feature = "tensorboard-service")]
94189    impl PerMonthUsageData {
94190        pub fn new() -> Self {
94191            std::default::Default::default()
94192        }
94193
94194        /// Sets the value of [user_usage_data][crate::model::read_tensorboard_usage_response::PerMonthUsageData::user_usage_data].
94195        pub fn set_user_usage_data<T, V>(mut self, v: T) -> Self
94196        where
94197            T: std::iter::IntoIterator<Item = V>,
94198            V: std::convert::Into<crate::model::read_tensorboard_usage_response::PerUserUsageData>,
94199        {
94200            use std::iter::Iterator;
94201            self.user_usage_data = v.into_iter().map(|i| i.into()).collect();
94202            self
94203        }
94204    }
94205
94206    #[cfg(feature = "tensorboard-service")]
94207    impl wkt::message::Message for PerMonthUsageData {
94208        fn typename() -> &'static str {
94209            "type.googleapis.com/google.cloud.aiplatform.v1.ReadTensorboardUsageResponse.PerMonthUsageData"
94210        }
94211    }
94212}
94213
94214/// Request message for
94215/// [TensorboardService.ReadTensorboardSize][google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardSize].
94216///
94217/// [google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardSize]: crate::client::TensorboardService::read_tensorboard_size
94218#[cfg(feature = "tensorboard-service")]
94219#[derive(Clone, Default, PartialEq)]
94220#[non_exhaustive]
94221pub struct ReadTensorboardSizeRequest {
94222    /// Required. The name of the Tensorboard resource.
94223    /// Format:
94224    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
94225    pub tensorboard: std::string::String,
94226
94227    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94228}
94229
94230#[cfg(feature = "tensorboard-service")]
94231impl ReadTensorboardSizeRequest {
94232    pub fn new() -> Self {
94233        std::default::Default::default()
94234    }
94235
94236    /// Sets the value of [tensorboard][crate::model::ReadTensorboardSizeRequest::tensorboard].
94237    pub fn set_tensorboard<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94238        self.tensorboard = v.into();
94239        self
94240    }
94241}
94242
94243#[cfg(feature = "tensorboard-service")]
94244impl wkt::message::Message for ReadTensorboardSizeRequest {
94245    fn typename() -> &'static str {
94246        "type.googleapis.com/google.cloud.aiplatform.v1.ReadTensorboardSizeRequest"
94247    }
94248}
94249
94250/// Response message for
94251/// [TensorboardService.ReadTensorboardSize][google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardSize].
94252///
94253/// [google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardSize]: crate::client::TensorboardService::read_tensorboard_size
94254#[cfg(feature = "tensorboard-service")]
94255#[derive(Clone, Default, PartialEq)]
94256#[non_exhaustive]
94257pub struct ReadTensorboardSizeResponse {
94258    /// Payload storage size for the TensorBoard
94259    pub storage_size_byte: i64,
94260
94261    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94262}
94263
94264#[cfg(feature = "tensorboard-service")]
94265impl ReadTensorboardSizeResponse {
94266    pub fn new() -> Self {
94267        std::default::Default::default()
94268    }
94269
94270    /// Sets the value of [storage_size_byte][crate::model::ReadTensorboardSizeResponse::storage_size_byte].
94271    pub fn set_storage_size_byte<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
94272        self.storage_size_byte = v.into();
94273        self
94274    }
94275}
94276
94277#[cfg(feature = "tensorboard-service")]
94278impl wkt::message::Message for ReadTensorboardSizeResponse {
94279    fn typename() -> &'static str {
94280        "type.googleapis.com/google.cloud.aiplatform.v1.ReadTensorboardSizeResponse"
94281    }
94282}
94283
94284/// Request message for
94285/// [TensorboardService.CreateTensorboardExperiment][google.cloud.aiplatform.v1.TensorboardService.CreateTensorboardExperiment].
94286///
94287/// [google.cloud.aiplatform.v1.TensorboardService.CreateTensorboardExperiment]: crate::client::TensorboardService::create_tensorboard_experiment
94288#[cfg(feature = "tensorboard-service")]
94289#[derive(Clone, Default, PartialEq)]
94290#[non_exhaustive]
94291pub struct CreateTensorboardExperimentRequest {
94292    /// Required. The resource name of the Tensorboard to create the
94293    /// TensorboardExperiment in. Format:
94294    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
94295    pub parent: std::string::String,
94296
94297    /// The TensorboardExperiment to create.
94298    pub tensorboard_experiment: std::option::Option<crate::model::TensorboardExperiment>,
94299
94300    /// Required. The ID to use for the Tensorboard experiment, which becomes the
94301    /// final component of the Tensorboard experiment's resource name.
94302    ///
94303    /// This value should be 1-128 characters, and valid characters
94304    /// are `/[a-z][0-9]-/`.
94305    pub tensorboard_experiment_id: std::string::String,
94306
94307    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94308}
94309
94310#[cfg(feature = "tensorboard-service")]
94311impl CreateTensorboardExperimentRequest {
94312    pub fn new() -> Self {
94313        std::default::Default::default()
94314    }
94315
94316    /// Sets the value of [parent][crate::model::CreateTensorboardExperimentRequest::parent].
94317    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94318        self.parent = v.into();
94319        self
94320    }
94321
94322    /// Sets the value of [tensorboard_experiment][crate::model::CreateTensorboardExperimentRequest::tensorboard_experiment].
94323    pub fn set_tensorboard_experiment<T>(mut self, v: T) -> Self
94324    where
94325        T: std::convert::Into<crate::model::TensorboardExperiment>,
94326    {
94327        self.tensorboard_experiment = std::option::Option::Some(v.into());
94328        self
94329    }
94330
94331    /// Sets or clears the value of [tensorboard_experiment][crate::model::CreateTensorboardExperimentRequest::tensorboard_experiment].
94332    pub fn set_or_clear_tensorboard_experiment<T>(mut self, v: std::option::Option<T>) -> Self
94333    where
94334        T: std::convert::Into<crate::model::TensorboardExperiment>,
94335    {
94336        self.tensorboard_experiment = v.map(|x| x.into());
94337        self
94338    }
94339
94340    /// Sets the value of [tensorboard_experiment_id][crate::model::CreateTensorboardExperimentRequest::tensorboard_experiment_id].
94341    pub fn set_tensorboard_experiment_id<T: std::convert::Into<std::string::String>>(
94342        mut self,
94343        v: T,
94344    ) -> Self {
94345        self.tensorboard_experiment_id = v.into();
94346        self
94347    }
94348}
94349
94350#[cfg(feature = "tensorboard-service")]
94351impl wkt::message::Message for CreateTensorboardExperimentRequest {
94352    fn typename() -> &'static str {
94353        "type.googleapis.com/google.cloud.aiplatform.v1.CreateTensorboardExperimentRequest"
94354    }
94355}
94356
94357/// Request message for
94358/// [TensorboardService.GetTensorboardExperiment][google.cloud.aiplatform.v1.TensorboardService.GetTensorboardExperiment].
94359///
94360/// [google.cloud.aiplatform.v1.TensorboardService.GetTensorboardExperiment]: crate::client::TensorboardService::get_tensorboard_experiment
94361#[cfg(feature = "tensorboard-service")]
94362#[derive(Clone, Default, PartialEq)]
94363#[non_exhaustive]
94364pub struct GetTensorboardExperimentRequest {
94365    /// Required. The name of the TensorboardExperiment resource.
94366    /// Format:
94367    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`
94368    pub name: std::string::String,
94369
94370    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94371}
94372
94373#[cfg(feature = "tensorboard-service")]
94374impl GetTensorboardExperimentRequest {
94375    pub fn new() -> Self {
94376        std::default::Default::default()
94377    }
94378
94379    /// Sets the value of [name][crate::model::GetTensorboardExperimentRequest::name].
94380    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94381        self.name = v.into();
94382        self
94383    }
94384}
94385
94386#[cfg(feature = "tensorboard-service")]
94387impl wkt::message::Message for GetTensorboardExperimentRequest {
94388    fn typename() -> &'static str {
94389        "type.googleapis.com/google.cloud.aiplatform.v1.GetTensorboardExperimentRequest"
94390    }
94391}
94392
94393/// Request message for
94394/// [TensorboardService.ListTensorboardExperiments][google.cloud.aiplatform.v1.TensorboardService.ListTensorboardExperiments].
94395///
94396/// [google.cloud.aiplatform.v1.TensorboardService.ListTensorboardExperiments]: crate::client::TensorboardService::list_tensorboard_experiments
94397#[cfg(feature = "tensorboard-service")]
94398#[derive(Clone, Default, PartialEq)]
94399#[non_exhaustive]
94400pub struct ListTensorboardExperimentsRequest {
94401    /// Required. The resource name of the Tensorboard to list
94402    /// TensorboardExperiments. Format:
94403    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
94404    pub parent: std::string::String,
94405
94406    /// Lists the TensorboardExperiments that match the filter expression.
94407    pub filter: std::string::String,
94408
94409    /// The maximum number of TensorboardExperiments to return. The service may
94410    /// return fewer than this value. If unspecified, at most 50
94411    /// TensorboardExperiments are returned. The maximum value is 1000; values
94412    /// above 1000 are coerced to 1000.
94413    pub page_size: i32,
94414
94415    /// A page token, received from a previous
94416    /// [TensorboardService.ListTensorboardExperiments][google.cloud.aiplatform.v1.TensorboardService.ListTensorboardExperiments]
94417    /// call. Provide this to retrieve the subsequent page.
94418    ///
94419    /// When paginating, all other parameters provided to
94420    /// [TensorboardService.ListTensorboardExperiments][google.cloud.aiplatform.v1.TensorboardService.ListTensorboardExperiments]
94421    /// must match the call that provided the page token.
94422    ///
94423    /// [google.cloud.aiplatform.v1.TensorboardService.ListTensorboardExperiments]: crate::client::TensorboardService::list_tensorboard_experiments
94424    pub page_token: std::string::String,
94425
94426    /// Field to use to sort the list.
94427    pub order_by: std::string::String,
94428
94429    /// Mask specifying which fields to read.
94430    pub read_mask: std::option::Option<wkt::FieldMask>,
94431
94432    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94433}
94434
94435#[cfg(feature = "tensorboard-service")]
94436impl ListTensorboardExperimentsRequest {
94437    pub fn new() -> Self {
94438        std::default::Default::default()
94439    }
94440
94441    /// Sets the value of [parent][crate::model::ListTensorboardExperimentsRequest::parent].
94442    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94443        self.parent = v.into();
94444        self
94445    }
94446
94447    /// Sets the value of [filter][crate::model::ListTensorboardExperimentsRequest::filter].
94448    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94449        self.filter = v.into();
94450        self
94451    }
94452
94453    /// Sets the value of [page_size][crate::model::ListTensorboardExperimentsRequest::page_size].
94454    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
94455        self.page_size = v.into();
94456        self
94457    }
94458
94459    /// Sets the value of [page_token][crate::model::ListTensorboardExperimentsRequest::page_token].
94460    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94461        self.page_token = v.into();
94462        self
94463    }
94464
94465    /// Sets the value of [order_by][crate::model::ListTensorboardExperimentsRequest::order_by].
94466    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94467        self.order_by = v.into();
94468        self
94469    }
94470
94471    /// Sets the value of [read_mask][crate::model::ListTensorboardExperimentsRequest::read_mask].
94472    pub fn set_read_mask<T>(mut self, v: T) -> Self
94473    where
94474        T: std::convert::Into<wkt::FieldMask>,
94475    {
94476        self.read_mask = std::option::Option::Some(v.into());
94477        self
94478    }
94479
94480    /// Sets or clears the value of [read_mask][crate::model::ListTensorboardExperimentsRequest::read_mask].
94481    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
94482    where
94483        T: std::convert::Into<wkt::FieldMask>,
94484    {
94485        self.read_mask = v.map(|x| x.into());
94486        self
94487    }
94488}
94489
94490#[cfg(feature = "tensorboard-service")]
94491impl wkt::message::Message for ListTensorboardExperimentsRequest {
94492    fn typename() -> &'static str {
94493        "type.googleapis.com/google.cloud.aiplatform.v1.ListTensorboardExperimentsRequest"
94494    }
94495}
94496
94497/// Response message for
94498/// [TensorboardService.ListTensorboardExperiments][google.cloud.aiplatform.v1.TensorboardService.ListTensorboardExperiments].
94499///
94500/// [google.cloud.aiplatform.v1.TensorboardService.ListTensorboardExperiments]: crate::client::TensorboardService::list_tensorboard_experiments
94501#[cfg(feature = "tensorboard-service")]
94502#[derive(Clone, Default, PartialEq)]
94503#[non_exhaustive]
94504pub struct ListTensorboardExperimentsResponse {
94505    /// The TensorboardExperiments mathching the request.
94506    pub tensorboard_experiments: std::vec::Vec<crate::model::TensorboardExperiment>,
94507
94508    /// A token, which can be sent as
94509    /// [ListTensorboardExperimentsRequest.page_token][google.cloud.aiplatform.v1.ListTensorboardExperimentsRequest.page_token]
94510    /// to retrieve the next page. If this field is omitted, there are no
94511    /// subsequent pages.
94512    ///
94513    /// [google.cloud.aiplatform.v1.ListTensorboardExperimentsRequest.page_token]: crate::model::ListTensorboardExperimentsRequest::page_token
94514    pub next_page_token: std::string::String,
94515
94516    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94517}
94518
94519#[cfg(feature = "tensorboard-service")]
94520impl ListTensorboardExperimentsResponse {
94521    pub fn new() -> Self {
94522        std::default::Default::default()
94523    }
94524
94525    /// Sets the value of [tensorboard_experiments][crate::model::ListTensorboardExperimentsResponse::tensorboard_experiments].
94526    pub fn set_tensorboard_experiments<T, V>(mut self, v: T) -> Self
94527    where
94528        T: std::iter::IntoIterator<Item = V>,
94529        V: std::convert::Into<crate::model::TensorboardExperiment>,
94530    {
94531        use std::iter::Iterator;
94532        self.tensorboard_experiments = v.into_iter().map(|i| i.into()).collect();
94533        self
94534    }
94535
94536    /// Sets the value of [next_page_token][crate::model::ListTensorboardExperimentsResponse::next_page_token].
94537    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94538        self.next_page_token = v.into();
94539        self
94540    }
94541}
94542
94543#[cfg(feature = "tensorboard-service")]
94544impl wkt::message::Message for ListTensorboardExperimentsResponse {
94545    fn typename() -> &'static str {
94546        "type.googleapis.com/google.cloud.aiplatform.v1.ListTensorboardExperimentsResponse"
94547    }
94548}
94549
94550#[cfg(feature = "tensorboard-service")]
94551#[doc(hidden)]
94552impl gax::paginator::internal::PageableResponse for ListTensorboardExperimentsResponse {
94553    type PageItem = crate::model::TensorboardExperiment;
94554
94555    fn items(self) -> std::vec::Vec<Self::PageItem> {
94556        self.tensorboard_experiments
94557    }
94558
94559    fn next_page_token(&self) -> std::string::String {
94560        use std::clone::Clone;
94561        self.next_page_token.clone()
94562    }
94563}
94564
94565/// Request message for
94566/// [TensorboardService.UpdateTensorboardExperiment][google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboardExperiment].
94567///
94568/// [google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboardExperiment]: crate::client::TensorboardService::update_tensorboard_experiment
94569#[cfg(feature = "tensorboard-service")]
94570#[derive(Clone, Default, PartialEq)]
94571#[non_exhaustive]
94572pub struct UpdateTensorboardExperimentRequest {
94573    /// Required. Field mask is used to specify the fields to be overwritten in the
94574    /// TensorboardExperiment resource by the update.
94575    /// The fields specified in the update_mask are relative to the resource, not
94576    /// the full request. A field is overwritten if it's in the mask. If the
94577    /// user does not provide a mask then all fields are overwritten if new
94578    /// values are specified.
94579    pub update_mask: std::option::Option<wkt::FieldMask>,
94580
94581    /// Required. The TensorboardExperiment's `name` field is used to identify the
94582    /// TensorboardExperiment to be updated. Format:
94583    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`
94584    pub tensorboard_experiment: std::option::Option<crate::model::TensorboardExperiment>,
94585
94586    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94587}
94588
94589#[cfg(feature = "tensorboard-service")]
94590impl UpdateTensorboardExperimentRequest {
94591    pub fn new() -> Self {
94592        std::default::Default::default()
94593    }
94594
94595    /// Sets the value of [update_mask][crate::model::UpdateTensorboardExperimentRequest::update_mask].
94596    pub fn set_update_mask<T>(mut self, v: T) -> Self
94597    where
94598        T: std::convert::Into<wkt::FieldMask>,
94599    {
94600        self.update_mask = std::option::Option::Some(v.into());
94601        self
94602    }
94603
94604    /// Sets or clears the value of [update_mask][crate::model::UpdateTensorboardExperimentRequest::update_mask].
94605    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
94606    where
94607        T: std::convert::Into<wkt::FieldMask>,
94608    {
94609        self.update_mask = v.map(|x| x.into());
94610        self
94611    }
94612
94613    /// Sets the value of [tensorboard_experiment][crate::model::UpdateTensorboardExperimentRequest::tensorboard_experiment].
94614    pub fn set_tensorboard_experiment<T>(mut self, v: T) -> Self
94615    where
94616        T: std::convert::Into<crate::model::TensorboardExperiment>,
94617    {
94618        self.tensorboard_experiment = std::option::Option::Some(v.into());
94619        self
94620    }
94621
94622    /// Sets or clears the value of [tensorboard_experiment][crate::model::UpdateTensorboardExperimentRequest::tensorboard_experiment].
94623    pub fn set_or_clear_tensorboard_experiment<T>(mut self, v: std::option::Option<T>) -> Self
94624    where
94625        T: std::convert::Into<crate::model::TensorboardExperiment>,
94626    {
94627        self.tensorboard_experiment = v.map(|x| x.into());
94628        self
94629    }
94630}
94631
94632#[cfg(feature = "tensorboard-service")]
94633impl wkt::message::Message for UpdateTensorboardExperimentRequest {
94634    fn typename() -> &'static str {
94635        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateTensorboardExperimentRequest"
94636    }
94637}
94638
94639/// Request message for
94640/// [TensorboardService.DeleteTensorboardExperiment][google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboardExperiment].
94641///
94642/// [google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboardExperiment]: crate::client::TensorboardService::delete_tensorboard_experiment
94643#[cfg(feature = "tensorboard-service")]
94644#[derive(Clone, Default, PartialEq)]
94645#[non_exhaustive]
94646pub struct DeleteTensorboardExperimentRequest {
94647    /// Required. The name of the TensorboardExperiment to be deleted.
94648    /// Format:
94649    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`
94650    pub name: std::string::String,
94651
94652    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94653}
94654
94655#[cfg(feature = "tensorboard-service")]
94656impl DeleteTensorboardExperimentRequest {
94657    pub fn new() -> Self {
94658        std::default::Default::default()
94659    }
94660
94661    /// Sets the value of [name][crate::model::DeleteTensorboardExperimentRequest::name].
94662    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94663        self.name = v.into();
94664        self
94665    }
94666}
94667
94668#[cfg(feature = "tensorboard-service")]
94669impl wkt::message::Message for DeleteTensorboardExperimentRequest {
94670    fn typename() -> &'static str {
94671        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteTensorboardExperimentRequest"
94672    }
94673}
94674
94675/// Request message for
94676/// [TensorboardService.BatchCreateTensorboardRuns][google.cloud.aiplatform.v1.TensorboardService.BatchCreateTensorboardRuns].
94677///
94678/// [google.cloud.aiplatform.v1.TensorboardService.BatchCreateTensorboardRuns]: crate::client::TensorboardService::batch_create_tensorboard_runs
94679#[cfg(feature = "tensorboard-service")]
94680#[derive(Clone, Default, PartialEq)]
94681#[non_exhaustive]
94682pub struct BatchCreateTensorboardRunsRequest {
94683    /// Required. The resource name of the TensorboardExperiment to create the
94684    /// TensorboardRuns in. Format:
94685    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`
94686    /// The parent field in the CreateTensorboardRunRequest messages must match
94687    /// this field.
94688    pub parent: std::string::String,
94689
94690    /// Required. The request message specifying the TensorboardRuns to create.
94691    /// A maximum of 1000 TensorboardRuns can be created in a batch.
94692    pub requests: std::vec::Vec<crate::model::CreateTensorboardRunRequest>,
94693
94694    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94695}
94696
94697#[cfg(feature = "tensorboard-service")]
94698impl BatchCreateTensorboardRunsRequest {
94699    pub fn new() -> Self {
94700        std::default::Default::default()
94701    }
94702
94703    /// Sets the value of [parent][crate::model::BatchCreateTensorboardRunsRequest::parent].
94704    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94705        self.parent = v.into();
94706        self
94707    }
94708
94709    /// Sets the value of [requests][crate::model::BatchCreateTensorboardRunsRequest::requests].
94710    pub fn set_requests<T, V>(mut self, v: T) -> Self
94711    where
94712        T: std::iter::IntoIterator<Item = V>,
94713        V: std::convert::Into<crate::model::CreateTensorboardRunRequest>,
94714    {
94715        use std::iter::Iterator;
94716        self.requests = v.into_iter().map(|i| i.into()).collect();
94717        self
94718    }
94719}
94720
94721#[cfg(feature = "tensorboard-service")]
94722impl wkt::message::Message for BatchCreateTensorboardRunsRequest {
94723    fn typename() -> &'static str {
94724        "type.googleapis.com/google.cloud.aiplatform.v1.BatchCreateTensorboardRunsRequest"
94725    }
94726}
94727
94728/// Response message for
94729/// [TensorboardService.BatchCreateTensorboardRuns][google.cloud.aiplatform.v1.TensorboardService.BatchCreateTensorboardRuns].
94730///
94731/// [google.cloud.aiplatform.v1.TensorboardService.BatchCreateTensorboardRuns]: crate::client::TensorboardService::batch_create_tensorboard_runs
94732#[cfg(feature = "tensorboard-service")]
94733#[derive(Clone, Default, PartialEq)]
94734#[non_exhaustive]
94735pub struct BatchCreateTensorboardRunsResponse {
94736    /// The created TensorboardRuns.
94737    pub tensorboard_runs: std::vec::Vec<crate::model::TensorboardRun>,
94738
94739    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94740}
94741
94742#[cfg(feature = "tensorboard-service")]
94743impl BatchCreateTensorboardRunsResponse {
94744    pub fn new() -> Self {
94745        std::default::Default::default()
94746    }
94747
94748    /// Sets the value of [tensorboard_runs][crate::model::BatchCreateTensorboardRunsResponse::tensorboard_runs].
94749    pub fn set_tensorboard_runs<T, V>(mut self, v: T) -> Self
94750    where
94751        T: std::iter::IntoIterator<Item = V>,
94752        V: std::convert::Into<crate::model::TensorboardRun>,
94753    {
94754        use std::iter::Iterator;
94755        self.tensorboard_runs = v.into_iter().map(|i| i.into()).collect();
94756        self
94757    }
94758}
94759
94760#[cfg(feature = "tensorboard-service")]
94761impl wkt::message::Message for BatchCreateTensorboardRunsResponse {
94762    fn typename() -> &'static str {
94763        "type.googleapis.com/google.cloud.aiplatform.v1.BatchCreateTensorboardRunsResponse"
94764    }
94765}
94766
94767/// Request message for
94768/// [TensorboardService.CreateTensorboardRun][google.cloud.aiplatform.v1.TensorboardService.CreateTensorboardRun].
94769///
94770/// [google.cloud.aiplatform.v1.TensorboardService.CreateTensorboardRun]: crate::client::TensorboardService::create_tensorboard_run
94771#[cfg(feature = "tensorboard-service")]
94772#[derive(Clone, Default, PartialEq)]
94773#[non_exhaustive]
94774pub struct CreateTensorboardRunRequest {
94775    /// Required. The resource name of the TensorboardExperiment to create the
94776    /// TensorboardRun in. Format:
94777    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`
94778    pub parent: std::string::String,
94779
94780    /// Required. The TensorboardRun to create.
94781    pub tensorboard_run: std::option::Option<crate::model::TensorboardRun>,
94782
94783    /// Required. The ID to use for the Tensorboard run, which becomes the final
94784    /// component of the Tensorboard run's resource name.
94785    ///
94786    /// This value should be 1-128 characters, and valid characters
94787    /// are `/[a-z][0-9]-/`.
94788    pub tensorboard_run_id: std::string::String,
94789
94790    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94791}
94792
94793#[cfg(feature = "tensorboard-service")]
94794impl CreateTensorboardRunRequest {
94795    pub fn new() -> Self {
94796        std::default::Default::default()
94797    }
94798
94799    /// Sets the value of [parent][crate::model::CreateTensorboardRunRequest::parent].
94800    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94801        self.parent = v.into();
94802        self
94803    }
94804
94805    /// Sets the value of [tensorboard_run][crate::model::CreateTensorboardRunRequest::tensorboard_run].
94806    pub fn set_tensorboard_run<T>(mut self, v: T) -> Self
94807    where
94808        T: std::convert::Into<crate::model::TensorboardRun>,
94809    {
94810        self.tensorboard_run = std::option::Option::Some(v.into());
94811        self
94812    }
94813
94814    /// Sets or clears the value of [tensorboard_run][crate::model::CreateTensorboardRunRequest::tensorboard_run].
94815    pub fn set_or_clear_tensorboard_run<T>(mut self, v: std::option::Option<T>) -> Self
94816    where
94817        T: std::convert::Into<crate::model::TensorboardRun>,
94818    {
94819        self.tensorboard_run = v.map(|x| x.into());
94820        self
94821    }
94822
94823    /// Sets the value of [tensorboard_run_id][crate::model::CreateTensorboardRunRequest::tensorboard_run_id].
94824    pub fn set_tensorboard_run_id<T: std::convert::Into<std::string::String>>(
94825        mut self,
94826        v: T,
94827    ) -> Self {
94828        self.tensorboard_run_id = v.into();
94829        self
94830    }
94831}
94832
94833#[cfg(feature = "tensorboard-service")]
94834impl wkt::message::Message for CreateTensorboardRunRequest {
94835    fn typename() -> &'static str {
94836        "type.googleapis.com/google.cloud.aiplatform.v1.CreateTensorboardRunRequest"
94837    }
94838}
94839
94840/// Request message for
94841/// [TensorboardService.GetTensorboardRun][google.cloud.aiplatform.v1.TensorboardService.GetTensorboardRun].
94842///
94843/// [google.cloud.aiplatform.v1.TensorboardService.GetTensorboardRun]: crate::client::TensorboardService::get_tensorboard_run
94844#[cfg(feature = "tensorboard-service")]
94845#[derive(Clone, Default, PartialEq)]
94846#[non_exhaustive]
94847pub struct GetTensorboardRunRequest {
94848    /// Required. The name of the TensorboardRun resource.
94849    /// Format:
94850    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`
94851    pub name: std::string::String,
94852
94853    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94854}
94855
94856#[cfg(feature = "tensorboard-service")]
94857impl GetTensorboardRunRequest {
94858    pub fn new() -> Self {
94859        std::default::Default::default()
94860    }
94861
94862    /// Sets the value of [name][crate::model::GetTensorboardRunRequest::name].
94863    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94864        self.name = v.into();
94865        self
94866    }
94867}
94868
94869#[cfg(feature = "tensorboard-service")]
94870impl wkt::message::Message for GetTensorboardRunRequest {
94871    fn typename() -> &'static str {
94872        "type.googleapis.com/google.cloud.aiplatform.v1.GetTensorboardRunRequest"
94873    }
94874}
94875
94876/// Request message for
94877/// [TensorboardService.ReadTensorboardBlobData][google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardBlobData].
94878#[cfg(feature = "tensorboard-service")]
94879#[derive(Clone, Default, PartialEq)]
94880#[non_exhaustive]
94881pub struct ReadTensorboardBlobDataRequest {
94882    /// Required. The resource name of the TensorboardTimeSeries to list Blobs.
94883    /// Format:
94884    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`
94885    pub time_series: std::string::String,
94886
94887    /// IDs of the blobs to read.
94888    pub blob_ids: std::vec::Vec<std::string::String>,
94889
94890    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94891}
94892
94893#[cfg(feature = "tensorboard-service")]
94894impl ReadTensorboardBlobDataRequest {
94895    pub fn new() -> Self {
94896        std::default::Default::default()
94897    }
94898
94899    /// Sets the value of [time_series][crate::model::ReadTensorboardBlobDataRequest::time_series].
94900    pub fn set_time_series<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94901        self.time_series = v.into();
94902        self
94903    }
94904
94905    /// Sets the value of [blob_ids][crate::model::ReadTensorboardBlobDataRequest::blob_ids].
94906    pub fn set_blob_ids<T, V>(mut self, v: T) -> Self
94907    where
94908        T: std::iter::IntoIterator<Item = V>,
94909        V: std::convert::Into<std::string::String>,
94910    {
94911        use std::iter::Iterator;
94912        self.blob_ids = v.into_iter().map(|i| i.into()).collect();
94913        self
94914    }
94915}
94916
94917#[cfg(feature = "tensorboard-service")]
94918impl wkt::message::Message for ReadTensorboardBlobDataRequest {
94919    fn typename() -> &'static str {
94920        "type.googleapis.com/google.cloud.aiplatform.v1.ReadTensorboardBlobDataRequest"
94921    }
94922}
94923
94924/// Response message for
94925/// [TensorboardService.ReadTensorboardBlobData][google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardBlobData].
94926#[cfg(feature = "tensorboard-service")]
94927#[derive(Clone, Default, PartialEq)]
94928#[non_exhaustive]
94929pub struct ReadTensorboardBlobDataResponse {
94930    /// Blob messages containing blob bytes.
94931    pub blobs: std::vec::Vec<crate::model::TensorboardBlob>,
94932
94933    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
94934}
94935
94936#[cfg(feature = "tensorboard-service")]
94937impl ReadTensorboardBlobDataResponse {
94938    pub fn new() -> Self {
94939        std::default::Default::default()
94940    }
94941
94942    /// Sets the value of [blobs][crate::model::ReadTensorboardBlobDataResponse::blobs].
94943    pub fn set_blobs<T, V>(mut self, v: T) -> Self
94944    where
94945        T: std::iter::IntoIterator<Item = V>,
94946        V: std::convert::Into<crate::model::TensorboardBlob>,
94947    {
94948        use std::iter::Iterator;
94949        self.blobs = v.into_iter().map(|i| i.into()).collect();
94950        self
94951    }
94952}
94953
94954#[cfg(feature = "tensorboard-service")]
94955impl wkt::message::Message for ReadTensorboardBlobDataResponse {
94956    fn typename() -> &'static str {
94957        "type.googleapis.com/google.cloud.aiplatform.v1.ReadTensorboardBlobDataResponse"
94958    }
94959}
94960
94961/// Request message for
94962/// [TensorboardService.ListTensorboardRuns][google.cloud.aiplatform.v1.TensorboardService.ListTensorboardRuns].
94963///
94964/// [google.cloud.aiplatform.v1.TensorboardService.ListTensorboardRuns]: crate::client::TensorboardService::list_tensorboard_runs
94965#[cfg(feature = "tensorboard-service")]
94966#[derive(Clone, Default, PartialEq)]
94967#[non_exhaustive]
94968pub struct ListTensorboardRunsRequest {
94969    /// Required. The resource name of the TensorboardExperiment to list
94970    /// TensorboardRuns. Format:
94971    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`
94972    pub parent: std::string::String,
94973
94974    /// Lists the TensorboardRuns that match the filter expression.
94975    pub filter: std::string::String,
94976
94977    /// The maximum number of TensorboardRuns to return. The service may return
94978    /// fewer than this value. If unspecified, at most 50 TensorboardRuns are
94979    /// returned. The maximum value is 1000; values above 1000 are coerced to
94980    /// 1000.
94981    pub page_size: i32,
94982
94983    /// A page token, received from a previous
94984    /// [TensorboardService.ListTensorboardRuns][google.cloud.aiplatform.v1.TensorboardService.ListTensorboardRuns]
94985    /// call. Provide this to retrieve the subsequent page.
94986    ///
94987    /// When paginating, all other parameters provided to
94988    /// [TensorboardService.ListTensorboardRuns][google.cloud.aiplatform.v1.TensorboardService.ListTensorboardRuns]
94989    /// must match the call that provided the page token.
94990    ///
94991    /// [google.cloud.aiplatform.v1.TensorboardService.ListTensorboardRuns]: crate::client::TensorboardService::list_tensorboard_runs
94992    pub page_token: std::string::String,
94993
94994    /// Field to use to sort the list.
94995    pub order_by: std::string::String,
94996
94997    /// Mask specifying which fields to read.
94998    pub read_mask: std::option::Option<wkt::FieldMask>,
94999
95000    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95001}
95002
95003#[cfg(feature = "tensorboard-service")]
95004impl ListTensorboardRunsRequest {
95005    pub fn new() -> Self {
95006        std::default::Default::default()
95007    }
95008
95009    /// Sets the value of [parent][crate::model::ListTensorboardRunsRequest::parent].
95010    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95011        self.parent = v.into();
95012        self
95013    }
95014
95015    /// Sets the value of [filter][crate::model::ListTensorboardRunsRequest::filter].
95016    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95017        self.filter = v.into();
95018        self
95019    }
95020
95021    /// Sets the value of [page_size][crate::model::ListTensorboardRunsRequest::page_size].
95022    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
95023        self.page_size = v.into();
95024        self
95025    }
95026
95027    /// Sets the value of [page_token][crate::model::ListTensorboardRunsRequest::page_token].
95028    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95029        self.page_token = v.into();
95030        self
95031    }
95032
95033    /// Sets the value of [order_by][crate::model::ListTensorboardRunsRequest::order_by].
95034    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95035        self.order_by = v.into();
95036        self
95037    }
95038
95039    /// Sets the value of [read_mask][crate::model::ListTensorboardRunsRequest::read_mask].
95040    pub fn set_read_mask<T>(mut self, v: T) -> Self
95041    where
95042        T: std::convert::Into<wkt::FieldMask>,
95043    {
95044        self.read_mask = std::option::Option::Some(v.into());
95045        self
95046    }
95047
95048    /// Sets or clears the value of [read_mask][crate::model::ListTensorboardRunsRequest::read_mask].
95049    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
95050    where
95051        T: std::convert::Into<wkt::FieldMask>,
95052    {
95053        self.read_mask = v.map(|x| x.into());
95054        self
95055    }
95056}
95057
95058#[cfg(feature = "tensorboard-service")]
95059impl wkt::message::Message for ListTensorboardRunsRequest {
95060    fn typename() -> &'static str {
95061        "type.googleapis.com/google.cloud.aiplatform.v1.ListTensorboardRunsRequest"
95062    }
95063}
95064
95065/// Response message for
95066/// [TensorboardService.ListTensorboardRuns][google.cloud.aiplatform.v1.TensorboardService.ListTensorboardRuns].
95067///
95068/// [google.cloud.aiplatform.v1.TensorboardService.ListTensorboardRuns]: crate::client::TensorboardService::list_tensorboard_runs
95069#[cfg(feature = "tensorboard-service")]
95070#[derive(Clone, Default, PartialEq)]
95071#[non_exhaustive]
95072pub struct ListTensorboardRunsResponse {
95073    /// The TensorboardRuns mathching the request.
95074    pub tensorboard_runs: std::vec::Vec<crate::model::TensorboardRun>,
95075
95076    /// A token, which can be sent as
95077    /// [ListTensorboardRunsRequest.page_token][google.cloud.aiplatform.v1.ListTensorboardRunsRequest.page_token]
95078    /// to retrieve the next page. If this field is omitted, there are no
95079    /// subsequent pages.
95080    ///
95081    /// [google.cloud.aiplatform.v1.ListTensorboardRunsRequest.page_token]: crate::model::ListTensorboardRunsRequest::page_token
95082    pub next_page_token: std::string::String,
95083
95084    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95085}
95086
95087#[cfg(feature = "tensorboard-service")]
95088impl ListTensorboardRunsResponse {
95089    pub fn new() -> Self {
95090        std::default::Default::default()
95091    }
95092
95093    /// Sets the value of [tensorboard_runs][crate::model::ListTensorboardRunsResponse::tensorboard_runs].
95094    pub fn set_tensorboard_runs<T, V>(mut self, v: T) -> Self
95095    where
95096        T: std::iter::IntoIterator<Item = V>,
95097        V: std::convert::Into<crate::model::TensorboardRun>,
95098    {
95099        use std::iter::Iterator;
95100        self.tensorboard_runs = v.into_iter().map(|i| i.into()).collect();
95101        self
95102    }
95103
95104    /// Sets the value of [next_page_token][crate::model::ListTensorboardRunsResponse::next_page_token].
95105    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95106        self.next_page_token = v.into();
95107        self
95108    }
95109}
95110
95111#[cfg(feature = "tensorboard-service")]
95112impl wkt::message::Message for ListTensorboardRunsResponse {
95113    fn typename() -> &'static str {
95114        "type.googleapis.com/google.cloud.aiplatform.v1.ListTensorboardRunsResponse"
95115    }
95116}
95117
95118#[cfg(feature = "tensorboard-service")]
95119#[doc(hidden)]
95120impl gax::paginator::internal::PageableResponse for ListTensorboardRunsResponse {
95121    type PageItem = crate::model::TensorboardRun;
95122
95123    fn items(self) -> std::vec::Vec<Self::PageItem> {
95124        self.tensorboard_runs
95125    }
95126
95127    fn next_page_token(&self) -> std::string::String {
95128        use std::clone::Clone;
95129        self.next_page_token.clone()
95130    }
95131}
95132
95133/// Request message for
95134/// [TensorboardService.UpdateTensorboardRun][google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboardRun].
95135///
95136/// [google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboardRun]: crate::client::TensorboardService::update_tensorboard_run
95137#[cfg(feature = "tensorboard-service")]
95138#[derive(Clone, Default, PartialEq)]
95139#[non_exhaustive]
95140pub struct UpdateTensorboardRunRequest {
95141    /// Required. Field mask is used to specify the fields to be overwritten in the
95142    /// TensorboardRun resource by the update.
95143    /// The fields specified in the update_mask are relative to the resource, not
95144    /// the full request. A field is overwritten if it's in the mask. If the
95145    /// user does not provide a mask then all fields are overwritten if new
95146    /// values are specified.
95147    pub update_mask: std::option::Option<wkt::FieldMask>,
95148
95149    /// Required. The TensorboardRun's `name` field is used to identify the
95150    /// TensorboardRun to be updated. Format:
95151    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`
95152    pub tensorboard_run: std::option::Option<crate::model::TensorboardRun>,
95153
95154    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95155}
95156
95157#[cfg(feature = "tensorboard-service")]
95158impl UpdateTensorboardRunRequest {
95159    pub fn new() -> Self {
95160        std::default::Default::default()
95161    }
95162
95163    /// Sets the value of [update_mask][crate::model::UpdateTensorboardRunRequest::update_mask].
95164    pub fn set_update_mask<T>(mut self, v: T) -> Self
95165    where
95166        T: std::convert::Into<wkt::FieldMask>,
95167    {
95168        self.update_mask = std::option::Option::Some(v.into());
95169        self
95170    }
95171
95172    /// Sets or clears the value of [update_mask][crate::model::UpdateTensorboardRunRequest::update_mask].
95173    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
95174    where
95175        T: std::convert::Into<wkt::FieldMask>,
95176    {
95177        self.update_mask = v.map(|x| x.into());
95178        self
95179    }
95180
95181    /// Sets the value of [tensorboard_run][crate::model::UpdateTensorboardRunRequest::tensorboard_run].
95182    pub fn set_tensorboard_run<T>(mut self, v: T) -> Self
95183    where
95184        T: std::convert::Into<crate::model::TensorboardRun>,
95185    {
95186        self.tensorboard_run = std::option::Option::Some(v.into());
95187        self
95188    }
95189
95190    /// Sets or clears the value of [tensorboard_run][crate::model::UpdateTensorboardRunRequest::tensorboard_run].
95191    pub fn set_or_clear_tensorboard_run<T>(mut self, v: std::option::Option<T>) -> Self
95192    where
95193        T: std::convert::Into<crate::model::TensorboardRun>,
95194    {
95195        self.tensorboard_run = v.map(|x| x.into());
95196        self
95197    }
95198}
95199
95200#[cfg(feature = "tensorboard-service")]
95201impl wkt::message::Message for UpdateTensorboardRunRequest {
95202    fn typename() -> &'static str {
95203        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateTensorboardRunRequest"
95204    }
95205}
95206
95207/// Request message for
95208/// [TensorboardService.DeleteTensorboardRun][google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboardRun].
95209///
95210/// [google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboardRun]: crate::client::TensorboardService::delete_tensorboard_run
95211#[cfg(feature = "tensorboard-service")]
95212#[derive(Clone, Default, PartialEq)]
95213#[non_exhaustive]
95214pub struct DeleteTensorboardRunRequest {
95215    /// Required. The name of the TensorboardRun to be deleted.
95216    /// Format:
95217    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`
95218    pub name: std::string::String,
95219
95220    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95221}
95222
95223#[cfg(feature = "tensorboard-service")]
95224impl DeleteTensorboardRunRequest {
95225    pub fn new() -> Self {
95226        std::default::Default::default()
95227    }
95228
95229    /// Sets the value of [name][crate::model::DeleteTensorboardRunRequest::name].
95230    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95231        self.name = v.into();
95232        self
95233    }
95234}
95235
95236#[cfg(feature = "tensorboard-service")]
95237impl wkt::message::Message for DeleteTensorboardRunRequest {
95238    fn typename() -> &'static str {
95239        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteTensorboardRunRequest"
95240    }
95241}
95242
95243/// Request message for
95244/// [TensorboardService.BatchCreateTensorboardTimeSeries][google.cloud.aiplatform.v1.TensorboardService.BatchCreateTensorboardTimeSeries].
95245///
95246/// [google.cloud.aiplatform.v1.TensorboardService.BatchCreateTensorboardTimeSeries]: crate::client::TensorboardService::batch_create_tensorboard_time_series
95247#[cfg(feature = "tensorboard-service")]
95248#[derive(Clone, Default, PartialEq)]
95249#[non_exhaustive]
95250pub struct BatchCreateTensorboardTimeSeriesRequest {
95251    /// Required. The resource name of the TensorboardExperiment to create the
95252    /// TensorboardTimeSeries in.
95253    /// Format:
95254    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`
95255    /// The TensorboardRuns referenced by the parent fields in the
95256    /// CreateTensorboardTimeSeriesRequest messages must be sub resources of this
95257    /// TensorboardExperiment.
95258    pub parent: std::string::String,
95259
95260    /// Required. The request message specifying the TensorboardTimeSeries to
95261    /// create. A maximum of 1000 TensorboardTimeSeries can be created in a batch.
95262    pub requests: std::vec::Vec<crate::model::CreateTensorboardTimeSeriesRequest>,
95263
95264    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95265}
95266
95267#[cfg(feature = "tensorboard-service")]
95268impl BatchCreateTensorboardTimeSeriesRequest {
95269    pub fn new() -> Self {
95270        std::default::Default::default()
95271    }
95272
95273    /// Sets the value of [parent][crate::model::BatchCreateTensorboardTimeSeriesRequest::parent].
95274    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95275        self.parent = v.into();
95276        self
95277    }
95278
95279    /// Sets the value of [requests][crate::model::BatchCreateTensorboardTimeSeriesRequest::requests].
95280    pub fn set_requests<T, V>(mut self, v: T) -> Self
95281    where
95282        T: std::iter::IntoIterator<Item = V>,
95283        V: std::convert::Into<crate::model::CreateTensorboardTimeSeriesRequest>,
95284    {
95285        use std::iter::Iterator;
95286        self.requests = v.into_iter().map(|i| i.into()).collect();
95287        self
95288    }
95289}
95290
95291#[cfg(feature = "tensorboard-service")]
95292impl wkt::message::Message for BatchCreateTensorboardTimeSeriesRequest {
95293    fn typename() -> &'static str {
95294        "type.googleapis.com/google.cloud.aiplatform.v1.BatchCreateTensorboardTimeSeriesRequest"
95295    }
95296}
95297
95298/// Response message for
95299/// [TensorboardService.BatchCreateTensorboardTimeSeries][google.cloud.aiplatform.v1.TensorboardService.BatchCreateTensorboardTimeSeries].
95300///
95301/// [google.cloud.aiplatform.v1.TensorboardService.BatchCreateTensorboardTimeSeries]: crate::client::TensorboardService::batch_create_tensorboard_time_series
95302#[cfg(feature = "tensorboard-service")]
95303#[derive(Clone, Default, PartialEq)]
95304#[non_exhaustive]
95305pub struct BatchCreateTensorboardTimeSeriesResponse {
95306    /// The created TensorboardTimeSeries.
95307    pub tensorboard_time_series: std::vec::Vec<crate::model::TensorboardTimeSeries>,
95308
95309    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95310}
95311
95312#[cfg(feature = "tensorboard-service")]
95313impl BatchCreateTensorboardTimeSeriesResponse {
95314    pub fn new() -> Self {
95315        std::default::Default::default()
95316    }
95317
95318    /// Sets the value of [tensorboard_time_series][crate::model::BatchCreateTensorboardTimeSeriesResponse::tensorboard_time_series].
95319    pub fn set_tensorboard_time_series<T, V>(mut self, v: T) -> Self
95320    where
95321        T: std::iter::IntoIterator<Item = V>,
95322        V: std::convert::Into<crate::model::TensorboardTimeSeries>,
95323    {
95324        use std::iter::Iterator;
95325        self.tensorboard_time_series = v.into_iter().map(|i| i.into()).collect();
95326        self
95327    }
95328}
95329
95330#[cfg(feature = "tensorboard-service")]
95331impl wkt::message::Message for BatchCreateTensorboardTimeSeriesResponse {
95332    fn typename() -> &'static str {
95333        "type.googleapis.com/google.cloud.aiplatform.v1.BatchCreateTensorboardTimeSeriesResponse"
95334    }
95335}
95336
95337/// Request message for
95338/// [TensorboardService.CreateTensorboardTimeSeries][google.cloud.aiplatform.v1.TensorboardService.CreateTensorboardTimeSeries].
95339///
95340/// [google.cloud.aiplatform.v1.TensorboardService.CreateTensorboardTimeSeries]: crate::client::TensorboardService::create_tensorboard_time_series
95341#[cfg(feature = "tensorboard-service")]
95342#[derive(Clone, Default, PartialEq)]
95343#[non_exhaustive]
95344pub struct CreateTensorboardTimeSeriesRequest {
95345    /// Required. The resource name of the TensorboardRun to create the
95346    /// TensorboardTimeSeries in.
95347    /// Format:
95348    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`
95349    pub parent: std::string::String,
95350
95351    /// Optional. The user specified unique ID to use for the
95352    /// TensorboardTimeSeries, which becomes the final component of the
95353    /// TensorboardTimeSeries's resource name. This value should match
95354    /// "[a-z0-9][a-z0-9-]{0, 127}"
95355    pub tensorboard_time_series_id: std::string::String,
95356
95357    /// Required. The TensorboardTimeSeries to create.
95358    pub tensorboard_time_series: std::option::Option<crate::model::TensorboardTimeSeries>,
95359
95360    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95361}
95362
95363#[cfg(feature = "tensorboard-service")]
95364impl CreateTensorboardTimeSeriesRequest {
95365    pub fn new() -> Self {
95366        std::default::Default::default()
95367    }
95368
95369    /// Sets the value of [parent][crate::model::CreateTensorboardTimeSeriesRequest::parent].
95370    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95371        self.parent = v.into();
95372        self
95373    }
95374
95375    /// Sets the value of [tensorboard_time_series_id][crate::model::CreateTensorboardTimeSeriesRequest::tensorboard_time_series_id].
95376    pub fn set_tensorboard_time_series_id<T: std::convert::Into<std::string::String>>(
95377        mut self,
95378        v: T,
95379    ) -> Self {
95380        self.tensorboard_time_series_id = v.into();
95381        self
95382    }
95383
95384    /// Sets the value of [tensorboard_time_series][crate::model::CreateTensorboardTimeSeriesRequest::tensorboard_time_series].
95385    pub fn set_tensorboard_time_series<T>(mut self, v: T) -> Self
95386    where
95387        T: std::convert::Into<crate::model::TensorboardTimeSeries>,
95388    {
95389        self.tensorboard_time_series = std::option::Option::Some(v.into());
95390        self
95391    }
95392
95393    /// Sets or clears the value of [tensorboard_time_series][crate::model::CreateTensorboardTimeSeriesRequest::tensorboard_time_series].
95394    pub fn set_or_clear_tensorboard_time_series<T>(mut self, v: std::option::Option<T>) -> Self
95395    where
95396        T: std::convert::Into<crate::model::TensorboardTimeSeries>,
95397    {
95398        self.tensorboard_time_series = v.map(|x| x.into());
95399        self
95400    }
95401}
95402
95403#[cfg(feature = "tensorboard-service")]
95404impl wkt::message::Message for CreateTensorboardTimeSeriesRequest {
95405    fn typename() -> &'static str {
95406        "type.googleapis.com/google.cloud.aiplatform.v1.CreateTensorboardTimeSeriesRequest"
95407    }
95408}
95409
95410/// Request message for
95411/// [TensorboardService.GetTensorboardTimeSeries][google.cloud.aiplatform.v1.TensorboardService.GetTensorboardTimeSeries].
95412///
95413/// [google.cloud.aiplatform.v1.TensorboardService.GetTensorboardTimeSeries]: crate::client::TensorboardService::get_tensorboard_time_series
95414#[cfg(feature = "tensorboard-service")]
95415#[derive(Clone, Default, PartialEq)]
95416#[non_exhaustive]
95417pub struct GetTensorboardTimeSeriesRequest {
95418    /// Required. The name of the TensorboardTimeSeries resource.
95419    /// Format:
95420    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`
95421    pub name: std::string::String,
95422
95423    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95424}
95425
95426#[cfg(feature = "tensorboard-service")]
95427impl GetTensorboardTimeSeriesRequest {
95428    pub fn new() -> Self {
95429        std::default::Default::default()
95430    }
95431
95432    /// Sets the value of [name][crate::model::GetTensorboardTimeSeriesRequest::name].
95433    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95434        self.name = v.into();
95435        self
95436    }
95437}
95438
95439#[cfg(feature = "tensorboard-service")]
95440impl wkt::message::Message for GetTensorboardTimeSeriesRequest {
95441    fn typename() -> &'static str {
95442        "type.googleapis.com/google.cloud.aiplatform.v1.GetTensorboardTimeSeriesRequest"
95443    }
95444}
95445
95446/// Request message for
95447/// [TensorboardService.ListTensorboardTimeSeries][google.cloud.aiplatform.v1.TensorboardService.ListTensorboardTimeSeries].
95448///
95449/// [google.cloud.aiplatform.v1.TensorboardService.ListTensorboardTimeSeries]: crate::client::TensorboardService::list_tensorboard_time_series
95450#[cfg(feature = "tensorboard-service")]
95451#[derive(Clone, Default, PartialEq)]
95452#[non_exhaustive]
95453pub struct ListTensorboardTimeSeriesRequest {
95454    /// Required. The resource name of the TensorboardRun to list
95455    /// TensorboardTimeSeries. Format:
95456    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`
95457    pub parent: std::string::String,
95458
95459    /// Lists the TensorboardTimeSeries that match the filter expression.
95460    pub filter: std::string::String,
95461
95462    /// The maximum number of TensorboardTimeSeries to return. The service may
95463    /// return fewer than this value. If unspecified, at most 50
95464    /// TensorboardTimeSeries are returned. The maximum value is 1000; values
95465    /// above 1000 are coerced to 1000.
95466    pub page_size: i32,
95467
95468    /// A page token, received from a previous
95469    /// [TensorboardService.ListTensorboardTimeSeries][google.cloud.aiplatform.v1.TensorboardService.ListTensorboardTimeSeries]
95470    /// call. Provide this to retrieve the subsequent page.
95471    ///
95472    /// When paginating, all other parameters provided to
95473    /// [TensorboardService.ListTensorboardTimeSeries][google.cloud.aiplatform.v1.TensorboardService.ListTensorboardTimeSeries]
95474    /// must match the call that provided the page token.
95475    ///
95476    /// [google.cloud.aiplatform.v1.TensorboardService.ListTensorboardTimeSeries]: crate::client::TensorboardService::list_tensorboard_time_series
95477    pub page_token: std::string::String,
95478
95479    /// Field to use to sort the list.
95480    pub order_by: std::string::String,
95481
95482    /// Mask specifying which fields to read.
95483    pub read_mask: std::option::Option<wkt::FieldMask>,
95484
95485    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95486}
95487
95488#[cfg(feature = "tensorboard-service")]
95489impl ListTensorboardTimeSeriesRequest {
95490    pub fn new() -> Self {
95491        std::default::Default::default()
95492    }
95493
95494    /// Sets the value of [parent][crate::model::ListTensorboardTimeSeriesRequest::parent].
95495    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95496        self.parent = v.into();
95497        self
95498    }
95499
95500    /// Sets the value of [filter][crate::model::ListTensorboardTimeSeriesRequest::filter].
95501    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95502        self.filter = v.into();
95503        self
95504    }
95505
95506    /// Sets the value of [page_size][crate::model::ListTensorboardTimeSeriesRequest::page_size].
95507    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
95508        self.page_size = v.into();
95509        self
95510    }
95511
95512    /// Sets the value of [page_token][crate::model::ListTensorboardTimeSeriesRequest::page_token].
95513    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95514        self.page_token = v.into();
95515        self
95516    }
95517
95518    /// Sets the value of [order_by][crate::model::ListTensorboardTimeSeriesRequest::order_by].
95519    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95520        self.order_by = v.into();
95521        self
95522    }
95523
95524    /// Sets the value of [read_mask][crate::model::ListTensorboardTimeSeriesRequest::read_mask].
95525    pub fn set_read_mask<T>(mut self, v: T) -> Self
95526    where
95527        T: std::convert::Into<wkt::FieldMask>,
95528    {
95529        self.read_mask = std::option::Option::Some(v.into());
95530        self
95531    }
95532
95533    /// Sets or clears the value of [read_mask][crate::model::ListTensorboardTimeSeriesRequest::read_mask].
95534    pub fn set_or_clear_read_mask<T>(mut self, v: std::option::Option<T>) -> Self
95535    where
95536        T: std::convert::Into<wkt::FieldMask>,
95537    {
95538        self.read_mask = v.map(|x| x.into());
95539        self
95540    }
95541}
95542
95543#[cfg(feature = "tensorboard-service")]
95544impl wkt::message::Message for ListTensorboardTimeSeriesRequest {
95545    fn typename() -> &'static str {
95546        "type.googleapis.com/google.cloud.aiplatform.v1.ListTensorboardTimeSeriesRequest"
95547    }
95548}
95549
95550/// Response message for
95551/// [TensorboardService.ListTensorboardTimeSeries][google.cloud.aiplatform.v1.TensorboardService.ListTensorboardTimeSeries].
95552///
95553/// [google.cloud.aiplatform.v1.TensorboardService.ListTensorboardTimeSeries]: crate::client::TensorboardService::list_tensorboard_time_series
95554#[cfg(feature = "tensorboard-service")]
95555#[derive(Clone, Default, PartialEq)]
95556#[non_exhaustive]
95557pub struct ListTensorboardTimeSeriesResponse {
95558    /// The TensorboardTimeSeries mathching the request.
95559    pub tensorboard_time_series: std::vec::Vec<crate::model::TensorboardTimeSeries>,
95560
95561    /// A token, which can be sent as
95562    /// [ListTensorboardTimeSeriesRequest.page_token][google.cloud.aiplatform.v1.ListTensorboardTimeSeriesRequest.page_token]
95563    /// to retrieve the next page. If this field is omitted, there are no
95564    /// subsequent pages.
95565    ///
95566    /// [google.cloud.aiplatform.v1.ListTensorboardTimeSeriesRequest.page_token]: crate::model::ListTensorboardTimeSeriesRequest::page_token
95567    pub next_page_token: std::string::String,
95568
95569    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95570}
95571
95572#[cfg(feature = "tensorboard-service")]
95573impl ListTensorboardTimeSeriesResponse {
95574    pub fn new() -> Self {
95575        std::default::Default::default()
95576    }
95577
95578    /// Sets the value of [tensorboard_time_series][crate::model::ListTensorboardTimeSeriesResponse::tensorboard_time_series].
95579    pub fn set_tensorboard_time_series<T, V>(mut self, v: T) -> Self
95580    where
95581        T: std::iter::IntoIterator<Item = V>,
95582        V: std::convert::Into<crate::model::TensorboardTimeSeries>,
95583    {
95584        use std::iter::Iterator;
95585        self.tensorboard_time_series = v.into_iter().map(|i| i.into()).collect();
95586        self
95587    }
95588
95589    /// Sets the value of [next_page_token][crate::model::ListTensorboardTimeSeriesResponse::next_page_token].
95590    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95591        self.next_page_token = v.into();
95592        self
95593    }
95594}
95595
95596#[cfg(feature = "tensorboard-service")]
95597impl wkt::message::Message for ListTensorboardTimeSeriesResponse {
95598    fn typename() -> &'static str {
95599        "type.googleapis.com/google.cloud.aiplatform.v1.ListTensorboardTimeSeriesResponse"
95600    }
95601}
95602
95603#[cfg(feature = "tensorboard-service")]
95604#[doc(hidden)]
95605impl gax::paginator::internal::PageableResponse for ListTensorboardTimeSeriesResponse {
95606    type PageItem = crate::model::TensorboardTimeSeries;
95607
95608    fn items(self) -> std::vec::Vec<Self::PageItem> {
95609        self.tensorboard_time_series
95610    }
95611
95612    fn next_page_token(&self) -> std::string::String {
95613        use std::clone::Clone;
95614        self.next_page_token.clone()
95615    }
95616}
95617
95618/// Request message for
95619/// [TensorboardService.UpdateTensorboardTimeSeries][google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboardTimeSeries].
95620///
95621/// [google.cloud.aiplatform.v1.TensorboardService.UpdateTensorboardTimeSeries]: crate::client::TensorboardService::update_tensorboard_time_series
95622#[cfg(feature = "tensorboard-service")]
95623#[derive(Clone, Default, PartialEq)]
95624#[non_exhaustive]
95625pub struct UpdateTensorboardTimeSeriesRequest {
95626    /// Required. Field mask is used to specify the fields to be overwritten in the
95627    /// TensorboardTimeSeries resource by the update.
95628    /// The fields specified in the update_mask are relative to the resource, not
95629    /// the full request. A field is overwritten if it's in the mask. If the
95630    /// user does not provide a mask then all fields are overwritten if new
95631    /// values are specified.
95632    pub update_mask: std::option::Option<wkt::FieldMask>,
95633
95634    /// Required. The TensorboardTimeSeries' `name` field is used to identify the
95635    /// TensorboardTimeSeries to be updated.
95636    /// Format:
95637    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`
95638    pub tensorboard_time_series: std::option::Option<crate::model::TensorboardTimeSeries>,
95639
95640    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95641}
95642
95643#[cfg(feature = "tensorboard-service")]
95644impl UpdateTensorboardTimeSeriesRequest {
95645    pub fn new() -> Self {
95646        std::default::Default::default()
95647    }
95648
95649    /// Sets the value of [update_mask][crate::model::UpdateTensorboardTimeSeriesRequest::update_mask].
95650    pub fn set_update_mask<T>(mut self, v: T) -> Self
95651    where
95652        T: std::convert::Into<wkt::FieldMask>,
95653    {
95654        self.update_mask = std::option::Option::Some(v.into());
95655        self
95656    }
95657
95658    /// Sets or clears the value of [update_mask][crate::model::UpdateTensorboardTimeSeriesRequest::update_mask].
95659    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
95660    where
95661        T: std::convert::Into<wkt::FieldMask>,
95662    {
95663        self.update_mask = v.map(|x| x.into());
95664        self
95665    }
95666
95667    /// Sets the value of [tensorboard_time_series][crate::model::UpdateTensorboardTimeSeriesRequest::tensorboard_time_series].
95668    pub fn set_tensorboard_time_series<T>(mut self, v: T) -> Self
95669    where
95670        T: std::convert::Into<crate::model::TensorboardTimeSeries>,
95671    {
95672        self.tensorboard_time_series = std::option::Option::Some(v.into());
95673        self
95674    }
95675
95676    /// Sets or clears the value of [tensorboard_time_series][crate::model::UpdateTensorboardTimeSeriesRequest::tensorboard_time_series].
95677    pub fn set_or_clear_tensorboard_time_series<T>(mut self, v: std::option::Option<T>) -> Self
95678    where
95679        T: std::convert::Into<crate::model::TensorboardTimeSeries>,
95680    {
95681        self.tensorboard_time_series = v.map(|x| x.into());
95682        self
95683    }
95684}
95685
95686#[cfg(feature = "tensorboard-service")]
95687impl wkt::message::Message for UpdateTensorboardTimeSeriesRequest {
95688    fn typename() -> &'static str {
95689        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateTensorboardTimeSeriesRequest"
95690    }
95691}
95692
95693/// Request message for
95694/// [TensorboardService.DeleteTensorboardTimeSeries][google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboardTimeSeries].
95695///
95696/// [google.cloud.aiplatform.v1.TensorboardService.DeleteTensorboardTimeSeries]: crate::client::TensorboardService::delete_tensorboard_time_series
95697#[cfg(feature = "tensorboard-service")]
95698#[derive(Clone, Default, PartialEq)]
95699#[non_exhaustive]
95700pub struct DeleteTensorboardTimeSeriesRequest {
95701    /// Required. The name of the TensorboardTimeSeries to be deleted.
95702    /// Format:
95703    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`
95704    pub name: std::string::String,
95705
95706    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95707}
95708
95709#[cfg(feature = "tensorboard-service")]
95710impl DeleteTensorboardTimeSeriesRequest {
95711    pub fn new() -> Self {
95712        std::default::Default::default()
95713    }
95714
95715    /// Sets the value of [name][crate::model::DeleteTensorboardTimeSeriesRequest::name].
95716    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95717        self.name = v.into();
95718        self
95719    }
95720}
95721
95722#[cfg(feature = "tensorboard-service")]
95723impl wkt::message::Message for DeleteTensorboardTimeSeriesRequest {
95724    fn typename() -> &'static str {
95725        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteTensorboardTimeSeriesRequest"
95726    }
95727}
95728
95729/// Request message for
95730/// [TensorboardService.BatchReadTensorboardTimeSeriesData][google.cloud.aiplatform.v1.TensorboardService.BatchReadTensorboardTimeSeriesData].
95731///
95732/// [google.cloud.aiplatform.v1.TensorboardService.BatchReadTensorboardTimeSeriesData]: crate::client::TensorboardService::batch_read_tensorboard_time_series_data
95733#[cfg(feature = "tensorboard-service")]
95734#[derive(Clone, Default, PartialEq)]
95735#[non_exhaustive]
95736pub struct BatchReadTensorboardTimeSeriesDataRequest {
95737    /// Required. The resource name of the Tensorboard containing
95738    /// TensorboardTimeSeries to read data from. Format:
95739    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}`.
95740    /// The TensorboardTimeSeries referenced by
95741    /// [time_series][google.cloud.aiplatform.v1.BatchReadTensorboardTimeSeriesDataRequest.time_series]
95742    /// must be sub resources of this Tensorboard.
95743    ///
95744    /// [google.cloud.aiplatform.v1.BatchReadTensorboardTimeSeriesDataRequest.time_series]: crate::model::BatchReadTensorboardTimeSeriesDataRequest::time_series
95745    pub tensorboard: std::string::String,
95746
95747    /// Required. The resource names of the TensorboardTimeSeries to read data
95748    /// from. Format:
95749    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`
95750    pub time_series: std::vec::Vec<std::string::String>,
95751
95752    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95753}
95754
95755#[cfg(feature = "tensorboard-service")]
95756impl BatchReadTensorboardTimeSeriesDataRequest {
95757    pub fn new() -> Self {
95758        std::default::Default::default()
95759    }
95760
95761    /// Sets the value of [tensorboard][crate::model::BatchReadTensorboardTimeSeriesDataRequest::tensorboard].
95762    pub fn set_tensorboard<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95763        self.tensorboard = v.into();
95764        self
95765    }
95766
95767    /// Sets the value of [time_series][crate::model::BatchReadTensorboardTimeSeriesDataRequest::time_series].
95768    pub fn set_time_series<T, V>(mut self, v: T) -> Self
95769    where
95770        T: std::iter::IntoIterator<Item = V>,
95771        V: std::convert::Into<std::string::String>,
95772    {
95773        use std::iter::Iterator;
95774        self.time_series = v.into_iter().map(|i| i.into()).collect();
95775        self
95776    }
95777}
95778
95779#[cfg(feature = "tensorboard-service")]
95780impl wkt::message::Message for BatchReadTensorboardTimeSeriesDataRequest {
95781    fn typename() -> &'static str {
95782        "type.googleapis.com/google.cloud.aiplatform.v1.BatchReadTensorboardTimeSeriesDataRequest"
95783    }
95784}
95785
95786/// Response message for
95787/// [TensorboardService.BatchReadTensorboardTimeSeriesData][google.cloud.aiplatform.v1.TensorboardService.BatchReadTensorboardTimeSeriesData].
95788///
95789/// [google.cloud.aiplatform.v1.TensorboardService.BatchReadTensorboardTimeSeriesData]: crate::client::TensorboardService::batch_read_tensorboard_time_series_data
95790#[cfg(feature = "tensorboard-service")]
95791#[derive(Clone, Default, PartialEq)]
95792#[non_exhaustive]
95793pub struct BatchReadTensorboardTimeSeriesDataResponse {
95794    /// The returned time series data.
95795    pub time_series_data: std::vec::Vec<crate::model::TimeSeriesData>,
95796
95797    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95798}
95799
95800#[cfg(feature = "tensorboard-service")]
95801impl BatchReadTensorboardTimeSeriesDataResponse {
95802    pub fn new() -> Self {
95803        std::default::Default::default()
95804    }
95805
95806    /// Sets the value of [time_series_data][crate::model::BatchReadTensorboardTimeSeriesDataResponse::time_series_data].
95807    pub fn set_time_series_data<T, V>(mut self, v: T) -> Self
95808    where
95809        T: std::iter::IntoIterator<Item = V>,
95810        V: std::convert::Into<crate::model::TimeSeriesData>,
95811    {
95812        use std::iter::Iterator;
95813        self.time_series_data = v.into_iter().map(|i| i.into()).collect();
95814        self
95815    }
95816}
95817
95818#[cfg(feature = "tensorboard-service")]
95819impl wkt::message::Message for BatchReadTensorboardTimeSeriesDataResponse {
95820    fn typename() -> &'static str {
95821        "type.googleapis.com/google.cloud.aiplatform.v1.BatchReadTensorboardTimeSeriesDataResponse"
95822    }
95823}
95824
95825/// Request message for
95826/// [TensorboardService.ReadTensorboardTimeSeriesData][google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardTimeSeriesData].
95827///
95828/// [google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardTimeSeriesData]: crate::client::TensorboardService::read_tensorboard_time_series_data
95829#[cfg(feature = "tensorboard-service")]
95830#[derive(Clone, Default, PartialEq)]
95831#[non_exhaustive]
95832pub struct ReadTensorboardTimeSeriesDataRequest {
95833    /// Required. The resource name of the TensorboardTimeSeries to read data from.
95834    /// Format:
95835    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`
95836    pub tensorboard_time_series: std::string::String,
95837
95838    /// The maximum number of TensorboardTimeSeries' data to return.
95839    ///
95840    /// This value should be a positive integer.
95841    /// This value can be set to -1 to return all data.
95842    pub max_data_points: i32,
95843
95844    /// Reads the TensorboardTimeSeries' data that match the filter expression.
95845    pub filter: std::string::String,
95846
95847    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95848}
95849
95850#[cfg(feature = "tensorboard-service")]
95851impl ReadTensorboardTimeSeriesDataRequest {
95852    pub fn new() -> Self {
95853        std::default::Default::default()
95854    }
95855
95856    /// Sets the value of [tensorboard_time_series][crate::model::ReadTensorboardTimeSeriesDataRequest::tensorboard_time_series].
95857    pub fn set_tensorboard_time_series<T: std::convert::Into<std::string::String>>(
95858        mut self,
95859        v: T,
95860    ) -> Self {
95861        self.tensorboard_time_series = v.into();
95862        self
95863    }
95864
95865    /// Sets the value of [max_data_points][crate::model::ReadTensorboardTimeSeriesDataRequest::max_data_points].
95866    pub fn set_max_data_points<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
95867        self.max_data_points = v.into();
95868        self
95869    }
95870
95871    /// Sets the value of [filter][crate::model::ReadTensorboardTimeSeriesDataRequest::filter].
95872    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
95873        self.filter = v.into();
95874        self
95875    }
95876}
95877
95878#[cfg(feature = "tensorboard-service")]
95879impl wkt::message::Message for ReadTensorboardTimeSeriesDataRequest {
95880    fn typename() -> &'static str {
95881        "type.googleapis.com/google.cloud.aiplatform.v1.ReadTensorboardTimeSeriesDataRequest"
95882    }
95883}
95884
95885/// Response message for
95886/// [TensorboardService.ReadTensorboardTimeSeriesData][google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardTimeSeriesData].
95887///
95888/// [google.cloud.aiplatform.v1.TensorboardService.ReadTensorboardTimeSeriesData]: crate::client::TensorboardService::read_tensorboard_time_series_data
95889#[cfg(feature = "tensorboard-service")]
95890#[derive(Clone, Default, PartialEq)]
95891#[non_exhaustive]
95892pub struct ReadTensorboardTimeSeriesDataResponse {
95893    /// The returned time series data.
95894    pub time_series_data: std::option::Option<crate::model::TimeSeriesData>,
95895
95896    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95897}
95898
95899#[cfg(feature = "tensorboard-service")]
95900impl ReadTensorboardTimeSeriesDataResponse {
95901    pub fn new() -> Self {
95902        std::default::Default::default()
95903    }
95904
95905    /// Sets the value of [time_series_data][crate::model::ReadTensorboardTimeSeriesDataResponse::time_series_data].
95906    pub fn set_time_series_data<T>(mut self, v: T) -> Self
95907    where
95908        T: std::convert::Into<crate::model::TimeSeriesData>,
95909    {
95910        self.time_series_data = std::option::Option::Some(v.into());
95911        self
95912    }
95913
95914    /// Sets or clears the value of [time_series_data][crate::model::ReadTensorboardTimeSeriesDataResponse::time_series_data].
95915    pub fn set_or_clear_time_series_data<T>(mut self, v: std::option::Option<T>) -> Self
95916    where
95917        T: std::convert::Into<crate::model::TimeSeriesData>,
95918    {
95919        self.time_series_data = v.map(|x| x.into());
95920        self
95921    }
95922}
95923
95924#[cfg(feature = "tensorboard-service")]
95925impl wkt::message::Message for ReadTensorboardTimeSeriesDataResponse {
95926    fn typename() -> &'static str {
95927        "type.googleapis.com/google.cloud.aiplatform.v1.ReadTensorboardTimeSeriesDataResponse"
95928    }
95929}
95930
95931/// Request message for
95932/// [TensorboardService.WriteTensorboardExperimentData][google.cloud.aiplatform.v1.TensorboardService.WriteTensorboardExperimentData].
95933///
95934/// [google.cloud.aiplatform.v1.TensorboardService.WriteTensorboardExperimentData]: crate::client::TensorboardService::write_tensorboard_experiment_data
95935#[cfg(feature = "tensorboard-service")]
95936#[derive(Clone, Default, PartialEq)]
95937#[non_exhaustive]
95938pub struct WriteTensorboardExperimentDataRequest {
95939    /// Required. The resource name of the TensorboardExperiment to write data to.
95940    /// Format:
95941    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`
95942    pub tensorboard_experiment: std::string::String,
95943
95944    /// Required. Requests containing per-run TensorboardTimeSeries data to write.
95945    pub write_run_data_requests: std::vec::Vec<crate::model::WriteTensorboardRunDataRequest>,
95946
95947    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95948}
95949
95950#[cfg(feature = "tensorboard-service")]
95951impl WriteTensorboardExperimentDataRequest {
95952    pub fn new() -> Self {
95953        std::default::Default::default()
95954    }
95955
95956    /// Sets the value of [tensorboard_experiment][crate::model::WriteTensorboardExperimentDataRequest::tensorboard_experiment].
95957    pub fn set_tensorboard_experiment<T: std::convert::Into<std::string::String>>(
95958        mut self,
95959        v: T,
95960    ) -> Self {
95961        self.tensorboard_experiment = v.into();
95962        self
95963    }
95964
95965    /// Sets the value of [write_run_data_requests][crate::model::WriteTensorboardExperimentDataRequest::write_run_data_requests].
95966    pub fn set_write_run_data_requests<T, V>(mut self, v: T) -> Self
95967    where
95968        T: std::iter::IntoIterator<Item = V>,
95969        V: std::convert::Into<crate::model::WriteTensorboardRunDataRequest>,
95970    {
95971        use std::iter::Iterator;
95972        self.write_run_data_requests = v.into_iter().map(|i| i.into()).collect();
95973        self
95974    }
95975}
95976
95977#[cfg(feature = "tensorboard-service")]
95978impl wkt::message::Message for WriteTensorboardExperimentDataRequest {
95979    fn typename() -> &'static str {
95980        "type.googleapis.com/google.cloud.aiplatform.v1.WriteTensorboardExperimentDataRequest"
95981    }
95982}
95983
95984/// Response message for
95985/// [TensorboardService.WriteTensorboardExperimentData][google.cloud.aiplatform.v1.TensorboardService.WriteTensorboardExperimentData].
95986///
95987/// [google.cloud.aiplatform.v1.TensorboardService.WriteTensorboardExperimentData]: crate::client::TensorboardService::write_tensorboard_experiment_data
95988#[cfg(feature = "tensorboard-service")]
95989#[derive(Clone, Default, PartialEq)]
95990#[non_exhaustive]
95991pub struct WriteTensorboardExperimentDataResponse {
95992    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
95993}
95994
95995#[cfg(feature = "tensorboard-service")]
95996impl WriteTensorboardExperimentDataResponse {
95997    pub fn new() -> Self {
95998        std::default::Default::default()
95999    }
96000}
96001
96002#[cfg(feature = "tensorboard-service")]
96003impl wkt::message::Message for WriteTensorboardExperimentDataResponse {
96004    fn typename() -> &'static str {
96005        "type.googleapis.com/google.cloud.aiplatform.v1.WriteTensorboardExperimentDataResponse"
96006    }
96007}
96008
96009/// Request message for
96010/// [TensorboardService.WriteTensorboardRunData][google.cloud.aiplatform.v1.TensorboardService.WriteTensorboardRunData].
96011///
96012/// [google.cloud.aiplatform.v1.TensorboardService.WriteTensorboardRunData]: crate::client::TensorboardService::write_tensorboard_run_data
96013#[cfg(feature = "tensorboard-service")]
96014#[derive(Clone, Default, PartialEq)]
96015#[non_exhaustive]
96016pub struct WriteTensorboardRunDataRequest {
96017    /// Required. The resource name of the TensorboardRun to write data to.
96018    /// Format:
96019    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`
96020    pub tensorboard_run: std::string::String,
96021
96022    /// Required. The TensorboardTimeSeries data to write.
96023    /// Values with in a time series are indexed by their step value.
96024    /// Repeated writes to the same step will overwrite the existing value for that
96025    /// step.
96026    /// The upper limit of data points per write request is 5000.
96027    pub time_series_data: std::vec::Vec<crate::model::TimeSeriesData>,
96028
96029    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
96030}
96031
96032#[cfg(feature = "tensorboard-service")]
96033impl WriteTensorboardRunDataRequest {
96034    pub fn new() -> Self {
96035        std::default::Default::default()
96036    }
96037
96038    /// Sets the value of [tensorboard_run][crate::model::WriteTensorboardRunDataRequest::tensorboard_run].
96039    pub fn set_tensorboard_run<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
96040        self.tensorboard_run = v.into();
96041        self
96042    }
96043
96044    /// Sets the value of [time_series_data][crate::model::WriteTensorboardRunDataRequest::time_series_data].
96045    pub fn set_time_series_data<T, V>(mut self, v: T) -> Self
96046    where
96047        T: std::iter::IntoIterator<Item = V>,
96048        V: std::convert::Into<crate::model::TimeSeriesData>,
96049    {
96050        use std::iter::Iterator;
96051        self.time_series_data = v.into_iter().map(|i| i.into()).collect();
96052        self
96053    }
96054}
96055
96056#[cfg(feature = "tensorboard-service")]
96057impl wkt::message::Message for WriteTensorboardRunDataRequest {
96058    fn typename() -> &'static str {
96059        "type.googleapis.com/google.cloud.aiplatform.v1.WriteTensorboardRunDataRequest"
96060    }
96061}
96062
96063/// Response message for
96064/// [TensorboardService.WriteTensorboardRunData][google.cloud.aiplatform.v1.TensorboardService.WriteTensorboardRunData].
96065///
96066/// [google.cloud.aiplatform.v1.TensorboardService.WriteTensorboardRunData]: crate::client::TensorboardService::write_tensorboard_run_data
96067#[cfg(feature = "tensorboard-service")]
96068#[derive(Clone, Default, PartialEq)]
96069#[non_exhaustive]
96070pub struct WriteTensorboardRunDataResponse {
96071    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
96072}
96073
96074#[cfg(feature = "tensorboard-service")]
96075impl WriteTensorboardRunDataResponse {
96076    pub fn new() -> Self {
96077        std::default::Default::default()
96078    }
96079}
96080
96081#[cfg(feature = "tensorboard-service")]
96082impl wkt::message::Message for WriteTensorboardRunDataResponse {
96083    fn typename() -> &'static str {
96084        "type.googleapis.com/google.cloud.aiplatform.v1.WriteTensorboardRunDataResponse"
96085    }
96086}
96087
96088/// Request message for
96089/// [TensorboardService.ExportTensorboardTimeSeriesData][google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData].
96090///
96091/// [google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData]: crate::client::TensorboardService::export_tensorboard_time_series_data
96092#[cfg(feature = "tensorboard-service")]
96093#[derive(Clone, Default, PartialEq)]
96094#[non_exhaustive]
96095pub struct ExportTensorboardTimeSeriesDataRequest {
96096    /// Required. The resource name of the TensorboardTimeSeries to export data
96097    /// from. Format:
96098    /// `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`
96099    pub tensorboard_time_series: std::string::String,
96100
96101    /// Exports the TensorboardTimeSeries' data that match the filter expression.
96102    pub filter: std::string::String,
96103
96104    /// The maximum number of data points to return per page.
96105    /// The default page_size is 1000. Values must be between 1 and 10000.
96106    /// Values above 10000 are coerced to 10000.
96107    pub page_size: i32,
96108
96109    /// A page token, received from a previous
96110    /// [ExportTensorboardTimeSeriesData][google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData]
96111    /// call. Provide this to retrieve the subsequent page.
96112    ///
96113    /// When paginating, all other parameters provided to
96114    /// [ExportTensorboardTimeSeriesData][google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData]
96115    /// must match the call that provided the page token.
96116    ///
96117    /// [google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData]: crate::client::TensorboardService::export_tensorboard_time_series_data
96118    pub page_token: std::string::String,
96119
96120    /// Field to use to sort the TensorboardTimeSeries' data.
96121    /// By default, TensorboardTimeSeries' data is returned in a pseudo random
96122    /// order.
96123    pub order_by: std::string::String,
96124
96125    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
96126}
96127
96128#[cfg(feature = "tensorboard-service")]
96129impl ExportTensorboardTimeSeriesDataRequest {
96130    pub fn new() -> Self {
96131        std::default::Default::default()
96132    }
96133
96134    /// Sets the value of [tensorboard_time_series][crate::model::ExportTensorboardTimeSeriesDataRequest::tensorboard_time_series].
96135    pub fn set_tensorboard_time_series<T: std::convert::Into<std::string::String>>(
96136        mut self,
96137        v: T,
96138    ) -> Self {
96139        self.tensorboard_time_series = v.into();
96140        self
96141    }
96142
96143    /// Sets the value of [filter][crate::model::ExportTensorboardTimeSeriesDataRequest::filter].
96144    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
96145        self.filter = v.into();
96146        self
96147    }
96148
96149    /// Sets the value of [page_size][crate::model::ExportTensorboardTimeSeriesDataRequest::page_size].
96150    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
96151        self.page_size = v.into();
96152        self
96153    }
96154
96155    /// Sets the value of [page_token][crate::model::ExportTensorboardTimeSeriesDataRequest::page_token].
96156    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
96157        self.page_token = v.into();
96158        self
96159    }
96160
96161    /// Sets the value of [order_by][crate::model::ExportTensorboardTimeSeriesDataRequest::order_by].
96162    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
96163        self.order_by = v.into();
96164        self
96165    }
96166}
96167
96168#[cfg(feature = "tensorboard-service")]
96169impl wkt::message::Message for ExportTensorboardTimeSeriesDataRequest {
96170    fn typename() -> &'static str {
96171        "type.googleapis.com/google.cloud.aiplatform.v1.ExportTensorboardTimeSeriesDataRequest"
96172    }
96173}
96174
96175/// Response message for
96176/// [TensorboardService.ExportTensorboardTimeSeriesData][google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData].
96177///
96178/// [google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData]: crate::client::TensorboardService::export_tensorboard_time_series_data
96179#[cfg(feature = "tensorboard-service")]
96180#[derive(Clone, Default, PartialEq)]
96181#[non_exhaustive]
96182pub struct ExportTensorboardTimeSeriesDataResponse {
96183    /// The returned time series data points.
96184    pub time_series_data_points: std::vec::Vec<crate::model::TimeSeriesDataPoint>,
96185
96186    /// A token, which can be sent as
96187    /// [page_token][google.cloud.aiplatform.v1.ExportTensorboardTimeSeriesDataRequest.page_token]
96188    /// to retrieve the next page. If this field is omitted, there are no
96189    /// subsequent pages.
96190    ///
96191    /// [google.cloud.aiplatform.v1.ExportTensorboardTimeSeriesDataRequest.page_token]: crate::model::ExportTensorboardTimeSeriesDataRequest::page_token
96192    pub next_page_token: std::string::String,
96193
96194    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
96195}
96196
96197#[cfg(feature = "tensorboard-service")]
96198impl ExportTensorboardTimeSeriesDataResponse {
96199    pub fn new() -> Self {
96200        std::default::Default::default()
96201    }
96202
96203    /// Sets the value of [time_series_data_points][crate::model::ExportTensorboardTimeSeriesDataResponse::time_series_data_points].
96204    pub fn set_time_series_data_points<T, V>(mut self, v: T) -> Self
96205    where
96206        T: std::iter::IntoIterator<Item = V>,
96207        V: std::convert::Into<crate::model::TimeSeriesDataPoint>,
96208    {
96209        use std::iter::Iterator;
96210        self.time_series_data_points = v.into_iter().map(|i| i.into()).collect();
96211        self
96212    }
96213
96214    /// Sets the value of [next_page_token][crate::model::ExportTensorboardTimeSeriesDataResponse::next_page_token].
96215    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
96216        self.next_page_token = v.into();
96217        self
96218    }
96219}
96220
96221#[cfg(feature = "tensorboard-service")]
96222impl wkt::message::Message for ExportTensorboardTimeSeriesDataResponse {
96223    fn typename() -> &'static str {
96224        "type.googleapis.com/google.cloud.aiplatform.v1.ExportTensorboardTimeSeriesDataResponse"
96225    }
96226}
96227
96228#[cfg(feature = "tensorboard-service")]
96229#[doc(hidden)]
96230impl gax::paginator::internal::PageableResponse for ExportTensorboardTimeSeriesDataResponse {
96231    type PageItem = crate::model::TimeSeriesDataPoint;
96232
96233    fn items(self) -> std::vec::Vec<Self::PageItem> {
96234        self.time_series_data_points
96235    }
96236
96237    fn next_page_token(&self) -> std::string::String {
96238        use std::clone::Clone;
96239        self.next_page_token.clone()
96240    }
96241}
96242
96243/// Details of operations that perform create Tensorboard.
96244#[cfg(feature = "tensorboard-service")]
96245#[derive(Clone, Default, PartialEq)]
96246#[non_exhaustive]
96247pub struct CreateTensorboardOperationMetadata {
96248    /// Operation metadata for Tensorboard.
96249    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
96250
96251    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
96252}
96253
96254#[cfg(feature = "tensorboard-service")]
96255impl CreateTensorboardOperationMetadata {
96256    pub fn new() -> Self {
96257        std::default::Default::default()
96258    }
96259
96260    /// Sets the value of [generic_metadata][crate::model::CreateTensorboardOperationMetadata::generic_metadata].
96261    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
96262    where
96263        T: std::convert::Into<crate::model::GenericOperationMetadata>,
96264    {
96265        self.generic_metadata = std::option::Option::Some(v.into());
96266        self
96267    }
96268
96269    /// Sets or clears the value of [generic_metadata][crate::model::CreateTensorboardOperationMetadata::generic_metadata].
96270    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
96271    where
96272        T: std::convert::Into<crate::model::GenericOperationMetadata>,
96273    {
96274        self.generic_metadata = v.map(|x| x.into());
96275        self
96276    }
96277}
96278
96279#[cfg(feature = "tensorboard-service")]
96280impl wkt::message::Message for CreateTensorboardOperationMetadata {
96281    fn typename() -> &'static str {
96282        "type.googleapis.com/google.cloud.aiplatform.v1.CreateTensorboardOperationMetadata"
96283    }
96284}
96285
96286/// Details of operations that perform update Tensorboard.
96287#[cfg(feature = "tensorboard-service")]
96288#[derive(Clone, Default, PartialEq)]
96289#[non_exhaustive]
96290pub struct UpdateTensorboardOperationMetadata {
96291    /// Operation metadata for Tensorboard.
96292    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
96293
96294    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
96295}
96296
96297#[cfg(feature = "tensorboard-service")]
96298impl UpdateTensorboardOperationMetadata {
96299    pub fn new() -> Self {
96300        std::default::Default::default()
96301    }
96302
96303    /// Sets the value of [generic_metadata][crate::model::UpdateTensorboardOperationMetadata::generic_metadata].
96304    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
96305    where
96306        T: std::convert::Into<crate::model::GenericOperationMetadata>,
96307    {
96308        self.generic_metadata = std::option::Option::Some(v.into());
96309        self
96310    }
96311
96312    /// Sets or clears the value of [generic_metadata][crate::model::UpdateTensorboardOperationMetadata::generic_metadata].
96313    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
96314    where
96315        T: std::convert::Into<crate::model::GenericOperationMetadata>,
96316    {
96317        self.generic_metadata = v.map(|x| x.into());
96318        self
96319    }
96320}
96321
96322#[cfg(feature = "tensorboard-service")]
96323impl wkt::message::Message for UpdateTensorboardOperationMetadata {
96324    fn typename() -> &'static str {
96325        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateTensorboardOperationMetadata"
96326    }
96327}
96328
96329/// TensorboardTimeSeries maps to times series produced in training runs
96330#[cfg(feature = "tensorboard-service")]
96331#[derive(Clone, Default, PartialEq)]
96332#[non_exhaustive]
96333pub struct TensorboardTimeSeries {
96334    /// Output only. Name of the TensorboardTimeSeries.
96335    pub name: std::string::String,
96336
96337    /// Required. User provided name of this TensorboardTimeSeries.
96338    /// This value should be unique among all TensorboardTimeSeries resources
96339    /// belonging to the same TensorboardRun resource (parent resource).
96340    pub display_name: std::string::String,
96341
96342    /// Description of this TensorboardTimeSeries.
96343    pub description: std::string::String,
96344
96345    /// Required. Immutable. Type of TensorboardTimeSeries value.
96346    pub value_type: crate::model::tensorboard_time_series::ValueType,
96347
96348    /// Output only. Timestamp when this TensorboardTimeSeries was created.
96349    pub create_time: std::option::Option<wkt::Timestamp>,
96350
96351    /// Output only. Timestamp when this TensorboardTimeSeries was last updated.
96352    pub update_time: std::option::Option<wkt::Timestamp>,
96353
96354    /// Used to perform a consistent read-modify-write updates. If not set, a blind
96355    /// "overwrite" update happens.
96356    pub etag: std::string::String,
96357
96358    /// Immutable. Name of the plugin this time series pertain to. Such as Scalar,
96359    /// Tensor, Blob
96360    pub plugin_name: std::string::String,
96361
96362    /// Data of the current plugin, with the size limited to 65KB.
96363    pub plugin_data: ::bytes::Bytes,
96364
96365    /// Output only. Scalar, Tensor, or Blob metadata for this
96366    /// TensorboardTimeSeries.
96367    pub metadata: std::option::Option<crate::model::tensorboard_time_series::Metadata>,
96368
96369    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
96370}
96371
96372#[cfg(feature = "tensorboard-service")]
96373impl TensorboardTimeSeries {
96374    pub fn new() -> Self {
96375        std::default::Default::default()
96376    }
96377
96378    /// Sets the value of [name][crate::model::TensorboardTimeSeries::name].
96379    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
96380        self.name = v.into();
96381        self
96382    }
96383
96384    /// Sets the value of [display_name][crate::model::TensorboardTimeSeries::display_name].
96385    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
96386        self.display_name = v.into();
96387        self
96388    }
96389
96390    /// Sets the value of [description][crate::model::TensorboardTimeSeries::description].
96391    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
96392        self.description = v.into();
96393        self
96394    }
96395
96396    /// Sets the value of [value_type][crate::model::TensorboardTimeSeries::value_type].
96397    pub fn set_value_type<
96398        T: std::convert::Into<crate::model::tensorboard_time_series::ValueType>,
96399    >(
96400        mut self,
96401        v: T,
96402    ) -> Self {
96403        self.value_type = v.into();
96404        self
96405    }
96406
96407    /// Sets the value of [create_time][crate::model::TensorboardTimeSeries::create_time].
96408    pub fn set_create_time<T>(mut self, v: T) -> Self
96409    where
96410        T: std::convert::Into<wkt::Timestamp>,
96411    {
96412        self.create_time = std::option::Option::Some(v.into());
96413        self
96414    }
96415
96416    /// Sets or clears the value of [create_time][crate::model::TensorboardTimeSeries::create_time].
96417    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
96418    where
96419        T: std::convert::Into<wkt::Timestamp>,
96420    {
96421        self.create_time = v.map(|x| x.into());
96422        self
96423    }
96424
96425    /// Sets the value of [update_time][crate::model::TensorboardTimeSeries::update_time].
96426    pub fn set_update_time<T>(mut self, v: T) -> Self
96427    where
96428        T: std::convert::Into<wkt::Timestamp>,
96429    {
96430        self.update_time = std::option::Option::Some(v.into());
96431        self
96432    }
96433
96434    /// Sets or clears the value of [update_time][crate::model::TensorboardTimeSeries::update_time].
96435    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
96436    where
96437        T: std::convert::Into<wkt::Timestamp>,
96438    {
96439        self.update_time = v.map(|x| x.into());
96440        self
96441    }
96442
96443    /// Sets the value of [etag][crate::model::TensorboardTimeSeries::etag].
96444    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
96445        self.etag = v.into();
96446        self
96447    }
96448
96449    /// Sets the value of [plugin_name][crate::model::TensorboardTimeSeries::plugin_name].
96450    pub fn set_plugin_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
96451        self.plugin_name = v.into();
96452        self
96453    }
96454
96455    /// Sets the value of [plugin_data][crate::model::TensorboardTimeSeries::plugin_data].
96456    pub fn set_plugin_data<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
96457        self.plugin_data = v.into();
96458        self
96459    }
96460
96461    /// Sets the value of [metadata][crate::model::TensorboardTimeSeries::metadata].
96462    pub fn set_metadata<T>(mut self, v: T) -> Self
96463    where
96464        T: std::convert::Into<crate::model::tensorboard_time_series::Metadata>,
96465    {
96466        self.metadata = std::option::Option::Some(v.into());
96467        self
96468    }
96469
96470    /// Sets or clears the value of [metadata][crate::model::TensorboardTimeSeries::metadata].
96471    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
96472    where
96473        T: std::convert::Into<crate::model::tensorboard_time_series::Metadata>,
96474    {
96475        self.metadata = v.map(|x| x.into());
96476        self
96477    }
96478}
96479
96480#[cfg(feature = "tensorboard-service")]
96481impl wkt::message::Message for TensorboardTimeSeries {
96482    fn typename() -> &'static str {
96483        "type.googleapis.com/google.cloud.aiplatform.v1.TensorboardTimeSeries"
96484    }
96485}
96486
96487/// Defines additional types related to [TensorboardTimeSeries].
96488#[cfg(feature = "tensorboard-service")]
96489pub mod tensorboard_time_series {
96490    #[allow(unused_imports)]
96491    use super::*;
96492
96493    /// Describes metadata for a TensorboardTimeSeries.
96494    #[cfg(feature = "tensorboard-service")]
96495    #[derive(Clone, Default, PartialEq)]
96496    #[non_exhaustive]
96497    pub struct Metadata {
96498        /// Output only. Max step index of all data points within a
96499        /// TensorboardTimeSeries.
96500        pub max_step: i64,
96501
96502        /// Output only. Max wall clock timestamp of all data points within a
96503        /// TensorboardTimeSeries.
96504        pub max_wall_time: std::option::Option<wkt::Timestamp>,
96505
96506        /// Output only. The largest blob sequence length (number of blobs) of all
96507        /// data points in this time series, if its ValueType is BLOB_SEQUENCE.
96508        pub max_blob_sequence_length: i64,
96509
96510        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
96511    }
96512
96513    #[cfg(feature = "tensorboard-service")]
96514    impl Metadata {
96515        pub fn new() -> Self {
96516            std::default::Default::default()
96517        }
96518
96519        /// Sets the value of [max_step][crate::model::tensorboard_time_series::Metadata::max_step].
96520        pub fn set_max_step<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
96521            self.max_step = v.into();
96522            self
96523        }
96524
96525        /// Sets the value of [max_wall_time][crate::model::tensorboard_time_series::Metadata::max_wall_time].
96526        pub fn set_max_wall_time<T>(mut self, v: T) -> Self
96527        where
96528            T: std::convert::Into<wkt::Timestamp>,
96529        {
96530            self.max_wall_time = std::option::Option::Some(v.into());
96531            self
96532        }
96533
96534        /// Sets or clears the value of [max_wall_time][crate::model::tensorboard_time_series::Metadata::max_wall_time].
96535        pub fn set_or_clear_max_wall_time<T>(mut self, v: std::option::Option<T>) -> Self
96536        where
96537            T: std::convert::Into<wkt::Timestamp>,
96538        {
96539            self.max_wall_time = v.map(|x| x.into());
96540            self
96541        }
96542
96543        /// Sets the value of [max_blob_sequence_length][crate::model::tensorboard_time_series::Metadata::max_blob_sequence_length].
96544        pub fn set_max_blob_sequence_length<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
96545            self.max_blob_sequence_length = v.into();
96546            self
96547        }
96548    }
96549
96550    #[cfg(feature = "tensorboard-service")]
96551    impl wkt::message::Message for Metadata {
96552        fn typename() -> &'static str {
96553            "type.googleapis.com/google.cloud.aiplatform.v1.TensorboardTimeSeries.Metadata"
96554        }
96555    }
96556
96557    /// An enum representing the value type of a TensorboardTimeSeries.
96558    ///
96559    /// # Working with unknown values
96560    ///
96561    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
96562    /// additional enum variants at any time. Adding new variants is not considered
96563    /// a breaking change. Applications should write their code in anticipation of:
96564    ///
96565    /// - New values appearing in future releases of the client library, **and**
96566    /// - New values received dynamically, without application changes.
96567    ///
96568    /// Please consult the [Working with enums] section in the user guide for some
96569    /// guidelines.
96570    ///
96571    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
96572    #[cfg(feature = "tensorboard-service")]
96573    #[derive(Clone, Debug, PartialEq)]
96574    #[non_exhaustive]
96575    pub enum ValueType {
96576        /// The value type is unspecified.
96577        Unspecified,
96578        /// Used for TensorboardTimeSeries that is a list of scalars.
96579        /// E.g. accuracy of a model over epochs/time.
96580        Scalar,
96581        /// Used for TensorboardTimeSeries that is a list of tensors.
96582        /// E.g. histograms of weights of layer in a model over epoch/time.
96583        Tensor,
96584        /// Used for TensorboardTimeSeries that is a list of blob sequences.
96585        /// E.g. set of sample images with labels over epochs/time.
96586        BlobSequence,
96587        /// If set, the enum was initialized with an unknown value.
96588        ///
96589        /// Applications can examine the value using [ValueType::value] or
96590        /// [ValueType::name].
96591        UnknownValue(value_type::UnknownValue),
96592    }
96593
96594    #[doc(hidden)]
96595    #[cfg(feature = "tensorboard-service")]
96596    pub mod value_type {
96597        #[allow(unused_imports)]
96598        use super::*;
96599        #[derive(Clone, Debug, PartialEq)]
96600        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
96601    }
96602
96603    #[cfg(feature = "tensorboard-service")]
96604    impl ValueType {
96605        /// Gets the enum value.
96606        ///
96607        /// Returns `None` if the enum contains an unknown value deserialized from
96608        /// the string representation of enums.
96609        pub fn value(&self) -> std::option::Option<i32> {
96610            match self {
96611                Self::Unspecified => std::option::Option::Some(0),
96612                Self::Scalar => std::option::Option::Some(1),
96613                Self::Tensor => std::option::Option::Some(2),
96614                Self::BlobSequence => std::option::Option::Some(3),
96615                Self::UnknownValue(u) => u.0.value(),
96616            }
96617        }
96618
96619        /// Gets the enum value as a string.
96620        ///
96621        /// Returns `None` if the enum contains an unknown value deserialized from
96622        /// the integer representation of enums.
96623        pub fn name(&self) -> std::option::Option<&str> {
96624            match self {
96625                Self::Unspecified => std::option::Option::Some("VALUE_TYPE_UNSPECIFIED"),
96626                Self::Scalar => std::option::Option::Some("SCALAR"),
96627                Self::Tensor => std::option::Option::Some("TENSOR"),
96628                Self::BlobSequence => std::option::Option::Some("BLOB_SEQUENCE"),
96629                Self::UnknownValue(u) => u.0.name(),
96630            }
96631        }
96632    }
96633
96634    #[cfg(feature = "tensorboard-service")]
96635    impl std::default::Default for ValueType {
96636        fn default() -> Self {
96637            use std::convert::From;
96638            Self::from(0)
96639        }
96640    }
96641
96642    #[cfg(feature = "tensorboard-service")]
96643    impl std::fmt::Display for ValueType {
96644        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
96645            wkt::internal::display_enum(f, self.name(), self.value())
96646        }
96647    }
96648
96649    #[cfg(feature = "tensorboard-service")]
96650    impl std::convert::From<i32> for ValueType {
96651        fn from(value: i32) -> Self {
96652            match value {
96653                0 => Self::Unspecified,
96654                1 => Self::Scalar,
96655                2 => Self::Tensor,
96656                3 => Self::BlobSequence,
96657                _ => Self::UnknownValue(value_type::UnknownValue(
96658                    wkt::internal::UnknownEnumValue::Integer(value),
96659                )),
96660            }
96661        }
96662    }
96663
96664    #[cfg(feature = "tensorboard-service")]
96665    impl std::convert::From<&str> for ValueType {
96666        fn from(value: &str) -> Self {
96667            use std::string::ToString;
96668            match value {
96669                "VALUE_TYPE_UNSPECIFIED" => Self::Unspecified,
96670                "SCALAR" => Self::Scalar,
96671                "TENSOR" => Self::Tensor,
96672                "BLOB_SEQUENCE" => Self::BlobSequence,
96673                _ => Self::UnknownValue(value_type::UnknownValue(
96674                    wkt::internal::UnknownEnumValue::String(value.to_string()),
96675                )),
96676            }
96677        }
96678    }
96679
96680    #[cfg(feature = "tensorboard-service")]
96681    impl serde::ser::Serialize for ValueType {
96682        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
96683        where
96684            S: serde::Serializer,
96685        {
96686            match self {
96687                Self::Unspecified => serializer.serialize_i32(0),
96688                Self::Scalar => serializer.serialize_i32(1),
96689                Self::Tensor => serializer.serialize_i32(2),
96690                Self::BlobSequence => serializer.serialize_i32(3),
96691                Self::UnknownValue(u) => u.0.serialize(serializer),
96692            }
96693        }
96694    }
96695
96696    #[cfg(feature = "tensorboard-service")]
96697    impl<'de> serde::de::Deserialize<'de> for ValueType {
96698        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
96699        where
96700            D: serde::Deserializer<'de>,
96701        {
96702            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ValueType>::new(
96703                ".google.cloud.aiplatform.v1.TensorboardTimeSeries.ValueType",
96704            ))
96705        }
96706    }
96707}
96708
96709/// Tool details that the model may use to generate response.
96710///
96711/// A `Tool` is a piece of code that enables the system to interact with
96712/// external systems to perform an action, or set of actions, outside of
96713/// knowledge and scope of the model. A Tool object should contain exactly
96714/// one type of Tool (e.g FunctionDeclaration, Retrieval or
96715/// GoogleSearchRetrieval).
96716#[cfg(any(
96717    feature = "gen-ai-cache-service",
96718    feature = "llm-utility-service",
96719    feature = "prediction-service",
96720))]
96721#[derive(Clone, Default, PartialEq)]
96722#[non_exhaustive]
96723pub struct Tool {
96724    /// Optional. Function tool type.
96725    /// One or more function declarations to be passed to the model along with the
96726    /// current user query. Model may decide to call a subset of these functions
96727    /// by populating [FunctionCall][google.cloud.aiplatform.v1.Part.function_call]
96728    /// in the response. User should provide a
96729    /// [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] for
96730    /// each function call in the next turn. Based on the function responses, Model
96731    /// will generate the final response back to the user. Maximum 128 function
96732    /// declarations can be provided.
96733    ///
96734    /// [google.cloud.aiplatform.v1.Part.function_call]: crate::model::Part::data
96735    /// [google.cloud.aiplatform.v1.Part.function_response]: crate::model::Part::data
96736    pub function_declarations: std::vec::Vec<crate::model::FunctionDeclaration>,
96737
96738    /// Optional. Retrieval tool type.
96739    /// System will always execute the provided retrieval tool(s) to get external
96740    /// knowledge to answer the prompt. Retrieval results are presented to the
96741    /// model for generation.
96742    pub retrieval: std::option::Option<crate::model::Retrieval>,
96743
96744    /// Optional. GoogleSearch tool type.
96745    /// Tool to support Google Search in Model. Powered by Google.
96746    pub google_search: std::option::Option<crate::model::tool::GoogleSearch>,
96747
96748    /// Optional. GoogleSearchRetrieval tool type.
96749    /// Specialized retrieval tool that is powered by Google search.
96750    pub google_search_retrieval: std::option::Option<crate::model::GoogleSearchRetrieval>,
96751
96752    /// Optional. GoogleMaps tool type.
96753    /// Tool to support Google Maps in Model.
96754    pub google_maps: std::option::Option<crate::model::GoogleMaps>,
96755
96756    /// Optional. Tool to support searching public web data, powered by Vertex AI
96757    /// Search and Sec4 compliance.
96758    pub enterprise_web_search: std::option::Option<crate::model::EnterpriseWebSearch>,
96759
96760    /// Optional. CodeExecution tool type.
96761    /// Enables the model to execute code as part of generation.
96762    pub code_execution: std::option::Option<crate::model::tool::CodeExecution>,
96763
96764    /// Optional. Tool to support URL context retrieval.
96765    pub url_context: std::option::Option<crate::model::UrlContext>,
96766
96767    /// Optional. Tool to support the model interacting directly with the computer.
96768    /// If enabled, it automatically populates computer-use specific Function
96769    /// Declarations.
96770    pub computer_use: std::option::Option<crate::model::tool::ComputerUse>,
96771
96772    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
96773}
96774
96775#[cfg(any(
96776    feature = "gen-ai-cache-service",
96777    feature = "llm-utility-service",
96778    feature = "prediction-service",
96779))]
96780impl Tool {
96781    pub fn new() -> Self {
96782        std::default::Default::default()
96783    }
96784
96785    /// Sets the value of [function_declarations][crate::model::Tool::function_declarations].
96786    pub fn set_function_declarations<T, V>(mut self, v: T) -> Self
96787    where
96788        T: std::iter::IntoIterator<Item = V>,
96789        V: std::convert::Into<crate::model::FunctionDeclaration>,
96790    {
96791        use std::iter::Iterator;
96792        self.function_declarations = v.into_iter().map(|i| i.into()).collect();
96793        self
96794    }
96795
96796    /// Sets the value of [retrieval][crate::model::Tool::retrieval].
96797    pub fn set_retrieval<T>(mut self, v: T) -> Self
96798    where
96799        T: std::convert::Into<crate::model::Retrieval>,
96800    {
96801        self.retrieval = std::option::Option::Some(v.into());
96802        self
96803    }
96804
96805    /// Sets or clears the value of [retrieval][crate::model::Tool::retrieval].
96806    pub fn set_or_clear_retrieval<T>(mut self, v: std::option::Option<T>) -> Self
96807    where
96808        T: std::convert::Into<crate::model::Retrieval>,
96809    {
96810        self.retrieval = v.map(|x| x.into());
96811        self
96812    }
96813
96814    /// Sets the value of [google_search][crate::model::Tool::google_search].
96815    pub fn set_google_search<T>(mut self, v: T) -> Self
96816    where
96817        T: std::convert::Into<crate::model::tool::GoogleSearch>,
96818    {
96819        self.google_search = std::option::Option::Some(v.into());
96820        self
96821    }
96822
96823    /// Sets or clears the value of [google_search][crate::model::Tool::google_search].
96824    pub fn set_or_clear_google_search<T>(mut self, v: std::option::Option<T>) -> Self
96825    where
96826        T: std::convert::Into<crate::model::tool::GoogleSearch>,
96827    {
96828        self.google_search = v.map(|x| x.into());
96829        self
96830    }
96831
96832    /// Sets the value of [google_search_retrieval][crate::model::Tool::google_search_retrieval].
96833    pub fn set_google_search_retrieval<T>(mut self, v: T) -> Self
96834    where
96835        T: std::convert::Into<crate::model::GoogleSearchRetrieval>,
96836    {
96837        self.google_search_retrieval = std::option::Option::Some(v.into());
96838        self
96839    }
96840
96841    /// Sets or clears the value of [google_search_retrieval][crate::model::Tool::google_search_retrieval].
96842    pub fn set_or_clear_google_search_retrieval<T>(mut self, v: std::option::Option<T>) -> Self
96843    where
96844        T: std::convert::Into<crate::model::GoogleSearchRetrieval>,
96845    {
96846        self.google_search_retrieval = v.map(|x| x.into());
96847        self
96848    }
96849
96850    /// Sets the value of [google_maps][crate::model::Tool::google_maps].
96851    pub fn set_google_maps<T>(mut self, v: T) -> Self
96852    where
96853        T: std::convert::Into<crate::model::GoogleMaps>,
96854    {
96855        self.google_maps = std::option::Option::Some(v.into());
96856        self
96857    }
96858
96859    /// Sets or clears the value of [google_maps][crate::model::Tool::google_maps].
96860    pub fn set_or_clear_google_maps<T>(mut self, v: std::option::Option<T>) -> Self
96861    where
96862        T: std::convert::Into<crate::model::GoogleMaps>,
96863    {
96864        self.google_maps = v.map(|x| x.into());
96865        self
96866    }
96867
96868    /// Sets the value of [enterprise_web_search][crate::model::Tool::enterprise_web_search].
96869    pub fn set_enterprise_web_search<T>(mut self, v: T) -> Self
96870    where
96871        T: std::convert::Into<crate::model::EnterpriseWebSearch>,
96872    {
96873        self.enterprise_web_search = std::option::Option::Some(v.into());
96874        self
96875    }
96876
96877    /// Sets or clears the value of [enterprise_web_search][crate::model::Tool::enterprise_web_search].
96878    pub fn set_or_clear_enterprise_web_search<T>(mut self, v: std::option::Option<T>) -> Self
96879    where
96880        T: std::convert::Into<crate::model::EnterpriseWebSearch>,
96881    {
96882        self.enterprise_web_search = v.map(|x| x.into());
96883        self
96884    }
96885
96886    /// Sets the value of [code_execution][crate::model::Tool::code_execution].
96887    pub fn set_code_execution<T>(mut self, v: T) -> Self
96888    where
96889        T: std::convert::Into<crate::model::tool::CodeExecution>,
96890    {
96891        self.code_execution = std::option::Option::Some(v.into());
96892        self
96893    }
96894
96895    /// Sets or clears the value of [code_execution][crate::model::Tool::code_execution].
96896    pub fn set_or_clear_code_execution<T>(mut self, v: std::option::Option<T>) -> Self
96897    where
96898        T: std::convert::Into<crate::model::tool::CodeExecution>,
96899    {
96900        self.code_execution = v.map(|x| x.into());
96901        self
96902    }
96903
96904    /// Sets the value of [url_context][crate::model::Tool::url_context].
96905    pub fn set_url_context<T>(mut self, v: T) -> Self
96906    where
96907        T: std::convert::Into<crate::model::UrlContext>,
96908    {
96909        self.url_context = std::option::Option::Some(v.into());
96910        self
96911    }
96912
96913    /// Sets or clears the value of [url_context][crate::model::Tool::url_context].
96914    pub fn set_or_clear_url_context<T>(mut self, v: std::option::Option<T>) -> Self
96915    where
96916        T: std::convert::Into<crate::model::UrlContext>,
96917    {
96918        self.url_context = v.map(|x| x.into());
96919        self
96920    }
96921
96922    /// Sets the value of [computer_use][crate::model::Tool::computer_use].
96923    pub fn set_computer_use<T>(mut self, v: T) -> Self
96924    where
96925        T: std::convert::Into<crate::model::tool::ComputerUse>,
96926    {
96927        self.computer_use = std::option::Option::Some(v.into());
96928        self
96929    }
96930
96931    /// Sets or clears the value of [computer_use][crate::model::Tool::computer_use].
96932    pub fn set_or_clear_computer_use<T>(mut self, v: std::option::Option<T>) -> Self
96933    where
96934        T: std::convert::Into<crate::model::tool::ComputerUse>,
96935    {
96936        self.computer_use = v.map(|x| x.into());
96937        self
96938    }
96939}
96940
96941#[cfg(any(
96942    feature = "gen-ai-cache-service",
96943    feature = "llm-utility-service",
96944    feature = "prediction-service",
96945))]
96946impl wkt::message::Message for Tool {
96947    fn typename() -> &'static str {
96948        "type.googleapis.com/google.cloud.aiplatform.v1.Tool"
96949    }
96950}
96951
96952/// Defines additional types related to [Tool].
96953#[cfg(any(
96954    feature = "gen-ai-cache-service",
96955    feature = "llm-utility-service",
96956    feature = "prediction-service",
96957))]
96958pub mod tool {
96959    #[allow(unused_imports)]
96960    use super::*;
96961
96962    /// GoogleSearch tool type.
96963    /// Tool to support Google Search in Model. Powered by Google.
96964    #[cfg(any(
96965        feature = "gen-ai-cache-service",
96966        feature = "llm-utility-service",
96967        feature = "prediction-service",
96968    ))]
96969    #[derive(Clone, Default, PartialEq)]
96970    #[non_exhaustive]
96971    pub struct GoogleSearch {
96972        /// Optional. List of domains to be excluded from the search results.
96973        /// The default limit is 2000 domains.
96974        /// Example: ["amazon.com", "facebook.com"].
96975        pub exclude_domains: std::vec::Vec<std::string::String>,
96976
96977        /// Optional. Sites with confidence level chosen & above this value will be
96978        /// blocked from the search results.
96979        pub blocking_confidence: std::option::Option<crate::model::tool::PhishBlockThreshold>,
96980
96981        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
96982    }
96983
96984    #[cfg(any(
96985        feature = "gen-ai-cache-service",
96986        feature = "llm-utility-service",
96987        feature = "prediction-service",
96988    ))]
96989    impl GoogleSearch {
96990        pub fn new() -> Self {
96991            std::default::Default::default()
96992        }
96993
96994        /// Sets the value of [exclude_domains][crate::model::tool::GoogleSearch::exclude_domains].
96995        pub fn set_exclude_domains<T, V>(mut self, v: T) -> Self
96996        where
96997            T: std::iter::IntoIterator<Item = V>,
96998            V: std::convert::Into<std::string::String>,
96999        {
97000            use std::iter::Iterator;
97001            self.exclude_domains = v.into_iter().map(|i| i.into()).collect();
97002            self
97003        }
97004
97005        /// Sets the value of [blocking_confidence][crate::model::tool::GoogleSearch::blocking_confidence].
97006        pub fn set_blocking_confidence<T>(mut self, v: T) -> Self
97007        where
97008            T: std::convert::Into<crate::model::tool::PhishBlockThreshold>,
97009        {
97010            self.blocking_confidence = std::option::Option::Some(v.into());
97011            self
97012        }
97013
97014        /// Sets or clears the value of [blocking_confidence][crate::model::tool::GoogleSearch::blocking_confidence].
97015        pub fn set_or_clear_blocking_confidence<T>(mut self, v: std::option::Option<T>) -> Self
97016        where
97017            T: std::convert::Into<crate::model::tool::PhishBlockThreshold>,
97018        {
97019            self.blocking_confidence = v.map(|x| x.into());
97020            self
97021        }
97022    }
97023
97024    #[cfg(any(
97025        feature = "gen-ai-cache-service",
97026        feature = "llm-utility-service",
97027        feature = "prediction-service",
97028    ))]
97029    impl wkt::message::Message for GoogleSearch {
97030        fn typename() -> &'static str {
97031            "type.googleapis.com/google.cloud.aiplatform.v1.Tool.GoogleSearch"
97032        }
97033    }
97034
97035    /// Tool that executes code generated by the model, and automatically returns
97036    /// the result to the model.
97037    ///
97038    /// See also [ExecutableCode]and [CodeExecutionResult] which are input and
97039    /// output to this tool.
97040    #[cfg(any(
97041        feature = "gen-ai-cache-service",
97042        feature = "llm-utility-service",
97043        feature = "prediction-service",
97044    ))]
97045    #[derive(Clone, Default, PartialEq)]
97046    #[non_exhaustive]
97047    pub struct CodeExecution {
97048        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
97049    }
97050
97051    #[cfg(any(
97052        feature = "gen-ai-cache-service",
97053        feature = "llm-utility-service",
97054        feature = "prediction-service",
97055    ))]
97056    impl CodeExecution {
97057        pub fn new() -> Self {
97058            std::default::Default::default()
97059        }
97060    }
97061
97062    #[cfg(any(
97063        feature = "gen-ai-cache-service",
97064        feature = "llm-utility-service",
97065        feature = "prediction-service",
97066    ))]
97067    impl wkt::message::Message for CodeExecution {
97068        fn typename() -> &'static str {
97069            "type.googleapis.com/google.cloud.aiplatform.v1.Tool.CodeExecution"
97070        }
97071    }
97072
97073    /// Tool to support computer use.
97074    #[cfg(any(
97075        feature = "gen-ai-cache-service",
97076        feature = "llm-utility-service",
97077        feature = "prediction-service",
97078    ))]
97079    #[derive(Clone, Default, PartialEq)]
97080    #[non_exhaustive]
97081    pub struct ComputerUse {
97082        /// Required. The environment being operated.
97083        pub environment: crate::model::tool::computer_use::Environment,
97084
97085        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
97086    }
97087
97088    #[cfg(any(
97089        feature = "gen-ai-cache-service",
97090        feature = "llm-utility-service",
97091        feature = "prediction-service",
97092    ))]
97093    impl ComputerUse {
97094        pub fn new() -> Self {
97095            std::default::Default::default()
97096        }
97097
97098        /// Sets the value of [environment][crate::model::tool::ComputerUse::environment].
97099        pub fn set_environment<
97100            T: std::convert::Into<crate::model::tool::computer_use::Environment>,
97101        >(
97102            mut self,
97103            v: T,
97104        ) -> Self {
97105            self.environment = v.into();
97106            self
97107        }
97108    }
97109
97110    #[cfg(any(
97111        feature = "gen-ai-cache-service",
97112        feature = "llm-utility-service",
97113        feature = "prediction-service",
97114    ))]
97115    impl wkt::message::Message for ComputerUse {
97116        fn typename() -> &'static str {
97117            "type.googleapis.com/google.cloud.aiplatform.v1.Tool.ComputerUse"
97118        }
97119    }
97120
97121    /// Defines additional types related to [ComputerUse].
97122    #[cfg(any(
97123        feature = "gen-ai-cache-service",
97124        feature = "llm-utility-service",
97125        feature = "prediction-service",
97126    ))]
97127    pub mod computer_use {
97128        #[allow(unused_imports)]
97129        use super::*;
97130
97131        /// Represents the environment being operated, such as a web browser.
97132        ///
97133        /// # Working with unknown values
97134        ///
97135        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
97136        /// additional enum variants at any time. Adding new variants is not considered
97137        /// a breaking change. Applications should write their code in anticipation of:
97138        ///
97139        /// - New values appearing in future releases of the client library, **and**
97140        /// - New values received dynamically, without application changes.
97141        ///
97142        /// Please consult the [Working with enums] section in the user guide for some
97143        /// guidelines.
97144        ///
97145        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
97146        #[cfg(any(
97147            feature = "gen-ai-cache-service",
97148            feature = "llm-utility-service",
97149            feature = "prediction-service",
97150        ))]
97151        #[derive(Clone, Debug, PartialEq)]
97152        #[non_exhaustive]
97153        pub enum Environment {
97154            /// Defaults to browser.
97155            Unspecified,
97156            /// Operates in a web browser.
97157            Browser,
97158            /// If set, the enum was initialized with an unknown value.
97159            ///
97160            /// Applications can examine the value using [Environment::value] or
97161            /// [Environment::name].
97162            UnknownValue(environment::UnknownValue),
97163        }
97164
97165        #[doc(hidden)]
97166        #[cfg(any(
97167            feature = "gen-ai-cache-service",
97168            feature = "llm-utility-service",
97169            feature = "prediction-service",
97170        ))]
97171        pub mod environment {
97172            #[allow(unused_imports)]
97173            use super::*;
97174            #[derive(Clone, Debug, PartialEq)]
97175            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
97176        }
97177
97178        #[cfg(any(
97179            feature = "gen-ai-cache-service",
97180            feature = "llm-utility-service",
97181            feature = "prediction-service",
97182        ))]
97183        impl Environment {
97184            /// Gets the enum value.
97185            ///
97186            /// Returns `None` if the enum contains an unknown value deserialized from
97187            /// the string representation of enums.
97188            pub fn value(&self) -> std::option::Option<i32> {
97189                match self {
97190                    Self::Unspecified => std::option::Option::Some(0),
97191                    Self::Browser => std::option::Option::Some(1),
97192                    Self::UnknownValue(u) => u.0.value(),
97193                }
97194            }
97195
97196            /// Gets the enum value as a string.
97197            ///
97198            /// Returns `None` if the enum contains an unknown value deserialized from
97199            /// the integer representation of enums.
97200            pub fn name(&self) -> std::option::Option<&str> {
97201                match self {
97202                    Self::Unspecified => std::option::Option::Some("ENVIRONMENT_UNSPECIFIED"),
97203                    Self::Browser => std::option::Option::Some("ENVIRONMENT_BROWSER"),
97204                    Self::UnknownValue(u) => u.0.name(),
97205                }
97206            }
97207        }
97208
97209        #[cfg(any(
97210            feature = "gen-ai-cache-service",
97211            feature = "llm-utility-service",
97212            feature = "prediction-service",
97213        ))]
97214        impl std::default::Default for Environment {
97215            fn default() -> Self {
97216                use std::convert::From;
97217                Self::from(0)
97218            }
97219        }
97220
97221        #[cfg(any(
97222            feature = "gen-ai-cache-service",
97223            feature = "llm-utility-service",
97224            feature = "prediction-service",
97225        ))]
97226        impl std::fmt::Display for Environment {
97227            fn fmt(
97228                &self,
97229                f: &mut std::fmt::Formatter<'_>,
97230            ) -> std::result::Result<(), std::fmt::Error> {
97231                wkt::internal::display_enum(f, self.name(), self.value())
97232            }
97233        }
97234
97235        #[cfg(any(
97236            feature = "gen-ai-cache-service",
97237            feature = "llm-utility-service",
97238            feature = "prediction-service",
97239        ))]
97240        impl std::convert::From<i32> for Environment {
97241            fn from(value: i32) -> Self {
97242                match value {
97243                    0 => Self::Unspecified,
97244                    1 => Self::Browser,
97245                    _ => Self::UnknownValue(environment::UnknownValue(
97246                        wkt::internal::UnknownEnumValue::Integer(value),
97247                    )),
97248                }
97249            }
97250        }
97251
97252        #[cfg(any(
97253            feature = "gen-ai-cache-service",
97254            feature = "llm-utility-service",
97255            feature = "prediction-service",
97256        ))]
97257        impl std::convert::From<&str> for Environment {
97258            fn from(value: &str) -> Self {
97259                use std::string::ToString;
97260                match value {
97261                    "ENVIRONMENT_UNSPECIFIED" => Self::Unspecified,
97262                    "ENVIRONMENT_BROWSER" => Self::Browser,
97263                    _ => Self::UnknownValue(environment::UnknownValue(
97264                        wkt::internal::UnknownEnumValue::String(value.to_string()),
97265                    )),
97266                }
97267            }
97268        }
97269
97270        #[cfg(any(
97271            feature = "gen-ai-cache-service",
97272            feature = "llm-utility-service",
97273            feature = "prediction-service",
97274        ))]
97275        impl serde::ser::Serialize for Environment {
97276            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
97277            where
97278                S: serde::Serializer,
97279            {
97280                match self {
97281                    Self::Unspecified => serializer.serialize_i32(0),
97282                    Self::Browser => serializer.serialize_i32(1),
97283                    Self::UnknownValue(u) => u.0.serialize(serializer),
97284                }
97285            }
97286        }
97287
97288        #[cfg(any(
97289            feature = "gen-ai-cache-service",
97290            feature = "llm-utility-service",
97291            feature = "prediction-service",
97292        ))]
97293        impl<'de> serde::de::Deserialize<'de> for Environment {
97294            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
97295            where
97296                D: serde::Deserializer<'de>,
97297            {
97298                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Environment>::new(
97299                    ".google.cloud.aiplatform.v1.Tool.ComputerUse.Environment",
97300                ))
97301            }
97302        }
97303    }
97304
97305    /// These are available confidence level user can set to block malicious urls
97306    /// with chosen confidence and above. For understanding different confidence of
97307    /// webrisk, please refer to
97308    /// <https://cloud.google.com/web-risk/docs/reference/rpc/google.cloud.webrisk.v1eap1#confidencelevel>
97309    ///
97310    /// # Working with unknown values
97311    ///
97312    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
97313    /// additional enum variants at any time. Adding new variants is not considered
97314    /// a breaking change. Applications should write their code in anticipation of:
97315    ///
97316    /// - New values appearing in future releases of the client library, **and**
97317    /// - New values received dynamically, without application changes.
97318    ///
97319    /// Please consult the [Working with enums] section in the user guide for some
97320    /// guidelines.
97321    ///
97322    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
97323    #[cfg(any(
97324        feature = "gen-ai-cache-service",
97325        feature = "llm-utility-service",
97326        feature = "prediction-service",
97327    ))]
97328    #[derive(Clone, Debug, PartialEq)]
97329    #[non_exhaustive]
97330    pub enum PhishBlockThreshold {
97331        /// Defaults to unspecified.
97332        Unspecified,
97333        /// Blocks Low and above confidence URL that is risky.
97334        BlockLowAndAbove,
97335        /// Blocks Medium and above confidence URL that is risky.
97336        BlockMediumAndAbove,
97337        /// Blocks High and above confidence URL that is risky.
97338        BlockHighAndAbove,
97339        /// Blocks Higher and above confidence URL that is risky.
97340        BlockHigherAndAbove,
97341        /// Blocks Very high and above confidence URL that is risky.
97342        BlockVeryHighAndAbove,
97343        /// Blocks Extremely high confidence URL that is risky.
97344        BlockOnlyExtremelyHigh,
97345        /// If set, the enum was initialized with an unknown value.
97346        ///
97347        /// Applications can examine the value using [PhishBlockThreshold::value] or
97348        /// [PhishBlockThreshold::name].
97349        UnknownValue(phish_block_threshold::UnknownValue),
97350    }
97351
97352    #[doc(hidden)]
97353    #[cfg(any(
97354        feature = "gen-ai-cache-service",
97355        feature = "llm-utility-service",
97356        feature = "prediction-service",
97357    ))]
97358    pub mod phish_block_threshold {
97359        #[allow(unused_imports)]
97360        use super::*;
97361        #[derive(Clone, Debug, PartialEq)]
97362        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
97363    }
97364
97365    #[cfg(any(
97366        feature = "gen-ai-cache-service",
97367        feature = "llm-utility-service",
97368        feature = "prediction-service",
97369    ))]
97370    impl PhishBlockThreshold {
97371        /// Gets the enum value.
97372        ///
97373        /// Returns `None` if the enum contains an unknown value deserialized from
97374        /// the string representation of enums.
97375        pub fn value(&self) -> std::option::Option<i32> {
97376            match self {
97377                Self::Unspecified => std::option::Option::Some(0),
97378                Self::BlockLowAndAbove => std::option::Option::Some(30),
97379                Self::BlockMediumAndAbove => std::option::Option::Some(40),
97380                Self::BlockHighAndAbove => std::option::Option::Some(50),
97381                Self::BlockHigherAndAbove => std::option::Option::Some(55),
97382                Self::BlockVeryHighAndAbove => std::option::Option::Some(60),
97383                Self::BlockOnlyExtremelyHigh => std::option::Option::Some(100),
97384                Self::UnknownValue(u) => u.0.value(),
97385            }
97386        }
97387
97388        /// Gets the enum value as a string.
97389        ///
97390        /// Returns `None` if the enum contains an unknown value deserialized from
97391        /// the integer representation of enums.
97392        pub fn name(&self) -> std::option::Option<&str> {
97393            match self {
97394                Self::Unspecified => std::option::Option::Some("PHISH_BLOCK_THRESHOLD_UNSPECIFIED"),
97395                Self::BlockLowAndAbove => std::option::Option::Some("BLOCK_LOW_AND_ABOVE"),
97396                Self::BlockMediumAndAbove => std::option::Option::Some("BLOCK_MEDIUM_AND_ABOVE"),
97397                Self::BlockHighAndAbove => std::option::Option::Some("BLOCK_HIGH_AND_ABOVE"),
97398                Self::BlockHigherAndAbove => std::option::Option::Some("BLOCK_HIGHER_AND_ABOVE"),
97399                Self::BlockVeryHighAndAbove => {
97400                    std::option::Option::Some("BLOCK_VERY_HIGH_AND_ABOVE")
97401                }
97402                Self::BlockOnlyExtremelyHigh => {
97403                    std::option::Option::Some("BLOCK_ONLY_EXTREMELY_HIGH")
97404                }
97405                Self::UnknownValue(u) => u.0.name(),
97406            }
97407        }
97408    }
97409
97410    #[cfg(any(
97411        feature = "gen-ai-cache-service",
97412        feature = "llm-utility-service",
97413        feature = "prediction-service",
97414    ))]
97415    impl std::default::Default for PhishBlockThreshold {
97416        fn default() -> Self {
97417            use std::convert::From;
97418            Self::from(0)
97419        }
97420    }
97421
97422    #[cfg(any(
97423        feature = "gen-ai-cache-service",
97424        feature = "llm-utility-service",
97425        feature = "prediction-service",
97426    ))]
97427    impl std::fmt::Display for PhishBlockThreshold {
97428        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
97429            wkt::internal::display_enum(f, self.name(), self.value())
97430        }
97431    }
97432
97433    #[cfg(any(
97434        feature = "gen-ai-cache-service",
97435        feature = "llm-utility-service",
97436        feature = "prediction-service",
97437    ))]
97438    impl std::convert::From<i32> for PhishBlockThreshold {
97439        fn from(value: i32) -> Self {
97440            match value {
97441                0 => Self::Unspecified,
97442                30 => Self::BlockLowAndAbove,
97443                40 => Self::BlockMediumAndAbove,
97444                50 => Self::BlockHighAndAbove,
97445                55 => Self::BlockHigherAndAbove,
97446                60 => Self::BlockVeryHighAndAbove,
97447                100 => Self::BlockOnlyExtremelyHigh,
97448                _ => Self::UnknownValue(phish_block_threshold::UnknownValue(
97449                    wkt::internal::UnknownEnumValue::Integer(value),
97450                )),
97451            }
97452        }
97453    }
97454
97455    #[cfg(any(
97456        feature = "gen-ai-cache-service",
97457        feature = "llm-utility-service",
97458        feature = "prediction-service",
97459    ))]
97460    impl std::convert::From<&str> for PhishBlockThreshold {
97461        fn from(value: &str) -> Self {
97462            use std::string::ToString;
97463            match value {
97464                "PHISH_BLOCK_THRESHOLD_UNSPECIFIED" => Self::Unspecified,
97465                "BLOCK_LOW_AND_ABOVE" => Self::BlockLowAndAbove,
97466                "BLOCK_MEDIUM_AND_ABOVE" => Self::BlockMediumAndAbove,
97467                "BLOCK_HIGH_AND_ABOVE" => Self::BlockHighAndAbove,
97468                "BLOCK_HIGHER_AND_ABOVE" => Self::BlockHigherAndAbove,
97469                "BLOCK_VERY_HIGH_AND_ABOVE" => Self::BlockVeryHighAndAbove,
97470                "BLOCK_ONLY_EXTREMELY_HIGH" => Self::BlockOnlyExtremelyHigh,
97471                _ => Self::UnknownValue(phish_block_threshold::UnknownValue(
97472                    wkt::internal::UnknownEnumValue::String(value.to_string()),
97473                )),
97474            }
97475        }
97476    }
97477
97478    #[cfg(any(
97479        feature = "gen-ai-cache-service",
97480        feature = "llm-utility-service",
97481        feature = "prediction-service",
97482    ))]
97483    impl serde::ser::Serialize for PhishBlockThreshold {
97484        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
97485        where
97486            S: serde::Serializer,
97487        {
97488            match self {
97489                Self::Unspecified => serializer.serialize_i32(0),
97490                Self::BlockLowAndAbove => serializer.serialize_i32(30),
97491                Self::BlockMediumAndAbove => serializer.serialize_i32(40),
97492                Self::BlockHighAndAbove => serializer.serialize_i32(50),
97493                Self::BlockHigherAndAbove => serializer.serialize_i32(55),
97494                Self::BlockVeryHighAndAbove => serializer.serialize_i32(60),
97495                Self::BlockOnlyExtremelyHigh => serializer.serialize_i32(100),
97496                Self::UnknownValue(u) => u.0.serialize(serializer),
97497            }
97498        }
97499    }
97500
97501    #[cfg(any(
97502        feature = "gen-ai-cache-service",
97503        feature = "llm-utility-service",
97504        feature = "prediction-service",
97505    ))]
97506    impl<'de> serde::de::Deserialize<'de> for PhishBlockThreshold {
97507        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
97508        where
97509            D: serde::Deserializer<'de>,
97510        {
97511            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PhishBlockThreshold>::new(
97512                ".google.cloud.aiplatform.v1.Tool.PhishBlockThreshold",
97513            ))
97514        }
97515    }
97516}
97517
97518/// Tool to support URL context.
97519#[cfg(any(
97520    feature = "gen-ai-cache-service",
97521    feature = "llm-utility-service",
97522    feature = "prediction-service",
97523))]
97524#[derive(Clone, Default, PartialEq)]
97525#[non_exhaustive]
97526pub struct UrlContext {
97527    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
97528}
97529
97530#[cfg(any(
97531    feature = "gen-ai-cache-service",
97532    feature = "llm-utility-service",
97533    feature = "prediction-service",
97534))]
97535impl UrlContext {
97536    pub fn new() -> Self {
97537        std::default::Default::default()
97538    }
97539}
97540
97541#[cfg(any(
97542    feature = "gen-ai-cache-service",
97543    feature = "llm-utility-service",
97544    feature = "prediction-service",
97545))]
97546impl wkt::message::Message for UrlContext {
97547    fn typename() -> &'static str {
97548        "type.googleapis.com/google.cloud.aiplatform.v1.UrlContext"
97549    }
97550}
97551
97552/// Structured representation of a function declaration as defined by the
97553/// [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included
97554/// in this declaration are the function name, description, parameters and
97555/// response type. This FunctionDeclaration is a representation of a block of
97556/// code that can be used as a `Tool` by the model and executed by the client.
97557#[cfg(any(
97558    feature = "gen-ai-cache-service",
97559    feature = "llm-utility-service",
97560    feature = "prediction-service",
97561))]
97562#[derive(Clone, Default, PartialEq)]
97563#[non_exhaustive]
97564pub struct FunctionDeclaration {
97565    /// Required. The name of the function to call.
97566    /// Must start with a letter or an underscore.
97567    /// Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a
97568    /// maximum length of 64.
97569    pub name: std::string::String,
97570
97571    /// Optional. Description and purpose of the function.
97572    /// Model uses it to decide how and whether to call the function.
97573    pub description: std::string::String,
97574
97575    /// Optional. Describes the parameters to this function in JSON Schema Object
97576    /// format. Reflects the Open API 3.03 Parameter Object. string Key: the name
97577    /// of the parameter. Parameter names are case sensitive. Schema Value: the
97578    /// Schema defining the type used for the parameter. For function with no
97579    /// parameters, this can be left unset. Parameter names must start with a
97580    /// letter or an underscore and must only contain chars a-z, A-Z, 0-9, or
97581    /// underscores with a maximum length of 64. Example with 1 required and 1
97582    /// optional parameter: type: OBJECT properties:
97583    /// param1:
97584    /// type: STRING
97585    /// param2:
97586    /// type: INTEGER
97587    /// required:
97588    ///
97589    /// - param1
97590    pub parameters: std::option::Option<crate::model::Schema>,
97591
97592    /// Optional. Describes the parameters to the function in JSON Schema format.
97593    /// The schema must describe an object where the properties are the parameters
97594    /// to the function. For example:
97595    ///
97596    /// ```norust
97597    /// {
97598    ///   "type": "object",
97599    ///   "properties": {
97600    ///     "name": { "type": "string" },
97601    ///     "age": { "type": "integer" }
97602    ///   },
97603    ///   "additionalProperties": false,
97604    ///   "required": ["name", "age"],
97605    ///   "propertyOrdering": ["name", "age"]
97606    /// }
97607    /// ```
97608    ///
97609    /// This field is mutually exclusive with `parameters`.
97610    pub parameters_json_schema: std::option::Option<wkt::Value>,
97611
97612    /// Optional. Describes the output from this function in JSON Schema format.
97613    /// Reflects the Open API 3.03 Response Object. The Schema defines the type
97614    /// used for the response value of the function.
97615    pub response: std::option::Option<crate::model::Schema>,
97616
97617    /// Optional. Describes the output from this function in JSON Schema format.
97618    /// The value specified by the schema is the response value of the function.
97619    ///
97620    /// This field is mutually exclusive with `response`.
97621    pub response_json_schema: std::option::Option<wkt::Value>,
97622
97623    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
97624}
97625
97626#[cfg(any(
97627    feature = "gen-ai-cache-service",
97628    feature = "llm-utility-service",
97629    feature = "prediction-service",
97630))]
97631impl FunctionDeclaration {
97632    pub fn new() -> Self {
97633        std::default::Default::default()
97634    }
97635
97636    /// Sets the value of [name][crate::model::FunctionDeclaration::name].
97637    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
97638        self.name = v.into();
97639        self
97640    }
97641
97642    /// Sets the value of [description][crate::model::FunctionDeclaration::description].
97643    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
97644        self.description = v.into();
97645        self
97646    }
97647
97648    /// Sets the value of [parameters][crate::model::FunctionDeclaration::parameters].
97649    pub fn set_parameters<T>(mut self, v: T) -> Self
97650    where
97651        T: std::convert::Into<crate::model::Schema>,
97652    {
97653        self.parameters = std::option::Option::Some(v.into());
97654        self
97655    }
97656
97657    /// Sets or clears the value of [parameters][crate::model::FunctionDeclaration::parameters].
97658    pub fn set_or_clear_parameters<T>(mut self, v: std::option::Option<T>) -> Self
97659    where
97660        T: std::convert::Into<crate::model::Schema>,
97661    {
97662        self.parameters = v.map(|x| x.into());
97663        self
97664    }
97665
97666    /// Sets the value of [parameters_json_schema][crate::model::FunctionDeclaration::parameters_json_schema].
97667    pub fn set_parameters_json_schema<T>(mut self, v: T) -> Self
97668    where
97669        T: std::convert::Into<wkt::Value>,
97670    {
97671        self.parameters_json_schema = std::option::Option::Some(v.into());
97672        self
97673    }
97674
97675    /// Sets or clears the value of [parameters_json_schema][crate::model::FunctionDeclaration::parameters_json_schema].
97676    pub fn set_or_clear_parameters_json_schema<T>(mut self, v: std::option::Option<T>) -> Self
97677    where
97678        T: std::convert::Into<wkt::Value>,
97679    {
97680        self.parameters_json_schema = v.map(|x| x.into());
97681        self
97682    }
97683
97684    /// Sets the value of [response][crate::model::FunctionDeclaration::response].
97685    pub fn set_response<T>(mut self, v: T) -> Self
97686    where
97687        T: std::convert::Into<crate::model::Schema>,
97688    {
97689        self.response = std::option::Option::Some(v.into());
97690        self
97691    }
97692
97693    /// Sets or clears the value of [response][crate::model::FunctionDeclaration::response].
97694    pub fn set_or_clear_response<T>(mut self, v: std::option::Option<T>) -> Self
97695    where
97696        T: std::convert::Into<crate::model::Schema>,
97697    {
97698        self.response = v.map(|x| x.into());
97699        self
97700    }
97701
97702    /// Sets the value of [response_json_schema][crate::model::FunctionDeclaration::response_json_schema].
97703    pub fn set_response_json_schema<T>(mut self, v: T) -> Self
97704    where
97705        T: std::convert::Into<wkt::Value>,
97706    {
97707        self.response_json_schema = std::option::Option::Some(v.into());
97708        self
97709    }
97710
97711    /// Sets or clears the value of [response_json_schema][crate::model::FunctionDeclaration::response_json_schema].
97712    pub fn set_or_clear_response_json_schema<T>(mut self, v: std::option::Option<T>) -> Self
97713    where
97714        T: std::convert::Into<wkt::Value>,
97715    {
97716        self.response_json_schema = v.map(|x| x.into());
97717        self
97718    }
97719}
97720
97721#[cfg(any(
97722    feature = "gen-ai-cache-service",
97723    feature = "llm-utility-service",
97724    feature = "prediction-service",
97725))]
97726impl wkt::message::Message for FunctionDeclaration {
97727    fn typename() -> &'static str {
97728        "type.googleapis.com/google.cloud.aiplatform.v1.FunctionDeclaration"
97729    }
97730}
97731
97732/// A predicted [FunctionCall] returned from the model that contains a string
97733/// representing the [FunctionDeclaration.name] and a structured JSON object
97734/// containing the parameters and their values.
97735#[cfg(any(
97736    feature = "data-foundry-service",
97737    feature = "gen-ai-cache-service",
97738    feature = "gen-ai-tuning-service",
97739    feature = "llm-utility-service",
97740    feature = "prediction-service",
97741    feature = "vertex-rag-service",
97742))]
97743#[derive(Clone, Default, PartialEq)]
97744#[non_exhaustive]
97745pub struct FunctionCall {
97746    /// Required. The name of the function to call.
97747    /// Matches [FunctionDeclaration.name].
97748    pub name: std::string::String,
97749
97750    /// Optional. Required. The function parameters and values in JSON object
97751    /// format. See [FunctionDeclaration.parameters] for parameter details.
97752    pub args: std::option::Option<wkt::Struct>,
97753
97754    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
97755}
97756
97757#[cfg(any(
97758    feature = "data-foundry-service",
97759    feature = "gen-ai-cache-service",
97760    feature = "gen-ai-tuning-service",
97761    feature = "llm-utility-service",
97762    feature = "prediction-service",
97763    feature = "vertex-rag-service",
97764))]
97765impl FunctionCall {
97766    pub fn new() -> Self {
97767        std::default::Default::default()
97768    }
97769
97770    /// Sets the value of [name][crate::model::FunctionCall::name].
97771    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
97772        self.name = v.into();
97773        self
97774    }
97775
97776    /// Sets the value of [args][crate::model::FunctionCall::args].
97777    pub fn set_args<T>(mut self, v: T) -> Self
97778    where
97779        T: std::convert::Into<wkt::Struct>,
97780    {
97781        self.args = std::option::Option::Some(v.into());
97782        self
97783    }
97784
97785    /// Sets or clears the value of [args][crate::model::FunctionCall::args].
97786    pub fn set_or_clear_args<T>(mut self, v: std::option::Option<T>) -> Self
97787    where
97788        T: std::convert::Into<wkt::Struct>,
97789    {
97790        self.args = v.map(|x| x.into());
97791        self
97792    }
97793}
97794
97795#[cfg(any(
97796    feature = "data-foundry-service",
97797    feature = "gen-ai-cache-service",
97798    feature = "gen-ai-tuning-service",
97799    feature = "llm-utility-service",
97800    feature = "prediction-service",
97801    feature = "vertex-rag-service",
97802))]
97803impl wkt::message::Message for FunctionCall {
97804    fn typename() -> &'static str {
97805        "type.googleapis.com/google.cloud.aiplatform.v1.FunctionCall"
97806    }
97807}
97808
97809/// The result output from a [FunctionCall] that contains a string representing
97810/// the [FunctionDeclaration.name] and a structured JSON object containing any
97811/// output from the function is used as context to the model. This should contain
97812/// the result of a [FunctionCall] made based on model prediction.
97813#[cfg(any(
97814    feature = "data-foundry-service",
97815    feature = "gen-ai-cache-service",
97816    feature = "gen-ai-tuning-service",
97817    feature = "llm-utility-service",
97818    feature = "prediction-service",
97819    feature = "vertex-rag-service",
97820))]
97821#[derive(Clone, Default, PartialEq)]
97822#[non_exhaustive]
97823pub struct FunctionResponse {
97824    /// Required. The name of the function to call.
97825    /// Matches [FunctionDeclaration.name] and [FunctionCall.name].
97826    pub name: std::string::String,
97827
97828    /// Required. The function response in JSON object format.
97829    /// Use "output" key to specify function output and "error" key to specify
97830    /// error details (if any). If "output" and "error" keys are not specified,
97831    /// then whole "response" is treated as function output.
97832    pub response: std::option::Option<wkt::Struct>,
97833
97834    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
97835}
97836
97837#[cfg(any(
97838    feature = "data-foundry-service",
97839    feature = "gen-ai-cache-service",
97840    feature = "gen-ai-tuning-service",
97841    feature = "llm-utility-service",
97842    feature = "prediction-service",
97843    feature = "vertex-rag-service",
97844))]
97845impl FunctionResponse {
97846    pub fn new() -> Self {
97847        std::default::Default::default()
97848    }
97849
97850    /// Sets the value of [name][crate::model::FunctionResponse::name].
97851    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
97852        self.name = v.into();
97853        self
97854    }
97855
97856    /// Sets the value of [response][crate::model::FunctionResponse::response].
97857    pub fn set_response<T>(mut self, v: T) -> Self
97858    where
97859        T: std::convert::Into<wkt::Struct>,
97860    {
97861        self.response = std::option::Option::Some(v.into());
97862        self
97863    }
97864
97865    /// Sets or clears the value of [response][crate::model::FunctionResponse::response].
97866    pub fn set_or_clear_response<T>(mut self, v: std::option::Option<T>) -> Self
97867    where
97868        T: std::convert::Into<wkt::Struct>,
97869    {
97870        self.response = v.map(|x| x.into());
97871        self
97872    }
97873}
97874
97875#[cfg(any(
97876    feature = "data-foundry-service",
97877    feature = "gen-ai-cache-service",
97878    feature = "gen-ai-tuning-service",
97879    feature = "llm-utility-service",
97880    feature = "prediction-service",
97881    feature = "vertex-rag-service",
97882))]
97883impl wkt::message::Message for FunctionResponse {
97884    fn typename() -> &'static str {
97885        "type.googleapis.com/google.cloud.aiplatform.v1.FunctionResponse"
97886    }
97887}
97888
97889/// Code generated by the model that is meant to be executed, and the result
97890/// returned to the model.
97891///
97892/// Generated when using the [FunctionDeclaration] tool and
97893/// [FunctionCallingConfig] mode is set to [Mode.CODE].
97894#[cfg(any(
97895    feature = "data-foundry-service",
97896    feature = "gen-ai-cache-service",
97897    feature = "gen-ai-tuning-service",
97898    feature = "llm-utility-service",
97899    feature = "prediction-service",
97900    feature = "vertex-rag-service",
97901))]
97902#[derive(Clone, Default, PartialEq)]
97903#[non_exhaustive]
97904pub struct ExecutableCode {
97905    /// Required. Programming language of the `code`.
97906    pub language: crate::model::executable_code::Language,
97907
97908    /// Required. The code to be executed.
97909    pub code: std::string::String,
97910
97911    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
97912}
97913
97914#[cfg(any(
97915    feature = "data-foundry-service",
97916    feature = "gen-ai-cache-service",
97917    feature = "gen-ai-tuning-service",
97918    feature = "llm-utility-service",
97919    feature = "prediction-service",
97920    feature = "vertex-rag-service",
97921))]
97922impl ExecutableCode {
97923    pub fn new() -> Self {
97924        std::default::Default::default()
97925    }
97926
97927    /// Sets the value of [language][crate::model::ExecutableCode::language].
97928    pub fn set_language<T: std::convert::Into<crate::model::executable_code::Language>>(
97929        mut self,
97930        v: T,
97931    ) -> Self {
97932        self.language = v.into();
97933        self
97934    }
97935
97936    /// Sets the value of [code][crate::model::ExecutableCode::code].
97937    pub fn set_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
97938        self.code = v.into();
97939        self
97940    }
97941}
97942
97943#[cfg(any(
97944    feature = "data-foundry-service",
97945    feature = "gen-ai-cache-service",
97946    feature = "gen-ai-tuning-service",
97947    feature = "llm-utility-service",
97948    feature = "prediction-service",
97949    feature = "vertex-rag-service",
97950))]
97951impl wkt::message::Message for ExecutableCode {
97952    fn typename() -> &'static str {
97953        "type.googleapis.com/google.cloud.aiplatform.v1.ExecutableCode"
97954    }
97955}
97956
97957/// Defines additional types related to [ExecutableCode].
97958#[cfg(any(
97959    feature = "data-foundry-service",
97960    feature = "gen-ai-cache-service",
97961    feature = "gen-ai-tuning-service",
97962    feature = "llm-utility-service",
97963    feature = "prediction-service",
97964    feature = "vertex-rag-service",
97965))]
97966pub mod executable_code {
97967    #[allow(unused_imports)]
97968    use super::*;
97969
97970    /// Supported programming languages for the generated code.
97971    ///
97972    /// # Working with unknown values
97973    ///
97974    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
97975    /// additional enum variants at any time. Adding new variants is not considered
97976    /// a breaking change. Applications should write their code in anticipation of:
97977    ///
97978    /// - New values appearing in future releases of the client library, **and**
97979    /// - New values received dynamically, without application changes.
97980    ///
97981    /// Please consult the [Working with enums] section in the user guide for some
97982    /// guidelines.
97983    ///
97984    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
97985    #[cfg(any(
97986        feature = "data-foundry-service",
97987        feature = "gen-ai-cache-service",
97988        feature = "gen-ai-tuning-service",
97989        feature = "llm-utility-service",
97990        feature = "prediction-service",
97991        feature = "vertex-rag-service",
97992    ))]
97993    #[derive(Clone, Debug, PartialEq)]
97994    #[non_exhaustive]
97995    pub enum Language {
97996        /// Unspecified language. This value should not be used.
97997        Unspecified,
97998        /// Python >= 3.10, with numpy and simpy available.
97999        Python,
98000        /// If set, the enum was initialized with an unknown value.
98001        ///
98002        /// Applications can examine the value using [Language::value] or
98003        /// [Language::name].
98004        UnknownValue(language::UnknownValue),
98005    }
98006
98007    #[doc(hidden)]
98008    #[cfg(any(
98009        feature = "data-foundry-service",
98010        feature = "gen-ai-cache-service",
98011        feature = "gen-ai-tuning-service",
98012        feature = "llm-utility-service",
98013        feature = "prediction-service",
98014        feature = "vertex-rag-service",
98015    ))]
98016    pub mod language {
98017        #[allow(unused_imports)]
98018        use super::*;
98019        #[derive(Clone, Debug, PartialEq)]
98020        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
98021    }
98022
98023    #[cfg(any(
98024        feature = "data-foundry-service",
98025        feature = "gen-ai-cache-service",
98026        feature = "gen-ai-tuning-service",
98027        feature = "llm-utility-service",
98028        feature = "prediction-service",
98029        feature = "vertex-rag-service",
98030    ))]
98031    impl Language {
98032        /// Gets the enum value.
98033        ///
98034        /// Returns `None` if the enum contains an unknown value deserialized from
98035        /// the string representation of enums.
98036        pub fn value(&self) -> std::option::Option<i32> {
98037            match self {
98038                Self::Unspecified => std::option::Option::Some(0),
98039                Self::Python => std::option::Option::Some(1),
98040                Self::UnknownValue(u) => u.0.value(),
98041            }
98042        }
98043
98044        /// Gets the enum value as a string.
98045        ///
98046        /// Returns `None` if the enum contains an unknown value deserialized from
98047        /// the integer representation of enums.
98048        pub fn name(&self) -> std::option::Option<&str> {
98049            match self {
98050                Self::Unspecified => std::option::Option::Some("LANGUAGE_UNSPECIFIED"),
98051                Self::Python => std::option::Option::Some("PYTHON"),
98052                Self::UnknownValue(u) => u.0.name(),
98053            }
98054        }
98055    }
98056
98057    #[cfg(any(
98058        feature = "data-foundry-service",
98059        feature = "gen-ai-cache-service",
98060        feature = "gen-ai-tuning-service",
98061        feature = "llm-utility-service",
98062        feature = "prediction-service",
98063        feature = "vertex-rag-service",
98064    ))]
98065    impl std::default::Default for Language {
98066        fn default() -> Self {
98067            use std::convert::From;
98068            Self::from(0)
98069        }
98070    }
98071
98072    #[cfg(any(
98073        feature = "data-foundry-service",
98074        feature = "gen-ai-cache-service",
98075        feature = "gen-ai-tuning-service",
98076        feature = "llm-utility-service",
98077        feature = "prediction-service",
98078        feature = "vertex-rag-service",
98079    ))]
98080    impl std::fmt::Display for Language {
98081        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
98082            wkt::internal::display_enum(f, self.name(), self.value())
98083        }
98084    }
98085
98086    #[cfg(any(
98087        feature = "data-foundry-service",
98088        feature = "gen-ai-cache-service",
98089        feature = "gen-ai-tuning-service",
98090        feature = "llm-utility-service",
98091        feature = "prediction-service",
98092        feature = "vertex-rag-service",
98093    ))]
98094    impl std::convert::From<i32> for Language {
98095        fn from(value: i32) -> Self {
98096            match value {
98097                0 => Self::Unspecified,
98098                1 => Self::Python,
98099                _ => Self::UnknownValue(language::UnknownValue(
98100                    wkt::internal::UnknownEnumValue::Integer(value),
98101                )),
98102            }
98103        }
98104    }
98105
98106    #[cfg(any(
98107        feature = "data-foundry-service",
98108        feature = "gen-ai-cache-service",
98109        feature = "gen-ai-tuning-service",
98110        feature = "llm-utility-service",
98111        feature = "prediction-service",
98112        feature = "vertex-rag-service",
98113    ))]
98114    impl std::convert::From<&str> for Language {
98115        fn from(value: &str) -> Self {
98116            use std::string::ToString;
98117            match value {
98118                "LANGUAGE_UNSPECIFIED" => Self::Unspecified,
98119                "PYTHON" => Self::Python,
98120                _ => Self::UnknownValue(language::UnknownValue(
98121                    wkt::internal::UnknownEnumValue::String(value.to_string()),
98122                )),
98123            }
98124        }
98125    }
98126
98127    #[cfg(any(
98128        feature = "data-foundry-service",
98129        feature = "gen-ai-cache-service",
98130        feature = "gen-ai-tuning-service",
98131        feature = "llm-utility-service",
98132        feature = "prediction-service",
98133        feature = "vertex-rag-service",
98134    ))]
98135    impl serde::ser::Serialize for Language {
98136        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
98137        where
98138            S: serde::Serializer,
98139        {
98140            match self {
98141                Self::Unspecified => serializer.serialize_i32(0),
98142                Self::Python => serializer.serialize_i32(1),
98143                Self::UnknownValue(u) => u.0.serialize(serializer),
98144            }
98145        }
98146    }
98147
98148    #[cfg(any(
98149        feature = "data-foundry-service",
98150        feature = "gen-ai-cache-service",
98151        feature = "gen-ai-tuning-service",
98152        feature = "llm-utility-service",
98153        feature = "prediction-service",
98154        feature = "vertex-rag-service",
98155    ))]
98156    impl<'de> serde::de::Deserialize<'de> for Language {
98157        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
98158        where
98159            D: serde::Deserializer<'de>,
98160        {
98161            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Language>::new(
98162                ".google.cloud.aiplatform.v1.ExecutableCode.Language",
98163            ))
98164        }
98165    }
98166}
98167
98168/// Result of executing the [ExecutableCode].
98169///
98170/// Always follows a `part` containing the [ExecutableCode].
98171#[cfg(any(
98172    feature = "data-foundry-service",
98173    feature = "gen-ai-cache-service",
98174    feature = "gen-ai-tuning-service",
98175    feature = "llm-utility-service",
98176    feature = "prediction-service",
98177    feature = "vertex-rag-service",
98178))]
98179#[derive(Clone, Default, PartialEq)]
98180#[non_exhaustive]
98181pub struct CodeExecutionResult {
98182    /// Required. Outcome of the code execution.
98183    pub outcome: crate::model::code_execution_result::Outcome,
98184
98185    /// Optional. Contains stdout when code execution is successful, stderr or
98186    /// other description otherwise.
98187    pub output: std::string::String,
98188
98189    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
98190}
98191
98192#[cfg(any(
98193    feature = "data-foundry-service",
98194    feature = "gen-ai-cache-service",
98195    feature = "gen-ai-tuning-service",
98196    feature = "llm-utility-service",
98197    feature = "prediction-service",
98198    feature = "vertex-rag-service",
98199))]
98200impl CodeExecutionResult {
98201    pub fn new() -> Self {
98202        std::default::Default::default()
98203    }
98204
98205    /// Sets the value of [outcome][crate::model::CodeExecutionResult::outcome].
98206    pub fn set_outcome<T: std::convert::Into<crate::model::code_execution_result::Outcome>>(
98207        mut self,
98208        v: T,
98209    ) -> Self {
98210        self.outcome = v.into();
98211        self
98212    }
98213
98214    /// Sets the value of [output][crate::model::CodeExecutionResult::output].
98215    pub fn set_output<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
98216        self.output = v.into();
98217        self
98218    }
98219}
98220
98221#[cfg(any(
98222    feature = "data-foundry-service",
98223    feature = "gen-ai-cache-service",
98224    feature = "gen-ai-tuning-service",
98225    feature = "llm-utility-service",
98226    feature = "prediction-service",
98227    feature = "vertex-rag-service",
98228))]
98229impl wkt::message::Message for CodeExecutionResult {
98230    fn typename() -> &'static str {
98231        "type.googleapis.com/google.cloud.aiplatform.v1.CodeExecutionResult"
98232    }
98233}
98234
98235/// Defines additional types related to [CodeExecutionResult].
98236#[cfg(any(
98237    feature = "data-foundry-service",
98238    feature = "gen-ai-cache-service",
98239    feature = "gen-ai-tuning-service",
98240    feature = "llm-utility-service",
98241    feature = "prediction-service",
98242    feature = "vertex-rag-service",
98243))]
98244pub mod code_execution_result {
98245    #[allow(unused_imports)]
98246    use super::*;
98247
98248    /// Enumeration of possible outcomes of the code execution.
98249    ///
98250    /// # Working with unknown values
98251    ///
98252    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
98253    /// additional enum variants at any time. Adding new variants is not considered
98254    /// a breaking change. Applications should write their code in anticipation of:
98255    ///
98256    /// - New values appearing in future releases of the client library, **and**
98257    /// - New values received dynamically, without application changes.
98258    ///
98259    /// Please consult the [Working with enums] section in the user guide for some
98260    /// guidelines.
98261    ///
98262    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
98263    #[cfg(any(
98264        feature = "data-foundry-service",
98265        feature = "gen-ai-cache-service",
98266        feature = "gen-ai-tuning-service",
98267        feature = "llm-utility-service",
98268        feature = "prediction-service",
98269        feature = "vertex-rag-service",
98270    ))]
98271    #[derive(Clone, Debug, PartialEq)]
98272    #[non_exhaustive]
98273    pub enum Outcome {
98274        /// Unspecified status. This value should not be used.
98275        Unspecified,
98276        /// Code execution completed successfully.
98277        Ok,
98278        /// Code execution finished but with a failure. `stderr` should contain the
98279        /// reason.
98280        Failed,
98281        /// Code execution ran for too long, and was cancelled. There may or may not
98282        /// be a partial output present.
98283        DeadlineExceeded,
98284        /// If set, the enum was initialized with an unknown value.
98285        ///
98286        /// Applications can examine the value using [Outcome::value] or
98287        /// [Outcome::name].
98288        UnknownValue(outcome::UnknownValue),
98289    }
98290
98291    #[doc(hidden)]
98292    #[cfg(any(
98293        feature = "data-foundry-service",
98294        feature = "gen-ai-cache-service",
98295        feature = "gen-ai-tuning-service",
98296        feature = "llm-utility-service",
98297        feature = "prediction-service",
98298        feature = "vertex-rag-service",
98299    ))]
98300    pub mod outcome {
98301        #[allow(unused_imports)]
98302        use super::*;
98303        #[derive(Clone, Debug, PartialEq)]
98304        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
98305    }
98306
98307    #[cfg(any(
98308        feature = "data-foundry-service",
98309        feature = "gen-ai-cache-service",
98310        feature = "gen-ai-tuning-service",
98311        feature = "llm-utility-service",
98312        feature = "prediction-service",
98313        feature = "vertex-rag-service",
98314    ))]
98315    impl Outcome {
98316        /// Gets the enum value.
98317        ///
98318        /// Returns `None` if the enum contains an unknown value deserialized from
98319        /// the string representation of enums.
98320        pub fn value(&self) -> std::option::Option<i32> {
98321            match self {
98322                Self::Unspecified => std::option::Option::Some(0),
98323                Self::Ok => std::option::Option::Some(1),
98324                Self::Failed => std::option::Option::Some(2),
98325                Self::DeadlineExceeded => std::option::Option::Some(3),
98326                Self::UnknownValue(u) => u.0.value(),
98327            }
98328        }
98329
98330        /// Gets the enum value as a string.
98331        ///
98332        /// Returns `None` if the enum contains an unknown value deserialized from
98333        /// the integer representation of enums.
98334        pub fn name(&self) -> std::option::Option<&str> {
98335            match self {
98336                Self::Unspecified => std::option::Option::Some("OUTCOME_UNSPECIFIED"),
98337                Self::Ok => std::option::Option::Some("OUTCOME_OK"),
98338                Self::Failed => std::option::Option::Some("OUTCOME_FAILED"),
98339                Self::DeadlineExceeded => std::option::Option::Some("OUTCOME_DEADLINE_EXCEEDED"),
98340                Self::UnknownValue(u) => u.0.name(),
98341            }
98342        }
98343    }
98344
98345    #[cfg(any(
98346        feature = "data-foundry-service",
98347        feature = "gen-ai-cache-service",
98348        feature = "gen-ai-tuning-service",
98349        feature = "llm-utility-service",
98350        feature = "prediction-service",
98351        feature = "vertex-rag-service",
98352    ))]
98353    impl std::default::Default for Outcome {
98354        fn default() -> Self {
98355            use std::convert::From;
98356            Self::from(0)
98357        }
98358    }
98359
98360    #[cfg(any(
98361        feature = "data-foundry-service",
98362        feature = "gen-ai-cache-service",
98363        feature = "gen-ai-tuning-service",
98364        feature = "llm-utility-service",
98365        feature = "prediction-service",
98366        feature = "vertex-rag-service",
98367    ))]
98368    impl std::fmt::Display for Outcome {
98369        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
98370            wkt::internal::display_enum(f, self.name(), self.value())
98371        }
98372    }
98373
98374    #[cfg(any(
98375        feature = "data-foundry-service",
98376        feature = "gen-ai-cache-service",
98377        feature = "gen-ai-tuning-service",
98378        feature = "llm-utility-service",
98379        feature = "prediction-service",
98380        feature = "vertex-rag-service",
98381    ))]
98382    impl std::convert::From<i32> for Outcome {
98383        fn from(value: i32) -> Self {
98384            match value {
98385                0 => Self::Unspecified,
98386                1 => Self::Ok,
98387                2 => Self::Failed,
98388                3 => Self::DeadlineExceeded,
98389                _ => Self::UnknownValue(outcome::UnknownValue(
98390                    wkt::internal::UnknownEnumValue::Integer(value),
98391                )),
98392            }
98393        }
98394    }
98395
98396    #[cfg(any(
98397        feature = "data-foundry-service",
98398        feature = "gen-ai-cache-service",
98399        feature = "gen-ai-tuning-service",
98400        feature = "llm-utility-service",
98401        feature = "prediction-service",
98402        feature = "vertex-rag-service",
98403    ))]
98404    impl std::convert::From<&str> for Outcome {
98405        fn from(value: &str) -> Self {
98406            use std::string::ToString;
98407            match value {
98408                "OUTCOME_UNSPECIFIED" => Self::Unspecified,
98409                "OUTCOME_OK" => Self::Ok,
98410                "OUTCOME_FAILED" => Self::Failed,
98411                "OUTCOME_DEADLINE_EXCEEDED" => Self::DeadlineExceeded,
98412                _ => Self::UnknownValue(outcome::UnknownValue(
98413                    wkt::internal::UnknownEnumValue::String(value.to_string()),
98414                )),
98415            }
98416        }
98417    }
98418
98419    #[cfg(any(
98420        feature = "data-foundry-service",
98421        feature = "gen-ai-cache-service",
98422        feature = "gen-ai-tuning-service",
98423        feature = "llm-utility-service",
98424        feature = "prediction-service",
98425        feature = "vertex-rag-service",
98426    ))]
98427    impl serde::ser::Serialize for Outcome {
98428        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
98429        where
98430            S: serde::Serializer,
98431        {
98432            match self {
98433                Self::Unspecified => serializer.serialize_i32(0),
98434                Self::Ok => serializer.serialize_i32(1),
98435                Self::Failed => serializer.serialize_i32(2),
98436                Self::DeadlineExceeded => serializer.serialize_i32(3),
98437                Self::UnknownValue(u) => u.0.serialize(serializer),
98438            }
98439        }
98440    }
98441
98442    #[cfg(any(
98443        feature = "data-foundry-service",
98444        feature = "gen-ai-cache-service",
98445        feature = "gen-ai-tuning-service",
98446        feature = "llm-utility-service",
98447        feature = "prediction-service",
98448        feature = "vertex-rag-service",
98449    ))]
98450    impl<'de> serde::de::Deserialize<'de> for Outcome {
98451        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
98452        where
98453            D: serde::Deserializer<'de>,
98454        {
98455            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Outcome>::new(
98456                ".google.cloud.aiplatform.v1.CodeExecutionResult.Outcome",
98457            ))
98458        }
98459    }
98460}
98461
98462/// Defines a retrieval tool that model can call to access external knowledge.
98463#[cfg(any(
98464    feature = "gen-ai-cache-service",
98465    feature = "llm-utility-service",
98466    feature = "prediction-service",
98467))]
98468#[derive(Clone, Default, PartialEq)]
98469#[non_exhaustive]
98470pub struct Retrieval {
98471    /// Optional. Deprecated. This option is no longer supported.
98472    #[deprecated]
98473    pub disable_attribution: bool,
98474
98475    /// The source of the retrieval.
98476    pub source: std::option::Option<crate::model::retrieval::Source>,
98477
98478    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
98479}
98480
98481#[cfg(any(
98482    feature = "gen-ai-cache-service",
98483    feature = "llm-utility-service",
98484    feature = "prediction-service",
98485))]
98486impl Retrieval {
98487    pub fn new() -> Self {
98488        std::default::Default::default()
98489    }
98490
98491    /// Sets the value of [disable_attribution][crate::model::Retrieval::disable_attribution].
98492    #[deprecated]
98493    pub fn set_disable_attribution<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
98494        self.disable_attribution = v.into();
98495        self
98496    }
98497
98498    /// Sets the value of [source][crate::model::Retrieval::source].
98499    ///
98500    /// Note that all the setters affecting `source` are mutually
98501    /// exclusive.
98502    pub fn set_source<
98503        T: std::convert::Into<std::option::Option<crate::model::retrieval::Source>>,
98504    >(
98505        mut self,
98506        v: T,
98507    ) -> Self {
98508        self.source = v.into();
98509        self
98510    }
98511
98512    /// The value of [source][crate::model::Retrieval::source]
98513    /// if it holds a `VertexAiSearch`, `None` if the field is not set or
98514    /// holds a different branch.
98515    pub fn vertex_ai_search(
98516        &self,
98517    ) -> std::option::Option<&std::boxed::Box<crate::model::VertexAISearch>> {
98518        #[allow(unreachable_patterns)]
98519        self.source.as_ref().and_then(|v| match v {
98520            crate::model::retrieval::Source::VertexAiSearch(v) => std::option::Option::Some(v),
98521            _ => std::option::Option::None,
98522        })
98523    }
98524
98525    /// Sets the value of [source][crate::model::Retrieval::source]
98526    /// to hold a `VertexAiSearch`.
98527    ///
98528    /// Note that all the setters affecting `source` are
98529    /// mutually exclusive.
98530    pub fn set_vertex_ai_search<
98531        T: std::convert::Into<std::boxed::Box<crate::model::VertexAISearch>>,
98532    >(
98533        mut self,
98534        v: T,
98535    ) -> Self {
98536        self.source =
98537            std::option::Option::Some(crate::model::retrieval::Source::VertexAiSearch(v.into()));
98538        self
98539    }
98540
98541    /// The value of [source][crate::model::Retrieval::source]
98542    /// if it holds a `VertexRagStore`, `None` if the field is not set or
98543    /// holds a different branch.
98544    pub fn vertex_rag_store(
98545        &self,
98546    ) -> std::option::Option<&std::boxed::Box<crate::model::VertexRagStore>> {
98547        #[allow(unreachable_patterns)]
98548        self.source.as_ref().and_then(|v| match v {
98549            crate::model::retrieval::Source::VertexRagStore(v) => std::option::Option::Some(v),
98550            _ => std::option::Option::None,
98551        })
98552    }
98553
98554    /// Sets the value of [source][crate::model::Retrieval::source]
98555    /// to hold a `VertexRagStore`.
98556    ///
98557    /// Note that all the setters affecting `source` are
98558    /// mutually exclusive.
98559    pub fn set_vertex_rag_store<
98560        T: std::convert::Into<std::boxed::Box<crate::model::VertexRagStore>>,
98561    >(
98562        mut self,
98563        v: T,
98564    ) -> Self {
98565        self.source =
98566            std::option::Option::Some(crate::model::retrieval::Source::VertexRagStore(v.into()));
98567        self
98568    }
98569}
98570
98571#[cfg(any(
98572    feature = "gen-ai-cache-service",
98573    feature = "llm-utility-service",
98574    feature = "prediction-service",
98575))]
98576impl wkt::message::Message for Retrieval {
98577    fn typename() -> &'static str {
98578        "type.googleapis.com/google.cloud.aiplatform.v1.Retrieval"
98579    }
98580}
98581
98582/// Defines additional types related to [Retrieval].
98583#[cfg(any(
98584    feature = "gen-ai-cache-service",
98585    feature = "llm-utility-service",
98586    feature = "prediction-service",
98587))]
98588pub mod retrieval {
98589    #[allow(unused_imports)]
98590    use super::*;
98591
98592    /// The source of the retrieval.
98593    #[cfg(any(
98594        feature = "gen-ai-cache-service",
98595        feature = "llm-utility-service",
98596        feature = "prediction-service",
98597    ))]
98598    #[derive(Clone, Debug, PartialEq)]
98599    #[non_exhaustive]
98600    pub enum Source {
98601        /// Set to use data source powered by Vertex AI Search.
98602        VertexAiSearch(std::boxed::Box<crate::model::VertexAISearch>),
98603        /// Set to use data source powered by Vertex RAG store.
98604        /// User data is uploaded via the VertexRagDataService.
98605        VertexRagStore(std::boxed::Box<crate::model::VertexRagStore>),
98606    }
98607}
98608
98609/// Retrieve from Vertex RAG Store for grounding.
98610#[cfg(any(
98611    feature = "gen-ai-cache-service",
98612    feature = "llm-utility-service",
98613    feature = "prediction-service",
98614    feature = "vertex-rag-service",
98615))]
98616#[derive(Clone, Default, PartialEq)]
98617#[non_exhaustive]
98618pub struct VertexRagStore {
98619    /// Optional. The representation of the rag source. It can be used to specify
98620    /// corpus only or ragfiles. Currently only support one corpus or multiple
98621    /// files from one corpus. In the future we may open up multiple corpora
98622    /// support.
98623    pub rag_resources: std::vec::Vec<crate::model::vertex_rag_store::RagResource>,
98624
98625    /// Optional. Number of top k results to return from the selected corpora.
98626    #[deprecated]
98627    pub similarity_top_k: std::option::Option<i32>,
98628
98629    /// Optional. Only return results with vector distance smaller than the
98630    /// threshold.
98631    #[deprecated]
98632    pub vector_distance_threshold: std::option::Option<f64>,
98633
98634    /// Optional. The retrieval config for the Rag query.
98635    pub rag_retrieval_config: std::option::Option<crate::model::RagRetrievalConfig>,
98636
98637    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
98638}
98639
98640#[cfg(any(
98641    feature = "gen-ai-cache-service",
98642    feature = "llm-utility-service",
98643    feature = "prediction-service",
98644    feature = "vertex-rag-service",
98645))]
98646impl VertexRagStore {
98647    pub fn new() -> Self {
98648        std::default::Default::default()
98649    }
98650
98651    /// Sets the value of [rag_resources][crate::model::VertexRagStore::rag_resources].
98652    pub fn set_rag_resources<T, V>(mut self, v: T) -> Self
98653    where
98654        T: std::iter::IntoIterator<Item = V>,
98655        V: std::convert::Into<crate::model::vertex_rag_store::RagResource>,
98656    {
98657        use std::iter::Iterator;
98658        self.rag_resources = v.into_iter().map(|i| i.into()).collect();
98659        self
98660    }
98661
98662    /// Sets the value of [similarity_top_k][crate::model::VertexRagStore::similarity_top_k].
98663    #[deprecated]
98664    pub fn set_similarity_top_k<T>(mut self, v: T) -> Self
98665    where
98666        T: std::convert::Into<i32>,
98667    {
98668        self.similarity_top_k = std::option::Option::Some(v.into());
98669        self
98670    }
98671
98672    /// Sets or clears the value of [similarity_top_k][crate::model::VertexRagStore::similarity_top_k].
98673    #[deprecated]
98674    pub fn set_or_clear_similarity_top_k<T>(mut self, v: std::option::Option<T>) -> Self
98675    where
98676        T: std::convert::Into<i32>,
98677    {
98678        self.similarity_top_k = v.map(|x| x.into());
98679        self
98680    }
98681
98682    /// Sets the value of [vector_distance_threshold][crate::model::VertexRagStore::vector_distance_threshold].
98683    #[deprecated]
98684    pub fn set_vector_distance_threshold<T>(mut self, v: T) -> Self
98685    where
98686        T: std::convert::Into<f64>,
98687    {
98688        self.vector_distance_threshold = std::option::Option::Some(v.into());
98689        self
98690    }
98691
98692    /// Sets or clears the value of [vector_distance_threshold][crate::model::VertexRagStore::vector_distance_threshold].
98693    #[deprecated]
98694    pub fn set_or_clear_vector_distance_threshold<T>(mut self, v: std::option::Option<T>) -> Self
98695    where
98696        T: std::convert::Into<f64>,
98697    {
98698        self.vector_distance_threshold = v.map(|x| x.into());
98699        self
98700    }
98701
98702    /// Sets the value of [rag_retrieval_config][crate::model::VertexRagStore::rag_retrieval_config].
98703    pub fn set_rag_retrieval_config<T>(mut self, v: T) -> Self
98704    where
98705        T: std::convert::Into<crate::model::RagRetrievalConfig>,
98706    {
98707        self.rag_retrieval_config = std::option::Option::Some(v.into());
98708        self
98709    }
98710
98711    /// Sets or clears the value of [rag_retrieval_config][crate::model::VertexRagStore::rag_retrieval_config].
98712    pub fn set_or_clear_rag_retrieval_config<T>(mut self, v: std::option::Option<T>) -> Self
98713    where
98714        T: std::convert::Into<crate::model::RagRetrievalConfig>,
98715    {
98716        self.rag_retrieval_config = v.map(|x| x.into());
98717        self
98718    }
98719}
98720
98721#[cfg(any(
98722    feature = "gen-ai-cache-service",
98723    feature = "llm-utility-service",
98724    feature = "prediction-service",
98725    feature = "vertex-rag-service",
98726))]
98727impl wkt::message::Message for VertexRagStore {
98728    fn typename() -> &'static str {
98729        "type.googleapis.com/google.cloud.aiplatform.v1.VertexRagStore"
98730    }
98731}
98732
98733/// Defines additional types related to [VertexRagStore].
98734#[cfg(any(
98735    feature = "gen-ai-cache-service",
98736    feature = "llm-utility-service",
98737    feature = "prediction-service",
98738    feature = "vertex-rag-service",
98739))]
98740pub mod vertex_rag_store {
98741    #[allow(unused_imports)]
98742    use super::*;
98743
98744    /// The definition of the Rag resource.
98745    #[cfg(any(
98746        feature = "gen-ai-cache-service",
98747        feature = "llm-utility-service",
98748        feature = "prediction-service",
98749        feature = "vertex-rag-service",
98750    ))]
98751    #[derive(Clone, Default, PartialEq)]
98752    #[non_exhaustive]
98753    pub struct RagResource {
98754        /// Optional. RagCorpora resource name.
98755        /// Format:
98756        /// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
98757        pub rag_corpus: std::string::String,
98758
98759        /// Optional. rag_file_id. The files should be in the same rag_corpus set in
98760        /// rag_corpus field.
98761        pub rag_file_ids: std::vec::Vec<std::string::String>,
98762
98763        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
98764    }
98765
98766    #[cfg(any(
98767        feature = "gen-ai-cache-service",
98768        feature = "llm-utility-service",
98769        feature = "prediction-service",
98770        feature = "vertex-rag-service",
98771    ))]
98772    impl RagResource {
98773        pub fn new() -> Self {
98774            std::default::Default::default()
98775        }
98776
98777        /// Sets the value of [rag_corpus][crate::model::vertex_rag_store::RagResource::rag_corpus].
98778        pub fn set_rag_corpus<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
98779            self.rag_corpus = v.into();
98780            self
98781        }
98782
98783        /// Sets the value of [rag_file_ids][crate::model::vertex_rag_store::RagResource::rag_file_ids].
98784        pub fn set_rag_file_ids<T, V>(mut self, v: T) -> Self
98785        where
98786            T: std::iter::IntoIterator<Item = V>,
98787            V: std::convert::Into<std::string::String>,
98788        {
98789            use std::iter::Iterator;
98790            self.rag_file_ids = v.into_iter().map(|i| i.into()).collect();
98791            self
98792        }
98793    }
98794
98795    #[cfg(any(
98796        feature = "gen-ai-cache-service",
98797        feature = "llm-utility-service",
98798        feature = "prediction-service",
98799        feature = "vertex-rag-service",
98800    ))]
98801    impl wkt::message::Message for RagResource {
98802        fn typename() -> &'static str {
98803            "type.googleapis.com/google.cloud.aiplatform.v1.VertexRagStore.RagResource"
98804        }
98805    }
98806}
98807
98808/// Retrieve from Vertex AI Search datastore or engine for grounding.
98809/// datastore and engine are mutually exclusive.
98810/// See <https://cloud.google.com/products/agent-builder>
98811#[cfg(any(
98812    feature = "gen-ai-cache-service",
98813    feature = "llm-utility-service",
98814    feature = "prediction-service",
98815))]
98816#[derive(Clone, Default, PartialEq)]
98817#[non_exhaustive]
98818pub struct VertexAISearch {
98819    /// Optional. Fully-qualified Vertex AI Search data store resource ID.
98820    /// Format:
98821    /// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
98822    pub datastore: std::string::String,
98823
98824    /// Optional. Fully-qualified Vertex AI Search engine resource ID.
98825    /// Format:
98826    /// `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
98827    pub engine: std::string::String,
98828
98829    /// Optional. Number of search results to return per query.
98830    /// The default value is 10.
98831    /// The maximumm allowed value is 10.
98832    pub max_results: i32,
98833
98834    /// Optional. Filter strings to be passed to the search API.
98835    pub filter: std::string::String,
98836
98837    /// Specifications that define the specific DataStores to be searched, along
98838    /// with configurations for those data stores. This is only considered for
98839    /// Engines with multiple data stores.
98840    /// It should only be set if engine is used.
98841    pub data_store_specs: std::vec::Vec<crate::model::vertex_ai_search::DataStoreSpec>,
98842
98843    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
98844}
98845
98846#[cfg(any(
98847    feature = "gen-ai-cache-service",
98848    feature = "llm-utility-service",
98849    feature = "prediction-service",
98850))]
98851impl VertexAISearch {
98852    pub fn new() -> Self {
98853        std::default::Default::default()
98854    }
98855
98856    /// Sets the value of [datastore][crate::model::VertexAISearch::datastore].
98857    pub fn set_datastore<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
98858        self.datastore = v.into();
98859        self
98860    }
98861
98862    /// Sets the value of [engine][crate::model::VertexAISearch::engine].
98863    pub fn set_engine<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
98864        self.engine = v.into();
98865        self
98866    }
98867
98868    /// Sets the value of [max_results][crate::model::VertexAISearch::max_results].
98869    pub fn set_max_results<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
98870        self.max_results = v.into();
98871        self
98872    }
98873
98874    /// Sets the value of [filter][crate::model::VertexAISearch::filter].
98875    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
98876        self.filter = v.into();
98877        self
98878    }
98879
98880    /// Sets the value of [data_store_specs][crate::model::VertexAISearch::data_store_specs].
98881    pub fn set_data_store_specs<T, V>(mut self, v: T) -> Self
98882    where
98883        T: std::iter::IntoIterator<Item = V>,
98884        V: std::convert::Into<crate::model::vertex_ai_search::DataStoreSpec>,
98885    {
98886        use std::iter::Iterator;
98887        self.data_store_specs = v.into_iter().map(|i| i.into()).collect();
98888        self
98889    }
98890}
98891
98892#[cfg(any(
98893    feature = "gen-ai-cache-service",
98894    feature = "llm-utility-service",
98895    feature = "prediction-service",
98896))]
98897impl wkt::message::Message for VertexAISearch {
98898    fn typename() -> &'static str {
98899        "type.googleapis.com/google.cloud.aiplatform.v1.VertexAISearch"
98900    }
98901}
98902
98903/// Defines additional types related to [VertexAISearch].
98904#[cfg(any(
98905    feature = "gen-ai-cache-service",
98906    feature = "llm-utility-service",
98907    feature = "prediction-service",
98908))]
98909pub mod vertex_ai_search {
98910    #[allow(unused_imports)]
98911    use super::*;
98912
98913    /// Define data stores within engine to filter on in a search call and
98914    /// configurations for those data stores. For more information, see
98915    /// <https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec>
98916    #[cfg(any(
98917        feature = "gen-ai-cache-service",
98918        feature = "llm-utility-service",
98919        feature = "prediction-service",
98920    ))]
98921    #[derive(Clone, Default, PartialEq)]
98922    #[non_exhaustive]
98923    pub struct DataStoreSpec {
98924        /// Full resource name of DataStore, such as
98925        /// Format:
98926        /// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
98927        pub data_store: std::string::String,
98928
98929        /// Optional. Filter specification to filter documents in the data store
98930        /// specified by data_store field. For more information on filtering, see
98931        /// [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
98932        pub filter: std::string::String,
98933
98934        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
98935    }
98936
98937    #[cfg(any(
98938        feature = "gen-ai-cache-service",
98939        feature = "llm-utility-service",
98940        feature = "prediction-service",
98941    ))]
98942    impl DataStoreSpec {
98943        pub fn new() -> Self {
98944            std::default::Default::default()
98945        }
98946
98947        /// Sets the value of [data_store][crate::model::vertex_ai_search::DataStoreSpec::data_store].
98948        pub fn set_data_store<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
98949            self.data_store = v.into();
98950            self
98951        }
98952
98953        /// Sets the value of [filter][crate::model::vertex_ai_search::DataStoreSpec::filter].
98954        pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
98955            self.filter = v.into();
98956            self
98957        }
98958    }
98959
98960    #[cfg(any(
98961        feature = "gen-ai-cache-service",
98962        feature = "llm-utility-service",
98963        feature = "prediction-service",
98964    ))]
98965    impl wkt::message::Message for DataStoreSpec {
98966        fn typename() -> &'static str {
98967            "type.googleapis.com/google.cloud.aiplatform.v1.VertexAISearch.DataStoreSpec"
98968        }
98969    }
98970}
98971
98972/// Tool to retrieve public web data for grounding, powered by Google.
98973#[cfg(any(
98974    feature = "gen-ai-cache-service",
98975    feature = "llm-utility-service",
98976    feature = "prediction-service",
98977))]
98978#[derive(Clone, Default, PartialEq)]
98979#[non_exhaustive]
98980pub struct GoogleSearchRetrieval {
98981    /// Specifies the dynamic retrieval configuration for the given source.
98982    pub dynamic_retrieval_config: std::option::Option<crate::model::DynamicRetrievalConfig>,
98983
98984    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
98985}
98986
98987#[cfg(any(
98988    feature = "gen-ai-cache-service",
98989    feature = "llm-utility-service",
98990    feature = "prediction-service",
98991))]
98992impl GoogleSearchRetrieval {
98993    pub fn new() -> Self {
98994        std::default::Default::default()
98995    }
98996
98997    /// Sets the value of [dynamic_retrieval_config][crate::model::GoogleSearchRetrieval::dynamic_retrieval_config].
98998    pub fn set_dynamic_retrieval_config<T>(mut self, v: T) -> Self
98999    where
99000        T: std::convert::Into<crate::model::DynamicRetrievalConfig>,
99001    {
99002        self.dynamic_retrieval_config = std::option::Option::Some(v.into());
99003        self
99004    }
99005
99006    /// Sets or clears the value of [dynamic_retrieval_config][crate::model::GoogleSearchRetrieval::dynamic_retrieval_config].
99007    pub fn set_or_clear_dynamic_retrieval_config<T>(mut self, v: std::option::Option<T>) -> Self
99008    where
99009        T: std::convert::Into<crate::model::DynamicRetrievalConfig>,
99010    {
99011        self.dynamic_retrieval_config = v.map(|x| x.into());
99012        self
99013    }
99014}
99015
99016#[cfg(any(
99017    feature = "gen-ai-cache-service",
99018    feature = "llm-utility-service",
99019    feature = "prediction-service",
99020))]
99021impl wkt::message::Message for GoogleSearchRetrieval {
99022    fn typename() -> &'static str {
99023        "type.googleapis.com/google.cloud.aiplatform.v1.GoogleSearchRetrieval"
99024    }
99025}
99026
99027/// Tool to retrieve public maps data for grounding, powered by Google.
99028#[cfg(any(
99029    feature = "gen-ai-cache-service",
99030    feature = "llm-utility-service",
99031    feature = "prediction-service",
99032))]
99033#[derive(Clone, Default, PartialEq)]
99034#[non_exhaustive]
99035pub struct GoogleMaps {
99036    /// If true, include the widget context token in the response.
99037    pub enable_widget: bool,
99038
99039    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
99040}
99041
99042#[cfg(any(
99043    feature = "gen-ai-cache-service",
99044    feature = "llm-utility-service",
99045    feature = "prediction-service",
99046))]
99047impl GoogleMaps {
99048    pub fn new() -> Self {
99049        std::default::Default::default()
99050    }
99051
99052    /// Sets the value of [enable_widget][crate::model::GoogleMaps::enable_widget].
99053    pub fn set_enable_widget<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
99054        self.enable_widget = v.into();
99055        self
99056    }
99057}
99058
99059#[cfg(any(
99060    feature = "gen-ai-cache-service",
99061    feature = "llm-utility-service",
99062    feature = "prediction-service",
99063))]
99064impl wkt::message::Message for GoogleMaps {
99065    fn typename() -> &'static str {
99066        "type.googleapis.com/google.cloud.aiplatform.v1.GoogleMaps"
99067    }
99068}
99069
99070/// Tool to search public web data, powered by Vertex AI Search and Sec4
99071/// compliance.
99072#[cfg(any(
99073    feature = "gen-ai-cache-service",
99074    feature = "llm-utility-service",
99075    feature = "prediction-service",
99076))]
99077#[derive(Clone, Default, PartialEq)]
99078#[non_exhaustive]
99079pub struct EnterpriseWebSearch {
99080    /// Optional. List of domains to be excluded from the search results.
99081    /// The default limit is 2000 domains.
99082    pub exclude_domains: std::vec::Vec<std::string::String>,
99083
99084    /// Optional. Sites with confidence level chosen & above this value will be
99085    /// blocked from the search results.
99086    pub blocking_confidence: std::option::Option<crate::model::tool::PhishBlockThreshold>,
99087
99088    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
99089}
99090
99091#[cfg(any(
99092    feature = "gen-ai-cache-service",
99093    feature = "llm-utility-service",
99094    feature = "prediction-service",
99095))]
99096impl EnterpriseWebSearch {
99097    pub fn new() -> Self {
99098        std::default::Default::default()
99099    }
99100
99101    /// Sets the value of [exclude_domains][crate::model::EnterpriseWebSearch::exclude_domains].
99102    pub fn set_exclude_domains<T, V>(mut self, v: T) -> Self
99103    where
99104        T: std::iter::IntoIterator<Item = V>,
99105        V: std::convert::Into<std::string::String>,
99106    {
99107        use std::iter::Iterator;
99108        self.exclude_domains = v.into_iter().map(|i| i.into()).collect();
99109        self
99110    }
99111
99112    /// Sets the value of [blocking_confidence][crate::model::EnterpriseWebSearch::blocking_confidence].
99113    pub fn set_blocking_confidence<T>(mut self, v: T) -> Self
99114    where
99115        T: std::convert::Into<crate::model::tool::PhishBlockThreshold>,
99116    {
99117        self.blocking_confidence = std::option::Option::Some(v.into());
99118        self
99119    }
99120
99121    /// Sets or clears the value of [blocking_confidence][crate::model::EnterpriseWebSearch::blocking_confidence].
99122    pub fn set_or_clear_blocking_confidence<T>(mut self, v: std::option::Option<T>) -> Self
99123    where
99124        T: std::convert::Into<crate::model::tool::PhishBlockThreshold>,
99125    {
99126        self.blocking_confidence = v.map(|x| x.into());
99127        self
99128    }
99129}
99130
99131#[cfg(any(
99132    feature = "gen-ai-cache-service",
99133    feature = "llm-utility-service",
99134    feature = "prediction-service",
99135))]
99136impl wkt::message::Message for EnterpriseWebSearch {
99137    fn typename() -> &'static str {
99138        "type.googleapis.com/google.cloud.aiplatform.v1.EnterpriseWebSearch"
99139    }
99140}
99141
99142/// Describes the options to customize dynamic retrieval.
99143#[cfg(any(
99144    feature = "gen-ai-cache-service",
99145    feature = "llm-utility-service",
99146    feature = "prediction-service",
99147))]
99148#[derive(Clone, Default, PartialEq)]
99149#[non_exhaustive]
99150pub struct DynamicRetrievalConfig {
99151    /// The mode of the predictor to be used in dynamic retrieval.
99152    pub mode: crate::model::dynamic_retrieval_config::Mode,
99153
99154    /// Optional. The threshold to be used in dynamic retrieval.
99155    /// If not set, a system default value is used.
99156    pub dynamic_threshold: std::option::Option<f32>,
99157
99158    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
99159}
99160
99161#[cfg(any(
99162    feature = "gen-ai-cache-service",
99163    feature = "llm-utility-service",
99164    feature = "prediction-service",
99165))]
99166impl DynamicRetrievalConfig {
99167    pub fn new() -> Self {
99168        std::default::Default::default()
99169    }
99170
99171    /// Sets the value of [mode][crate::model::DynamicRetrievalConfig::mode].
99172    pub fn set_mode<T: std::convert::Into<crate::model::dynamic_retrieval_config::Mode>>(
99173        mut self,
99174        v: T,
99175    ) -> Self {
99176        self.mode = v.into();
99177        self
99178    }
99179
99180    /// Sets the value of [dynamic_threshold][crate::model::DynamicRetrievalConfig::dynamic_threshold].
99181    pub fn set_dynamic_threshold<T>(mut self, v: T) -> Self
99182    where
99183        T: std::convert::Into<f32>,
99184    {
99185        self.dynamic_threshold = std::option::Option::Some(v.into());
99186        self
99187    }
99188
99189    /// Sets or clears the value of [dynamic_threshold][crate::model::DynamicRetrievalConfig::dynamic_threshold].
99190    pub fn set_or_clear_dynamic_threshold<T>(mut self, v: std::option::Option<T>) -> Self
99191    where
99192        T: std::convert::Into<f32>,
99193    {
99194        self.dynamic_threshold = v.map(|x| x.into());
99195        self
99196    }
99197}
99198
99199#[cfg(any(
99200    feature = "gen-ai-cache-service",
99201    feature = "llm-utility-service",
99202    feature = "prediction-service",
99203))]
99204impl wkt::message::Message for DynamicRetrievalConfig {
99205    fn typename() -> &'static str {
99206        "type.googleapis.com/google.cloud.aiplatform.v1.DynamicRetrievalConfig"
99207    }
99208}
99209
99210/// Defines additional types related to [DynamicRetrievalConfig].
99211#[cfg(any(
99212    feature = "gen-ai-cache-service",
99213    feature = "llm-utility-service",
99214    feature = "prediction-service",
99215))]
99216pub mod dynamic_retrieval_config {
99217    #[allow(unused_imports)]
99218    use super::*;
99219
99220    /// The mode of the predictor to be used in dynamic retrieval.
99221    ///
99222    /// # Working with unknown values
99223    ///
99224    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
99225    /// additional enum variants at any time. Adding new variants is not considered
99226    /// a breaking change. Applications should write their code in anticipation of:
99227    ///
99228    /// - New values appearing in future releases of the client library, **and**
99229    /// - New values received dynamically, without application changes.
99230    ///
99231    /// Please consult the [Working with enums] section in the user guide for some
99232    /// guidelines.
99233    ///
99234    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
99235    #[cfg(any(
99236        feature = "gen-ai-cache-service",
99237        feature = "llm-utility-service",
99238        feature = "prediction-service",
99239    ))]
99240    #[derive(Clone, Debug, PartialEq)]
99241    #[non_exhaustive]
99242    pub enum Mode {
99243        /// Always trigger retrieval.
99244        Unspecified,
99245        /// Run retrieval only when system decides it is necessary.
99246        Dynamic,
99247        /// If set, the enum was initialized with an unknown value.
99248        ///
99249        /// Applications can examine the value using [Mode::value] or
99250        /// [Mode::name].
99251        UnknownValue(mode::UnknownValue),
99252    }
99253
99254    #[doc(hidden)]
99255    #[cfg(any(
99256        feature = "gen-ai-cache-service",
99257        feature = "llm-utility-service",
99258        feature = "prediction-service",
99259    ))]
99260    pub mod mode {
99261        #[allow(unused_imports)]
99262        use super::*;
99263        #[derive(Clone, Debug, PartialEq)]
99264        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
99265    }
99266
99267    #[cfg(any(
99268        feature = "gen-ai-cache-service",
99269        feature = "llm-utility-service",
99270        feature = "prediction-service",
99271    ))]
99272    impl Mode {
99273        /// Gets the enum value.
99274        ///
99275        /// Returns `None` if the enum contains an unknown value deserialized from
99276        /// the string representation of enums.
99277        pub fn value(&self) -> std::option::Option<i32> {
99278            match self {
99279                Self::Unspecified => std::option::Option::Some(0),
99280                Self::Dynamic => std::option::Option::Some(1),
99281                Self::UnknownValue(u) => u.0.value(),
99282            }
99283        }
99284
99285        /// Gets the enum value as a string.
99286        ///
99287        /// Returns `None` if the enum contains an unknown value deserialized from
99288        /// the integer representation of enums.
99289        pub fn name(&self) -> std::option::Option<&str> {
99290            match self {
99291                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
99292                Self::Dynamic => std::option::Option::Some("MODE_DYNAMIC"),
99293                Self::UnknownValue(u) => u.0.name(),
99294            }
99295        }
99296    }
99297
99298    #[cfg(any(
99299        feature = "gen-ai-cache-service",
99300        feature = "llm-utility-service",
99301        feature = "prediction-service",
99302    ))]
99303    impl std::default::Default for Mode {
99304        fn default() -> Self {
99305            use std::convert::From;
99306            Self::from(0)
99307        }
99308    }
99309
99310    #[cfg(any(
99311        feature = "gen-ai-cache-service",
99312        feature = "llm-utility-service",
99313        feature = "prediction-service",
99314    ))]
99315    impl std::fmt::Display for Mode {
99316        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
99317            wkt::internal::display_enum(f, self.name(), self.value())
99318        }
99319    }
99320
99321    #[cfg(any(
99322        feature = "gen-ai-cache-service",
99323        feature = "llm-utility-service",
99324        feature = "prediction-service",
99325    ))]
99326    impl std::convert::From<i32> for Mode {
99327        fn from(value: i32) -> Self {
99328            match value {
99329                0 => Self::Unspecified,
99330                1 => Self::Dynamic,
99331                _ => Self::UnknownValue(mode::UnknownValue(
99332                    wkt::internal::UnknownEnumValue::Integer(value),
99333                )),
99334            }
99335        }
99336    }
99337
99338    #[cfg(any(
99339        feature = "gen-ai-cache-service",
99340        feature = "llm-utility-service",
99341        feature = "prediction-service",
99342    ))]
99343    impl std::convert::From<&str> for Mode {
99344        fn from(value: &str) -> Self {
99345            use std::string::ToString;
99346            match value {
99347                "MODE_UNSPECIFIED" => Self::Unspecified,
99348                "MODE_DYNAMIC" => Self::Dynamic,
99349                _ => Self::UnknownValue(mode::UnknownValue(
99350                    wkt::internal::UnknownEnumValue::String(value.to_string()),
99351                )),
99352            }
99353        }
99354    }
99355
99356    #[cfg(any(
99357        feature = "gen-ai-cache-service",
99358        feature = "llm-utility-service",
99359        feature = "prediction-service",
99360    ))]
99361    impl serde::ser::Serialize for Mode {
99362        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
99363        where
99364            S: serde::Serializer,
99365        {
99366            match self {
99367                Self::Unspecified => serializer.serialize_i32(0),
99368                Self::Dynamic => serializer.serialize_i32(1),
99369                Self::UnknownValue(u) => u.0.serialize(serializer),
99370            }
99371        }
99372    }
99373
99374    #[cfg(any(
99375        feature = "gen-ai-cache-service",
99376        feature = "llm-utility-service",
99377        feature = "prediction-service",
99378    ))]
99379    impl<'de> serde::de::Deserialize<'de> for Mode {
99380        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
99381        where
99382            D: serde::Deserializer<'de>,
99383        {
99384            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
99385                ".google.cloud.aiplatform.v1.DynamicRetrievalConfig.Mode",
99386            ))
99387        }
99388    }
99389}
99390
99391/// Tool config. This config is shared for all tools provided in the request.
99392#[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99393#[derive(Clone, Default, PartialEq)]
99394#[non_exhaustive]
99395pub struct ToolConfig {
99396    /// Optional. Function calling config.
99397    pub function_calling_config: std::option::Option<crate::model::FunctionCallingConfig>,
99398
99399    /// Optional. Retrieval config.
99400    pub retrieval_config: std::option::Option<crate::model::RetrievalConfig>,
99401
99402    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
99403}
99404
99405#[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99406impl ToolConfig {
99407    pub fn new() -> Self {
99408        std::default::Default::default()
99409    }
99410
99411    /// Sets the value of [function_calling_config][crate::model::ToolConfig::function_calling_config].
99412    pub fn set_function_calling_config<T>(mut self, v: T) -> Self
99413    where
99414        T: std::convert::Into<crate::model::FunctionCallingConfig>,
99415    {
99416        self.function_calling_config = std::option::Option::Some(v.into());
99417        self
99418    }
99419
99420    /// Sets or clears the value of [function_calling_config][crate::model::ToolConfig::function_calling_config].
99421    pub fn set_or_clear_function_calling_config<T>(mut self, v: std::option::Option<T>) -> Self
99422    where
99423        T: std::convert::Into<crate::model::FunctionCallingConfig>,
99424    {
99425        self.function_calling_config = v.map(|x| x.into());
99426        self
99427    }
99428
99429    /// Sets the value of [retrieval_config][crate::model::ToolConfig::retrieval_config].
99430    pub fn set_retrieval_config<T>(mut self, v: T) -> Self
99431    where
99432        T: std::convert::Into<crate::model::RetrievalConfig>,
99433    {
99434        self.retrieval_config = std::option::Option::Some(v.into());
99435        self
99436    }
99437
99438    /// Sets or clears the value of [retrieval_config][crate::model::ToolConfig::retrieval_config].
99439    pub fn set_or_clear_retrieval_config<T>(mut self, v: std::option::Option<T>) -> Self
99440    where
99441        T: std::convert::Into<crate::model::RetrievalConfig>,
99442    {
99443        self.retrieval_config = v.map(|x| x.into());
99444        self
99445    }
99446}
99447
99448#[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99449impl wkt::message::Message for ToolConfig {
99450    fn typename() -> &'static str {
99451        "type.googleapis.com/google.cloud.aiplatform.v1.ToolConfig"
99452    }
99453}
99454
99455/// Function calling config.
99456#[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99457#[derive(Clone, Default, PartialEq)]
99458#[non_exhaustive]
99459pub struct FunctionCallingConfig {
99460    /// Optional. Function calling mode.
99461    pub mode: crate::model::function_calling_config::Mode,
99462
99463    /// Optional. Function names to call. Only set when the Mode is ANY. Function
99464    /// names should match [FunctionDeclaration.name]. With mode set to ANY, model
99465    /// will predict a function call from the set of function names provided.
99466    pub allowed_function_names: std::vec::Vec<std::string::String>,
99467
99468    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
99469}
99470
99471#[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99472impl FunctionCallingConfig {
99473    pub fn new() -> Self {
99474        std::default::Default::default()
99475    }
99476
99477    /// Sets the value of [mode][crate::model::FunctionCallingConfig::mode].
99478    pub fn set_mode<T: std::convert::Into<crate::model::function_calling_config::Mode>>(
99479        mut self,
99480        v: T,
99481    ) -> Self {
99482        self.mode = v.into();
99483        self
99484    }
99485
99486    /// Sets the value of [allowed_function_names][crate::model::FunctionCallingConfig::allowed_function_names].
99487    pub fn set_allowed_function_names<T, V>(mut self, v: T) -> Self
99488    where
99489        T: std::iter::IntoIterator<Item = V>,
99490        V: std::convert::Into<std::string::String>,
99491    {
99492        use std::iter::Iterator;
99493        self.allowed_function_names = v.into_iter().map(|i| i.into()).collect();
99494        self
99495    }
99496}
99497
99498#[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99499impl wkt::message::Message for FunctionCallingConfig {
99500    fn typename() -> &'static str {
99501        "type.googleapis.com/google.cloud.aiplatform.v1.FunctionCallingConfig"
99502    }
99503}
99504
99505/// Defines additional types related to [FunctionCallingConfig].
99506#[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99507pub mod function_calling_config {
99508    #[allow(unused_imports)]
99509    use super::*;
99510
99511    /// Function calling mode.
99512    ///
99513    /// # Working with unknown values
99514    ///
99515    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
99516    /// additional enum variants at any time. Adding new variants is not considered
99517    /// a breaking change. Applications should write their code in anticipation of:
99518    ///
99519    /// - New values appearing in future releases of the client library, **and**
99520    /// - New values received dynamically, without application changes.
99521    ///
99522    /// Please consult the [Working with enums] section in the user guide for some
99523    /// guidelines.
99524    ///
99525    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
99526    #[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99527    #[derive(Clone, Debug, PartialEq)]
99528    #[non_exhaustive]
99529    pub enum Mode {
99530        /// Unspecified function calling mode. This value should not be used.
99531        Unspecified,
99532        /// Default model behavior, model decides to predict either function calls
99533        /// or natural language response.
99534        Auto,
99535        /// Model is constrained to always predicting function calls only.
99536        /// If "allowed_function_names" are set, the predicted function calls will be
99537        /// limited to any one of "allowed_function_names", else the predicted
99538        /// function calls will be any one of the provided "function_declarations".
99539        Any,
99540        /// Model will not predict any function calls. Model behavior is same as when
99541        /// not passing any function declarations.
99542        None,
99543        /// If set, the enum was initialized with an unknown value.
99544        ///
99545        /// Applications can examine the value using [Mode::value] or
99546        /// [Mode::name].
99547        UnknownValue(mode::UnknownValue),
99548    }
99549
99550    #[doc(hidden)]
99551    #[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99552    pub mod mode {
99553        #[allow(unused_imports)]
99554        use super::*;
99555        #[derive(Clone, Debug, PartialEq)]
99556        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
99557    }
99558
99559    #[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99560    impl Mode {
99561        /// Gets the enum value.
99562        ///
99563        /// Returns `None` if the enum contains an unknown value deserialized from
99564        /// the string representation of enums.
99565        pub fn value(&self) -> std::option::Option<i32> {
99566            match self {
99567                Self::Unspecified => std::option::Option::Some(0),
99568                Self::Auto => std::option::Option::Some(1),
99569                Self::Any => std::option::Option::Some(2),
99570                Self::None => std::option::Option::Some(3),
99571                Self::UnknownValue(u) => u.0.value(),
99572            }
99573        }
99574
99575        /// Gets the enum value as a string.
99576        ///
99577        /// Returns `None` if the enum contains an unknown value deserialized from
99578        /// the integer representation of enums.
99579        pub fn name(&self) -> std::option::Option<&str> {
99580            match self {
99581                Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
99582                Self::Auto => std::option::Option::Some("AUTO"),
99583                Self::Any => std::option::Option::Some("ANY"),
99584                Self::None => std::option::Option::Some("NONE"),
99585                Self::UnknownValue(u) => u.0.name(),
99586            }
99587        }
99588    }
99589
99590    #[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99591    impl std::default::Default for Mode {
99592        fn default() -> Self {
99593            use std::convert::From;
99594            Self::from(0)
99595        }
99596    }
99597
99598    #[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99599    impl std::fmt::Display for Mode {
99600        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
99601            wkt::internal::display_enum(f, self.name(), self.value())
99602        }
99603    }
99604
99605    #[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99606    impl std::convert::From<i32> for Mode {
99607        fn from(value: i32) -> Self {
99608            match value {
99609                0 => Self::Unspecified,
99610                1 => Self::Auto,
99611                2 => Self::Any,
99612                3 => Self::None,
99613                _ => Self::UnknownValue(mode::UnknownValue(
99614                    wkt::internal::UnknownEnumValue::Integer(value),
99615                )),
99616            }
99617        }
99618    }
99619
99620    #[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99621    impl std::convert::From<&str> for Mode {
99622        fn from(value: &str) -> Self {
99623            use std::string::ToString;
99624            match value {
99625                "MODE_UNSPECIFIED" => Self::Unspecified,
99626                "AUTO" => Self::Auto,
99627                "ANY" => Self::Any,
99628                "NONE" => Self::None,
99629                _ => Self::UnknownValue(mode::UnknownValue(
99630                    wkt::internal::UnknownEnumValue::String(value.to_string()),
99631                )),
99632            }
99633        }
99634    }
99635
99636    #[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99637    impl serde::ser::Serialize for Mode {
99638        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
99639        where
99640            S: serde::Serializer,
99641        {
99642            match self {
99643                Self::Unspecified => serializer.serialize_i32(0),
99644                Self::Auto => serializer.serialize_i32(1),
99645                Self::Any => serializer.serialize_i32(2),
99646                Self::None => serializer.serialize_i32(3),
99647                Self::UnknownValue(u) => u.0.serialize(serializer),
99648            }
99649        }
99650    }
99651
99652    #[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99653    impl<'de> serde::de::Deserialize<'de> for Mode {
99654        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
99655        where
99656            D: serde::Deserializer<'de>,
99657        {
99658            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
99659                ".google.cloud.aiplatform.v1.FunctionCallingConfig.Mode",
99660            ))
99661        }
99662    }
99663}
99664
99665/// Retrieval config.
99666#[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99667#[derive(Clone, Default, PartialEq)]
99668#[non_exhaustive]
99669pub struct RetrievalConfig {
99670    /// The location of the user.
99671    pub lat_lng: std::option::Option<gtype::model::LatLng>,
99672
99673    /// The language code of the user.
99674    pub language_code: std::option::Option<std::string::String>,
99675
99676    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
99677}
99678
99679#[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99680impl RetrievalConfig {
99681    pub fn new() -> Self {
99682        std::default::Default::default()
99683    }
99684
99685    /// Sets the value of [lat_lng][crate::model::RetrievalConfig::lat_lng].
99686    pub fn set_lat_lng<T>(mut self, v: T) -> Self
99687    where
99688        T: std::convert::Into<gtype::model::LatLng>,
99689    {
99690        self.lat_lng = std::option::Option::Some(v.into());
99691        self
99692    }
99693
99694    /// Sets or clears the value of [lat_lng][crate::model::RetrievalConfig::lat_lng].
99695    pub fn set_or_clear_lat_lng<T>(mut self, v: std::option::Option<T>) -> Self
99696    where
99697        T: std::convert::Into<gtype::model::LatLng>,
99698    {
99699        self.lat_lng = v.map(|x| x.into());
99700        self
99701    }
99702
99703    /// Sets the value of [language_code][crate::model::RetrievalConfig::language_code].
99704    pub fn set_language_code<T>(mut self, v: T) -> Self
99705    where
99706        T: std::convert::Into<std::string::String>,
99707    {
99708        self.language_code = std::option::Option::Some(v.into());
99709        self
99710    }
99711
99712    /// Sets or clears the value of [language_code][crate::model::RetrievalConfig::language_code].
99713    pub fn set_or_clear_language_code<T>(mut self, v: std::option::Option<T>) -> Self
99714    where
99715        T: std::convert::Into<std::string::String>,
99716    {
99717        self.language_code = v.map(|x| x.into());
99718        self
99719    }
99720}
99721
99722#[cfg(any(feature = "gen-ai-cache-service", feature = "prediction-service",))]
99723impl wkt::message::Message for RetrievalConfig {
99724    fn typename() -> &'static str {
99725        "type.googleapis.com/google.cloud.aiplatform.v1.RetrievalConfig"
99726    }
99727}
99728
99729/// Specifies the context retrieval config.
99730#[cfg(any(
99731    feature = "gen-ai-cache-service",
99732    feature = "llm-utility-service",
99733    feature = "prediction-service",
99734    feature = "vertex-rag-service",
99735))]
99736#[derive(Clone, Default, PartialEq)]
99737#[non_exhaustive]
99738pub struct RagRetrievalConfig {
99739    /// Optional. The number of contexts to retrieve.
99740    pub top_k: i32,
99741
99742    /// Optional. Config for filters.
99743    pub filter: std::option::Option<crate::model::rag_retrieval_config::Filter>,
99744
99745    /// Optional. Config for ranking and reranking.
99746    pub ranking: std::option::Option<crate::model::rag_retrieval_config::Ranking>,
99747
99748    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
99749}
99750
99751#[cfg(any(
99752    feature = "gen-ai-cache-service",
99753    feature = "llm-utility-service",
99754    feature = "prediction-service",
99755    feature = "vertex-rag-service",
99756))]
99757impl RagRetrievalConfig {
99758    pub fn new() -> Self {
99759        std::default::Default::default()
99760    }
99761
99762    /// Sets the value of [top_k][crate::model::RagRetrievalConfig::top_k].
99763    pub fn set_top_k<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
99764        self.top_k = v.into();
99765        self
99766    }
99767
99768    /// Sets the value of [filter][crate::model::RagRetrievalConfig::filter].
99769    pub fn set_filter<T>(mut self, v: T) -> Self
99770    where
99771        T: std::convert::Into<crate::model::rag_retrieval_config::Filter>,
99772    {
99773        self.filter = std::option::Option::Some(v.into());
99774        self
99775    }
99776
99777    /// Sets or clears the value of [filter][crate::model::RagRetrievalConfig::filter].
99778    pub fn set_or_clear_filter<T>(mut self, v: std::option::Option<T>) -> Self
99779    where
99780        T: std::convert::Into<crate::model::rag_retrieval_config::Filter>,
99781    {
99782        self.filter = v.map(|x| x.into());
99783        self
99784    }
99785
99786    /// Sets the value of [ranking][crate::model::RagRetrievalConfig::ranking].
99787    pub fn set_ranking<T>(mut self, v: T) -> Self
99788    where
99789        T: std::convert::Into<crate::model::rag_retrieval_config::Ranking>,
99790    {
99791        self.ranking = std::option::Option::Some(v.into());
99792        self
99793    }
99794
99795    /// Sets or clears the value of [ranking][crate::model::RagRetrievalConfig::ranking].
99796    pub fn set_or_clear_ranking<T>(mut self, v: std::option::Option<T>) -> Self
99797    where
99798        T: std::convert::Into<crate::model::rag_retrieval_config::Ranking>,
99799    {
99800        self.ranking = v.map(|x| x.into());
99801        self
99802    }
99803}
99804
99805#[cfg(any(
99806    feature = "gen-ai-cache-service",
99807    feature = "llm-utility-service",
99808    feature = "prediction-service",
99809    feature = "vertex-rag-service",
99810))]
99811impl wkt::message::Message for RagRetrievalConfig {
99812    fn typename() -> &'static str {
99813        "type.googleapis.com/google.cloud.aiplatform.v1.RagRetrievalConfig"
99814    }
99815}
99816
99817/// Defines additional types related to [RagRetrievalConfig].
99818#[cfg(any(
99819    feature = "gen-ai-cache-service",
99820    feature = "llm-utility-service",
99821    feature = "prediction-service",
99822    feature = "vertex-rag-service",
99823))]
99824pub mod rag_retrieval_config {
99825    #[allow(unused_imports)]
99826    use super::*;
99827
99828    /// Config for filters.
99829    #[cfg(any(
99830        feature = "gen-ai-cache-service",
99831        feature = "llm-utility-service",
99832        feature = "prediction-service",
99833        feature = "vertex-rag-service",
99834    ))]
99835    #[derive(Clone, Default, PartialEq)]
99836    #[non_exhaustive]
99837    pub struct Filter {
99838        /// Optional. String for metadata filtering.
99839        pub metadata_filter: std::string::String,
99840
99841        /// Filter contexts retrieved from the vector DB based on either vector
99842        /// distance or vector similarity.
99843        pub vector_db_threshold:
99844            std::option::Option<crate::model::rag_retrieval_config::filter::VectorDbThreshold>,
99845
99846        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
99847    }
99848
99849    #[cfg(any(
99850        feature = "gen-ai-cache-service",
99851        feature = "llm-utility-service",
99852        feature = "prediction-service",
99853        feature = "vertex-rag-service",
99854    ))]
99855    impl Filter {
99856        pub fn new() -> Self {
99857            std::default::Default::default()
99858        }
99859
99860        /// Sets the value of [metadata_filter][crate::model::rag_retrieval_config::Filter::metadata_filter].
99861        pub fn set_metadata_filter<T: std::convert::Into<std::string::String>>(
99862            mut self,
99863            v: T,
99864        ) -> Self {
99865            self.metadata_filter = v.into();
99866            self
99867        }
99868
99869        /// Sets the value of [vector_db_threshold][crate::model::rag_retrieval_config::Filter::vector_db_threshold].
99870        ///
99871        /// Note that all the setters affecting `vector_db_threshold` are mutually
99872        /// exclusive.
99873        pub fn set_vector_db_threshold<
99874            T: std::convert::Into<
99875                    std::option::Option<
99876                        crate::model::rag_retrieval_config::filter::VectorDbThreshold,
99877                    >,
99878                >,
99879        >(
99880            mut self,
99881            v: T,
99882        ) -> Self {
99883            self.vector_db_threshold = v.into();
99884            self
99885        }
99886
99887        /// The value of [vector_db_threshold][crate::model::rag_retrieval_config::Filter::vector_db_threshold]
99888        /// if it holds a `VectorDistanceThreshold`, `None` if the field is not set or
99889        /// holds a different branch.
99890        pub fn vector_distance_threshold(&self) -> std::option::Option<&f64> {
99891            #[allow(unreachable_patterns)]
99892            self.vector_db_threshold.as_ref().and_then(|v| match v {
99893                crate::model::rag_retrieval_config::filter::VectorDbThreshold::VectorDistanceThreshold(v) => std::option::Option::Some(v),
99894                _ => std::option::Option::None,
99895            })
99896        }
99897
99898        /// Sets the value of [vector_db_threshold][crate::model::rag_retrieval_config::Filter::vector_db_threshold]
99899        /// to hold a `VectorDistanceThreshold`.
99900        ///
99901        /// Note that all the setters affecting `vector_db_threshold` are
99902        /// mutually exclusive.
99903        pub fn set_vector_distance_threshold<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
99904            self.vector_db_threshold = std::option::Option::Some(
99905                crate::model::rag_retrieval_config::filter::VectorDbThreshold::VectorDistanceThreshold(
99906                    v.into()
99907                )
99908            );
99909            self
99910        }
99911
99912        /// The value of [vector_db_threshold][crate::model::rag_retrieval_config::Filter::vector_db_threshold]
99913        /// if it holds a `VectorSimilarityThreshold`, `None` if the field is not set or
99914        /// holds a different branch.
99915        pub fn vector_similarity_threshold(&self) -> std::option::Option<&f64> {
99916            #[allow(unreachable_patterns)]
99917            self.vector_db_threshold.as_ref().and_then(|v| match v {
99918                crate::model::rag_retrieval_config::filter::VectorDbThreshold::VectorSimilarityThreshold(v) => std::option::Option::Some(v),
99919                _ => std::option::Option::None,
99920            })
99921        }
99922
99923        /// Sets the value of [vector_db_threshold][crate::model::rag_retrieval_config::Filter::vector_db_threshold]
99924        /// to hold a `VectorSimilarityThreshold`.
99925        ///
99926        /// Note that all the setters affecting `vector_db_threshold` are
99927        /// mutually exclusive.
99928        pub fn set_vector_similarity_threshold<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
99929            self.vector_db_threshold = std::option::Option::Some(
99930                crate::model::rag_retrieval_config::filter::VectorDbThreshold::VectorSimilarityThreshold(
99931                    v.into()
99932                )
99933            );
99934            self
99935        }
99936    }
99937
99938    #[cfg(any(
99939        feature = "gen-ai-cache-service",
99940        feature = "llm-utility-service",
99941        feature = "prediction-service",
99942        feature = "vertex-rag-service",
99943    ))]
99944    impl wkt::message::Message for Filter {
99945        fn typename() -> &'static str {
99946            "type.googleapis.com/google.cloud.aiplatform.v1.RagRetrievalConfig.Filter"
99947        }
99948    }
99949
99950    /// Defines additional types related to [Filter].
99951    #[cfg(any(
99952        feature = "gen-ai-cache-service",
99953        feature = "llm-utility-service",
99954        feature = "prediction-service",
99955        feature = "vertex-rag-service",
99956    ))]
99957    pub mod filter {
99958        #[allow(unused_imports)]
99959        use super::*;
99960
99961        /// Filter contexts retrieved from the vector DB based on either vector
99962        /// distance or vector similarity.
99963        #[cfg(any(
99964            feature = "gen-ai-cache-service",
99965            feature = "llm-utility-service",
99966            feature = "prediction-service",
99967            feature = "vertex-rag-service",
99968        ))]
99969        #[derive(Clone, Debug, PartialEq)]
99970        #[non_exhaustive]
99971        pub enum VectorDbThreshold {
99972            /// Optional. Only returns contexts with vector distance smaller than the
99973            /// threshold.
99974            VectorDistanceThreshold(f64),
99975            /// Optional. Only returns contexts with vector similarity larger than the
99976            /// threshold.
99977            VectorSimilarityThreshold(f64),
99978        }
99979    }
99980
99981    /// Config for ranking and reranking.
99982    #[cfg(any(
99983        feature = "gen-ai-cache-service",
99984        feature = "llm-utility-service",
99985        feature = "prediction-service",
99986        feature = "vertex-rag-service",
99987    ))]
99988    #[derive(Clone, Default, PartialEq)]
99989    #[non_exhaustive]
99990    pub struct Ranking {
99991        /// Config options for ranking. Currently only Rank Service is supported.
99992        pub ranking_config:
99993            std::option::Option<crate::model::rag_retrieval_config::ranking::RankingConfig>,
99994
99995        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
99996    }
99997
99998    #[cfg(any(
99999        feature = "gen-ai-cache-service",
100000        feature = "llm-utility-service",
100001        feature = "prediction-service",
100002        feature = "vertex-rag-service",
100003    ))]
100004    impl Ranking {
100005        pub fn new() -> Self {
100006            std::default::Default::default()
100007        }
100008
100009        /// Sets the value of [ranking_config][crate::model::rag_retrieval_config::Ranking::ranking_config].
100010        ///
100011        /// Note that all the setters affecting `ranking_config` are mutually
100012        /// exclusive.
100013        pub fn set_ranking_config<
100014            T: std::convert::Into<
100015                    std::option::Option<crate::model::rag_retrieval_config::ranking::RankingConfig>,
100016                >,
100017        >(
100018            mut self,
100019            v: T,
100020        ) -> Self {
100021            self.ranking_config = v.into();
100022            self
100023        }
100024
100025        /// The value of [ranking_config][crate::model::rag_retrieval_config::Ranking::ranking_config]
100026        /// if it holds a `RankService`, `None` if the field is not set or
100027        /// holds a different branch.
100028        pub fn rank_service(
100029            &self,
100030        ) -> std::option::Option<
100031            &std::boxed::Box<crate::model::rag_retrieval_config::ranking::RankService>,
100032        > {
100033            #[allow(unreachable_patterns)]
100034            self.ranking_config.as_ref().and_then(|v| match v {
100035                crate::model::rag_retrieval_config::ranking::RankingConfig::RankService(v) => {
100036                    std::option::Option::Some(v)
100037                }
100038                _ => std::option::Option::None,
100039            })
100040        }
100041
100042        /// Sets the value of [ranking_config][crate::model::rag_retrieval_config::Ranking::ranking_config]
100043        /// to hold a `RankService`.
100044        ///
100045        /// Note that all the setters affecting `ranking_config` are
100046        /// mutually exclusive.
100047        pub fn set_rank_service<
100048            T: std::convert::Into<
100049                    std::boxed::Box<crate::model::rag_retrieval_config::ranking::RankService>,
100050                >,
100051        >(
100052            mut self,
100053            v: T,
100054        ) -> Self {
100055            self.ranking_config = std::option::Option::Some(
100056                crate::model::rag_retrieval_config::ranking::RankingConfig::RankService(v.into()),
100057            );
100058            self
100059        }
100060
100061        /// The value of [ranking_config][crate::model::rag_retrieval_config::Ranking::ranking_config]
100062        /// if it holds a `LlmRanker`, `None` if the field is not set or
100063        /// holds a different branch.
100064        pub fn llm_ranker(
100065            &self,
100066        ) -> std::option::Option<
100067            &std::boxed::Box<crate::model::rag_retrieval_config::ranking::LlmRanker>,
100068        > {
100069            #[allow(unreachable_patterns)]
100070            self.ranking_config.as_ref().and_then(|v| match v {
100071                crate::model::rag_retrieval_config::ranking::RankingConfig::LlmRanker(v) => {
100072                    std::option::Option::Some(v)
100073                }
100074                _ => std::option::Option::None,
100075            })
100076        }
100077
100078        /// Sets the value of [ranking_config][crate::model::rag_retrieval_config::Ranking::ranking_config]
100079        /// to hold a `LlmRanker`.
100080        ///
100081        /// Note that all the setters affecting `ranking_config` are
100082        /// mutually exclusive.
100083        pub fn set_llm_ranker<
100084            T: std::convert::Into<
100085                    std::boxed::Box<crate::model::rag_retrieval_config::ranking::LlmRanker>,
100086                >,
100087        >(
100088            mut self,
100089            v: T,
100090        ) -> Self {
100091            self.ranking_config = std::option::Option::Some(
100092                crate::model::rag_retrieval_config::ranking::RankingConfig::LlmRanker(v.into()),
100093            );
100094            self
100095        }
100096    }
100097
100098    #[cfg(any(
100099        feature = "gen-ai-cache-service",
100100        feature = "llm-utility-service",
100101        feature = "prediction-service",
100102        feature = "vertex-rag-service",
100103    ))]
100104    impl wkt::message::Message for Ranking {
100105        fn typename() -> &'static str {
100106            "type.googleapis.com/google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking"
100107        }
100108    }
100109
100110    /// Defines additional types related to [Ranking].
100111    #[cfg(any(
100112        feature = "gen-ai-cache-service",
100113        feature = "llm-utility-service",
100114        feature = "prediction-service",
100115        feature = "vertex-rag-service",
100116    ))]
100117    pub mod ranking {
100118        #[allow(unused_imports)]
100119        use super::*;
100120
100121        /// Config for Rank Service.
100122        #[cfg(any(
100123            feature = "gen-ai-cache-service",
100124            feature = "llm-utility-service",
100125            feature = "prediction-service",
100126            feature = "vertex-rag-service",
100127        ))]
100128        #[derive(Clone, Default, PartialEq)]
100129        #[non_exhaustive]
100130        pub struct RankService {
100131            /// Optional. The model name of the rank service.
100132            /// Format: `semantic-ranker-512@latest`
100133            pub model_name: std::option::Option<std::string::String>,
100134
100135            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
100136        }
100137
100138        #[cfg(any(
100139            feature = "gen-ai-cache-service",
100140            feature = "llm-utility-service",
100141            feature = "prediction-service",
100142            feature = "vertex-rag-service",
100143        ))]
100144        impl RankService {
100145            pub fn new() -> Self {
100146                std::default::Default::default()
100147            }
100148
100149            /// Sets the value of [model_name][crate::model::rag_retrieval_config::ranking::RankService::model_name].
100150            pub fn set_model_name<T>(mut self, v: T) -> Self
100151            where
100152                T: std::convert::Into<std::string::String>,
100153            {
100154                self.model_name = std::option::Option::Some(v.into());
100155                self
100156            }
100157
100158            /// Sets or clears the value of [model_name][crate::model::rag_retrieval_config::ranking::RankService::model_name].
100159            pub fn set_or_clear_model_name<T>(mut self, v: std::option::Option<T>) -> Self
100160            where
100161                T: std::convert::Into<std::string::String>,
100162            {
100163                self.model_name = v.map(|x| x.into());
100164                self
100165            }
100166        }
100167
100168        #[cfg(any(
100169            feature = "gen-ai-cache-service",
100170            feature = "llm-utility-service",
100171            feature = "prediction-service",
100172            feature = "vertex-rag-service",
100173        ))]
100174        impl wkt::message::Message for RankService {
100175            fn typename() -> &'static str {
100176                "type.googleapis.com/google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.RankService"
100177            }
100178        }
100179
100180        /// Config for LlmRanker.
100181        #[cfg(any(
100182            feature = "gen-ai-cache-service",
100183            feature = "llm-utility-service",
100184            feature = "prediction-service",
100185            feature = "vertex-rag-service",
100186        ))]
100187        #[derive(Clone, Default, PartialEq)]
100188        #[non_exhaustive]
100189        pub struct LlmRanker {
100190            /// Optional. The model name used for ranking.
100191            /// Format: `gemini-1.5-pro`
100192            pub model_name: std::option::Option<std::string::String>,
100193
100194            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
100195        }
100196
100197        #[cfg(any(
100198            feature = "gen-ai-cache-service",
100199            feature = "llm-utility-service",
100200            feature = "prediction-service",
100201            feature = "vertex-rag-service",
100202        ))]
100203        impl LlmRanker {
100204            pub fn new() -> Self {
100205                std::default::Default::default()
100206            }
100207
100208            /// Sets the value of [model_name][crate::model::rag_retrieval_config::ranking::LlmRanker::model_name].
100209            pub fn set_model_name<T>(mut self, v: T) -> Self
100210            where
100211                T: std::convert::Into<std::string::String>,
100212            {
100213                self.model_name = std::option::Option::Some(v.into());
100214                self
100215            }
100216
100217            /// Sets or clears the value of [model_name][crate::model::rag_retrieval_config::ranking::LlmRanker::model_name].
100218            pub fn set_or_clear_model_name<T>(mut self, v: std::option::Option<T>) -> Self
100219            where
100220                T: std::convert::Into<std::string::String>,
100221            {
100222                self.model_name = v.map(|x| x.into());
100223                self
100224            }
100225        }
100226
100227        #[cfg(any(
100228            feature = "gen-ai-cache-service",
100229            feature = "llm-utility-service",
100230            feature = "prediction-service",
100231            feature = "vertex-rag-service",
100232        ))]
100233        impl wkt::message::Message for LlmRanker {
100234            fn typename() -> &'static str {
100235                "type.googleapis.com/google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.LlmRanker"
100236            }
100237        }
100238
100239        /// Config options for ranking. Currently only Rank Service is supported.
100240        #[cfg(any(
100241            feature = "gen-ai-cache-service",
100242            feature = "llm-utility-service",
100243            feature = "prediction-service",
100244            feature = "vertex-rag-service",
100245        ))]
100246        #[derive(Clone, Debug, PartialEq)]
100247        #[non_exhaustive]
100248        pub enum RankingConfig {
100249            /// Optional. Config for Rank Service.
100250            RankService(std::boxed::Box<crate::model::rag_retrieval_config::ranking::RankService>),
100251            /// Optional. Config for LlmRanker.
100252            LlmRanker(std::boxed::Box<crate::model::rag_retrieval_config::ranking::LlmRanker>),
100253        }
100254    }
100255}
100256
100257/// The TrainingPipeline orchestrates tasks associated with training a Model. It
100258/// always executes the training task, and optionally may also
100259/// export data from Vertex AI's Dataset which becomes the training input,
100260/// [upload][google.cloud.aiplatform.v1.ModelService.UploadModel] the Model to
100261/// Vertex AI, and evaluate the Model.
100262///
100263/// [google.cloud.aiplatform.v1.ModelService.UploadModel]: crate::client::ModelService::upload_model
100264#[cfg(feature = "pipeline-service")]
100265#[derive(Clone, Default, PartialEq)]
100266#[non_exhaustive]
100267pub struct TrainingPipeline {
100268    /// Output only. Resource name of the TrainingPipeline.
100269    pub name: std::string::String,
100270
100271    /// Required. The user-defined name of this TrainingPipeline.
100272    pub display_name: std::string::String,
100273
100274    /// Specifies Vertex AI owned input data that may be used for training the
100275    /// Model. The TrainingPipeline's
100276    /// [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]
100277    /// should make clear whether this config is used and if there are any special
100278    /// requirements on how it should be filled. If nothing about this config is
100279    /// mentioned in the
100280    /// [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition],
100281    /// then it should be assumed that the TrainingPipeline does not depend on this
100282    /// configuration.
100283    ///
100284    /// [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]: crate::model::TrainingPipeline::training_task_definition
100285    pub input_data_config: std::option::Option<crate::model::InputDataConfig>,
100286
100287    /// Required. A Google Cloud Storage path to the YAML file that defines the
100288    /// training task which is responsible for producing the model artifact, and
100289    /// may also include additional auxiliary work. The definition files that can
100290    /// be used here are found in
100291    /// gs://google-cloud-aiplatform/schema/trainingjob/definition/.
100292    /// Note: The URI given on output will be immutable and probably different,
100293    /// including the URI scheme, than the one given on input. The output URI will
100294    /// point to a location where the user only has a read access.
100295    pub training_task_definition: std::string::String,
100296
100297    /// Required. The training task's parameter(s), as specified in the
100298    /// [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
100299    /// `inputs`.
100300    ///
100301    /// [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]: crate::model::TrainingPipeline::training_task_definition
100302    pub training_task_inputs: std::option::Option<wkt::Value>,
100303
100304    /// Output only. The metadata information as specified in the
100305    /// [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s
100306    /// `metadata`. This metadata is an auxiliary runtime and final information
100307    /// about the training task. While the pipeline is running this information is
100308    /// populated only at a best effort basis. Only present if the
100309    /// pipeline's
100310    /// [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]
100311    /// contains `metadata` object.
100312    ///
100313    /// [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]: crate::model::TrainingPipeline::training_task_definition
100314    pub training_task_metadata: std::option::Option<wkt::Value>,
100315
100316    /// Describes the Model that may be uploaded (via
100317    /// [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel])
100318    /// by this TrainingPipeline. The TrainingPipeline's
100319    /// [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]
100320    /// should make clear whether this Model description should be populated, and
100321    /// if there are any special requirements regarding how it should be filled. If
100322    /// nothing is mentioned in the
100323    /// [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition],
100324    /// then it should be assumed that this field should not be filled and the
100325    /// training task either uploads the Model without a need of this information,
100326    /// or that training task does not support uploading a Model as part of the
100327    /// pipeline. When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
100328    /// the trained Model had been uploaded into Vertex AI, then the
100329    /// model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is
100330    /// populated. The Model is always uploaded into the Project and Location in
100331    /// which this pipeline is.
100332    ///
100333    /// [google.cloud.aiplatform.v1.Model.name]: crate::model::Model::name
100334    /// [google.cloud.aiplatform.v1.ModelService.UploadModel]: crate::client::ModelService::upload_model
100335    /// [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]: crate::model::TrainingPipeline::training_task_definition
100336    pub model_to_upload: std::option::Option<crate::model::Model>,
100337
100338    /// Optional. The ID to use for the uploaded Model, which will become the final
100339    /// component of the model resource name.
100340    ///
100341    /// This value may be up to 63 characters, and valid characters are
100342    /// `[a-z0-9_-]`. The first character cannot be a number or hyphen.
100343    pub model_id: std::string::String,
100344
100345    /// Optional. When specify this field, the `model_to_upload` will not be
100346    /// uploaded as a new model, instead, it will become a new version of this
100347    /// `parent_model`.
100348    pub parent_model: std::string::String,
100349
100350    /// Output only. The detailed state of the pipeline.
100351    pub state: crate::model::PipelineState,
100352
100353    /// Output only. Only populated when the pipeline's state is
100354    /// `PIPELINE_STATE_FAILED` or `PIPELINE_STATE_CANCELLED`.
100355    pub error: std::option::Option<rpc::model::Status>,
100356
100357    /// Output only. Time when the TrainingPipeline was created.
100358    pub create_time: std::option::Option<wkt::Timestamp>,
100359
100360    /// Output only. Time when the TrainingPipeline for the first time entered the
100361    /// `PIPELINE_STATE_RUNNING` state.
100362    pub start_time: std::option::Option<wkt::Timestamp>,
100363
100364    /// Output only. Time when the TrainingPipeline entered any of the following
100365    /// states: `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
100366    /// `PIPELINE_STATE_CANCELLED`.
100367    pub end_time: std::option::Option<wkt::Timestamp>,
100368
100369    /// Output only. Time when the TrainingPipeline was most recently updated.
100370    pub update_time: std::option::Option<wkt::Timestamp>,
100371
100372    /// The labels with user-defined metadata to organize TrainingPipelines.
100373    ///
100374    /// Label keys and values can be no longer than 64 characters
100375    /// (Unicode codepoints), can only contain lowercase letters, numeric
100376    /// characters, underscores and dashes. International characters are allowed.
100377    ///
100378    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
100379    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
100380
100381    /// Customer-managed encryption key spec for a TrainingPipeline. If set, this
100382    /// TrainingPipeline will be secured by this key.
100383    ///
100384    /// Note: Model trained by this TrainingPipeline is also secured by this key if
100385    /// [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec]
100386    /// is not set separately.
100387    ///
100388    /// [google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec]: crate::model::TrainingPipeline::encryption_spec
100389    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
100390
100391    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
100392}
100393
100394#[cfg(feature = "pipeline-service")]
100395impl TrainingPipeline {
100396    pub fn new() -> Self {
100397        std::default::Default::default()
100398    }
100399
100400    /// Sets the value of [name][crate::model::TrainingPipeline::name].
100401    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
100402        self.name = v.into();
100403        self
100404    }
100405
100406    /// Sets the value of [display_name][crate::model::TrainingPipeline::display_name].
100407    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
100408        self.display_name = v.into();
100409        self
100410    }
100411
100412    /// Sets the value of [input_data_config][crate::model::TrainingPipeline::input_data_config].
100413    pub fn set_input_data_config<T>(mut self, v: T) -> Self
100414    where
100415        T: std::convert::Into<crate::model::InputDataConfig>,
100416    {
100417        self.input_data_config = std::option::Option::Some(v.into());
100418        self
100419    }
100420
100421    /// Sets or clears the value of [input_data_config][crate::model::TrainingPipeline::input_data_config].
100422    pub fn set_or_clear_input_data_config<T>(mut self, v: std::option::Option<T>) -> Self
100423    where
100424        T: std::convert::Into<crate::model::InputDataConfig>,
100425    {
100426        self.input_data_config = v.map(|x| x.into());
100427        self
100428    }
100429
100430    /// Sets the value of [training_task_definition][crate::model::TrainingPipeline::training_task_definition].
100431    pub fn set_training_task_definition<T: std::convert::Into<std::string::String>>(
100432        mut self,
100433        v: T,
100434    ) -> Self {
100435        self.training_task_definition = v.into();
100436        self
100437    }
100438
100439    /// Sets the value of [training_task_inputs][crate::model::TrainingPipeline::training_task_inputs].
100440    pub fn set_training_task_inputs<T>(mut self, v: T) -> Self
100441    where
100442        T: std::convert::Into<wkt::Value>,
100443    {
100444        self.training_task_inputs = std::option::Option::Some(v.into());
100445        self
100446    }
100447
100448    /// Sets or clears the value of [training_task_inputs][crate::model::TrainingPipeline::training_task_inputs].
100449    pub fn set_or_clear_training_task_inputs<T>(mut self, v: std::option::Option<T>) -> Self
100450    where
100451        T: std::convert::Into<wkt::Value>,
100452    {
100453        self.training_task_inputs = v.map(|x| x.into());
100454        self
100455    }
100456
100457    /// Sets the value of [training_task_metadata][crate::model::TrainingPipeline::training_task_metadata].
100458    pub fn set_training_task_metadata<T>(mut self, v: T) -> Self
100459    where
100460        T: std::convert::Into<wkt::Value>,
100461    {
100462        self.training_task_metadata = std::option::Option::Some(v.into());
100463        self
100464    }
100465
100466    /// Sets or clears the value of [training_task_metadata][crate::model::TrainingPipeline::training_task_metadata].
100467    pub fn set_or_clear_training_task_metadata<T>(mut self, v: std::option::Option<T>) -> Self
100468    where
100469        T: std::convert::Into<wkt::Value>,
100470    {
100471        self.training_task_metadata = v.map(|x| x.into());
100472        self
100473    }
100474
100475    /// Sets the value of [model_to_upload][crate::model::TrainingPipeline::model_to_upload].
100476    pub fn set_model_to_upload<T>(mut self, v: T) -> Self
100477    where
100478        T: std::convert::Into<crate::model::Model>,
100479    {
100480        self.model_to_upload = std::option::Option::Some(v.into());
100481        self
100482    }
100483
100484    /// Sets or clears the value of [model_to_upload][crate::model::TrainingPipeline::model_to_upload].
100485    pub fn set_or_clear_model_to_upload<T>(mut self, v: std::option::Option<T>) -> Self
100486    where
100487        T: std::convert::Into<crate::model::Model>,
100488    {
100489        self.model_to_upload = v.map(|x| x.into());
100490        self
100491    }
100492
100493    /// Sets the value of [model_id][crate::model::TrainingPipeline::model_id].
100494    pub fn set_model_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
100495        self.model_id = v.into();
100496        self
100497    }
100498
100499    /// Sets the value of [parent_model][crate::model::TrainingPipeline::parent_model].
100500    pub fn set_parent_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
100501        self.parent_model = v.into();
100502        self
100503    }
100504
100505    /// Sets the value of [state][crate::model::TrainingPipeline::state].
100506    pub fn set_state<T: std::convert::Into<crate::model::PipelineState>>(mut self, v: T) -> Self {
100507        self.state = v.into();
100508        self
100509    }
100510
100511    /// Sets the value of [error][crate::model::TrainingPipeline::error].
100512    pub fn set_error<T>(mut self, v: T) -> Self
100513    where
100514        T: std::convert::Into<rpc::model::Status>,
100515    {
100516        self.error = std::option::Option::Some(v.into());
100517        self
100518    }
100519
100520    /// Sets or clears the value of [error][crate::model::TrainingPipeline::error].
100521    pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
100522    where
100523        T: std::convert::Into<rpc::model::Status>,
100524    {
100525        self.error = v.map(|x| x.into());
100526        self
100527    }
100528
100529    /// Sets the value of [create_time][crate::model::TrainingPipeline::create_time].
100530    pub fn set_create_time<T>(mut self, v: T) -> Self
100531    where
100532        T: std::convert::Into<wkt::Timestamp>,
100533    {
100534        self.create_time = std::option::Option::Some(v.into());
100535        self
100536    }
100537
100538    /// Sets or clears the value of [create_time][crate::model::TrainingPipeline::create_time].
100539    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
100540    where
100541        T: std::convert::Into<wkt::Timestamp>,
100542    {
100543        self.create_time = v.map(|x| x.into());
100544        self
100545    }
100546
100547    /// Sets the value of [start_time][crate::model::TrainingPipeline::start_time].
100548    pub fn set_start_time<T>(mut self, v: T) -> Self
100549    where
100550        T: std::convert::Into<wkt::Timestamp>,
100551    {
100552        self.start_time = std::option::Option::Some(v.into());
100553        self
100554    }
100555
100556    /// Sets or clears the value of [start_time][crate::model::TrainingPipeline::start_time].
100557    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
100558    where
100559        T: std::convert::Into<wkt::Timestamp>,
100560    {
100561        self.start_time = v.map(|x| x.into());
100562        self
100563    }
100564
100565    /// Sets the value of [end_time][crate::model::TrainingPipeline::end_time].
100566    pub fn set_end_time<T>(mut self, v: T) -> Self
100567    where
100568        T: std::convert::Into<wkt::Timestamp>,
100569    {
100570        self.end_time = std::option::Option::Some(v.into());
100571        self
100572    }
100573
100574    /// Sets or clears the value of [end_time][crate::model::TrainingPipeline::end_time].
100575    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
100576    where
100577        T: std::convert::Into<wkt::Timestamp>,
100578    {
100579        self.end_time = v.map(|x| x.into());
100580        self
100581    }
100582
100583    /// Sets the value of [update_time][crate::model::TrainingPipeline::update_time].
100584    pub fn set_update_time<T>(mut self, v: T) -> Self
100585    where
100586        T: std::convert::Into<wkt::Timestamp>,
100587    {
100588        self.update_time = std::option::Option::Some(v.into());
100589        self
100590    }
100591
100592    /// Sets or clears the value of [update_time][crate::model::TrainingPipeline::update_time].
100593    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
100594    where
100595        T: std::convert::Into<wkt::Timestamp>,
100596    {
100597        self.update_time = v.map(|x| x.into());
100598        self
100599    }
100600
100601    /// Sets the value of [labels][crate::model::TrainingPipeline::labels].
100602    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
100603    where
100604        T: std::iter::IntoIterator<Item = (K, V)>,
100605        K: std::convert::Into<std::string::String>,
100606        V: std::convert::Into<std::string::String>,
100607    {
100608        use std::iter::Iterator;
100609        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
100610        self
100611    }
100612
100613    /// Sets the value of [encryption_spec][crate::model::TrainingPipeline::encryption_spec].
100614    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
100615    where
100616        T: std::convert::Into<crate::model::EncryptionSpec>,
100617    {
100618        self.encryption_spec = std::option::Option::Some(v.into());
100619        self
100620    }
100621
100622    /// Sets or clears the value of [encryption_spec][crate::model::TrainingPipeline::encryption_spec].
100623    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
100624    where
100625        T: std::convert::Into<crate::model::EncryptionSpec>,
100626    {
100627        self.encryption_spec = v.map(|x| x.into());
100628        self
100629    }
100630}
100631
100632#[cfg(feature = "pipeline-service")]
100633impl wkt::message::Message for TrainingPipeline {
100634    fn typename() -> &'static str {
100635        "type.googleapis.com/google.cloud.aiplatform.v1.TrainingPipeline"
100636    }
100637}
100638
100639/// Specifies Vertex AI owned input data to be used for training, and
100640/// possibly evaluating, the Model.
100641#[cfg(feature = "pipeline-service")]
100642#[derive(Clone, Default, PartialEq)]
100643#[non_exhaustive]
100644pub struct InputDataConfig {
100645    /// Required. The ID of the Dataset in the same Project and Location which data
100646    /// will be used to train the Model. The Dataset must use schema compatible
100647    /// with Model being trained, and what is compatible should be described in the
100648    /// used TrainingPipeline's [training_task_definition]
100649    /// [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition].
100650    /// For tabular Datasets, all their data is exported to training, to pick
100651    /// and choose from.
100652    pub dataset_id: std::string::String,
100653
100654    /// Applicable only to Datasets that have DataItems and Annotations.
100655    ///
100656    /// A filter on Annotations of the Dataset. Only Annotations that both
100657    /// match this filter and belong to DataItems not ignored by the split method
100658    /// are used in respectively training, validation or test role, depending on
100659    /// the role of the DataItem they are on (for the auto-assigned that role is
100660    /// decided by Vertex AI). A filter with same syntax as the one used in
100661    /// [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations]
100662    /// may be used, but note here it filters across all Annotations of the
100663    /// Dataset, and not just within a single DataItem.
100664    ///
100665    /// [google.cloud.aiplatform.v1.DatasetService.ListAnnotations]: crate::client::DatasetService::list_annotations
100666    pub annotations_filter: std::string::String,
100667
100668    /// Applicable only to custom training with Datasets that have DataItems and
100669    /// Annotations.
100670    ///
100671    /// Cloud Storage URI that points to a YAML file describing the annotation
100672    /// schema. The schema is defined as an OpenAPI 3.0.2 [Schema
100673    /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
100674    /// The schema files that can be used here are found in
100675    /// gs://google-cloud-aiplatform/schema/dataset/annotation/ , note that the
100676    /// chosen schema must be consistent with
100677    /// [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] of the
100678    /// Dataset specified by
100679    /// [dataset_id][google.cloud.aiplatform.v1.InputDataConfig.dataset_id].
100680    ///
100681    /// Only Annotations that both match this schema and belong to DataItems not
100682    /// ignored by the split method are used in respectively training, validation
100683    /// or test role, depending on the role of the DataItem they are on.
100684    ///
100685    /// When used in conjunction with
100686    /// [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter],
100687    /// the Annotations used for training are filtered by both
100688    /// [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter]
100689    /// and
100690    /// [annotation_schema_uri][google.cloud.aiplatform.v1.InputDataConfig.annotation_schema_uri].
100691    ///
100692    /// [google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]: crate::model::Dataset::metadata_schema_uri
100693    /// [google.cloud.aiplatform.v1.InputDataConfig.annotation_schema_uri]: crate::model::InputDataConfig::annotation_schema_uri
100694    /// [google.cloud.aiplatform.v1.InputDataConfig.annotations_filter]: crate::model::InputDataConfig::annotations_filter
100695    /// [google.cloud.aiplatform.v1.InputDataConfig.dataset_id]: crate::model::InputDataConfig::dataset_id
100696    pub annotation_schema_uri: std::string::String,
100697
100698    /// Only applicable to Datasets that have SavedQueries.
100699    ///
100700    /// The ID of a SavedQuery (annotation set) under the Dataset specified by
100701    /// [dataset_id][google.cloud.aiplatform.v1.InputDataConfig.dataset_id] used
100702    /// for filtering Annotations for training.
100703    ///
100704    /// Only Annotations that are associated with this SavedQuery are used in
100705    /// respectively training. When used in conjunction with
100706    /// [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter],
100707    /// the Annotations used for training are filtered by both
100708    /// [saved_query_id][google.cloud.aiplatform.v1.InputDataConfig.saved_query_id]
100709    /// and
100710    /// [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter].
100711    ///
100712    /// Only one of
100713    /// [saved_query_id][google.cloud.aiplatform.v1.InputDataConfig.saved_query_id]
100714    /// and
100715    /// [annotation_schema_uri][google.cloud.aiplatform.v1.InputDataConfig.annotation_schema_uri]
100716    /// should be specified as both of them represent the same thing: problem type.
100717    ///
100718    /// [google.cloud.aiplatform.v1.InputDataConfig.annotation_schema_uri]: crate::model::InputDataConfig::annotation_schema_uri
100719    /// [google.cloud.aiplatform.v1.InputDataConfig.annotations_filter]: crate::model::InputDataConfig::annotations_filter
100720    /// [google.cloud.aiplatform.v1.InputDataConfig.dataset_id]: crate::model::InputDataConfig::dataset_id
100721    /// [google.cloud.aiplatform.v1.InputDataConfig.saved_query_id]: crate::model::InputDataConfig::saved_query_id
100722    pub saved_query_id: std::string::String,
100723
100724    /// Whether to persist the ML use assignment to data item system labels.
100725    pub persist_ml_use_assignment: bool,
100726
100727    /// The instructions how the input data should be split between the
100728    /// training, validation and test sets.
100729    /// If no split type is provided, the
100730    /// [fraction_split][google.cloud.aiplatform.v1.InputDataConfig.fraction_split]
100731    /// is used by default.
100732    ///
100733    /// [google.cloud.aiplatform.v1.InputDataConfig.fraction_split]: crate::model::InputDataConfig::split
100734    pub split: std::option::Option<crate::model::input_data_config::Split>,
100735
100736    /// Only applicable to Custom and Hyperparameter Tuning TrainingPipelines.
100737    ///
100738    /// The destination of the training data to be written to.
100739    ///
100740    /// Supported destination file formats:
100741    ///
100742    /// * For non-tabular data: "jsonl".
100743    /// * For tabular data: "csv" and "bigquery".
100744    ///
100745    /// The following Vertex AI environment variables are passed to containers
100746    /// or python modules of the training task when this field is set:
100747    ///
100748    /// * AIP_DATA_FORMAT : Exported data format.
100749    /// * AIP_TRAINING_DATA_URI : Sharded exported training data uris.
100750    /// * AIP_VALIDATION_DATA_URI : Sharded exported validation data uris.
100751    /// * AIP_TEST_DATA_URI : Sharded exported test data uris.
100752    pub destination: std::option::Option<crate::model::input_data_config::Destination>,
100753
100754    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
100755}
100756
100757#[cfg(feature = "pipeline-service")]
100758impl InputDataConfig {
100759    pub fn new() -> Self {
100760        std::default::Default::default()
100761    }
100762
100763    /// Sets the value of [dataset_id][crate::model::InputDataConfig::dataset_id].
100764    pub fn set_dataset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
100765        self.dataset_id = v.into();
100766        self
100767    }
100768
100769    /// Sets the value of [annotations_filter][crate::model::InputDataConfig::annotations_filter].
100770    pub fn set_annotations_filter<T: std::convert::Into<std::string::String>>(
100771        mut self,
100772        v: T,
100773    ) -> Self {
100774        self.annotations_filter = v.into();
100775        self
100776    }
100777
100778    /// Sets the value of [annotation_schema_uri][crate::model::InputDataConfig::annotation_schema_uri].
100779    pub fn set_annotation_schema_uri<T: std::convert::Into<std::string::String>>(
100780        mut self,
100781        v: T,
100782    ) -> Self {
100783        self.annotation_schema_uri = v.into();
100784        self
100785    }
100786
100787    /// Sets the value of [saved_query_id][crate::model::InputDataConfig::saved_query_id].
100788    pub fn set_saved_query_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
100789        self.saved_query_id = v.into();
100790        self
100791    }
100792
100793    /// Sets the value of [persist_ml_use_assignment][crate::model::InputDataConfig::persist_ml_use_assignment].
100794    pub fn set_persist_ml_use_assignment<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
100795        self.persist_ml_use_assignment = v.into();
100796        self
100797    }
100798
100799    /// Sets the value of [split][crate::model::InputDataConfig::split].
100800    ///
100801    /// Note that all the setters affecting `split` are mutually
100802    /// exclusive.
100803    pub fn set_split<
100804        T: std::convert::Into<std::option::Option<crate::model::input_data_config::Split>>,
100805    >(
100806        mut self,
100807        v: T,
100808    ) -> Self {
100809        self.split = v.into();
100810        self
100811    }
100812
100813    /// The value of [split][crate::model::InputDataConfig::split]
100814    /// if it holds a `FractionSplit`, `None` if the field is not set or
100815    /// holds a different branch.
100816    pub fn fraction_split(
100817        &self,
100818    ) -> std::option::Option<&std::boxed::Box<crate::model::FractionSplit>> {
100819        #[allow(unreachable_patterns)]
100820        self.split.as_ref().and_then(|v| match v {
100821            crate::model::input_data_config::Split::FractionSplit(v) => {
100822                std::option::Option::Some(v)
100823            }
100824            _ => std::option::Option::None,
100825        })
100826    }
100827
100828    /// Sets the value of [split][crate::model::InputDataConfig::split]
100829    /// to hold a `FractionSplit`.
100830    ///
100831    /// Note that all the setters affecting `split` are
100832    /// mutually exclusive.
100833    pub fn set_fraction_split<
100834        T: std::convert::Into<std::boxed::Box<crate::model::FractionSplit>>,
100835    >(
100836        mut self,
100837        v: T,
100838    ) -> Self {
100839        self.split = std::option::Option::Some(
100840            crate::model::input_data_config::Split::FractionSplit(v.into()),
100841        );
100842        self
100843    }
100844
100845    /// The value of [split][crate::model::InputDataConfig::split]
100846    /// if it holds a `FilterSplit`, `None` if the field is not set or
100847    /// holds a different branch.
100848    pub fn filter_split(&self) -> std::option::Option<&std::boxed::Box<crate::model::FilterSplit>> {
100849        #[allow(unreachable_patterns)]
100850        self.split.as_ref().and_then(|v| match v {
100851            crate::model::input_data_config::Split::FilterSplit(v) => std::option::Option::Some(v),
100852            _ => std::option::Option::None,
100853        })
100854    }
100855
100856    /// Sets the value of [split][crate::model::InputDataConfig::split]
100857    /// to hold a `FilterSplit`.
100858    ///
100859    /// Note that all the setters affecting `split` are
100860    /// mutually exclusive.
100861    pub fn set_filter_split<T: std::convert::Into<std::boxed::Box<crate::model::FilterSplit>>>(
100862        mut self,
100863        v: T,
100864    ) -> Self {
100865        self.split = std::option::Option::Some(
100866            crate::model::input_data_config::Split::FilterSplit(v.into()),
100867        );
100868        self
100869    }
100870
100871    /// The value of [split][crate::model::InputDataConfig::split]
100872    /// if it holds a `PredefinedSplit`, `None` if the field is not set or
100873    /// holds a different branch.
100874    pub fn predefined_split(
100875        &self,
100876    ) -> std::option::Option<&std::boxed::Box<crate::model::PredefinedSplit>> {
100877        #[allow(unreachable_patterns)]
100878        self.split.as_ref().and_then(|v| match v {
100879            crate::model::input_data_config::Split::PredefinedSplit(v) => {
100880                std::option::Option::Some(v)
100881            }
100882            _ => std::option::Option::None,
100883        })
100884    }
100885
100886    /// Sets the value of [split][crate::model::InputDataConfig::split]
100887    /// to hold a `PredefinedSplit`.
100888    ///
100889    /// Note that all the setters affecting `split` are
100890    /// mutually exclusive.
100891    pub fn set_predefined_split<
100892        T: std::convert::Into<std::boxed::Box<crate::model::PredefinedSplit>>,
100893    >(
100894        mut self,
100895        v: T,
100896    ) -> Self {
100897        self.split = std::option::Option::Some(
100898            crate::model::input_data_config::Split::PredefinedSplit(v.into()),
100899        );
100900        self
100901    }
100902
100903    /// The value of [split][crate::model::InputDataConfig::split]
100904    /// if it holds a `TimestampSplit`, `None` if the field is not set or
100905    /// holds a different branch.
100906    pub fn timestamp_split(
100907        &self,
100908    ) -> std::option::Option<&std::boxed::Box<crate::model::TimestampSplit>> {
100909        #[allow(unreachable_patterns)]
100910        self.split.as_ref().and_then(|v| match v {
100911            crate::model::input_data_config::Split::TimestampSplit(v) => {
100912                std::option::Option::Some(v)
100913            }
100914            _ => std::option::Option::None,
100915        })
100916    }
100917
100918    /// Sets the value of [split][crate::model::InputDataConfig::split]
100919    /// to hold a `TimestampSplit`.
100920    ///
100921    /// Note that all the setters affecting `split` are
100922    /// mutually exclusive.
100923    pub fn set_timestamp_split<
100924        T: std::convert::Into<std::boxed::Box<crate::model::TimestampSplit>>,
100925    >(
100926        mut self,
100927        v: T,
100928    ) -> Self {
100929        self.split = std::option::Option::Some(
100930            crate::model::input_data_config::Split::TimestampSplit(v.into()),
100931        );
100932        self
100933    }
100934
100935    /// The value of [split][crate::model::InputDataConfig::split]
100936    /// if it holds a `StratifiedSplit`, `None` if the field is not set or
100937    /// holds a different branch.
100938    pub fn stratified_split(
100939        &self,
100940    ) -> std::option::Option<&std::boxed::Box<crate::model::StratifiedSplit>> {
100941        #[allow(unreachable_patterns)]
100942        self.split.as_ref().and_then(|v| match v {
100943            crate::model::input_data_config::Split::StratifiedSplit(v) => {
100944                std::option::Option::Some(v)
100945            }
100946            _ => std::option::Option::None,
100947        })
100948    }
100949
100950    /// Sets the value of [split][crate::model::InputDataConfig::split]
100951    /// to hold a `StratifiedSplit`.
100952    ///
100953    /// Note that all the setters affecting `split` are
100954    /// mutually exclusive.
100955    pub fn set_stratified_split<
100956        T: std::convert::Into<std::boxed::Box<crate::model::StratifiedSplit>>,
100957    >(
100958        mut self,
100959        v: T,
100960    ) -> Self {
100961        self.split = std::option::Option::Some(
100962            crate::model::input_data_config::Split::StratifiedSplit(v.into()),
100963        );
100964        self
100965    }
100966
100967    /// Sets the value of [destination][crate::model::InputDataConfig::destination].
100968    ///
100969    /// Note that all the setters affecting `destination` are mutually
100970    /// exclusive.
100971    pub fn set_destination<
100972        T: std::convert::Into<std::option::Option<crate::model::input_data_config::Destination>>,
100973    >(
100974        mut self,
100975        v: T,
100976    ) -> Self {
100977        self.destination = v.into();
100978        self
100979    }
100980
100981    /// The value of [destination][crate::model::InputDataConfig::destination]
100982    /// if it holds a `GcsDestination`, `None` if the field is not set or
100983    /// holds a different branch.
100984    pub fn gcs_destination(
100985        &self,
100986    ) -> std::option::Option<&std::boxed::Box<crate::model::GcsDestination>> {
100987        #[allow(unreachable_patterns)]
100988        self.destination.as_ref().and_then(|v| match v {
100989            crate::model::input_data_config::Destination::GcsDestination(v) => {
100990                std::option::Option::Some(v)
100991            }
100992            _ => std::option::Option::None,
100993        })
100994    }
100995
100996    /// Sets the value of [destination][crate::model::InputDataConfig::destination]
100997    /// to hold a `GcsDestination`.
100998    ///
100999    /// Note that all the setters affecting `destination` are
101000    /// mutually exclusive.
101001    pub fn set_gcs_destination<
101002        T: std::convert::Into<std::boxed::Box<crate::model::GcsDestination>>,
101003    >(
101004        mut self,
101005        v: T,
101006    ) -> Self {
101007        self.destination = std::option::Option::Some(
101008            crate::model::input_data_config::Destination::GcsDestination(v.into()),
101009        );
101010        self
101011    }
101012
101013    /// The value of [destination][crate::model::InputDataConfig::destination]
101014    /// if it holds a `BigqueryDestination`, `None` if the field is not set or
101015    /// holds a different branch.
101016    pub fn bigquery_destination(
101017        &self,
101018    ) -> std::option::Option<&std::boxed::Box<crate::model::BigQueryDestination>> {
101019        #[allow(unreachable_patterns)]
101020        self.destination.as_ref().and_then(|v| match v {
101021            crate::model::input_data_config::Destination::BigqueryDestination(v) => {
101022                std::option::Option::Some(v)
101023            }
101024            _ => std::option::Option::None,
101025        })
101026    }
101027
101028    /// Sets the value of [destination][crate::model::InputDataConfig::destination]
101029    /// to hold a `BigqueryDestination`.
101030    ///
101031    /// Note that all the setters affecting `destination` are
101032    /// mutually exclusive.
101033    pub fn set_bigquery_destination<
101034        T: std::convert::Into<std::boxed::Box<crate::model::BigQueryDestination>>,
101035    >(
101036        mut self,
101037        v: T,
101038    ) -> Self {
101039        self.destination = std::option::Option::Some(
101040            crate::model::input_data_config::Destination::BigqueryDestination(v.into()),
101041        );
101042        self
101043    }
101044}
101045
101046#[cfg(feature = "pipeline-service")]
101047impl wkt::message::Message for InputDataConfig {
101048    fn typename() -> &'static str {
101049        "type.googleapis.com/google.cloud.aiplatform.v1.InputDataConfig"
101050    }
101051}
101052
101053/// Defines additional types related to [InputDataConfig].
101054#[cfg(feature = "pipeline-service")]
101055pub mod input_data_config {
101056    #[allow(unused_imports)]
101057    use super::*;
101058
101059    /// The instructions how the input data should be split between the
101060    /// training, validation and test sets.
101061    /// If no split type is provided, the
101062    /// [fraction_split][google.cloud.aiplatform.v1.InputDataConfig.fraction_split]
101063    /// is used by default.
101064    ///
101065    /// [google.cloud.aiplatform.v1.InputDataConfig.fraction_split]: crate::model::InputDataConfig::split
101066    #[cfg(feature = "pipeline-service")]
101067    #[derive(Clone, Debug, PartialEq)]
101068    #[non_exhaustive]
101069    pub enum Split {
101070        /// Split based on fractions defining the size of each set.
101071        FractionSplit(std::boxed::Box<crate::model::FractionSplit>),
101072        /// Split based on the provided filters for each set.
101073        FilterSplit(std::boxed::Box<crate::model::FilterSplit>),
101074        /// Supported only for tabular Datasets.
101075        ///
101076        /// Split based on a predefined key.
101077        PredefinedSplit(std::boxed::Box<crate::model::PredefinedSplit>),
101078        /// Supported only for tabular Datasets.
101079        ///
101080        /// Split based on the timestamp of the input data pieces.
101081        TimestampSplit(std::boxed::Box<crate::model::TimestampSplit>),
101082        /// Supported only for tabular Datasets.
101083        ///
101084        /// Split based on the distribution of the specified column.
101085        StratifiedSplit(std::boxed::Box<crate::model::StratifiedSplit>),
101086    }
101087
101088    /// Only applicable to Custom and Hyperparameter Tuning TrainingPipelines.
101089    ///
101090    /// The destination of the training data to be written to.
101091    ///
101092    /// Supported destination file formats:
101093    ///
101094    /// * For non-tabular data: "jsonl".
101095    /// * For tabular data: "csv" and "bigquery".
101096    ///
101097    /// The following Vertex AI environment variables are passed to containers
101098    /// or python modules of the training task when this field is set:
101099    ///
101100    /// * AIP_DATA_FORMAT : Exported data format.
101101    /// * AIP_TRAINING_DATA_URI : Sharded exported training data uris.
101102    /// * AIP_VALIDATION_DATA_URI : Sharded exported validation data uris.
101103    /// * AIP_TEST_DATA_URI : Sharded exported test data uris.
101104    #[cfg(feature = "pipeline-service")]
101105    #[derive(Clone, Debug, PartialEq)]
101106    #[non_exhaustive]
101107    pub enum Destination {
101108        /// The Cloud Storage location where the training data is to be
101109        /// written to. In the given directory a new directory is created with
101110        /// name:
101111        /// `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>`
101112        /// where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
101113        /// All training input data is written into that directory.
101114        ///
101115        /// The Vertex AI environment variables representing Cloud Storage
101116        /// data URIs are represented in the Cloud Storage wildcard
101117        /// format to support sharded data. e.g.: "gs://.../training-*.jsonl"
101118        ///
101119        /// * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data
101120        ///
101121        /// * AIP_TRAINING_DATA_URI =
101122        ///   "gcs_destination/dataset-\<dataset-id\>-\<annotation-type\>-\<time\>/training-*.${AIP_DATA_FORMAT}"
101123        ///
101124        /// * AIP_VALIDATION_DATA_URI =
101125        ///   "gcs_destination/dataset-\<dataset-id\>-\<annotation-type\>-\<time\>/validation-*.${AIP_DATA_FORMAT}"
101126        ///
101127        /// * AIP_TEST_DATA_URI =
101128        ///   "gcs_destination/dataset-\<dataset-id\>-\<annotation-type\>-\<time\>/test-*.${AIP_DATA_FORMAT}"
101129        ///
101130        GcsDestination(std::boxed::Box<crate::model::GcsDestination>),
101131        /// Only applicable to custom training with tabular Dataset with BigQuery
101132        /// source.
101133        ///
101134        /// The BigQuery project location where the training data is to be written
101135        /// to. In the given project a new dataset is created with name
101136        /// `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>`
101137        /// where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training
101138        /// input data is written into that dataset. In the dataset three
101139        /// tables are created, `training`, `validation` and `test`.
101140        ///
101141        /// * AIP_DATA_FORMAT = "bigquery".
101142        ///
101143        /// * AIP_TRAINING_DATA_URI  =
101144        ///   "bigquery_destination.dataset_\<dataset-id\>_<annotation-type>_\<time\>.training"
101145        ///
101146        /// * AIP_VALIDATION_DATA_URI =
101147        ///   "bigquery_destination.dataset_\<dataset-id\>_<annotation-type>_\<time\>.validation"
101148        ///
101149        /// * AIP_TEST_DATA_URI =
101150        ///   "bigquery_destination.dataset_\<dataset-id\>_<annotation-type>_\<time\>.test"
101151        ///
101152        BigqueryDestination(std::boxed::Box<crate::model::BigQueryDestination>),
101153    }
101154}
101155
101156/// Assigns the input data to training, validation, and test sets as per the
101157/// given fractions. Any of `training_fraction`, `validation_fraction` and
101158/// `test_fraction` may optionally be provided, they must sum to up to 1. If the
101159/// provided ones sum to less than 1, the remainder is assigned to sets as
101160/// decided by Vertex AI. If none of the fractions are set, by default roughly
101161/// 80% of data is used for training, 10% for validation, and 10% for test.
101162#[cfg(feature = "pipeline-service")]
101163#[derive(Clone, Default, PartialEq)]
101164#[non_exhaustive]
101165pub struct FractionSplit {
101166    /// The fraction of the input data that is to be used to train the Model.
101167    pub training_fraction: f64,
101168
101169    /// The fraction of the input data that is to be used to validate the Model.
101170    pub validation_fraction: f64,
101171
101172    /// The fraction of the input data that is to be used to evaluate the Model.
101173    pub test_fraction: f64,
101174
101175    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
101176}
101177
101178#[cfg(feature = "pipeline-service")]
101179impl FractionSplit {
101180    pub fn new() -> Self {
101181        std::default::Default::default()
101182    }
101183
101184    /// Sets the value of [training_fraction][crate::model::FractionSplit::training_fraction].
101185    pub fn set_training_fraction<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
101186        self.training_fraction = v.into();
101187        self
101188    }
101189
101190    /// Sets the value of [validation_fraction][crate::model::FractionSplit::validation_fraction].
101191    pub fn set_validation_fraction<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
101192        self.validation_fraction = v.into();
101193        self
101194    }
101195
101196    /// Sets the value of [test_fraction][crate::model::FractionSplit::test_fraction].
101197    pub fn set_test_fraction<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
101198        self.test_fraction = v.into();
101199        self
101200    }
101201}
101202
101203#[cfg(feature = "pipeline-service")]
101204impl wkt::message::Message for FractionSplit {
101205    fn typename() -> &'static str {
101206        "type.googleapis.com/google.cloud.aiplatform.v1.FractionSplit"
101207    }
101208}
101209
101210/// Assigns input data to training, validation, and test sets based on the given
101211/// filters, data pieces not matched by any filter are ignored. Currently only
101212/// supported for Datasets containing DataItems.
101213/// If any of the filters in this message are to match nothing, then they can be
101214/// set as '-' (the minus sign).
101215///
101216/// Supported only for unstructured Datasets.
101217#[cfg(feature = "pipeline-service")]
101218#[derive(Clone, Default, PartialEq)]
101219#[non_exhaustive]
101220pub struct FilterSplit {
101221    /// Required. A filter on DataItems of the Dataset. DataItems that match
101222    /// this filter are used to train the Model. A filter with same syntax
101223    /// as the one used in
101224    /// [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems]
101225    /// may be used. If a single DataItem is matched by more than one of the
101226    /// FilterSplit filters, then it is assigned to the first set that applies to
101227    /// it in the training, validation, test order.
101228    ///
101229    /// [google.cloud.aiplatform.v1.DatasetService.ListDataItems]: crate::client::DatasetService::list_data_items
101230    pub training_filter: std::string::String,
101231
101232    /// Required. A filter on DataItems of the Dataset. DataItems that match
101233    /// this filter are used to validate the Model. A filter with same syntax
101234    /// as the one used in
101235    /// [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems]
101236    /// may be used. If a single DataItem is matched by more than one of the
101237    /// FilterSplit filters, then it is assigned to the first set that applies to
101238    /// it in the training, validation, test order.
101239    ///
101240    /// [google.cloud.aiplatform.v1.DatasetService.ListDataItems]: crate::client::DatasetService::list_data_items
101241    pub validation_filter: std::string::String,
101242
101243    /// Required. A filter on DataItems of the Dataset. DataItems that match
101244    /// this filter are used to test the Model. A filter with same syntax
101245    /// as the one used in
101246    /// [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems]
101247    /// may be used. If a single DataItem is matched by more than one of the
101248    /// FilterSplit filters, then it is assigned to the first set that applies to
101249    /// it in the training, validation, test order.
101250    ///
101251    /// [google.cloud.aiplatform.v1.DatasetService.ListDataItems]: crate::client::DatasetService::list_data_items
101252    pub test_filter: std::string::String,
101253
101254    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
101255}
101256
101257#[cfg(feature = "pipeline-service")]
101258impl FilterSplit {
101259    pub fn new() -> Self {
101260        std::default::Default::default()
101261    }
101262
101263    /// Sets the value of [training_filter][crate::model::FilterSplit::training_filter].
101264    pub fn set_training_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
101265        self.training_filter = v.into();
101266        self
101267    }
101268
101269    /// Sets the value of [validation_filter][crate::model::FilterSplit::validation_filter].
101270    pub fn set_validation_filter<T: std::convert::Into<std::string::String>>(
101271        mut self,
101272        v: T,
101273    ) -> Self {
101274        self.validation_filter = v.into();
101275        self
101276    }
101277
101278    /// Sets the value of [test_filter][crate::model::FilterSplit::test_filter].
101279    pub fn set_test_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
101280        self.test_filter = v.into();
101281        self
101282    }
101283}
101284
101285#[cfg(feature = "pipeline-service")]
101286impl wkt::message::Message for FilterSplit {
101287    fn typename() -> &'static str {
101288        "type.googleapis.com/google.cloud.aiplatform.v1.FilterSplit"
101289    }
101290}
101291
101292/// Assigns input data to training, validation, and test sets based on the
101293/// value of a provided key.
101294///
101295/// Supported only for tabular Datasets.
101296#[cfg(feature = "pipeline-service")]
101297#[derive(Clone, Default, PartialEq)]
101298#[non_exhaustive]
101299pub struct PredefinedSplit {
101300    /// Required. The key is a name of one of the Dataset's data columns.
101301    /// The value of the key (either the label's value or value in the column)
101302    /// must be one of {`training`, `validation`, `test`}, and it defines to which
101303    /// set the given piece of data is assigned. If for a piece of data the key
101304    /// is not present or has an invalid value, that piece is ignored by the
101305    /// pipeline.
101306    pub key: std::string::String,
101307
101308    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
101309}
101310
101311#[cfg(feature = "pipeline-service")]
101312impl PredefinedSplit {
101313    pub fn new() -> Self {
101314        std::default::Default::default()
101315    }
101316
101317    /// Sets the value of [key][crate::model::PredefinedSplit::key].
101318    pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
101319        self.key = v.into();
101320        self
101321    }
101322}
101323
101324#[cfg(feature = "pipeline-service")]
101325impl wkt::message::Message for PredefinedSplit {
101326    fn typename() -> &'static str {
101327        "type.googleapis.com/google.cloud.aiplatform.v1.PredefinedSplit"
101328    }
101329}
101330
101331/// Assigns input data to training, validation, and test sets based on a
101332/// provided timestamps. The youngest data pieces are assigned to training set,
101333/// next to validation set, and the oldest to the test set.
101334///
101335/// Supported only for tabular Datasets.
101336#[cfg(feature = "pipeline-service")]
101337#[derive(Clone, Default, PartialEq)]
101338#[non_exhaustive]
101339pub struct TimestampSplit {
101340    /// The fraction of the input data that is to be used to train the Model.
101341    pub training_fraction: f64,
101342
101343    /// The fraction of the input data that is to be used to validate the Model.
101344    pub validation_fraction: f64,
101345
101346    /// The fraction of the input data that is to be used to evaluate the Model.
101347    pub test_fraction: f64,
101348
101349    /// Required. The key is a name of one of the Dataset's data columns.
101350    /// The values of the key (the values in the column) must be in RFC 3339
101351    /// `date-time` format, where `time-offset` = `"Z"`
101352    /// (e.g. 1985-04-12T23:20:50.52Z). If for a piece of data the key is not
101353    /// present or has an invalid value, that piece is ignored by the pipeline.
101354    pub key: std::string::String,
101355
101356    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
101357}
101358
101359#[cfg(feature = "pipeline-service")]
101360impl TimestampSplit {
101361    pub fn new() -> Self {
101362        std::default::Default::default()
101363    }
101364
101365    /// Sets the value of [training_fraction][crate::model::TimestampSplit::training_fraction].
101366    pub fn set_training_fraction<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
101367        self.training_fraction = v.into();
101368        self
101369    }
101370
101371    /// Sets the value of [validation_fraction][crate::model::TimestampSplit::validation_fraction].
101372    pub fn set_validation_fraction<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
101373        self.validation_fraction = v.into();
101374        self
101375    }
101376
101377    /// Sets the value of [test_fraction][crate::model::TimestampSplit::test_fraction].
101378    pub fn set_test_fraction<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
101379        self.test_fraction = v.into();
101380        self
101381    }
101382
101383    /// Sets the value of [key][crate::model::TimestampSplit::key].
101384    pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
101385        self.key = v.into();
101386        self
101387    }
101388}
101389
101390#[cfg(feature = "pipeline-service")]
101391impl wkt::message::Message for TimestampSplit {
101392    fn typename() -> &'static str {
101393        "type.googleapis.com/google.cloud.aiplatform.v1.TimestampSplit"
101394    }
101395}
101396
101397/// Assigns input data to the training, validation, and test sets so that the
101398/// distribution of values found in the categorical column (as specified by the
101399/// `key` field) is mirrored within each split. The fraction values determine
101400/// the relative sizes of the splits.
101401///
101402/// For example, if the specified column has three values, with 50% of the rows
101403/// having value "A", 25% value "B", and 25% value "C", and the split fractions
101404/// are specified as 80/10/10, then the training set will constitute 80% of the
101405/// training data, with about 50% of the training set rows having the value "A"
101406/// for the specified column, about 25% having the value "B", and about 25%
101407/// having the value "C".
101408///
101409/// Only the top 500 occurring values are used; any values not in the top
101410/// 500 values are randomly assigned to a split. If less than three rows contain
101411/// a specific value, those rows are randomly assigned.
101412///
101413/// Supported only for tabular Datasets.
101414#[cfg(feature = "pipeline-service")]
101415#[derive(Clone, Default, PartialEq)]
101416#[non_exhaustive]
101417pub struct StratifiedSplit {
101418    /// The fraction of the input data that is to be used to train the Model.
101419    pub training_fraction: f64,
101420
101421    /// The fraction of the input data that is to be used to validate the Model.
101422    pub validation_fraction: f64,
101423
101424    /// The fraction of the input data that is to be used to evaluate the Model.
101425    pub test_fraction: f64,
101426
101427    /// Required. The key is a name of one of the Dataset's data columns.
101428    /// The key provided must be for a categorical column.
101429    pub key: std::string::String,
101430
101431    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
101432}
101433
101434#[cfg(feature = "pipeline-service")]
101435impl StratifiedSplit {
101436    pub fn new() -> Self {
101437        std::default::Default::default()
101438    }
101439
101440    /// Sets the value of [training_fraction][crate::model::StratifiedSplit::training_fraction].
101441    pub fn set_training_fraction<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
101442        self.training_fraction = v.into();
101443        self
101444    }
101445
101446    /// Sets the value of [validation_fraction][crate::model::StratifiedSplit::validation_fraction].
101447    pub fn set_validation_fraction<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
101448        self.validation_fraction = v.into();
101449        self
101450    }
101451
101452    /// Sets the value of [test_fraction][crate::model::StratifiedSplit::test_fraction].
101453    pub fn set_test_fraction<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
101454        self.test_fraction = v.into();
101455        self
101456    }
101457
101458    /// Sets the value of [key][crate::model::StratifiedSplit::key].
101459    pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
101460        self.key = v.into();
101461        self
101462    }
101463}
101464
101465#[cfg(feature = "pipeline-service")]
101466impl wkt::message::Message for StratifiedSplit {
101467    fn typename() -> &'static str {
101468        "type.googleapis.com/google.cloud.aiplatform.v1.StratifiedSplit"
101469    }
101470}
101471
101472/// Represents a TuningJob that runs with Google owned models.
101473#[cfg(feature = "gen-ai-tuning-service")]
101474#[derive(Clone, Default, PartialEq)]
101475#[non_exhaustive]
101476pub struct TuningJob {
101477    /// Output only. Identifier. Resource name of a TuningJob. Format:
101478    /// `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
101479    pub name: std::string::String,
101480
101481    /// Optional. The display name of the
101482    /// [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
101483    /// characters long and can consist of any UTF-8 characters.
101484    ///
101485    /// [google.cloud.aiplatform.v1.Model]: crate::model::Model
101486    pub tuned_model_display_name: std::string::String,
101487
101488    /// Optional. The description of the
101489    /// [TuningJob][google.cloud.aiplatform.v1.TuningJob].
101490    ///
101491    /// [google.cloud.aiplatform.v1.TuningJob]: crate::model::TuningJob
101492    pub description: std::string::String,
101493
101494    /// Output only. The detailed state of the job.
101495    pub state: crate::model::JobState,
101496
101497    /// Output only. Time when the
101498    /// [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
101499    ///
101500    /// [google.cloud.aiplatform.v1.TuningJob]: crate::model::TuningJob
101501    pub create_time: std::option::Option<wkt::Timestamp>,
101502
101503    /// Output only. Time when the
101504    /// [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
101505    /// entered the `JOB_STATE_RUNNING` state.
101506    ///
101507    /// [google.cloud.aiplatform.v1.TuningJob]: crate::model::TuningJob
101508    pub start_time: std::option::Option<wkt::Timestamp>,
101509
101510    /// Output only. Time when the TuningJob entered any of the following
101511    /// [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
101512    /// `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
101513    ///
101514    /// [google.cloud.aiplatform.v1.JobState]: crate::model::JobState
101515    pub end_time: std::option::Option<wkt::Timestamp>,
101516
101517    /// Output only. Time when the
101518    /// [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
101519    /// updated.
101520    ///
101521    /// [google.cloud.aiplatform.v1.TuningJob]: crate::model::TuningJob
101522    pub update_time: std::option::Option<wkt::Timestamp>,
101523
101524    /// Output only. Only populated when job's state is `JOB_STATE_FAILED` or
101525    /// `JOB_STATE_CANCELLED`.
101526    pub error: std::option::Option<rpc::model::Status>,
101527
101528    /// Optional. The labels with user-defined metadata to organize
101529    /// [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
101530    /// such as [Model][google.cloud.aiplatform.v1.Model] and
101531    /// [Endpoint][google.cloud.aiplatform.v1.Endpoint].
101532    ///
101533    /// Label keys and values can be no longer than 64 characters
101534    /// (Unicode codepoints), can only contain lowercase letters, numeric
101535    /// characters, underscores and dashes. International characters are allowed.
101536    ///
101537    /// See <https://goo.gl/xmQnxf> for more information and examples of labels.
101538    ///
101539    /// [google.cloud.aiplatform.v1.Endpoint]: crate::model::Endpoint
101540    /// [google.cloud.aiplatform.v1.Model]: crate::model::Model
101541    /// [google.cloud.aiplatform.v1.TuningJob]: crate::model::TuningJob
101542    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
101543
101544    /// Output only. The Experiment associated with this
101545    /// [TuningJob][google.cloud.aiplatform.v1.TuningJob].
101546    ///
101547    /// [google.cloud.aiplatform.v1.TuningJob]: crate::model::TuningJob
101548    pub experiment: std::string::String,
101549
101550    /// Output only. The tuned model resources associated with this
101551    /// [TuningJob][google.cloud.aiplatform.v1.TuningJob].
101552    ///
101553    /// [google.cloud.aiplatform.v1.TuningJob]: crate::model::TuningJob
101554    pub tuned_model: std::option::Option<crate::model::TunedModel>,
101555
101556    /// Output only. The tuning data statistics associated with this
101557    /// [TuningJob][google.cloud.aiplatform.v1.TuningJob].
101558    ///
101559    /// [google.cloud.aiplatform.v1.TuningJob]: crate::model::TuningJob
101560    pub tuning_data_stats: std::option::Option<crate::model::TuningDataStats>,
101561
101562    /// Customer-managed encryption key options for a TuningJob. If this is set,
101563    /// then all resources created by the TuningJob will be encrypted with the
101564    /// provided encryption key.
101565    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
101566
101567    /// The service account that the tuningJob workload runs as.
101568    /// If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the
101569    /// project will be used. See
101570    /// <https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent>
101571    ///
101572    /// Users starting the pipeline must have the `iam.serviceAccounts.actAs`
101573    /// permission on this service account.
101574    pub service_account: std::string::String,
101575
101576    pub source_model: std::option::Option<crate::model::tuning_job::SourceModel>,
101577
101578    pub tuning_spec: std::option::Option<crate::model::tuning_job::TuningSpec>,
101579
101580    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
101581}
101582
101583#[cfg(feature = "gen-ai-tuning-service")]
101584impl TuningJob {
101585    pub fn new() -> Self {
101586        std::default::Default::default()
101587    }
101588
101589    /// Sets the value of [name][crate::model::TuningJob::name].
101590    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
101591        self.name = v.into();
101592        self
101593    }
101594
101595    /// Sets the value of [tuned_model_display_name][crate::model::TuningJob::tuned_model_display_name].
101596    pub fn set_tuned_model_display_name<T: std::convert::Into<std::string::String>>(
101597        mut self,
101598        v: T,
101599    ) -> Self {
101600        self.tuned_model_display_name = v.into();
101601        self
101602    }
101603
101604    /// Sets the value of [description][crate::model::TuningJob::description].
101605    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
101606        self.description = v.into();
101607        self
101608    }
101609
101610    /// Sets the value of [state][crate::model::TuningJob::state].
101611    pub fn set_state<T: std::convert::Into<crate::model::JobState>>(mut self, v: T) -> Self {
101612        self.state = v.into();
101613        self
101614    }
101615
101616    /// Sets the value of [create_time][crate::model::TuningJob::create_time].
101617    pub fn set_create_time<T>(mut self, v: T) -> Self
101618    where
101619        T: std::convert::Into<wkt::Timestamp>,
101620    {
101621        self.create_time = std::option::Option::Some(v.into());
101622        self
101623    }
101624
101625    /// Sets or clears the value of [create_time][crate::model::TuningJob::create_time].
101626    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
101627    where
101628        T: std::convert::Into<wkt::Timestamp>,
101629    {
101630        self.create_time = v.map(|x| x.into());
101631        self
101632    }
101633
101634    /// Sets the value of [start_time][crate::model::TuningJob::start_time].
101635    pub fn set_start_time<T>(mut self, v: T) -> Self
101636    where
101637        T: std::convert::Into<wkt::Timestamp>,
101638    {
101639        self.start_time = std::option::Option::Some(v.into());
101640        self
101641    }
101642
101643    /// Sets or clears the value of [start_time][crate::model::TuningJob::start_time].
101644    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
101645    where
101646        T: std::convert::Into<wkt::Timestamp>,
101647    {
101648        self.start_time = v.map(|x| x.into());
101649        self
101650    }
101651
101652    /// Sets the value of [end_time][crate::model::TuningJob::end_time].
101653    pub fn set_end_time<T>(mut self, v: T) -> Self
101654    where
101655        T: std::convert::Into<wkt::Timestamp>,
101656    {
101657        self.end_time = std::option::Option::Some(v.into());
101658        self
101659    }
101660
101661    /// Sets or clears the value of [end_time][crate::model::TuningJob::end_time].
101662    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
101663    where
101664        T: std::convert::Into<wkt::Timestamp>,
101665    {
101666        self.end_time = v.map(|x| x.into());
101667        self
101668    }
101669
101670    /// Sets the value of [update_time][crate::model::TuningJob::update_time].
101671    pub fn set_update_time<T>(mut self, v: T) -> Self
101672    where
101673        T: std::convert::Into<wkt::Timestamp>,
101674    {
101675        self.update_time = std::option::Option::Some(v.into());
101676        self
101677    }
101678
101679    /// Sets or clears the value of [update_time][crate::model::TuningJob::update_time].
101680    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
101681    where
101682        T: std::convert::Into<wkt::Timestamp>,
101683    {
101684        self.update_time = v.map(|x| x.into());
101685        self
101686    }
101687
101688    /// Sets the value of [error][crate::model::TuningJob::error].
101689    pub fn set_error<T>(mut self, v: T) -> Self
101690    where
101691        T: std::convert::Into<rpc::model::Status>,
101692    {
101693        self.error = std::option::Option::Some(v.into());
101694        self
101695    }
101696
101697    /// Sets or clears the value of [error][crate::model::TuningJob::error].
101698    pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
101699    where
101700        T: std::convert::Into<rpc::model::Status>,
101701    {
101702        self.error = v.map(|x| x.into());
101703        self
101704    }
101705
101706    /// Sets the value of [labels][crate::model::TuningJob::labels].
101707    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
101708    where
101709        T: std::iter::IntoIterator<Item = (K, V)>,
101710        K: std::convert::Into<std::string::String>,
101711        V: std::convert::Into<std::string::String>,
101712    {
101713        use std::iter::Iterator;
101714        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
101715        self
101716    }
101717
101718    /// Sets the value of [experiment][crate::model::TuningJob::experiment].
101719    pub fn set_experiment<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
101720        self.experiment = v.into();
101721        self
101722    }
101723
101724    /// Sets the value of [tuned_model][crate::model::TuningJob::tuned_model].
101725    pub fn set_tuned_model<T>(mut self, v: T) -> Self
101726    where
101727        T: std::convert::Into<crate::model::TunedModel>,
101728    {
101729        self.tuned_model = std::option::Option::Some(v.into());
101730        self
101731    }
101732
101733    /// Sets or clears the value of [tuned_model][crate::model::TuningJob::tuned_model].
101734    pub fn set_or_clear_tuned_model<T>(mut self, v: std::option::Option<T>) -> Self
101735    where
101736        T: std::convert::Into<crate::model::TunedModel>,
101737    {
101738        self.tuned_model = v.map(|x| x.into());
101739        self
101740    }
101741
101742    /// Sets the value of [tuning_data_stats][crate::model::TuningJob::tuning_data_stats].
101743    pub fn set_tuning_data_stats<T>(mut self, v: T) -> Self
101744    where
101745        T: std::convert::Into<crate::model::TuningDataStats>,
101746    {
101747        self.tuning_data_stats = std::option::Option::Some(v.into());
101748        self
101749    }
101750
101751    /// Sets or clears the value of [tuning_data_stats][crate::model::TuningJob::tuning_data_stats].
101752    pub fn set_or_clear_tuning_data_stats<T>(mut self, v: std::option::Option<T>) -> Self
101753    where
101754        T: std::convert::Into<crate::model::TuningDataStats>,
101755    {
101756        self.tuning_data_stats = v.map(|x| x.into());
101757        self
101758    }
101759
101760    /// Sets the value of [encryption_spec][crate::model::TuningJob::encryption_spec].
101761    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
101762    where
101763        T: std::convert::Into<crate::model::EncryptionSpec>,
101764    {
101765        self.encryption_spec = std::option::Option::Some(v.into());
101766        self
101767    }
101768
101769    /// Sets or clears the value of [encryption_spec][crate::model::TuningJob::encryption_spec].
101770    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
101771    where
101772        T: std::convert::Into<crate::model::EncryptionSpec>,
101773    {
101774        self.encryption_spec = v.map(|x| x.into());
101775        self
101776    }
101777
101778    /// Sets the value of [service_account][crate::model::TuningJob::service_account].
101779    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
101780        self.service_account = v.into();
101781        self
101782    }
101783
101784    /// Sets the value of [source_model][crate::model::TuningJob::source_model].
101785    ///
101786    /// Note that all the setters affecting `source_model` are mutually
101787    /// exclusive.
101788    pub fn set_source_model<
101789        T: std::convert::Into<std::option::Option<crate::model::tuning_job::SourceModel>>,
101790    >(
101791        mut self,
101792        v: T,
101793    ) -> Self {
101794        self.source_model = v.into();
101795        self
101796    }
101797
101798    /// The value of [source_model][crate::model::TuningJob::source_model]
101799    /// if it holds a `BaseModel`, `None` if the field is not set or
101800    /// holds a different branch.
101801    pub fn base_model(&self) -> std::option::Option<&std::string::String> {
101802        #[allow(unreachable_patterns)]
101803        self.source_model.as_ref().and_then(|v| match v {
101804            crate::model::tuning_job::SourceModel::BaseModel(v) => std::option::Option::Some(v),
101805            _ => std::option::Option::None,
101806        })
101807    }
101808
101809    /// Sets the value of [source_model][crate::model::TuningJob::source_model]
101810    /// to hold a `BaseModel`.
101811    ///
101812    /// Note that all the setters affecting `source_model` are
101813    /// mutually exclusive.
101814    pub fn set_base_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
101815        self.source_model =
101816            std::option::Option::Some(crate::model::tuning_job::SourceModel::BaseModel(v.into()));
101817        self
101818    }
101819
101820    /// Sets the value of [tuning_spec][crate::model::TuningJob::tuning_spec].
101821    ///
101822    /// Note that all the setters affecting `tuning_spec` are mutually
101823    /// exclusive.
101824    pub fn set_tuning_spec<
101825        T: std::convert::Into<std::option::Option<crate::model::tuning_job::TuningSpec>>,
101826    >(
101827        mut self,
101828        v: T,
101829    ) -> Self {
101830        self.tuning_spec = v.into();
101831        self
101832    }
101833
101834    /// The value of [tuning_spec][crate::model::TuningJob::tuning_spec]
101835    /// if it holds a `SupervisedTuningSpec`, `None` if the field is not set or
101836    /// holds a different branch.
101837    pub fn supervised_tuning_spec(
101838        &self,
101839    ) -> std::option::Option<&std::boxed::Box<crate::model::SupervisedTuningSpec>> {
101840        #[allow(unreachable_patterns)]
101841        self.tuning_spec.as_ref().and_then(|v| match v {
101842            crate::model::tuning_job::TuningSpec::SupervisedTuningSpec(v) => {
101843                std::option::Option::Some(v)
101844            }
101845            _ => std::option::Option::None,
101846        })
101847    }
101848
101849    /// Sets the value of [tuning_spec][crate::model::TuningJob::tuning_spec]
101850    /// to hold a `SupervisedTuningSpec`.
101851    ///
101852    /// Note that all the setters affecting `tuning_spec` are
101853    /// mutually exclusive.
101854    pub fn set_supervised_tuning_spec<
101855        T: std::convert::Into<std::boxed::Box<crate::model::SupervisedTuningSpec>>,
101856    >(
101857        mut self,
101858        v: T,
101859    ) -> Self {
101860        self.tuning_spec = std::option::Option::Some(
101861            crate::model::tuning_job::TuningSpec::SupervisedTuningSpec(v.into()),
101862        );
101863        self
101864    }
101865}
101866
101867#[cfg(feature = "gen-ai-tuning-service")]
101868impl wkt::message::Message for TuningJob {
101869    fn typename() -> &'static str {
101870        "type.googleapis.com/google.cloud.aiplatform.v1.TuningJob"
101871    }
101872}
101873
101874/// Defines additional types related to [TuningJob].
101875#[cfg(feature = "gen-ai-tuning-service")]
101876pub mod tuning_job {
101877    #[allow(unused_imports)]
101878    use super::*;
101879
101880    #[cfg(feature = "gen-ai-tuning-service")]
101881    #[derive(Clone, Debug, PartialEq)]
101882    #[non_exhaustive]
101883    pub enum SourceModel {
101884        /// The base model that is being tuned. See [Supported
101885        /// models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).
101886        BaseModel(std::string::String),
101887    }
101888
101889    #[cfg(feature = "gen-ai-tuning-service")]
101890    #[derive(Clone, Debug, PartialEq)]
101891    #[non_exhaustive]
101892    pub enum TuningSpec {
101893        /// Tuning Spec for Supervised Fine Tuning.
101894        SupervisedTuningSpec(std::boxed::Box<crate::model::SupervisedTuningSpec>),
101895    }
101896}
101897
101898/// The Model Registry Model and Online Prediction Endpoint associated with
101899/// this [TuningJob][google.cloud.aiplatform.v1.TuningJob].
101900///
101901/// [google.cloud.aiplatform.v1.TuningJob]: crate::model::TuningJob
101902#[cfg(feature = "gen-ai-tuning-service")]
101903#[derive(Clone, Default, PartialEq)]
101904#[non_exhaustive]
101905pub struct TunedModel {
101906    /// Output only. The resource name of the TunedModel. Format:
101907    /// `projects/{project}/locations/{location}/models/{model}`.
101908    pub model: std::string::String,
101909
101910    /// Output only. A resource name of an Endpoint. Format:
101911    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`.
101912    pub endpoint: std::string::String,
101913
101914    /// Output only. The checkpoints associated with this TunedModel.
101915    /// This field is only populated for tuning jobs that enable intermediate
101916    /// checkpoints.
101917    pub checkpoints: std::vec::Vec<crate::model::TunedModelCheckpoint>,
101918
101919    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
101920}
101921
101922#[cfg(feature = "gen-ai-tuning-service")]
101923impl TunedModel {
101924    pub fn new() -> Self {
101925        std::default::Default::default()
101926    }
101927
101928    /// Sets the value of [model][crate::model::TunedModel::model].
101929    pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
101930        self.model = v.into();
101931        self
101932    }
101933
101934    /// Sets the value of [endpoint][crate::model::TunedModel::endpoint].
101935    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
101936        self.endpoint = v.into();
101937        self
101938    }
101939
101940    /// Sets the value of [checkpoints][crate::model::TunedModel::checkpoints].
101941    pub fn set_checkpoints<T, V>(mut self, v: T) -> Self
101942    where
101943        T: std::iter::IntoIterator<Item = V>,
101944        V: std::convert::Into<crate::model::TunedModelCheckpoint>,
101945    {
101946        use std::iter::Iterator;
101947        self.checkpoints = v.into_iter().map(|i| i.into()).collect();
101948        self
101949    }
101950}
101951
101952#[cfg(feature = "gen-ai-tuning-service")]
101953impl wkt::message::Message for TunedModel {
101954    fn typename() -> &'static str {
101955        "type.googleapis.com/google.cloud.aiplatform.v1.TunedModel"
101956    }
101957}
101958
101959/// Dataset distribution for Supervised Tuning.
101960#[cfg(feature = "gen-ai-tuning-service")]
101961#[derive(Clone, Default, PartialEq)]
101962#[non_exhaustive]
101963pub struct SupervisedTuningDatasetDistribution {
101964    /// Output only. Sum of a given population of values.
101965    pub sum: i64,
101966
101967    /// Output only. Sum of a given population of values that are billable.
101968    pub billable_sum: i64,
101969
101970    /// Output only. The minimum of the population values.
101971    pub min: f64,
101972
101973    /// Output only. The maximum of the population values.
101974    pub max: f64,
101975
101976    /// Output only. The arithmetic mean of the values in the population.
101977    pub mean: f64,
101978
101979    /// Output only. The median of the values in the population.
101980    pub median: f64,
101981
101982    /// Output only. The 5th percentile of the values in the population.
101983    pub p5: f64,
101984
101985    /// Output only. The 95th percentile of the values in the population.
101986    pub p95: f64,
101987
101988    /// Output only. Defines the histogram bucket.
101989    pub buckets: std::vec::Vec<crate::model::supervised_tuning_dataset_distribution::DatasetBucket>,
101990
101991    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
101992}
101993
101994#[cfg(feature = "gen-ai-tuning-service")]
101995impl SupervisedTuningDatasetDistribution {
101996    pub fn new() -> Self {
101997        std::default::Default::default()
101998    }
101999
102000    /// Sets the value of [sum][crate::model::SupervisedTuningDatasetDistribution::sum].
102001    pub fn set_sum<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
102002        self.sum = v.into();
102003        self
102004    }
102005
102006    /// Sets the value of [billable_sum][crate::model::SupervisedTuningDatasetDistribution::billable_sum].
102007    pub fn set_billable_sum<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
102008        self.billable_sum = v.into();
102009        self
102010    }
102011
102012    /// Sets the value of [min][crate::model::SupervisedTuningDatasetDistribution::min].
102013    pub fn set_min<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
102014        self.min = v.into();
102015        self
102016    }
102017
102018    /// Sets the value of [max][crate::model::SupervisedTuningDatasetDistribution::max].
102019    pub fn set_max<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
102020        self.max = v.into();
102021        self
102022    }
102023
102024    /// Sets the value of [mean][crate::model::SupervisedTuningDatasetDistribution::mean].
102025    pub fn set_mean<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
102026        self.mean = v.into();
102027        self
102028    }
102029
102030    /// Sets the value of [median][crate::model::SupervisedTuningDatasetDistribution::median].
102031    pub fn set_median<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
102032        self.median = v.into();
102033        self
102034    }
102035
102036    /// Sets the value of [p5][crate::model::SupervisedTuningDatasetDistribution::p5].
102037    pub fn set_p5<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
102038        self.p5 = v.into();
102039        self
102040    }
102041
102042    /// Sets the value of [p95][crate::model::SupervisedTuningDatasetDistribution::p95].
102043    pub fn set_p95<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
102044        self.p95 = v.into();
102045        self
102046    }
102047
102048    /// Sets the value of [buckets][crate::model::SupervisedTuningDatasetDistribution::buckets].
102049    pub fn set_buckets<T, V>(mut self, v: T) -> Self
102050    where
102051        T: std::iter::IntoIterator<Item = V>,
102052        V: std::convert::Into<crate::model::supervised_tuning_dataset_distribution::DatasetBucket>,
102053    {
102054        use std::iter::Iterator;
102055        self.buckets = v.into_iter().map(|i| i.into()).collect();
102056        self
102057    }
102058}
102059
102060#[cfg(feature = "gen-ai-tuning-service")]
102061impl wkt::message::Message for SupervisedTuningDatasetDistribution {
102062    fn typename() -> &'static str {
102063        "type.googleapis.com/google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution"
102064    }
102065}
102066
102067/// Defines additional types related to [SupervisedTuningDatasetDistribution].
102068#[cfg(feature = "gen-ai-tuning-service")]
102069pub mod supervised_tuning_dataset_distribution {
102070    #[allow(unused_imports)]
102071    use super::*;
102072
102073    /// Dataset bucket used to create a histogram for the distribution given a
102074    /// population of values.
102075    #[cfg(feature = "gen-ai-tuning-service")]
102076    #[derive(Clone, Default, PartialEq)]
102077    #[non_exhaustive]
102078    pub struct DatasetBucket {
102079        /// Output only. Number of values in the bucket.
102080        pub count: f64,
102081
102082        /// Output only. Left bound of the bucket.
102083        pub left: f64,
102084
102085        /// Output only. Right bound of the bucket.
102086        pub right: f64,
102087
102088        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
102089    }
102090
102091    #[cfg(feature = "gen-ai-tuning-service")]
102092    impl DatasetBucket {
102093        pub fn new() -> Self {
102094            std::default::Default::default()
102095        }
102096
102097        /// Sets the value of [count][crate::model::supervised_tuning_dataset_distribution::DatasetBucket::count].
102098        pub fn set_count<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
102099            self.count = v.into();
102100            self
102101        }
102102
102103        /// Sets the value of [left][crate::model::supervised_tuning_dataset_distribution::DatasetBucket::left].
102104        pub fn set_left<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
102105            self.left = v.into();
102106            self
102107        }
102108
102109        /// Sets the value of [right][crate::model::supervised_tuning_dataset_distribution::DatasetBucket::right].
102110        pub fn set_right<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
102111            self.right = v.into();
102112            self
102113        }
102114    }
102115
102116    #[cfg(feature = "gen-ai-tuning-service")]
102117    impl wkt::message::Message for DatasetBucket {
102118        fn typename() -> &'static str {
102119            "type.googleapis.com/google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket"
102120        }
102121    }
102122}
102123
102124/// Tuning data statistics for Supervised Tuning.
102125#[cfg(feature = "gen-ai-tuning-service")]
102126#[derive(Clone, Default, PartialEq)]
102127#[non_exhaustive]
102128pub struct SupervisedTuningDataStats {
102129    /// Output only. Number of examples in the tuning dataset.
102130    pub tuning_dataset_example_count: i64,
102131
102132    /// Output only. Number of tuning characters in the tuning dataset.
102133    pub total_tuning_character_count: i64,
102134
102135    /// Output only. Number of billable characters in the tuning dataset.
102136    #[deprecated]
102137    pub total_billable_character_count: i64,
102138
102139    /// Output only. Number of billable tokens in the tuning dataset.
102140    pub total_billable_token_count: i64,
102141
102142    /// Output only. Number of tuning steps for this Tuning Job.
102143    pub tuning_step_count: i64,
102144
102145    /// Output only. Dataset distributions for the user input tokens.
102146    pub user_input_token_distribution:
102147        std::option::Option<crate::model::SupervisedTuningDatasetDistribution>,
102148
102149    /// Output only. Dataset distributions for the user output tokens.
102150    pub user_output_token_distribution:
102151        std::option::Option<crate::model::SupervisedTuningDatasetDistribution>,
102152
102153    /// Output only. Dataset distributions for the messages per example.
102154    pub user_message_per_example_distribution:
102155        std::option::Option<crate::model::SupervisedTuningDatasetDistribution>,
102156
102157    /// Output only. Sample user messages in the training dataset uri.
102158    pub user_dataset_examples: std::vec::Vec<crate::model::Content>,
102159
102160    /// Output only. The number of examples in the dataset that have been dropped.
102161    /// An example can be dropped for reasons including: too many tokens, contains
102162    /// an invalid image, contains too many images, etc.
102163    pub total_truncated_example_count: i64,
102164
102165    /// Output only. A partial sample of the indices (starting from 1) of the
102166    /// dropped examples.
102167    pub truncated_example_indices: std::vec::Vec<i64>,
102168
102169    /// Output only. For each index in `truncated_example_indices`, the user-facing
102170    /// reason why the example was dropped.
102171    pub dropped_example_reasons: std::vec::Vec<std::string::String>,
102172
102173    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
102174}
102175
102176#[cfg(feature = "gen-ai-tuning-service")]
102177impl SupervisedTuningDataStats {
102178    pub fn new() -> Self {
102179        std::default::Default::default()
102180    }
102181
102182    /// Sets the value of [tuning_dataset_example_count][crate::model::SupervisedTuningDataStats::tuning_dataset_example_count].
102183    pub fn set_tuning_dataset_example_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
102184        self.tuning_dataset_example_count = v.into();
102185        self
102186    }
102187
102188    /// Sets the value of [total_tuning_character_count][crate::model::SupervisedTuningDataStats::total_tuning_character_count].
102189    pub fn set_total_tuning_character_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
102190        self.total_tuning_character_count = v.into();
102191        self
102192    }
102193
102194    /// Sets the value of [total_billable_character_count][crate::model::SupervisedTuningDataStats::total_billable_character_count].
102195    #[deprecated]
102196    pub fn set_total_billable_character_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
102197        self.total_billable_character_count = v.into();
102198        self
102199    }
102200
102201    /// Sets the value of [total_billable_token_count][crate::model::SupervisedTuningDataStats::total_billable_token_count].
102202    pub fn set_total_billable_token_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
102203        self.total_billable_token_count = v.into();
102204        self
102205    }
102206
102207    /// Sets the value of [tuning_step_count][crate::model::SupervisedTuningDataStats::tuning_step_count].
102208    pub fn set_tuning_step_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
102209        self.tuning_step_count = v.into();
102210        self
102211    }
102212
102213    /// Sets the value of [user_input_token_distribution][crate::model::SupervisedTuningDataStats::user_input_token_distribution].
102214    pub fn set_user_input_token_distribution<T>(mut self, v: T) -> Self
102215    where
102216        T: std::convert::Into<crate::model::SupervisedTuningDatasetDistribution>,
102217    {
102218        self.user_input_token_distribution = std::option::Option::Some(v.into());
102219        self
102220    }
102221
102222    /// Sets or clears the value of [user_input_token_distribution][crate::model::SupervisedTuningDataStats::user_input_token_distribution].
102223    pub fn set_or_clear_user_input_token_distribution<T>(
102224        mut self,
102225        v: std::option::Option<T>,
102226    ) -> Self
102227    where
102228        T: std::convert::Into<crate::model::SupervisedTuningDatasetDistribution>,
102229    {
102230        self.user_input_token_distribution = v.map(|x| x.into());
102231        self
102232    }
102233
102234    /// Sets the value of [user_output_token_distribution][crate::model::SupervisedTuningDataStats::user_output_token_distribution].
102235    pub fn set_user_output_token_distribution<T>(mut self, v: T) -> Self
102236    where
102237        T: std::convert::Into<crate::model::SupervisedTuningDatasetDistribution>,
102238    {
102239        self.user_output_token_distribution = std::option::Option::Some(v.into());
102240        self
102241    }
102242
102243    /// Sets or clears the value of [user_output_token_distribution][crate::model::SupervisedTuningDataStats::user_output_token_distribution].
102244    pub fn set_or_clear_user_output_token_distribution<T>(
102245        mut self,
102246        v: std::option::Option<T>,
102247    ) -> Self
102248    where
102249        T: std::convert::Into<crate::model::SupervisedTuningDatasetDistribution>,
102250    {
102251        self.user_output_token_distribution = v.map(|x| x.into());
102252        self
102253    }
102254
102255    /// Sets the value of [user_message_per_example_distribution][crate::model::SupervisedTuningDataStats::user_message_per_example_distribution].
102256    pub fn set_user_message_per_example_distribution<T>(mut self, v: T) -> Self
102257    where
102258        T: std::convert::Into<crate::model::SupervisedTuningDatasetDistribution>,
102259    {
102260        self.user_message_per_example_distribution = std::option::Option::Some(v.into());
102261        self
102262    }
102263
102264    /// Sets or clears the value of [user_message_per_example_distribution][crate::model::SupervisedTuningDataStats::user_message_per_example_distribution].
102265    pub fn set_or_clear_user_message_per_example_distribution<T>(
102266        mut self,
102267        v: std::option::Option<T>,
102268    ) -> Self
102269    where
102270        T: std::convert::Into<crate::model::SupervisedTuningDatasetDistribution>,
102271    {
102272        self.user_message_per_example_distribution = v.map(|x| x.into());
102273        self
102274    }
102275
102276    /// Sets the value of [user_dataset_examples][crate::model::SupervisedTuningDataStats::user_dataset_examples].
102277    pub fn set_user_dataset_examples<T, V>(mut self, v: T) -> Self
102278    where
102279        T: std::iter::IntoIterator<Item = V>,
102280        V: std::convert::Into<crate::model::Content>,
102281    {
102282        use std::iter::Iterator;
102283        self.user_dataset_examples = v.into_iter().map(|i| i.into()).collect();
102284        self
102285    }
102286
102287    /// Sets the value of [total_truncated_example_count][crate::model::SupervisedTuningDataStats::total_truncated_example_count].
102288    pub fn set_total_truncated_example_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
102289        self.total_truncated_example_count = v.into();
102290        self
102291    }
102292
102293    /// Sets the value of [truncated_example_indices][crate::model::SupervisedTuningDataStats::truncated_example_indices].
102294    pub fn set_truncated_example_indices<T, V>(mut self, v: T) -> Self
102295    where
102296        T: std::iter::IntoIterator<Item = V>,
102297        V: std::convert::Into<i64>,
102298    {
102299        use std::iter::Iterator;
102300        self.truncated_example_indices = v.into_iter().map(|i| i.into()).collect();
102301        self
102302    }
102303
102304    /// Sets the value of [dropped_example_reasons][crate::model::SupervisedTuningDataStats::dropped_example_reasons].
102305    pub fn set_dropped_example_reasons<T, V>(mut self, v: T) -> Self
102306    where
102307        T: std::iter::IntoIterator<Item = V>,
102308        V: std::convert::Into<std::string::String>,
102309    {
102310        use std::iter::Iterator;
102311        self.dropped_example_reasons = v.into_iter().map(|i| i.into()).collect();
102312        self
102313    }
102314}
102315
102316#[cfg(feature = "gen-ai-tuning-service")]
102317impl wkt::message::Message for SupervisedTuningDataStats {
102318    fn typename() -> &'static str {
102319        "type.googleapis.com/google.cloud.aiplatform.v1.SupervisedTuningDataStats"
102320    }
102321}
102322
102323/// The tuning data statistic values for
102324/// [TuningJob][google.cloud.aiplatform.v1.TuningJob].
102325///
102326/// [google.cloud.aiplatform.v1.TuningJob]: crate::model::TuningJob
102327#[cfg(feature = "gen-ai-tuning-service")]
102328#[derive(Clone, Default, PartialEq)]
102329#[non_exhaustive]
102330pub struct TuningDataStats {
102331    pub tuning_data_stats: std::option::Option<crate::model::tuning_data_stats::TuningDataStats>,
102332
102333    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
102334}
102335
102336#[cfg(feature = "gen-ai-tuning-service")]
102337impl TuningDataStats {
102338    pub fn new() -> Self {
102339        std::default::Default::default()
102340    }
102341
102342    /// Sets the value of [tuning_data_stats][crate::model::TuningDataStats::tuning_data_stats].
102343    ///
102344    /// Note that all the setters affecting `tuning_data_stats` are mutually
102345    /// exclusive.
102346    pub fn set_tuning_data_stats<
102347        T: std::convert::Into<std::option::Option<crate::model::tuning_data_stats::TuningDataStats>>,
102348    >(
102349        mut self,
102350        v: T,
102351    ) -> Self {
102352        self.tuning_data_stats = v.into();
102353        self
102354    }
102355
102356    /// The value of [tuning_data_stats][crate::model::TuningDataStats::tuning_data_stats]
102357    /// if it holds a `SupervisedTuningDataStats`, `None` if the field is not set or
102358    /// holds a different branch.
102359    pub fn supervised_tuning_data_stats(
102360        &self,
102361    ) -> std::option::Option<&std::boxed::Box<crate::model::SupervisedTuningDataStats>> {
102362        #[allow(unreachable_patterns)]
102363        self.tuning_data_stats.as_ref().and_then(|v| match v {
102364            crate::model::tuning_data_stats::TuningDataStats::SupervisedTuningDataStats(v) => {
102365                std::option::Option::Some(v)
102366            }
102367            _ => std::option::Option::None,
102368        })
102369    }
102370
102371    /// Sets the value of [tuning_data_stats][crate::model::TuningDataStats::tuning_data_stats]
102372    /// to hold a `SupervisedTuningDataStats`.
102373    ///
102374    /// Note that all the setters affecting `tuning_data_stats` are
102375    /// mutually exclusive.
102376    pub fn set_supervised_tuning_data_stats<
102377        T: std::convert::Into<std::boxed::Box<crate::model::SupervisedTuningDataStats>>,
102378    >(
102379        mut self,
102380        v: T,
102381    ) -> Self {
102382        self.tuning_data_stats = std::option::Option::Some(
102383            crate::model::tuning_data_stats::TuningDataStats::SupervisedTuningDataStats(v.into()),
102384        );
102385        self
102386    }
102387}
102388
102389#[cfg(feature = "gen-ai-tuning-service")]
102390impl wkt::message::Message for TuningDataStats {
102391    fn typename() -> &'static str {
102392        "type.googleapis.com/google.cloud.aiplatform.v1.TuningDataStats"
102393    }
102394}
102395
102396/// Defines additional types related to [TuningDataStats].
102397#[cfg(feature = "gen-ai-tuning-service")]
102398pub mod tuning_data_stats {
102399    #[allow(unused_imports)]
102400    use super::*;
102401
102402    #[cfg(feature = "gen-ai-tuning-service")]
102403    #[derive(Clone, Debug, PartialEq)]
102404    #[non_exhaustive]
102405    pub enum TuningDataStats {
102406        /// The SFT Tuning data stats.
102407        SupervisedTuningDataStats(std::boxed::Box<crate::model::SupervisedTuningDataStats>),
102408    }
102409}
102410
102411/// Hyperparameters for SFT.
102412#[cfg(feature = "gen-ai-tuning-service")]
102413#[derive(Clone, Default, PartialEq)]
102414#[non_exhaustive]
102415pub struct SupervisedHyperParameters {
102416    /// Optional. Number of complete passes the model makes over the entire
102417    /// training dataset during training.
102418    pub epoch_count: i64,
102419
102420    /// Optional. Multiplier for adjusting the default learning rate.
102421    pub learning_rate_multiplier: f64,
102422
102423    /// Optional. Adapter size for tuning.
102424    pub adapter_size: crate::model::supervised_hyper_parameters::AdapterSize,
102425
102426    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
102427}
102428
102429#[cfg(feature = "gen-ai-tuning-service")]
102430impl SupervisedHyperParameters {
102431    pub fn new() -> Self {
102432        std::default::Default::default()
102433    }
102434
102435    /// Sets the value of [epoch_count][crate::model::SupervisedHyperParameters::epoch_count].
102436    pub fn set_epoch_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
102437        self.epoch_count = v.into();
102438        self
102439    }
102440
102441    /// Sets the value of [learning_rate_multiplier][crate::model::SupervisedHyperParameters::learning_rate_multiplier].
102442    pub fn set_learning_rate_multiplier<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
102443        self.learning_rate_multiplier = v.into();
102444        self
102445    }
102446
102447    /// Sets the value of [adapter_size][crate::model::SupervisedHyperParameters::adapter_size].
102448    pub fn set_adapter_size<
102449        T: std::convert::Into<crate::model::supervised_hyper_parameters::AdapterSize>,
102450    >(
102451        mut self,
102452        v: T,
102453    ) -> Self {
102454        self.adapter_size = v.into();
102455        self
102456    }
102457}
102458
102459#[cfg(feature = "gen-ai-tuning-service")]
102460impl wkt::message::Message for SupervisedHyperParameters {
102461    fn typename() -> &'static str {
102462        "type.googleapis.com/google.cloud.aiplatform.v1.SupervisedHyperParameters"
102463    }
102464}
102465
102466/// Defines additional types related to [SupervisedHyperParameters].
102467#[cfg(feature = "gen-ai-tuning-service")]
102468pub mod supervised_hyper_parameters {
102469    #[allow(unused_imports)]
102470    use super::*;
102471
102472    /// Supported adapter sizes for tuning.
102473    ///
102474    /// # Working with unknown values
102475    ///
102476    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
102477    /// additional enum variants at any time. Adding new variants is not considered
102478    /// a breaking change. Applications should write their code in anticipation of:
102479    ///
102480    /// - New values appearing in future releases of the client library, **and**
102481    /// - New values received dynamically, without application changes.
102482    ///
102483    /// Please consult the [Working with enums] section in the user guide for some
102484    /// guidelines.
102485    ///
102486    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
102487    #[cfg(feature = "gen-ai-tuning-service")]
102488    #[derive(Clone, Debug, PartialEq)]
102489    #[non_exhaustive]
102490    pub enum AdapterSize {
102491        /// Adapter size is unspecified.
102492        Unspecified,
102493        /// Adapter size 1.
102494        One,
102495        /// Adapter size 2.
102496        Two,
102497        /// Adapter size 4.
102498        Four,
102499        /// Adapter size 8.
102500        Eight,
102501        /// Adapter size 16.
102502        Sixteen,
102503        /// Adapter size 32.
102504        ThirtyTwo,
102505        /// If set, the enum was initialized with an unknown value.
102506        ///
102507        /// Applications can examine the value using [AdapterSize::value] or
102508        /// [AdapterSize::name].
102509        UnknownValue(adapter_size::UnknownValue),
102510    }
102511
102512    #[doc(hidden)]
102513    #[cfg(feature = "gen-ai-tuning-service")]
102514    pub mod adapter_size {
102515        #[allow(unused_imports)]
102516        use super::*;
102517        #[derive(Clone, Debug, PartialEq)]
102518        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
102519    }
102520
102521    #[cfg(feature = "gen-ai-tuning-service")]
102522    impl AdapterSize {
102523        /// Gets the enum value.
102524        ///
102525        /// Returns `None` if the enum contains an unknown value deserialized from
102526        /// the string representation of enums.
102527        pub fn value(&self) -> std::option::Option<i32> {
102528            match self {
102529                Self::Unspecified => std::option::Option::Some(0),
102530                Self::One => std::option::Option::Some(1),
102531                Self::Two => std::option::Option::Some(6),
102532                Self::Four => std::option::Option::Some(2),
102533                Self::Eight => std::option::Option::Some(3),
102534                Self::Sixteen => std::option::Option::Some(4),
102535                Self::ThirtyTwo => std::option::Option::Some(5),
102536                Self::UnknownValue(u) => u.0.value(),
102537            }
102538        }
102539
102540        /// Gets the enum value as a string.
102541        ///
102542        /// Returns `None` if the enum contains an unknown value deserialized from
102543        /// the integer representation of enums.
102544        pub fn name(&self) -> std::option::Option<&str> {
102545            match self {
102546                Self::Unspecified => std::option::Option::Some("ADAPTER_SIZE_UNSPECIFIED"),
102547                Self::One => std::option::Option::Some("ADAPTER_SIZE_ONE"),
102548                Self::Two => std::option::Option::Some("ADAPTER_SIZE_TWO"),
102549                Self::Four => std::option::Option::Some("ADAPTER_SIZE_FOUR"),
102550                Self::Eight => std::option::Option::Some("ADAPTER_SIZE_EIGHT"),
102551                Self::Sixteen => std::option::Option::Some("ADAPTER_SIZE_SIXTEEN"),
102552                Self::ThirtyTwo => std::option::Option::Some("ADAPTER_SIZE_THIRTY_TWO"),
102553                Self::UnknownValue(u) => u.0.name(),
102554            }
102555        }
102556    }
102557
102558    #[cfg(feature = "gen-ai-tuning-service")]
102559    impl std::default::Default for AdapterSize {
102560        fn default() -> Self {
102561            use std::convert::From;
102562            Self::from(0)
102563        }
102564    }
102565
102566    #[cfg(feature = "gen-ai-tuning-service")]
102567    impl std::fmt::Display for AdapterSize {
102568        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
102569            wkt::internal::display_enum(f, self.name(), self.value())
102570        }
102571    }
102572
102573    #[cfg(feature = "gen-ai-tuning-service")]
102574    impl std::convert::From<i32> for AdapterSize {
102575        fn from(value: i32) -> Self {
102576            match value {
102577                0 => Self::Unspecified,
102578                1 => Self::One,
102579                2 => Self::Four,
102580                3 => Self::Eight,
102581                4 => Self::Sixteen,
102582                5 => Self::ThirtyTwo,
102583                6 => Self::Two,
102584                _ => Self::UnknownValue(adapter_size::UnknownValue(
102585                    wkt::internal::UnknownEnumValue::Integer(value),
102586                )),
102587            }
102588        }
102589    }
102590
102591    #[cfg(feature = "gen-ai-tuning-service")]
102592    impl std::convert::From<&str> for AdapterSize {
102593        fn from(value: &str) -> Self {
102594            use std::string::ToString;
102595            match value {
102596                "ADAPTER_SIZE_UNSPECIFIED" => Self::Unspecified,
102597                "ADAPTER_SIZE_ONE" => Self::One,
102598                "ADAPTER_SIZE_TWO" => Self::Two,
102599                "ADAPTER_SIZE_FOUR" => Self::Four,
102600                "ADAPTER_SIZE_EIGHT" => Self::Eight,
102601                "ADAPTER_SIZE_SIXTEEN" => Self::Sixteen,
102602                "ADAPTER_SIZE_THIRTY_TWO" => Self::ThirtyTwo,
102603                _ => Self::UnknownValue(adapter_size::UnknownValue(
102604                    wkt::internal::UnknownEnumValue::String(value.to_string()),
102605                )),
102606            }
102607        }
102608    }
102609
102610    #[cfg(feature = "gen-ai-tuning-service")]
102611    impl serde::ser::Serialize for AdapterSize {
102612        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
102613        where
102614            S: serde::Serializer,
102615        {
102616            match self {
102617                Self::Unspecified => serializer.serialize_i32(0),
102618                Self::One => serializer.serialize_i32(1),
102619                Self::Two => serializer.serialize_i32(6),
102620                Self::Four => serializer.serialize_i32(2),
102621                Self::Eight => serializer.serialize_i32(3),
102622                Self::Sixteen => serializer.serialize_i32(4),
102623                Self::ThirtyTwo => serializer.serialize_i32(5),
102624                Self::UnknownValue(u) => u.0.serialize(serializer),
102625            }
102626        }
102627    }
102628
102629    #[cfg(feature = "gen-ai-tuning-service")]
102630    impl<'de> serde::de::Deserialize<'de> for AdapterSize {
102631        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
102632        where
102633            D: serde::Deserializer<'de>,
102634        {
102635            deserializer.deserialize_any(wkt::internal::EnumVisitor::<AdapterSize>::new(
102636                ".google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize",
102637            ))
102638        }
102639    }
102640}
102641
102642/// Tuning Spec for Supervised Tuning for first party models.
102643#[cfg(feature = "gen-ai-tuning-service")]
102644#[derive(Clone, Default, PartialEq)]
102645#[non_exhaustive]
102646pub struct SupervisedTuningSpec {
102647    /// Required. Cloud Storage path to file containing training dataset for
102648    /// tuning. The dataset must be formatted as a JSONL file.
102649    pub training_dataset_uri: std::string::String,
102650
102651    /// Optional. Cloud Storage path to file containing validation dataset for
102652    /// tuning. The dataset must be formatted as a JSONL file.
102653    pub validation_dataset_uri: std::string::String,
102654
102655    /// Optional. Hyperparameters for SFT.
102656    pub hyper_parameters: std::option::Option<crate::model::SupervisedHyperParameters>,
102657
102658    /// Optional. If set to true, disable intermediate checkpoints for SFT and only
102659    /// the last checkpoint will be exported. Otherwise, enable intermediate
102660    /// checkpoints for SFT. Default is false.
102661    pub export_last_checkpoint_only: bool,
102662
102663    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
102664}
102665
102666#[cfg(feature = "gen-ai-tuning-service")]
102667impl SupervisedTuningSpec {
102668    pub fn new() -> Self {
102669        std::default::Default::default()
102670    }
102671
102672    /// Sets the value of [training_dataset_uri][crate::model::SupervisedTuningSpec::training_dataset_uri].
102673    pub fn set_training_dataset_uri<T: std::convert::Into<std::string::String>>(
102674        mut self,
102675        v: T,
102676    ) -> Self {
102677        self.training_dataset_uri = v.into();
102678        self
102679    }
102680
102681    /// Sets the value of [validation_dataset_uri][crate::model::SupervisedTuningSpec::validation_dataset_uri].
102682    pub fn set_validation_dataset_uri<T: std::convert::Into<std::string::String>>(
102683        mut self,
102684        v: T,
102685    ) -> Self {
102686        self.validation_dataset_uri = v.into();
102687        self
102688    }
102689
102690    /// Sets the value of [hyper_parameters][crate::model::SupervisedTuningSpec::hyper_parameters].
102691    pub fn set_hyper_parameters<T>(mut self, v: T) -> Self
102692    where
102693        T: std::convert::Into<crate::model::SupervisedHyperParameters>,
102694    {
102695        self.hyper_parameters = std::option::Option::Some(v.into());
102696        self
102697    }
102698
102699    /// Sets or clears the value of [hyper_parameters][crate::model::SupervisedTuningSpec::hyper_parameters].
102700    pub fn set_or_clear_hyper_parameters<T>(mut self, v: std::option::Option<T>) -> Self
102701    where
102702        T: std::convert::Into<crate::model::SupervisedHyperParameters>,
102703    {
102704        self.hyper_parameters = v.map(|x| x.into());
102705        self
102706    }
102707
102708    /// Sets the value of [export_last_checkpoint_only][crate::model::SupervisedTuningSpec::export_last_checkpoint_only].
102709    pub fn set_export_last_checkpoint_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
102710        self.export_last_checkpoint_only = v.into();
102711        self
102712    }
102713}
102714
102715#[cfg(feature = "gen-ai-tuning-service")]
102716impl wkt::message::Message for SupervisedTuningSpec {
102717    fn typename() -> &'static str {
102718        "type.googleapis.com/google.cloud.aiplatform.v1.SupervisedTuningSpec"
102719    }
102720}
102721
102722/// TunedModel Reference for legacy model migration.
102723#[cfg(feature = "gen-ai-tuning-service")]
102724#[derive(Clone, Default, PartialEq)]
102725#[non_exhaustive]
102726pub struct TunedModelRef {
102727    /// The Tuned Model Reference for the model.
102728    pub tuned_model_ref: std::option::Option<crate::model::tuned_model_ref::TunedModelRef>,
102729
102730    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
102731}
102732
102733#[cfg(feature = "gen-ai-tuning-service")]
102734impl TunedModelRef {
102735    pub fn new() -> Self {
102736        std::default::Default::default()
102737    }
102738
102739    /// Sets the value of [tuned_model_ref][crate::model::TunedModelRef::tuned_model_ref].
102740    ///
102741    /// Note that all the setters affecting `tuned_model_ref` are mutually
102742    /// exclusive.
102743    pub fn set_tuned_model_ref<
102744        T: std::convert::Into<std::option::Option<crate::model::tuned_model_ref::TunedModelRef>>,
102745    >(
102746        mut self,
102747        v: T,
102748    ) -> Self {
102749        self.tuned_model_ref = v.into();
102750        self
102751    }
102752
102753    /// The value of [tuned_model_ref][crate::model::TunedModelRef::tuned_model_ref]
102754    /// if it holds a `TunedModel`, `None` if the field is not set or
102755    /// holds a different branch.
102756    pub fn tuned_model(&self) -> std::option::Option<&std::string::String> {
102757        #[allow(unreachable_patterns)]
102758        self.tuned_model_ref.as_ref().and_then(|v| match v {
102759            crate::model::tuned_model_ref::TunedModelRef::TunedModel(v) => {
102760                std::option::Option::Some(v)
102761            }
102762            _ => std::option::Option::None,
102763        })
102764    }
102765
102766    /// Sets the value of [tuned_model_ref][crate::model::TunedModelRef::tuned_model_ref]
102767    /// to hold a `TunedModel`.
102768    ///
102769    /// Note that all the setters affecting `tuned_model_ref` are
102770    /// mutually exclusive.
102771    pub fn set_tuned_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
102772        self.tuned_model_ref = std::option::Option::Some(
102773            crate::model::tuned_model_ref::TunedModelRef::TunedModel(v.into()),
102774        );
102775        self
102776    }
102777
102778    /// The value of [tuned_model_ref][crate::model::TunedModelRef::tuned_model_ref]
102779    /// if it holds a `TuningJob`, `None` if the field is not set or
102780    /// holds a different branch.
102781    pub fn tuning_job(&self) -> std::option::Option<&std::string::String> {
102782        #[allow(unreachable_patterns)]
102783        self.tuned_model_ref.as_ref().and_then(|v| match v {
102784            crate::model::tuned_model_ref::TunedModelRef::TuningJob(v) => {
102785                std::option::Option::Some(v)
102786            }
102787            _ => std::option::Option::None,
102788        })
102789    }
102790
102791    /// Sets the value of [tuned_model_ref][crate::model::TunedModelRef::tuned_model_ref]
102792    /// to hold a `TuningJob`.
102793    ///
102794    /// Note that all the setters affecting `tuned_model_ref` are
102795    /// mutually exclusive.
102796    pub fn set_tuning_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
102797        self.tuned_model_ref = std::option::Option::Some(
102798            crate::model::tuned_model_ref::TunedModelRef::TuningJob(v.into()),
102799        );
102800        self
102801    }
102802
102803    /// The value of [tuned_model_ref][crate::model::TunedModelRef::tuned_model_ref]
102804    /// if it holds a `PipelineJob`, `None` if the field is not set or
102805    /// holds a different branch.
102806    pub fn pipeline_job(&self) -> std::option::Option<&std::string::String> {
102807        #[allow(unreachable_patterns)]
102808        self.tuned_model_ref.as_ref().and_then(|v| match v {
102809            crate::model::tuned_model_ref::TunedModelRef::PipelineJob(v) => {
102810                std::option::Option::Some(v)
102811            }
102812            _ => std::option::Option::None,
102813        })
102814    }
102815
102816    /// Sets the value of [tuned_model_ref][crate::model::TunedModelRef::tuned_model_ref]
102817    /// to hold a `PipelineJob`.
102818    ///
102819    /// Note that all the setters affecting `tuned_model_ref` are
102820    /// mutually exclusive.
102821    pub fn set_pipeline_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
102822        self.tuned_model_ref = std::option::Option::Some(
102823            crate::model::tuned_model_ref::TunedModelRef::PipelineJob(v.into()),
102824        );
102825        self
102826    }
102827}
102828
102829#[cfg(feature = "gen-ai-tuning-service")]
102830impl wkt::message::Message for TunedModelRef {
102831    fn typename() -> &'static str {
102832        "type.googleapis.com/google.cloud.aiplatform.v1.TunedModelRef"
102833    }
102834}
102835
102836/// Defines additional types related to [TunedModelRef].
102837#[cfg(feature = "gen-ai-tuning-service")]
102838pub mod tuned_model_ref {
102839    #[allow(unused_imports)]
102840    use super::*;
102841
102842    /// The Tuned Model Reference for the model.
102843    #[cfg(feature = "gen-ai-tuning-service")]
102844    #[derive(Clone, Debug, PartialEq)]
102845    #[non_exhaustive]
102846    pub enum TunedModelRef {
102847        /// Support migration from model registry.
102848        TunedModel(std::string::String),
102849        /// Support migration from tuning job list page, from gemini-1.0-pro-002
102850        /// to 1.5 and above.
102851        TuningJob(std::string::String),
102852        /// Support migration from tuning job list page, from bison model to gemini
102853        /// model.
102854        PipelineJob(std::string::String),
102855    }
102856}
102857
102858/// TunedModelCheckpoint for the Tuned Model of a Tuning Job.
102859#[cfg(feature = "gen-ai-tuning-service")]
102860#[derive(Clone, Default, PartialEq)]
102861#[non_exhaustive]
102862pub struct TunedModelCheckpoint {
102863    /// The ID of the checkpoint.
102864    pub checkpoint_id: std::string::String,
102865
102866    /// The epoch of the checkpoint.
102867    pub epoch: i64,
102868
102869    /// The step of the checkpoint.
102870    pub step: i64,
102871
102872    /// The Endpoint resource name that the checkpoint is deployed to. Format:
102873    /// `projects/{project}/locations/{location}/endpoints/{endpoint}`.
102874    pub endpoint: std::string::String,
102875
102876    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
102877}
102878
102879#[cfg(feature = "gen-ai-tuning-service")]
102880impl TunedModelCheckpoint {
102881    pub fn new() -> Self {
102882        std::default::Default::default()
102883    }
102884
102885    /// Sets the value of [checkpoint_id][crate::model::TunedModelCheckpoint::checkpoint_id].
102886    pub fn set_checkpoint_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
102887        self.checkpoint_id = v.into();
102888        self
102889    }
102890
102891    /// Sets the value of [epoch][crate::model::TunedModelCheckpoint::epoch].
102892    pub fn set_epoch<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
102893        self.epoch = v.into();
102894        self
102895    }
102896
102897    /// Sets the value of [step][crate::model::TunedModelCheckpoint::step].
102898    pub fn set_step<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
102899        self.step = v.into();
102900        self
102901    }
102902
102903    /// Sets the value of [endpoint][crate::model::TunedModelCheckpoint::endpoint].
102904    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
102905        self.endpoint = v.into();
102906        self
102907    }
102908}
102909
102910#[cfg(feature = "gen-ai-tuning-service")]
102911impl wkt::message::Message for TunedModelCheckpoint {
102912    fn typename() -> &'static str {
102913        "type.googleapis.com/google.cloud.aiplatform.v1.TunedModelCheckpoint"
102914    }
102915}
102916
102917/// A list of boolean values.
102918#[cfg(any(
102919    feature = "feature-online-store-service",
102920    feature = "featurestore-online-serving-service",
102921))]
102922#[derive(Clone, Default, PartialEq)]
102923#[non_exhaustive]
102924pub struct BoolArray {
102925    /// A list of bool values.
102926    pub values: std::vec::Vec<bool>,
102927
102928    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
102929}
102930
102931#[cfg(any(
102932    feature = "feature-online-store-service",
102933    feature = "featurestore-online-serving-service",
102934))]
102935impl BoolArray {
102936    pub fn new() -> Self {
102937        std::default::Default::default()
102938    }
102939
102940    /// Sets the value of [values][crate::model::BoolArray::values].
102941    pub fn set_values<T, V>(mut self, v: T) -> Self
102942    where
102943        T: std::iter::IntoIterator<Item = V>,
102944        V: std::convert::Into<bool>,
102945    {
102946        use std::iter::Iterator;
102947        self.values = v.into_iter().map(|i| i.into()).collect();
102948        self
102949    }
102950}
102951
102952#[cfg(any(
102953    feature = "feature-online-store-service",
102954    feature = "featurestore-online-serving-service",
102955))]
102956impl wkt::message::Message for BoolArray {
102957    fn typename() -> &'static str {
102958        "type.googleapis.com/google.cloud.aiplatform.v1.BoolArray"
102959    }
102960}
102961
102962/// A list of double values.
102963#[cfg(any(
102964    feature = "feature-online-store-service",
102965    feature = "featurestore-online-serving-service",
102966))]
102967#[derive(Clone, Default, PartialEq)]
102968#[non_exhaustive]
102969pub struct DoubleArray {
102970    /// A list of double values.
102971    pub values: std::vec::Vec<f64>,
102972
102973    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
102974}
102975
102976#[cfg(any(
102977    feature = "feature-online-store-service",
102978    feature = "featurestore-online-serving-service",
102979))]
102980impl DoubleArray {
102981    pub fn new() -> Self {
102982        std::default::Default::default()
102983    }
102984
102985    /// Sets the value of [values][crate::model::DoubleArray::values].
102986    pub fn set_values<T, V>(mut self, v: T) -> Self
102987    where
102988        T: std::iter::IntoIterator<Item = V>,
102989        V: std::convert::Into<f64>,
102990    {
102991        use std::iter::Iterator;
102992        self.values = v.into_iter().map(|i| i.into()).collect();
102993        self
102994    }
102995}
102996
102997#[cfg(any(
102998    feature = "feature-online-store-service",
102999    feature = "featurestore-online-serving-service",
103000))]
103001impl wkt::message::Message for DoubleArray {
103002    fn typename() -> &'static str {
103003        "type.googleapis.com/google.cloud.aiplatform.v1.DoubleArray"
103004    }
103005}
103006
103007/// A list of int64 values.
103008#[cfg(any(
103009    feature = "feature-online-store-service",
103010    feature = "featurestore-online-serving-service",
103011))]
103012#[derive(Clone, Default, PartialEq)]
103013#[non_exhaustive]
103014pub struct Int64Array {
103015    /// A list of int64 values.
103016    pub values: std::vec::Vec<i64>,
103017
103018    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
103019}
103020
103021#[cfg(any(
103022    feature = "feature-online-store-service",
103023    feature = "featurestore-online-serving-service",
103024))]
103025impl Int64Array {
103026    pub fn new() -> Self {
103027        std::default::Default::default()
103028    }
103029
103030    /// Sets the value of [values][crate::model::Int64Array::values].
103031    pub fn set_values<T, V>(mut self, v: T) -> Self
103032    where
103033        T: std::iter::IntoIterator<Item = V>,
103034        V: std::convert::Into<i64>,
103035    {
103036        use std::iter::Iterator;
103037        self.values = v.into_iter().map(|i| i.into()).collect();
103038        self
103039    }
103040}
103041
103042#[cfg(any(
103043    feature = "feature-online-store-service",
103044    feature = "featurestore-online-serving-service",
103045))]
103046impl wkt::message::Message for Int64Array {
103047    fn typename() -> &'static str {
103048        "type.googleapis.com/google.cloud.aiplatform.v1.Int64Array"
103049    }
103050}
103051
103052/// A list of string values.
103053#[cfg(any(
103054    feature = "feature-online-store-service",
103055    feature = "featurestore-online-serving-service",
103056))]
103057#[derive(Clone, Default, PartialEq)]
103058#[non_exhaustive]
103059pub struct StringArray {
103060    /// A list of string values.
103061    pub values: std::vec::Vec<std::string::String>,
103062
103063    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
103064}
103065
103066#[cfg(any(
103067    feature = "feature-online-store-service",
103068    feature = "featurestore-online-serving-service",
103069))]
103070impl StringArray {
103071    pub fn new() -> Self {
103072        std::default::Default::default()
103073    }
103074
103075    /// Sets the value of [values][crate::model::StringArray::values].
103076    pub fn set_values<T, V>(mut self, v: T) -> Self
103077    where
103078        T: std::iter::IntoIterator<Item = V>,
103079        V: std::convert::Into<std::string::String>,
103080    {
103081        use std::iter::Iterator;
103082        self.values = v.into_iter().map(|i| i.into()).collect();
103083        self
103084    }
103085}
103086
103087#[cfg(any(
103088    feature = "feature-online-store-service",
103089    feature = "featurestore-online-serving-service",
103090))]
103091impl wkt::message::Message for StringArray {
103092    fn typename() -> &'static str {
103093        "type.googleapis.com/google.cloud.aiplatform.v1.StringArray"
103094    }
103095}
103096
103097/// A tensor value type.
103098#[cfg(feature = "prediction-service")]
103099#[derive(Clone, Default, PartialEq)]
103100#[non_exhaustive]
103101pub struct Tensor {
103102    /// The data type of tensor.
103103    pub dtype: crate::model::tensor::DataType,
103104
103105    /// Shape of the tensor.
103106    pub shape: std::vec::Vec<i64>,
103107
103108    /// Type specific representations that make it easy to create tensor protos in
103109    /// all languages.  Only the representation corresponding to "dtype" can
103110    /// be set.  The values hold the flattened representation of the tensor in
103111    /// row major order.
103112    ///
103113    /// [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL]
103114    ///
103115    /// [google.cloud.aiplatform.v1.Tensor.DataType.BOOL]: crate::model::tensor::DataType::Bool
103116    pub bool_val: std::vec::Vec<bool>,
103117
103118    /// [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
103119    ///
103120    /// [google.cloud.aiplatform.v1.Tensor.DataType.STRING]: crate::model::tensor::DataType::String
103121    pub string_val: std::vec::Vec<std::string::String>,
103122
103123    /// [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING]
103124    ///
103125    /// [google.cloud.aiplatform.v1.Tensor.DataType.STRING]: crate::model::tensor::DataType::String
103126    pub bytes_val: std::vec::Vec<::bytes::Bytes>,
103127
103128    /// [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]
103129    ///
103130    /// [google.cloud.aiplatform.v1.Tensor.DataType.FLOAT]: crate::model::tensor::DataType::Float
103131    pub float_val: std::vec::Vec<f32>,
103132
103133    /// [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]
103134    ///
103135    /// [google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE]: crate::model::tensor::DataType::Double
103136    pub double_val: std::vec::Vec<f64>,
103137
103138    /// [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8]
103139    /// [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16]
103140    /// [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32]
103141    ///
103142    /// [google.cloud.aiplatform.v1.Tensor.DataType.INT16]: crate::model::tensor::DataType::Int16
103143    /// [google.cloud.aiplatform.v1.Tensor.DataType.INT32]: crate::model::tensor::DataType::Int32
103144    /// [google.cloud.aiplatform.v1.Tensor.DataType.INT8]: crate::model::tensor::DataType::Int8
103145    pub int_val: std::vec::Vec<i32>,
103146
103147    /// [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64]
103148    ///
103149    /// [google.cloud.aiplatform.v1.Tensor.DataType.INT64]: crate::model::tensor::DataType::Int64
103150    pub int64_val: std::vec::Vec<i64>,
103151
103152    /// [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8]
103153    /// [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16]
103154    /// [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32]
103155    ///
103156    /// [google.cloud.aiplatform.v1.Tensor.DataType.UINT16]: crate::model::tensor::DataType::Uint16
103157    /// [google.cloud.aiplatform.v1.Tensor.DataType.UINT32]: crate::model::tensor::DataType::Uint32
103158    /// [google.cloud.aiplatform.v1.Tensor.DataType.UINT8]: crate::model::tensor::DataType::Uint8
103159    pub uint_val: std::vec::Vec<u32>,
103160
103161    /// [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64]
103162    ///
103163    /// [google.cloud.aiplatform.v1.Tensor.DataType.UINT64]: crate::model::tensor::DataType::Uint64
103164    pub uint64_val: std::vec::Vec<u64>,
103165
103166    /// A list of tensor values.
103167    pub list_val: std::vec::Vec<crate::model::Tensor>,
103168
103169    /// A map of string to tensor.
103170    pub struct_val: std::collections::HashMap<std::string::String, crate::model::Tensor>,
103171
103172    /// Serialized raw tensor content.
103173    pub tensor_val: ::bytes::Bytes,
103174
103175    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
103176}
103177
103178#[cfg(feature = "prediction-service")]
103179impl Tensor {
103180    pub fn new() -> Self {
103181        std::default::Default::default()
103182    }
103183
103184    /// Sets the value of [dtype][crate::model::Tensor::dtype].
103185    pub fn set_dtype<T: std::convert::Into<crate::model::tensor::DataType>>(
103186        mut self,
103187        v: T,
103188    ) -> Self {
103189        self.dtype = v.into();
103190        self
103191    }
103192
103193    /// Sets the value of [shape][crate::model::Tensor::shape].
103194    pub fn set_shape<T, V>(mut self, v: T) -> Self
103195    where
103196        T: std::iter::IntoIterator<Item = V>,
103197        V: std::convert::Into<i64>,
103198    {
103199        use std::iter::Iterator;
103200        self.shape = v.into_iter().map(|i| i.into()).collect();
103201        self
103202    }
103203
103204    /// Sets the value of [bool_val][crate::model::Tensor::bool_val].
103205    pub fn set_bool_val<T, V>(mut self, v: T) -> Self
103206    where
103207        T: std::iter::IntoIterator<Item = V>,
103208        V: std::convert::Into<bool>,
103209    {
103210        use std::iter::Iterator;
103211        self.bool_val = v.into_iter().map(|i| i.into()).collect();
103212        self
103213    }
103214
103215    /// Sets the value of [string_val][crate::model::Tensor::string_val].
103216    pub fn set_string_val<T, V>(mut self, v: T) -> Self
103217    where
103218        T: std::iter::IntoIterator<Item = V>,
103219        V: std::convert::Into<std::string::String>,
103220    {
103221        use std::iter::Iterator;
103222        self.string_val = v.into_iter().map(|i| i.into()).collect();
103223        self
103224    }
103225
103226    /// Sets the value of [bytes_val][crate::model::Tensor::bytes_val].
103227    pub fn set_bytes_val<T, V>(mut self, v: T) -> Self
103228    where
103229        T: std::iter::IntoIterator<Item = V>,
103230        V: std::convert::Into<::bytes::Bytes>,
103231    {
103232        use std::iter::Iterator;
103233        self.bytes_val = v.into_iter().map(|i| i.into()).collect();
103234        self
103235    }
103236
103237    /// Sets the value of [float_val][crate::model::Tensor::float_val].
103238    pub fn set_float_val<T, V>(mut self, v: T) -> Self
103239    where
103240        T: std::iter::IntoIterator<Item = V>,
103241        V: std::convert::Into<f32>,
103242    {
103243        use std::iter::Iterator;
103244        self.float_val = v.into_iter().map(|i| i.into()).collect();
103245        self
103246    }
103247
103248    /// Sets the value of [double_val][crate::model::Tensor::double_val].
103249    pub fn set_double_val<T, V>(mut self, v: T) -> Self
103250    where
103251        T: std::iter::IntoIterator<Item = V>,
103252        V: std::convert::Into<f64>,
103253    {
103254        use std::iter::Iterator;
103255        self.double_val = v.into_iter().map(|i| i.into()).collect();
103256        self
103257    }
103258
103259    /// Sets the value of [int_val][crate::model::Tensor::int_val].
103260    pub fn set_int_val<T, V>(mut self, v: T) -> Self
103261    where
103262        T: std::iter::IntoIterator<Item = V>,
103263        V: std::convert::Into<i32>,
103264    {
103265        use std::iter::Iterator;
103266        self.int_val = v.into_iter().map(|i| i.into()).collect();
103267        self
103268    }
103269
103270    /// Sets the value of [int64_val][crate::model::Tensor::int64_val].
103271    pub fn set_int64_val<T, V>(mut self, v: T) -> Self
103272    where
103273        T: std::iter::IntoIterator<Item = V>,
103274        V: std::convert::Into<i64>,
103275    {
103276        use std::iter::Iterator;
103277        self.int64_val = v.into_iter().map(|i| i.into()).collect();
103278        self
103279    }
103280
103281    /// Sets the value of [uint_val][crate::model::Tensor::uint_val].
103282    pub fn set_uint_val<T, V>(mut self, v: T) -> Self
103283    where
103284        T: std::iter::IntoIterator<Item = V>,
103285        V: std::convert::Into<u32>,
103286    {
103287        use std::iter::Iterator;
103288        self.uint_val = v.into_iter().map(|i| i.into()).collect();
103289        self
103290    }
103291
103292    /// Sets the value of [uint64_val][crate::model::Tensor::uint64_val].
103293    pub fn set_uint64_val<T, V>(mut self, v: T) -> Self
103294    where
103295        T: std::iter::IntoIterator<Item = V>,
103296        V: std::convert::Into<u64>,
103297    {
103298        use std::iter::Iterator;
103299        self.uint64_val = v.into_iter().map(|i| i.into()).collect();
103300        self
103301    }
103302
103303    /// Sets the value of [list_val][crate::model::Tensor::list_val].
103304    pub fn set_list_val<T, V>(mut self, v: T) -> Self
103305    where
103306        T: std::iter::IntoIterator<Item = V>,
103307        V: std::convert::Into<crate::model::Tensor>,
103308    {
103309        use std::iter::Iterator;
103310        self.list_val = v.into_iter().map(|i| i.into()).collect();
103311        self
103312    }
103313
103314    /// Sets the value of [struct_val][crate::model::Tensor::struct_val].
103315    pub fn set_struct_val<T, K, V>(mut self, v: T) -> Self
103316    where
103317        T: std::iter::IntoIterator<Item = (K, V)>,
103318        K: std::convert::Into<std::string::String>,
103319        V: std::convert::Into<crate::model::Tensor>,
103320    {
103321        use std::iter::Iterator;
103322        self.struct_val = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
103323        self
103324    }
103325
103326    /// Sets the value of [tensor_val][crate::model::Tensor::tensor_val].
103327    pub fn set_tensor_val<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
103328        self.tensor_val = v.into();
103329        self
103330    }
103331}
103332
103333#[cfg(feature = "prediction-service")]
103334impl wkt::message::Message for Tensor {
103335    fn typename() -> &'static str {
103336        "type.googleapis.com/google.cloud.aiplatform.v1.Tensor"
103337    }
103338}
103339
103340/// Defines additional types related to [Tensor].
103341#[cfg(feature = "prediction-service")]
103342pub mod tensor {
103343    #[allow(unused_imports)]
103344    use super::*;
103345
103346    /// Data type of the tensor.
103347    ///
103348    /// # Working with unknown values
103349    ///
103350    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
103351    /// additional enum variants at any time. Adding new variants is not considered
103352    /// a breaking change. Applications should write their code in anticipation of:
103353    ///
103354    /// - New values appearing in future releases of the client library, **and**
103355    /// - New values received dynamically, without application changes.
103356    ///
103357    /// Please consult the [Working with enums] section in the user guide for some
103358    /// guidelines.
103359    ///
103360    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
103361    #[cfg(feature = "prediction-service")]
103362    #[derive(Clone, Debug, PartialEq)]
103363    #[non_exhaustive]
103364    pub enum DataType {
103365        /// Not a legal value for DataType. Used to indicate a DataType field has not
103366        /// been set.
103367        Unspecified,
103368        /// Data types that all computation devices are expected to be
103369        /// capable to support.
103370        Bool,
103371        String,
103372        Float,
103373        Double,
103374        Int8,
103375        Int16,
103376        Int32,
103377        Int64,
103378        Uint8,
103379        Uint16,
103380        Uint32,
103381        Uint64,
103382        /// If set, the enum was initialized with an unknown value.
103383        ///
103384        /// Applications can examine the value using [DataType::value] or
103385        /// [DataType::name].
103386        UnknownValue(data_type::UnknownValue),
103387    }
103388
103389    #[doc(hidden)]
103390    #[cfg(feature = "prediction-service")]
103391    pub mod data_type {
103392        #[allow(unused_imports)]
103393        use super::*;
103394        #[derive(Clone, Debug, PartialEq)]
103395        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
103396    }
103397
103398    #[cfg(feature = "prediction-service")]
103399    impl DataType {
103400        /// Gets the enum value.
103401        ///
103402        /// Returns `None` if the enum contains an unknown value deserialized from
103403        /// the string representation of enums.
103404        pub fn value(&self) -> std::option::Option<i32> {
103405            match self {
103406                Self::Unspecified => std::option::Option::Some(0),
103407                Self::Bool => std::option::Option::Some(1),
103408                Self::String => std::option::Option::Some(2),
103409                Self::Float => std::option::Option::Some(3),
103410                Self::Double => std::option::Option::Some(4),
103411                Self::Int8 => std::option::Option::Some(5),
103412                Self::Int16 => std::option::Option::Some(6),
103413                Self::Int32 => std::option::Option::Some(7),
103414                Self::Int64 => std::option::Option::Some(8),
103415                Self::Uint8 => std::option::Option::Some(9),
103416                Self::Uint16 => std::option::Option::Some(10),
103417                Self::Uint32 => std::option::Option::Some(11),
103418                Self::Uint64 => std::option::Option::Some(12),
103419                Self::UnknownValue(u) => u.0.value(),
103420            }
103421        }
103422
103423        /// Gets the enum value as a string.
103424        ///
103425        /// Returns `None` if the enum contains an unknown value deserialized from
103426        /// the integer representation of enums.
103427        pub fn name(&self) -> std::option::Option<&str> {
103428            match self {
103429                Self::Unspecified => std::option::Option::Some("DATA_TYPE_UNSPECIFIED"),
103430                Self::Bool => std::option::Option::Some("BOOL"),
103431                Self::String => std::option::Option::Some("STRING"),
103432                Self::Float => std::option::Option::Some("FLOAT"),
103433                Self::Double => std::option::Option::Some("DOUBLE"),
103434                Self::Int8 => std::option::Option::Some("INT8"),
103435                Self::Int16 => std::option::Option::Some("INT16"),
103436                Self::Int32 => std::option::Option::Some("INT32"),
103437                Self::Int64 => std::option::Option::Some("INT64"),
103438                Self::Uint8 => std::option::Option::Some("UINT8"),
103439                Self::Uint16 => std::option::Option::Some("UINT16"),
103440                Self::Uint32 => std::option::Option::Some("UINT32"),
103441                Self::Uint64 => std::option::Option::Some("UINT64"),
103442                Self::UnknownValue(u) => u.0.name(),
103443            }
103444        }
103445    }
103446
103447    #[cfg(feature = "prediction-service")]
103448    impl std::default::Default for DataType {
103449        fn default() -> Self {
103450            use std::convert::From;
103451            Self::from(0)
103452        }
103453    }
103454
103455    #[cfg(feature = "prediction-service")]
103456    impl std::fmt::Display for DataType {
103457        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
103458            wkt::internal::display_enum(f, self.name(), self.value())
103459        }
103460    }
103461
103462    #[cfg(feature = "prediction-service")]
103463    impl std::convert::From<i32> for DataType {
103464        fn from(value: i32) -> Self {
103465            match value {
103466                0 => Self::Unspecified,
103467                1 => Self::Bool,
103468                2 => Self::String,
103469                3 => Self::Float,
103470                4 => Self::Double,
103471                5 => Self::Int8,
103472                6 => Self::Int16,
103473                7 => Self::Int32,
103474                8 => Self::Int64,
103475                9 => Self::Uint8,
103476                10 => Self::Uint16,
103477                11 => Self::Uint32,
103478                12 => Self::Uint64,
103479                _ => Self::UnknownValue(data_type::UnknownValue(
103480                    wkt::internal::UnknownEnumValue::Integer(value),
103481                )),
103482            }
103483        }
103484    }
103485
103486    #[cfg(feature = "prediction-service")]
103487    impl std::convert::From<&str> for DataType {
103488        fn from(value: &str) -> Self {
103489            use std::string::ToString;
103490            match value {
103491                "DATA_TYPE_UNSPECIFIED" => Self::Unspecified,
103492                "BOOL" => Self::Bool,
103493                "STRING" => Self::String,
103494                "FLOAT" => Self::Float,
103495                "DOUBLE" => Self::Double,
103496                "INT8" => Self::Int8,
103497                "INT16" => Self::Int16,
103498                "INT32" => Self::Int32,
103499                "INT64" => Self::Int64,
103500                "UINT8" => Self::Uint8,
103501                "UINT16" => Self::Uint16,
103502                "UINT32" => Self::Uint32,
103503                "UINT64" => Self::Uint64,
103504                _ => Self::UnknownValue(data_type::UnknownValue(
103505                    wkt::internal::UnknownEnumValue::String(value.to_string()),
103506                )),
103507            }
103508        }
103509    }
103510
103511    #[cfg(feature = "prediction-service")]
103512    impl serde::ser::Serialize for DataType {
103513        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
103514        where
103515            S: serde::Serializer,
103516        {
103517            match self {
103518                Self::Unspecified => serializer.serialize_i32(0),
103519                Self::Bool => serializer.serialize_i32(1),
103520                Self::String => serializer.serialize_i32(2),
103521                Self::Float => serializer.serialize_i32(3),
103522                Self::Double => serializer.serialize_i32(4),
103523                Self::Int8 => serializer.serialize_i32(5),
103524                Self::Int16 => serializer.serialize_i32(6),
103525                Self::Int32 => serializer.serialize_i32(7),
103526                Self::Int64 => serializer.serialize_i32(8),
103527                Self::Uint8 => serializer.serialize_i32(9),
103528                Self::Uint16 => serializer.serialize_i32(10),
103529                Self::Uint32 => serializer.serialize_i32(11),
103530                Self::Uint64 => serializer.serialize_i32(12),
103531                Self::UnknownValue(u) => u.0.serialize(serializer),
103532            }
103533        }
103534    }
103535
103536    #[cfg(feature = "prediction-service")]
103537    impl<'de> serde::de::Deserialize<'de> for DataType {
103538        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
103539        where
103540            D: serde::Deserializer<'de>,
103541        {
103542            deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataType>::new(
103543                ".google.cloud.aiplatform.v1.Tensor.DataType",
103544            ))
103545        }
103546    }
103547}
103548
103549/// Contains model information necessary to perform batch prediction without
103550/// requiring a full model import.
103551#[cfg(feature = "job-service")]
103552#[derive(Clone, Default, PartialEq)]
103553#[non_exhaustive]
103554pub struct UnmanagedContainerModel {
103555    /// The path to the directory containing the Model artifact and any of its
103556    /// supporting files.
103557    pub artifact_uri: std::string::String,
103558
103559    /// Contains the schemata used in Model's predictions and explanations
103560    pub predict_schemata: std::option::Option<crate::model::PredictSchemata>,
103561
103562    /// Input only. The specification of the container that is to be used when
103563    /// deploying this Model.
103564    pub container_spec: std::option::Option<crate::model::ModelContainerSpec>,
103565
103566    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
103567}
103568
103569#[cfg(feature = "job-service")]
103570impl UnmanagedContainerModel {
103571    pub fn new() -> Self {
103572        std::default::Default::default()
103573    }
103574
103575    /// Sets the value of [artifact_uri][crate::model::UnmanagedContainerModel::artifact_uri].
103576    pub fn set_artifact_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
103577        self.artifact_uri = v.into();
103578        self
103579    }
103580
103581    /// Sets the value of [predict_schemata][crate::model::UnmanagedContainerModel::predict_schemata].
103582    pub fn set_predict_schemata<T>(mut self, v: T) -> Self
103583    where
103584        T: std::convert::Into<crate::model::PredictSchemata>,
103585    {
103586        self.predict_schemata = std::option::Option::Some(v.into());
103587        self
103588    }
103589
103590    /// Sets or clears the value of [predict_schemata][crate::model::UnmanagedContainerModel::predict_schemata].
103591    pub fn set_or_clear_predict_schemata<T>(mut self, v: std::option::Option<T>) -> Self
103592    where
103593        T: std::convert::Into<crate::model::PredictSchemata>,
103594    {
103595        self.predict_schemata = v.map(|x| x.into());
103596        self
103597    }
103598
103599    /// Sets the value of [container_spec][crate::model::UnmanagedContainerModel::container_spec].
103600    pub fn set_container_spec<T>(mut self, v: T) -> Self
103601    where
103602        T: std::convert::Into<crate::model::ModelContainerSpec>,
103603    {
103604        self.container_spec = std::option::Option::Some(v.into());
103605        self
103606    }
103607
103608    /// Sets or clears the value of [container_spec][crate::model::UnmanagedContainerModel::container_spec].
103609    pub fn set_or_clear_container_spec<T>(mut self, v: std::option::Option<T>) -> Self
103610    where
103611        T: std::convert::Into<crate::model::ModelContainerSpec>,
103612    {
103613        self.container_spec = v.map(|x| x.into());
103614        self
103615    }
103616}
103617
103618#[cfg(feature = "job-service")]
103619impl wkt::message::Message for UnmanagedContainerModel {
103620    fn typename() -> &'static str {
103621        "type.googleapis.com/google.cloud.aiplatform.v1.UnmanagedContainerModel"
103622    }
103623}
103624
103625/// References an API call. It contains more information about long running
103626/// operation and Jobs that are triggered by the API call.
103627#[cfg(feature = "dataset-service")]
103628#[derive(Clone, Default, PartialEq)]
103629#[non_exhaustive]
103630pub struct UserActionReference {
103631    /// The method name of the API RPC call. For example,
103632    /// "/google.cloud.aiplatform.{apiVersion}.DatasetService.CreateDataset"
103633    pub method: std::string::String,
103634
103635    pub reference: std::option::Option<crate::model::user_action_reference::Reference>,
103636
103637    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
103638}
103639
103640#[cfg(feature = "dataset-service")]
103641impl UserActionReference {
103642    pub fn new() -> Self {
103643        std::default::Default::default()
103644    }
103645
103646    /// Sets the value of [method][crate::model::UserActionReference::method].
103647    pub fn set_method<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
103648        self.method = v.into();
103649        self
103650    }
103651
103652    /// Sets the value of [reference][crate::model::UserActionReference::reference].
103653    ///
103654    /// Note that all the setters affecting `reference` are mutually
103655    /// exclusive.
103656    pub fn set_reference<
103657        T: std::convert::Into<std::option::Option<crate::model::user_action_reference::Reference>>,
103658    >(
103659        mut self,
103660        v: T,
103661    ) -> Self {
103662        self.reference = v.into();
103663        self
103664    }
103665
103666    /// The value of [reference][crate::model::UserActionReference::reference]
103667    /// if it holds a `Operation`, `None` if the field is not set or
103668    /// holds a different branch.
103669    pub fn operation(&self) -> std::option::Option<&std::string::String> {
103670        #[allow(unreachable_patterns)]
103671        self.reference.as_ref().and_then(|v| match v {
103672            crate::model::user_action_reference::Reference::Operation(v) => {
103673                std::option::Option::Some(v)
103674            }
103675            _ => std::option::Option::None,
103676        })
103677    }
103678
103679    /// Sets the value of [reference][crate::model::UserActionReference::reference]
103680    /// to hold a `Operation`.
103681    ///
103682    /// Note that all the setters affecting `reference` are
103683    /// mutually exclusive.
103684    pub fn set_operation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
103685        self.reference = std::option::Option::Some(
103686            crate::model::user_action_reference::Reference::Operation(v.into()),
103687        );
103688        self
103689    }
103690
103691    /// The value of [reference][crate::model::UserActionReference::reference]
103692    /// if it holds a `DataLabelingJob`, `None` if the field is not set or
103693    /// holds a different branch.
103694    pub fn data_labeling_job(&self) -> std::option::Option<&std::string::String> {
103695        #[allow(unreachable_patterns)]
103696        self.reference.as_ref().and_then(|v| match v {
103697            crate::model::user_action_reference::Reference::DataLabelingJob(v) => {
103698                std::option::Option::Some(v)
103699            }
103700            _ => std::option::Option::None,
103701        })
103702    }
103703
103704    /// Sets the value of [reference][crate::model::UserActionReference::reference]
103705    /// to hold a `DataLabelingJob`.
103706    ///
103707    /// Note that all the setters affecting `reference` are
103708    /// mutually exclusive.
103709    pub fn set_data_labeling_job<T: std::convert::Into<std::string::String>>(
103710        mut self,
103711        v: T,
103712    ) -> Self {
103713        self.reference = std::option::Option::Some(
103714            crate::model::user_action_reference::Reference::DataLabelingJob(v.into()),
103715        );
103716        self
103717    }
103718}
103719
103720#[cfg(feature = "dataset-service")]
103721impl wkt::message::Message for UserActionReference {
103722    fn typename() -> &'static str {
103723        "type.googleapis.com/google.cloud.aiplatform.v1.UserActionReference"
103724    }
103725}
103726
103727/// Defines additional types related to [UserActionReference].
103728#[cfg(feature = "dataset-service")]
103729pub mod user_action_reference {
103730    #[allow(unused_imports)]
103731    use super::*;
103732
103733    #[cfg(feature = "dataset-service")]
103734    #[derive(Clone, Debug, PartialEq)]
103735    #[non_exhaustive]
103736    pub enum Reference {
103737        /// For API calls that return a long running operation.
103738        /// Resource name of the long running operation.
103739        /// Format:
103740        /// `projects/{project}/locations/{location}/operations/{operation}`
103741        Operation(std::string::String),
103742        /// For API calls that start a LabelingJob.
103743        /// Resource name of the LabelingJob.
103744        /// Format:
103745        /// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
103746        DataLabelingJob(std::string::String),
103747    }
103748}
103749
103750/// Value is the value of the field.
103751#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
103752#[derive(Clone, Default, PartialEq)]
103753#[non_exhaustive]
103754pub struct Value {
103755    pub value: std::option::Option<crate::model::value::Value>,
103756
103757    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
103758}
103759
103760#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
103761impl Value {
103762    pub fn new() -> Self {
103763        std::default::Default::default()
103764    }
103765
103766    /// Sets the value of [value][crate::model::Value::value].
103767    ///
103768    /// Note that all the setters affecting `value` are mutually
103769    /// exclusive.
103770    pub fn set_value<T: std::convert::Into<std::option::Option<crate::model::value::Value>>>(
103771        mut self,
103772        v: T,
103773    ) -> Self {
103774        self.value = v.into();
103775        self
103776    }
103777
103778    /// The value of [value][crate::model::Value::value]
103779    /// if it holds a `IntValue`, `None` if the field is not set or
103780    /// holds a different branch.
103781    pub fn int_value(&self) -> std::option::Option<&i64> {
103782        #[allow(unreachable_patterns)]
103783        self.value.as_ref().and_then(|v| match v {
103784            crate::model::value::Value::IntValue(v) => std::option::Option::Some(v),
103785            _ => std::option::Option::None,
103786        })
103787    }
103788
103789    /// Sets the value of [value][crate::model::Value::value]
103790    /// to hold a `IntValue`.
103791    ///
103792    /// Note that all the setters affecting `value` are
103793    /// mutually exclusive.
103794    pub fn set_int_value<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
103795        self.value = std::option::Option::Some(crate::model::value::Value::IntValue(v.into()));
103796        self
103797    }
103798
103799    /// The value of [value][crate::model::Value::value]
103800    /// if it holds a `DoubleValue`, `None` if the field is not set or
103801    /// holds a different branch.
103802    pub fn double_value(&self) -> std::option::Option<&f64> {
103803        #[allow(unreachable_patterns)]
103804        self.value.as_ref().and_then(|v| match v {
103805            crate::model::value::Value::DoubleValue(v) => std::option::Option::Some(v),
103806            _ => std::option::Option::None,
103807        })
103808    }
103809
103810    /// Sets the value of [value][crate::model::Value::value]
103811    /// to hold a `DoubleValue`.
103812    ///
103813    /// Note that all the setters affecting `value` are
103814    /// mutually exclusive.
103815    pub fn set_double_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
103816        self.value = std::option::Option::Some(crate::model::value::Value::DoubleValue(v.into()));
103817        self
103818    }
103819
103820    /// The value of [value][crate::model::Value::value]
103821    /// if it holds a `StringValue`, `None` if the field is not set or
103822    /// holds a different branch.
103823    pub fn string_value(&self) -> std::option::Option<&std::string::String> {
103824        #[allow(unreachable_patterns)]
103825        self.value.as_ref().and_then(|v| match v {
103826            crate::model::value::Value::StringValue(v) => std::option::Option::Some(v),
103827            _ => std::option::Option::None,
103828        })
103829    }
103830
103831    /// Sets the value of [value][crate::model::Value::value]
103832    /// to hold a `StringValue`.
103833    ///
103834    /// Note that all the setters affecting `value` are
103835    /// mutually exclusive.
103836    pub fn set_string_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
103837        self.value = std::option::Option::Some(crate::model::value::Value::StringValue(v.into()));
103838        self
103839    }
103840}
103841
103842#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
103843impl wkt::message::Message for Value {
103844    fn typename() -> &'static str {
103845        "type.googleapis.com/google.cloud.aiplatform.v1.Value"
103846    }
103847}
103848
103849/// Defines additional types related to [Value].
103850#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
103851pub mod value {
103852    #[allow(unused_imports)]
103853    use super::*;
103854
103855    #[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
103856    #[derive(Clone, Debug, PartialEq)]
103857    #[non_exhaustive]
103858    pub enum Value {
103859        /// An integer value.
103860        IntValue(i64),
103861        /// A double value.
103862        DoubleValue(f64),
103863        /// A string value.
103864        StringValue(std::string::String),
103865    }
103866}
103867
103868/// Config for the embedding model to use for RAG.
103869#[cfg(feature = "vertex-rag-data-service")]
103870#[derive(Clone, Default, PartialEq)]
103871#[non_exhaustive]
103872pub struct RagEmbeddingModelConfig {
103873    /// The model config to use.
103874    pub model_config: std::option::Option<crate::model::rag_embedding_model_config::ModelConfig>,
103875
103876    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
103877}
103878
103879#[cfg(feature = "vertex-rag-data-service")]
103880impl RagEmbeddingModelConfig {
103881    pub fn new() -> Self {
103882        std::default::Default::default()
103883    }
103884
103885    /// Sets the value of [model_config][crate::model::RagEmbeddingModelConfig::model_config].
103886    ///
103887    /// Note that all the setters affecting `model_config` are mutually
103888    /// exclusive.
103889    pub fn set_model_config<
103890        T: std::convert::Into<
103891                std::option::Option<crate::model::rag_embedding_model_config::ModelConfig>,
103892            >,
103893    >(
103894        mut self,
103895        v: T,
103896    ) -> Self {
103897        self.model_config = v.into();
103898        self
103899    }
103900
103901    /// The value of [model_config][crate::model::RagEmbeddingModelConfig::model_config]
103902    /// if it holds a `VertexPredictionEndpoint`, `None` if the field is not set or
103903    /// holds a different branch.
103904    pub fn vertex_prediction_endpoint(
103905        &self,
103906    ) -> std::option::Option<
103907        &std::boxed::Box<crate::model::rag_embedding_model_config::VertexPredictionEndpoint>,
103908    > {
103909        #[allow(unreachable_patterns)]
103910        self.model_config.as_ref().and_then(|v| match v {
103911            crate::model::rag_embedding_model_config::ModelConfig::VertexPredictionEndpoint(v) => {
103912                std::option::Option::Some(v)
103913            }
103914            _ => std::option::Option::None,
103915        })
103916    }
103917
103918    /// Sets the value of [model_config][crate::model::RagEmbeddingModelConfig::model_config]
103919    /// to hold a `VertexPredictionEndpoint`.
103920    ///
103921    /// Note that all the setters affecting `model_config` are
103922    /// mutually exclusive.
103923    pub fn set_vertex_prediction_endpoint<
103924        T: std::convert::Into<
103925                std::boxed::Box<crate::model::rag_embedding_model_config::VertexPredictionEndpoint>,
103926            >,
103927    >(
103928        mut self,
103929        v: T,
103930    ) -> Self {
103931        self.model_config = std::option::Option::Some(
103932            crate::model::rag_embedding_model_config::ModelConfig::VertexPredictionEndpoint(
103933                v.into(),
103934            ),
103935        );
103936        self
103937    }
103938}
103939
103940#[cfg(feature = "vertex-rag-data-service")]
103941impl wkt::message::Message for RagEmbeddingModelConfig {
103942    fn typename() -> &'static str {
103943        "type.googleapis.com/google.cloud.aiplatform.v1.RagEmbeddingModelConfig"
103944    }
103945}
103946
103947/// Defines additional types related to [RagEmbeddingModelConfig].
103948#[cfg(feature = "vertex-rag-data-service")]
103949pub mod rag_embedding_model_config {
103950    #[allow(unused_imports)]
103951    use super::*;
103952
103953    /// Config representing a model hosted on Vertex Prediction Endpoint.
103954    #[cfg(feature = "vertex-rag-data-service")]
103955    #[derive(Clone, Default, PartialEq)]
103956    #[non_exhaustive]
103957    pub struct VertexPredictionEndpoint {
103958        /// Required. The endpoint resource name.
103959        /// Format:
103960        /// `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`
103961        /// or
103962        /// `projects/{project}/locations/{location}/endpoints/{endpoint}`
103963        pub endpoint: std::string::String,
103964
103965        /// Output only. The resource name of the model that is deployed on the
103966        /// endpoint. Present only when the endpoint is not a publisher model.
103967        /// Pattern:
103968        /// `projects/{project}/locations/{location}/models/{model}`
103969        pub model: std::string::String,
103970
103971        /// Output only. Version ID of the model that is deployed on the endpoint.
103972        /// Present only when the endpoint is not a publisher model.
103973        pub model_version_id: std::string::String,
103974
103975        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
103976    }
103977
103978    #[cfg(feature = "vertex-rag-data-service")]
103979    impl VertexPredictionEndpoint {
103980        pub fn new() -> Self {
103981            std::default::Default::default()
103982        }
103983
103984        /// Sets the value of [endpoint][crate::model::rag_embedding_model_config::VertexPredictionEndpoint::endpoint].
103985        pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
103986            self.endpoint = v.into();
103987            self
103988        }
103989
103990        /// Sets the value of [model][crate::model::rag_embedding_model_config::VertexPredictionEndpoint::model].
103991        pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
103992            self.model = v.into();
103993            self
103994        }
103995
103996        /// Sets the value of [model_version_id][crate::model::rag_embedding_model_config::VertexPredictionEndpoint::model_version_id].
103997        pub fn set_model_version_id<T: std::convert::Into<std::string::String>>(
103998            mut self,
103999            v: T,
104000        ) -> Self {
104001            self.model_version_id = v.into();
104002            self
104003        }
104004    }
104005
104006    #[cfg(feature = "vertex-rag-data-service")]
104007    impl wkt::message::Message for VertexPredictionEndpoint {
104008        fn typename() -> &'static str {
104009            "type.googleapis.com/google.cloud.aiplatform.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint"
104010        }
104011    }
104012
104013    /// The model config to use.
104014    #[cfg(feature = "vertex-rag-data-service")]
104015    #[derive(Clone, Debug, PartialEq)]
104016    #[non_exhaustive]
104017    pub enum ModelConfig {
104018        /// The Vertex AI Prediction Endpoint that either refers to a publisher model
104019        /// or an endpoint that is hosting a 1P fine-tuned text embedding model.
104020        /// Endpoints hosting non-1P fine-tuned text embedding models are
104021        /// currently not supported.
104022        /// This is used for dense vector search.
104023        VertexPredictionEndpoint(
104024            std::boxed::Box<crate::model::rag_embedding_model_config::VertexPredictionEndpoint>,
104025        ),
104026    }
104027}
104028
104029/// Config for the Vector DB to use for RAG.
104030#[cfg(feature = "vertex-rag-data-service")]
104031#[derive(Clone, Default, PartialEq)]
104032#[non_exhaustive]
104033pub struct RagVectorDbConfig {
104034    /// Authentication config for the chosen Vector DB.
104035    pub api_auth: std::option::Option<crate::model::ApiAuth>,
104036
104037    /// Optional. Immutable. The embedding model config of the Vector DB.
104038    pub rag_embedding_model_config: std::option::Option<crate::model::RagEmbeddingModelConfig>,
104039
104040    /// The config for the Vector DB.
104041    pub vector_db: std::option::Option<crate::model::rag_vector_db_config::VectorDb>,
104042
104043    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
104044}
104045
104046#[cfg(feature = "vertex-rag-data-service")]
104047impl RagVectorDbConfig {
104048    pub fn new() -> Self {
104049        std::default::Default::default()
104050    }
104051
104052    /// Sets the value of [api_auth][crate::model::RagVectorDbConfig::api_auth].
104053    pub fn set_api_auth<T>(mut self, v: T) -> Self
104054    where
104055        T: std::convert::Into<crate::model::ApiAuth>,
104056    {
104057        self.api_auth = std::option::Option::Some(v.into());
104058        self
104059    }
104060
104061    /// Sets or clears the value of [api_auth][crate::model::RagVectorDbConfig::api_auth].
104062    pub fn set_or_clear_api_auth<T>(mut self, v: std::option::Option<T>) -> Self
104063    where
104064        T: std::convert::Into<crate::model::ApiAuth>,
104065    {
104066        self.api_auth = v.map(|x| x.into());
104067        self
104068    }
104069
104070    /// Sets the value of [rag_embedding_model_config][crate::model::RagVectorDbConfig::rag_embedding_model_config].
104071    pub fn set_rag_embedding_model_config<T>(mut self, v: T) -> Self
104072    where
104073        T: std::convert::Into<crate::model::RagEmbeddingModelConfig>,
104074    {
104075        self.rag_embedding_model_config = std::option::Option::Some(v.into());
104076        self
104077    }
104078
104079    /// Sets or clears the value of [rag_embedding_model_config][crate::model::RagVectorDbConfig::rag_embedding_model_config].
104080    pub fn set_or_clear_rag_embedding_model_config<T>(mut self, v: std::option::Option<T>) -> Self
104081    where
104082        T: std::convert::Into<crate::model::RagEmbeddingModelConfig>,
104083    {
104084        self.rag_embedding_model_config = v.map(|x| x.into());
104085        self
104086    }
104087
104088    /// Sets the value of [vector_db][crate::model::RagVectorDbConfig::vector_db].
104089    ///
104090    /// Note that all the setters affecting `vector_db` are mutually
104091    /// exclusive.
104092    pub fn set_vector_db<
104093        T: std::convert::Into<std::option::Option<crate::model::rag_vector_db_config::VectorDb>>,
104094    >(
104095        mut self,
104096        v: T,
104097    ) -> Self {
104098        self.vector_db = v.into();
104099        self
104100    }
104101
104102    /// The value of [vector_db][crate::model::RagVectorDbConfig::vector_db]
104103    /// if it holds a `RagManagedDb`, `None` if the field is not set or
104104    /// holds a different branch.
104105    pub fn rag_managed_db(
104106        &self,
104107    ) -> std::option::Option<&std::boxed::Box<crate::model::rag_vector_db_config::RagManagedDb>>
104108    {
104109        #[allow(unreachable_patterns)]
104110        self.vector_db.as_ref().and_then(|v| match v {
104111            crate::model::rag_vector_db_config::VectorDb::RagManagedDb(v) => {
104112                std::option::Option::Some(v)
104113            }
104114            _ => std::option::Option::None,
104115        })
104116    }
104117
104118    /// Sets the value of [vector_db][crate::model::RagVectorDbConfig::vector_db]
104119    /// to hold a `RagManagedDb`.
104120    ///
104121    /// Note that all the setters affecting `vector_db` are
104122    /// mutually exclusive.
104123    pub fn set_rag_managed_db<
104124        T: std::convert::Into<std::boxed::Box<crate::model::rag_vector_db_config::RagManagedDb>>,
104125    >(
104126        mut self,
104127        v: T,
104128    ) -> Self {
104129        self.vector_db = std::option::Option::Some(
104130            crate::model::rag_vector_db_config::VectorDb::RagManagedDb(v.into()),
104131        );
104132        self
104133    }
104134
104135    /// The value of [vector_db][crate::model::RagVectorDbConfig::vector_db]
104136    /// if it holds a `Pinecone`, `None` if the field is not set or
104137    /// holds a different branch.
104138    pub fn pinecone(
104139        &self,
104140    ) -> std::option::Option<&std::boxed::Box<crate::model::rag_vector_db_config::Pinecone>> {
104141        #[allow(unreachable_patterns)]
104142        self.vector_db.as_ref().and_then(|v| match v {
104143            crate::model::rag_vector_db_config::VectorDb::Pinecone(v) => {
104144                std::option::Option::Some(v)
104145            }
104146            _ => std::option::Option::None,
104147        })
104148    }
104149
104150    /// Sets the value of [vector_db][crate::model::RagVectorDbConfig::vector_db]
104151    /// to hold a `Pinecone`.
104152    ///
104153    /// Note that all the setters affecting `vector_db` are
104154    /// mutually exclusive.
104155    pub fn set_pinecone<
104156        T: std::convert::Into<std::boxed::Box<crate::model::rag_vector_db_config::Pinecone>>,
104157    >(
104158        mut self,
104159        v: T,
104160    ) -> Self {
104161        self.vector_db = std::option::Option::Some(
104162            crate::model::rag_vector_db_config::VectorDb::Pinecone(v.into()),
104163        );
104164        self
104165    }
104166
104167    /// The value of [vector_db][crate::model::RagVectorDbConfig::vector_db]
104168    /// if it holds a `VertexVectorSearch`, `None` if the field is not set or
104169    /// holds a different branch.
104170    pub fn vertex_vector_search(
104171        &self,
104172    ) -> std::option::Option<&std::boxed::Box<crate::model::rag_vector_db_config::VertexVectorSearch>>
104173    {
104174        #[allow(unreachable_patterns)]
104175        self.vector_db.as_ref().and_then(|v| match v {
104176            crate::model::rag_vector_db_config::VectorDb::VertexVectorSearch(v) => {
104177                std::option::Option::Some(v)
104178            }
104179            _ => std::option::Option::None,
104180        })
104181    }
104182
104183    /// Sets the value of [vector_db][crate::model::RagVectorDbConfig::vector_db]
104184    /// to hold a `VertexVectorSearch`.
104185    ///
104186    /// Note that all the setters affecting `vector_db` are
104187    /// mutually exclusive.
104188    pub fn set_vertex_vector_search<
104189        T: std::convert::Into<std::boxed::Box<crate::model::rag_vector_db_config::VertexVectorSearch>>,
104190    >(
104191        mut self,
104192        v: T,
104193    ) -> Self {
104194        self.vector_db = std::option::Option::Some(
104195            crate::model::rag_vector_db_config::VectorDb::VertexVectorSearch(v.into()),
104196        );
104197        self
104198    }
104199}
104200
104201#[cfg(feature = "vertex-rag-data-service")]
104202impl wkt::message::Message for RagVectorDbConfig {
104203    fn typename() -> &'static str {
104204        "type.googleapis.com/google.cloud.aiplatform.v1.RagVectorDbConfig"
104205    }
104206}
104207
104208/// Defines additional types related to [RagVectorDbConfig].
104209#[cfg(feature = "vertex-rag-data-service")]
104210pub mod rag_vector_db_config {
104211    #[allow(unused_imports)]
104212    use super::*;
104213
104214    /// The config for the default RAG-managed Vector DB.
104215    #[cfg(feature = "vertex-rag-data-service")]
104216    #[derive(Clone, Default, PartialEq)]
104217    #[non_exhaustive]
104218    pub struct RagManagedDb {
104219        /// Choice of retrieval strategy.
104220        pub retrieval_strategy: std::option::Option<
104221            crate::model::rag_vector_db_config::rag_managed_db::RetrievalStrategy,
104222        >,
104223
104224        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
104225    }
104226
104227    #[cfg(feature = "vertex-rag-data-service")]
104228    impl RagManagedDb {
104229        pub fn new() -> Self {
104230            std::default::Default::default()
104231        }
104232
104233        /// Sets the value of [retrieval_strategy][crate::model::rag_vector_db_config::RagManagedDb::retrieval_strategy].
104234        ///
104235        /// Note that all the setters affecting `retrieval_strategy` are mutually
104236        /// exclusive.
104237        pub fn set_retrieval_strategy<
104238            T: std::convert::Into<
104239                    std::option::Option<
104240                        crate::model::rag_vector_db_config::rag_managed_db::RetrievalStrategy,
104241                    >,
104242                >,
104243        >(
104244            mut self,
104245            v: T,
104246        ) -> Self {
104247            self.retrieval_strategy = v.into();
104248            self
104249        }
104250
104251        /// The value of [retrieval_strategy][crate::model::rag_vector_db_config::RagManagedDb::retrieval_strategy]
104252        /// if it holds a `Knn`, `None` if the field is not set or
104253        /// holds a different branch.
104254        pub fn knn(
104255            &self,
104256        ) -> std::option::Option<
104257            &std::boxed::Box<crate::model::rag_vector_db_config::rag_managed_db::Knn>,
104258        > {
104259            #[allow(unreachable_patterns)]
104260            self.retrieval_strategy.as_ref().and_then(|v| match v {
104261                crate::model::rag_vector_db_config::rag_managed_db::RetrievalStrategy::Knn(v) => {
104262                    std::option::Option::Some(v)
104263                }
104264                _ => std::option::Option::None,
104265            })
104266        }
104267
104268        /// Sets the value of [retrieval_strategy][crate::model::rag_vector_db_config::RagManagedDb::retrieval_strategy]
104269        /// to hold a `Knn`.
104270        ///
104271        /// Note that all the setters affecting `retrieval_strategy` are
104272        /// mutually exclusive.
104273        pub fn set_knn<
104274            T: std::convert::Into<
104275                    std::boxed::Box<crate::model::rag_vector_db_config::rag_managed_db::Knn>,
104276                >,
104277        >(
104278            mut self,
104279            v: T,
104280        ) -> Self {
104281            self.retrieval_strategy = std::option::Option::Some(
104282                crate::model::rag_vector_db_config::rag_managed_db::RetrievalStrategy::Knn(
104283                    v.into(),
104284                ),
104285            );
104286            self
104287        }
104288
104289        /// The value of [retrieval_strategy][crate::model::rag_vector_db_config::RagManagedDb::retrieval_strategy]
104290        /// if it holds a `Ann`, `None` if the field is not set or
104291        /// holds a different branch.
104292        pub fn ann(
104293            &self,
104294        ) -> std::option::Option<
104295            &std::boxed::Box<crate::model::rag_vector_db_config::rag_managed_db::Ann>,
104296        > {
104297            #[allow(unreachable_patterns)]
104298            self.retrieval_strategy.as_ref().and_then(|v| match v {
104299                crate::model::rag_vector_db_config::rag_managed_db::RetrievalStrategy::Ann(v) => {
104300                    std::option::Option::Some(v)
104301                }
104302                _ => std::option::Option::None,
104303            })
104304        }
104305
104306        /// Sets the value of [retrieval_strategy][crate::model::rag_vector_db_config::RagManagedDb::retrieval_strategy]
104307        /// to hold a `Ann`.
104308        ///
104309        /// Note that all the setters affecting `retrieval_strategy` are
104310        /// mutually exclusive.
104311        pub fn set_ann<
104312            T: std::convert::Into<
104313                    std::boxed::Box<crate::model::rag_vector_db_config::rag_managed_db::Ann>,
104314                >,
104315        >(
104316            mut self,
104317            v: T,
104318        ) -> Self {
104319            self.retrieval_strategy = std::option::Option::Some(
104320                crate::model::rag_vector_db_config::rag_managed_db::RetrievalStrategy::Ann(
104321                    v.into(),
104322                ),
104323            );
104324            self
104325        }
104326    }
104327
104328    #[cfg(feature = "vertex-rag-data-service")]
104329    impl wkt::message::Message for RagManagedDb {
104330        fn typename() -> &'static str {
104331            "type.googleapis.com/google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb"
104332        }
104333    }
104334
104335    /// Defines additional types related to [RagManagedDb].
104336    #[cfg(feature = "vertex-rag-data-service")]
104337    pub mod rag_managed_db {
104338        #[allow(unused_imports)]
104339        use super::*;
104340
104341        /// Config for KNN search.
104342        #[cfg(feature = "vertex-rag-data-service")]
104343        #[derive(Clone, Default, PartialEq)]
104344        #[non_exhaustive]
104345        pub struct Knn {
104346            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
104347        }
104348
104349        #[cfg(feature = "vertex-rag-data-service")]
104350        impl Knn {
104351            pub fn new() -> Self {
104352                std::default::Default::default()
104353            }
104354        }
104355
104356        #[cfg(feature = "vertex-rag-data-service")]
104357        impl wkt::message::Message for Knn {
104358            fn typename() -> &'static str {
104359                "type.googleapis.com/google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb.KNN"
104360            }
104361        }
104362
104363        /// Config for ANN search.
104364        ///
104365        /// RagManagedDb uses a tree-based structure to partition data and
104366        /// facilitate faster searches. As a tradeoff, it requires longer indexing
104367        /// time and manual triggering of index rebuild via the ImportRagFiles and
104368        /// UpdateRagCorpus API.
104369        #[cfg(feature = "vertex-rag-data-service")]
104370        #[derive(Clone, Default, PartialEq)]
104371        #[non_exhaustive]
104372        pub struct Ann {
104373            /// The depth of the tree-based structure. Only depth values of 2 and 3 are
104374            /// supported.
104375            ///
104376            /// Recommended value is 2 if you have if you have O(10K) files in the
104377            /// RagCorpus and set this to 3 if more than that.
104378            ///
104379            /// Default value is 2.
104380            pub tree_depth: i32,
104381
104382            /// Number of leaf nodes in the tree-based structure. Each leaf node
104383            /// contains groups of closely related vectors along with their
104384            /// corresponding centroid.
104385            ///
104386            /// Recommended value is 10 * sqrt(num of RagFiles in your RagCorpus).
104387            ///
104388            /// Default value is 500.
104389            pub leaf_count: i32,
104390
104391            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
104392        }
104393
104394        #[cfg(feature = "vertex-rag-data-service")]
104395        impl Ann {
104396            pub fn new() -> Self {
104397                std::default::Default::default()
104398            }
104399
104400            /// Sets the value of [tree_depth][crate::model::rag_vector_db_config::rag_managed_db::Ann::tree_depth].
104401            pub fn set_tree_depth<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
104402                self.tree_depth = v.into();
104403                self
104404            }
104405
104406            /// Sets the value of [leaf_count][crate::model::rag_vector_db_config::rag_managed_db::Ann::leaf_count].
104407            pub fn set_leaf_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
104408                self.leaf_count = v.into();
104409                self
104410            }
104411        }
104412
104413        #[cfg(feature = "vertex-rag-data-service")]
104414        impl wkt::message::Message for Ann {
104415            fn typename() -> &'static str {
104416                "type.googleapis.com/google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb.ANN"
104417            }
104418        }
104419
104420        /// Choice of retrieval strategy.
104421        #[cfg(feature = "vertex-rag-data-service")]
104422        #[derive(Clone, Debug, PartialEq)]
104423        #[non_exhaustive]
104424        pub enum RetrievalStrategy {
104425            /// Performs a KNN search on RagCorpus.
104426            /// Default choice if not specified.
104427            Knn(std::boxed::Box<crate::model::rag_vector_db_config::rag_managed_db::Knn>),
104428            /// Performs an ANN search on RagCorpus. Use this if you have a lot of
104429            /// files (> 10K) in your RagCorpus and want to reduce the search latency.
104430            Ann(std::boxed::Box<crate::model::rag_vector_db_config::rag_managed_db::Ann>),
104431        }
104432    }
104433
104434    /// The config for the Pinecone.
104435    #[cfg(feature = "vertex-rag-data-service")]
104436    #[derive(Clone, Default, PartialEq)]
104437    #[non_exhaustive]
104438    pub struct Pinecone {
104439        /// Pinecone index name.
104440        /// This value cannot be changed after it's set.
104441        pub index_name: std::string::String,
104442
104443        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
104444    }
104445
104446    #[cfg(feature = "vertex-rag-data-service")]
104447    impl Pinecone {
104448        pub fn new() -> Self {
104449            std::default::Default::default()
104450        }
104451
104452        /// Sets the value of [index_name][crate::model::rag_vector_db_config::Pinecone::index_name].
104453        pub fn set_index_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
104454            self.index_name = v.into();
104455            self
104456        }
104457    }
104458
104459    #[cfg(feature = "vertex-rag-data-service")]
104460    impl wkt::message::Message for Pinecone {
104461        fn typename() -> &'static str {
104462            "type.googleapis.com/google.cloud.aiplatform.v1.RagVectorDbConfig.Pinecone"
104463        }
104464    }
104465
104466    /// The config for the Vertex Vector Search.
104467    #[cfg(feature = "vertex-rag-data-service")]
104468    #[derive(Clone, Default, PartialEq)]
104469    #[non_exhaustive]
104470    pub struct VertexVectorSearch {
104471        /// The resource name of the Index Endpoint.
104472        /// Format:
104473        /// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
104474        pub index_endpoint: std::string::String,
104475
104476        /// The resource name of the Index.
104477        /// Format:
104478        /// `projects/{project}/locations/{location}/indexes/{index}`
104479        pub index: std::string::String,
104480
104481        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
104482    }
104483
104484    #[cfg(feature = "vertex-rag-data-service")]
104485    impl VertexVectorSearch {
104486        pub fn new() -> Self {
104487            std::default::Default::default()
104488        }
104489
104490        /// Sets the value of [index_endpoint][crate::model::rag_vector_db_config::VertexVectorSearch::index_endpoint].
104491        pub fn set_index_endpoint<T: std::convert::Into<std::string::String>>(
104492            mut self,
104493            v: T,
104494        ) -> Self {
104495            self.index_endpoint = v.into();
104496            self
104497        }
104498
104499        /// Sets the value of [index][crate::model::rag_vector_db_config::VertexVectorSearch::index].
104500        pub fn set_index<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
104501            self.index = v.into();
104502            self
104503        }
104504    }
104505
104506    #[cfg(feature = "vertex-rag-data-service")]
104507    impl wkt::message::Message for VertexVectorSearch {
104508        fn typename() -> &'static str {
104509            "type.googleapis.com/google.cloud.aiplatform.v1.RagVectorDbConfig.VertexVectorSearch"
104510        }
104511    }
104512
104513    /// The config for the Vector DB.
104514    #[cfg(feature = "vertex-rag-data-service")]
104515    #[derive(Clone, Debug, PartialEq)]
104516    #[non_exhaustive]
104517    pub enum VectorDb {
104518        /// The config for the RAG-managed Vector DB.
104519        RagManagedDb(std::boxed::Box<crate::model::rag_vector_db_config::RagManagedDb>),
104520        /// The config for the Pinecone.
104521        Pinecone(std::boxed::Box<crate::model::rag_vector_db_config::Pinecone>),
104522        /// The config for the Vertex Vector Search.
104523        VertexVectorSearch(std::boxed::Box<crate::model::rag_vector_db_config::VertexVectorSearch>),
104524    }
104525}
104526
104527/// RagFile status.
104528#[cfg(feature = "vertex-rag-data-service")]
104529#[derive(Clone, Default, PartialEq)]
104530#[non_exhaustive]
104531pub struct FileStatus {
104532    /// Output only. RagFile state.
104533    pub state: crate::model::file_status::State,
104534
104535    /// Output only. Only when the `state` field is ERROR.
104536    pub error_status: std::string::String,
104537
104538    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
104539}
104540
104541#[cfg(feature = "vertex-rag-data-service")]
104542impl FileStatus {
104543    pub fn new() -> Self {
104544        std::default::Default::default()
104545    }
104546
104547    /// Sets the value of [state][crate::model::FileStatus::state].
104548    pub fn set_state<T: std::convert::Into<crate::model::file_status::State>>(
104549        mut self,
104550        v: T,
104551    ) -> Self {
104552        self.state = v.into();
104553        self
104554    }
104555
104556    /// Sets the value of [error_status][crate::model::FileStatus::error_status].
104557    pub fn set_error_status<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
104558        self.error_status = v.into();
104559        self
104560    }
104561}
104562
104563#[cfg(feature = "vertex-rag-data-service")]
104564impl wkt::message::Message for FileStatus {
104565    fn typename() -> &'static str {
104566        "type.googleapis.com/google.cloud.aiplatform.v1.FileStatus"
104567    }
104568}
104569
104570/// Defines additional types related to [FileStatus].
104571#[cfg(feature = "vertex-rag-data-service")]
104572pub mod file_status {
104573    #[allow(unused_imports)]
104574    use super::*;
104575
104576    /// RagFile state.
104577    ///
104578    /// # Working with unknown values
104579    ///
104580    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
104581    /// additional enum variants at any time. Adding new variants is not considered
104582    /// a breaking change. Applications should write their code in anticipation of:
104583    ///
104584    /// - New values appearing in future releases of the client library, **and**
104585    /// - New values received dynamically, without application changes.
104586    ///
104587    /// Please consult the [Working with enums] section in the user guide for some
104588    /// guidelines.
104589    ///
104590    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
104591    #[cfg(feature = "vertex-rag-data-service")]
104592    #[derive(Clone, Debug, PartialEq)]
104593    #[non_exhaustive]
104594    pub enum State {
104595        /// RagFile state is unspecified.
104596        Unspecified,
104597        /// RagFile resource has been created and indexed successfully.
104598        Active,
104599        /// RagFile resource is in a problematic state.
104600        /// See `error_message` field for details.
104601        Error,
104602        /// If set, the enum was initialized with an unknown value.
104603        ///
104604        /// Applications can examine the value using [State::value] or
104605        /// [State::name].
104606        UnknownValue(state::UnknownValue),
104607    }
104608
104609    #[doc(hidden)]
104610    #[cfg(feature = "vertex-rag-data-service")]
104611    pub mod state {
104612        #[allow(unused_imports)]
104613        use super::*;
104614        #[derive(Clone, Debug, PartialEq)]
104615        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
104616    }
104617
104618    #[cfg(feature = "vertex-rag-data-service")]
104619    impl State {
104620        /// Gets the enum value.
104621        ///
104622        /// Returns `None` if the enum contains an unknown value deserialized from
104623        /// the string representation of enums.
104624        pub fn value(&self) -> std::option::Option<i32> {
104625            match self {
104626                Self::Unspecified => std::option::Option::Some(0),
104627                Self::Active => std::option::Option::Some(1),
104628                Self::Error => std::option::Option::Some(2),
104629                Self::UnknownValue(u) => u.0.value(),
104630            }
104631        }
104632
104633        /// Gets the enum value as a string.
104634        ///
104635        /// Returns `None` if the enum contains an unknown value deserialized from
104636        /// the integer representation of enums.
104637        pub fn name(&self) -> std::option::Option<&str> {
104638            match self {
104639                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
104640                Self::Active => std::option::Option::Some("ACTIVE"),
104641                Self::Error => std::option::Option::Some("ERROR"),
104642                Self::UnknownValue(u) => u.0.name(),
104643            }
104644        }
104645    }
104646
104647    #[cfg(feature = "vertex-rag-data-service")]
104648    impl std::default::Default for State {
104649        fn default() -> Self {
104650            use std::convert::From;
104651            Self::from(0)
104652        }
104653    }
104654
104655    #[cfg(feature = "vertex-rag-data-service")]
104656    impl std::fmt::Display for State {
104657        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
104658            wkt::internal::display_enum(f, self.name(), self.value())
104659        }
104660    }
104661
104662    #[cfg(feature = "vertex-rag-data-service")]
104663    impl std::convert::From<i32> for State {
104664        fn from(value: i32) -> Self {
104665            match value {
104666                0 => Self::Unspecified,
104667                1 => Self::Active,
104668                2 => Self::Error,
104669                _ => Self::UnknownValue(state::UnknownValue(
104670                    wkt::internal::UnknownEnumValue::Integer(value),
104671                )),
104672            }
104673        }
104674    }
104675
104676    #[cfg(feature = "vertex-rag-data-service")]
104677    impl std::convert::From<&str> for State {
104678        fn from(value: &str) -> Self {
104679            use std::string::ToString;
104680            match value {
104681                "STATE_UNSPECIFIED" => Self::Unspecified,
104682                "ACTIVE" => Self::Active,
104683                "ERROR" => Self::Error,
104684                _ => Self::UnknownValue(state::UnknownValue(
104685                    wkt::internal::UnknownEnumValue::String(value.to_string()),
104686                )),
104687            }
104688        }
104689    }
104690
104691    #[cfg(feature = "vertex-rag-data-service")]
104692    impl serde::ser::Serialize for State {
104693        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
104694        where
104695            S: serde::Serializer,
104696        {
104697            match self {
104698                Self::Unspecified => serializer.serialize_i32(0),
104699                Self::Active => serializer.serialize_i32(1),
104700                Self::Error => serializer.serialize_i32(2),
104701                Self::UnknownValue(u) => u.0.serialize(serializer),
104702            }
104703        }
104704    }
104705
104706    #[cfg(feature = "vertex-rag-data-service")]
104707    impl<'de> serde::de::Deserialize<'de> for State {
104708        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
104709        where
104710            D: serde::Deserializer<'de>,
104711        {
104712            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
104713                ".google.cloud.aiplatform.v1.FileStatus.State",
104714            ))
104715        }
104716    }
104717}
104718
104719/// Config for the Vertex AI Search.
104720#[cfg(feature = "vertex-rag-data-service")]
104721#[derive(Clone, Default, PartialEq)]
104722#[non_exhaustive]
104723pub struct VertexAiSearchConfig {
104724    /// Vertex AI Search Serving Config resource full name. For example,
104725    /// `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}`
104726    /// or
104727    /// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`.
104728    pub serving_config: std::string::String,
104729
104730    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
104731}
104732
104733#[cfg(feature = "vertex-rag-data-service")]
104734impl VertexAiSearchConfig {
104735    pub fn new() -> Self {
104736        std::default::Default::default()
104737    }
104738
104739    /// Sets the value of [serving_config][crate::model::VertexAiSearchConfig::serving_config].
104740    pub fn set_serving_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
104741        self.serving_config = v.into();
104742        self
104743    }
104744}
104745
104746#[cfg(feature = "vertex-rag-data-service")]
104747impl wkt::message::Message for VertexAiSearchConfig {
104748    fn typename() -> &'static str {
104749        "type.googleapis.com/google.cloud.aiplatform.v1.VertexAiSearchConfig"
104750    }
104751}
104752
104753/// RagCorpus status.
104754#[cfg(feature = "vertex-rag-data-service")]
104755#[derive(Clone, Default, PartialEq)]
104756#[non_exhaustive]
104757pub struct CorpusStatus {
104758    /// Output only. RagCorpus life state.
104759    pub state: crate::model::corpus_status::State,
104760
104761    /// Output only. Only when the `state` field is ERROR.
104762    pub error_status: std::string::String,
104763
104764    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
104765}
104766
104767#[cfg(feature = "vertex-rag-data-service")]
104768impl CorpusStatus {
104769    pub fn new() -> Self {
104770        std::default::Default::default()
104771    }
104772
104773    /// Sets the value of [state][crate::model::CorpusStatus::state].
104774    pub fn set_state<T: std::convert::Into<crate::model::corpus_status::State>>(
104775        mut self,
104776        v: T,
104777    ) -> Self {
104778        self.state = v.into();
104779        self
104780    }
104781
104782    /// Sets the value of [error_status][crate::model::CorpusStatus::error_status].
104783    pub fn set_error_status<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
104784        self.error_status = v.into();
104785        self
104786    }
104787}
104788
104789#[cfg(feature = "vertex-rag-data-service")]
104790impl wkt::message::Message for CorpusStatus {
104791    fn typename() -> &'static str {
104792        "type.googleapis.com/google.cloud.aiplatform.v1.CorpusStatus"
104793    }
104794}
104795
104796/// Defines additional types related to [CorpusStatus].
104797#[cfg(feature = "vertex-rag-data-service")]
104798pub mod corpus_status {
104799    #[allow(unused_imports)]
104800    use super::*;
104801
104802    /// RagCorpus life state.
104803    ///
104804    /// # Working with unknown values
104805    ///
104806    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
104807    /// additional enum variants at any time. Adding new variants is not considered
104808    /// a breaking change. Applications should write their code in anticipation of:
104809    ///
104810    /// - New values appearing in future releases of the client library, **and**
104811    /// - New values received dynamically, without application changes.
104812    ///
104813    /// Please consult the [Working with enums] section in the user guide for some
104814    /// guidelines.
104815    ///
104816    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
104817    #[cfg(feature = "vertex-rag-data-service")]
104818    #[derive(Clone, Debug, PartialEq)]
104819    #[non_exhaustive]
104820    pub enum State {
104821        /// This state is not supposed to happen.
104822        Unknown,
104823        /// RagCorpus resource entry is initialized, but hasn't done validation.
104824        Initialized,
104825        /// RagCorpus is provisioned successfully and is ready to serve.
104826        Active,
104827        /// RagCorpus is in a problematic situation.
104828        /// See `error_message` field for details.
104829        Error,
104830        /// If set, the enum was initialized with an unknown value.
104831        ///
104832        /// Applications can examine the value using [State::value] or
104833        /// [State::name].
104834        UnknownValue(state::UnknownValue),
104835    }
104836
104837    #[doc(hidden)]
104838    #[cfg(feature = "vertex-rag-data-service")]
104839    pub mod state {
104840        #[allow(unused_imports)]
104841        use super::*;
104842        #[derive(Clone, Debug, PartialEq)]
104843        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
104844    }
104845
104846    #[cfg(feature = "vertex-rag-data-service")]
104847    impl State {
104848        /// Gets the enum value.
104849        ///
104850        /// Returns `None` if the enum contains an unknown value deserialized from
104851        /// the string representation of enums.
104852        pub fn value(&self) -> std::option::Option<i32> {
104853            match self {
104854                Self::Unknown => std::option::Option::Some(0),
104855                Self::Initialized => std::option::Option::Some(1),
104856                Self::Active => std::option::Option::Some(2),
104857                Self::Error => std::option::Option::Some(3),
104858                Self::UnknownValue(u) => u.0.value(),
104859            }
104860        }
104861
104862        /// Gets the enum value as a string.
104863        ///
104864        /// Returns `None` if the enum contains an unknown value deserialized from
104865        /// the integer representation of enums.
104866        pub fn name(&self) -> std::option::Option<&str> {
104867            match self {
104868                Self::Unknown => std::option::Option::Some("UNKNOWN"),
104869                Self::Initialized => std::option::Option::Some("INITIALIZED"),
104870                Self::Active => std::option::Option::Some("ACTIVE"),
104871                Self::Error => std::option::Option::Some("ERROR"),
104872                Self::UnknownValue(u) => u.0.name(),
104873            }
104874        }
104875    }
104876
104877    #[cfg(feature = "vertex-rag-data-service")]
104878    impl std::default::Default for State {
104879        fn default() -> Self {
104880            use std::convert::From;
104881            Self::from(0)
104882        }
104883    }
104884
104885    #[cfg(feature = "vertex-rag-data-service")]
104886    impl std::fmt::Display for State {
104887        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
104888            wkt::internal::display_enum(f, self.name(), self.value())
104889        }
104890    }
104891
104892    #[cfg(feature = "vertex-rag-data-service")]
104893    impl std::convert::From<i32> for State {
104894        fn from(value: i32) -> Self {
104895            match value {
104896                0 => Self::Unknown,
104897                1 => Self::Initialized,
104898                2 => Self::Active,
104899                3 => Self::Error,
104900                _ => Self::UnknownValue(state::UnknownValue(
104901                    wkt::internal::UnknownEnumValue::Integer(value),
104902                )),
104903            }
104904        }
104905    }
104906
104907    #[cfg(feature = "vertex-rag-data-service")]
104908    impl std::convert::From<&str> for State {
104909        fn from(value: &str) -> Self {
104910            use std::string::ToString;
104911            match value {
104912                "UNKNOWN" => Self::Unknown,
104913                "INITIALIZED" => Self::Initialized,
104914                "ACTIVE" => Self::Active,
104915                "ERROR" => Self::Error,
104916                _ => Self::UnknownValue(state::UnknownValue(
104917                    wkt::internal::UnknownEnumValue::String(value.to_string()),
104918                )),
104919            }
104920        }
104921    }
104922
104923    #[cfg(feature = "vertex-rag-data-service")]
104924    impl serde::ser::Serialize for State {
104925        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
104926        where
104927            S: serde::Serializer,
104928        {
104929            match self {
104930                Self::Unknown => serializer.serialize_i32(0),
104931                Self::Initialized => serializer.serialize_i32(1),
104932                Self::Active => serializer.serialize_i32(2),
104933                Self::Error => serializer.serialize_i32(3),
104934                Self::UnknownValue(u) => u.0.serialize(serializer),
104935            }
104936        }
104937    }
104938
104939    #[cfg(feature = "vertex-rag-data-service")]
104940    impl<'de> serde::de::Deserialize<'de> for State {
104941        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
104942        where
104943            D: serde::Deserializer<'de>,
104944        {
104945            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
104946                ".google.cloud.aiplatform.v1.CorpusStatus.State",
104947            ))
104948        }
104949    }
104950}
104951
104952/// A RagCorpus is a RagFile container and a project can have multiple
104953/// RagCorpora.
104954#[cfg(feature = "vertex-rag-data-service")]
104955#[derive(Clone, Default, PartialEq)]
104956#[non_exhaustive]
104957pub struct RagCorpus {
104958    /// Output only. The resource name of the RagCorpus.
104959    pub name: std::string::String,
104960
104961    /// Required. The display name of the RagCorpus.
104962    /// The name can be up to 128 characters long and can consist of any UTF-8
104963    /// characters.
104964    pub display_name: std::string::String,
104965
104966    /// Optional. The description of the RagCorpus.
104967    pub description: std::string::String,
104968
104969    /// Output only. Timestamp when this RagCorpus was created.
104970    pub create_time: std::option::Option<wkt::Timestamp>,
104971
104972    /// Output only. Timestamp when this RagCorpus was last updated.
104973    pub update_time: std::option::Option<wkt::Timestamp>,
104974
104975    /// Output only. RagCorpus state.
104976    pub corpus_status: std::option::Option<crate::model::CorpusStatus>,
104977
104978    /// Optional. Immutable. The CMEK key name used to encrypt at-rest data related
104979    /// to this Corpus. Only applicable to RagManagedDb option for Vector DB. This
104980    /// field can only be set at corpus creation time, and cannot be updated or
104981    /// deleted.
104982    pub encryption_spec: std::option::Option<crate::model::EncryptionSpec>,
104983
104984    /// The backend config of the RagCorpus.
104985    /// It can be data store and/or retrieval engine.
104986    pub backend_config: std::option::Option<crate::model::rag_corpus::BackendConfig>,
104987
104988    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
104989}
104990
104991#[cfg(feature = "vertex-rag-data-service")]
104992impl RagCorpus {
104993    pub fn new() -> Self {
104994        std::default::Default::default()
104995    }
104996
104997    /// Sets the value of [name][crate::model::RagCorpus::name].
104998    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
104999        self.name = v.into();
105000        self
105001    }
105002
105003    /// Sets the value of [display_name][crate::model::RagCorpus::display_name].
105004    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
105005        self.display_name = v.into();
105006        self
105007    }
105008
105009    /// Sets the value of [description][crate::model::RagCorpus::description].
105010    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
105011        self.description = v.into();
105012        self
105013    }
105014
105015    /// Sets the value of [create_time][crate::model::RagCorpus::create_time].
105016    pub fn set_create_time<T>(mut self, v: T) -> Self
105017    where
105018        T: std::convert::Into<wkt::Timestamp>,
105019    {
105020        self.create_time = std::option::Option::Some(v.into());
105021        self
105022    }
105023
105024    /// Sets or clears the value of [create_time][crate::model::RagCorpus::create_time].
105025    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
105026    where
105027        T: std::convert::Into<wkt::Timestamp>,
105028    {
105029        self.create_time = v.map(|x| x.into());
105030        self
105031    }
105032
105033    /// Sets the value of [update_time][crate::model::RagCorpus::update_time].
105034    pub fn set_update_time<T>(mut self, v: T) -> Self
105035    where
105036        T: std::convert::Into<wkt::Timestamp>,
105037    {
105038        self.update_time = std::option::Option::Some(v.into());
105039        self
105040    }
105041
105042    /// Sets or clears the value of [update_time][crate::model::RagCorpus::update_time].
105043    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
105044    where
105045        T: std::convert::Into<wkt::Timestamp>,
105046    {
105047        self.update_time = v.map(|x| x.into());
105048        self
105049    }
105050
105051    /// Sets the value of [corpus_status][crate::model::RagCorpus::corpus_status].
105052    pub fn set_corpus_status<T>(mut self, v: T) -> Self
105053    where
105054        T: std::convert::Into<crate::model::CorpusStatus>,
105055    {
105056        self.corpus_status = std::option::Option::Some(v.into());
105057        self
105058    }
105059
105060    /// Sets or clears the value of [corpus_status][crate::model::RagCorpus::corpus_status].
105061    pub fn set_or_clear_corpus_status<T>(mut self, v: std::option::Option<T>) -> Self
105062    where
105063        T: std::convert::Into<crate::model::CorpusStatus>,
105064    {
105065        self.corpus_status = v.map(|x| x.into());
105066        self
105067    }
105068
105069    /// Sets the value of [encryption_spec][crate::model::RagCorpus::encryption_spec].
105070    pub fn set_encryption_spec<T>(mut self, v: T) -> Self
105071    where
105072        T: std::convert::Into<crate::model::EncryptionSpec>,
105073    {
105074        self.encryption_spec = std::option::Option::Some(v.into());
105075        self
105076    }
105077
105078    /// Sets or clears the value of [encryption_spec][crate::model::RagCorpus::encryption_spec].
105079    pub fn set_or_clear_encryption_spec<T>(mut self, v: std::option::Option<T>) -> Self
105080    where
105081        T: std::convert::Into<crate::model::EncryptionSpec>,
105082    {
105083        self.encryption_spec = v.map(|x| x.into());
105084        self
105085    }
105086
105087    /// Sets the value of [backend_config][crate::model::RagCorpus::backend_config].
105088    ///
105089    /// Note that all the setters affecting `backend_config` are mutually
105090    /// exclusive.
105091    pub fn set_backend_config<
105092        T: std::convert::Into<std::option::Option<crate::model::rag_corpus::BackendConfig>>,
105093    >(
105094        mut self,
105095        v: T,
105096    ) -> Self {
105097        self.backend_config = v.into();
105098        self
105099    }
105100
105101    /// The value of [backend_config][crate::model::RagCorpus::backend_config]
105102    /// if it holds a `VectorDbConfig`, `None` if the field is not set or
105103    /// holds a different branch.
105104    pub fn vector_db_config(
105105        &self,
105106    ) -> std::option::Option<&std::boxed::Box<crate::model::RagVectorDbConfig>> {
105107        #[allow(unreachable_patterns)]
105108        self.backend_config.as_ref().and_then(|v| match v {
105109            crate::model::rag_corpus::BackendConfig::VectorDbConfig(v) => {
105110                std::option::Option::Some(v)
105111            }
105112            _ => std::option::Option::None,
105113        })
105114    }
105115
105116    /// Sets the value of [backend_config][crate::model::RagCorpus::backend_config]
105117    /// to hold a `VectorDbConfig`.
105118    ///
105119    /// Note that all the setters affecting `backend_config` are
105120    /// mutually exclusive.
105121    pub fn set_vector_db_config<
105122        T: std::convert::Into<std::boxed::Box<crate::model::RagVectorDbConfig>>,
105123    >(
105124        mut self,
105125        v: T,
105126    ) -> Self {
105127        self.backend_config = std::option::Option::Some(
105128            crate::model::rag_corpus::BackendConfig::VectorDbConfig(v.into()),
105129        );
105130        self
105131    }
105132
105133    /// The value of [backend_config][crate::model::RagCorpus::backend_config]
105134    /// if it holds a `VertexAiSearchConfig`, `None` if the field is not set or
105135    /// holds a different branch.
105136    pub fn vertex_ai_search_config(
105137        &self,
105138    ) -> std::option::Option<&std::boxed::Box<crate::model::VertexAiSearchConfig>> {
105139        #[allow(unreachable_patterns)]
105140        self.backend_config.as_ref().and_then(|v| match v {
105141            crate::model::rag_corpus::BackendConfig::VertexAiSearchConfig(v) => {
105142                std::option::Option::Some(v)
105143            }
105144            _ => std::option::Option::None,
105145        })
105146    }
105147
105148    /// Sets the value of [backend_config][crate::model::RagCorpus::backend_config]
105149    /// to hold a `VertexAiSearchConfig`.
105150    ///
105151    /// Note that all the setters affecting `backend_config` are
105152    /// mutually exclusive.
105153    pub fn set_vertex_ai_search_config<
105154        T: std::convert::Into<std::boxed::Box<crate::model::VertexAiSearchConfig>>,
105155    >(
105156        mut self,
105157        v: T,
105158    ) -> Self {
105159        self.backend_config = std::option::Option::Some(
105160            crate::model::rag_corpus::BackendConfig::VertexAiSearchConfig(v.into()),
105161        );
105162        self
105163    }
105164}
105165
105166#[cfg(feature = "vertex-rag-data-service")]
105167impl wkt::message::Message for RagCorpus {
105168    fn typename() -> &'static str {
105169        "type.googleapis.com/google.cloud.aiplatform.v1.RagCorpus"
105170    }
105171}
105172
105173/// Defines additional types related to [RagCorpus].
105174#[cfg(feature = "vertex-rag-data-service")]
105175pub mod rag_corpus {
105176    #[allow(unused_imports)]
105177    use super::*;
105178
105179    /// The backend config of the RagCorpus.
105180    /// It can be data store and/or retrieval engine.
105181    #[cfg(feature = "vertex-rag-data-service")]
105182    #[derive(Clone, Debug, PartialEq)]
105183    #[non_exhaustive]
105184    pub enum BackendConfig {
105185        /// Optional. Immutable. The config for the Vector DBs.
105186        VectorDbConfig(std::boxed::Box<crate::model::RagVectorDbConfig>),
105187        /// Optional. Immutable. The config for the Vertex AI Search.
105188        VertexAiSearchConfig(std::boxed::Box<crate::model::VertexAiSearchConfig>),
105189    }
105190}
105191
105192/// A RagFile contains user data for chunking, embedding and indexing.
105193#[cfg(feature = "vertex-rag-data-service")]
105194#[derive(Clone, Default, PartialEq)]
105195#[non_exhaustive]
105196pub struct RagFile {
105197    /// Output only. The resource name of the RagFile.
105198    pub name: std::string::String,
105199
105200    /// Required. The display name of the RagFile.
105201    /// The name can be up to 128 characters long and can consist of any UTF-8
105202    /// characters.
105203    pub display_name: std::string::String,
105204
105205    /// Optional. The description of the RagFile.
105206    pub description: std::string::String,
105207
105208    /// Output only. Timestamp when this RagFile was created.
105209    pub create_time: std::option::Option<wkt::Timestamp>,
105210
105211    /// Output only. Timestamp when this RagFile was last updated.
105212    pub update_time: std::option::Option<wkt::Timestamp>,
105213
105214    /// Output only. State of the RagFile.
105215    pub file_status: std::option::Option<crate::model::FileStatus>,
105216
105217    /// The origin location of the RagFile if it is imported from Google Cloud
105218    /// Storage or Google Drive.
105219    pub rag_file_source: std::option::Option<crate::model::rag_file::RagFileSource>,
105220
105221    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
105222}
105223
105224#[cfg(feature = "vertex-rag-data-service")]
105225impl RagFile {
105226    pub fn new() -> Self {
105227        std::default::Default::default()
105228    }
105229
105230    /// Sets the value of [name][crate::model::RagFile::name].
105231    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
105232        self.name = v.into();
105233        self
105234    }
105235
105236    /// Sets the value of [display_name][crate::model::RagFile::display_name].
105237    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
105238        self.display_name = v.into();
105239        self
105240    }
105241
105242    /// Sets the value of [description][crate::model::RagFile::description].
105243    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
105244        self.description = v.into();
105245        self
105246    }
105247
105248    /// Sets the value of [create_time][crate::model::RagFile::create_time].
105249    pub fn set_create_time<T>(mut self, v: T) -> Self
105250    where
105251        T: std::convert::Into<wkt::Timestamp>,
105252    {
105253        self.create_time = std::option::Option::Some(v.into());
105254        self
105255    }
105256
105257    /// Sets or clears the value of [create_time][crate::model::RagFile::create_time].
105258    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
105259    where
105260        T: std::convert::Into<wkt::Timestamp>,
105261    {
105262        self.create_time = v.map(|x| x.into());
105263        self
105264    }
105265
105266    /// Sets the value of [update_time][crate::model::RagFile::update_time].
105267    pub fn set_update_time<T>(mut self, v: T) -> Self
105268    where
105269        T: std::convert::Into<wkt::Timestamp>,
105270    {
105271        self.update_time = std::option::Option::Some(v.into());
105272        self
105273    }
105274
105275    /// Sets or clears the value of [update_time][crate::model::RagFile::update_time].
105276    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
105277    where
105278        T: std::convert::Into<wkt::Timestamp>,
105279    {
105280        self.update_time = v.map(|x| x.into());
105281        self
105282    }
105283
105284    /// Sets the value of [file_status][crate::model::RagFile::file_status].
105285    pub fn set_file_status<T>(mut self, v: T) -> Self
105286    where
105287        T: std::convert::Into<crate::model::FileStatus>,
105288    {
105289        self.file_status = std::option::Option::Some(v.into());
105290        self
105291    }
105292
105293    /// Sets or clears the value of [file_status][crate::model::RagFile::file_status].
105294    pub fn set_or_clear_file_status<T>(mut self, v: std::option::Option<T>) -> Self
105295    where
105296        T: std::convert::Into<crate::model::FileStatus>,
105297    {
105298        self.file_status = v.map(|x| x.into());
105299        self
105300    }
105301
105302    /// Sets the value of [rag_file_source][crate::model::RagFile::rag_file_source].
105303    ///
105304    /// Note that all the setters affecting `rag_file_source` are mutually
105305    /// exclusive.
105306    pub fn set_rag_file_source<
105307        T: std::convert::Into<std::option::Option<crate::model::rag_file::RagFileSource>>,
105308    >(
105309        mut self,
105310        v: T,
105311    ) -> Self {
105312        self.rag_file_source = v.into();
105313        self
105314    }
105315
105316    /// The value of [rag_file_source][crate::model::RagFile::rag_file_source]
105317    /// if it holds a `GcsSource`, `None` if the field is not set or
105318    /// holds a different branch.
105319    pub fn gcs_source(&self) -> std::option::Option<&std::boxed::Box<crate::model::GcsSource>> {
105320        #[allow(unreachable_patterns)]
105321        self.rag_file_source.as_ref().and_then(|v| match v {
105322            crate::model::rag_file::RagFileSource::GcsSource(v) => std::option::Option::Some(v),
105323            _ => std::option::Option::None,
105324        })
105325    }
105326
105327    /// Sets the value of [rag_file_source][crate::model::RagFile::rag_file_source]
105328    /// to hold a `GcsSource`.
105329    ///
105330    /// Note that all the setters affecting `rag_file_source` are
105331    /// mutually exclusive.
105332    pub fn set_gcs_source<T: std::convert::Into<std::boxed::Box<crate::model::GcsSource>>>(
105333        mut self,
105334        v: T,
105335    ) -> Self {
105336        self.rag_file_source =
105337            std::option::Option::Some(crate::model::rag_file::RagFileSource::GcsSource(v.into()));
105338        self
105339    }
105340
105341    /// The value of [rag_file_source][crate::model::RagFile::rag_file_source]
105342    /// if it holds a `GoogleDriveSource`, `None` if the field is not set or
105343    /// holds a different branch.
105344    pub fn google_drive_source(
105345        &self,
105346    ) -> std::option::Option<&std::boxed::Box<crate::model::GoogleDriveSource>> {
105347        #[allow(unreachable_patterns)]
105348        self.rag_file_source.as_ref().and_then(|v| match v {
105349            crate::model::rag_file::RagFileSource::GoogleDriveSource(v) => {
105350                std::option::Option::Some(v)
105351            }
105352            _ => std::option::Option::None,
105353        })
105354    }
105355
105356    /// Sets the value of [rag_file_source][crate::model::RagFile::rag_file_source]
105357    /// to hold a `GoogleDriveSource`.
105358    ///
105359    /// Note that all the setters affecting `rag_file_source` are
105360    /// mutually exclusive.
105361    pub fn set_google_drive_source<
105362        T: std::convert::Into<std::boxed::Box<crate::model::GoogleDriveSource>>,
105363    >(
105364        mut self,
105365        v: T,
105366    ) -> Self {
105367        self.rag_file_source = std::option::Option::Some(
105368            crate::model::rag_file::RagFileSource::GoogleDriveSource(v.into()),
105369        );
105370        self
105371    }
105372
105373    /// The value of [rag_file_source][crate::model::RagFile::rag_file_source]
105374    /// if it holds a `DirectUploadSource`, `None` if the field is not set or
105375    /// holds a different branch.
105376    pub fn direct_upload_source(
105377        &self,
105378    ) -> std::option::Option<&std::boxed::Box<crate::model::DirectUploadSource>> {
105379        #[allow(unreachable_patterns)]
105380        self.rag_file_source.as_ref().and_then(|v| match v {
105381            crate::model::rag_file::RagFileSource::DirectUploadSource(v) => {
105382                std::option::Option::Some(v)
105383            }
105384            _ => std::option::Option::None,
105385        })
105386    }
105387
105388    /// Sets the value of [rag_file_source][crate::model::RagFile::rag_file_source]
105389    /// to hold a `DirectUploadSource`.
105390    ///
105391    /// Note that all the setters affecting `rag_file_source` are
105392    /// mutually exclusive.
105393    pub fn set_direct_upload_source<
105394        T: std::convert::Into<std::boxed::Box<crate::model::DirectUploadSource>>,
105395    >(
105396        mut self,
105397        v: T,
105398    ) -> Self {
105399        self.rag_file_source = std::option::Option::Some(
105400            crate::model::rag_file::RagFileSource::DirectUploadSource(v.into()),
105401        );
105402        self
105403    }
105404
105405    /// The value of [rag_file_source][crate::model::RagFile::rag_file_source]
105406    /// if it holds a `SlackSource`, `None` if the field is not set or
105407    /// holds a different branch.
105408    pub fn slack_source(&self) -> std::option::Option<&std::boxed::Box<crate::model::SlackSource>> {
105409        #[allow(unreachable_patterns)]
105410        self.rag_file_source.as_ref().and_then(|v| match v {
105411            crate::model::rag_file::RagFileSource::SlackSource(v) => std::option::Option::Some(v),
105412            _ => std::option::Option::None,
105413        })
105414    }
105415
105416    /// Sets the value of [rag_file_source][crate::model::RagFile::rag_file_source]
105417    /// to hold a `SlackSource`.
105418    ///
105419    /// Note that all the setters affecting `rag_file_source` are
105420    /// mutually exclusive.
105421    pub fn set_slack_source<T: std::convert::Into<std::boxed::Box<crate::model::SlackSource>>>(
105422        mut self,
105423        v: T,
105424    ) -> Self {
105425        self.rag_file_source =
105426            std::option::Option::Some(crate::model::rag_file::RagFileSource::SlackSource(v.into()));
105427        self
105428    }
105429
105430    /// The value of [rag_file_source][crate::model::RagFile::rag_file_source]
105431    /// if it holds a `JiraSource`, `None` if the field is not set or
105432    /// holds a different branch.
105433    pub fn jira_source(&self) -> std::option::Option<&std::boxed::Box<crate::model::JiraSource>> {
105434        #[allow(unreachable_patterns)]
105435        self.rag_file_source.as_ref().and_then(|v| match v {
105436            crate::model::rag_file::RagFileSource::JiraSource(v) => std::option::Option::Some(v),
105437            _ => std::option::Option::None,
105438        })
105439    }
105440
105441    /// Sets the value of [rag_file_source][crate::model::RagFile::rag_file_source]
105442    /// to hold a `JiraSource`.
105443    ///
105444    /// Note that all the setters affecting `rag_file_source` are
105445    /// mutually exclusive.
105446    pub fn set_jira_source<T: std::convert::Into<std::boxed::Box<crate::model::JiraSource>>>(
105447        mut self,
105448        v: T,
105449    ) -> Self {
105450        self.rag_file_source =
105451            std::option::Option::Some(crate::model::rag_file::RagFileSource::JiraSource(v.into()));
105452        self
105453    }
105454
105455    /// The value of [rag_file_source][crate::model::RagFile::rag_file_source]
105456    /// if it holds a `SharePointSources`, `None` if the field is not set or
105457    /// holds a different branch.
105458    pub fn share_point_sources(
105459        &self,
105460    ) -> std::option::Option<&std::boxed::Box<crate::model::SharePointSources>> {
105461        #[allow(unreachable_patterns)]
105462        self.rag_file_source.as_ref().and_then(|v| match v {
105463            crate::model::rag_file::RagFileSource::SharePointSources(v) => {
105464                std::option::Option::Some(v)
105465            }
105466            _ => std::option::Option::None,
105467        })
105468    }
105469
105470    /// Sets the value of [rag_file_source][crate::model::RagFile::rag_file_source]
105471    /// to hold a `SharePointSources`.
105472    ///
105473    /// Note that all the setters affecting `rag_file_source` are
105474    /// mutually exclusive.
105475    pub fn set_share_point_sources<
105476        T: std::convert::Into<std::boxed::Box<crate::model::SharePointSources>>,
105477    >(
105478        mut self,
105479        v: T,
105480    ) -> Self {
105481        self.rag_file_source = std::option::Option::Some(
105482            crate::model::rag_file::RagFileSource::SharePointSources(v.into()),
105483        );
105484        self
105485    }
105486}
105487
105488#[cfg(feature = "vertex-rag-data-service")]
105489impl wkt::message::Message for RagFile {
105490    fn typename() -> &'static str {
105491        "type.googleapis.com/google.cloud.aiplatform.v1.RagFile"
105492    }
105493}
105494
105495/// Defines additional types related to [RagFile].
105496#[cfg(feature = "vertex-rag-data-service")]
105497pub mod rag_file {
105498    #[allow(unused_imports)]
105499    use super::*;
105500
105501    /// The origin location of the RagFile if it is imported from Google Cloud
105502    /// Storage or Google Drive.
105503    #[cfg(feature = "vertex-rag-data-service")]
105504    #[derive(Clone, Debug, PartialEq)]
105505    #[non_exhaustive]
105506    pub enum RagFileSource {
105507        /// Output only. Google Cloud Storage location of the RagFile.
105508        /// It does not support wildcards in the Cloud Storage uri for now.
105509        GcsSource(std::boxed::Box<crate::model::GcsSource>),
105510        /// Output only. Google Drive location. Supports importing individual files
105511        /// as well as Google Drive folders.
105512        GoogleDriveSource(std::boxed::Box<crate::model::GoogleDriveSource>),
105513        /// Output only. The RagFile is encapsulated and uploaded in the
105514        /// UploadRagFile request.
105515        DirectUploadSource(std::boxed::Box<crate::model::DirectUploadSource>),
105516        /// The RagFile is imported from a Slack channel.
105517        SlackSource(std::boxed::Box<crate::model::SlackSource>),
105518        /// The RagFile is imported from a Jira query.
105519        JiraSource(std::boxed::Box<crate::model::JiraSource>),
105520        /// The RagFile is imported from a SharePoint source.
105521        SharePointSources(std::boxed::Box<crate::model::SharePointSources>),
105522    }
105523}
105524
105525/// A RagChunk includes the content of a chunk of a RagFile, and associated
105526/// metadata.
105527#[cfg(any(feature = "prediction-service", feature = "vertex-rag-service",))]
105528#[derive(Clone, Default, PartialEq)]
105529#[non_exhaustive]
105530pub struct RagChunk {
105531    /// The content of the chunk.
105532    pub text: std::string::String,
105533
105534    /// If populated, represents where the chunk starts and ends in the document.
105535    pub page_span: std::option::Option<crate::model::rag_chunk::PageSpan>,
105536
105537    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
105538}
105539
105540#[cfg(any(feature = "prediction-service", feature = "vertex-rag-service",))]
105541impl RagChunk {
105542    pub fn new() -> Self {
105543        std::default::Default::default()
105544    }
105545
105546    /// Sets the value of [text][crate::model::RagChunk::text].
105547    pub fn set_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
105548        self.text = v.into();
105549        self
105550    }
105551
105552    /// Sets the value of [page_span][crate::model::RagChunk::page_span].
105553    pub fn set_page_span<T>(mut self, v: T) -> Self
105554    where
105555        T: std::convert::Into<crate::model::rag_chunk::PageSpan>,
105556    {
105557        self.page_span = std::option::Option::Some(v.into());
105558        self
105559    }
105560
105561    /// Sets or clears the value of [page_span][crate::model::RagChunk::page_span].
105562    pub fn set_or_clear_page_span<T>(mut self, v: std::option::Option<T>) -> Self
105563    where
105564        T: std::convert::Into<crate::model::rag_chunk::PageSpan>,
105565    {
105566        self.page_span = v.map(|x| x.into());
105567        self
105568    }
105569}
105570
105571#[cfg(any(feature = "prediction-service", feature = "vertex-rag-service",))]
105572impl wkt::message::Message for RagChunk {
105573    fn typename() -> &'static str {
105574        "type.googleapis.com/google.cloud.aiplatform.v1.RagChunk"
105575    }
105576}
105577
105578/// Defines additional types related to [RagChunk].
105579#[cfg(any(feature = "prediction-service", feature = "vertex-rag-service",))]
105580pub mod rag_chunk {
105581    #[allow(unused_imports)]
105582    use super::*;
105583
105584    /// Represents where the chunk starts and ends in the document.
105585    #[cfg(any(feature = "prediction-service", feature = "vertex-rag-service",))]
105586    #[derive(Clone, Default, PartialEq)]
105587    #[non_exhaustive]
105588    pub struct PageSpan {
105589        /// Page where chunk starts in the document. Inclusive. 1-indexed.
105590        pub first_page: i32,
105591
105592        /// Page where chunk ends in the document. Inclusive. 1-indexed.
105593        pub last_page: i32,
105594
105595        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
105596    }
105597
105598    #[cfg(any(feature = "prediction-service", feature = "vertex-rag-service",))]
105599    impl PageSpan {
105600        pub fn new() -> Self {
105601            std::default::Default::default()
105602        }
105603
105604        /// Sets the value of [first_page][crate::model::rag_chunk::PageSpan::first_page].
105605        pub fn set_first_page<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
105606            self.first_page = v.into();
105607            self
105608        }
105609
105610        /// Sets the value of [last_page][crate::model::rag_chunk::PageSpan::last_page].
105611        pub fn set_last_page<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
105612            self.last_page = v.into();
105613            self
105614        }
105615    }
105616
105617    #[cfg(any(feature = "prediction-service", feature = "vertex-rag-service",))]
105618    impl wkt::message::Message for PageSpan {
105619        fn typename() -> &'static str {
105620            "type.googleapis.com/google.cloud.aiplatform.v1.RagChunk.PageSpan"
105621        }
105622    }
105623}
105624
105625/// Specifies the size and overlap of chunks for RagFiles.
105626#[cfg(feature = "vertex-rag-data-service")]
105627#[derive(Clone, Default, PartialEq)]
105628#[non_exhaustive]
105629pub struct RagFileChunkingConfig {
105630    /// Specifies the chunking config for RagFiles.
105631    pub chunking_config:
105632        std::option::Option<crate::model::rag_file_chunking_config::ChunkingConfig>,
105633
105634    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
105635}
105636
105637#[cfg(feature = "vertex-rag-data-service")]
105638impl RagFileChunkingConfig {
105639    pub fn new() -> Self {
105640        std::default::Default::default()
105641    }
105642
105643    /// Sets the value of [chunking_config][crate::model::RagFileChunkingConfig::chunking_config].
105644    ///
105645    /// Note that all the setters affecting `chunking_config` are mutually
105646    /// exclusive.
105647    pub fn set_chunking_config<
105648        T: std::convert::Into<
105649                std::option::Option<crate::model::rag_file_chunking_config::ChunkingConfig>,
105650            >,
105651    >(
105652        mut self,
105653        v: T,
105654    ) -> Self {
105655        self.chunking_config = v.into();
105656        self
105657    }
105658
105659    /// The value of [chunking_config][crate::model::RagFileChunkingConfig::chunking_config]
105660    /// if it holds a `FixedLengthChunking`, `None` if the field is not set or
105661    /// holds a different branch.
105662    pub fn fixed_length_chunking(
105663        &self,
105664    ) -> std::option::Option<
105665        &std::boxed::Box<crate::model::rag_file_chunking_config::FixedLengthChunking>,
105666    > {
105667        #[allow(unreachable_patterns)]
105668        self.chunking_config.as_ref().and_then(|v| match v {
105669            crate::model::rag_file_chunking_config::ChunkingConfig::FixedLengthChunking(v) => {
105670                std::option::Option::Some(v)
105671            }
105672            _ => std::option::Option::None,
105673        })
105674    }
105675
105676    /// Sets the value of [chunking_config][crate::model::RagFileChunkingConfig::chunking_config]
105677    /// to hold a `FixedLengthChunking`.
105678    ///
105679    /// Note that all the setters affecting `chunking_config` are
105680    /// mutually exclusive.
105681    pub fn set_fixed_length_chunking<
105682        T: std::convert::Into<
105683                std::boxed::Box<crate::model::rag_file_chunking_config::FixedLengthChunking>,
105684            >,
105685    >(
105686        mut self,
105687        v: T,
105688    ) -> Self {
105689        self.chunking_config = std::option::Option::Some(
105690            crate::model::rag_file_chunking_config::ChunkingConfig::FixedLengthChunking(v.into()),
105691        );
105692        self
105693    }
105694}
105695
105696#[cfg(feature = "vertex-rag-data-service")]
105697impl wkt::message::Message for RagFileChunkingConfig {
105698    fn typename() -> &'static str {
105699        "type.googleapis.com/google.cloud.aiplatform.v1.RagFileChunkingConfig"
105700    }
105701}
105702
105703/// Defines additional types related to [RagFileChunkingConfig].
105704#[cfg(feature = "vertex-rag-data-service")]
105705pub mod rag_file_chunking_config {
105706    #[allow(unused_imports)]
105707    use super::*;
105708
105709    /// Specifies the fixed length chunking config.
105710    #[cfg(feature = "vertex-rag-data-service")]
105711    #[derive(Clone, Default, PartialEq)]
105712    #[non_exhaustive]
105713    pub struct FixedLengthChunking {
105714        /// The size of the chunks.
105715        pub chunk_size: i32,
105716
105717        /// The overlap between chunks.
105718        pub chunk_overlap: i32,
105719
105720        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
105721    }
105722
105723    #[cfg(feature = "vertex-rag-data-service")]
105724    impl FixedLengthChunking {
105725        pub fn new() -> Self {
105726            std::default::Default::default()
105727        }
105728
105729        /// Sets the value of [chunk_size][crate::model::rag_file_chunking_config::FixedLengthChunking::chunk_size].
105730        pub fn set_chunk_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
105731            self.chunk_size = v.into();
105732            self
105733        }
105734
105735        /// Sets the value of [chunk_overlap][crate::model::rag_file_chunking_config::FixedLengthChunking::chunk_overlap].
105736        pub fn set_chunk_overlap<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
105737            self.chunk_overlap = v.into();
105738            self
105739        }
105740    }
105741
105742    #[cfg(feature = "vertex-rag-data-service")]
105743    impl wkt::message::Message for FixedLengthChunking {
105744        fn typename() -> &'static str {
105745            "type.googleapis.com/google.cloud.aiplatform.v1.RagFileChunkingConfig.FixedLengthChunking"
105746        }
105747    }
105748
105749    /// Specifies the chunking config for RagFiles.
105750    #[cfg(feature = "vertex-rag-data-service")]
105751    #[derive(Clone, Debug, PartialEq)]
105752    #[non_exhaustive]
105753    pub enum ChunkingConfig {
105754        /// Specifies the fixed length chunking config.
105755        FixedLengthChunking(
105756            std::boxed::Box<crate::model::rag_file_chunking_config::FixedLengthChunking>,
105757        ),
105758    }
105759}
105760
105761/// Specifies the transformation config for RagFiles.
105762#[cfg(feature = "vertex-rag-data-service")]
105763#[derive(Clone, Default, PartialEq)]
105764#[non_exhaustive]
105765pub struct RagFileTransformationConfig {
105766    /// Specifies the chunking config for RagFiles.
105767    pub rag_file_chunking_config: std::option::Option<crate::model::RagFileChunkingConfig>,
105768
105769    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
105770}
105771
105772#[cfg(feature = "vertex-rag-data-service")]
105773impl RagFileTransformationConfig {
105774    pub fn new() -> Self {
105775        std::default::Default::default()
105776    }
105777
105778    /// Sets the value of [rag_file_chunking_config][crate::model::RagFileTransformationConfig::rag_file_chunking_config].
105779    pub fn set_rag_file_chunking_config<T>(mut self, v: T) -> Self
105780    where
105781        T: std::convert::Into<crate::model::RagFileChunkingConfig>,
105782    {
105783        self.rag_file_chunking_config = std::option::Option::Some(v.into());
105784        self
105785    }
105786
105787    /// Sets or clears the value of [rag_file_chunking_config][crate::model::RagFileTransformationConfig::rag_file_chunking_config].
105788    pub fn set_or_clear_rag_file_chunking_config<T>(mut self, v: std::option::Option<T>) -> Self
105789    where
105790        T: std::convert::Into<crate::model::RagFileChunkingConfig>,
105791    {
105792        self.rag_file_chunking_config = v.map(|x| x.into());
105793        self
105794    }
105795}
105796
105797#[cfg(feature = "vertex-rag-data-service")]
105798impl wkt::message::Message for RagFileTransformationConfig {
105799    fn typename() -> &'static str {
105800        "type.googleapis.com/google.cloud.aiplatform.v1.RagFileTransformationConfig"
105801    }
105802}
105803
105804/// Specifies the parsing config for RagFiles.
105805#[cfg(feature = "vertex-rag-data-service")]
105806#[derive(Clone, Default, PartialEq)]
105807#[non_exhaustive]
105808pub struct RagFileParsingConfig {
105809    /// The parser to use for RagFiles.
105810    pub parser: std::option::Option<crate::model::rag_file_parsing_config::Parser>,
105811
105812    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
105813}
105814
105815#[cfg(feature = "vertex-rag-data-service")]
105816impl RagFileParsingConfig {
105817    pub fn new() -> Self {
105818        std::default::Default::default()
105819    }
105820
105821    /// Sets the value of [parser][crate::model::RagFileParsingConfig::parser].
105822    ///
105823    /// Note that all the setters affecting `parser` are mutually
105824    /// exclusive.
105825    pub fn set_parser<
105826        T: std::convert::Into<std::option::Option<crate::model::rag_file_parsing_config::Parser>>,
105827    >(
105828        mut self,
105829        v: T,
105830    ) -> Self {
105831        self.parser = v.into();
105832        self
105833    }
105834
105835    /// The value of [parser][crate::model::RagFileParsingConfig::parser]
105836    /// if it holds a `LayoutParser`, `None` if the field is not set or
105837    /// holds a different branch.
105838    pub fn layout_parser(
105839        &self,
105840    ) -> std::option::Option<&std::boxed::Box<crate::model::rag_file_parsing_config::LayoutParser>>
105841    {
105842        #[allow(unreachable_patterns)]
105843        self.parser.as_ref().and_then(|v| match v {
105844            crate::model::rag_file_parsing_config::Parser::LayoutParser(v) => {
105845                std::option::Option::Some(v)
105846            }
105847            _ => std::option::Option::None,
105848        })
105849    }
105850
105851    /// Sets the value of [parser][crate::model::RagFileParsingConfig::parser]
105852    /// to hold a `LayoutParser`.
105853    ///
105854    /// Note that all the setters affecting `parser` are
105855    /// mutually exclusive.
105856    pub fn set_layout_parser<
105857        T: std::convert::Into<std::boxed::Box<crate::model::rag_file_parsing_config::LayoutParser>>,
105858    >(
105859        mut self,
105860        v: T,
105861    ) -> Self {
105862        self.parser = std::option::Option::Some(
105863            crate::model::rag_file_parsing_config::Parser::LayoutParser(v.into()),
105864        );
105865        self
105866    }
105867
105868    /// The value of [parser][crate::model::RagFileParsingConfig::parser]
105869    /// if it holds a `LlmParser`, `None` if the field is not set or
105870    /// holds a different branch.
105871    pub fn llm_parser(
105872        &self,
105873    ) -> std::option::Option<&std::boxed::Box<crate::model::rag_file_parsing_config::LlmParser>>
105874    {
105875        #[allow(unreachable_patterns)]
105876        self.parser.as_ref().and_then(|v| match v {
105877            crate::model::rag_file_parsing_config::Parser::LlmParser(v) => {
105878                std::option::Option::Some(v)
105879            }
105880            _ => std::option::Option::None,
105881        })
105882    }
105883
105884    /// Sets the value of [parser][crate::model::RagFileParsingConfig::parser]
105885    /// to hold a `LlmParser`.
105886    ///
105887    /// Note that all the setters affecting `parser` are
105888    /// mutually exclusive.
105889    pub fn set_llm_parser<
105890        T: std::convert::Into<std::boxed::Box<crate::model::rag_file_parsing_config::LlmParser>>,
105891    >(
105892        mut self,
105893        v: T,
105894    ) -> Self {
105895        self.parser = std::option::Option::Some(
105896            crate::model::rag_file_parsing_config::Parser::LlmParser(v.into()),
105897        );
105898        self
105899    }
105900}
105901
105902#[cfg(feature = "vertex-rag-data-service")]
105903impl wkt::message::Message for RagFileParsingConfig {
105904    fn typename() -> &'static str {
105905        "type.googleapis.com/google.cloud.aiplatform.v1.RagFileParsingConfig"
105906    }
105907}
105908
105909/// Defines additional types related to [RagFileParsingConfig].
105910#[cfg(feature = "vertex-rag-data-service")]
105911pub mod rag_file_parsing_config {
105912    #[allow(unused_imports)]
105913    use super::*;
105914
105915    /// Document AI Layout Parser config.
105916    #[cfg(feature = "vertex-rag-data-service")]
105917    #[derive(Clone, Default, PartialEq)]
105918    #[non_exhaustive]
105919    pub struct LayoutParser {
105920        /// The full resource name of a Document AI processor or processor version.
105921        /// The processor must have type `LAYOUT_PARSER_PROCESSOR`. If specified, the
105922        /// `additional_config.parse_as_scanned_pdf` field must be false.
105923        /// Format:
105924        ///
105925        /// * `projects/{project_id}/locations/{location}/processors/{processor_id}`
105926        /// * `projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}`
105927        pub processor_name: std::string::String,
105928
105929        /// The maximum number of requests the job is allowed to make to the Document
105930        /// AI processor per minute. Consult
105931        /// <https://cloud.google.com/document-ai/quotas> and the Quota page for your
105932        /// project to set an appropriate value here. If unspecified, a default value
105933        /// of 120 QPM would be used.
105934        pub max_parsing_requests_per_min: i32,
105935
105936        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
105937    }
105938
105939    #[cfg(feature = "vertex-rag-data-service")]
105940    impl LayoutParser {
105941        pub fn new() -> Self {
105942            std::default::Default::default()
105943        }
105944
105945        /// Sets the value of [processor_name][crate::model::rag_file_parsing_config::LayoutParser::processor_name].
105946        pub fn set_processor_name<T: std::convert::Into<std::string::String>>(
105947            mut self,
105948            v: T,
105949        ) -> Self {
105950            self.processor_name = v.into();
105951            self
105952        }
105953
105954        /// Sets the value of [max_parsing_requests_per_min][crate::model::rag_file_parsing_config::LayoutParser::max_parsing_requests_per_min].
105955        pub fn set_max_parsing_requests_per_min<T: std::convert::Into<i32>>(
105956            mut self,
105957            v: T,
105958        ) -> Self {
105959            self.max_parsing_requests_per_min = v.into();
105960            self
105961        }
105962    }
105963
105964    #[cfg(feature = "vertex-rag-data-service")]
105965    impl wkt::message::Message for LayoutParser {
105966        fn typename() -> &'static str {
105967            "type.googleapis.com/google.cloud.aiplatform.v1.RagFileParsingConfig.LayoutParser"
105968        }
105969    }
105970
105971    /// Specifies the advanced parsing for RagFiles.
105972    #[cfg(feature = "vertex-rag-data-service")]
105973    #[derive(Clone, Default, PartialEq)]
105974    #[non_exhaustive]
105975    pub struct LlmParser {
105976        /// The name of a LLM model used for parsing.
105977        /// Format:
105978        ///
105979        /// * `projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}`
105980        pub model_name: std::string::String,
105981
105982        /// The maximum number of requests the job is allowed to make to the
105983        /// LLM model per minute. Consult
105984        /// <https://cloud.google.com/vertex-ai/generative-ai/docs/quotas>
105985        /// and your document size to set an appropriate value here. If unspecified,
105986        /// a default value of 5000 QPM would be used.
105987        pub max_parsing_requests_per_min: i32,
105988
105989        /// The prompt to use for parsing. If not specified, a default prompt will
105990        /// be used.
105991        pub custom_parsing_prompt: std::string::String,
105992
105993        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
105994    }
105995
105996    #[cfg(feature = "vertex-rag-data-service")]
105997    impl LlmParser {
105998        pub fn new() -> Self {
105999            std::default::Default::default()
106000        }
106001
106002        /// Sets the value of [model_name][crate::model::rag_file_parsing_config::LlmParser::model_name].
106003        pub fn set_model_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
106004            self.model_name = v.into();
106005            self
106006        }
106007
106008        /// Sets the value of [max_parsing_requests_per_min][crate::model::rag_file_parsing_config::LlmParser::max_parsing_requests_per_min].
106009        pub fn set_max_parsing_requests_per_min<T: std::convert::Into<i32>>(
106010            mut self,
106011            v: T,
106012        ) -> Self {
106013            self.max_parsing_requests_per_min = v.into();
106014            self
106015        }
106016
106017        /// Sets the value of [custom_parsing_prompt][crate::model::rag_file_parsing_config::LlmParser::custom_parsing_prompt].
106018        pub fn set_custom_parsing_prompt<T: std::convert::Into<std::string::String>>(
106019            mut self,
106020            v: T,
106021        ) -> Self {
106022            self.custom_parsing_prompt = v.into();
106023            self
106024        }
106025    }
106026
106027    #[cfg(feature = "vertex-rag-data-service")]
106028    impl wkt::message::Message for LlmParser {
106029        fn typename() -> &'static str {
106030            "type.googleapis.com/google.cloud.aiplatform.v1.RagFileParsingConfig.LlmParser"
106031        }
106032    }
106033
106034    /// The parser to use for RagFiles.
106035    #[cfg(feature = "vertex-rag-data-service")]
106036    #[derive(Clone, Debug, PartialEq)]
106037    #[non_exhaustive]
106038    pub enum Parser {
106039        /// The Layout Parser to use for RagFiles.
106040        LayoutParser(std::boxed::Box<crate::model::rag_file_parsing_config::LayoutParser>),
106041        /// The LLM Parser to use for RagFiles.
106042        LlmParser(std::boxed::Box<crate::model::rag_file_parsing_config::LlmParser>),
106043    }
106044}
106045
106046/// Config for uploading RagFile.
106047#[cfg(feature = "vertex-rag-data-service")]
106048#[derive(Clone, Default, PartialEq)]
106049#[non_exhaustive]
106050pub struct UploadRagFileConfig {
106051    /// Specifies the transformation config for RagFiles.
106052    pub rag_file_transformation_config:
106053        std::option::Option<crate::model::RagFileTransformationConfig>,
106054
106055    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
106056}
106057
106058#[cfg(feature = "vertex-rag-data-service")]
106059impl UploadRagFileConfig {
106060    pub fn new() -> Self {
106061        std::default::Default::default()
106062    }
106063
106064    /// Sets the value of [rag_file_transformation_config][crate::model::UploadRagFileConfig::rag_file_transformation_config].
106065    pub fn set_rag_file_transformation_config<T>(mut self, v: T) -> Self
106066    where
106067        T: std::convert::Into<crate::model::RagFileTransformationConfig>,
106068    {
106069        self.rag_file_transformation_config = std::option::Option::Some(v.into());
106070        self
106071    }
106072
106073    /// Sets or clears the value of [rag_file_transformation_config][crate::model::UploadRagFileConfig::rag_file_transformation_config].
106074    pub fn set_or_clear_rag_file_transformation_config<T>(
106075        mut self,
106076        v: std::option::Option<T>,
106077    ) -> Self
106078    where
106079        T: std::convert::Into<crate::model::RagFileTransformationConfig>,
106080    {
106081        self.rag_file_transformation_config = v.map(|x| x.into());
106082        self
106083    }
106084}
106085
106086#[cfg(feature = "vertex-rag-data-service")]
106087impl wkt::message::Message for UploadRagFileConfig {
106088    fn typename() -> &'static str {
106089        "type.googleapis.com/google.cloud.aiplatform.v1.UploadRagFileConfig"
106090    }
106091}
106092
106093/// Config for importing RagFiles.
106094#[cfg(feature = "vertex-rag-data-service")]
106095#[derive(Clone, Default, PartialEq)]
106096#[non_exhaustive]
106097pub struct ImportRagFilesConfig {
106098    /// Specifies the transformation config for RagFiles.
106099    pub rag_file_transformation_config:
106100        std::option::Option<crate::model::RagFileTransformationConfig>,
106101
106102    /// Optional. Specifies the parsing config for RagFiles.
106103    /// RAG will use the default parser if this field is not set.
106104    pub rag_file_parsing_config: std::option::Option<crate::model::RagFileParsingConfig>,
106105
106106    /// Optional. The max number of queries per minute that this job is allowed to
106107    /// make to the embedding model specified on the corpus. This value is specific
106108    /// to this job and not shared across other import jobs. Consult the Quotas
106109    /// page on the project to set an appropriate value here.
106110    /// If unspecified, a default value of 1,000 QPM would be used.
106111    pub max_embedding_requests_per_min: i32,
106112
106113    /// Rebuilds the ANN index to optimize for recall on the imported data.
106114    /// Only applicable for RagCorpora running on RagManagedDb with
106115    /// `retrieval_strategy` set to `ANN`. The rebuild will be performed using the
106116    /// existing ANN config set on the RagCorpus. To change the ANN config, please
106117    /// use the UpdateRagCorpus API.
106118    ///
106119    /// Default is false, i.e., index is not rebuilt.
106120    pub rebuild_ann_index: bool,
106121
106122    /// The source of the import.
106123    pub import_source: std::option::Option<crate::model::import_rag_files_config::ImportSource>,
106124
106125    /// Optional. If provided, all partial failures are written to the sink.
106126    /// Deprecated. Prefer to use the `import_result_sink`.
106127    pub partial_failure_sink:
106128        std::option::Option<crate::model::import_rag_files_config::PartialFailureSink>,
106129
106130    /// Optional. If provided, all successfully imported files and all partial
106131    /// failures are written to the sink.
106132    pub import_result_sink:
106133        std::option::Option<crate::model::import_rag_files_config::ImportResultSink>,
106134
106135    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
106136}
106137
106138#[cfg(feature = "vertex-rag-data-service")]
106139impl ImportRagFilesConfig {
106140    pub fn new() -> Self {
106141        std::default::Default::default()
106142    }
106143
106144    /// Sets the value of [rag_file_transformation_config][crate::model::ImportRagFilesConfig::rag_file_transformation_config].
106145    pub fn set_rag_file_transformation_config<T>(mut self, v: T) -> Self
106146    where
106147        T: std::convert::Into<crate::model::RagFileTransformationConfig>,
106148    {
106149        self.rag_file_transformation_config = std::option::Option::Some(v.into());
106150        self
106151    }
106152
106153    /// Sets or clears the value of [rag_file_transformation_config][crate::model::ImportRagFilesConfig::rag_file_transformation_config].
106154    pub fn set_or_clear_rag_file_transformation_config<T>(
106155        mut self,
106156        v: std::option::Option<T>,
106157    ) -> Self
106158    where
106159        T: std::convert::Into<crate::model::RagFileTransformationConfig>,
106160    {
106161        self.rag_file_transformation_config = v.map(|x| x.into());
106162        self
106163    }
106164
106165    /// Sets the value of [rag_file_parsing_config][crate::model::ImportRagFilesConfig::rag_file_parsing_config].
106166    pub fn set_rag_file_parsing_config<T>(mut self, v: T) -> Self
106167    where
106168        T: std::convert::Into<crate::model::RagFileParsingConfig>,
106169    {
106170        self.rag_file_parsing_config = std::option::Option::Some(v.into());
106171        self
106172    }
106173
106174    /// Sets or clears the value of [rag_file_parsing_config][crate::model::ImportRagFilesConfig::rag_file_parsing_config].
106175    pub fn set_or_clear_rag_file_parsing_config<T>(mut self, v: std::option::Option<T>) -> Self
106176    where
106177        T: std::convert::Into<crate::model::RagFileParsingConfig>,
106178    {
106179        self.rag_file_parsing_config = v.map(|x| x.into());
106180        self
106181    }
106182
106183    /// Sets the value of [max_embedding_requests_per_min][crate::model::ImportRagFilesConfig::max_embedding_requests_per_min].
106184    pub fn set_max_embedding_requests_per_min<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
106185        self.max_embedding_requests_per_min = v.into();
106186        self
106187    }
106188
106189    /// Sets the value of [rebuild_ann_index][crate::model::ImportRagFilesConfig::rebuild_ann_index].
106190    pub fn set_rebuild_ann_index<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
106191        self.rebuild_ann_index = v.into();
106192        self
106193    }
106194
106195    /// Sets the value of [import_source][crate::model::ImportRagFilesConfig::import_source].
106196    ///
106197    /// Note that all the setters affecting `import_source` are mutually
106198    /// exclusive.
106199    pub fn set_import_source<
106200        T: std::convert::Into<
106201                std::option::Option<crate::model::import_rag_files_config::ImportSource>,
106202            >,
106203    >(
106204        mut self,
106205        v: T,
106206    ) -> Self {
106207        self.import_source = v.into();
106208        self
106209    }
106210
106211    /// The value of [import_source][crate::model::ImportRagFilesConfig::import_source]
106212    /// if it holds a `GcsSource`, `None` if the field is not set or
106213    /// holds a different branch.
106214    pub fn gcs_source(&self) -> std::option::Option<&std::boxed::Box<crate::model::GcsSource>> {
106215        #[allow(unreachable_patterns)]
106216        self.import_source.as_ref().and_then(|v| match v {
106217            crate::model::import_rag_files_config::ImportSource::GcsSource(v) => {
106218                std::option::Option::Some(v)
106219            }
106220            _ => std::option::Option::None,
106221        })
106222    }
106223
106224    /// Sets the value of [import_source][crate::model::ImportRagFilesConfig::import_source]
106225    /// to hold a `GcsSource`.
106226    ///
106227    /// Note that all the setters affecting `import_source` are
106228    /// mutually exclusive.
106229    pub fn set_gcs_source<T: std::convert::Into<std::boxed::Box<crate::model::GcsSource>>>(
106230        mut self,
106231        v: T,
106232    ) -> Self {
106233        self.import_source = std::option::Option::Some(
106234            crate::model::import_rag_files_config::ImportSource::GcsSource(v.into()),
106235        );
106236        self
106237    }
106238
106239    /// The value of [import_source][crate::model::ImportRagFilesConfig::import_source]
106240    /// if it holds a `GoogleDriveSource`, `None` if the field is not set or
106241    /// holds a different branch.
106242    pub fn google_drive_source(
106243        &self,
106244    ) -> std::option::Option<&std::boxed::Box<crate::model::GoogleDriveSource>> {
106245        #[allow(unreachable_patterns)]
106246        self.import_source.as_ref().and_then(|v| match v {
106247            crate::model::import_rag_files_config::ImportSource::GoogleDriveSource(v) => {
106248                std::option::Option::Some(v)
106249            }
106250            _ => std::option::Option::None,
106251        })
106252    }
106253
106254    /// Sets the value of [import_source][crate::model::ImportRagFilesConfig::import_source]
106255    /// to hold a `GoogleDriveSource`.
106256    ///
106257    /// Note that all the setters affecting `import_source` are
106258    /// mutually exclusive.
106259    pub fn set_google_drive_source<
106260        T: std::convert::Into<std::boxed::Box<crate::model::GoogleDriveSource>>,
106261    >(
106262        mut self,
106263        v: T,
106264    ) -> Self {
106265        self.import_source = std::option::Option::Some(
106266            crate::model::import_rag_files_config::ImportSource::GoogleDriveSource(v.into()),
106267        );
106268        self
106269    }
106270
106271    /// The value of [import_source][crate::model::ImportRagFilesConfig::import_source]
106272    /// if it holds a `SlackSource`, `None` if the field is not set or
106273    /// holds a different branch.
106274    pub fn slack_source(&self) -> std::option::Option<&std::boxed::Box<crate::model::SlackSource>> {
106275        #[allow(unreachable_patterns)]
106276        self.import_source.as_ref().and_then(|v| match v {
106277            crate::model::import_rag_files_config::ImportSource::SlackSource(v) => {
106278                std::option::Option::Some(v)
106279            }
106280            _ => std::option::Option::None,
106281        })
106282    }
106283
106284    /// Sets the value of [import_source][crate::model::ImportRagFilesConfig::import_source]
106285    /// to hold a `SlackSource`.
106286    ///
106287    /// Note that all the setters affecting `import_source` are
106288    /// mutually exclusive.
106289    pub fn set_slack_source<T: std::convert::Into<std::boxed::Box<crate::model::SlackSource>>>(
106290        mut self,
106291        v: T,
106292    ) -> Self {
106293        self.import_source = std::option::Option::Some(
106294            crate::model::import_rag_files_config::ImportSource::SlackSource(v.into()),
106295        );
106296        self
106297    }
106298
106299    /// The value of [import_source][crate::model::ImportRagFilesConfig::import_source]
106300    /// if it holds a `JiraSource`, `None` if the field is not set or
106301    /// holds a different branch.
106302    pub fn jira_source(&self) -> std::option::Option<&std::boxed::Box<crate::model::JiraSource>> {
106303        #[allow(unreachable_patterns)]
106304        self.import_source.as_ref().and_then(|v| match v {
106305            crate::model::import_rag_files_config::ImportSource::JiraSource(v) => {
106306                std::option::Option::Some(v)
106307            }
106308            _ => std::option::Option::None,
106309        })
106310    }
106311
106312    /// Sets the value of [import_source][crate::model::ImportRagFilesConfig::import_source]
106313    /// to hold a `JiraSource`.
106314    ///
106315    /// Note that all the setters affecting `import_source` are
106316    /// mutually exclusive.
106317    pub fn set_jira_source<T: std::convert::Into<std::boxed::Box<crate::model::JiraSource>>>(
106318        mut self,
106319        v: T,
106320    ) -> Self {
106321        self.import_source = std::option::Option::Some(
106322            crate::model::import_rag_files_config::ImportSource::JiraSource(v.into()),
106323        );
106324        self
106325    }
106326
106327    /// The value of [import_source][crate::model::ImportRagFilesConfig::import_source]
106328    /// if it holds a `SharePointSources`, `None` if the field is not set or
106329    /// holds a different branch.
106330    pub fn share_point_sources(
106331        &self,
106332    ) -> std::option::Option<&std::boxed::Box<crate::model::SharePointSources>> {
106333        #[allow(unreachable_patterns)]
106334        self.import_source.as_ref().and_then(|v| match v {
106335            crate::model::import_rag_files_config::ImportSource::SharePointSources(v) => {
106336                std::option::Option::Some(v)
106337            }
106338            _ => std::option::Option::None,
106339        })
106340    }
106341
106342    /// Sets the value of [import_source][crate::model::ImportRagFilesConfig::import_source]
106343    /// to hold a `SharePointSources`.
106344    ///
106345    /// Note that all the setters affecting `import_source` are
106346    /// mutually exclusive.
106347    pub fn set_share_point_sources<
106348        T: std::convert::Into<std::boxed::Box<crate::model::SharePointSources>>,
106349    >(
106350        mut self,
106351        v: T,
106352    ) -> Self {
106353        self.import_source = std::option::Option::Some(
106354            crate::model::import_rag_files_config::ImportSource::SharePointSources(v.into()),
106355        );
106356        self
106357    }
106358
106359    /// Sets the value of [partial_failure_sink][crate::model::ImportRagFilesConfig::partial_failure_sink].
106360    ///
106361    /// Note that all the setters affecting `partial_failure_sink` are mutually
106362    /// exclusive.
106363    pub fn set_partial_failure_sink<
106364        T: std::convert::Into<
106365                std::option::Option<crate::model::import_rag_files_config::PartialFailureSink>,
106366            >,
106367    >(
106368        mut self,
106369        v: T,
106370    ) -> Self {
106371        self.partial_failure_sink = v.into();
106372        self
106373    }
106374
106375    /// The value of [partial_failure_sink][crate::model::ImportRagFilesConfig::partial_failure_sink]
106376    /// if it holds a `PartialFailureGcsSink`, `None` if the field is not set or
106377    /// holds a different branch.
106378    #[deprecated]
106379    pub fn partial_failure_gcs_sink(
106380        &self,
106381    ) -> std::option::Option<&std::boxed::Box<crate::model::GcsDestination>> {
106382        #[allow(unreachable_patterns)]
106383        self.partial_failure_sink.as_ref().and_then(|v| match v {
106384            crate::model::import_rag_files_config::PartialFailureSink::PartialFailureGcsSink(v) => {
106385                std::option::Option::Some(v)
106386            }
106387            _ => std::option::Option::None,
106388        })
106389    }
106390
106391    /// Sets the value of [partial_failure_sink][crate::model::ImportRagFilesConfig::partial_failure_sink]
106392    /// to hold a `PartialFailureGcsSink`.
106393    ///
106394    /// Note that all the setters affecting `partial_failure_sink` are
106395    /// mutually exclusive.
106396    #[deprecated]
106397    pub fn set_partial_failure_gcs_sink<
106398        T: std::convert::Into<std::boxed::Box<crate::model::GcsDestination>>,
106399    >(
106400        mut self,
106401        v: T,
106402    ) -> Self {
106403        self.partial_failure_sink = std::option::Option::Some(
106404            crate::model::import_rag_files_config::PartialFailureSink::PartialFailureGcsSink(
106405                v.into(),
106406            ),
106407        );
106408        self
106409    }
106410
106411    /// The value of [partial_failure_sink][crate::model::ImportRagFilesConfig::partial_failure_sink]
106412    /// if it holds a `PartialFailureBigquerySink`, `None` if the field is not set or
106413    /// holds a different branch.
106414    #[deprecated]
106415    pub fn partial_failure_bigquery_sink(
106416        &self,
106417    ) -> std::option::Option<&std::boxed::Box<crate::model::BigQueryDestination>> {
106418        #[allow(unreachable_patterns)]
106419        self.partial_failure_sink.as_ref().and_then(|v| match v {
106420            crate::model::import_rag_files_config::PartialFailureSink::PartialFailureBigquerySink(v) => std::option::Option::Some(v),
106421            _ => std::option::Option::None,
106422        })
106423    }
106424
106425    /// Sets the value of [partial_failure_sink][crate::model::ImportRagFilesConfig::partial_failure_sink]
106426    /// to hold a `PartialFailureBigquerySink`.
106427    ///
106428    /// Note that all the setters affecting `partial_failure_sink` are
106429    /// mutually exclusive.
106430    #[deprecated]
106431    pub fn set_partial_failure_bigquery_sink<
106432        T: std::convert::Into<std::boxed::Box<crate::model::BigQueryDestination>>,
106433    >(
106434        mut self,
106435        v: T,
106436    ) -> Self {
106437        self.partial_failure_sink = std::option::Option::Some(
106438            crate::model::import_rag_files_config::PartialFailureSink::PartialFailureBigquerySink(
106439                v.into(),
106440            ),
106441        );
106442        self
106443    }
106444
106445    /// Sets the value of [import_result_sink][crate::model::ImportRagFilesConfig::import_result_sink].
106446    ///
106447    /// Note that all the setters affecting `import_result_sink` are mutually
106448    /// exclusive.
106449    pub fn set_import_result_sink<
106450        T: std::convert::Into<
106451                std::option::Option<crate::model::import_rag_files_config::ImportResultSink>,
106452            >,
106453    >(
106454        mut self,
106455        v: T,
106456    ) -> Self {
106457        self.import_result_sink = v.into();
106458        self
106459    }
106460
106461    /// The value of [import_result_sink][crate::model::ImportRagFilesConfig::import_result_sink]
106462    /// if it holds a `ImportResultGcsSink`, `None` if the field is not set or
106463    /// holds a different branch.
106464    pub fn import_result_gcs_sink(
106465        &self,
106466    ) -> std::option::Option<&std::boxed::Box<crate::model::GcsDestination>> {
106467        #[allow(unreachable_patterns)]
106468        self.import_result_sink.as_ref().and_then(|v| match v {
106469            crate::model::import_rag_files_config::ImportResultSink::ImportResultGcsSink(v) => {
106470                std::option::Option::Some(v)
106471            }
106472            _ => std::option::Option::None,
106473        })
106474    }
106475
106476    /// Sets the value of [import_result_sink][crate::model::ImportRagFilesConfig::import_result_sink]
106477    /// to hold a `ImportResultGcsSink`.
106478    ///
106479    /// Note that all the setters affecting `import_result_sink` are
106480    /// mutually exclusive.
106481    pub fn set_import_result_gcs_sink<
106482        T: std::convert::Into<std::boxed::Box<crate::model::GcsDestination>>,
106483    >(
106484        mut self,
106485        v: T,
106486    ) -> Self {
106487        self.import_result_sink = std::option::Option::Some(
106488            crate::model::import_rag_files_config::ImportResultSink::ImportResultGcsSink(v.into()),
106489        );
106490        self
106491    }
106492
106493    /// The value of [import_result_sink][crate::model::ImportRagFilesConfig::import_result_sink]
106494    /// if it holds a `ImportResultBigquerySink`, `None` if the field is not set or
106495    /// holds a different branch.
106496    pub fn import_result_bigquery_sink(
106497        &self,
106498    ) -> std::option::Option<&std::boxed::Box<crate::model::BigQueryDestination>> {
106499        #[allow(unreachable_patterns)]
106500        self.import_result_sink.as_ref().and_then(|v| match v {
106501            crate::model::import_rag_files_config::ImportResultSink::ImportResultBigquerySink(
106502                v,
106503            ) => std::option::Option::Some(v),
106504            _ => std::option::Option::None,
106505        })
106506    }
106507
106508    /// Sets the value of [import_result_sink][crate::model::ImportRagFilesConfig::import_result_sink]
106509    /// to hold a `ImportResultBigquerySink`.
106510    ///
106511    /// Note that all the setters affecting `import_result_sink` are
106512    /// mutually exclusive.
106513    pub fn set_import_result_bigquery_sink<
106514        T: std::convert::Into<std::boxed::Box<crate::model::BigQueryDestination>>,
106515    >(
106516        mut self,
106517        v: T,
106518    ) -> Self {
106519        self.import_result_sink = std::option::Option::Some(
106520            crate::model::import_rag_files_config::ImportResultSink::ImportResultBigquerySink(
106521                v.into(),
106522            ),
106523        );
106524        self
106525    }
106526}
106527
106528#[cfg(feature = "vertex-rag-data-service")]
106529impl wkt::message::Message for ImportRagFilesConfig {
106530    fn typename() -> &'static str {
106531        "type.googleapis.com/google.cloud.aiplatform.v1.ImportRagFilesConfig"
106532    }
106533}
106534
106535/// Defines additional types related to [ImportRagFilesConfig].
106536#[cfg(feature = "vertex-rag-data-service")]
106537pub mod import_rag_files_config {
106538    #[allow(unused_imports)]
106539    use super::*;
106540
106541    /// The source of the import.
106542    #[cfg(feature = "vertex-rag-data-service")]
106543    #[derive(Clone, Debug, PartialEq)]
106544    #[non_exhaustive]
106545    pub enum ImportSource {
106546        /// Google Cloud Storage location. Supports importing individual files as
106547        /// well as entire Google Cloud Storage directories. Sample formats:
106548        ///
106549        /// - `gs://bucket_name/my_directory/object_name/my_file.txt`
106550        /// - `gs://bucket_name/my_directory`
106551        GcsSource(std::boxed::Box<crate::model::GcsSource>),
106552        /// Google Drive location. Supports importing individual files as
106553        /// well as Google Drive folders.
106554        GoogleDriveSource(std::boxed::Box<crate::model::GoogleDriveSource>),
106555        /// Slack channels with their corresponding access tokens.
106556        SlackSource(std::boxed::Box<crate::model::SlackSource>),
106557        /// Jira queries with their corresponding authentication.
106558        JiraSource(std::boxed::Box<crate::model::JiraSource>),
106559        /// SharePoint sources.
106560        SharePointSources(std::boxed::Box<crate::model::SharePointSources>),
106561    }
106562
106563    /// Optional. If provided, all partial failures are written to the sink.
106564    /// Deprecated. Prefer to use the `import_result_sink`.
106565    #[cfg(feature = "vertex-rag-data-service")]
106566    #[derive(Clone, Debug, PartialEq)]
106567    #[non_exhaustive]
106568    pub enum PartialFailureSink {
106569        /// The Cloud Storage path to write partial failures to.
106570        /// Deprecated. Prefer to use `import_result_gcs_sink`.
106571        #[deprecated]
106572        PartialFailureGcsSink(std::boxed::Box<crate::model::GcsDestination>),
106573        /// The BigQuery destination to write partial failures to. It should be a
106574        /// bigquery table resource name (e.g.
106575        /// "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
106576        /// table does not exist, it will be created with the expected schema. If the
106577        /// table exists, the schema will be validated and data will be added to this
106578        /// existing table.
106579        /// Deprecated. Prefer to use `import_result_bq_sink`.
106580        #[deprecated]
106581        PartialFailureBigquerySink(std::boxed::Box<crate::model::BigQueryDestination>),
106582    }
106583
106584    /// Optional. If provided, all successfully imported files and all partial
106585    /// failures are written to the sink.
106586    #[cfg(feature = "vertex-rag-data-service")]
106587    #[derive(Clone, Debug, PartialEq)]
106588    #[non_exhaustive]
106589    pub enum ImportResultSink {
106590        /// The Cloud Storage path to write import result to.
106591        ImportResultGcsSink(std::boxed::Box<crate::model::GcsDestination>),
106592        /// The BigQuery destination to write import result to. It should be a
106593        /// bigquery table resource name (e.g.
106594        /// "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the
106595        /// table does not exist, it will be created with the expected schema. If the
106596        /// table exists, the schema will be validated and data will be added to this
106597        /// existing table.
106598        ImportResultBigquerySink(std::boxed::Box<crate::model::BigQueryDestination>),
106599    }
106600}
106601
106602/// Configuration message for RagManagedDb used by RagEngine.
106603#[cfg(feature = "vertex-rag-data-service")]
106604#[derive(Clone, Default, PartialEq)]
106605#[non_exhaustive]
106606pub struct RagManagedDbConfig {
106607    /// The tier of the RagManagedDb.
106608    pub tier: std::option::Option<crate::model::rag_managed_db_config::Tier>,
106609
106610    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
106611}
106612
106613#[cfg(feature = "vertex-rag-data-service")]
106614impl RagManagedDbConfig {
106615    pub fn new() -> Self {
106616        std::default::Default::default()
106617    }
106618
106619    /// Sets the value of [tier][crate::model::RagManagedDbConfig::tier].
106620    ///
106621    /// Note that all the setters affecting `tier` are mutually
106622    /// exclusive.
106623    pub fn set_tier<
106624        T: std::convert::Into<std::option::Option<crate::model::rag_managed_db_config::Tier>>,
106625    >(
106626        mut self,
106627        v: T,
106628    ) -> Self {
106629        self.tier = v.into();
106630        self
106631    }
106632
106633    /// The value of [tier][crate::model::RagManagedDbConfig::tier]
106634    /// if it holds a `Scaled`, `None` if the field is not set or
106635    /// holds a different branch.
106636    pub fn scaled(
106637        &self,
106638    ) -> std::option::Option<&std::boxed::Box<crate::model::rag_managed_db_config::Scaled>> {
106639        #[allow(unreachable_patterns)]
106640        self.tier.as_ref().and_then(|v| match v {
106641            crate::model::rag_managed_db_config::Tier::Scaled(v) => std::option::Option::Some(v),
106642            _ => std::option::Option::None,
106643        })
106644    }
106645
106646    /// Sets the value of [tier][crate::model::RagManagedDbConfig::tier]
106647    /// to hold a `Scaled`.
106648    ///
106649    /// Note that all the setters affecting `tier` are
106650    /// mutually exclusive.
106651    pub fn set_scaled<
106652        T: std::convert::Into<std::boxed::Box<crate::model::rag_managed_db_config::Scaled>>,
106653    >(
106654        mut self,
106655        v: T,
106656    ) -> Self {
106657        self.tier =
106658            std::option::Option::Some(crate::model::rag_managed_db_config::Tier::Scaled(v.into()));
106659        self
106660    }
106661
106662    /// The value of [tier][crate::model::RagManagedDbConfig::tier]
106663    /// if it holds a `Basic`, `None` if the field is not set or
106664    /// holds a different branch.
106665    pub fn basic(
106666        &self,
106667    ) -> std::option::Option<&std::boxed::Box<crate::model::rag_managed_db_config::Basic>> {
106668        #[allow(unreachable_patterns)]
106669        self.tier.as_ref().and_then(|v| match v {
106670            crate::model::rag_managed_db_config::Tier::Basic(v) => std::option::Option::Some(v),
106671            _ => std::option::Option::None,
106672        })
106673    }
106674
106675    /// Sets the value of [tier][crate::model::RagManagedDbConfig::tier]
106676    /// to hold a `Basic`.
106677    ///
106678    /// Note that all the setters affecting `tier` are
106679    /// mutually exclusive.
106680    pub fn set_basic<
106681        T: std::convert::Into<std::boxed::Box<crate::model::rag_managed_db_config::Basic>>,
106682    >(
106683        mut self,
106684        v: T,
106685    ) -> Self {
106686        self.tier =
106687            std::option::Option::Some(crate::model::rag_managed_db_config::Tier::Basic(v.into()));
106688        self
106689    }
106690
106691    /// The value of [tier][crate::model::RagManagedDbConfig::tier]
106692    /// if it holds a `Unprovisioned`, `None` if the field is not set or
106693    /// holds a different branch.
106694    pub fn unprovisioned(
106695        &self,
106696    ) -> std::option::Option<&std::boxed::Box<crate::model::rag_managed_db_config::Unprovisioned>>
106697    {
106698        #[allow(unreachable_patterns)]
106699        self.tier.as_ref().and_then(|v| match v {
106700            crate::model::rag_managed_db_config::Tier::Unprovisioned(v) => {
106701                std::option::Option::Some(v)
106702            }
106703            _ => std::option::Option::None,
106704        })
106705    }
106706
106707    /// Sets the value of [tier][crate::model::RagManagedDbConfig::tier]
106708    /// to hold a `Unprovisioned`.
106709    ///
106710    /// Note that all the setters affecting `tier` are
106711    /// mutually exclusive.
106712    pub fn set_unprovisioned<
106713        T: std::convert::Into<std::boxed::Box<crate::model::rag_managed_db_config::Unprovisioned>>,
106714    >(
106715        mut self,
106716        v: T,
106717    ) -> Self {
106718        self.tier = std::option::Option::Some(
106719            crate::model::rag_managed_db_config::Tier::Unprovisioned(v.into()),
106720        );
106721        self
106722    }
106723}
106724
106725#[cfg(feature = "vertex-rag-data-service")]
106726impl wkt::message::Message for RagManagedDbConfig {
106727    fn typename() -> &'static str {
106728        "type.googleapis.com/google.cloud.aiplatform.v1.RagManagedDbConfig"
106729    }
106730}
106731
106732/// Defines additional types related to [RagManagedDbConfig].
106733#[cfg(feature = "vertex-rag-data-service")]
106734pub mod rag_managed_db_config {
106735    #[allow(unused_imports)]
106736    use super::*;
106737
106738    /// Scaled tier offers production grade performance along with
106739    /// autoscaling functionality. It is suitable for customers with large
106740    /// amounts of data or performance sensitive workloads.
106741    #[cfg(feature = "vertex-rag-data-service")]
106742    #[derive(Clone, Default, PartialEq)]
106743    #[non_exhaustive]
106744    pub struct Scaled {
106745        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
106746    }
106747
106748    #[cfg(feature = "vertex-rag-data-service")]
106749    impl Scaled {
106750        pub fn new() -> Self {
106751            std::default::Default::default()
106752        }
106753    }
106754
106755    #[cfg(feature = "vertex-rag-data-service")]
106756    impl wkt::message::Message for Scaled {
106757        fn typename() -> &'static str {
106758            "type.googleapis.com/google.cloud.aiplatform.v1.RagManagedDbConfig.Scaled"
106759        }
106760    }
106761
106762    /// Basic tier is a cost-effective and low compute tier suitable for
106763    /// the following cases:
106764    ///
106765    /// * Experimenting with RagManagedDb.
106766    /// * Small data size.
106767    /// * Latency insensitive workload.
106768    /// * Only using RAG Engine with external vector DBs.
106769    ///
106770    /// NOTE: This is the default tier if not explicitly chosen.
106771    #[cfg(feature = "vertex-rag-data-service")]
106772    #[derive(Clone, Default, PartialEq)]
106773    #[non_exhaustive]
106774    pub struct Basic {
106775        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
106776    }
106777
106778    #[cfg(feature = "vertex-rag-data-service")]
106779    impl Basic {
106780        pub fn new() -> Self {
106781            std::default::Default::default()
106782        }
106783    }
106784
106785    #[cfg(feature = "vertex-rag-data-service")]
106786    impl wkt::message::Message for Basic {
106787        fn typename() -> &'static str {
106788            "type.googleapis.com/google.cloud.aiplatform.v1.RagManagedDbConfig.Basic"
106789        }
106790    }
106791
106792    /// Disables the RAG Engine service and deletes all your data held
106793    /// within this service. This will halt the billing of the service.
106794    ///
106795    /// NOTE: Once deleted the data cannot be recovered. To start using
106796    /// RAG Engine again, you will need to update the tier by calling the
106797    /// UpdateRagEngineConfig API.
106798    #[cfg(feature = "vertex-rag-data-service")]
106799    #[derive(Clone, Default, PartialEq)]
106800    #[non_exhaustive]
106801    pub struct Unprovisioned {
106802        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
106803    }
106804
106805    #[cfg(feature = "vertex-rag-data-service")]
106806    impl Unprovisioned {
106807        pub fn new() -> Self {
106808            std::default::Default::default()
106809        }
106810    }
106811
106812    #[cfg(feature = "vertex-rag-data-service")]
106813    impl wkt::message::Message for Unprovisioned {
106814        fn typename() -> &'static str {
106815            "type.googleapis.com/google.cloud.aiplatform.v1.RagManagedDbConfig.Unprovisioned"
106816        }
106817    }
106818
106819    /// The tier of the RagManagedDb.
106820    #[cfg(feature = "vertex-rag-data-service")]
106821    #[derive(Clone, Debug, PartialEq)]
106822    #[non_exhaustive]
106823    pub enum Tier {
106824        /// Sets the RagManagedDb to the Scaled tier.
106825        Scaled(std::boxed::Box<crate::model::rag_managed_db_config::Scaled>),
106826        /// Sets the RagManagedDb to the Basic tier.
106827        Basic(std::boxed::Box<crate::model::rag_managed_db_config::Basic>),
106828        /// Sets the RagManagedDb to the Unprovisioned tier.
106829        Unprovisioned(std::boxed::Box<crate::model::rag_managed_db_config::Unprovisioned>),
106830    }
106831}
106832
106833/// Config for RagEngine.
106834#[cfg(feature = "vertex-rag-data-service")]
106835#[derive(Clone, Default, PartialEq)]
106836#[non_exhaustive]
106837pub struct RagEngineConfig {
106838    /// Identifier. The name of the RagEngineConfig.
106839    /// Format:
106840    /// `projects/{project}/locations/{location}/ragEngineConfig`
106841    pub name: std::string::String,
106842
106843    /// The config of the RagManagedDb used by RagEngine.
106844    pub rag_managed_db_config: std::option::Option<crate::model::RagManagedDbConfig>,
106845
106846    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
106847}
106848
106849#[cfg(feature = "vertex-rag-data-service")]
106850impl RagEngineConfig {
106851    pub fn new() -> Self {
106852        std::default::Default::default()
106853    }
106854
106855    /// Sets the value of [name][crate::model::RagEngineConfig::name].
106856    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
106857        self.name = v.into();
106858        self
106859    }
106860
106861    /// Sets the value of [rag_managed_db_config][crate::model::RagEngineConfig::rag_managed_db_config].
106862    pub fn set_rag_managed_db_config<T>(mut self, v: T) -> Self
106863    where
106864        T: std::convert::Into<crate::model::RagManagedDbConfig>,
106865    {
106866        self.rag_managed_db_config = std::option::Option::Some(v.into());
106867        self
106868    }
106869
106870    /// Sets or clears the value of [rag_managed_db_config][crate::model::RagEngineConfig::rag_managed_db_config].
106871    pub fn set_or_clear_rag_managed_db_config<T>(mut self, v: std::option::Option<T>) -> Self
106872    where
106873        T: std::convert::Into<crate::model::RagManagedDbConfig>,
106874    {
106875        self.rag_managed_db_config = v.map(|x| x.into());
106876        self
106877    }
106878}
106879
106880#[cfg(feature = "vertex-rag-data-service")]
106881impl wkt::message::Message for RagEngineConfig {
106882    fn typename() -> &'static str {
106883        "type.googleapis.com/google.cloud.aiplatform.v1.RagEngineConfig"
106884    }
106885}
106886
106887/// Request message for
106888/// [VertexRagDataService.CreateRagCorpus][google.cloud.aiplatform.v1.VertexRagDataService.CreateRagCorpus].
106889///
106890/// [google.cloud.aiplatform.v1.VertexRagDataService.CreateRagCorpus]: crate::client::VertexRagDataService::create_rag_corpus
106891#[cfg(feature = "vertex-rag-data-service")]
106892#[derive(Clone, Default, PartialEq)]
106893#[non_exhaustive]
106894pub struct CreateRagCorpusRequest {
106895    /// Required. The resource name of the Location to create the RagCorpus in.
106896    /// Format: `projects/{project}/locations/{location}`
106897    pub parent: std::string::String,
106898
106899    /// Required. The RagCorpus to create.
106900    pub rag_corpus: std::option::Option<crate::model::RagCorpus>,
106901
106902    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
106903}
106904
106905#[cfg(feature = "vertex-rag-data-service")]
106906impl CreateRagCorpusRequest {
106907    pub fn new() -> Self {
106908        std::default::Default::default()
106909    }
106910
106911    /// Sets the value of [parent][crate::model::CreateRagCorpusRequest::parent].
106912    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
106913        self.parent = v.into();
106914        self
106915    }
106916
106917    /// Sets the value of [rag_corpus][crate::model::CreateRagCorpusRequest::rag_corpus].
106918    pub fn set_rag_corpus<T>(mut self, v: T) -> Self
106919    where
106920        T: std::convert::Into<crate::model::RagCorpus>,
106921    {
106922        self.rag_corpus = std::option::Option::Some(v.into());
106923        self
106924    }
106925
106926    /// Sets or clears the value of [rag_corpus][crate::model::CreateRagCorpusRequest::rag_corpus].
106927    pub fn set_or_clear_rag_corpus<T>(mut self, v: std::option::Option<T>) -> Self
106928    where
106929        T: std::convert::Into<crate::model::RagCorpus>,
106930    {
106931        self.rag_corpus = v.map(|x| x.into());
106932        self
106933    }
106934}
106935
106936#[cfg(feature = "vertex-rag-data-service")]
106937impl wkt::message::Message for CreateRagCorpusRequest {
106938    fn typename() -> &'static str {
106939        "type.googleapis.com/google.cloud.aiplatform.v1.CreateRagCorpusRequest"
106940    }
106941}
106942
106943/// Request message for
106944/// [VertexRagDataService.GetRagCorpus][google.cloud.aiplatform.v1.VertexRagDataService.GetRagCorpus]
106945///
106946/// [google.cloud.aiplatform.v1.VertexRagDataService.GetRagCorpus]: crate::client::VertexRagDataService::get_rag_corpus
106947#[cfg(feature = "vertex-rag-data-service")]
106948#[derive(Clone, Default, PartialEq)]
106949#[non_exhaustive]
106950pub struct GetRagCorpusRequest {
106951    /// Required. The name of the RagCorpus resource.
106952    /// Format:
106953    /// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
106954    pub name: std::string::String,
106955
106956    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
106957}
106958
106959#[cfg(feature = "vertex-rag-data-service")]
106960impl GetRagCorpusRequest {
106961    pub fn new() -> Self {
106962        std::default::Default::default()
106963    }
106964
106965    /// Sets the value of [name][crate::model::GetRagCorpusRequest::name].
106966    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
106967        self.name = v.into();
106968        self
106969    }
106970}
106971
106972#[cfg(feature = "vertex-rag-data-service")]
106973impl wkt::message::Message for GetRagCorpusRequest {
106974    fn typename() -> &'static str {
106975        "type.googleapis.com/google.cloud.aiplatform.v1.GetRagCorpusRequest"
106976    }
106977}
106978
106979/// Request message for
106980/// [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1.VertexRagDataService.ListRagCorpora].
106981///
106982/// [google.cloud.aiplatform.v1.VertexRagDataService.ListRagCorpora]: crate::client::VertexRagDataService::list_rag_corpora
106983#[cfg(feature = "vertex-rag-data-service")]
106984#[derive(Clone, Default, PartialEq)]
106985#[non_exhaustive]
106986pub struct ListRagCorporaRequest {
106987    /// Required. The resource name of the Location from which to list the
106988    /// RagCorpora. Format: `projects/{project}/locations/{location}`
106989    pub parent: std::string::String,
106990
106991    /// Optional. The standard list page size.
106992    pub page_size: i32,
106993
106994    /// Optional. The standard list page token.
106995    /// Typically obtained via
106996    /// [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1.ListRagCorporaResponse.next_page_token]
106997    /// of the previous
106998    /// [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1.VertexRagDataService.ListRagCorpora]
106999    /// call.
107000    ///
107001    /// [google.cloud.aiplatform.v1.ListRagCorporaResponse.next_page_token]: crate::model::ListRagCorporaResponse::next_page_token
107002    /// [google.cloud.aiplatform.v1.VertexRagDataService.ListRagCorpora]: crate::client::VertexRagDataService::list_rag_corpora
107003    pub page_token: std::string::String,
107004
107005    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107006}
107007
107008#[cfg(feature = "vertex-rag-data-service")]
107009impl ListRagCorporaRequest {
107010    pub fn new() -> Self {
107011        std::default::Default::default()
107012    }
107013
107014    /// Sets the value of [parent][crate::model::ListRagCorporaRequest::parent].
107015    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
107016        self.parent = v.into();
107017        self
107018    }
107019
107020    /// Sets the value of [page_size][crate::model::ListRagCorporaRequest::page_size].
107021    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
107022        self.page_size = v.into();
107023        self
107024    }
107025
107026    /// Sets the value of [page_token][crate::model::ListRagCorporaRequest::page_token].
107027    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
107028        self.page_token = v.into();
107029        self
107030    }
107031}
107032
107033#[cfg(feature = "vertex-rag-data-service")]
107034impl wkt::message::Message for ListRagCorporaRequest {
107035    fn typename() -> &'static str {
107036        "type.googleapis.com/google.cloud.aiplatform.v1.ListRagCorporaRequest"
107037    }
107038}
107039
107040/// Response message for
107041/// [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1.VertexRagDataService.ListRagCorpora].
107042///
107043/// [google.cloud.aiplatform.v1.VertexRagDataService.ListRagCorpora]: crate::client::VertexRagDataService::list_rag_corpora
107044#[cfg(feature = "vertex-rag-data-service")]
107045#[derive(Clone, Default, PartialEq)]
107046#[non_exhaustive]
107047pub struct ListRagCorporaResponse {
107048    /// List of RagCorpora in the requested page.
107049    pub rag_corpora: std::vec::Vec<crate::model::RagCorpus>,
107050
107051    /// A token to retrieve the next page of results.
107052    /// Pass to
107053    /// [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1.ListRagCorporaRequest.page_token]
107054    /// to obtain that page.
107055    ///
107056    /// [google.cloud.aiplatform.v1.ListRagCorporaRequest.page_token]: crate::model::ListRagCorporaRequest::page_token
107057    pub next_page_token: std::string::String,
107058
107059    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107060}
107061
107062#[cfg(feature = "vertex-rag-data-service")]
107063impl ListRagCorporaResponse {
107064    pub fn new() -> Self {
107065        std::default::Default::default()
107066    }
107067
107068    /// Sets the value of [rag_corpora][crate::model::ListRagCorporaResponse::rag_corpora].
107069    pub fn set_rag_corpora<T, V>(mut self, v: T) -> Self
107070    where
107071        T: std::iter::IntoIterator<Item = V>,
107072        V: std::convert::Into<crate::model::RagCorpus>,
107073    {
107074        use std::iter::Iterator;
107075        self.rag_corpora = v.into_iter().map(|i| i.into()).collect();
107076        self
107077    }
107078
107079    /// Sets the value of [next_page_token][crate::model::ListRagCorporaResponse::next_page_token].
107080    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
107081        self.next_page_token = v.into();
107082        self
107083    }
107084}
107085
107086#[cfg(feature = "vertex-rag-data-service")]
107087impl wkt::message::Message for ListRagCorporaResponse {
107088    fn typename() -> &'static str {
107089        "type.googleapis.com/google.cloud.aiplatform.v1.ListRagCorporaResponse"
107090    }
107091}
107092
107093#[cfg(feature = "vertex-rag-data-service")]
107094#[doc(hidden)]
107095impl gax::paginator::internal::PageableResponse for ListRagCorporaResponse {
107096    type PageItem = crate::model::RagCorpus;
107097
107098    fn items(self) -> std::vec::Vec<Self::PageItem> {
107099        self.rag_corpora
107100    }
107101
107102    fn next_page_token(&self) -> std::string::String {
107103        use std::clone::Clone;
107104        self.next_page_token.clone()
107105    }
107106}
107107
107108/// Request message for
107109/// [VertexRagDataService.DeleteRagCorpus][google.cloud.aiplatform.v1.VertexRagDataService.DeleteRagCorpus].
107110///
107111/// [google.cloud.aiplatform.v1.VertexRagDataService.DeleteRagCorpus]: crate::client::VertexRagDataService::delete_rag_corpus
107112#[cfg(feature = "vertex-rag-data-service")]
107113#[derive(Clone, Default, PartialEq)]
107114#[non_exhaustive]
107115pub struct DeleteRagCorpusRequest {
107116    /// Required. The name of the RagCorpus resource to be deleted.
107117    /// Format:
107118    /// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
107119    pub name: std::string::String,
107120
107121    /// Optional. If set to true, any RagFiles in this RagCorpus will also be
107122    /// deleted. Otherwise, the request will only work if the RagCorpus has no
107123    /// RagFiles.
107124    pub force: bool,
107125
107126    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107127}
107128
107129#[cfg(feature = "vertex-rag-data-service")]
107130impl DeleteRagCorpusRequest {
107131    pub fn new() -> Self {
107132        std::default::Default::default()
107133    }
107134
107135    /// Sets the value of [name][crate::model::DeleteRagCorpusRequest::name].
107136    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
107137        self.name = v.into();
107138        self
107139    }
107140
107141    /// Sets the value of [force][crate::model::DeleteRagCorpusRequest::force].
107142    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
107143        self.force = v.into();
107144        self
107145    }
107146}
107147
107148#[cfg(feature = "vertex-rag-data-service")]
107149impl wkt::message::Message for DeleteRagCorpusRequest {
107150    fn typename() -> &'static str {
107151        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteRagCorpusRequest"
107152    }
107153}
107154
107155/// Request message for
107156/// [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile].
107157///
107158/// [google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile]: crate::client::VertexRagDataService::upload_rag_file
107159#[cfg(feature = "vertex-rag-data-service")]
107160#[derive(Clone, Default, PartialEq)]
107161#[non_exhaustive]
107162pub struct UploadRagFileRequest {
107163    /// Required. The name of the RagCorpus resource into which to upload the file.
107164    /// Format:
107165    /// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
107166    pub parent: std::string::String,
107167
107168    /// Required. The RagFile to upload.
107169    pub rag_file: std::option::Option<crate::model::RagFile>,
107170
107171    /// Required. The config for the RagFiles to be uploaded into the RagCorpus.
107172    /// [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile].
107173    ///
107174    /// [google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile]: crate::client::VertexRagDataService::upload_rag_file
107175    pub upload_rag_file_config: std::option::Option<crate::model::UploadRagFileConfig>,
107176
107177    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107178}
107179
107180#[cfg(feature = "vertex-rag-data-service")]
107181impl UploadRagFileRequest {
107182    pub fn new() -> Self {
107183        std::default::Default::default()
107184    }
107185
107186    /// Sets the value of [parent][crate::model::UploadRagFileRequest::parent].
107187    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
107188        self.parent = v.into();
107189        self
107190    }
107191
107192    /// Sets the value of [rag_file][crate::model::UploadRagFileRequest::rag_file].
107193    pub fn set_rag_file<T>(mut self, v: T) -> Self
107194    where
107195        T: std::convert::Into<crate::model::RagFile>,
107196    {
107197        self.rag_file = std::option::Option::Some(v.into());
107198        self
107199    }
107200
107201    /// Sets or clears the value of [rag_file][crate::model::UploadRagFileRequest::rag_file].
107202    pub fn set_or_clear_rag_file<T>(mut self, v: std::option::Option<T>) -> Self
107203    where
107204        T: std::convert::Into<crate::model::RagFile>,
107205    {
107206        self.rag_file = v.map(|x| x.into());
107207        self
107208    }
107209
107210    /// Sets the value of [upload_rag_file_config][crate::model::UploadRagFileRequest::upload_rag_file_config].
107211    pub fn set_upload_rag_file_config<T>(mut self, v: T) -> Self
107212    where
107213        T: std::convert::Into<crate::model::UploadRagFileConfig>,
107214    {
107215        self.upload_rag_file_config = std::option::Option::Some(v.into());
107216        self
107217    }
107218
107219    /// Sets or clears the value of [upload_rag_file_config][crate::model::UploadRagFileRequest::upload_rag_file_config].
107220    pub fn set_or_clear_upload_rag_file_config<T>(mut self, v: std::option::Option<T>) -> Self
107221    where
107222        T: std::convert::Into<crate::model::UploadRagFileConfig>,
107223    {
107224        self.upload_rag_file_config = v.map(|x| x.into());
107225        self
107226    }
107227}
107228
107229#[cfg(feature = "vertex-rag-data-service")]
107230impl wkt::message::Message for UploadRagFileRequest {
107231    fn typename() -> &'static str {
107232        "type.googleapis.com/google.cloud.aiplatform.v1.UploadRagFileRequest"
107233    }
107234}
107235
107236/// Response message for
107237/// [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile].
107238///
107239/// [google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile]: crate::client::VertexRagDataService::upload_rag_file
107240#[cfg(feature = "vertex-rag-data-service")]
107241#[derive(Clone, Default, PartialEq)]
107242#[non_exhaustive]
107243pub struct UploadRagFileResponse {
107244    /// The result of the upload.
107245    pub result: std::option::Option<crate::model::upload_rag_file_response::Result>,
107246
107247    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107248}
107249
107250#[cfg(feature = "vertex-rag-data-service")]
107251impl UploadRagFileResponse {
107252    pub fn new() -> Self {
107253        std::default::Default::default()
107254    }
107255
107256    /// Sets the value of [result][crate::model::UploadRagFileResponse::result].
107257    ///
107258    /// Note that all the setters affecting `result` are mutually
107259    /// exclusive.
107260    pub fn set_result<
107261        T: std::convert::Into<std::option::Option<crate::model::upload_rag_file_response::Result>>,
107262    >(
107263        mut self,
107264        v: T,
107265    ) -> Self {
107266        self.result = v.into();
107267        self
107268    }
107269
107270    /// The value of [result][crate::model::UploadRagFileResponse::result]
107271    /// if it holds a `RagFile`, `None` if the field is not set or
107272    /// holds a different branch.
107273    pub fn rag_file(&self) -> std::option::Option<&std::boxed::Box<crate::model::RagFile>> {
107274        #[allow(unreachable_patterns)]
107275        self.result.as_ref().and_then(|v| match v {
107276            crate::model::upload_rag_file_response::Result::RagFile(v) => {
107277                std::option::Option::Some(v)
107278            }
107279            _ => std::option::Option::None,
107280        })
107281    }
107282
107283    /// Sets the value of [result][crate::model::UploadRagFileResponse::result]
107284    /// to hold a `RagFile`.
107285    ///
107286    /// Note that all the setters affecting `result` are
107287    /// mutually exclusive.
107288    pub fn set_rag_file<T: std::convert::Into<std::boxed::Box<crate::model::RagFile>>>(
107289        mut self,
107290        v: T,
107291    ) -> Self {
107292        self.result = std::option::Option::Some(
107293            crate::model::upload_rag_file_response::Result::RagFile(v.into()),
107294        );
107295        self
107296    }
107297
107298    /// The value of [result][crate::model::UploadRagFileResponse::result]
107299    /// if it holds a `Error`, `None` if the field is not set or
107300    /// holds a different branch.
107301    pub fn error(&self) -> std::option::Option<&std::boxed::Box<rpc::model::Status>> {
107302        #[allow(unreachable_patterns)]
107303        self.result.as_ref().and_then(|v| match v {
107304            crate::model::upload_rag_file_response::Result::Error(v) => {
107305                std::option::Option::Some(v)
107306            }
107307            _ => std::option::Option::None,
107308        })
107309    }
107310
107311    /// Sets the value of [result][crate::model::UploadRagFileResponse::result]
107312    /// to hold a `Error`.
107313    ///
107314    /// Note that all the setters affecting `result` are
107315    /// mutually exclusive.
107316    pub fn set_error<T: std::convert::Into<std::boxed::Box<rpc::model::Status>>>(
107317        mut self,
107318        v: T,
107319    ) -> Self {
107320        self.result = std::option::Option::Some(
107321            crate::model::upload_rag_file_response::Result::Error(v.into()),
107322        );
107323        self
107324    }
107325}
107326
107327#[cfg(feature = "vertex-rag-data-service")]
107328impl wkt::message::Message for UploadRagFileResponse {
107329    fn typename() -> &'static str {
107330        "type.googleapis.com/google.cloud.aiplatform.v1.UploadRagFileResponse"
107331    }
107332}
107333
107334/// Defines additional types related to [UploadRagFileResponse].
107335#[cfg(feature = "vertex-rag-data-service")]
107336pub mod upload_rag_file_response {
107337    #[allow(unused_imports)]
107338    use super::*;
107339
107340    /// The result of the upload.
107341    #[cfg(feature = "vertex-rag-data-service")]
107342    #[derive(Clone, Debug, PartialEq)]
107343    #[non_exhaustive]
107344    pub enum Result {
107345        /// The RagFile that had been uploaded into the RagCorpus.
107346        RagFile(std::boxed::Box<crate::model::RagFile>),
107347        /// The error that occurred while processing the RagFile.
107348        Error(std::boxed::Box<rpc::model::Status>),
107349    }
107350}
107351
107352/// Request message for
107353/// [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles].
107354///
107355/// [google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles]: crate::client::VertexRagDataService::import_rag_files
107356#[cfg(feature = "vertex-rag-data-service")]
107357#[derive(Clone, Default, PartialEq)]
107358#[non_exhaustive]
107359pub struct ImportRagFilesRequest {
107360    /// Required. The name of the RagCorpus resource into which to import files.
107361    /// Format:
107362    /// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
107363    pub parent: std::string::String,
107364
107365    /// Required. The config for the RagFiles to be synced and imported into the
107366    /// RagCorpus.
107367    /// [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles].
107368    ///
107369    /// [google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles]: crate::client::VertexRagDataService::import_rag_files
107370    pub import_rag_files_config: std::option::Option<crate::model::ImportRagFilesConfig>,
107371
107372    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107373}
107374
107375#[cfg(feature = "vertex-rag-data-service")]
107376impl ImportRagFilesRequest {
107377    pub fn new() -> Self {
107378        std::default::Default::default()
107379    }
107380
107381    /// Sets the value of [parent][crate::model::ImportRagFilesRequest::parent].
107382    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
107383        self.parent = v.into();
107384        self
107385    }
107386
107387    /// Sets the value of [import_rag_files_config][crate::model::ImportRagFilesRequest::import_rag_files_config].
107388    pub fn set_import_rag_files_config<T>(mut self, v: T) -> Self
107389    where
107390        T: std::convert::Into<crate::model::ImportRagFilesConfig>,
107391    {
107392        self.import_rag_files_config = std::option::Option::Some(v.into());
107393        self
107394    }
107395
107396    /// Sets or clears the value of [import_rag_files_config][crate::model::ImportRagFilesRequest::import_rag_files_config].
107397    pub fn set_or_clear_import_rag_files_config<T>(mut self, v: std::option::Option<T>) -> Self
107398    where
107399        T: std::convert::Into<crate::model::ImportRagFilesConfig>,
107400    {
107401        self.import_rag_files_config = v.map(|x| x.into());
107402        self
107403    }
107404}
107405
107406#[cfg(feature = "vertex-rag-data-service")]
107407impl wkt::message::Message for ImportRagFilesRequest {
107408    fn typename() -> &'static str {
107409        "type.googleapis.com/google.cloud.aiplatform.v1.ImportRagFilesRequest"
107410    }
107411}
107412
107413/// Response message for
107414/// [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles].
107415///
107416/// [google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles]: crate::client::VertexRagDataService::import_rag_files
107417#[cfg(feature = "vertex-rag-data-service")]
107418#[derive(Clone, Default, PartialEq)]
107419#[non_exhaustive]
107420pub struct ImportRagFilesResponse {
107421    /// The number of RagFiles that had been imported into the RagCorpus.
107422    pub imported_rag_files_count: i64,
107423
107424    /// The number of RagFiles that had failed while importing into the RagCorpus.
107425    pub failed_rag_files_count: i64,
107426
107427    /// The number of RagFiles that was skipped while importing into the RagCorpus.
107428    pub skipped_rag_files_count: i64,
107429
107430    /// The location into which the partial failures were written.
107431    pub partial_failure_sink:
107432        std::option::Option<crate::model::import_rag_files_response::PartialFailureSink>,
107433
107434    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107435}
107436
107437#[cfg(feature = "vertex-rag-data-service")]
107438impl ImportRagFilesResponse {
107439    pub fn new() -> Self {
107440        std::default::Default::default()
107441    }
107442
107443    /// Sets the value of [imported_rag_files_count][crate::model::ImportRagFilesResponse::imported_rag_files_count].
107444    pub fn set_imported_rag_files_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
107445        self.imported_rag_files_count = v.into();
107446        self
107447    }
107448
107449    /// Sets the value of [failed_rag_files_count][crate::model::ImportRagFilesResponse::failed_rag_files_count].
107450    pub fn set_failed_rag_files_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
107451        self.failed_rag_files_count = v.into();
107452        self
107453    }
107454
107455    /// Sets the value of [skipped_rag_files_count][crate::model::ImportRagFilesResponse::skipped_rag_files_count].
107456    pub fn set_skipped_rag_files_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
107457        self.skipped_rag_files_count = v.into();
107458        self
107459    }
107460
107461    /// Sets the value of [partial_failure_sink][crate::model::ImportRagFilesResponse::partial_failure_sink].
107462    ///
107463    /// Note that all the setters affecting `partial_failure_sink` are mutually
107464    /// exclusive.
107465    pub fn set_partial_failure_sink<
107466        T: std::convert::Into<
107467                std::option::Option<crate::model::import_rag_files_response::PartialFailureSink>,
107468            >,
107469    >(
107470        mut self,
107471        v: T,
107472    ) -> Self {
107473        self.partial_failure_sink = v.into();
107474        self
107475    }
107476
107477    /// The value of [partial_failure_sink][crate::model::ImportRagFilesResponse::partial_failure_sink]
107478    /// if it holds a `PartialFailuresGcsPath`, `None` if the field is not set or
107479    /// holds a different branch.
107480    pub fn partial_failures_gcs_path(&self) -> std::option::Option<&std::string::String> {
107481        #[allow(unreachable_patterns)]
107482        self.partial_failure_sink.as_ref().and_then(|v| match v {
107483            crate::model::import_rag_files_response::PartialFailureSink::PartialFailuresGcsPath(
107484                v,
107485            ) => std::option::Option::Some(v),
107486            _ => std::option::Option::None,
107487        })
107488    }
107489
107490    /// Sets the value of [partial_failure_sink][crate::model::ImportRagFilesResponse::partial_failure_sink]
107491    /// to hold a `PartialFailuresGcsPath`.
107492    ///
107493    /// Note that all the setters affecting `partial_failure_sink` are
107494    /// mutually exclusive.
107495    pub fn set_partial_failures_gcs_path<T: std::convert::Into<std::string::String>>(
107496        mut self,
107497        v: T,
107498    ) -> Self {
107499        self.partial_failure_sink = std::option::Option::Some(
107500            crate::model::import_rag_files_response::PartialFailureSink::PartialFailuresGcsPath(
107501                v.into(),
107502            ),
107503        );
107504        self
107505    }
107506
107507    /// The value of [partial_failure_sink][crate::model::ImportRagFilesResponse::partial_failure_sink]
107508    /// if it holds a `PartialFailuresBigqueryTable`, `None` if the field is not set or
107509    /// holds a different branch.
107510    pub fn partial_failures_bigquery_table(&self) -> std::option::Option<&std::string::String> {
107511        #[allow(unreachable_patterns)]
107512        self.partial_failure_sink.as_ref().and_then(|v| match v {
107513            crate::model::import_rag_files_response::PartialFailureSink::PartialFailuresBigqueryTable(v) => std::option::Option::Some(v),
107514            _ => std::option::Option::None,
107515        })
107516    }
107517
107518    /// Sets the value of [partial_failure_sink][crate::model::ImportRagFilesResponse::partial_failure_sink]
107519    /// to hold a `PartialFailuresBigqueryTable`.
107520    ///
107521    /// Note that all the setters affecting `partial_failure_sink` are
107522    /// mutually exclusive.
107523    pub fn set_partial_failures_bigquery_table<T: std::convert::Into<std::string::String>>(
107524        mut self,
107525        v: T,
107526    ) -> Self {
107527        self.partial_failure_sink = std::option::Option::Some(
107528            crate::model::import_rag_files_response::PartialFailureSink::PartialFailuresBigqueryTable(
107529                v.into()
107530            )
107531        );
107532        self
107533    }
107534}
107535
107536#[cfg(feature = "vertex-rag-data-service")]
107537impl wkt::message::Message for ImportRagFilesResponse {
107538    fn typename() -> &'static str {
107539        "type.googleapis.com/google.cloud.aiplatform.v1.ImportRagFilesResponse"
107540    }
107541}
107542
107543/// Defines additional types related to [ImportRagFilesResponse].
107544#[cfg(feature = "vertex-rag-data-service")]
107545pub mod import_rag_files_response {
107546    #[allow(unused_imports)]
107547    use super::*;
107548
107549    /// The location into which the partial failures were written.
107550    #[cfg(feature = "vertex-rag-data-service")]
107551    #[derive(Clone, Debug, PartialEq)]
107552    #[non_exhaustive]
107553    pub enum PartialFailureSink {
107554        /// The Google Cloud Storage path into which the partial failures were
107555        /// written.
107556        PartialFailuresGcsPath(std::string::String),
107557        /// The BigQuery table into which the partial failures were written.
107558        PartialFailuresBigqueryTable(std::string::String),
107559    }
107560}
107561
107562/// Request message for
107563/// [VertexRagDataService.GetRagFile][google.cloud.aiplatform.v1.VertexRagDataService.GetRagFile]
107564///
107565/// [google.cloud.aiplatform.v1.VertexRagDataService.GetRagFile]: crate::client::VertexRagDataService::get_rag_file
107566#[cfg(feature = "vertex-rag-data-service")]
107567#[derive(Clone, Default, PartialEq)]
107568#[non_exhaustive]
107569pub struct GetRagFileRequest {
107570    /// Required. The name of the RagFile resource.
107571    /// Format:
107572    /// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
107573    pub name: std::string::String,
107574
107575    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107576}
107577
107578#[cfg(feature = "vertex-rag-data-service")]
107579impl GetRagFileRequest {
107580    pub fn new() -> Self {
107581        std::default::Default::default()
107582    }
107583
107584    /// Sets the value of [name][crate::model::GetRagFileRequest::name].
107585    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
107586        self.name = v.into();
107587        self
107588    }
107589}
107590
107591#[cfg(feature = "vertex-rag-data-service")]
107592impl wkt::message::Message for GetRagFileRequest {
107593    fn typename() -> &'static str {
107594        "type.googleapis.com/google.cloud.aiplatform.v1.GetRagFileRequest"
107595    }
107596}
107597
107598/// Request message for
107599/// [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ListRagFiles].
107600///
107601/// [google.cloud.aiplatform.v1.VertexRagDataService.ListRagFiles]: crate::client::VertexRagDataService::list_rag_files
107602#[cfg(feature = "vertex-rag-data-service")]
107603#[derive(Clone, Default, PartialEq)]
107604#[non_exhaustive]
107605pub struct ListRagFilesRequest {
107606    /// Required. The resource name of the RagCorpus from which to list the
107607    /// RagFiles. Format:
107608    /// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
107609    pub parent: std::string::String,
107610
107611    /// Optional. The standard list page size.
107612    pub page_size: i32,
107613
107614    /// Optional. The standard list page token.
107615    /// Typically obtained via
107616    /// [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1.ListRagFilesResponse.next_page_token]
107617    /// of the previous
107618    /// [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ListRagFiles]
107619    /// call.
107620    ///
107621    /// [google.cloud.aiplatform.v1.ListRagFilesResponse.next_page_token]: crate::model::ListRagFilesResponse::next_page_token
107622    /// [google.cloud.aiplatform.v1.VertexRagDataService.ListRagFiles]: crate::client::VertexRagDataService::list_rag_files
107623    pub page_token: std::string::String,
107624
107625    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107626}
107627
107628#[cfg(feature = "vertex-rag-data-service")]
107629impl ListRagFilesRequest {
107630    pub fn new() -> Self {
107631        std::default::Default::default()
107632    }
107633
107634    /// Sets the value of [parent][crate::model::ListRagFilesRequest::parent].
107635    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
107636        self.parent = v.into();
107637        self
107638    }
107639
107640    /// Sets the value of [page_size][crate::model::ListRagFilesRequest::page_size].
107641    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
107642        self.page_size = v.into();
107643        self
107644    }
107645
107646    /// Sets the value of [page_token][crate::model::ListRagFilesRequest::page_token].
107647    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
107648        self.page_token = v.into();
107649        self
107650    }
107651}
107652
107653#[cfg(feature = "vertex-rag-data-service")]
107654impl wkt::message::Message for ListRagFilesRequest {
107655    fn typename() -> &'static str {
107656        "type.googleapis.com/google.cloud.aiplatform.v1.ListRagFilesRequest"
107657    }
107658}
107659
107660/// Response message for
107661/// [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ListRagFiles].
107662///
107663/// [google.cloud.aiplatform.v1.VertexRagDataService.ListRagFiles]: crate::client::VertexRagDataService::list_rag_files
107664#[cfg(feature = "vertex-rag-data-service")]
107665#[derive(Clone, Default, PartialEq)]
107666#[non_exhaustive]
107667pub struct ListRagFilesResponse {
107668    /// List of RagFiles in the requested page.
107669    pub rag_files: std::vec::Vec<crate::model::RagFile>,
107670
107671    /// A token to retrieve the next page of results.
107672    /// Pass to
107673    /// [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1.ListRagFilesRequest.page_token]
107674    /// to obtain that page.
107675    ///
107676    /// [google.cloud.aiplatform.v1.ListRagFilesRequest.page_token]: crate::model::ListRagFilesRequest::page_token
107677    pub next_page_token: std::string::String,
107678
107679    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107680}
107681
107682#[cfg(feature = "vertex-rag-data-service")]
107683impl ListRagFilesResponse {
107684    pub fn new() -> Self {
107685        std::default::Default::default()
107686    }
107687
107688    /// Sets the value of [rag_files][crate::model::ListRagFilesResponse::rag_files].
107689    pub fn set_rag_files<T, V>(mut self, v: T) -> Self
107690    where
107691        T: std::iter::IntoIterator<Item = V>,
107692        V: std::convert::Into<crate::model::RagFile>,
107693    {
107694        use std::iter::Iterator;
107695        self.rag_files = v.into_iter().map(|i| i.into()).collect();
107696        self
107697    }
107698
107699    /// Sets the value of [next_page_token][crate::model::ListRagFilesResponse::next_page_token].
107700    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
107701        self.next_page_token = v.into();
107702        self
107703    }
107704}
107705
107706#[cfg(feature = "vertex-rag-data-service")]
107707impl wkt::message::Message for ListRagFilesResponse {
107708    fn typename() -> &'static str {
107709        "type.googleapis.com/google.cloud.aiplatform.v1.ListRagFilesResponse"
107710    }
107711}
107712
107713#[cfg(feature = "vertex-rag-data-service")]
107714#[doc(hidden)]
107715impl gax::paginator::internal::PageableResponse for ListRagFilesResponse {
107716    type PageItem = crate::model::RagFile;
107717
107718    fn items(self) -> std::vec::Vec<Self::PageItem> {
107719        self.rag_files
107720    }
107721
107722    fn next_page_token(&self) -> std::string::String {
107723        use std::clone::Clone;
107724        self.next_page_token.clone()
107725    }
107726}
107727
107728/// Request message for
107729/// [VertexRagDataService.DeleteRagFile][google.cloud.aiplatform.v1.VertexRagDataService.DeleteRagFile].
107730///
107731/// [google.cloud.aiplatform.v1.VertexRagDataService.DeleteRagFile]: crate::client::VertexRagDataService::delete_rag_file
107732#[cfg(feature = "vertex-rag-data-service")]
107733#[derive(Clone, Default, PartialEq)]
107734#[non_exhaustive]
107735pub struct DeleteRagFileRequest {
107736    /// Required. The name of the RagFile resource to be deleted.
107737    /// Format:
107738    /// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
107739    pub name: std::string::String,
107740
107741    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107742}
107743
107744#[cfg(feature = "vertex-rag-data-service")]
107745impl DeleteRagFileRequest {
107746    pub fn new() -> Self {
107747        std::default::Default::default()
107748    }
107749
107750    /// Sets the value of [name][crate::model::DeleteRagFileRequest::name].
107751    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
107752        self.name = v.into();
107753        self
107754    }
107755}
107756
107757#[cfg(feature = "vertex-rag-data-service")]
107758impl wkt::message::Message for DeleteRagFileRequest {
107759    fn typename() -> &'static str {
107760        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteRagFileRequest"
107761    }
107762}
107763
107764/// Runtime operation information for
107765/// [VertexRagDataService.CreateRagCorpus][google.cloud.aiplatform.v1.VertexRagDataService.CreateRagCorpus].
107766///
107767/// [google.cloud.aiplatform.v1.VertexRagDataService.CreateRagCorpus]: crate::client::VertexRagDataService::create_rag_corpus
107768#[cfg(feature = "vertex-rag-data-service")]
107769#[derive(Clone, Default, PartialEq)]
107770#[non_exhaustive]
107771pub struct CreateRagCorpusOperationMetadata {
107772    /// The operation generic information.
107773    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
107774
107775    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107776}
107777
107778#[cfg(feature = "vertex-rag-data-service")]
107779impl CreateRagCorpusOperationMetadata {
107780    pub fn new() -> Self {
107781        std::default::Default::default()
107782    }
107783
107784    /// Sets the value of [generic_metadata][crate::model::CreateRagCorpusOperationMetadata::generic_metadata].
107785    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
107786    where
107787        T: std::convert::Into<crate::model::GenericOperationMetadata>,
107788    {
107789        self.generic_metadata = std::option::Option::Some(v.into());
107790        self
107791    }
107792
107793    /// Sets or clears the value of [generic_metadata][crate::model::CreateRagCorpusOperationMetadata::generic_metadata].
107794    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
107795    where
107796        T: std::convert::Into<crate::model::GenericOperationMetadata>,
107797    {
107798        self.generic_metadata = v.map(|x| x.into());
107799        self
107800    }
107801}
107802
107803#[cfg(feature = "vertex-rag-data-service")]
107804impl wkt::message::Message for CreateRagCorpusOperationMetadata {
107805    fn typename() -> &'static str {
107806        "type.googleapis.com/google.cloud.aiplatform.v1.CreateRagCorpusOperationMetadata"
107807    }
107808}
107809
107810/// Request message for
107811/// [VertexRagDataService.GetRagEngineConfig][google.cloud.aiplatform.v1.VertexRagDataService.GetRagEngineConfig]
107812///
107813/// [google.cloud.aiplatform.v1.VertexRagDataService.GetRagEngineConfig]: crate::client::VertexRagDataService::get_rag_engine_config
107814#[cfg(feature = "vertex-rag-data-service")]
107815#[derive(Clone, Default, PartialEq)]
107816#[non_exhaustive]
107817pub struct GetRagEngineConfigRequest {
107818    /// Required. The name of the RagEngineConfig resource.
107819    /// Format:
107820    /// `projects/{project}/locations/{location}/ragEngineConfig`
107821    pub name: std::string::String,
107822
107823    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107824}
107825
107826#[cfg(feature = "vertex-rag-data-service")]
107827impl GetRagEngineConfigRequest {
107828    pub fn new() -> Self {
107829        std::default::Default::default()
107830    }
107831
107832    /// Sets the value of [name][crate::model::GetRagEngineConfigRequest::name].
107833    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
107834        self.name = v.into();
107835        self
107836    }
107837}
107838
107839#[cfg(feature = "vertex-rag-data-service")]
107840impl wkt::message::Message for GetRagEngineConfigRequest {
107841    fn typename() -> &'static str {
107842        "type.googleapis.com/google.cloud.aiplatform.v1.GetRagEngineConfigRequest"
107843    }
107844}
107845
107846/// Request message for
107847/// [VertexRagDataService.UpdateRagCorpus][google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagCorpus].
107848///
107849/// [google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagCorpus]: crate::client::VertexRagDataService::update_rag_corpus
107850#[cfg(feature = "vertex-rag-data-service")]
107851#[derive(Clone, Default, PartialEq)]
107852#[non_exhaustive]
107853pub struct UpdateRagCorpusRequest {
107854    /// Required. The RagCorpus which replaces the resource on the server.
107855    pub rag_corpus: std::option::Option<crate::model::RagCorpus>,
107856
107857    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107858}
107859
107860#[cfg(feature = "vertex-rag-data-service")]
107861impl UpdateRagCorpusRequest {
107862    pub fn new() -> Self {
107863        std::default::Default::default()
107864    }
107865
107866    /// Sets the value of [rag_corpus][crate::model::UpdateRagCorpusRequest::rag_corpus].
107867    pub fn set_rag_corpus<T>(mut self, v: T) -> Self
107868    where
107869        T: std::convert::Into<crate::model::RagCorpus>,
107870    {
107871        self.rag_corpus = std::option::Option::Some(v.into());
107872        self
107873    }
107874
107875    /// Sets or clears the value of [rag_corpus][crate::model::UpdateRagCorpusRequest::rag_corpus].
107876    pub fn set_or_clear_rag_corpus<T>(mut self, v: std::option::Option<T>) -> Self
107877    where
107878        T: std::convert::Into<crate::model::RagCorpus>,
107879    {
107880        self.rag_corpus = v.map(|x| x.into());
107881        self
107882    }
107883}
107884
107885#[cfg(feature = "vertex-rag-data-service")]
107886impl wkt::message::Message for UpdateRagCorpusRequest {
107887    fn typename() -> &'static str {
107888        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateRagCorpusRequest"
107889    }
107890}
107891
107892/// Runtime operation information for
107893/// [VertexRagDataService.UpdateRagCorpus][google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagCorpus].
107894///
107895/// [google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagCorpus]: crate::client::VertexRagDataService::update_rag_corpus
107896#[cfg(feature = "vertex-rag-data-service")]
107897#[derive(Clone, Default, PartialEq)]
107898#[non_exhaustive]
107899pub struct UpdateRagCorpusOperationMetadata {
107900    /// The operation generic information.
107901    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
107902
107903    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107904}
107905
107906#[cfg(feature = "vertex-rag-data-service")]
107907impl UpdateRagCorpusOperationMetadata {
107908    pub fn new() -> Self {
107909        std::default::Default::default()
107910    }
107911
107912    /// Sets the value of [generic_metadata][crate::model::UpdateRagCorpusOperationMetadata::generic_metadata].
107913    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
107914    where
107915        T: std::convert::Into<crate::model::GenericOperationMetadata>,
107916    {
107917        self.generic_metadata = std::option::Option::Some(v.into());
107918        self
107919    }
107920
107921    /// Sets or clears the value of [generic_metadata][crate::model::UpdateRagCorpusOperationMetadata::generic_metadata].
107922    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
107923    where
107924        T: std::convert::Into<crate::model::GenericOperationMetadata>,
107925    {
107926        self.generic_metadata = v.map(|x| x.into());
107927        self
107928    }
107929}
107930
107931#[cfg(feature = "vertex-rag-data-service")]
107932impl wkt::message::Message for UpdateRagCorpusOperationMetadata {
107933    fn typename() -> &'static str {
107934        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateRagCorpusOperationMetadata"
107935    }
107936}
107937
107938/// Runtime operation information for
107939/// [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles].
107940///
107941/// [google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles]: crate::client::VertexRagDataService::import_rag_files
107942#[cfg(feature = "vertex-rag-data-service")]
107943#[derive(Clone, Default, PartialEq)]
107944#[non_exhaustive]
107945pub struct ImportRagFilesOperationMetadata {
107946    /// The operation generic information.
107947    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
107948
107949    /// The resource ID of RagCorpus that this operation is executed on.
107950    pub rag_corpus_id: i64,
107951
107952    /// Output only. The config that was passed in the ImportRagFilesRequest.
107953    pub import_rag_files_config: std::option::Option<crate::model::ImportRagFilesConfig>,
107954
107955    /// The progress percentage of the operation. Value is in the range [0, 100].
107956    /// This percentage is calculated as follows:
107957    /// progress_percentage = 100 * (successes + failures + skips) / total
107958    pub progress_percentage: i32,
107959
107960    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
107961}
107962
107963#[cfg(feature = "vertex-rag-data-service")]
107964impl ImportRagFilesOperationMetadata {
107965    pub fn new() -> Self {
107966        std::default::Default::default()
107967    }
107968
107969    /// Sets the value of [generic_metadata][crate::model::ImportRagFilesOperationMetadata::generic_metadata].
107970    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
107971    where
107972        T: std::convert::Into<crate::model::GenericOperationMetadata>,
107973    {
107974        self.generic_metadata = std::option::Option::Some(v.into());
107975        self
107976    }
107977
107978    /// Sets or clears the value of [generic_metadata][crate::model::ImportRagFilesOperationMetadata::generic_metadata].
107979    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
107980    where
107981        T: std::convert::Into<crate::model::GenericOperationMetadata>,
107982    {
107983        self.generic_metadata = v.map(|x| x.into());
107984        self
107985    }
107986
107987    /// Sets the value of [rag_corpus_id][crate::model::ImportRagFilesOperationMetadata::rag_corpus_id].
107988    pub fn set_rag_corpus_id<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
107989        self.rag_corpus_id = v.into();
107990        self
107991    }
107992
107993    /// Sets the value of [import_rag_files_config][crate::model::ImportRagFilesOperationMetadata::import_rag_files_config].
107994    pub fn set_import_rag_files_config<T>(mut self, v: T) -> Self
107995    where
107996        T: std::convert::Into<crate::model::ImportRagFilesConfig>,
107997    {
107998        self.import_rag_files_config = std::option::Option::Some(v.into());
107999        self
108000    }
108001
108002    /// Sets or clears the value of [import_rag_files_config][crate::model::ImportRagFilesOperationMetadata::import_rag_files_config].
108003    pub fn set_or_clear_import_rag_files_config<T>(mut self, v: std::option::Option<T>) -> Self
108004    where
108005        T: std::convert::Into<crate::model::ImportRagFilesConfig>,
108006    {
108007        self.import_rag_files_config = v.map(|x| x.into());
108008        self
108009    }
108010
108011    /// Sets the value of [progress_percentage][crate::model::ImportRagFilesOperationMetadata::progress_percentage].
108012    pub fn set_progress_percentage<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
108013        self.progress_percentage = v.into();
108014        self
108015    }
108016}
108017
108018#[cfg(feature = "vertex-rag-data-service")]
108019impl wkt::message::Message for ImportRagFilesOperationMetadata {
108020    fn typename() -> &'static str {
108021        "type.googleapis.com/google.cloud.aiplatform.v1.ImportRagFilesOperationMetadata"
108022    }
108023}
108024
108025/// Request message for
108026/// [VertexRagDataService.UpdateRagEngineConfig][google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagEngineConfig].
108027///
108028/// [google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagEngineConfig]: crate::client::VertexRagDataService::update_rag_engine_config
108029#[cfg(feature = "vertex-rag-data-service")]
108030#[derive(Clone, Default, PartialEq)]
108031#[non_exhaustive]
108032pub struct UpdateRagEngineConfigRequest {
108033    /// Required. The updated RagEngineConfig.
108034    ///
108035    /// NOTE: Downgrading your RagManagedDb's ComputeTier could temporarily
108036    /// increase request latencies until the operation is fully complete.
108037    pub rag_engine_config: std::option::Option<crate::model::RagEngineConfig>,
108038
108039    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
108040}
108041
108042#[cfg(feature = "vertex-rag-data-service")]
108043impl UpdateRagEngineConfigRequest {
108044    pub fn new() -> Self {
108045        std::default::Default::default()
108046    }
108047
108048    /// Sets the value of [rag_engine_config][crate::model::UpdateRagEngineConfigRequest::rag_engine_config].
108049    pub fn set_rag_engine_config<T>(mut self, v: T) -> Self
108050    where
108051        T: std::convert::Into<crate::model::RagEngineConfig>,
108052    {
108053        self.rag_engine_config = std::option::Option::Some(v.into());
108054        self
108055    }
108056
108057    /// Sets or clears the value of [rag_engine_config][crate::model::UpdateRagEngineConfigRequest::rag_engine_config].
108058    pub fn set_or_clear_rag_engine_config<T>(mut self, v: std::option::Option<T>) -> Self
108059    where
108060        T: std::convert::Into<crate::model::RagEngineConfig>,
108061    {
108062        self.rag_engine_config = v.map(|x| x.into());
108063        self
108064    }
108065}
108066
108067#[cfg(feature = "vertex-rag-data-service")]
108068impl wkt::message::Message for UpdateRagEngineConfigRequest {
108069    fn typename() -> &'static str {
108070        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateRagEngineConfigRequest"
108071    }
108072}
108073
108074/// Runtime operation information for
108075/// [VertexRagDataService.UpdateRagEngineConfig][google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagEngineConfig].
108076///
108077/// [google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagEngineConfig]: crate::client::VertexRagDataService::update_rag_engine_config
108078#[cfg(feature = "vertex-rag-data-service")]
108079#[derive(Clone, Default, PartialEq)]
108080#[non_exhaustive]
108081pub struct UpdateRagEngineConfigOperationMetadata {
108082    /// The operation generic information.
108083    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
108084
108085    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
108086}
108087
108088#[cfg(feature = "vertex-rag-data-service")]
108089impl UpdateRagEngineConfigOperationMetadata {
108090    pub fn new() -> Self {
108091        std::default::Default::default()
108092    }
108093
108094    /// Sets the value of [generic_metadata][crate::model::UpdateRagEngineConfigOperationMetadata::generic_metadata].
108095    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
108096    where
108097        T: std::convert::Into<crate::model::GenericOperationMetadata>,
108098    {
108099        self.generic_metadata = std::option::Option::Some(v.into());
108100        self
108101    }
108102
108103    /// Sets or clears the value of [generic_metadata][crate::model::UpdateRagEngineConfigOperationMetadata::generic_metadata].
108104    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
108105    where
108106        T: std::convert::Into<crate::model::GenericOperationMetadata>,
108107    {
108108        self.generic_metadata = v.map(|x| x.into());
108109        self
108110    }
108111}
108112
108113#[cfg(feature = "vertex-rag-data-service")]
108114impl wkt::message::Message for UpdateRagEngineConfigOperationMetadata {
108115    fn typename() -> &'static str {
108116        "type.googleapis.com/google.cloud.aiplatform.v1.UpdateRagEngineConfigOperationMetadata"
108117    }
108118}
108119
108120/// A query to retrieve relevant contexts.
108121#[cfg(feature = "vertex-rag-service")]
108122#[derive(Clone, Default, PartialEq)]
108123#[non_exhaustive]
108124pub struct RagQuery {
108125    /// Optional. The retrieval config for the query.
108126    pub rag_retrieval_config: std::option::Option<crate::model::RagRetrievalConfig>,
108127
108128    /// The query to retrieve contexts.
108129    /// Currently only text query is supported.
108130    pub query: std::option::Option<crate::model::rag_query::Query>,
108131
108132    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
108133}
108134
108135#[cfg(feature = "vertex-rag-service")]
108136impl RagQuery {
108137    pub fn new() -> Self {
108138        std::default::Default::default()
108139    }
108140
108141    /// Sets the value of [rag_retrieval_config][crate::model::RagQuery::rag_retrieval_config].
108142    pub fn set_rag_retrieval_config<T>(mut self, v: T) -> Self
108143    where
108144        T: std::convert::Into<crate::model::RagRetrievalConfig>,
108145    {
108146        self.rag_retrieval_config = std::option::Option::Some(v.into());
108147        self
108148    }
108149
108150    /// Sets or clears the value of [rag_retrieval_config][crate::model::RagQuery::rag_retrieval_config].
108151    pub fn set_or_clear_rag_retrieval_config<T>(mut self, v: std::option::Option<T>) -> Self
108152    where
108153        T: std::convert::Into<crate::model::RagRetrievalConfig>,
108154    {
108155        self.rag_retrieval_config = v.map(|x| x.into());
108156        self
108157    }
108158
108159    /// Sets the value of [query][crate::model::RagQuery::query].
108160    ///
108161    /// Note that all the setters affecting `query` are mutually
108162    /// exclusive.
108163    pub fn set_query<T: std::convert::Into<std::option::Option<crate::model::rag_query::Query>>>(
108164        mut self,
108165        v: T,
108166    ) -> Self {
108167        self.query = v.into();
108168        self
108169    }
108170
108171    /// The value of [query][crate::model::RagQuery::query]
108172    /// if it holds a `Text`, `None` if the field is not set or
108173    /// holds a different branch.
108174    pub fn text(&self) -> std::option::Option<&std::string::String> {
108175        #[allow(unreachable_patterns)]
108176        self.query.as_ref().and_then(|v| match v {
108177            crate::model::rag_query::Query::Text(v) => std::option::Option::Some(v),
108178            _ => std::option::Option::None,
108179        })
108180    }
108181
108182    /// Sets the value of [query][crate::model::RagQuery::query]
108183    /// to hold a `Text`.
108184    ///
108185    /// Note that all the setters affecting `query` are
108186    /// mutually exclusive.
108187    pub fn set_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
108188        self.query = std::option::Option::Some(crate::model::rag_query::Query::Text(v.into()));
108189        self
108190    }
108191}
108192
108193#[cfg(feature = "vertex-rag-service")]
108194impl wkt::message::Message for RagQuery {
108195    fn typename() -> &'static str {
108196        "type.googleapis.com/google.cloud.aiplatform.v1.RagQuery"
108197    }
108198}
108199
108200/// Defines additional types related to [RagQuery].
108201#[cfg(feature = "vertex-rag-service")]
108202pub mod rag_query {
108203    #[allow(unused_imports)]
108204    use super::*;
108205
108206    /// The query to retrieve contexts.
108207    /// Currently only text query is supported.
108208    #[cfg(feature = "vertex-rag-service")]
108209    #[derive(Clone, Debug, PartialEq)]
108210    #[non_exhaustive]
108211    pub enum Query {
108212        /// Optional. The query in text format to get relevant contexts.
108213        Text(std::string::String),
108214    }
108215}
108216
108217/// Request message for
108218/// [VertexRagService.RetrieveContexts][google.cloud.aiplatform.v1.VertexRagService.RetrieveContexts].
108219///
108220/// [google.cloud.aiplatform.v1.VertexRagService.RetrieveContexts]: crate::client::VertexRagService::retrieve_contexts
108221#[cfg(feature = "vertex-rag-service")]
108222#[derive(Clone, Default, PartialEq)]
108223#[non_exhaustive]
108224pub struct RetrieveContextsRequest {
108225    /// Required. The resource name of the Location from which to retrieve
108226    /// RagContexts. The users must have permission to make a call in the project.
108227    /// Format:
108228    /// `projects/{project}/locations/{location}`.
108229    pub parent: std::string::String,
108230
108231    /// Required. Single RAG retrieve query.
108232    pub query: std::option::Option<crate::model::RagQuery>,
108233
108234    /// Data Source to retrieve contexts.
108235    pub data_source: std::option::Option<crate::model::retrieve_contexts_request::DataSource>,
108236
108237    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
108238}
108239
108240#[cfg(feature = "vertex-rag-service")]
108241impl RetrieveContextsRequest {
108242    pub fn new() -> Self {
108243        std::default::Default::default()
108244    }
108245
108246    /// Sets the value of [parent][crate::model::RetrieveContextsRequest::parent].
108247    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
108248        self.parent = v.into();
108249        self
108250    }
108251
108252    /// Sets the value of [query][crate::model::RetrieveContextsRequest::query].
108253    pub fn set_query<T>(mut self, v: T) -> Self
108254    where
108255        T: std::convert::Into<crate::model::RagQuery>,
108256    {
108257        self.query = std::option::Option::Some(v.into());
108258        self
108259    }
108260
108261    /// Sets or clears the value of [query][crate::model::RetrieveContextsRequest::query].
108262    pub fn set_or_clear_query<T>(mut self, v: std::option::Option<T>) -> Self
108263    where
108264        T: std::convert::Into<crate::model::RagQuery>,
108265    {
108266        self.query = v.map(|x| x.into());
108267        self
108268    }
108269
108270    /// Sets the value of [data_source][crate::model::RetrieveContextsRequest::data_source].
108271    ///
108272    /// Note that all the setters affecting `data_source` are mutually
108273    /// exclusive.
108274    pub fn set_data_source<
108275        T: std::convert::Into<
108276                std::option::Option<crate::model::retrieve_contexts_request::DataSource>,
108277            >,
108278    >(
108279        mut self,
108280        v: T,
108281    ) -> Self {
108282        self.data_source = v.into();
108283        self
108284    }
108285
108286    /// The value of [data_source][crate::model::RetrieveContextsRequest::data_source]
108287    /// if it holds a `VertexRagStore`, `None` if the field is not set or
108288    /// holds a different branch.
108289    pub fn vertex_rag_store(
108290        &self,
108291    ) -> std::option::Option<
108292        &std::boxed::Box<crate::model::retrieve_contexts_request::VertexRagStore>,
108293    > {
108294        #[allow(unreachable_patterns)]
108295        self.data_source.as_ref().and_then(|v| match v {
108296            crate::model::retrieve_contexts_request::DataSource::VertexRagStore(v) => {
108297                std::option::Option::Some(v)
108298            }
108299            _ => std::option::Option::None,
108300        })
108301    }
108302
108303    /// Sets the value of [data_source][crate::model::RetrieveContextsRequest::data_source]
108304    /// to hold a `VertexRagStore`.
108305    ///
108306    /// Note that all the setters affecting `data_source` are
108307    /// mutually exclusive.
108308    pub fn set_vertex_rag_store<
108309        T: std::convert::Into<
108310                std::boxed::Box<crate::model::retrieve_contexts_request::VertexRagStore>,
108311            >,
108312    >(
108313        mut self,
108314        v: T,
108315    ) -> Self {
108316        self.data_source = std::option::Option::Some(
108317            crate::model::retrieve_contexts_request::DataSource::VertexRagStore(v.into()),
108318        );
108319        self
108320    }
108321}
108322
108323#[cfg(feature = "vertex-rag-service")]
108324impl wkt::message::Message for RetrieveContextsRequest {
108325    fn typename() -> &'static str {
108326        "type.googleapis.com/google.cloud.aiplatform.v1.RetrieveContextsRequest"
108327    }
108328}
108329
108330/// Defines additional types related to [RetrieveContextsRequest].
108331#[cfg(feature = "vertex-rag-service")]
108332pub mod retrieve_contexts_request {
108333    #[allow(unused_imports)]
108334    use super::*;
108335
108336    /// The data source for Vertex RagStore.
108337    #[cfg(feature = "vertex-rag-service")]
108338    #[derive(Clone, Default, PartialEq)]
108339    #[non_exhaustive]
108340    pub struct VertexRagStore {
108341        /// Optional. The representation of the rag source. It can be used to specify
108342        /// corpus only or ragfiles. Currently only support one corpus or multiple
108343        /// files from one corpus. In the future we may open up multiple corpora
108344        /// support.
108345        pub rag_resources:
108346            std::vec::Vec<crate::model::retrieve_contexts_request::vertex_rag_store::RagResource>,
108347
108348        /// Optional. Only return contexts with vector distance smaller than the
108349        /// threshold.
108350        #[deprecated]
108351        pub vector_distance_threshold: std::option::Option<f64>,
108352
108353        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
108354    }
108355
108356    #[cfg(feature = "vertex-rag-service")]
108357    impl VertexRagStore {
108358        pub fn new() -> Self {
108359            std::default::Default::default()
108360        }
108361
108362        /// Sets the value of [rag_resources][crate::model::retrieve_contexts_request::VertexRagStore::rag_resources].
108363        pub fn set_rag_resources<T, V>(mut self, v: T) -> Self
108364        where
108365            T: std::iter::IntoIterator<Item = V>,
108366            V: std::convert::Into<
108367                    crate::model::retrieve_contexts_request::vertex_rag_store::RagResource,
108368                >,
108369        {
108370            use std::iter::Iterator;
108371            self.rag_resources = v.into_iter().map(|i| i.into()).collect();
108372            self
108373        }
108374
108375        /// Sets the value of [vector_distance_threshold][crate::model::retrieve_contexts_request::VertexRagStore::vector_distance_threshold].
108376        #[deprecated]
108377        pub fn set_vector_distance_threshold<T>(mut self, v: T) -> Self
108378        where
108379            T: std::convert::Into<f64>,
108380        {
108381            self.vector_distance_threshold = std::option::Option::Some(v.into());
108382            self
108383        }
108384
108385        /// Sets or clears the value of [vector_distance_threshold][crate::model::retrieve_contexts_request::VertexRagStore::vector_distance_threshold].
108386        #[deprecated]
108387        pub fn set_or_clear_vector_distance_threshold<T>(
108388            mut self,
108389            v: std::option::Option<T>,
108390        ) -> Self
108391        where
108392            T: std::convert::Into<f64>,
108393        {
108394            self.vector_distance_threshold = v.map(|x| x.into());
108395            self
108396        }
108397    }
108398
108399    #[cfg(feature = "vertex-rag-service")]
108400    impl wkt::message::Message for VertexRagStore {
108401        fn typename() -> &'static str {
108402            "type.googleapis.com/google.cloud.aiplatform.v1.RetrieveContextsRequest.VertexRagStore"
108403        }
108404    }
108405
108406    /// Defines additional types related to [VertexRagStore].
108407    #[cfg(feature = "vertex-rag-service")]
108408    pub mod vertex_rag_store {
108409        #[allow(unused_imports)]
108410        use super::*;
108411
108412        /// The definition of the Rag resource.
108413        #[cfg(feature = "vertex-rag-service")]
108414        #[derive(Clone, Default, PartialEq)]
108415        #[non_exhaustive]
108416        pub struct RagResource {
108417            /// Optional. RagCorpora resource name.
108418            /// Format:
108419            /// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
108420            pub rag_corpus: std::string::String,
108421
108422            /// Optional. rag_file_id. The files should be in the same rag_corpus set
108423            /// in rag_corpus field.
108424            pub rag_file_ids: std::vec::Vec<std::string::String>,
108425
108426            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
108427        }
108428
108429        #[cfg(feature = "vertex-rag-service")]
108430        impl RagResource {
108431            pub fn new() -> Self {
108432                std::default::Default::default()
108433            }
108434
108435            /// Sets the value of [rag_corpus][crate::model::retrieve_contexts_request::vertex_rag_store::RagResource::rag_corpus].
108436            pub fn set_rag_corpus<T: std::convert::Into<std::string::String>>(
108437                mut self,
108438                v: T,
108439            ) -> Self {
108440                self.rag_corpus = v.into();
108441                self
108442            }
108443
108444            /// Sets the value of [rag_file_ids][crate::model::retrieve_contexts_request::vertex_rag_store::RagResource::rag_file_ids].
108445            pub fn set_rag_file_ids<T, V>(mut self, v: T) -> Self
108446            where
108447                T: std::iter::IntoIterator<Item = V>,
108448                V: std::convert::Into<std::string::String>,
108449            {
108450                use std::iter::Iterator;
108451                self.rag_file_ids = v.into_iter().map(|i| i.into()).collect();
108452                self
108453            }
108454        }
108455
108456        #[cfg(feature = "vertex-rag-service")]
108457        impl wkt::message::Message for RagResource {
108458            fn typename() -> &'static str {
108459                "type.googleapis.com/google.cloud.aiplatform.v1.RetrieveContextsRequest.VertexRagStore.RagResource"
108460            }
108461        }
108462    }
108463
108464    /// Data Source to retrieve contexts.
108465    #[cfg(feature = "vertex-rag-service")]
108466    #[derive(Clone, Debug, PartialEq)]
108467    #[non_exhaustive]
108468    pub enum DataSource {
108469        /// The data source for Vertex RagStore.
108470        VertexRagStore(std::boxed::Box<crate::model::retrieve_contexts_request::VertexRagStore>),
108471    }
108472}
108473
108474/// Relevant contexts for one query.
108475#[cfg(feature = "vertex-rag-service")]
108476#[derive(Clone, Default, PartialEq)]
108477#[non_exhaustive]
108478pub struct RagContexts {
108479    /// All its contexts.
108480    pub contexts: std::vec::Vec<crate::model::rag_contexts::Context>,
108481
108482    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
108483}
108484
108485#[cfg(feature = "vertex-rag-service")]
108486impl RagContexts {
108487    pub fn new() -> Self {
108488        std::default::Default::default()
108489    }
108490
108491    /// Sets the value of [contexts][crate::model::RagContexts::contexts].
108492    pub fn set_contexts<T, V>(mut self, v: T) -> Self
108493    where
108494        T: std::iter::IntoIterator<Item = V>,
108495        V: std::convert::Into<crate::model::rag_contexts::Context>,
108496    {
108497        use std::iter::Iterator;
108498        self.contexts = v.into_iter().map(|i| i.into()).collect();
108499        self
108500    }
108501}
108502
108503#[cfg(feature = "vertex-rag-service")]
108504impl wkt::message::Message for RagContexts {
108505    fn typename() -> &'static str {
108506        "type.googleapis.com/google.cloud.aiplatform.v1.RagContexts"
108507    }
108508}
108509
108510/// Defines additional types related to [RagContexts].
108511#[cfg(feature = "vertex-rag-service")]
108512pub mod rag_contexts {
108513    #[allow(unused_imports)]
108514    use super::*;
108515
108516    /// A context of the query.
108517    #[cfg(feature = "vertex-rag-service")]
108518    #[derive(Clone, Default, PartialEq)]
108519    #[non_exhaustive]
108520    pub struct Context {
108521        /// If the file is imported from Cloud Storage or Google Drive, source_uri
108522        /// will be original file URI in Cloud Storage or Google Drive; if file is
108523        /// uploaded, source_uri will be file display name.
108524        pub source_uri: std::string::String,
108525
108526        /// The file display name.
108527        pub source_display_name: std::string::String,
108528
108529        /// The text chunk.
108530        pub text: std::string::String,
108531
108532        /// According to the underlying Vector DB and the selected metric type, the
108533        /// score can be either the distance or the similarity between the query and
108534        /// the context and its range depends on the metric type.
108535        ///
108536        /// For example, if the metric type is COSINE_DISTANCE, it represents the
108537        /// distance between the query and the context. The larger the distance, the
108538        /// less relevant the context is to the query. The range is [0, 2], while 0
108539        /// means the most relevant and 2 means the least relevant.
108540        pub score: std::option::Option<f64>,
108541
108542        /// Context of the retrieved chunk.
108543        pub chunk: std::option::Option<crate::model::RagChunk>,
108544
108545        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
108546    }
108547
108548    #[cfg(feature = "vertex-rag-service")]
108549    impl Context {
108550        pub fn new() -> Self {
108551            std::default::Default::default()
108552        }
108553
108554        /// Sets the value of [source_uri][crate::model::rag_contexts::Context::source_uri].
108555        pub fn set_source_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
108556            self.source_uri = v.into();
108557            self
108558        }
108559
108560        /// Sets the value of [source_display_name][crate::model::rag_contexts::Context::source_display_name].
108561        pub fn set_source_display_name<T: std::convert::Into<std::string::String>>(
108562            mut self,
108563            v: T,
108564        ) -> Self {
108565            self.source_display_name = v.into();
108566            self
108567        }
108568
108569        /// Sets the value of [text][crate::model::rag_contexts::Context::text].
108570        pub fn set_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
108571            self.text = v.into();
108572            self
108573        }
108574
108575        /// Sets the value of [score][crate::model::rag_contexts::Context::score].
108576        pub fn set_score<T>(mut self, v: T) -> Self
108577        where
108578            T: std::convert::Into<f64>,
108579        {
108580            self.score = std::option::Option::Some(v.into());
108581            self
108582        }
108583
108584        /// Sets or clears the value of [score][crate::model::rag_contexts::Context::score].
108585        pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
108586        where
108587            T: std::convert::Into<f64>,
108588        {
108589            self.score = v.map(|x| x.into());
108590            self
108591        }
108592
108593        /// Sets the value of [chunk][crate::model::rag_contexts::Context::chunk].
108594        pub fn set_chunk<T>(mut self, v: T) -> Self
108595        where
108596            T: std::convert::Into<crate::model::RagChunk>,
108597        {
108598            self.chunk = std::option::Option::Some(v.into());
108599            self
108600        }
108601
108602        /// Sets or clears the value of [chunk][crate::model::rag_contexts::Context::chunk].
108603        pub fn set_or_clear_chunk<T>(mut self, v: std::option::Option<T>) -> Self
108604        where
108605            T: std::convert::Into<crate::model::RagChunk>,
108606        {
108607            self.chunk = v.map(|x| x.into());
108608            self
108609        }
108610    }
108611
108612    #[cfg(feature = "vertex-rag-service")]
108613    impl wkt::message::Message for Context {
108614        fn typename() -> &'static str {
108615            "type.googleapis.com/google.cloud.aiplatform.v1.RagContexts.Context"
108616        }
108617    }
108618}
108619
108620/// Response message for
108621/// [VertexRagService.RetrieveContexts][google.cloud.aiplatform.v1.VertexRagService.RetrieveContexts].
108622///
108623/// [google.cloud.aiplatform.v1.VertexRagService.RetrieveContexts]: crate::client::VertexRagService::retrieve_contexts
108624#[cfg(feature = "vertex-rag-service")]
108625#[derive(Clone, Default, PartialEq)]
108626#[non_exhaustive]
108627pub struct RetrieveContextsResponse {
108628    /// The contexts of the query.
108629    pub contexts: std::option::Option<crate::model::RagContexts>,
108630
108631    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
108632}
108633
108634#[cfg(feature = "vertex-rag-service")]
108635impl RetrieveContextsResponse {
108636    pub fn new() -> Self {
108637        std::default::Default::default()
108638    }
108639
108640    /// Sets the value of [contexts][crate::model::RetrieveContextsResponse::contexts].
108641    pub fn set_contexts<T>(mut self, v: T) -> Self
108642    where
108643        T: std::convert::Into<crate::model::RagContexts>,
108644    {
108645        self.contexts = std::option::Option::Some(v.into());
108646        self
108647    }
108648
108649    /// Sets or clears the value of [contexts][crate::model::RetrieveContextsResponse::contexts].
108650    pub fn set_or_clear_contexts<T>(mut self, v: std::option::Option<T>) -> Self
108651    where
108652        T: std::convert::Into<crate::model::RagContexts>,
108653    {
108654        self.contexts = v.map(|x| x.into());
108655        self
108656    }
108657}
108658
108659#[cfg(feature = "vertex-rag-service")]
108660impl wkt::message::Message for RetrieveContextsResponse {
108661    fn typename() -> &'static str {
108662        "type.googleapis.com/google.cloud.aiplatform.v1.RetrieveContextsResponse"
108663    }
108664}
108665
108666/// Request message for AugmentPrompt.
108667#[cfg(feature = "vertex-rag-service")]
108668#[derive(Clone, Default, PartialEq)]
108669#[non_exhaustive]
108670pub struct AugmentPromptRequest {
108671    /// Required. The resource name of the Location from which to augment prompt.
108672    /// The users must have permission to make a call in the project.
108673    /// Format:
108674    /// `projects/{project}/locations/{location}`.
108675    pub parent: std::string::String,
108676
108677    /// Optional. Input content to augment, only text format is supported for now.
108678    pub contents: std::vec::Vec<crate::model::Content>,
108679
108680    /// Optional. Metadata of the backend deployed model.
108681    pub model: std::option::Option<crate::model::augment_prompt_request::Model>,
108682
108683    /// The data source for retrieving contexts.
108684    pub data_source: std::option::Option<crate::model::augment_prompt_request::DataSource>,
108685
108686    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
108687}
108688
108689#[cfg(feature = "vertex-rag-service")]
108690impl AugmentPromptRequest {
108691    pub fn new() -> Self {
108692        std::default::Default::default()
108693    }
108694
108695    /// Sets the value of [parent][crate::model::AugmentPromptRequest::parent].
108696    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
108697        self.parent = v.into();
108698        self
108699    }
108700
108701    /// Sets the value of [contents][crate::model::AugmentPromptRequest::contents].
108702    pub fn set_contents<T, V>(mut self, v: T) -> Self
108703    where
108704        T: std::iter::IntoIterator<Item = V>,
108705        V: std::convert::Into<crate::model::Content>,
108706    {
108707        use std::iter::Iterator;
108708        self.contents = v.into_iter().map(|i| i.into()).collect();
108709        self
108710    }
108711
108712    /// Sets the value of [model][crate::model::AugmentPromptRequest::model].
108713    pub fn set_model<T>(mut self, v: T) -> Self
108714    where
108715        T: std::convert::Into<crate::model::augment_prompt_request::Model>,
108716    {
108717        self.model = std::option::Option::Some(v.into());
108718        self
108719    }
108720
108721    /// Sets or clears the value of [model][crate::model::AugmentPromptRequest::model].
108722    pub fn set_or_clear_model<T>(mut self, v: std::option::Option<T>) -> Self
108723    where
108724        T: std::convert::Into<crate::model::augment_prompt_request::Model>,
108725    {
108726        self.model = v.map(|x| x.into());
108727        self
108728    }
108729
108730    /// Sets the value of [data_source][crate::model::AugmentPromptRequest::data_source].
108731    ///
108732    /// Note that all the setters affecting `data_source` are mutually
108733    /// exclusive.
108734    pub fn set_data_source<
108735        T: std::convert::Into<std::option::Option<crate::model::augment_prompt_request::DataSource>>,
108736    >(
108737        mut self,
108738        v: T,
108739    ) -> Self {
108740        self.data_source = v.into();
108741        self
108742    }
108743
108744    /// The value of [data_source][crate::model::AugmentPromptRequest::data_source]
108745    /// if it holds a `VertexRagStore`, `None` if the field is not set or
108746    /// holds a different branch.
108747    pub fn vertex_rag_store(
108748        &self,
108749    ) -> std::option::Option<&std::boxed::Box<crate::model::VertexRagStore>> {
108750        #[allow(unreachable_patterns)]
108751        self.data_source.as_ref().and_then(|v| match v {
108752            crate::model::augment_prompt_request::DataSource::VertexRagStore(v) => {
108753                std::option::Option::Some(v)
108754            }
108755            _ => std::option::Option::None,
108756        })
108757    }
108758
108759    /// Sets the value of [data_source][crate::model::AugmentPromptRequest::data_source]
108760    /// to hold a `VertexRagStore`.
108761    ///
108762    /// Note that all the setters affecting `data_source` are
108763    /// mutually exclusive.
108764    pub fn set_vertex_rag_store<
108765        T: std::convert::Into<std::boxed::Box<crate::model::VertexRagStore>>,
108766    >(
108767        mut self,
108768        v: T,
108769    ) -> Self {
108770        self.data_source = std::option::Option::Some(
108771            crate::model::augment_prompt_request::DataSource::VertexRagStore(v.into()),
108772        );
108773        self
108774    }
108775}
108776
108777#[cfg(feature = "vertex-rag-service")]
108778impl wkt::message::Message for AugmentPromptRequest {
108779    fn typename() -> &'static str {
108780        "type.googleapis.com/google.cloud.aiplatform.v1.AugmentPromptRequest"
108781    }
108782}
108783
108784/// Defines additional types related to [AugmentPromptRequest].
108785#[cfg(feature = "vertex-rag-service")]
108786pub mod augment_prompt_request {
108787    #[allow(unused_imports)]
108788    use super::*;
108789
108790    /// Metadata of the backend deployed model.
108791    #[cfg(feature = "vertex-rag-service")]
108792    #[derive(Clone, Default, PartialEq)]
108793    #[non_exhaustive]
108794    pub struct Model {
108795        /// Optional. The model that the user will send the augmented prompt for
108796        /// content generation.
108797        pub model: std::string::String,
108798
108799        /// Optional. The model version of the backend deployed model.
108800        pub model_version: std::string::String,
108801
108802        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
108803    }
108804
108805    #[cfg(feature = "vertex-rag-service")]
108806    impl Model {
108807        pub fn new() -> Self {
108808            std::default::Default::default()
108809        }
108810
108811        /// Sets the value of [model][crate::model::augment_prompt_request::Model::model].
108812        pub fn set_model<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
108813            self.model = v.into();
108814            self
108815        }
108816
108817        /// Sets the value of [model_version][crate::model::augment_prompt_request::Model::model_version].
108818        pub fn set_model_version<T: std::convert::Into<std::string::String>>(
108819            mut self,
108820            v: T,
108821        ) -> Self {
108822            self.model_version = v.into();
108823            self
108824        }
108825    }
108826
108827    #[cfg(feature = "vertex-rag-service")]
108828    impl wkt::message::Message for Model {
108829        fn typename() -> &'static str {
108830            "type.googleapis.com/google.cloud.aiplatform.v1.AugmentPromptRequest.Model"
108831        }
108832    }
108833
108834    /// The data source for retrieving contexts.
108835    #[cfg(feature = "vertex-rag-service")]
108836    #[derive(Clone, Debug, PartialEq)]
108837    #[non_exhaustive]
108838    pub enum DataSource {
108839        /// Optional. Retrieves contexts from the Vertex RagStore.
108840        VertexRagStore(std::boxed::Box<crate::model::VertexRagStore>),
108841    }
108842}
108843
108844/// Response message for AugmentPrompt.
108845#[cfg(feature = "vertex-rag-service")]
108846#[derive(Clone, Default, PartialEq)]
108847#[non_exhaustive]
108848pub struct AugmentPromptResponse {
108849    /// Augmented prompt, only text format is supported for now.
108850    pub augmented_prompt: std::vec::Vec<crate::model::Content>,
108851
108852    /// Retrieved facts from RAG data sources.
108853    pub facts: std::vec::Vec<crate::model::Fact>,
108854
108855    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
108856}
108857
108858#[cfg(feature = "vertex-rag-service")]
108859impl AugmentPromptResponse {
108860    pub fn new() -> Self {
108861        std::default::Default::default()
108862    }
108863
108864    /// Sets the value of [augmented_prompt][crate::model::AugmentPromptResponse::augmented_prompt].
108865    pub fn set_augmented_prompt<T, V>(mut self, v: T) -> Self
108866    where
108867        T: std::iter::IntoIterator<Item = V>,
108868        V: std::convert::Into<crate::model::Content>,
108869    {
108870        use std::iter::Iterator;
108871        self.augmented_prompt = v.into_iter().map(|i| i.into()).collect();
108872        self
108873    }
108874
108875    /// Sets the value of [facts][crate::model::AugmentPromptResponse::facts].
108876    pub fn set_facts<T, V>(mut self, v: T) -> Self
108877    where
108878        T: std::iter::IntoIterator<Item = V>,
108879        V: std::convert::Into<crate::model::Fact>,
108880    {
108881        use std::iter::Iterator;
108882        self.facts = v.into_iter().map(|i| i.into()).collect();
108883        self
108884    }
108885}
108886
108887#[cfg(feature = "vertex-rag-service")]
108888impl wkt::message::Message for AugmentPromptResponse {
108889    fn typename() -> &'static str {
108890        "type.googleapis.com/google.cloud.aiplatform.v1.AugmentPromptResponse"
108891    }
108892}
108893
108894/// Request message for CorroborateContent.
108895#[cfg(feature = "vertex-rag-service")]
108896#[derive(Clone, Default, PartialEq)]
108897#[non_exhaustive]
108898pub struct CorroborateContentRequest {
108899    /// Required. The resource name of the Location from which to corroborate text.
108900    /// The users must have permission to make a call in the project.
108901    /// Format:
108902    /// `projects/{project}/locations/{location}`.
108903    pub parent: std::string::String,
108904
108905    /// Optional. Input content to corroborate, only text format is supported for
108906    /// now.
108907    pub content: std::option::Option<crate::model::Content>,
108908
108909    /// Optional. Facts used to generate the text can also be used to corroborate
108910    /// the text.
108911    pub facts: std::vec::Vec<crate::model::Fact>,
108912
108913    /// Optional. Parameters that can be set to override default settings per
108914    /// request.
108915    pub parameters: std::option::Option<crate::model::corroborate_content_request::Parameters>,
108916
108917    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
108918}
108919
108920#[cfg(feature = "vertex-rag-service")]
108921impl CorroborateContentRequest {
108922    pub fn new() -> Self {
108923        std::default::Default::default()
108924    }
108925
108926    /// Sets the value of [parent][crate::model::CorroborateContentRequest::parent].
108927    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
108928        self.parent = v.into();
108929        self
108930    }
108931
108932    /// Sets the value of [content][crate::model::CorroborateContentRequest::content].
108933    pub fn set_content<T>(mut self, v: T) -> Self
108934    where
108935        T: std::convert::Into<crate::model::Content>,
108936    {
108937        self.content = std::option::Option::Some(v.into());
108938        self
108939    }
108940
108941    /// Sets or clears the value of [content][crate::model::CorroborateContentRequest::content].
108942    pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
108943    where
108944        T: std::convert::Into<crate::model::Content>,
108945    {
108946        self.content = v.map(|x| x.into());
108947        self
108948    }
108949
108950    /// Sets the value of [facts][crate::model::CorroborateContentRequest::facts].
108951    pub fn set_facts<T, V>(mut self, v: T) -> Self
108952    where
108953        T: std::iter::IntoIterator<Item = V>,
108954        V: std::convert::Into<crate::model::Fact>,
108955    {
108956        use std::iter::Iterator;
108957        self.facts = v.into_iter().map(|i| i.into()).collect();
108958        self
108959    }
108960
108961    /// Sets the value of [parameters][crate::model::CorroborateContentRequest::parameters].
108962    pub fn set_parameters<T>(mut self, v: T) -> Self
108963    where
108964        T: std::convert::Into<crate::model::corroborate_content_request::Parameters>,
108965    {
108966        self.parameters = std::option::Option::Some(v.into());
108967        self
108968    }
108969
108970    /// Sets or clears the value of [parameters][crate::model::CorroborateContentRequest::parameters].
108971    pub fn set_or_clear_parameters<T>(mut self, v: std::option::Option<T>) -> Self
108972    where
108973        T: std::convert::Into<crate::model::corroborate_content_request::Parameters>,
108974    {
108975        self.parameters = v.map(|x| x.into());
108976        self
108977    }
108978}
108979
108980#[cfg(feature = "vertex-rag-service")]
108981impl wkt::message::Message for CorroborateContentRequest {
108982    fn typename() -> &'static str {
108983        "type.googleapis.com/google.cloud.aiplatform.v1.CorroborateContentRequest"
108984    }
108985}
108986
108987/// Defines additional types related to [CorroborateContentRequest].
108988#[cfg(feature = "vertex-rag-service")]
108989pub mod corroborate_content_request {
108990    #[allow(unused_imports)]
108991    use super::*;
108992
108993    /// Parameters that can be overrided per request.
108994    #[cfg(feature = "vertex-rag-service")]
108995    #[derive(Clone, Default, PartialEq)]
108996    #[non_exhaustive]
108997    pub struct Parameters {
108998        /// Optional. Only return claims with citation score larger than the
108999        /// threshold.
109000        pub citation_threshold: f64,
109001
109002        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109003    }
109004
109005    #[cfg(feature = "vertex-rag-service")]
109006    impl Parameters {
109007        pub fn new() -> Self {
109008            std::default::Default::default()
109009        }
109010
109011        /// Sets the value of [citation_threshold][crate::model::corroborate_content_request::Parameters::citation_threshold].
109012        pub fn set_citation_threshold<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
109013            self.citation_threshold = v.into();
109014            self
109015        }
109016    }
109017
109018    #[cfg(feature = "vertex-rag-service")]
109019    impl wkt::message::Message for Parameters {
109020        fn typename() -> &'static str {
109021            "type.googleapis.com/google.cloud.aiplatform.v1.CorroborateContentRequest.Parameters"
109022        }
109023    }
109024}
109025
109026/// Response message for CorroborateContent.
109027#[cfg(feature = "vertex-rag-service")]
109028#[derive(Clone, Default, PartialEq)]
109029#[non_exhaustive]
109030pub struct CorroborateContentResponse {
109031    /// Confidence score of corroborating content. Value is [0,1] with 1 is the
109032    /// most confidence.
109033    pub corroboration_score: std::option::Option<f32>,
109034
109035    /// Claims that are extracted from the input content and facts that support the
109036    /// claims.
109037    pub claims: std::vec::Vec<crate::model::Claim>,
109038
109039    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109040}
109041
109042#[cfg(feature = "vertex-rag-service")]
109043impl CorroborateContentResponse {
109044    pub fn new() -> Self {
109045        std::default::Default::default()
109046    }
109047
109048    /// Sets the value of [corroboration_score][crate::model::CorroborateContentResponse::corroboration_score].
109049    pub fn set_corroboration_score<T>(mut self, v: T) -> Self
109050    where
109051        T: std::convert::Into<f32>,
109052    {
109053        self.corroboration_score = std::option::Option::Some(v.into());
109054        self
109055    }
109056
109057    /// Sets or clears the value of [corroboration_score][crate::model::CorroborateContentResponse::corroboration_score].
109058    pub fn set_or_clear_corroboration_score<T>(mut self, v: std::option::Option<T>) -> Self
109059    where
109060        T: std::convert::Into<f32>,
109061    {
109062        self.corroboration_score = v.map(|x| x.into());
109063        self
109064    }
109065
109066    /// Sets the value of [claims][crate::model::CorroborateContentResponse::claims].
109067    pub fn set_claims<T, V>(mut self, v: T) -> Self
109068    where
109069        T: std::iter::IntoIterator<Item = V>,
109070        V: std::convert::Into<crate::model::Claim>,
109071    {
109072        use std::iter::Iterator;
109073        self.claims = v.into_iter().map(|i| i.into()).collect();
109074        self
109075    }
109076}
109077
109078#[cfg(feature = "vertex-rag-service")]
109079impl wkt::message::Message for CorroborateContentResponse {
109080    fn typename() -> &'static str {
109081        "type.googleapis.com/google.cloud.aiplatform.v1.CorroborateContentResponse"
109082    }
109083}
109084
109085/// The fact used in grounding.
109086#[cfg(feature = "vertex-rag-service")]
109087#[derive(Clone, Default, PartialEq)]
109088#[non_exhaustive]
109089pub struct Fact {
109090    /// Query that is used to retrieve this fact.
109091    pub query: std::option::Option<std::string::String>,
109092
109093    /// If present, it refers to the title of this fact.
109094    pub title: std::option::Option<std::string::String>,
109095
109096    /// If present, this uri links to the source of the fact.
109097    pub uri: std::option::Option<std::string::String>,
109098
109099    /// If present, the summary/snippet of the fact.
109100    pub summary: std::option::Option<std::string::String>,
109101
109102    /// If present, the distance between the query vector and this fact vector.
109103    #[deprecated]
109104    pub vector_distance: std::option::Option<f64>,
109105
109106    /// If present, according to the underlying Vector DB and the selected metric
109107    /// type, the score can be either the distance or the similarity between the
109108    /// query and the fact and its range depends on the metric type.
109109    ///
109110    /// For example, if the metric type is COSINE_DISTANCE, it represents the
109111    /// distance between the query and the fact. The larger the distance, the less
109112    /// relevant the fact is to the query. The range is [0, 2], while 0 means the
109113    /// most relevant and 2 means the least relevant.
109114    pub score: std::option::Option<f64>,
109115
109116    /// If present, chunk properties.
109117    pub chunk: std::option::Option<crate::model::RagChunk>,
109118
109119    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109120}
109121
109122#[cfg(feature = "vertex-rag-service")]
109123impl Fact {
109124    pub fn new() -> Self {
109125        std::default::Default::default()
109126    }
109127
109128    /// Sets the value of [query][crate::model::Fact::query].
109129    pub fn set_query<T>(mut self, v: T) -> Self
109130    where
109131        T: std::convert::Into<std::string::String>,
109132    {
109133        self.query = std::option::Option::Some(v.into());
109134        self
109135    }
109136
109137    /// Sets or clears the value of [query][crate::model::Fact::query].
109138    pub fn set_or_clear_query<T>(mut self, v: std::option::Option<T>) -> Self
109139    where
109140        T: std::convert::Into<std::string::String>,
109141    {
109142        self.query = v.map(|x| x.into());
109143        self
109144    }
109145
109146    /// Sets the value of [title][crate::model::Fact::title].
109147    pub fn set_title<T>(mut self, v: T) -> Self
109148    where
109149        T: std::convert::Into<std::string::String>,
109150    {
109151        self.title = std::option::Option::Some(v.into());
109152        self
109153    }
109154
109155    /// Sets or clears the value of [title][crate::model::Fact::title].
109156    pub fn set_or_clear_title<T>(mut self, v: std::option::Option<T>) -> Self
109157    where
109158        T: std::convert::Into<std::string::String>,
109159    {
109160        self.title = v.map(|x| x.into());
109161        self
109162    }
109163
109164    /// Sets the value of [uri][crate::model::Fact::uri].
109165    pub fn set_uri<T>(mut self, v: T) -> Self
109166    where
109167        T: std::convert::Into<std::string::String>,
109168    {
109169        self.uri = std::option::Option::Some(v.into());
109170        self
109171    }
109172
109173    /// Sets or clears the value of [uri][crate::model::Fact::uri].
109174    pub fn set_or_clear_uri<T>(mut self, v: std::option::Option<T>) -> Self
109175    where
109176        T: std::convert::Into<std::string::String>,
109177    {
109178        self.uri = v.map(|x| x.into());
109179        self
109180    }
109181
109182    /// Sets the value of [summary][crate::model::Fact::summary].
109183    pub fn set_summary<T>(mut self, v: T) -> Self
109184    where
109185        T: std::convert::Into<std::string::String>,
109186    {
109187        self.summary = std::option::Option::Some(v.into());
109188        self
109189    }
109190
109191    /// Sets or clears the value of [summary][crate::model::Fact::summary].
109192    pub fn set_or_clear_summary<T>(mut self, v: std::option::Option<T>) -> Self
109193    where
109194        T: std::convert::Into<std::string::String>,
109195    {
109196        self.summary = v.map(|x| x.into());
109197        self
109198    }
109199
109200    /// Sets the value of [vector_distance][crate::model::Fact::vector_distance].
109201    #[deprecated]
109202    pub fn set_vector_distance<T>(mut self, v: T) -> Self
109203    where
109204        T: std::convert::Into<f64>,
109205    {
109206        self.vector_distance = std::option::Option::Some(v.into());
109207        self
109208    }
109209
109210    /// Sets or clears the value of [vector_distance][crate::model::Fact::vector_distance].
109211    #[deprecated]
109212    pub fn set_or_clear_vector_distance<T>(mut self, v: std::option::Option<T>) -> Self
109213    where
109214        T: std::convert::Into<f64>,
109215    {
109216        self.vector_distance = v.map(|x| x.into());
109217        self
109218    }
109219
109220    /// Sets the value of [score][crate::model::Fact::score].
109221    pub fn set_score<T>(mut self, v: T) -> Self
109222    where
109223        T: std::convert::Into<f64>,
109224    {
109225        self.score = std::option::Option::Some(v.into());
109226        self
109227    }
109228
109229    /// Sets or clears the value of [score][crate::model::Fact::score].
109230    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
109231    where
109232        T: std::convert::Into<f64>,
109233    {
109234        self.score = v.map(|x| x.into());
109235        self
109236    }
109237
109238    /// Sets the value of [chunk][crate::model::Fact::chunk].
109239    pub fn set_chunk<T>(mut self, v: T) -> Self
109240    where
109241        T: std::convert::Into<crate::model::RagChunk>,
109242    {
109243        self.chunk = std::option::Option::Some(v.into());
109244        self
109245    }
109246
109247    /// Sets or clears the value of [chunk][crate::model::Fact::chunk].
109248    pub fn set_or_clear_chunk<T>(mut self, v: std::option::Option<T>) -> Self
109249    where
109250        T: std::convert::Into<crate::model::RagChunk>,
109251    {
109252        self.chunk = v.map(|x| x.into());
109253        self
109254    }
109255}
109256
109257#[cfg(feature = "vertex-rag-service")]
109258impl wkt::message::Message for Fact {
109259    fn typename() -> &'static str {
109260        "type.googleapis.com/google.cloud.aiplatform.v1.Fact"
109261    }
109262}
109263
109264/// Claim that is extracted from the input text and facts that support it.
109265#[cfg(feature = "vertex-rag-service")]
109266#[derive(Clone, Default, PartialEq)]
109267#[non_exhaustive]
109268pub struct Claim {
109269    /// Index in the input text where the claim starts (inclusive).
109270    pub start_index: std::option::Option<i32>,
109271
109272    /// Index in the input text where the claim ends (exclusive).
109273    pub end_index: std::option::Option<i32>,
109274
109275    /// Indexes of the facts supporting this claim.
109276    pub fact_indexes: std::vec::Vec<i32>,
109277
109278    /// Confidence score of this corroboration.
109279    pub score: std::option::Option<f32>,
109280
109281    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109282}
109283
109284#[cfg(feature = "vertex-rag-service")]
109285impl Claim {
109286    pub fn new() -> Self {
109287        std::default::Default::default()
109288    }
109289
109290    /// Sets the value of [start_index][crate::model::Claim::start_index].
109291    pub fn set_start_index<T>(mut self, v: T) -> Self
109292    where
109293        T: std::convert::Into<i32>,
109294    {
109295        self.start_index = std::option::Option::Some(v.into());
109296        self
109297    }
109298
109299    /// Sets or clears the value of [start_index][crate::model::Claim::start_index].
109300    pub fn set_or_clear_start_index<T>(mut self, v: std::option::Option<T>) -> Self
109301    where
109302        T: std::convert::Into<i32>,
109303    {
109304        self.start_index = v.map(|x| x.into());
109305        self
109306    }
109307
109308    /// Sets the value of [end_index][crate::model::Claim::end_index].
109309    pub fn set_end_index<T>(mut self, v: T) -> Self
109310    where
109311        T: std::convert::Into<i32>,
109312    {
109313        self.end_index = std::option::Option::Some(v.into());
109314        self
109315    }
109316
109317    /// Sets or clears the value of [end_index][crate::model::Claim::end_index].
109318    pub fn set_or_clear_end_index<T>(mut self, v: std::option::Option<T>) -> Self
109319    where
109320        T: std::convert::Into<i32>,
109321    {
109322        self.end_index = v.map(|x| x.into());
109323        self
109324    }
109325
109326    /// Sets the value of [fact_indexes][crate::model::Claim::fact_indexes].
109327    pub fn set_fact_indexes<T, V>(mut self, v: T) -> Self
109328    where
109329        T: std::iter::IntoIterator<Item = V>,
109330        V: std::convert::Into<i32>,
109331    {
109332        use std::iter::Iterator;
109333        self.fact_indexes = v.into_iter().map(|i| i.into()).collect();
109334        self
109335    }
109336
109337    /// Sets the value of [score][crate::model::Claim::score].
109338    pub fn set_score<T>(mut self, v: T) -> Self
109339    where
109340        T: std::convert::Into<f32>,
109341    {
109342        self.score = std::option::Option::Some(v.into());
109343        self
109344    }
109345
109346    /// Sets or clears the value of [score][crate::model::Claim::score].
109347    pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
109348    where
109349        T: std::convert::Into<f32>,
109350    {
109351        self.score = v.map(|x| x.into());
109352        self
109353    }
109354}
109355
109356#[cfg(feature = "vertex-rag-service")]
109357impl wkt::message::Message for Claim {
109358    fn typename() -> &'static str {
109359        "type.googleapis.com/google.cloud.aiplatform.v1.Claim"
109360    }
109361}
109362
109363/// Request message for
109364/// [VizierService.GetStudy][google.cloud.aiplatform.v1.VizierService.GetStudy].
109365///
109366/// [google.cloud.aiplatform.v1.VizierService.GetStudy]: crate::client::VizierService::get_study
109367#[cfg(feature = "vizier-service")]
109368#[derive(Clone, Default, PartialEq)]
109369#[non_exhaustive]
109370pub struct GetStudyRequest {
109371    /// Required. The name of the Study resource.
109372    /// Format: `projects/{project}/locations/{location}/studies/{study}`
109373    pub name: std::string::String,
109374
109375    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109376}
109377
109378#[cfg(feature = "vizier-service")]
109379impl GetStudyRequest {
109380    pub fn new() -> Self {
109381        std::default::Default::default()
109382    }
109383
109384    /// Sets the value of [name][crate::model::GetStudyRequest::name].
109385    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
109386        self.name = v.into();
109387        self
109388    }
109389}
109390
109391#[cfg(feature = "vizier-service")]
109392impl wkt::message::Message for GetStudyRequest {
109393    fn typename() -> &'static str {
109394        "type.googleapis.com/google.cloud.aiplatform.v1.GetStudyRequest"
109395    }
109396}
109397
109398/// Request message for
109399/// [VizierService.CreateStudy][google.cloud.aiplatform.v1.VizierService.CreateStudy].
109400///
109401/// [google.cloud.aiplatform.v1.VizierService.CreateStudy]: crate::client::VizierService::create_study
109402#[cfg(feature = "vizier-service")]
109403#[derive(Clone, Default, PartialEq)]
109404#[non_exhaustive]
109405pub struct CreateStudyRequest {
109406    /// Required. The resource name of the Location to create the CustomJob in.
109407    /// Format: `projects/{project}/locations/{location}`
109408    pub parent: std::string::String,
109409
109410    /// Required. The Study configuration used to create the Study.
109411    pub study: std::option::Option<crate::model::Study>,
109412
109413    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109414}
109415
109416#[cfg(feature = "vizier-service")]
109417impl CreateStudyRequest {
109418    pub fn new() -> Self {
109419        std::default::Default::default()
109420    }
109421
109422    /// Sets the value of [parent][crate::model::CreateStudyRequest::parent].
109423    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
109424        self.parent = v.into();
109425        self
109426    }
109427
109428    /// Sets the value of [study][crate::model::CreateStudyRequest::study].
109429    pub fn set_study<T>(mut self, v: T) -> Self
109430    where
109431        T: std::convert::Into<crate::model::Study>,
109432    {
109433        self.study = std::option::Option::Some(v.into());
109434        self
109435    }
109436
109437    /// Sets or clears the value of [study][crate::model::CreateStudyRequest::study].
109438    pub fn set_or_clear_study<T>(mut self, v: std::option::Option<T>) -> Self
109439    where
109440        T: std::convert::Into<crate::model::Study>,
109441    {
109442        self.study = v.map(|x| x.into());
109443        self
109444    }
109445}
109446
109447#[cfg(feature = "vizier-service")]
109448impl wkt::message::Message for CreateStudyRequest {
109449    fn typename() -> &'static str {
109450        "type.googleapis.com/google.cloud.aiplatform.v1.CreateStudyRequest"
109451    }
109452}
109453
109454/// Request message for
109455/// [VizierService.ListStudies][google.cloud.aiplatform.v1.VizierService.ListStudies].
109456///
109457/// [google.cloud.aiplatform.v1.VizierService.ListStudies]: crate::client::VizierService::list_studies
109458#[cfg(feature = "vizier-service")]
109459#[derive(Clone, Default, PartialEq)]
109460#[non_exhaustive]
109461pub struct ListStudiesRequest {
109462    /// Required. The resource name of the Location to list the Study from.
109463    /// Format: `projects/{project}/locations/{location}`
109464    pub parent: std::string::String,
109465
109466    /// Optional. A page token to request the next page of results.
109467    /// If unspecified, there are no subsequent pages.
109468    pub page_token: std::string::String,
109469
109470    /// Optional. The maximum number of studies to return per "page" of results.
109471    /// If unspecified, service will pick an appropriate default.
109472    pub page_size: i32,
109473
109474    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109475}
109476
109477#[cfg(feature = "vizier-service")]
109478impl ListStudiesRequest {
109479    pub fn new() -> Self {
109480        std::default::Default::default()
109481    }
109482
109483    /// Sets the value of [parent][crate::model::ListStudiesRequest::parent].
109484    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
109485        self.parent = v.into();
109486        self
109487    }
109488
109489    /// Sets the value of [page_token][crate::model::ListStudiesRequest::page_token].
109490    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
109491        self.page_token = v.into();
109492        self
109493    }
109494
109495    /// Sets the value of [page_size][crate::model::ListStudiesRequest::page_size].
109496    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
109497        self.page_size = v.into();
109498        self
109499    }
109500}
109501
109502#[cfg(feature = "vizier-service")]
109503impl wkt::message::Message for ListStudiesRequest {
109504    fn typename() -> &'static str {
109505        "type.googleapis.com/google.cloud.aiplatform.v1.ListStudiesRequest"
109506    }
109507}
109508
109509/// Response message for
109510/// [VizierService.ListStudies][google.cloud.aiplatform.v1.VizierService.ListStudies].
109511///
109512/// [google.cloud.aiplatform.v1.VizierService.ListStudies]: crate::client::VizierService::list_studies
109513#[cfg(feature = "vizier-service")]
109514#[derive(Clone, Default, PartialEq)]
109515#[non_exhaustive]
109516pub struct ListStudiesResponse {
109517    /// The studies associated with the project.
109518    pub studies: std::vec::Vec<crate::model::Study>,
109519
109520    /// Passes this token as the `page_token` field of the request for a
109521    /// subsequent call.
109522    /// If this field is omitted, there are no subsequent pages.
109523    pub next_page_token: std::string::String,
109524
109525    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109526}
109527
109528#[cfg(feature = "vizier-service")]
109529impl ListStudiesResponse {
109530    pub fn new() -> Self {
109531        std::default::Default::default()
109532    }
109533
109534    /// Sets the value of [studies][crate::model::ListStudiesResponse::studies].
109535    pub fn set_studies<T, V>(mut self, v: T) -> Self
109536    where
109537        T: std::iter::IntoIterator<Item = V>,
109538        V: std::convert::Into<crate::model::Study>,
109539    {
109540        use std::iter::Iterator;
109541        self.studies = v.into_iter().map(|i| i.into()).collect();
109542        self
109543    }
109544
109545    /// Sets the value of [next_page_token][crate::model::ListStudiesResponse::next_page_token].
109546    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
109547        self.next_page_token = v.into();
109548        self
109549    }
109550}
109551
109552#[cfg(feature = "vizier-service")]
109553impl wkt::message::Message for ListStudiesResponse {
109554    fn typename() -> &'static str {
109555        "type.googleapis.com/google.cloud.aiplatform.v1.ListStudiesResponse"
109556    }
109557}
109558
109559#[cfg(feature = "vizier-service")]
109560#[doc(hidden)]
109561impl gax::paginator::internal::PageableResponse for ListStudiesResponse {
109562    type PageItem = crate::model::Study;
109563
109564    fn items(self) -> std::vec::Vec<Self::PageItem> {
109565        self.studies
109566    }
109567
109568    fn next_page_token(&self) -> std::string::String {
109569        use std::clone::Clone;
109570        self.next_page_token.clone()
109571    }
109572}
109573
109574/// Request message for
109575/// [VizierService.DeleteStudy][google.cloud.aiplatform.v1.VizierService.DeleteStudy].
109576///
109577/// [google.cloud.aiplatform.v1.VizierService.DeleteStudy]: crate::client::VizierService::delete_study
109578#[cfg(feature = "vizier-service")]
109579#[derive(Clone, Default, PartialEq)]
109580#[non_exhaustive]
109581pub struct DeleteStudyRequest {
109582    /// Required. The name of the Study resource to be deleted.
109583    /// Format: `projects/{project}/locations/{location}/studies/{study}`
109584    pub name: std::string::String,
109585
109586    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109587}
109588
109589#[cfg(feature = "vizier-service")]
109590impl DeleteStudyRequest {
109591    pub fn new() -> Self {
109592        std::default::Default::default()
109593    }
109594
109595    /// Sets the value of [name][crate::model::DeleteStudyRequest::name].
109596    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
109597        self.name = v.into();
109598        self
109599    }
109600}
109601
109602#[cfg(feature = "vizier-service")]
109603impl wkt::message::Message for DeleteStudyRequest {
109604    fn typename() -> &'static str {
109605        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteStudyRequest"
109606    }
109607}
109608
109609/// Request message for
109610/// [VizierService.LookupStudy][google.cloud.aiplatform.v1.VizierService.LookupStudy].
109611///
109612/// [google.cloud.aiplatform.v1.VizierService.LookupStudy]: crate::client::VizierService::lookup_study
109613#[cfg(feature = "vizier-service")]
109614#[derive(Clone, Default, PartialEq)]
109615#[non_exhaustive]
109616pub struct LookupStudyRequest {
109617    /// Required. The resource name of the Location to get the Study from.
109618    /// Format: `projects/{project}/locations/{location}`
109619    pub parent: std::string::String,
109620
109621    /// Required. The user-defined display name of the Study
109622    pub display_name: std::string::String,
109623
109624    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109625}
109626
109627#[cfg(feature = "vizier-service")]
109628impl LookupStudyRequest {
109629    pub fn new() -> Self {
109630        std::default::Default::default()
109631    }
109632
109633    /// Sets the value of [parent][crate::model::LookupStudyRequest::parent].
109634    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
109635        self.parent = v.into();
109636        self
109637    }
109638
109639    /// Sets the value of [display_name][crate::model::LookupStudyRequest::display_name].
109640    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
109641        self.display_name = v.into();
109642        self
109643    }
109644}
109645
109646#[cfg(feature = "vizier-service")]
109647impl wkt::message::Message for LookupStudyRequest {
109648    fn typename() -> &'static str {
109649        "type.googleapis.com/google.cloud.aiplatform.v1.LookupStudyRequest"
109650    }
109651}
109652
109653/// Request message for
109654/// [VizierService.SuggestTrials][google.cloud.aiplatform.v1.VizierService.SuggestTrials].
109655///
109656/// [google.cloud.aiplatform.v1.VizierService.SuggestTrials]: crate::client::VizierService::suggest_trials
109657#[cfg(feature = "vizier-service")]
109658#[derive(Clone, Default, PartialEq)]
109659#[non_exhaustive]
109660pub struct SuggestTrialsRequest {
109661    /// Required. The project and location that the Study belongs to.
109662    /// Format: `projects/{project}/locations/{location}/studies/{study}`
109663    pub parent: std::string::String,
109664
109665    /// Required. The number of suggestions requested. It must be positive.
109666    pub suggestion_count: i32,
109667
109668    /// Required. The identifier of the client that is requesting the suggestion.
109669    ///
109670    /// If multiple SuggestTrialsRequests have the same `client_id`,
109671    /// the service will return the identical suggested Trial if the Trial is
109672    /// pending, and provide a new Trial if the last suggested Trial was completed.
109673    pub client_id: std::string::String,
109674
109675    /// Optional. This allows you to specify the "context" for a Trial; a context
109676    /// is a slice (a subspace) of the search space.
109677    ///
109678    /// Typical uses for contexts:
109679    ///
109680    /// 1. You are using Vizier to tune a server for best performance, but there's
109681    ///    a strong weekly cycle.  The context specifies the day-of-week.
109682    ///    This allows Tuesday to generalize from Wednesday without assuming that
109683    ///    everything is identical.
109684    /// 1. Imagine you're optimizing some medical treatment for people.
109685    ///    As they walk in the door, you know certain facts about them
109686    ///    (e.g. sex, weight, height, blood-pressure).  Put that information in the
109687    ///    context, and Vizier will adapt its suggestions to the patient.
109688    /// 1. You want to do a fair A/B test efficiently.  Specify the "A" and "B"
109689    ///    conditions as contexts, and Vizier will generalize between "A" and "B"
109690    ///    conditions.  If they are similar, this will allow Vizier to converge
109691    ///    to the optimum faster than if "A" and "B" were separate Studies.
109692    ///    NOTE: You can also enter contexts as REQUESTED Trials, e.g. via the
109693    ///    CreateTrial() RPC; that's the asynchronous option where you don't need a
109694    ///    close association between contexts and suggestions.
109695    ///
109696    /// NOTE: All the Parameters you set in a context MUST be defined in the
109697    /// Study.
109698    /// NOTE: You must supply 0 or $suggestion_count contexts.
109699    /// If you don't supply any contexts, Vizier will make suggestions
109700    /// from the full search space specified in the StudySpec; if you supply
109701    /// a full set of context, each suggestion will match the corresponding
109702    /// context.
109703    /// NOTE: A Context with no features set matches anything, and allows
109704    /// suggestions from the full search space.
109705    /// NOTE: Contexts MUST lie within the search space specified in the
109706    /// StudySpec.  It's an error if they don't.
109707    /// NOTE: Contexts preferentially match ACTIVE then REQUESTED trials before
109708    /// new suggestions are generated.
109709    /// NOTE: Generation of suggestions involves a match between a Context and
109710    /// (optionally) a REQUESTED trial; if that match is not fully specified, a
109711    /// suggestion will be geneated in the merged subspace.
109712    pub contexts: std::vec::Vec<crate::model::TrialContext>,
109713
109714    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109715}
109716
109717#[cfg(feature = "vizier-service")]
109718impl SuggestTrialsRequest {
109719    pub fn new() -> Self {
109720        std::default::Default::default()
109721    }
109722
109723    /// Sets the value of [parent][crate::model::SuggestTrialsRequest::parent].
109724    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
109725        self.parent = v.into();
109726        self
109727    }
109728
109729    /// Sets the value of [suggestion_count][crate::model::SuggestTrialsRequest::suggestion_count].
109730    pub fn set_suggestion_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
109731        self.suggestion_count = v.into();
109732        self
109733    }
109734
109735    /// Sets the value of [client_id][crate::model::SuggestTrialsRequest::client_id].
109736    pub fn set_client_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
109737        self.client_id = v.into();
109738        self
109739    }
109740
109741    /// Sets the value of [contexts][crate::model::SuggestTrialsRequest::contexts].
109742    pub fn set_contexts<T, V>(mut self, v: T) -> Self
109743    where
109744        T: std::iter::IntoIterator<Item = V>,
109745        V: std::convert::Into<crate::model::TrialContext>,
109746    {
109747        use std::iter::Iterator;
109748        self.contexts = v.into_iter().map(|i| i.into()).collect();
109749        self
109750    }
109751}
109752
109753#[cfg(feature = "vizier-service")]
109754impl wkt::message::Message for SuggestTrialsRequest {
109755    fn typename() -> &'static str {
109756        "type.googleapis.com/google.cloud.aiplatform.v1.SuggestTrialsRequest"
109757    }
109758}
109759
109760/// Response message for
109761/// [VizierService.SuggestTrials][google.cloud.aiplatform.v1.VizierService.SuggestTrials].
109762///
109763/// [google.cloud.aiplatform.v1.VizierService.SuggestTrials]: crate::client::VizierService::suggest_trials
109764#[cfg(feature = "vizier-service")]
109765#[derive(Clone, Default, PartialEq)]
109766#[non_exhaustive]
109767pub struct SuggestTrialsResponse {
109768    /// A list of Trials.
109769    pub trials: std::vec::Vec<crate::model::Trial>,
109770
109771    /// The state of the Study.
109772    pub study_state: crate::model::study::State,
109773
109774    /// The time at which the operation was started.
109775    pub start_time: std::option::Option<wkt::Timestamp>,
109776
109777    /// The time at which operation processing completed.
109778    pub end_time: std::option::Option<wkt::Timestamp>,
109779
109780    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109781}
109782
109783#[cfg(feature = "vizier-service")]
109784impl SuggestTrialsResponse {
109785    pub fn new() -> Self {
109786        std::default::Default::default()
109787    }
109788
109789    /// Sets the value of [trials][crate::model::SuggestTrialsResponse::trials].
109790    pub fn set_trials<T, V>(mut self, v: T) -> Self
109791    where
109792        T: std::iter::IntoIterator<Item = V>,
109793        V: std::convert::Into<crate::model::Trial>,
109794    {
109795        use std::iter::Iterator;
109796        self.trials = v.into_iter().map(|i| i.into()).collect();
109797        self
109798    }
109799
109800    /// Sets the value of [study_state][crate::model::SuggestTrialsResponse::study_state].
109801    pub fn set_study_state<T: std::convert::Into<crate::model::study::State>>(
109802        mut self,
109803        v: T,
109804    ) -> Self {
109805        self.study_state = v.into();
109806        self
109807    }
109808
109809    /// Sets the value of [start_time][crate::model::SuggestTrialsResponse::start_time].
109810    pub fn set_start_time<T>(mut self, v: T) -> Self
109811    where
109812        T: std::convert::Into<wkt::Timestamp>,
109813    {
109814        self.start_time = std::option::Option::Some(v.into());
109815        self
109816    }
109817
109818    /// Sets or clears the value of [start_time][crate::model::SuggestTrialsResponse::start_time].
109819    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
109820    where
109821        T: std::convert::Into<wkt::Timestamp>,
109822    {
109823        self.start_time = v.map(|x| x.into());
109824        self
109825    }
109826
109827    /// Sets the value of [end_time][crate::model::SuggestTrialsResponse::end_time].
109828    pub fn set_end_time<T>(mut self, v: T) -> Self
109829    where
109830        T: std::convert::Into<wkt::Timestamp>,
109831    {
109832        self.end_time = std::option::Option::Some(v.into());
109833        self
109834    }
109835
109836    /// Sets or clears the value of [end_time][crate::model::SuggestTrialsResponse::end_time].
109837    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
109838    where
109839        T: std::convert::Into<wkt::Timestamp>,
109840    {
109841        self.end_time = v.map(|x| x.into());
109842        self
109843    }
109844}
109845
109846#[cfg(feature = "vizier-service")]
109847impl wkt::message::Message for SuggestTrialsResponse {
109848    fn typename() -> &'static str {
109849        "type.googleapis.com/google.cloud.aiplatform.v1.SuggestTrialsResponse"
109850    }
109851}
109852
109853/// Details of operations that perform Trials suggestion.
109854#[cfg(feature = "vizier-service")]
109855#[derive(Clone, Default, PartialEq)]
109856#[non_exhaustive]
109857pub struct SuggestTrialsMetadata {
109858    /// Operation metadata for suggesting Trials.
109859    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
109860
109861    /// The identifier of the client that is requesting the suggestion.
109862    ///
109863    /// If multiple SuggestTrialsRequests have the same `client_id`,
109864    /// the service will return the identical suggested Trial if the Trial is
109865    /// pending, and provide a new Trial if the last suggested Trial was completed.
109866    pub client_id: std::string::String,
109867
109868    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109869}
109870
109871#[cfg(feature = "vizier-service")]
109872impl SuggestTrialsMetadata {
109873    pub fn new() -> Self {
109874        std::default::Default::default()
109875    }
109876
109877    /// Sets the value of [generic_metadata][crate::model::SuggestTrialsMetadata::generic_metadata].
109878    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
109879    where
109880        T: std::convert::Into<crate::model::GenericOperationMetadata>,
109881    {
109882        self.generic_metadata = std::option::Option::Some(v.into());
109883        self
109884    }
109885
109886    /// Sets or clears the value of [generic_metadata][crate::model::SuggestTrialsMetadata::generic_metadata].
109887    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
109888    where
109889        T: std::convert::Into<crate::model::GenericOperationMetadata>,
109890    {
109891        self.generic_metadata = v.map(|x| x.into());
109892        self
109893    }
109894
109895    /// Sets the value of [client_id][crate::model::SuggestTrialsMetadata::client_id].
109896    pub fn set_client_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
109897        self.client_id = v.into();
109898        self
109899    }
109900}
109901
109902#[cfg(feature = "vizier-service")]
109903impl wkt::message::Message for SuggestTrialsMetadata {
109904    fn typename() -> &'static str {
109905        "type.googleapis.com/google.cloud.aiplatform.v1.SuggestTrialsMetadata"
109906    }
109907}
109908
109909/// Request message for
109910/// [VizierService.CreateTrial][google.cloud.aiplatform.v1.VizierService.CreateTrial].
109911///
109912/// [google.cloud.aiplatform.v1.VizierService.CreateTrial]: crate::client::VizierService::create_trial
109913#[cfg(feature = "vizier-service")]
109914#[derive(Clone, Default, PartialEq)]
109915#[non_exhaustive]
109916pub struct CreateTrialRequest {
109917    /// Required. The resource name of the Study to create the Trial in.
109918    /// Format: `projects/{project}/locations/{location}/studies/{study}`
109919    pub parent: std::string::String,
109920
109921    /// Required. The Trial to create.
109922    pub trial: std::option::Option<crate::model::Trial>,
109923
109924    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109925}
109926
109927#[cfg(feature = "vizier-service")]
109928impl CreateTrialRequest {
109929    pub fn new() -> Self {
109930        std::default::Default::default()
109931    }
109932
109933    /// Sets the value of [parent][crate::model::CreateTrialRequest::parent].
109934    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
109935        self.parent = v.into();
109936        self
109937    }
109938
109939    /// Sets the value of [trial][crate::model::CreateTrialRequest::trial].
109940    pub fn set_trial<T>(mut self, v: T) -> Self
109941    where
109942        T: std::convert::Into<crate::model::Trial>,
109943    {
109944        self.trial = std::option::Option::Some(v.into());
109945        self
109946    }
109947
109948    /// Sets or clears the value of [trial][crate::model::CreateTrialRequest::trial].
109949    pub fn set_or_clear_trial<T>(mut self, v: std::option::Option<T>) -> Self
109950    where
109951        T: std::convert::Into<crate::model::Trial>,
109952    {
109953        self.trial = v.map(|x| x.into());
109954        self
109955    }
109956}
109957
109958#[cfg(feature = "vizier-service")]
109959impl wkt::message::Message for CreateTrialRequest {
109960    fn typename() -> &'static str {
109961        "type.googleapis.com/google.cloud.aiplatform.v1.CreateTrialRequest"
109962    }
109963}
109964
109965/// Request message for
109966/// [VizierService.GetTrial][google.cloud.aiplatform.v1.VizierService.GetTrial].
109967///
109968/// [google.cloud.aiplatform.v1.VizierService.GetTrial]: crate::client::VizierService::get_trial
109969#[cfg(feature = "vizier-service")]
109970#[derive(Clone, Default, PartialEq)]
109971#[non_exhaustive]
109972pub struct GetTrialRequest {
109973    /// Required. The name of the Trial resource.
109974    /// Format:
109975    /// `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
109976    pub name: std::string::String,
109977
109978    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109979}
109980
109981#[cfg(feature = "vizier-service")]
109982impl GetTrialRequest {
109983    pub fn new() -> Self {
109984        std::default::Default::default()
109985    }
109986
109987    /// Sets the value of [name][crate::model::GetTrialRequest::name].
109988    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
109989        self.name = v.into();
109990        self
109991    }
109992}
109993
109994#[cfg(feature = "vizier-service")]
109995impl wkt::message::Message for GetTrialRequest {
109996    fn typename() -> &'static str {
109997        "type.googleapis.com/google.cloud.aiplatform.v1.GetTrialRequest"
109998    }
109999}
110000
110001/// Request message for
110002/// [VizierService.ListTrials][google.cloud.aiplatform.v1.VizierService.ListTrials].
110003///
110004/// [google.cloud.aiplatform.v1.VizierService.ListTrials]: crate::client::VizierService::list_trials
110005#[cfg(feature = "vizier-service")]
110006#[derive(Clone, Default, PartialEq)]
110007#[non_exhaustive]
110008pub struct ListTrialsRequest {
110009    /// Required. The resource name of the Study to list the Trial from.
110010    /// Format: `projects/{project}/locations/{location}/studies/{study}`
110011    pub parent: std::string::String,
110012
110013    /// Optional. A page token to request the next page of results.
110014    /// If unspecified, there are no subsequent pages.
110015    pub page_token: std::string::String,
110016
110017    /// Optional. The number of Trials to retrieve per "page" of results.
110018    /// If unspecified, the service will pick an appropriate default.
110019    pub page_size: i32,
110020
110021    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
110022}
110023
110024#[cfg(feature = "vizier-service")]
110025impl ListTrialsRequest {
110026    pub fn new() -> Self {
110027        std::default::Default::default()
110028    }
110029
110030    /// Sets the value of [parent][crate::model::ListTrialsRequest::parent].
110031    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
110032        self.parent = v.into();
110033        self
110034    }
110035
110036    /// Sets the value of [page_token][crate::model::ListTrialsRequest::page_token].
110037    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
110038        self.page_token = v.into();
110039        self
110040    }
110041
110042    /// Sets the value of [page_size][crate::model::ListTrialsRequest::page_size].
110043    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
110044        self.page_size = v.into();
110045        self
110046    }
110047}
110048
110049#[cfg(feature = "vizier-service")]
110050impl wkt::message::Message for ListTrialsRequest {
110051    fn typename() -> &'static str {
110052        "type.googleapis.com/google.cloud.aiplatform.v1.ListTrialsRequest"
110053    }
110054}
110055
110056/// Response message for
110057/// [VizierService.ListTrials][google.cloud.aiplatform.v1.VizierService.ListTrials].
110058///
110059/// [google.cloud.aiplatform.v1.VizierService.ListTrials]: crate::client::VizierService::list_trials
110060#[cfg(feature = "vizier-service")]
110061#[derive(Clone, Default, PartialEq)]
110062#[non_exhaustive]
110063pub struct ListTrialsResponse {
110064    /// The Trials associated with the Study.
110065    pub trials: std::vec::Vec<crate::model::Trial>,
110066
110067    /// Pass this token as the `page_token` field of the request for a
110068    /// subsequent call.
110069    /// If this field is omitted, there are no subsequent pages.
110070    pub next_page_token: std::string::String,
110071
110072    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
110073}
110074
110075#[cfg(feature = "vizier-service")]
110076impl ListTrialsResponse {
110077    pub fn new() -> Self {
110078        std::default::Default::default()
110079    }
110080
110081    /// Sets the value of [trials][crate::model::ListTrialsResponse::trials].
110082    pub fn set_trials<T, V>(mut self, v: T) -> Self
110083    where
110084        T: std::iter::IntoIterator<Item = V>,
110085        V: std::convert::Into<crate::model::Trial>,
110086    {
110087        use std::iter::Iterator;
110088        self.trials = v.into_iter().map(|i| i.into()).collect();
110089        self
110090    }
110091
110092    /// Sets the value of [next_page_token][crate::model::ListTrialsResponse::next_page_token].
110093    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
110094        self.next_page_token = v.into();
110095        self
110096    }
110097}
110098
110099#[cfg(feature = "vizier-service")]
110100impl wkt::message::Message for ListTrialsResponse {
110101    fn typename() -> &'static str {
110102        "type.googleapis.com/google.cloud.aiplatform.v1.ListTrialsResponse"
110103    }
110104}
110105
110106#[cfg(feature = "vizier-service")]
110107#[doc(hidden)]
110108impl gax::paginator::internal::PageableResponse for ListTrialsResponse {
110109    type PageItem = crate::model::Trial;
110110
110111    fn items(self) -> std::vec::Vec<Self::PageItem> {
110112        self.trials
110113    }
110114
110115    fn next_page_token(&self) -> std::string::String {
110116        use std::clone::Clone;
110117        self.next_page_token.clone()
110118    }
110119}
110120
110121/// Request message for
110122/// [VizierService.AddTrialMeasurement][google.cloud.aiplatform.v1.VizierService.AddTrialMeasurement].
110123///
110124/// [google.cloud.aiplatform.v1.VizierService.AddTrialMeasurement]: crate::client::VizierService::add_trial_measurement
110125#[cfg(feature = "vizier-service")]
110126#[derive(Clone, Default, PartialEq)]
110127#[non_exhaustive]
110128pub struct AddTrialMeasurementRequest {
110129    /// Required. The name of the trial to add measurement.
110130    /// Format:
110131    /// `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
110132    pub trial_name: std::string::String,
110133
110134    /// Required. The measurement to be added to a Trial.
110135    pub measurement: std::option::Option<crate::model::Measurement>,
110136
110137    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
110138}
110139
110140#[cfg(feature = "vizier-service")]
110141impl AddTrialMeasurementRequest {
110142    pub fn new() -> Self {
110143        std::default::Default::default()
110144    }
110145
110146    /// Sets the value of [trial_name][crate::model::AddTrialMeasurementRequest::trial_name].
110147    pub fn set_trial_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
110148        self.trial_name = v.into();
110149        self
110150    }
110151
110152    /// Sets the value of [measurement][crate::model::AddTrialMeasurementRequest::measurement].
110153    pub fn set_measurement<T>(mut self, v: T) -> Self
110154    where
110155        T: std::convert::Into<crate::model::Measurement>,
110156    {
110157        self.measurement = std::option::Option::Some(v.into());
110158        self
110159    }
110160
110161    /// Sets or clears the value of [measurement][crate::model::AddTrialMeasurementRequest::measurement].
110162    pub fn set_or_clear_measurement<T>(mut self, v: std::option::Option<T>) -> Self
110163    where
110164        T: std::convert::Into<crate::model::Measurement>,
110165    {
110166        self.measurement = v.map(|x| x.into());
110167        self
110168    }
110169}
110170
110171#[cfg(feature = "vizier-service")]
110172impl wkt::message::Message for AddTrialMeasurementRequest {
110173    fn typename() -> &'static str {
110174        "type.googleapis.com/google.cloud.aiplatform.v1.AddTrialMeasurementRequest"
110175    }
110176}
110177
110178/// Request message for
110179/// [VizierService.CompleteTrial][google.cloud.aiplatform.v1.VizierService.CompleteTrial].
110180///
110181/// [google.cloud.aiplatform.v1.VizierService.CompleteTrial]: crate::client::VizierService::complete_trial
110182#[cfg(feature = "vizier-service")]
110183#[derive(Clone, Default, PartialEq)]
110184#[non_exhaustive]
110185pub struct CompleteTrialRequest {
110186    /// Required. The Trial's name.
110187    /// Format:
110188    /// `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
110189    pub name: std::string::String,
110190
110191    /// Optional. If provided, it will be used as the completed Trial's
110192    /// final_measurement; Otherwise, the service will auto-select a
110193    /// previously reported measurement as the final-measurement
110194    pub final_measurement: std::option::Option<crate::model::Measurement>,
110195
110196    /// Optional. True if the Trial cannot be run with the given Parameter, and
110197    /// final_measurement will be ignored.
110198    pub trial_infeasible: bool,
110199
110200    /// Optional. A human readable reason why the trial was infeasible. This should
110201    /// only be provided if `trial_infeasible` is true.
110202    pub infeasible_reason: std::string::String,
110203
110204    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
110205}
110206
110207#[cfg(feature = "vizier-service")]
110208impl CompleteTrialRequest {
110209    pub fn new() -> Self {
110210        std::default::Default::default()
110211    }
110212
110213    /// Sets the value of [name][crate::model::CompleteTrialRequest::name].
110214    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
110215        self.name = v.into();
110216        self
110217    }
110218
110219    /// Sets the value of [final_measurement][crate::model::CompleteTrialRequest::final_measurement].
110220    pub fn set_final_measurement<T>(mut self, v: T) -> Self
110221    where
110222        T: std::convert::Into<crate::model::Measurement>,
110223    {
110224        self.final_measurement = std::option::Option::Some(v.into());
110225        self
110226    }
110227
110228    /// Sets or clears the value of [final_measurement][crate::model::CompleteTrialRequest::final_measurement].
110229    pub fn set_or_clear_final_measurement<T>(mut self, v: std::option::Option<T>) -> Self
110230    where
110231        T: std::convert::Into<crate::model::Measurement>,
110232    {
110233        self.final_measurement = v.map(|x| x.into());
110234        self
110235    }
110236
110237    /// Sets the value of [trial_infeasible][crate::model::CompleteTrialRequest::trial_infeasible].
110238    pub fn set_trial_infeasible<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
110239        self.trial_infeasible = v.into();
110240        self
110241    }
110242
110243    /// Sets the value of [infeasible_reason][crate::model::CompleteTrialRequest::infeasible_reason].
110244    pub fn set_infeasible_reason<T: std::convert::Into<std::string::String>>(
110245        mut self,
110246        v: T,
110247    ) -> Self {
110248        self.infeasible_reason = v.into();
110249        self
110250    }
110251}
110252
110253#[cfg(feature = "vizier-service")]
110254impl wkt::message::Message for CompleteTrialRequest {
110255    fn typename() -> &'static str {
110256        "type.googleapis.com/google.cloud.aiplatform.v1.CompleteTrialRequest"
110257    }
110258}
110259
110260/// Request message for
110261/// [VizierService.DeleteTrial][google.cloud.aiplatform.v1.VizierService.DeleteTrial].
110262///
110263/// [google.cloud.aiplatform.v1.VizierService.DeleteTrial]: crate::client::VizierService::delete_trial
110264#[cfg(feature = "vizier-service")]
110265#[derive(Clone, Default, PartialEq)]
110266#[non_exhaustive]
110267pub struct DeleteTrialRequest {
110268    /// Required. The Trial's name.
110269    /// Format:
110270    /// `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
110271    pub name: std::string::String,
110272
110273    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
110274}
110275
110276#[cfg(feature = "vizier-service")]
110277impl DeleteTrialRequest {
110278    pub fn new() -> Self {
110279        std::default::Default::default()
110280    }
110281
110282    /// Sets the value of [name][crate::model::DeleteTrialRequest::name].
110283    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
110284        self.name = v.into();
110285        self
110286    }
110287}
110288
110289#[cfg(feature = "vizier-service")]
110290impl wkt::message::Message for DeleteTrialRequest {
110291    fn typename() -> &'static str {
110292        "type.googleapis.com/google.cloud.aiplatform.v1.DeleteTrialRequest"
110293    }
110294}
110295
110296/// Request message for
110297/// [VizierService.CheckTrialEarlyStoppingState][google.cloud.aiplatform.v1.VizierService.CheckTrialEarlyStoppingState].
110298///
110299/// [google.cloud.aiplatform.v1.VizierService.CheckTrialEarlyStoppingState]: crate::client::VizierService::check_trial_early_stopping_state
110300#[cfg(feature = "vizier-service")]
110301#[derive(Clone, Default, PartialEq)]
110302#[non_exhaustive]
110303pub struct CheckTrialEarlyStoppingStateRequest {
110304    /// Required. The Trial's name.
110305    /// Format:
110306    /// `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
110307    pub trial_name: std::string::String,
110308
110309    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
110310}
110311
110312#[cfg(feature = "vizier-service")]
110313impl CheckTrialEarlyStoppingStateRequest {
110314    pub fn new() -> Self {
110315        std::default::Default::default()
110316    }
110317
110318    /// Sets the value of [trial_name][crate::model::CheckTrialEarlyStoppingStateRequest::trial_name].
110319    pub fn set_trial_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
110320        self.trial_name = v.into();
110321        self
110322    }
110323}
110324
110325#[cfg(feature = "vizier-service")]
110326impl wkt::message::Message for CheckTrialEarlyStoppingStateRequest {
110327    fn typename() -> &'static str {
110328        "type.googleapis.com/google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateRequest"
110329    }
110330}
110331
110332/// Response message for
110333/// [VizierService.CheckTrialEarlyStoppingState][google.cloud.aiplatform.v1.VizierService.CheckTrialEarlyStoppingState].
110334///
110335/// [google.cloud.aiplatform.v1.VizierService.CheckTrialEarlyStoppingState]: crate::client::VizierService::check_trial_early_stopping_state
110336#[cfg(feature = "vizier-service")]
110337#[derive(Clone, Default, PartialEq)]
110338#[non_exhaustive]
110339pub struct CheckTrialEarlyStoppingStateResponse {
110340    /// True if the Trial should stop.
110341    pub should_stop: bool,
110342
110343    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
110344}
110345
110346#[cfg(feature = "vizier-service")]
110347impl CheckTrialEarlyStoppingStateResponse {
110348    pub fn new() -> Self {
110349        std::default::Default::default()
110350    }
110351
110352    /// Sets the value of [should_stop][crate::model::CheckTrialEarlyStoppingStateResponse::should_stop].
110353    pub fn set_should_stop<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
110354        self.should_stop = v.into();
110355        self
110356    }
110357}
110358
110359#[cfg(feature = "vizier-service")]
110360impl wkt::message::Message for CheckTrialEarlyStoppingStateResponse {
110361    fn typename() -> &'static str {
110362        "type.googleapis.com/google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateResponse"
110363    }
110364}
110365
110366/// This message will be placed in the metadata field of a
110367/// google.longrunning.Operation associated with a CheckTrialEarlyStoppingState
110368/// request.
110369#[cfg(feature = "vizier-service")]
110370#[derive(Clone, Default, PartialEq)]
110371#[non_exhaustive]
110372pub struct CheckTrialEarlyStoppingStateMetatdata {
110373    /// Operation metadata for suggesting Trials.
110374    pub generic_metadata: std::option::Option<crate::model::GenericOperationMetadata>,
110375
110376    /// The name of the Study that the Trial belongs to.
110377    pub study: std::string::String,
110378
110379    /// The Trial name.
110380    pub trial: std::string::String,
110381
110382    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
110383}
110384
110385#[cfg(feature = "vizier-service")]
110386impl CheckTrialEarlyStoppingStateMetatdata {
110387    pub fn new() -> Self {
110388        std::default::Default::default()
110389    }
110390
110391    /// Sets the value of [generic_metadata][crate::model::CheckTrialEarlyStoppingStateMetatdata::generic_metadata].
110392    pub fn set_generic_metadata<T>(mut self, v: T) -> Self
110393    where
110394        T: std::convert::Into<crate::model::GenericOperationMetadata>,
110395    {
110396        self.generic_metadata = std::option::Option::Some(v.into());
110397        self
110398    }
110399
110400    /// Sets or clears the value of [generic_metadata][crate::model::CheckTrialEarlyStoppingStateMetatdata::generic_metadata].
110401    pub fn set_or_clear_generic_metadata<T>(mut self, v: std::option::Option<T>) -> Self
110402    where
110403        T: std::convert::Into<crate::model::GenericOperationMetadata>,
110404    {
110405        self.generic_metadata = v.map(|x| x.into());
110406        self
110407    }
110408
110409    /// Sets the value of [study][crate::model::CheckTrialEarlyStoppingStateMetatdata::study].
110410    pub fn set_study<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
110411        self.study = v.into();
110412        self
110413    }
110414
110415    /// Sets the value of [trial][crate::model::CheckTrialEarlyStoppingStateMetatdata::trial].
110416    pub fn set_trial<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
110417        self.trial = v.into();
110418        self
110419    }
110420}
110421
110422#[cfg(feature = "vizier-service")]
110423impl wkt::message::Message for CheckTrialEarlyStoppingStateMetatdata {
110424    fn typename() -> &'static str {
110425        "type.googleapis.com/google.cloud.aiplatform.v1.CheckTrialEarlyStoppingStateMetatdata"
110426    }
110427}
110428
110429/// Request message for
110430/// [VizierService.StopTrial][google.cloud.aiplatform.v1.VizierService.StopTrial].
110431///
110432/// [google.cloud.aiplatform.v1.VizierService.StopTrial]: crate::client::VizierService::stop_trial
110433#[cfg(feature = "vizier-service")]
110434#[derive(Clone, Default, PartialEq)]
110435#[non_exhaustive]
110436pub struct StopTrialRequest {
110437    /// Required. The Trial's name.
110438    /// Format:
110439    /// `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
110440    pub name: std::string::String,
110441
110442    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
110443}
110444
110445#[cfg(feature = "vizier-service")]
110446impl StopTrialRequest {
110447    pub fn new() -> Self {
110448        std::default::Default::default()
110449    }
110450
110451    /// Sets the value of [name][crate::model::StopTrialRequest::name].
110452    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
110453        self.name = v.into();
110454        self
110455    }
110456}
110457
110458#[cfg(feature = "vizier-service")]
110459impl wkt::message::Message for StopTrialRequest {
110460    fn typename() -> &'static str {
110461        "type.googleapis.com/google.cloud.aiplatform.v1.StopTrialRequest"
110462    }
110463}
110464
110465/// Request message for
110466/// [VizierService.ListOptimalTrials][google.cloud.aiplatform.v1.VizierService.ListOptimalTrials].
110467///
110468/// [google.cloud.aiplatform.v1.VizierService.ListOptimalTrials]: crate::client::VizierService::list_optimal_trials
110469#[cfg(feature = "vizier-service")]
110470#[derive(Clone, Default, PartialEq)]
110471#[non_exhaustive]
110472pub struct ListOptimalTrialsRequest {
110473    /// Required. The name of the Study that the optimal Trial belongs to.
110474    pub parent: std::string::String,
110475
110476    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
110477}
110478
110479#[cfg(feature = "vizier-service")]
110480impl ListOptimalTrialsRequest {
110481    pub fn new() -> Self {
110482        std::default::Default::default()
110483    }
110484
110485    /// Sets the value of [parent][crate::model::ListOptimalTrialsRequest::parent].
110486    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
110487        self.parent = v.into();
110488        self
110489    }
110490}
110491
110492#[cfg(feature = "vizier-service")]
110493impl wkt::message::Message for ListOptimalTrialsRequest {
110494    fn typename() -> &'static str {
110495        "type.googleapis.com/google.cloud.aiplatform.v1.ListOptimalTrialsRequest"
110496    }
110497}
110498
110499/// Response message for
110500/// [VizierService.ListOptimalTrials][google.cloud.aiplatform.v1.VizierService.ListOptimalTrials].
110501///
110502/// [google.cloud.aiplatform.v1.VizierService.ListOptimalTrials]: crate::client::VizierService::list_optimal_trials
110503#[cfg(feature = "vizier-service")]
110504#[derive(Clone, Default, PartialEq)]
110505#[non_exhaustive]
110506pub struct ListOptimalTrialsResponse {
110507    /// The pareto-optimal Trials for multiple objective Study or the
110508    /// optimal trial for single objective Study. The definition of
110509    /// pareto-optimal can be checked in wiki page.
110510    /// <https://en.wikipedia.org/wiki/Pareto_efficiency>
110511    pub optimal_trials: std::vec::Vec<crate::model::Trial>,
110512
110513    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
110514}
110515
110516#[cfg(feature = "vizier-service")]
110517impl ListOptimalTrialsResponse {
110518    pub fn new() -> Self {
110519        std::default::Default::default()
110520    }
110521
110522    /// Sets the value of [optimal_trials][crate::model::ListOptimalTrialsResponse::optimal_trials].
110523    pub fn set_optimal_trials<T, V>(mut self, v: T) -> Self
110524    where
110525        T: std::iter::IntoIterator<Item = V>,
110526        V: std::convert::Into<crate::model::Trial>,
110527    {
110528        use std::iter::Iterator;
110529        self.optimal_trials = v.into_iter().map(|i| i.into()).collect();
110530        self
110531    }
110532}
110533
110534#[cfg(feature = "vizier-service")]
110535impl wkt::message::Message for ListOptimalTrialsResponse {
110536    fn typename() -> &'static str {
110537        "type.googleapis.com/google.cloud.aiplatform.v1.ListOptimalTrialsResponse"
110538    }
110539}
110540
110541/// Represents a hardware accelerator type.
110542///
110543/// # Working with unknown values
110544///
110545/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
110546/// additional enum variants at any time. Adding new variants is not considered
110547/// a breaking change. Applications should write their code in anticipation of:
110548///
110549/// - New values appearing in future releases of the client library, **and**
110550/// - New values received dynamically, without application changes.
110551///
110552/// Please consult the [Working with enums] section in the user guide for some
110553/// guidelines.
110554///
110555/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
110556#[cfg(any(
110557    feature = "deployment-resource-pool-service",
110558    feature = "endpoint-service",
110559    feature = "index-endpoint-service",
110560    feature = "job-service",
110561    feature = "model-garden-service",
110562    feature = "notebook-service",
110563    feature = "persistent-resource-service",
110564    feature = "schedule-service",
110565))]
110566#[derive(Clone, Debug, PartialEq)]
110567#[non_exhaustive]
110568pub enum AcceleratorType {
110569    /// Unspecified accelerator type, which means no accelerator.
110570    Unspecified,
110571    /// Deprecated: Nvidia Tesla K80 GPU has reached end of support,
110572    /// see <https://cloud.google.com/compute/docs/eol/k80-eol>.
110573    #[deprecated]
110574    NvidiaTeslaK80,
110575    /// Nvidia Tesla P100 GPU.
110576    NvidiaTeslaP100,
110577    /// Nvidia Tesla V100 GPU.
110578    NvidiaTeslaV100,
110579    /// Nvidia Tesla P4 GPU.
110580    NvidiaTeslaP4,
110581    /// Nvidia Tesla T4 GPU.
110582    NvidiaTeslaT4,
110583    /// Nvidia Tesla A100 GPU.
110584    NvidiaTeslaA100,
110585    /// Nvidia A100 80GB GPU.
110586    NvidiaA10080Gb,
110587    /// Nvidia L4 GPU.
110588    NvidiaL4,
110589    /// Nvidia H100 80Gb GPU.
110590    NvidiaH10080Gb,
110591    /// Nvidia H100 Mega 80Gb GPU.
110592    NvidiaH100Mega80Gb,
110593    /// Nvidia H200 141Gb GPU.
110594    NvidiaH200141Gb,
110595    /// Nvidia B200 GPU.
110596    NvidiaB200,
110597    /// Nvidia GB200 GPU.
110598    NvidiaGb200,
110599    /// Nvidia RTX Pro 6000 GPU.
110600    NvidiaRtxPro6000,
110601    /// TPU v2.
110602    TpuV2,
110603    /// TPU v3.
110604    TpuV3,
110605    /// TPU v4.
110606    TpuV4Pod,
110607    /// TPU v5.
110608    TpuV5Litepod,
110609    /// If set, the enum was initialized with an unknown value.
110610    ///
110611    /// Applications can examine the value using [AcceleratorType::value] or
110612    /// [AcceleratorType::name].
110613    UnknownValue(accelerator_type::UnknownValue),
110614}
110615
110616#[doc(hidden)]
110617#[cfg(any(
110618    feature = "deployment-resource-pool-service",
110619    feature = "endpoint-service",
110620    feature = "index-endpoint-service",
110621    feature = "job-service",
110622    feature = "model-garden-service",
110623    feature = "notebook-service",
110624    feature = "persistent-resource-service",
110625    feature = "schedule-service",
110626))]
110627pub mod accelerator_type {
110628    #[allow(unused_imports)]
110629    use super::*;
110630    #[derive(Clone, Debug, PartialEq)]
110631    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
110632}
110633
110634#[cfg(any(
110635    feature = "deployment-resource-pool-service",
110636    feature = "endpoint-service",
110637    feature = "index-endpoint-service",
110638    feature = "job-service",
110639    feature = "model-garden-service",
110640    feature = "notebook-service",
110641    feature = "persistent-resource-service",
110642    feature = "schedule-service",
110643))]
110644impl AcceleratorType {
110645    /// Gets the enum value.
110646    ///
110647    /// Returns `None` if the enum contains an unknown value deserialized from
110648    /// the string representation of enums.
110649    pub fn value(&self) -> std::option::Option<i32> {
110650        match self {
110651            Self::Unspecified => std::option::Option::Some(0),
110652            Self::NvidiaTeslaK80 => std::option::Option::Some(1),
110653            Self::NvidiaTeslaP100 => std::option::Option::Some(2),
110654            Self::NvidiaTeslaV100 => std::option::Option::Some(3),
110655            Self::NvidiaTeslaP4 => std::option::Option::Some(4),
110656            Self::NvidiaTeslaT4 => std::option::Option::Some(5),
110657            Self::NvidiaTeslaA100 => std::option::Option::Some(8),
110658            Self::NvidiaA10080Gb => std::option::Option::Some(9),
110659            Self::NvidiaL4 => std::option::Option::Some(11),
110660            Self::NvidiaH10080Gb => std::option::Option::Some(13),
110661            Self::NvidiaH100Mega80Gb => std::option::Option::Some(14),
110662            Self::NvidiaH200141Gb => std::option::Option::Some(15),
110663            Self::NvidiaB200 => std::option::Option::Some(16),
110664            Self::NvidiaGb200 => std::option::Option::Some(17),
110665            Self::NvidiaRtxPro6000 => std::option::Option::Some(18),
110666            Self::TpuV2 => std::option::Option::Some(6),
110667            Self::TpuV3 => std::option::Option::Some(7),
110668            Self::TpuV4Pod => std::option::Option::Some(10),
110669            Self::TpuV5Litepod => std::option::Option::Some(12),
110670            Self::UnknownValue(u) => u.0.value(),
110671        }
110672    }
110673
110674    /// Gets the enum value as a string.
110675    ///
110676    /// Returns `None` if the enum contains an unknown value deserialized from
110677    /// the integer representation of enums.
110678    pub fn name(&self) -> std::option::Option<&str> {
110679        match self {
110680            Self::Unspecified => std::option::Option::Some("ACCELERATOR_TYPE_UNSPECIFIED"),
110681            Self::NvidiaTeslaK80 => std::option::Option::Some("NVIDIA_TESLA_K80"),
110682            Self::NvidiaTeslaP100 => std::option::Option::Some("NVIDIA_TESLA_P100"),
110683            Self::NvidiaTeslaV100 => std::option::Option::Some("NVIDIA_TESLA_V100"),
110684            Self::NvidiaTeslaP4 => std::option::Option::Some("NVIDIA_TESLA_P4"),
110685            Self::NvidiaTeslaT4 => std::option::Option::Some("NVIDIA_TESLA_T4"),
110686            Self::NvidiaTeslaA100 => std::option::Option::Some("NVIDIA_TESLA_A100"),
110687            Self::NvidiaA10080Gb => std::option::Option::Some("NVIDIA_A100_80GB"),
110688            Self::NvidiaL4 => std::option::Option::Some("NVIDIA_L4"),
110689            Self::NvidiaH10080Gb => std::option::Option::Some("NVIDIA_H100_80GB"),
110690            Self::NvidiaH100Mega80Gb => std::option::Option::Some("NVIDIA_H100_MEGA_80GB"),
110691            Self::NvidiaH200141Gb => std::option::Option::Some("NVIDIA_H200_141GB"),
110692            Self::NvidiaB200 => std::option::Option::Some("NVIDIA_B200"),
110693            Self::NvidiaGb200 => std::option::Option::Some("NVIDIA_GB200"),
110694            Self::NvidiaRtxPro6000 => std::option::Option::Some("NVIDIA_RTX_PRO_6000"),
110695            Self::TpuV2 => std::option::Option::Some("TPU_V2"),
110696            Self::TpuV3 => std::option::Option::Some("TPU_V3"),
110697            Self::TpuV4Pod => std::option::Option::Some("TPU_V4_POD"),
110698            Self::TpuV5Litepod => std::option::Option::Some("TPU_V5_LITEPOD"),
110699            Self::UnknownValue(u) => u.0.name(),
110700        }
110701    }
110702}
110703
110704#[cfg(any(
110705    feature = "deployment-resource-pool-service",
110706    feature = "endpoint-service",
110707    feature = "index-endpoint-service",
110708    feature = "job-service",
110709    feature = "model-garden-service",
110710    feature = "notebook-service",
110711    feature = "persistent-resource-service",
110712    feature = "schedule-service",
110713))]
110714impl std::default::Default for AcceleratorType {
110715    fn default() -> Self {
110716        use std::convert::From;
110717        Self::from(0)
110718    }
110719}
110720
110721#[cfg(any(
110722    feature = "deployment-resource-pool-service",
110723    feature = "endpoint-service",
110724    feature = "index-endpoint-service",
110725    feature = "job-service",
110726    feature = "model-garden-service",
110727    feature = "notebook-service",
110728    feature = "persistent-resource-service",
110729    feature = "schedule-service",
110730))]
110731impl std::fmt::Display for AcceleratorType {
110732    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
110733        wkt::internal::display_enum(f, self.name(), self.value())
110734    }
110735}
110736
110737#[cfg(any(
110738    feature = "deployment-resource-pool-service",
110739    feature = "endpoint-service",
110740    feature = "index-endpoint-service",
110741    feature = "job-service",
110742    feature = "model-garden-service",
110743    feature = "notebook-service",
110744    feature = "persistent-resource-service",
110745    feature = "schedule-service",
110746))]
110747impl std::convert::From<i32> for AcceleratorType {
110748    fn from(value: i32) -> Self {
110749        match value {
110750            0 => Self::Unspecified,
110751            1 => Self::NvidiaTeslaK80,
110752            2 => Self::NvidiaTeslaP100,
110753            3 => Self::NvidiaTeslaV100,
110754            4 => Self::NvidiaTeslaP4,
110755            5 => Self::NvidiaTeslaT4,
110756            6 => Self::TpuV2,
110757            7 => Self::TpuV3,
110758            8 => Self::NvidiaTeslaA100,
110759            9 => Self::NvidiaA10080Gb,
110760            10 => Self::TpuV4Pod,
110761            11 => Self::NvidiaL4,
110762            12 => Self::TpuV5Litepod,
110763            13 => Self::NvidiaH10080Gb,
110764            14 => Self::NvidiaH100Mega80Gb,
110765            15 => Self::NvidiaH200141Gb,
110766            16 => Self::NvidiaB200,
110767            17 => Self::NvidiaGb200,
110768            18 => Self::NvidiaRtxPro6000,
110769            _ => Self::UnknownValue(accelerator_type::UnknownValue(
110770                wkt::internal::UnknownEnumValue::Integer(value),
110771            )),
110772        }
110773    }
110774}
110775
110776#[cfg(any(
110777    feature = "deployment-resource-pool-service",
110778    feature = "endpoint-service",
110779    feature = "index-endpoint-service",
110780    feature = "job-service",
110781    feature = "model-garden-service",
110782    feature = "notebook-service",
110783    feature = "persistent-resource-service",
110784    feature = "schedule-service",
110785))]
110786impl std::convert::From<&str> for AcceleratorType {
110787    fn from(value: &str) -> Self {
110788        use std::string::ToString;
110789        match value {
110790            "ACCELERATOR_TYPE_UNSPECIFIED" => Self::Unspecified,
110791            "NVIDIA_TESLA_K80" => Self::NvidiaTeslaK80,
110792            "NVIDIA_TESLA_P100" => Self::NvidiaTeslaP100,
110793            "NVIDIA_TESLA_V100" => Self::NvidiaTeslaV100,
110794            "NVIDIA_TESLA_P4" => Self::NvidiaTeslaP4,
110795            "NVIDIA_TESLA_T4" => Self::NvidiaTeslaT4,
110796            "NVIDIA_TESLA_A100" => Self::NvidiaTeslaA100,
110797            "NVIDIA_A100_80GB" => Self::NvidiaA10080Gb,
110798            "NVIDIA_L4" => Self::NvidiaL4,
110799            "NVIDIA_H100_80GB" => Self::NvidiaH10080Gb,
110800            "NVIDIA_H100_MEGA_80GB" => Self::NvidiaH100Mega80Gb,
110801            "NVIDIA_H200_141GB" => Self::NvidiaH200141Gb,
110802            "NVIDIA_B200" => Self::NvidiaB200,
110803            "NVIDIA_GB200" => Self::NvidiaGb200,
110804            "NVIDIA_RTX_PRO_6000" => Self::NvidiaRtxPro6000,
110805            "TPU_V2" => Self::TpuV2,
110806            "TPU_V3" => Self::TpuV3,
110807            "TPU_V4_POD" => Self::TpuV4Pod,
110808            "TPU_V5_LITEPOD" => Self::TpuV5Litepod,
110809            _ => Self::UnknownValue(accelerator_type::UnknownValue(
110810                wkt::internal::UnknownEnumValue::String(value.to_string()),
110811            )),
110812        }
110813    }
110814}
110815
110816#[cfg(any(
110817    feature = "deployment-resource-pool-service",
110818    feature = "endpoint-service",
110819    feature = "index-endpoint-service",
110820    feature = "job-service",
110821    feature = "model-garden-service",
110822    feature = "notebook-service",
110823    feature = "persistent-resource-service",
110824    feature = "schedule-service",
110825))]
110826impl serde::ser::Serialize for AcceleratorType {
110827    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
110828    where
110829        S: serde::Serializer,
110830    {
110831        match self {
110832            Self::Unspecified => serializer.serialize_i32(0),
110833            Self::NvidiaTeslaK80 => serializer.serialize_i32(1),
110834            Self::NvidiaTeslaP100 => serializer.serialize_i32(2),
110835            Self::NvidiaTeslaV100 => serializer.serialize_i32(3),
110836            Self::NvidiaTeslaP4 => serializer.serialize_i32(4),
110837            Self::NvidiaTeslaT4 => serializer.serialize_i32(5),
110838            Self::NvidiaTeslaA100 => serializer.serialize_i32(8),
110839            Self::NvidiaA10080Gb => serializer.serialize_i32(9),
110840            Self::NvidiaL4 => serializer.serialize_i32(11),
110841            Self::NvidiaH10080Gb => serializer.serialize_i32(13),
110842            Self::NvidiaH100Mega80Gb => serializer.serialize_i32(14),
110843            Self::NvidiaH200141Gb => serializer.serialize_i32(15),
110844            Self::NvidiaB200 => serializer.serialize_i32(16),
110845            Self::NvidiaGb200 => serializer.serialize_i32(17),
110846            Self::NvidiaRtxPro6000 => serializer.serialize_i32(18),
110847            Self::TpuV2 => serializer.serialize_i32(6),
110848            Self::TpuV3 => serializer.serialize_i32(7),
110849            Self::TpuV4Pod => serializer.serialize_i32(10),
110850            Self::TpuV5Litepod => serializer.serialize_i32(12),
110851            Self::UnknownValue(u) => u.0.serialize(serializer),
110852        }
110853    }
110854}
110855
110856#[cfg(any(
110857    feature = "deployment-resource-pool-service",
110858    feature = "endpoint-service",
110859    feature = "index-endpoint-service",
110860    feature = "job-service",
110861    feature = "model-garden-service",
110862    feature = "notebook-service",
110863    feature = "persistent-resource-service",
110864    feature = "schedule-service",
110865))]
110866impl<'de> serde::de::Deserialize<'de> for AcceleratorType {
110867    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
110868    where
110869        D: serde::Deserializer<'de>,
110870    {
110871        deserializer.deserialize_any(wkt::internal::EnumVisitor::<AcceleratorType>::new(
110872            ".google.cloud.aiplatform.v1.AcceleratorType",
110873        ))
110874    }
110875}
110876
110877/// Harm categories that will block the content.
110878///
110879/// # Working with unknown values
110880///
110881/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
110882/// additional enum variants at any time. Adding new variants is not considered
110883/// a breaking change. Applications should write their code in anticipation of:
110884///
110885/// - New values appearing in future releases of the client library, **and**
110886/// - New values received dynamically, without application changes.
110887///
110888/// Please consult the [Working with enums] section in the user guide for some
110889/// guidelines.
110890///
110891/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
110892#[cfg(feature = "prediction-service")]
110893#[derive(Clone, Debug, PartialEq)]
110894#[non_exhaustive]
110895pub enum HarmCategory {
110896    /// The harm category is unspecified.
110897    Unspecified,
110898    /// The harm category is hate speech.
110899    HateSpeech,
110900    /// The harm category is dangerous content.
110901    DangerousContent,
110902    /// The harm category is harassment.
110903    Harassment,
110904    /// The harm category is sexually explicit content.
110905    SexuallyExplicit,
110906    /// Deprecated: Election filter is not longer supported.
110907    /// The harm category is civic integrity.
110908    #[deprecated]
110909    CivicIntegrity,
110910    /// If set, the enum was initialized with an unknown value.
110911    ///
110912    /// Applications can examine the value using [HarmCategory::value] or
110913    /// [HarmCategory::name].
110914    UnknownValue(harm_category::UnknownValue),
110915}
110916
110917#[doc(hidden)]
110918#[cfg(feature = "prediction-service")]
110919pub mod harm_category {
110920    #[allow(unused_imports)]
110921    use super::*;
110922    #[derive(Clone, Debug, PartialEq)]
110923    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
110924}
110925
110926#[cfg(feature = "prediction-service")]
110927impl HarmCategory {
110928    /// Gets the enum value.
110929    ///
110930    /// Returns `None` if the enum contains an unknown value deserialized from
110931    /// the string representation of enums.
110932    pub fn value(&self) -> std::option::Option<i32> {
110933        match self {
110934            Self::Unspecified => std::option::Option::Some(0),
110935            Self::HateSpeech => std::option::Option::Some(1),
110936            Self::DangerousContent => std::option::Option::Some(2),
110937            Self::Harassment => std::option::Option::Some(3),
110938            Self::SexuallyExplicit => std::option::Option::Some(4),
110939            Self::CivicIntegrity => std::option::Option::Some(5),
110940            Self::UnknownValue(u) => u.0.value(),
110941        }
110942    }
110943
110944    /// Gets the enum value as a string.
110945    ///
110946    /// Returns `None` if the enum contains an unknown value deserialized from
110947    /// the integer representation of enums.
110948    pub fn name(&self) -> std::option::Option<&str> {
110949        match self {
110950            Self::Unspecified => std::option::Option::Some("HARM_CATEGORY_UNSPECIFIED"),
110951            Self::HateSpeech => std::option::Option::Some("HARM_CATEGORY_HATE_SPEECH"),
110952            Self::DangerousContent => std::option::Option::Some("HARM_CATEGORY_DANGEROUS_CONTENT"),
110953            Self::Harassment => std::option::Option::Some("HARM_CATEGORY_HARASSMENT"),
110954            Self::SexuallyExplicit => std::option::Option::Some("HARM_CATEGORY_SEXUALLY_EXPLICIT"),
110955            Self::CivicIntegrity => std::option::Option::Some("HARM_CATEGORY_CIVIC_INTEGRITY"),
110956            Self::UnknownValue(u) => u.0.name(),
110957        }
110958    }
110959}
110960
110961#[cfg(feature = "prediction-service")]
110962impl std::default::Default for HarmCategory {
110963    fn default() -> Self {
110964        use std::convert::From;
110965        Self::from(0)
110966    }
110967}
110968
110969#[cfg(feature = "prediction-service")]
110970impl std::fmt::Display for HarmCategory {
110971    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
110972        wkt::internal::display_enum(f, self.name(), self.value())
110973    }
110974}
110975
110976#[cfg(feature = "prediction-service")]
110977impl std::convert::From<i32> for HarmCategory {
110978    fn from(value: i32) -> Self {
110979        match value {
110980            0 => Self::Unspecified,
110981            1 => Self::HateSpeech,
110982            2 => Self::DangerousContent,
110983            3 => Self::Harassment,
110984            4 => Self::SexuallyExplicit,
110985            5 => Self::CivicIntegrity,
110986            _ => Self::UnknownValue(harm_category::UnknownValue(
110987                wkt::internal::UnknownEnumValue::Integer(value),
110988            )),
110989        }
110990    }
110991}
110992
110993#[cfg(feature = "prediction-service")]
110994impl std::convert::From<&str> for HarmCategory {
110995    fn from(value: &str) -> Self {
110996        use std::string::ToString;
110997        match value {
110998            "HARM_CATEGORY_UNSPECIFIED" => Self::Unspecified,
110999            "HARM_CATEGORY_HATE_SPEECH" => Self::HateSpeech,
111000            "HARM_CATEGORY_DANGEROUS_CONTENT" => Self::DangerousContent,
111001            "HARM_CATEGORY_HARASSMENT" => Self::Harassment,
111002            "HARM_CATEGORY_SEXUALLY_EXPLICIT" => Self::SexuallyExplicit,
111003            "HARM_CATEGORY_CIVIC_INTEGRITY" => Self::CivicIntegrity,
111004            _ => Self::UnknownValue(harm_category::UnknownValue(
111005                wkt::internal::UnknownEnumValue::String(value.to_string()),
111006            )),
111007        }
111008    }
111009}
111010
111011#[cfg(feature = "prediction-service")]
111012impl serde::ser::Serialize for HarmCategory {
111013    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
111014    where
111015        S: serde::Serializer,
111016    {
111017        match self {
111018            Self::Unspecified => serializer.serialize_i32(0),
111019            Self::HateSpeech => serializer.serialize_i32(1),
111020            Self::DangerousContent => serializer.serialize_i32(2),
111021            Self::Harassment => serializer.serialize_i32(3),
111022            Self::SexuallyExplicit => serializer.serialize_i32(4),
111023            Self::CivicIntegrity => serializer.serialize_i32(5),
111024            Self::UnknownValue(u) => u.0.serialize(serializer),
111025        }
111026    }
111027}
111028
111029#[cfg(feature = "prediction-service")]
111030impl<'de> serde::de::Deserialize<'de> for HarmCategory {
111031    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
111032    where
111033        D: serde::Deserializer<'de>,
111034    {
111035        deserializer.deserialize_any(wkt::internal::EnumVisitor::<HarmCategory>::new(
111036            ".google.cloud.aiplatform.v1.HarmCategory",
111037        ))
111038    }
111039}
111040
111041/// Content Part modality
111042///
111043/// # Working with unknown values
111044///
111045/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
111046/// additional enum variants at any time. Adding new variants is not considered
111047/// a breaking change. Applications should write their code in anticipation of:
111048///
111049/// - New values appearing in future releases of the client library, **and**
111050/// - New values received dynamically, without application changes.
111051///
111052/// Please consult the [Working with enums] section in the user guide for some
111053/// guidelines.
111054///
111055/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
111056#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
111057#[derive(Clone, Debug, PartialEq)]
111058#[non_exhaustive]
111059pub enum Modality {
111060    /// Unspecified modality.
111061    Unspecified,
111062    /// Plain text.
111063    Text,
111064    /// Image.
111065    Image,
111066    /// Video.
111067    Video,
111068    /// Audio.
111069    Audio,
111070    /// Document, e.g. PDF.
111071    Document,
111072    /// If set, the enum was initialized with an unknown value.
111073    ///
111074    /// Applications can examine the value using [Modality::value] or
111075    /// [Modality::name].
111076    UnknownValue(modality::UnknownValue),
111077}
111078
111079#[doc(hidden)]
111080#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
111081pub mod modality {
111082    #[allow(unused_imports)]
111083    use super::*;
111084    #[derive(Clone, Debug, PartialEq)]
111085    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
111086}
111087
111088#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
111089impl Modality {
111090    /// Gets the enum value.
111091    ///
111092    /// Returns `None` if the enum contains an unknown value deserialized from
111093    /// the string representation of enums.
111094    pub fn value(&self) -> std::option::Option<i32> {
111095        match self {
111096            Self::Unspecified => std::option::Option::Some(0),
111097            Self::Text => std::option::Option::Some(1),
111098            Self::Image => std::option::Option::Some(2),
111099            Self::Video => std::option::Option::Some(3),
111100            Self::Audio => std::option::Option::Some(4),
111101            Self::Document => std::option::Option::Some(5),
111102            Self::UnknownValue(u) => u.0.value(),
111103        }
111104    }
111105
111106    /// Gets the enum value as a string.
111107    ///
111108    /// Returns `None` if the enum contains an unknown value deserialized from
111109    /// the integer representation of enums.
111110    pub fn name(&self) -> std::option::Option<&str> {
111111        match self {
111112            Self::Unspecified => std::option::Option::Some("MODALITY_UNSPECIFIED"),
111113            Self::Text => std::option::Option::Some("TEXT"),
111114            Self::Image => std::option::Option::Some("IMAGE"),
111115            Self::Video => std::option::Option::Some("VIDEO"),
111116            Self::Audio => std::option::Option::Some("AUDIO"),
111117            Self::Document => std::option::Option::Some("DOCUMENT"),
111118            Self::UnknownValue(u) => u.0.name(),
111119        }
111120    }
111121}
111122
111123#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
111124impl std::default::Default for Modality {
111125    fn default() -> Self {
111126        use std::convert::From;
111127        Self::from(0)
111128    }
111129}
111130
111131#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
111132impl std::fmt::Display for Modality {
111133    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
111134        wkt::internal::display_enum(f, self.name(), self.value())
111135    }
111136}
111137
111138#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
111139impl std::convert::From<i32> for Modality {
111140    fn from(value: i32) -> Self {
111141        match value {
111142            0 => Self::Unspecified,
111143            1 => Self::Text,
111144            2 => Self::Image,
111145            3 => Self::Video,
111146            4 => Self::Audio,
111147            5 => Self::Document,
111148            _ => Self::UnknownValue(modality::UnknownValue(
111149                wkt::internal::UnknownEnumValue::Integer(value),
111150            )),
111151        }
111152    }
111153}
111154
111155#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
111156impl std::convert::From<&str> for Modality {
111157    fn from(value: &str) -> Self {
111158        use std::string::ToString;
111159        match value {
111160            "MODALITY_UNSPECIFIED" => Self::Unspecified,
111161            "TEXT" => Self::Text,
111162            "IMAGE" => Self::Image,
111163            "VIDEO" => Self::Video,
111164            "AUDIO" => Self::Audio,
111165            "DOCUMENT" => Self::Document,
111166            _ => Self::UnknownValue(modality::UnknownValue(
111167                wkt::internal::UnknownEnumValue::String(value.to_string()),
111168            )),
111169        }
111170    }
111171}
111172
111173#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
111174impl serde::ser::Serialize for Modality {
111175    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
111176    where
111177        S: serde::Serializer,
111178    {
111179        match self {
111180            Self::Unspecified => serializer.serialize_i32(0),
111181            Self::Text => serializer.serialize_i32(1),
111182            Self::Image => serializer.serialize_i32(2),
111183            Self::Video => serializer.serialize_i32(3),
111184            Self::Audio => serializer.serialize_i32(4),
111185            Self::Document => serializer.serialize_i32(5),
111186            Self::UnknownValue(u) => u.0.serialize(serializer),
111187        }
111188    }
111189}
111190
111191#[cfg(any(feature = "llm-utility-service", feature = "prediction-service",))]
111192impl<'de> serde::de::Deserialize<'de> for Modality {
111193    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
111194    where
111195        D: serde::Deserializer<'de>,
111196    {
111197        deserializer.deserialize_any(wkt::internal::EnumVisitor::<Modality>::new(
111198            ".google.cloud.aiplatform.v1.Modality",
111199        ))
111200    }
111201}
111202
111203/// Stage field indicating the current progress of a deployment.
111204///
111205/// # Working with unknown values
111206///
111207/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
111208/// additional enum variants at any time. Adding new variants is not considered
111209/// a breaking change. Applications should write their code in anticipation of:
111210///
111211/// - New values appearing in future releases of the client library, **and**
111212/// - New values received dynamically, without application changes.
111213///
111214/// Please consult the [Working with enums] section in the user guide for some
111215/// guidelines.
111216///
111217/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
111218#[cfg(feature = "endpoint-service")]
111219#[derive(Clone, Debug, PartialEq)]
111220#[non_exhaustive]
111221pub enum DeploymentStage {
111222    /// Default value. This value is unused.
111223    Unspecified,
111224    /// The deployment is initializing and setting up the environment.
111225    StartingDeployment,
111226    /// The deployment is preparing the model assets.
111227    PreparingModel,
111228    /// The deployment is creating the underlying serving cluster.
111229    CreatingServingCluster,
111230    /// The deployment is adding nodes to the serving cluster.
111231    AddingNodesToCluster,
111232    /// The deployment is getting the container image for the model server.
111233    GettingContainerImage,
111234    /// The deployment is starting the model server.
111235    StartingModelServer,
111236    /// The deployment is performing finalization steps.
111237    FinishingUp,
111238    /// The deployment has terminated.
111239    DeploymentTerminated,
111240    /// If set, the enum was initialized with an unknown value.
111241    ///
111242    /// Applications can examine the value using [DeploymentStage::value] or
111243    /// [DeploymentStage::name].
111244    UnknownValue(deployment_stage::UnknownValue),
111245}
111246
111247#[doc(hidden)]
111248#[cfg(feature = "endpoint-service")]
111249pub mod deployment_stage {
111250    #[allow(unused_imports)]
111251    use super::*;
111252    #[derive(Clone, Debug, PartialEq)]
111253    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
111254}
111255
111256#[cfg(feature = "endpoint-service")]
111257impl DeploymentStage {
111258    /// Gets the enum value.
111259    ///
111260    /// Returns `None` if the enum contains an unknown value deserialized from
111261    /// the string representation of enums.
111262    pub fn value(&self) -> std::option::Option<i32> {
111263        match self {
111264            Self::Unspecified => std::option::Option::Some(0),
111265            Self::StartingDeployment => std::option::Option::Some(5),
111266            Self::PreparingModel => std::option::Option::Some(6),
111267            Self::CreatingServingCluster => std::option::Option::Some(7),
111268            Self::AddingNodesToCluster => std::option::Option::Some(8),
111269            Self::GettingContainerImage => std::option::Option::Some(9),
111270            Self::StartingModelServer => std::option::Option::Some(3),
111271            Self::FinishingUp => std::option::Option::Some(4),
111272            Self::DeploymentTerminated => std::option::Option::Some(10),
111273            Self::UnknownValue(u) => u.0.value(),
111274        }
111275    }
111276
111277    /// Gets the enum value as a string.
111278    ///
111279    /// Returns `None` if the enum contains an unknown value deserialized from
111280    /// the integer representation of enums.
111281    pub fn name(&self) -> std::option::Option<&str> {
111282        match self {
111283            Self::Unspecified => std::option::Option::Some("DEPLOYMENT_STAGE_UNSPECIFIED"),
111284            Self::StartingDeployment => std::option::Option::Some("STARTING_DEPLOYMENT"),
111285            Self::PreparingModel => std::option::Option::Some("PREPARING_MODEL"),
111286            Self::CreatingServingCluster => std::option::Option::Some("CREATING_SERVING_CLUSTER"),
111287            Self::AddingNodesToCluster => std::option::Option::Some("ADDING_NODES_TO_CLUSTER"),
111288            Self::GettingContainerImage => std::option::Option::Some("GETTING_CONTAINER_IMAGE"),
111289            Self::StartingModelServer => std::option::Option::Some("STARTING_MODEL_SERVER"),
111290            Self::FinishingUp => std::option::Option::Some("FINISHING_UP"),
111291            Self::DeploymentTerminated => std::option::Option::Some("DEPLOYMENT_TERMINATED"),
111292            Self::UnknownValue(u) => u.0.name(),
111293        }
111294    }
111295}
111296
111297#[cfg(feature = "endpoint-service")]
111298impl std::default::Default for DeploymentStage {
111299    fn default() -> Self {
111300        use std::convert::From;
111301        Self::from(0)
111302    }
111303}
111304
111305#[cfg(feature = "endpoint-service")]
111306impl std::fmt::Display for DeploymentStage {
111307    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
111308        wkt::internal::display_enum(f, self.name(), self.value())
111309    }
111310}
111311
111312#[cfg(feature = "endpoint-service")]
111313impl std::convert::From<i32> for DeploymentStage {
111314    fn from(value: i32) -> Self {
111315        match value {
111316            0 => Self::Unspecified,
111317            3 => Self::StartingModelServer,
111318            4 => Self::FinishingUp,
111319            5 => Self::StartingDeployment,
111320            6 => Self::PreparingModel,
111321            7 => Self::CreatingServingCluster,
111322            8 => Self::AddingNodesToCluster,
111323            9 => Self::GettingContainerImage,
111324            10 => Self::DeploymentTerminated,
111325            _ => Self::UnknownValue(deployment_stage::UnknownValue(
111326                wkt::internal::UnknownEnumValue::Integer(value),
111327            )),
111328        }
111329    }
111330}
111331
111332#[cfg(feature = "endpoint-service")]
111333impl std::convert::From<&str> for DeploymentStage {
111334    fn from(value: &str) -> Self {
111335        use std::string::ToString;
111336        match value {
111337            "DEPLOYMENT_STAGE_UNSPECIFIED" => Self::Unspecified,
111338            "STARTING_DEPLOYMENT" => Self::StartingDeployment,
111339            "PREPARING_MODEL" => Self::PreparingModel,
111340            "CREATING_SERVING_CLUSTER" => Self::CreatingServingCluster,
111341            "ADDING_NODES_TO_CLUSTER" => Self::AddingNodesToCluster,
111342            "GETTING_CONTAINER_IMAGE" => Self::GettingContainerImage,
111343            "STARTING_MODEL_SERVER" => Self::StartingModelServer,
111344            "FINISHING_UP" => Self::FinishingUp,
111345            "DEPLOYMENT_TERMINATED" => Self::DeploymentTerminated,
111346            _ => Self::UnknownValue(deployment_stage::UnknownValue(
111347                wkt::internal::UnknownEnumValue::String(value.to_string()),
111348            )),
111349        }
111350    }
111351}
111352
111353#[cfg(feature = "endpoint-service")]
111354impl serde::ser::Serialize for DeploymentStage {
111355    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
111356    where
111357        S: serde::Serializer,
111358    {
111359        match self {
111360            Self::Unspecified => serializer.serialize_i32(0),
111361            Self::StartingDeployment => serializer.serialize_i32(5),
111362            Self::PreparingModel => serializer.serialize_i32(6),
111363            Self::CreatingServingCluster => serializer.serialize_i32(7),
111364            Self::AddingNodesToCluster => serializer.serialize_i32(8),
111365            Self::GettingContainerImage => serializer.serialize_i32(9),
111366            Self::StartingModelServer => serializer.serialize_i32(3),
111367            Self::FinishingUp => serializer.serialize_i32(4),
111368            Self::DeploymentTerminated => serializer.serialize_i32(10),
111369            Self::UnknownValue(u) => u.0.serialize(serializer),
111370        }
111371    }
111372}
111373
111374#[cfg(feature = "endpoint-service")]
111375impl<'de> serde::de::Deserialize<'de> for DeploymentStage {
111376    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
111377    where
111378        D: serde::Deserializer<'de>,
111379    {
111380        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DeploymentStage>::new(
111381            ".google.cloud.aiplatform.v1.DeploymentStage",
111382        ))
111383    }
111384}
111385
111386/// Pairwise prediction autorater preference.
111387///
111388/// # Working with unknown values
111389///
111390/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
111391/// additional enum variants at any time. Adding new variants is not considered
111392/// a breaking change. Applications should write their code in anticipation of:
111393///
111394/// - New values appearing in future releases of the client library, **and**
111395/// - New values received dynamically, without application changes.
111396///
111397/// Please consult the [Working with enums] section in the user guide for some
111398/// guidelines.
111399///
111400/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
111401#[cfg(feature = "evaluation-service")]
111402#[derive(Clone, Debug, PartialEq)]
111403#[non_exhaustive]
111404pub enum PairwiseChoice {
111405    /// Unspecified prediction choice.
111406    Unspecified,
111407    /// Baseline prediction wins
111408    Baseline,
111409    /// Candidate prediction wins
111410    Candidate,
111411    /// Winner cannot be determined
111412    Tie,
111413    /// If set, the enum was initialized with an unknown value.
111414    ///
111415    /// Applications can examine the value using [PairwiseChoice::value] or
111416    /// [PairwiseChoice::name].
111417    UnknownValue(pairwise_choice::UnknownValue),
111418}
111419
111420#[doc(hidden)]
111421#[cfg(feature = "evaluation-service")]
111422pub mod pairwise_choice {
111423    #[allow(unused_imports)]
111424    use super::*;
111425    #[derive(Clone, Debug, PartialEq)]
111426    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
111427}
111428
111429#[cfg(feature = "evaluation-service")]
111430impl PairwiseChoice {
111431    /// Gets the enum value.
111432    ///
111433    /// Returns `None` if the enum contains an unknown value deserialized from
111434    /// the string representation of enums.
111435    pub fn value(&self) -> std::option::Option<i32> {
111436        match self {
111437            Self::Unspecified => std::option::Option::Some(0),
111438            Self::Baseline => std::option::Option::Some(1),
111439            Self::Candidate => std::option::Option::Some(2),
111440            Self::Tie => std::option::Option::Some(3),
111441            Self::UnknownValue(u) => u.0.value(),
111442        }
111443    }
111444
111445    /// Gets the enum value as a string.
111446    ///
111447    /// Returns `None` if the enum contains an unknown value deserialized from
111448    /// the integer representation of enums.
111449    pub fn name(&self) -> std::option::Option<&str> {
111450        match self {
111451            Self::Unspecified => std::option::Option::Some("PAIRWISE_CHOICE_UNSPECIFIED"),
111452            Self::Baseline => std::option::Option::Some("BASELINE"),
111453            Self::Candidate => std::option::Option::Some("CANDIDATE"),
111454            Self::Tie => std::option::Option::Some("TIE"),
111455            Self::UnknownValue(u) => u.0.name(),
111456        }
111457    }
111458}
111459
111460#[cfg(feature = "evaluation-service")]
111461impl std::default::Default for PairwiseChoice {
111462    fn default() -> Self {
111463        use std::convert::From;
111464        Self::from(0)
111465    }
111466}
111467
111468#[cfg(feature = "evaluation-service")]
111469impl std::fmt::Display for PairwiseChoice {
111470    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
111471        wkt::internal::display_enum(f, self.name(), self.value())
111472    }
111473}
111474
111475#[cfg(feature = "evaluation-service")]
111476impl std::convert::From<i32> for PairwiseChoice {
111477    fn from(value: i32) -> Self {
111478        match value {
111479            0 => Self::Unspecified,
111480            1 => Self::Baseline,
111481            2 => Self::Candidate,
111482            3 => Self::Tie,
111483            _ => Self::UnknownValue(pairwise_choice::UnknownValue(
111484                wkt::internal::UnknownEnumValue::Integer(value),
111485            )),
111486        }
111487    }
111488}
111489
111490#[cfg(feature = "evaluation-service")]
111491impl std::convert::From<&str> for PairwiseChoice {
111492    fn from(value: &str) -> Self {
111493        use std::string::ToString;
111494        match value {
111495            "PAIRWISE_CHOICE_UNSPECIFIED" => Self::Unspecified,
111496            "BASELINE" => Self::Baseline,
111497            "CANDIDATE" => Self::Candidate,
111498            "TIE" => Self::Tie,
111499            _ => Self::UnknownValue(pairwise_choice::UnknownValue(
111500                wkt::internal::UnknownEnumValue::String(value.to_string()),
111501            )),
111502        }
111503    }
111504}
111505
111506#[cfg(feature = "evaluation-service")]
111507impl serde::ser::Serialize for PairwiseChoice {
111508    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
111509    where
111510        S: serde::Serializer,
111511    {
111512        match self {
111513            Self::Unspecified => serializer.serialize_i32(0),
111514            Self::Baseline => serializer.serialize_i32(1),
111515            Self::Candidate => serializer.serialize_i32(2),
111516            Self::Tie => serializer.serialize_i32(3),
111517            Self::UnknownValue(u) => u.0.serialize(serializer),
111518        }
111519    }
111520}
111521
111522#[cfg(feature = "evaluation-service")]
111523impl<'de> serde::de::Deserialize<'de> for PairwiseChoice {
111524    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
111525    where
111526        D: serde::Deserializer<'de>,
111527    {
111528        deserializer.deserialize_any(wkt::internal::EnumVisitor::<PairwiseChoice>::new(
111529            ".google.cloud.aiplatform.v1.PairwiseChoice",
111530        ))
111531    }
111532}
111533
111534/// Format of the data in the Feature View.
111535///
111536/// # Working with unknown values
111537///
111538/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
111539/// additional enum variants at any time. Adding new variants is not considered
111540/// a breaking change. Applications should write their code in anticipation of:
111541///
111542/// - New values appearing in future releases of the client library, **and**
111543/// - New values received dynamically, without application changes.
111544///
111545/// Please consult the [Working with enums] section in the user guide for some
111546/// guidelines.
111547///
111548/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
111549#[cfg(feature = "feature-online-store-service")]
111550#[derive(Clone, Debug, PartialEq)]
111551#[non_exhaustive]
111552pub enum FeatureViewDataFormat {
111553    /// Not set. Will be treated as the KeyValue format.
111554    Unspecified,
111555    /// Return response data in key-value format.
111556    KeyValue,
111557    /// Return response data in proto Struct format.
111558    ProtoStruct,
111559    /// If set, the enum was initialized with an unknown value.
111560    ///
111561    /// Applications can examine the value using [FeatureViewDataFormat::value] or
111562    /// [FeatureViewDataFormat::name].
111563    UnknownValue(feature_view_data_format::UnknownValue),
111564}
111565
111566#[doc(hidden)]
111567#[cfg(feature = "feature-online-store-service")]
111568pub mod feature_view_data_format {
111569    #[allow(unused_imports)]
111570    use super::*;
111571    #[derive(Clone, Debug, PartialEq)]
111572    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
111573}
111574
111575#[cfg(feature = "feature-online-store-service")]
111576impl FeatureViewDataFormat {
111577    /// Gets the enum value.
111578    ///
111579    /// Returns `None` if the enum contains an unknown value deserialized from
111580    /// the string representation of enums.
111581    pub fn value(&self) -> std::option::Option<i32> {
111582        match self {
111583            Self::Unspecified => std::option::Option::Some(0),
111584            Self::KeyValue => std::option::Option::Some(1),
111585            Self::ProtoStruct => std::option::Option::Some(2),
111586            Self::UnknownValue(u) => u.0.value(),
111587        }
111588    }
111589
111590    /// Gets the enum value as a string.
111591    ///
111592    /// Returns `None` if the enum contains an unknown value deserialized from
111593    /// the integer representation of enums.
111594    pub fn name(&self) -> std::option::Option<&str> {
111595        match self {
111596            Self::Unspecified => std::option::Option::Some("FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED"),
111597            Self::KeyValue => std::option::Option::Some("KEY_VALUE"),
111598            Self::ProtoStruct => std::option::Option::Some("PROTO_STRUCT"),
111599            Self::UnknownValue(u) => u.0.name(),
111600        }
111601    }
111602}
111603
111604#[cfg(feature = "feature-online-store-service")]
111605impl std::default::Default for FeatureViewDataFormat {
111606    fn default() -> Self {
111607        use std::convert::From;
111608        Self::from(0)
111609    }
111610}
111611
111612#[cfg(feature = "feature-online-store-service")]
111613impl std::fmt::Display for FeatureViewDataFormat {
111614    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
111615        wkt::internal::display_enum(f, self.name(), self.value())
111616    }
111617}
111618
111619#[cfg(feature = "feature-online-store-service")]
111620impl std::convert::From<i32> for FeatureViewDataFormat {
111621    fn from(value: i32) -> Self {
111622        match value {
111623            0 => Self::Unspecified,
111624            1 => Self::KeyValue,
111625            2 => Self::ProtoStruct,
111626            _ => Self::UnknownValue(feature_view_data_format::UnknownValue(
111627                wkt::internal::UnknownEnumValue::Integer(value),
111628            )),
111629        }
111630    }
111631}
111632
111633#[cfg(feature = "feature-online-store-service")]
111634impl std::convert::From<&str> for FeatureViewDataFormat {
111635    fn from(value: &str) -> Self {
111636        use std::string::ToString;
111637        match value {
111638            "FEATURE_VIEW_DATA_FORMAT_UNSPECIFIED" => Self::Unspecified,
111639            "KEY_VALUE" => Self::KeyValue,
111640            "PROTO_STRUCT" => Self::ProtoStruct,
111641            _ => Self::UnknownValue(feature_view_data_format::UnknownValue(
111642                wkt::internal::UnknownEnumValue::String(value.to_string()),
111643            )),
111644        }
111645    }
111646}
111647
111648#[cfg(feature = "feature-online-store-service")]
111649impl serde::ser::Serialize for FeatureViewDataFormat {
111650    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
111651    where
111652        S: serde::Serializer,
111653    {
111654        match self {
111655            Self::Unspecified => serializer.serialize_i32(0),
111656            Self::KeyValue => serializer.serialize_i32(1),
111657            Self::ProtoStruct => serializer.serialize_i32(2),
111658            Self::UnknownValue(u) => u.0.serialize(serializer),
111659        }
111660    }
111661}
111662
111663#[cfg(feature = "feature-online-store-service")]
111664impl<'de> serde::de::Deserialize<'de> for FeatureViewDataFormat {
111665    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
111666    where
111667        D: serde::Deserializer<'de>,
111668    {
111669        deserializer.deserialize_any(wkt::internal::EnumVisitor::<FeatureViewDataFormat>::new(
111670            ".google.cloud.aiplatform.v1.FeatureViewDataFormat",
111671        ))
111672    }
111673}
111674
111675/// Describes the state of a job.
111676///
111677/// # Working with unknown values
111678///
111679/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
111680/// additional enum variants at any time. Adding new variants is not considered
111681/// a breaking change. Applications should write their code in anticipation of:
111682///
111683/// - New values appearing in future releases of the client library, **and**
111684/// - New values received dynamically, without application changes.
111685///
111686/// Please consult the [Working with enums] section in the user guide for some
111687/// guidelines.
111688///
111689/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
111690#[cfg(any(
111691    feature = "gen-ai-tuning-service",
111692    feature = "job-service",
111693    feature = "notebook-service",
111694    feature = "schedule-service",
111695))]
111696#[derive(Clone, Debug, PartialEq)]
111697#[non_exhaustive]
111698pub enum JobState {
111699    /// The job state is unspecified.
111700    Unspecified,
111701    /// The job has been just created or resumed and processing has not yet begun.
111702    Queued,
111703    /// The service is preparing to run the job.
111704    Pending,
111705    /// The job is in progress.
111706    Running,
111707    /// The job completed successfully.
111708    Succeeded,
111709    /// The job failed.
111710    Failed,
111711    /// The job is being cancelled. From this state the job may only go to
111712    /// either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
111713    Cancelling,
111714    /// The job has been cancelled.
111715    Cancelled,
111716    /// The job has been stopped, and can be resumed.
111717    Paused,
111718    /// The job has expired.
111719    Expired,
111720    /// The job is being updated. Only jobs in the `RUNNING` state can be updated.
111721    /// After updating, the job goes back to the `RUNNING` state.
111722    Updating,
111723    /// The job is partially succeeded, some results may be missing due to errors.
111724    PartiallySucceeded,
111725    /// If set, the enum was initialized with an unknown value.
111726    ///
111727    /// Applications can examine the value using [JobState::value] or
111728    /// [JobState::name].
111729    UnknownValue(job_state::UnknownValue),
111730}
111731
111732#[doc(hidden)]
111733#[cfg(any(
111734    feature = "gen-ai-tuning-service",
111735    feature = "job-service",
111736    feature = "notebook-service",
111737    feature = "schedule-service",
111738))]
111739pub mod job_state {
111740    #[allow(unused_imports)]
111741    use super::*;
111742    #[derive(Clone, Debug, PartialEq)]
111743    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
111744}
111745
111746#[cfg(any(
111747    feature = "gen-ai-tuning-service",
111748    feature = "job-service",
111749    feature = "notebook-service",
111750    feature = "schedule-service",
111751))]
111752impl JobState {
111753    /// Gets the enum value.
111754    ///
111755    /// Returns `None` if the enum contains an unknown value deserialized from
111756    /// the string representation of enums.
111757    pub fn value(&self) -> std::option::Option<i32> {
111758        match self {
111759            Self::Unspecified => std::option::Option::Some(0),
111760            Self::Queued => std::option::Option::Some(1),
111761            Self::Pending => std::option::Option::Some(2),
111762            Self::Running => std::option::Option::Some(3),
111763            Self::Succeeded => std::option::Option::Some(4),
111764            Self::Failed => std::option::Option::Some(5),
111765            Self::Cancelling => std::option::Option::Some(6),
111766            Self::Cancelled => std::option::Option::Some(7),
111767            Self::Paused => std::option::Option::Some(8),
111768            Self::Expired => std::option::Option::Some(9),
111769            Self::Updating => std::option::Option::Some(10),
111770            Self::PartiallySucceeded => std::option::Option::Some(11),
111771            Self::UnknownValue(u) => u.0.value(),
111772        }
111773    }
111774
111775    /// Gets the enum value as a string.
111776    ///
111777    /// Returns `None` if the enum contains an unknown value deserialized from
111778    /// the integer representation of enums.
111779    pub fn name(&self) -> std::option::Option<&str> {
111780        match self {
111781            Self::Unspecified => std::option::Option::Some("JOB_STATE_UNSPECIFIED"),
111782            Self::Queued => std::option::Option::Some("JOB_STATE_QUEUED"),
111783            Self::Pending => std::option::Option::Some("JOB_STATE_PENDING"),
111784            Self::Running => std::option::Option::Some("JOB_STATE_RUNNING"),
111785            Self::Succeeded => std::option::Option::Some("JOB_STATE_SUCCEEDED"),
111786            Self::Failed => std::option::Option::Some("JOB_STATE_FAILED"),
111787            Self::Cancelling => std::option::Option::Some("JOB_STATE_CANCELLING"),
111788            Self::Cancelled => std::option::Option::Some("JOB_STATE_CANCELLED"),
111789            Self::Paused => std::option::Option::Some("JOB_STATE_PAUSED"),
111790            Self::Expired => std::option::Option::Some("JOB_STATE_EXPIRED"),
111791            Self::Updating => std::option::Option::Some("JOB_STATE_UPDATING"),
111792            Self::PartiallySucceeded => std::option::Option::Some("JOB_STATE_PARTIALLY_SUCCEEDED"),
111793            Self::UnknownValue(u) => u.0.name(),
111794        }
111795    }
111796}
111797
111798#[cfg(any(
111799    feature = "gen-ai-tuning-service",
111800    feature = "job-service",
111801    feature = "notebook-service",
111802    feature = "schedule-service",
111803))]
111804impl std::default::Default for JobState {
111805    fn default() -> Self {
111806        use std::convert::From;
111807        Self::from(0)
111808    }
111809}
111810
111811#[cfg(any(
111812    feature = "gen-ai-tuning-service",
111813    feature = "job-service",
111814    feature = "notebook-service",
111815    feature = "schedule-service",
111816))]
111817impl std::fmt::Display for JobState {
111818    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
111819        wkt::internal::display_enum(f, self.name(), self.value())
111820    }
111821}
111822
111823#[cfg(any(
111824    feature = "gen-ai-tuning-service",
111825    feature = "job-service",
111826    feature = "notebook-service",
111827    feature = "schedule-service",
111828))]
111829impl std::convert::From<i32> for JobState {
111830    fn from(value: i32) -> Self {
111831        match value {
111832            0 => Self::Unspecified,
111833            1 => Self::Queued,
111834            2 => Self::Pending,
111835            3 => Self::Running,
111836            4 => Self::Succeeded,
111837            5 => Self::Failed,
111838            6 => Self::Cancelling,
111839            7 => Self::Cancelled,
111840            8 => Self::Paused,
111841            9 => Self::Expired,
111842            10 => Self::Updating,
111843            11 => Self::PartiallySucceeded,
111844            _ => Self::UnknownValue(job_state::UnknownValue(
111845                wkt::internal::UnknownEnumValue::Integer(value),
111846            )),
111847        }
111848    }
111849}
111850
111851#[cfg(any(
111852    feature = "gen-ai-tuning-service",
111853    feature = "job-service",
111854    feature = "notebook-service",
111855    feature = "schedule-service",
111856))]
111857impl std::convert::From<&str> for JobState {
111858    fn from(value: &str) -> Self {
111859        use std::string::ToString;
111860        match value {
111861            "JOB_STATE_UNSPECIFIED" => Self::Unspecified,
111862            "JOB_STATE_QUEUED" => Self::Queued,
111863            "JOB_STATE_PENDING" => Self::Pending,
111864            "JOB_STATE_RUNNING" => Self::Running,
111865            "JOB_STATE_SUCCEEDED" => Self::Succeeded,
111866            "JOB_STATE_FAILED" => Self::Failed,
111867            "JOB_STATE_CANCELLING" => Self::Cancelling,
111868            "JOB_STATE_CANCELLED" => Self::Cancelled,
111869            "JOB_STATE_PAUSED" => Self::Paused,
111870            "JOB_STATE_EXPIRED" => Self::Expired,
111871            "JOB_STATE_UPDATING" => Self::Updating,
111872            "JOB_STATE_PARTIALLY_SUCCEEDED" => Self::PartiallySucceeded,
111873            _ => Self::UnknownValue(job_state::UnknownValue(
111874                wkt::internal::UnknownEnumValue::String(value.to_string()),
111875            )),
111876        }
111877    }
111878}
111879
111880#[cfg(any(
111881    feature = "gen-ai-tuning-service",
111882    feature = "job-service",
111883    feature = "notebook-service",
111884    feature = "schedule-service",
111885))]
111886impl serde::ser::Serialize for JobState {
111887    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
111888    where
111889        S: serde::Serializer,
111890    {
111891        match self {
111892            Self::Unspecified => serializer.serialize_i32(0),
111893            Self::Queued => serializer.serialize_i32(1),
111894            Self::Pending => serializer.serialize_i32(2),
111895            Self::Running => serializer.serialize_i32(3),
111896            Self::Succeeded => serializer.serialize_i32(4),
111897            Self::Failed => serializer.serialize_i32(5),
111898            Self::Cancelling => serializer.serialize_i32(6),
111899            Self::Cancelled => serializer.serialize_i32(7),
111900            Self::Paused => serializer.serialize_i32(8),
111901            Self::Expired => serializer.serialize_i32(9),
111902            Self::Updating => serializer.serialize_i32(10),
111903            Self::PartiallySucceeded => serializer.serialize_i32(11),
111904            Self::UnknownValue(u) => u.0.serialize(serializer),
111905        }
111906    }
111907}
111908
111909#[cfg(any(
111910    feature = "gen-ai-tuning-service",
111911    feature = "job-service",
111912    feature = "notebook-service",
111913    feature = "schedule-service",
111914))]
111915impl<'de> serde::de::Deserialize<'de> for JobState {
111916    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
111917    where
111918        D: serde::Deserializer<'de>,
111919    {
111920        deserializer.deserialize_any(wkt::internal::EnumVisitor::<JobState>::new(
111921            ".google.cloud.aiplatform.v1.JobState",
111922        ))
111923    }
111924}
111925
111926/// The Model Monitoring Objective types.
111927///
111928/// # Working with unknown values
111929///
111930/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
111931/// additional enum variants at any time. Adding new variants is not considered
111932/// a breaking change. Applications should write their code in anticipation of:
111933///
111934/// - New values appearing in future releases of the client library, **and**
111935/// - New values received dynamically, without application changes.
111936///
111937/// Please consult the [Working with enums] section in the user guide for some
111938/// guidelines.
111939///
111940/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
111941#[cfg(feature = "job-service")]
111942#[derive(Clone, Debug, PartialEq)]
111943#[non_exhaustive]
111944pub enum ModelDeploymentMonitoringObjectiveType {
111945    /// Default value, should not be set.
111946    Unspecified,
111947    /// Raw feature values' stats to detect skew between Training-Prediction
111948    /// datasets.
111949    RawFeatureSkew,
111950    /// Raw feature values' stats to detect drift between Serving-Prediction
111951    /// datasets.
111952    RawFeatureDrift,
111953    /// Feature attribution scores to detect skew between Training-Prediction
111954    /// datasets.
111955    FeatureAttributionSkew,
111956    /// Feature attribution scores to detect skew between Prediction datasets
111957    /// collected within different time windows.
111958    FeatureAttributionDrift,
111959    /// If set, the enum was initialized with an unknown value.
111960    ///
111961    /// Applications can examine the value using [ModelDeploymentMonitoringObjectiveType::value] or
111962    /// [ModelDeploymentMonitoringObjectiveType::name].
111963    UnknownValue(model_deployment_monitoring_objective_type::UnknownValue),
111964}
111965
111966#[doc(hidden)]
111967#[cfg(feature = "job-service")]
111968pub mod model_deployment_monitoring_objective_type {
111969    #[allow(unused_imports)]
111970    use super::*;
111971    #[derive(Clone, Debug, PartialEq)]
111972    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
111973}
111974
111975#[cfg(feature = "job-service")]
111976impl ModelDeploymentMonitoringObjectiveType {
111977    /// Gets the enum value.
111978    ///
111979    /// Returns `None` if the enum contains an unknown value deserialized from
111980    /// the string representation of enums.
111981    pub fn value(&self) -> std::option::Option<i32> {
111982        match self {
111983            Self::Unspecified => std::option::Option::Some(0),
111984            Self::RawFeatureSkew => std::option::Option::Some(1),
111985            Self::RawFeatureDrift => std::option::Option::Some(2),
111986            Self::FeatureAttributionSkew => std::option::Option::Some(3),
111987            Self::FeatureAttributionDrift => std::option::Option::Some(4),
111988            Self::UnknownValue(u) => u.0.value(),
111989        }
111990    }
111991
111992    /// Gets the enum value as a string.
111993    ///
111994    /// Returns `None` if the enum contains an unknown value deserialized from
111995    /// the integer representation of enums.
111996    pub fn name(&self) -> std::option::Option<&str> {
111997        match self {
111998            Self::Unspecified => {
111999                std::option::Option::Some("MODEL_DEPLOYMENT_MONITORING_OBJECTIVE_TYPE_UNSPECIFIED")
112000            }
112001            Self::RawFeatureSkew => std::option::Option::Some("RAW_FEATURE_SKEW"),
112002            Self::RawFeatureDrift => std::option::Option::Some("RAW_FEATURE_DRIFT"),
112003            Self::FeatureAttributionSkew => std::option::Option::Some("FEATURE_ATTRIBUTION_SKEW"),
112004            Self::FeatureAttributionDrift => std::option::Option::Some("FEATURE_ATTRIBUTION_DRIFT"),
112005            Self::UnknownValue(u) => u.0.name(),
112006        }
112007    }
112008}
112009
112010#[cfg(feature = "job-service")]
112011impl std::default::Default for ModelDeploymentMonitoringObjectiveType {
112012    fn default() -> Self {
112013        use std::convert::From;
112014        Self::from(0)
112015    }
112016}
112017
112018#[cfg(feature = "job-service")]
112019impl std::fmt::Display for ModelDeploymentMonitoringObjectiveType {
112020    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
112021        wkt::internal::display_enum(f, self.name(), self.value())
112022    }
112023}
112024
112025#[cfg(feature = "job-service")]
112026impl std::convert::From<i32> for ModelDeploymentMonitoringObjectiveType {
112027    fn from(value: i32) -> Self {
112028        match value {
112029            0 => Self::Unspecified,
112030            1 => Self::RawFeatureSkew,
112031            2 => Self::RawFeatureDrift,
112032            3 => Self::FeatureAttributionSkew,
112033            4 => Self::FeatureAttributionDrift,
112034            _ => Self::UnknownValue(model_deployment_monitoring_objective_type::UnknownValue(
112035                wkt::internal::UnknownEnumValue::Integer(value),
112036            )),
112037        }
112038    }
112039}
112040
112041#[cfg(feature = "job-service")]
112042impl std::convert::From<&str> for ModelDeploymentMonitoringObjectiveType {
112043    fn from(value: &str) -> Self {
112044        use std::string::ToString;
112045        match value {
112046            "MODEL_DEPLOYMENT_MONITORING_OBJECTIVE_TYPE_UNSPECIFIED" => Self::Unspecified,
112047            "RAW_FEATURE_SKEW" => Self::RawFeatureSkew,
112048            "RAW_FEATURE_DRIFT" => Self::RawFeatureDrift,
112049            "FEATURE_ATTRIBUTION_SKEW" => Self::FeatureAttributionSkew,
112050            "FEATURE_ATTRIBUTION_DRIFT" => Self::FeatureAttributionDrift,
112051            _ => Self::UnknownValue(model_deployment_monitoring_objective_type::UnknownValue(
112052                wkt::internal::UnknownEnumValue::String(value.to_string()),
112053            )),
112054        }
112055    }
112056}
112057
112058#[cfg(feature = "job-service")]
112059impl serde::ser::Serialize for ModelDeploymentMonitoringObjectiveType {
112060    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
112061    where
112062        S: serde::Serializer,
112063    {
112064        match self {
112065            Self::Unspecified => serializer.serialize_i32(0),
112066            Self::RawFeatureSkew => serializer.serialize_i32(1),
112067            Self::RawFeatureDrift => serializer.serialize_i32(2),
112068            Self::FeatureAttributionSkew => serializer.serialize_i32(3),
112069            Self::FeatureAttributionDrift => serializer.serialize_i32(4),
112070            Self::UnknownValue(u) => u.0.serialize(serializer),
112071        }
112072    }
112073}
112074
112075#[cfg(feature = "job-service")]
112076impl<'de> serde::de::Deserialize<'de> for ModelDeploymentMonitoringObjectiveType {
112077    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
112078    where
112079        D: serde::Deserializer<'de>,
112080    {
112081        deserializer.deserialize_any(wkt::internal::EnumVisitor::<
112082            ModelDeploymentMonitoringObjectiveType,
112083        >::new(
112084            ".google.cloud.aiplatform.v1.ModelDeploymentMonitoringObjectiveType",
112085        ))
112086    }
112087}
112088
112089/// View enumeration of PublisherModel.
112090///
112091/// # Working with unknown values
112092///
112093/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
112094/// additional enum variants at any time. Adding new variants is not considered
112095/// a breaking change. Applications should write their code in anticipation of:
112096///
112097/// - New values appearing in future releases of the client library, **and**
112098/// - New values received dynamically, without application changes.
112099///
112100/// Please consult the [Working with enums] section in the user guide for some
112101/// guidelines.
112102///
112103/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
112104#[cfg(feature = "model-garden-service")]
112105#[derive(Clone, Debug, PartialEq)]
112106#[non_exhaustive]
112107pub enum PublisherModelView {
112108    /// The default / unset value. The API will default to the BASIC view.
112109    Unspecified,
112110    /// Include basic metadata about the publisher model, but not the full
112111    /// contents.
112112    Basic,
112113    /// Include everything.
112114    Full,
112115    /// Include: VersionId, ModelVersionExternalName, and SupportedActions.
112116    PublisherModelVersionViewBasic,
112117    /// If set, the enum was initialized with an unknown value.
112118    ///
112119    /// Applications can examine the value using [PublisherModelView::value] or
112120    /// [PublisherModelView::name].
112121    UnknownValue(publisher_model_view::UnknownValue),
112122}
112123
112124#[doc(hidden)]
112125#[cfg(feature = "model-garden-service")]
112126pub mod publisher_model_view {
112127    #[allow(unused_imports)]
112128    use super::*;
112129    #[derive(Clone, Debug, PartialEq)]
112130    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
112131}
112132
112133#[cfg(feature = "model-garden-service")]
112134impl PublisherModelView {
112135    /// Gets the enum value.
112136    ///
112137    /// Returns `None` if the enum contains an unknown value deserialized from
112138    /// the string representation of enums.
112139    pub fn value(&self) -> std::option::Option<i32> {
112140        match self {
112141            Self::Unspecified => std::option::Option::Some(0),
112142            Self::Basic => std::option::Option::Some(1),
112143            Self::Full => std::option::Option::Some(2),
112144            Self::PublisherModelVersionViewBasic => std::option::Option::Some(3),
112145            Self::UnknownValue(u) => u.0.value(),
112146        }
112147    }
112148
112149    /// Gets the enum value as a string.
112150    ///
112151    /// Returns `None` if the enum contains an unknown value deserialized from
112152    /// the integer representation of enums.
112153    pub fn name(&self) -> std::option::Option<&str> {
112154        match self {
112155            Self::Unspecified => std::option::Option::Some("PUBLISHER_MODEL_VIEW_UNSPECIFIED"),
112156            Self::Basic => std::option::Option::Some("PUBLISHER_MODEL_VIEW_BASIC"),
112157            Self::Full => std::option::Option::Some("PUBLISHER_MODEL_VIEW_FULL"),
112158            Self::PublisherModelVersionViewBasic => {
112159                std::option::Option::Some("PUBLISHER_MODEL_VERSION_VIEW_BASIC")
112160            }
112161            Self::UnknownValue(u) => u.0.name(),
112162        }
112163    }
112164}
112165
112166#[cfg(feature = "model-garden-service")]
112167impl std::default::Default for PublisherModelView {
112168    fn default() -> Self {
112169        use std::convert::From;
112170        Self::from(0)
112171    }
112172}
112173
112174#[cfg(feature = "model-garden-service")]
112175impl std::fmt::Display for PublisherModelView {
112176    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
112177        wkt::internal::display_enum(f, self.name(), self.value())
112178    }
112179}
112180
112181#[cfg(feature = "model-garden-service")]
112182impl std::convert::From<i32> for PublisherModelView {
112183    fn from(value: i32) -> Self {
112184        match value {
112185            0 => Self::Unspecified,
112186            1 => Self::Basic,
112187            2 => Self::Full,
112188            3 => Self::PublisherModelVersionViewBasic,
112189            _ => Self::UnknownValue(publisher_model_view::UnknownValue(
112190                wkt::internal::UnknownEnumValue::Integer(value),
112191            )),
112192        }
112193    }
112194}
112195
112196#[cfg(feature = "model-garden-service")]
112197impl std::convert::From<&str> for PublisherModelView {
112198    fn from(value: &str) -> Self {
112199        use std::string::ToString;
112200        match value {
112201            "PUBLISHER_MODEL_VIEW_UNSPECIFIED" => Self::Unspecified,
112202            "PUBLISHER_MODEL_VIEW_BASIC" => Self::Basic,
112203            "PUBLISHER_MODEL_VIEW_FULL" => Self::Full,
112204            "PUBLISHER_MODEL_VERSION_VIEW_BASIC" => Self::PublisherModelVersionViewBasic,
112205            _ => Self::UnknownValue(publisher_model_view::UnknownValue(
112206                wkt::internal::UnknownEnumValue::String(value.to_string()),
112207            )),
112208        }
112209    }
112210}
112211
112212#[cfg(feature = "model-garden-service")]
112213impl serde::ser::Serialize for PublisherModelView {
112214    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
112215    where
112216        S: serde::Serializer,
112217    {
112218        match self {
112219            Self::Unspecified => serializer.serialize_i32(0),
112220            Self::Basic => serializer.serialize_i32(1),
112221            Self::Full => serializer.serialize_i32(2),
112222            Self::PublisherModelVersionViewBasic => serializer.serialize_i32(3),
112223            Self::UnknownValue(u) => u.0.serialize(serializer),
112224        }
112225    }
112226}
112227
112228#[cfg(feature = "model-garden-service")]
112229impl<'de> serde::de::Deserialize<'de> for PublisherModelView {
112230    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
112231    where
112232        D: serde::Deserializer<'de>,
112233    {
112234        deserializer.deserialize_any(wkt::internal::EnumVisitor::<PublisherModelView>::new(
112235            ".google.cloud.aiplatform.v1.PublisherModelView",
112236        ))
112237    }
112238}
112239
112240/// Represents a notebook runtime type.
112241///
112242/// # Working with unknown values
112243///
112244/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
112245/// additional enum variants at any time. Adding new variants is not considered
112246/// a breaking change. Applications should write their code in anticipation of:
112247///
112248/// - New values appearing in future releases of the client library, **and**
112249/// - New values received dynamically, without application changes.
112250///
112251/// Please consult the [Working with enums] section in the user guide for some
112252/// guidelines.
112253///
112254/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
112255#[cfg(feature = "notebook-service")]
112256#[derive(Clone, Debug, PartialEq)]
112257#[non_exhaustive]
112258pub enum NotebookRuntimeType {
112259    /// Unspecified notebook runtime type, NotebookRuntimeType will default to
112260    /// USER_DEFINED.
112261    Unspecified,
112262    /// runtime or template with coustomized configurations from user.
112263    UserDefined,
112264    /// runtime or template with system defined configurations.
112265    OneClick,
112266    /// If set, the enum was initialized with an unknown value.
112267    ///
112268    /// Applications can examine the value using [NotebookRuntimeType::value] or
112269    /// [NotebookRuntimeType::name].
112270    UnknownValue(notebook_runtime_type::UnknownValue),
112271}
112272
112273#[doc(hidden)]
112274#[cfg(feature = "notebook-service")]
112275pub mod notebook_runtime_type {
112276    #[allow(unused_imports)]
112277    use super::*;
112278    #[derive(Clone, Debug, PartialEq)]
112279    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
112280}
112281
112282#[cfg(feature = "notebook-service")]
112283impl NotebookRuntimeType {
112284    /// Gets the enum value.
112285    ///
112286    /// Returns `None` if the enum contains an unknown value deserialized from
112287    /// the string representation of enums.
112288    pub fn value(&self) -> std::option::Option<i32> {
112289        match self {
112290            Self::Unspecified => std::option::Option::Some(0),
112291            Self::UserDefined => std::option::Option::Some(1),
112292            Self::OneClick => std::option::Option::Some(2),
112293            Self::UnknownValue(u) => u.0.value(),
112294        }
112295    }
112296
112297    /// Gets the enum value as a string.
112298    ///
112299    /// Returns `None` if the enum contains an unknown value deserialized from
112300    /// the integer representation of enums.
112301    pub fn name(&self) -> std::option::Option<&str> {
112302        match self {
112303            Self::Unspecified => std::option::Option::Some("NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED"),
112304            Self::UserDefined => std::option::Option::Some("USER_DEFINED"),
112305            Self::OneClick => std::option::Option::Some("ONE_CLICK"),
112306            Self::UnknownValue(u) => u.0.name(),
112307        }
112308    }
112309}
112310
112311#[cfg(feature = "notebook-service")]
112312impl std::default::Default for NotebookRuntimeType {
112313    fn default() -> Self {
112314        use std::convert::From;
112315        Self::from(0)
112316    }
112317}
112318
112319#[cfg(feature = "notebook-service")]
112320impl std::fmt::Display for NotebookRuntimeType {
112321    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
112322        wkt::internal::display_enum(f, self.name(), self.value())
112323    }
112324}
112325
112326#[cfg(feature = "notebook-service")]
112327impl std::convert::From<i32> for NotebookRuntimeType {
112328    fn from(value: i32) -> Self {
112329        match value {
112330            0 => Self::Unspecified,
112331            1 => Self::UserDefined,
112332            2 => Self::OneClick,
112333            _ => Self::UnknownValue(notebook_runtime_type::UnknownValue(
112334                wkt::internal::UnknownEnumValue::Integer(value),
112335            )),
112336        }
112337    }
112338}
112339
112340#[cfg(feature = "notebook-service")]
112341impl std::convert::From<&str> for NotebookRuntimeType {
112342    fn from(value: &str) -> Self {
112343        use std::string::ToString;
112344        match value {
112345            "NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED" => Self::Unspecified,
112346            "USER_DEFINED" => Self::UserDefined,
112347            "ONE_CLICK" => Self::OneClick,
112348            _ => Self::UnknownValue(notebook_runtime_type::UnknownValue(
112349                wkt::internal::UnknownEnumValue::String(value.to_string()),
112350            )),
112351        }
112352    }
112353}
112354
112355#[cfg(feature = "notebook-service")]
112356impl serde::ser::Serialize for NotebookRuntimeType {
112357    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
112358    where
112359        S: serde::Serializer,
112360    {
112361        match self {
112362            Self::Unspecified => serializer.serialize_i32(0),
112363            Self::UserDefined => serializer.serialize_i32(1),
112364            Self::OneClick => serializer.serialize_i32(2),
112365            Self::UnknownValue(u) => u.0.serialize(serializer),
112366        }
112367    }
112368}
112369
112370#[cfg(feature = "notebook-service")]
112371impl<'de> serde::de::Deserialize<'de> for NotebookRuntimeType {
112372    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
112373    where
112374        D: serde::Deserializer<'de>,
112375    {
112376        deserializer.deserialize_any(wkt::internal::EnumVisitor::<NotebookRuntimeType>::new(
112377            ".google.cloud.aiplatform.v1.NotebookRuntimeType",
112378        ))
112379    }
112380}
112381
112382/// Views for Get/List NotebookExecutionJob
112383///
112384/// # Working with unknown values
112385///
112386/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
112387/// additional enum variants at any time. Adding new variants is not considered
112388/// a breaking change. Applications should write their code in anticipation of:
112389///
112390/// - New values appearing in future releases of the client library, **and**
112391/// - New values received dynamically, without application changes.
112392///
112393/// Please consult the [Working with enums] section in the user guide for some
112394/// guidelines.
112395///
112396/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
112397#[cfg(feature = "notebook-service")]
112398#[derive(Clone, Debug, PartialEq)]
112399#[non_exhaustive]
112400pub enum NotebookExecutionJobView {
112401    /// When unspecified, the API defaults to the BASIC view.
112402    Unspecified,
112403    /// Includes all fields except for direct notebook inputs.
112404    Basic,
112405    /// Includes all fields.
112406    Full,
112407    /// If set, the enum was initialized with an unknown value.
112408    ///
112409    /// Applications can examine the value using [NotebookExecutionJobView::value] or
112410    /// [NotebookExecutionJobView::name].
112411    UnknownValue(notebook_execution_job_view::UnknownValue),
112412}
112413
112414#[doc(hidden)]
112415#[cfg(feature = "notebook-service")]
112416pub mod notebook_execution_job_view {
112417    #[allow(unused_imports)]
112418    use super::*;
112419    #[derive(Clone, Debug, PartialEq)]
112420    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
112421}
112422
112423#[cfg(feature = "notebook-service")]
112424impl NotebookExecutionJobView {
112425    /// Gets the enum value.
112426    ///
112427    /// Returns `None` if the enum contains an unknown value deserialized from
112428    /// the string representation of enums.
112429    pub fn value(&self) -> std::option::Option<i32> {
112430        match self {
112431            Self::Unspecified => std::option::Option::Some(0),
112432            Self::Basic => std::option::Option::Some(1),
112433            Self::Full => std::option::Option::Some(2),
112434            Self::UnknownValue(u) => u.0.value(),
112435        }
112436    }
112437
112438    /// Gets the enum value as a string.
112439    ///
112440    /// Returns `None` if the enum contains an unknown value deserialized from
112441    /// the integer representation of enums.
112442    pub fn name(&self) -> std::option::Option<&str> {
112443        match self {
112444            Self::Unspecified => {
112445                std::option::Option::Some("NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED")
112446            }
112447            Self::Basic => std::option::Option::Some("NOTEBOOK_EXECUTION_JOB_VIEW_BASIC"),
112448            Self::Full => std::option::Option::Some("NOTEBOOK_EXECUTION_JOB_VIEW_FULL"),
112449            Self::UnknownValue(u) => u.0.name(),
112450        }
112451    }
112452}
112453
112454#[cfg(feature = "notebook-service")]
112455impl std::default::Default for NotebookExecutionJobView {
112456    fn default() -> Self {
112457        use std::convert::From;
112458        Self::from(0)
112459    }
112460}
112461
112462#[cfg(feature = "notebook-service")]
112463impl std::fmt::Display for NotebookExecutionJobView {
112464    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
112465        wkt::internal::display_enum(f, self.name(), self.value())
112466    }
112467}
112468
112469#[cfg(feature = "notebook-service")]
112470impl std::convert::From<i32> for NotebookExecutionJobView {
112471    fn from(value: i32) -> Self {
112472        match value {
112473            0 => Self::Unspecified,
112474            1 => Self::Basic,
112475            2 => Self::Full,
112476            _ => Self::UnknownValue(notebook_execution_job_view::UnknownValue(
112477                wkt::internal::UnknownEnumValue::Integer(value),
112478            )),
112479        }
112480    }
112481}
112482
112483#[cfg(feature = "notebook-service")]
112484impl std::convert::From<&str> for NotebookExecutionJobView {
112485    fn from(value: &str) -> Self {
112486        use std::string::ToString;
112487        match value {
112488            "NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED" => Self::Unspecified,
112489            "NOTEBOOK_EXECUTION_JOB_VIEW_BASIC" => Self::Basic,
112490            "NOTEBOOK_EXECUTION_JOB_VIEW_FULL" => Self::Full,
112491            _ => Self::UnknownValue(notebook_execution_job_view::UnknownValue(
112492                wkt::internal::UnknownEnumValue::String(value.to_string()),
112493            )),
112494        }
112495    }
112496}
112497
112498#[cfg(feature = "notebook-service")]
112499impl serde::ser::Serialize for NotebookExecutionJobView {
112500    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
112501    where
112502        S: serde::Serializer,
112503    {
112504        match self {
112505            Self::Unspecified => serializer.serialize_i32(0),
112506            Self::Basic => serializer.serialize_i32(1),
112507            Self::Full => serializer.serialize_i32(2),
112508            Self::UnknownValue(u) => u.0.serialize(serializer),
112509        }
112510    }
112511}
112512
112513#[cfg(feature = "notebook-service")]
112514impl<'de> serde::de::Deserialize<'de> for NotebookExecutionJobView {
112515    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
112516    where
112517        D: serde::Deserializer<'de>,
112518    {
112519        deserializer.deserialize_any(wkt::internal::EnumVisitor::<NotebookExecutionJobView>::new(
112520            ".google.cloud.aiplatform.v1.NotebookExecutionJobView",
112521        ))
112522    }
112523}
112524
112525/// Type contains the list of OpenAPI data types as defined by
112526/// <https://swagger.io/docs/specification/data-models/data-types/>
112527///
112528/// # Working with unknown values
112529///
112530/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
112531/// additional enum variants at any time. Adding new variants is not considered
112532/// a breaking change. Applications should write their code in anticipation of:
112533///
112534/// - New values appearing in future releases of the client library, **and**
112535/// - New values received dynamically, without application changes.
112536///
112537/// Please consult the [Working with enums] section in the user guide for some
112538/// guidelines.
112539///
112540/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
112541#[cfg(any(
112542    feature = "gen-ai-cache-service",
112543    feature = "llm-utility-service",
112544    feature = "prediction-service",
112545))]
112546#[derive(Clone, Debug, PartialEq)]
112547#[non_exhaustive]
112548pub enum Type {
112549    /// Not specified, should not be used.
112550    Unspecified,
112551    /// OpenAPI string type
112552    String,
112553    /// OpenAPI number type
112554    Number,
112555    /// OpenAPI integer type
112556    Integer,
112557    /// OpenAPI boolean type
112558    Boolean,
112559    /// OpenAPI array type
112560    Array,
112561    /// OpenAPI object type
112562    Object,
112563    /// If set, the enum was initialized with an unknown value.
112564    ///
112565    /// Applications can examine the value using [Type::value] or
112566    /// [Type::name].
112567    UnknownValue(r#type::UnknownValue),
112568}
112569
112570#[doc(hidden)]
112571#[cfg(any(
112572    feature = "gen-ai-cache-service",
112573    feature = "llm-utility-service",
112574    feature = "prediction-service",
112575))]
112576pub mod r#type {
112577    #[allow(unused_imports)]
112578    use super::*;
112579    #[derive(Clone, Debug, PartialEq)]
112580    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
112581}
112582
112583#[cfg(any(
112584    feature = "gen-ai-cache-service",
112585    feature = "llm-utility-service",
112586    feature = "prediction-service",
112587))]
112588impl Type {
112589    /// Gets the enum value.
112590    ///
112591    /// Returns `None` if the enum contains an unknown value deserialized from
112592    /// the string representation of enums.
112593    pub fn value(&self) -> std::option::Option<i32> {
112594        match self {
112595            Self::Unspecified => std::option::Option::Some(0),
112596            Self::String => std::option::Option::Some(1),
112597            Self::Number => std::option::Option::Some(2),
112598            Self::Integer => std::option::Option::Some(3),
112599            Self::Boolean => std::option::Option::Some(4),
112600            Self::Array => std::option::Option::Some(5),
112601            Self::Object => std::option::Option::Some(6),
112602            Self::UnknownValue(u) => u.0.value(),
112603        }
112604    }
112605
112606    /// Gets the enum value as a string.
112607    ///
112608    /// Returns `None` if the enum contains an unknown value deserialized from
112609    /// the integer representation of enums.
112610    pub fn name(&self) -> std::option::Option<&str> {
112611        match self {
112612            Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
112613            Self::String => std::option::Option::Some("STRING"),
112614            Self::Number => std::option::Option::Some("NUMBER"),
112615            Self::Integer => std::option::Option::Some("INTEGER"),
112616            Self::Boolean => std::option::Option::Some("BOOLEAN"),
112617            Self::Array => std::option::Option::Some("ARRAY"),
112618            Self::Object => std::option::Option::Some("OBJECT"),
112619            Self::UnknownValue(u) => u.0.name(),
112620        }
112621    }
112622}
112623
112624#[cfg(any(
112625    feature = "gen-ai-cache-service",
112626    feature = "llm-utility-service",
112627    feature = "prediction-service",
112628))]
112629impl std::default::Default for Type {
112630    fn default() -> Self {
112631        use std::convert::From;
112632        Self::from(0)
112633    }
112634}
112635
112636#[cfg(any(
112637    feature = "gen-ai-cache-service",
112638    feature = "llm-utility-service",
112639    feature = "prediction-service",
112640))]
112641impl std::fmt::Display for Type {
112642    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
112643        wkt::internal::display_enum(f, self.name(), self.value())
112644    }
112645}
112646
112647#[cfg(any(
112648    feature = "gen-ai-cache-service",
112649    feature = "llm-utility-service",
112650    feature = "prediction-service",
112651))]
112652impl std::convert::From<i32> for Type {
112653    fn from(value: i32) -> Self {
112654        match value {
112655            0 => Self::Unspecified,
112656            1 => Self::String,
112657            2 => Self::Number,
112658            3 => Self::Integer,
112659            4 => Self::Boolean,
112660            5 => Self::Array,
112661            6 => Self::Object,
112662            _ => Self::UnknownValue(r#type::UnknownValue(
112663                wkt::internal::UnknownEnumValue::Integer(value),
112664            )),
112665        }
112666    }
112667}
112668
112669#[cfg(any(
112670    feature = "gen-ai-cache-service",
112671    feature = "llm-utility-service",
112672    feature = "prediction-service",
112673))]
112674impl std::convert::From<&str> for Type {
112675    fn from(value: &str) -> Self {
112676        use std::string::ToString;
112677        match value {
112678            "TYPE_UNSPECIFIED" => Self::Unspecified,
112679            "STRING" => Self::String,
112680            "NUMBER" => Self::Number,
112681            "INTEGER" => Self::Integer,
112682            "BOOLEAN" => Self::Boolean,
112683            "ARRAY" => Self::Array,
112684            "OBJECT" => Self::Object,
112685            _ => Self::UnknownValue(r#type::UnknownValue(
112686                wkt::internal::UnknownEnumValue::String(value.to_string()),
112687            )),
112688        }
112689    }
112690}
112691
112692#[cfg(any(
112693    feature = "gen-ai-cache-service",
112694    feature = "llm-utility-service",
112695    feature = "prediction-service",
112696))]
112697impl serde::ser::Serialize for Type {
112698    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
112699    where
112700        S: serde::Serializer,
112701    {
112702        match self {
112703            Self::Unspecified => serializer.serialize_i32(0),
112704            Self::String => serializer.serialize_i32(1),
112705            Self::Number => serializer.serialize_i32(2),
112706            Self::Integer => serializer.serialize_i32(3),
112707            Self::Boolean => serializer.serialize_i32(4),
112708            Self::Array => serializer.serialize_i32(5),
112709            Self::Object => serializer.serialize_i32(6),
112710            Self::UnknownValue(u) => u.0.serialize(serializer),
112711        }
112712    }
112713}
112714
112715#[cfg(any(
112716    feature = "gen-ai-cache-service",
112717    feature = "llm-utility-service",
112718    feature = "prediction-service",
112719))]
112720impl<'de> serde::de::Deserialize<'de> for Type {
112721    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
112722    where
112723        D: serde::Deserializer<'de>,
112724    {
112725        deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
112726            ".google.cloud.aiplatform.v1.Type",
112727        ))
112728    }
112729}
112730
112731/// Represents the failure policy of a pipeline. Currently, the default of a
112732/// pipeline is that the pipeline will continue to run until no more tasks can be
112733/// executed, also known as PIPELINE_FAILURE_POLICY_FAIL_SLOW. However, if a
112734/// pipeline is set to PIPELINE_FAILURE_POLICY_FAIL_FAST, it will stop scheduling
112735/// any new tasks when a task has failed. Any scheduled tasks will continue to
112736/// completion.
112737///
112738/// # Working with unknown values
112739///
112740/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
112741/// additional enum variants at any time. Adding new variants is not considered
112742/// a breaking change. Applications should write their code in anticipation of:
112743///
112744/// - New values appearing in future releases of the client library, **and**
112745/// - New values received dynamically, without application changes.
112746///
112747/// Please consult the [Working with enums] section in the user guide for some
112748/// guidelines.
112749///
112750/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
112751#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112752#[derive(Clone, Debug, PartialEq)]
112753#[non_exhaustive]
112754pub enum PipelineFailurePolicy {
112755    /// Default value, and follows fail slow behavior.
112756    Unspecified,
112757    /// Indicates that the pipeline should continue to run until all possible
112758    /// tasks have been scheduled and completed.
112759    FailSlow,
112760    /// Indicates that the pipeline should stop scheduling new tasks after a task
112761    /// has failed.
112762    FailFast,
112763    /// If set, the enum was initialized with an unknown value.
112764    ///
112765    /// Applications can examine the value using [PipelineFailurePolicy::value] or
112766    /// [PipelineFailurePolicy::name].
112767    UnknownValue(pipeline_failure_policy::UnknownValue),
112768}
112769
112770#[doc(hidden)]
112771#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112772pub mod pipeline_failure_policy {
112773    #[allow(unused_imports)]
112774    use super::*;
112775    #[derive(Clone, Debug, PartialEq)]
112776    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
112777}
112778
112779#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112780impl PipelineFailurePolicy {
112781    /// Gets the enum value.
112782    ///
112783    /// Returns `None` if the enum contains an unknown value deserialized from
112784    /// the string representation of enums.
112785    pub fn value(&self) -> std::option::Option<i32> {
112786        match self {
112787            Self::Unspecified => std::option::Option::Some(0),
112788            Self::FailSlow => std::option::Option::Some(1),
112789            Self::FailFast => std::option::Option::Some(2),
112790            Self::UnknownValue(u) => u.0.value(),
112791        }
112792    }
112793
112794    /// Gets the enum value as a string.
112795    ///
112796    /// Returns `None` if the enum contains an unknown value deserialized from
112797    /// the integer representation of enums.
112798    pub fn name(&self) -> std::option::Option<&str> {
112799        match self {
112800            Self::Unspecified => std::option::Option::Some("PIPELINE_FAILURE_POLICY_UNSPECIFIED"),
112801            Self::FailSlow => std::option::Option::Some("PIPELINE_FAILURE_POLICY_FAIL_SLOW"),
112802            Self::FailFast => std::option::Option::Some("PIPELINE_FAILURE_POLICY_FAIL_FAST"),
112803            Self::UnknownValue(u) => u.0.name(),
112804        }
112805    }
112806}
112807
112808#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112809impl std::default::Default for PipelineFailurePolicy {
112810    fn default() -> Self {
112811        use std::convert::From;
112812        Self::from(0)
112813    }
112814}
112815
112816#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112817impl std::fmt::Display for PipelineFailurePolicy {
112818    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
112819        wkt::internal::display_enum(f, self.name(), self.value())
112820    }
112821}
112822
112823#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112824impl std::convert::From<i32> for PipelineFailurePolicy {
112825    fn from(value: i32) -> Self {
112826        match value {
112827            0 => Self::Unspecified,
112828            1 => Self::FailSlow,
112829            2 => Self::FailFast,
112830            _ => Self::UnknownValue(pipeline_failure_policy::UnknownValue(
112831                wkt::internal::UnknownEnumValue::Integer(value),
112832            )),
112833        }
112834    }
112835}
112836
112837#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112838impl std::convert::From<&str> for PipelineFailurePolicy {
112839    fn from(value: &str) -> Self {
112840        use std::string::ToString;
112841        match value {
112842            "PIPELINE_FAILURE_POLICY_UNSPECIFIED" => Self::Unspecified,
112843            "PIPELINE_FAILURE_POLICY_FAIL_SLOW" => Self::FailSlow,
112844            "PIPELINE_FAILURE_POLICY_FAIL_FAST" => Self::FailFast,
112845            _ => Self::UnknownValue(pipeline_failure_policy::UnknownValue(
112846                wkt::internal::UnknownEnumValue::String(value.to_string()),
112847            )),
112848        }
112849    }
112850}
112851
112852#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112853impl serde::ser::Serialize for PipelineFailurePolicy {
112854    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
112855    where
112856        S: serde::Serializer,
112857    {
112858        match self {
112859            Self::Unspecified => serializer.serialize_i32(0),
112860            Self::FailSlow => serializer.serialize_i32(1),
112861            Self::FailFast => serializer.serialize_i32(2),
112862            Self::UnknownValue(u) => u.0.serialize(serializer),
112863        }
112864    }
112865}
112866
112867#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112868impl<'de> serde::de::Deserialize<'de> for PipelineFailurePolicy {
112869    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
112870    where
112871        D: serde::Deserializer<'de>,
112872    {
112873        deserializer.deserialize_any(wkt::internal::EnumVisitor::<PipelineFailurePolicy>::new(
112874            ".google.cloud.aiplatform.v1.PipelineFailurePolicy",
112875        ))
112876    }
112877}
112878
112879/// Describes the state of a pipeline.
112880///
112881/// # Working with unknown values
112882///
112883/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
112884/// additional enum variants at any time. Adding new variants is not considered
112885/// a breaking change. Applications should write their code in anticipation of:
112886///
112887/// - New values appearing in future releases of the client library, **and**
112888/// - New values received dynamically, without application changes.
112889///
112890/// Please consult the [Working with enums] section in the user guide for some
112891/// guidelines.
112892///
112893/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
112894#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112895#[derive(Clone, Debug, PartialEq)]
112896#[non_exhaustive]
112897pub enum PipelineState {
112898    /// The pipeline state is unspecified.
112899    Unspecified,
112900    /// The pipeline has been created or resumed, and processing has not yet
112901    /// begun.
112902    Queued,
112903    /// The service is preparing to run the pipeline.
112904    Pending,
112905    /// The pipeline is in progress.
112906    Running,
112907    /// The pipeline completed successfully.
112908    Succeeded,
112909    /// The pipeline failed.
112910    Failed,
112911    /// The pipeline is being cancelled. From this state, the pipeline may only go
112912    /// to either PIPELINE_STATE_SUCCEEDED, PIPELINE_STATE_FAILED or
112913    /// PIPELINE_STATE_CANCELLED.
112914    Cancelling,
112915    /// The pipeline has been cancelled.
112916    Cancelled,
112917    /// The pipeline has been stopped, and can be resumed.
112918    Paused,
112919    /// If set, the enum was initialized with an unknown value.
112920    ///
112921    /// Applications can examine the value using [PipelineState::value] or
112922    /// [PipelineState::name].
112923    UnknownValue(pipeline_state::UnknownValue),
112924}
112925
112926#[doc(hidden)]
112927#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112928pub mod pipeline_state {
112929    #[allow(unused_imports)]
112930    use super::*;
112931    #[derive(Clone, Debug, PartialEq)]
112932    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
112933}
112934
112935#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112936impl PipelineState {
112937    /// Gets the enum value.
112938    ///
112939    /// Returns `None` if the enum contains an unknown value deserialized from
112940    /// the string representation of enums.
112941    pub fn value(&self) -> std::option::Option<i32> {
112942        match self {
112943            Self::Unspecified => std::option::Option::Some(0),
112944            Self::Queued => std::option::Option::Some(1),
112945            Self::Pending => std::option::Option::Some(2),
112946            Self::Running => std::option::Option::Some(3),
112947            Self::Succeeded => std::option::Option::Some(4),
112948            Self::Failed => std::option::Option::Some(5),
112949            Self::Cancelling => std::option::Option::Some(6),
112950            Self::Cancelled => std::option::Option::Some(7),
112951            Self::Paused => std::option::Option::Some(8),
112952            Self::UnknownValue(u) => u.0.value(),
112953        }
112954    }
112955
112956    /// Gets the enum value as a string.
112957    ///
112958    /// Returns `None` if the enum contains an unknown value deserialized from
112959    /// the integer representation of enums.
112960    pub fn name(&self) -> std::option::Option<&str> {
112961        match self {
112962            Self::Unspecified => std::option::Option::Some("PIPELINE_STATE_UNSPECIFIED"),
112963            Self::Queued => std::option::Option::Some("PIPELINE_STATE_QUEUED"),
112964            Self::Pending => std::option::Option::Some("PIPELINE_STATE_PENDING"),
112965            Self::Running => std::option::Option::Some("PIPELINE_STATE_RUNNING"),
112966            Self::Succeeded => std::option::Option::Some("PIPELINE_STATE_SUCCEEDED"),
112967            Self::Failed => std::option::Option::Some("PIPELINE_STATE_FAILED"),
112968            Self::Cancelling => std::option::Option::Some("PIPELINE_STATE_CANCELLING"),
112969            Self::Cancelled => std::option::Option::Some("PIPELINE_STATE_CANCELLED"),
112970            Self::Paused => std::option::Option::Some("PIPELINE_STATE_PAUSED"),
112971            Self::UnknownValue(u) => u.0.name(),
112972        }
112973    }
112974}
112975
112976#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112977impl std::default::Default for PipelineState {
112978    fn default() -> Self {
112979        use std::convert::From;
112980        Self::from(0)
112981    }
112982}
112983
112984#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112985impl std::fmt::Display for PipelineState {
112986    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
112987        wkt::internal::display_enum(f, self.name(), self.value())
112988    }
112989}
112990
112991#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
112992impl std::convert::From<i32> for PipelineState {
112993    fn from(value: i32) -> Self {
112994        match value {
112995            0 => Self::Unspecified,
112996            1 => Self::Queued,
112997            2 => Self::Pending,
112998            3 => Self::Running,
112999            4 => Self::Succeeded,
113000            5 => Self::Failed,
113001            6 => Self::Cancelling,
113002            7 => Self::Cancelled,
113003            8 => Self::Paused,
113004            _ => Self::UnknownValue(pipeline_state::UnknownValue(
113005                wkt::internal::UnknownEnumValue::Integer(value),
113006            )),
113007        }
113008    }
113009}
113010
113011#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
113012impl std::convert::From<&str> for PipelineState {
113013    fn from(value: &str) -> Self {
113014        use std::string::ToString;
113015        match value {
113016            "PIPELINE_STATE_UNSPECIFIED" => Self::Unspecified,
113017            "PIPELINE_STATE_QUEUED" => Self::Queued,
113018            "PIPELINE_STATE_PENDING" => Self::Pending,
113019            "PIPELINE_STATE_RUNNING" => Self::Running,
113020            "PIPELINE_STATE_SUCCEEDED" => Self::Succeeded,
113021            "PIPELINE_STATE_FAILED" => Self::Failed,
113022            "PIPELINE_STATE_CANCELLING" => Self::Cancelling,
113023            "PIPELINE_STATE_CANCELLED" => Self::Cancelled,
113024            "PIPELINE_STATE_PAUSED" => Self::Paused,
113025            _ => Self::UnknownValue(pipeline_state::UnknownValue(
113026                wkt::internal::UnknownEnumValue::String(value.to_string()),
113027            )),
113028        }
113029    }
113030}
113031
113032#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
113033impl serde::ser::Serialize for PipelineState {
113034    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
113035    where
113036        S: serde::Serializer,
113037    {
113038        match self {
113039            Self::Unspecified => serializer.serialize_i32(0),
113040            Self::Queued => serializer.serialize_i32(1),
113041            Self::Pending => serializer.serialize_i32(2),
113042            Self::Running => serializer.serialize_i32(3),
113043            Self::Succeeded => serializer.serialize_i32(4),
113044            Self::Failed => serializer.serialize_i32(5),
113045            Self::Cancelling => serializer.serialize_i32(6),
113046            Self::Cancelled => serializer.serialize_i32(7),
113047            Self::Paused => serializer.serialize_i32(8),
113048            Self::UnknownValue(u) => u.0.serialize(serializer),
113049        }
113050    }
113051}
113052
113053#[cfg(any(feature = "pipeline-service", feature = "schedule-service",))]
113054impl<'de> serde::de::Deserialize<'de> for PipelineState {
113055    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
113056    where
113057        D: serde::Deserializer<'de>,
113058    {
113059        deserializer.deserialize_any(wkt::internal::EnumVisitor::<PipelineState>::new(
113060            ".google.cloud.aiplatform.v1.PipelineState",
113061        ))
113062    }
113063}
113064
113065/// The state of the PSC service automation.
113066///
113067/// # Working with unknown values
113068///
113069/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
113070/// additional enum variants at any time. Adding new variants is not considered
113071/// a breaking change. Applications should write their code in anticipation of:
113072///
113073/// - New values appearing in future releases of the client library, **and**
113074/// - New values received dynamically, without application changes.
113075///
113076/// Please consult the [Working with enums] section in the user guide for some
113077/// guidelines.
113078///
113079/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
113080#[cfg(any(
113081    feature = "endpoint-service",
113082    feature = "feature-online-store-admin-service",
113083    feature = "index-endpoint-service",
113084))]
113085#[derive(Clone, Debug, PartialEq)]
113086#[non_exhaustive]
113087pub enum PSCAutomationState {
113088    /// Should not be used.
113089    Unspecified,
113090    /// The PSC service automation is successful.
113091    Successful,
113092    /// The PSC service automation has failed.
113093    Failed,
113094    /// If set, the enum was initialized with an unknown value.
113095    ///
113096    /// Applications can examine the value using [PSCAutomationState::value] or
113097    /// [PSCAutomationState::name].
113098    UnknownValue(psc_automation_state::UnknownValue),
113099}
113100
113101#[doc(hidden)]
113102#[cfg(any(
113103    feature = "endpoint-service",
113104    feature = "feature-online-store-admin-service",
113105    feature = "index-endpoint-service",
113106))]
113107pub mod psc_automation_state {
113108    #[allow(unused_imports)]
113109    use super::*;
113110    #[derive(Clone, Debug, PartialEq)]
113111    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
113112}
113113
113114#[cfg(any(
113115    feature = "endpoint-service",
113116    feature = "feature-online-store-admin-service",
113117    feature = "index-endpoint-service",
113118))]
113119impl PSCAutomationState {
113120    /// Gets the enum value.
113121    ///
113122    /// Returns `None` if the enum contains an unknown value deserialized from
113123    /// the string representation of enums.
113124    pub fn value(&self) -> std::option::Option<i32> {
113125        match self {
113126            Self::Unspecified => std::option::Option::Some(0),
113127            Self::Successful => std::option::Option::Some(1),
113128            Self::Failed => std::option::Option::Some(2),
113129            Self::UnknownValue(u) => u.0.value(),
113130        }
113131    }
113132
113133    /// Gets the enum value as a string.
113134    ///
113135    /// Returns `None` if the enum contains an unknown value deserialized from
113136    /// the integer representation of enums.
113137    pub fn name(&self) -> std::option::Option<&str> {
113138        match self {
113139            Self::Unspecified => std::option::Option::Some("PSC_AUTOMATION_STATE_UNSPECIFIED"),
113140            Self::Successful => std::option::Option::Some("PSC_AUTOMATION_STATE_SUCCESSFUL"),
113141            Self::Failed => std::option::Option::Some("PSC_AUTOMATION_STATE_FAILED"),
113142            Self::UnknownValue(u) => u.0.name(),
113143        }
113144    }
113145}
113146
113147#[cfg(any(
113148    feature = "endpoint-service",
113149    feature = "feature-online-store-admin-service",
113150    feature = "index-endpoint-service",
113151))]
113152impl std::default::Default for PSCAutomationState {
113153    fn default() -> Self {
113154        use std::convert::From;
113155        Self::from(0)
113156    }
113157}
113158
113159#[cfg(any(
113160    feature = "endpoint-service",
113161    feature = "feature-online-store-admin-service",
113162    feature = "index-endpoint-service",
113163))]
113164impl std::fmt::Display for PSCAutomationState {
113165    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
113166        wkt::internal::display_enum(f, self.name(), self.value())
113167    }
113168}
113169
113170#[cfg(any(
113171    feature = "endpoint-service",
113172    feature = "feature-online-store-admin-service",
113173    feature = "index-endpoint-service",
113174))]
113175impl std::convert::From<i32> for PSCAutomationState {
113176    fn from(value: i32) -> Self {
113177        match value {
113178            0 => Self::Unspecified,
113179            1 => Self::Successful,
113180            2 => Self::Failed,
113181            _ => Self::UnknownValue(psc_automation_state::UnknownValue(
113182                wkt::internal::UnknownEnumValue::Integer(value),
113183            )),
113184        }
113185    }
113186}
113187
113188#[cfg(any(
113189    feature = "endpoint-service",
113190    feature = "feature-online-store-admin-service",
113191    feature = "index-endpoint-service",
113192))]
113193impl std::convert::From<&str> for PSCAutomationState {
113194    fn from(value: &str) -> Self {
113195        use std::string::ToString;
113196        match value {
113197            "PSC_AUTOMATION_STATE_UNSPECIFIED" => Self::Unspecified,
113198            "PSC_AUTOMATION_STATE_SUCCESSFUL" => Self::Successful,
113199            "PSC_AUTOMATION_STATE_FAILED" => Self::Failed,
113200            _ => Self::UnknownValue(psc_automation_state::UnknownValue(
113201                wkt::internal::UnknownEnumValue::String(value.to_string()),
113202            )),
113203        }
113204    }
113205}
113206
113207#[cfg(any(
113208    feature = "endpoint-service",
113209    feature = "feature-online-store-admin-service",
113210    feature = "index-endpoint-service",
113211))]
113212impl serde::ser::Serialize for PSCAutomationState {
113213    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
113214    where
113215        S: serde::Serializer,
113216    {
113217        match self {
113218            Self::Unspecified => serializer.serialize_i32(0),
113219            Self::Successful => serializer.serialize_i32(1),
113220            Self::Failed => serializer.serialize_i32(2),
113221            Self::UnknownValue(u) => u.0.serialize(serializer),
113222        }
113223    }
113224}
113225
113226#[cfg(any(
113227    feature = "endpoint-service",
113228    feature = "feature-online-store-admin-service",
113229    feature = "index-endpoint-service",
113230))]
113231impl<'de> serde::de::Deserialize<'de> for PSCAutomationState {
113232    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
113233    where
113234        D: serde::Deserializer<'de>,
113235    {
113236        deserializer.deserialize_any(wkt::internal::EnumVisitor::<PSCAutomationState>::new(
113237            ".google.cloud.aiplatform.v1.PSCAutomationState",
113238        ))
113239    }
113240}