#[non_exhaustive]pub struct Examples {
pub neighbor_count: i32,
pub source: Option<Source>,
pub config: Option<Config>,
/* private fields */
}dataset-service or deployment-resource-pool-service or endpoint-service or job-service or model-service or pipeline-service or prediction-service only.Expand description
Example-based explainability that returns the nearest neighbors from the provided dataset.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.neighbor_count: i32The number of neighbors to return when querying for examples.
source: Option<Source>§config: Option<Config>Implementations§
Source§impl Examples
impl Examples
pub fn new() -> Self
Sourcepub fn set_neighbor_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_neighbor_count<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sets the value of source.
Note that all the setters affecting source are mutually
exclusive.
§Example
use google_cloud_aiplatform_v1::model::examples::ExampleGcsSource;
let x = Examples::new().set_source(Some(
google_cloud_aiplatform_v1::model::examples::Source::ExampleGcsSource(ExampleGcsSource::default().into())));Sourcepub fn example_gcs_source(&self) -> Option<&Box<ExampleGcsSource>>
pub fn example_gcs_source(&self) -> Option<&Box<ExampleGcsSource>>
The value of source
if it holds a ExampleGcsSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_example_gcs_source<T: Into<Box<ExampleGcsSource>>>(
self,
v: T,
) -> Self
pub fn set_example_gcs_source<T: Into<Box<ExampleGcsSource>>>( self, v: T, ) -> Self
Sets the value of source
to hold a ExampleGcsSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::examples::ExampleGcsSource;
let x = Examples::new().set_example_gcs_source(ExampleGcsSource::default()/* use setters */);
assert!(x.example_gcs_source().is_some());Sourcepub fn set_config<T: Into<Option<Config>>>(self, v: T) -> Self
pub fn set_config<T: Into<Option<Config>>>(self, v: T) -> Self
Sourcepub fn nearest_neighbor_search_config(&self) -> Option<&Box<Value>>
pub fn nearest_neighbor_search_config(&self) -> Option<&Box<Value>>
The value of config
if it holds a NearestNeighborSearchConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_nearest_neighbor_search_config<T: Into<Box<Value>>>(
self,
v: T,
) -> Self
pub fn set_nearest_neighbor_search_config<T: Into<Box<Value>>>( self, v: T, ) -> Self
Sets the value of config
to hold a NearestNeighborSearchConfig.
Note that all the setters affecting config are
mutually exclusive.
§Example
use wkt::Value;
let x = Examples::new().set_nearest_neighbor_search_config(Value::default()/* use setters */);
assert!(x.nearest_neighbor_search_config().is_some());
assert!(x.presets().is_none());Sourcepub fn presets(&self) -> Option<&Box<Presets>>
pub fn presets(&self) -> Option<&Box<Presets>>
The value of config
if it holds a Presets, None if the field is not set or
holds a different branch.
Sourcepub fn set_presets<T: Into<Box<Presets>>>(self, v: T) -> Self
pub fn set_presets<T: Into<Box<Presets>>>(self, v: T) -> Self
Sets the value of config
to hold a Presets.
Note that all the setters affecting config are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::Presets;
let x = Examples::new().set_presets(Presets::default()/* use setters */);
assert!(x.presets().is_some());
assert!(x.nearest_neighbor_search_config().is_none());