#[non_exhaustive]pub struct Index {
pub name: String,
pub display_name: String,
pub description: String,
pub labels: HashMap<String, String>,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub distance_metric: DistanceMetric,
pub index_field: String,
pub filter_fields: Vec<String>,
pub store_fields: Vec<String>,
pub infra_type: Option<InfraType>,
pub index_type: Option<IndexType>,
/* private fields */
}Expand description
Message describing Index object
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.name: StringIdentifier. name of resource
display_name: StringOptional. User-specified display name of the index
description: StringOptional. User-specified description of the index
labels: HashMap<String, String>Optional. Labels as key value pairs.
create_time: Option<Timestamp>Output only. [Output only] Create time stamp
update_time: Option<Timestamp>Output only. [Output only] Update time stamp
distance_metric: DistanceMetricOptional. Distance metric used for indexing. If not specified, will default to DOT_PRODUCT.
index_field: StringRequired. The collection schema field to index.
filter_fields: Vec<String>Optional. The fields to push into the index to enable fast ANN inline filtering.
store_fields: Vec<String>Optional. The fields to push into the index to enable inline data retrieval.
infra_type: Option<InfraType>The infrastructure type of the index.
index_type: Option<IndexType>The type of the index.
Implementations§
Source§impl Index
impl Index
pub fn new() -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Index::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Index::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Index::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Index::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Index::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Index::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_distance_metric<T: Into<DistanceMetric>>(self, v: T) -> Self
pub fn set_distance_metric<T: Into<DistanceMetric>>(self, v: T) -> Self
Sets the value of distance_metric.
§Example
use google_cloud_vectorsearch_v1::model::DistanceMetric;
let x0 = Index::new().set_distance_metric(DistanceMetric::DotProduct);
let x1 = Index::new().set_distance_metric(DistanceMetric::CosineDistance);Sourcepub fn set_index_field<T: Into<String>>(self, v: T) -> Self
pub fn set_index_field<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_filter_fields<T, V>(self, v: T) -> Self
pub fn set_filter_fields<T, V>(self, v: T) -> Self
Sourcepub fn set_store_fields<T, V>(self, v: T) -> Self
pub fn set_store_fields<T, V>(self, v: T) -> Self
Sourcepub fn set_infra_type<T: Into<Option<InfraType>>>(self, v: T) -> Self
pub fn set_infra_type<T: Into<Option<InfraType>>>(self, v: T) -> Self
Sets the value of infra_type.
Note that all the setters affecting infra_type are mutually
exclusive.
§Example
use google_cloud_vectorsearch_v1::model::DedicatedInfrastructure;
let x = Index::new().set_infra_type(Some(
google_cloud_vectorsearch_v1::model::index::InfraType::DedicatedInfrastructure(DedicatedInfrastructure::default().into())));Sourcepub fn dedicated_infrastructure(&self) -> Option<&Box<DedicatedInfrastructure>>
pub fn dedicated_infrastructure(&self) -> Option<&Box<DedicatedInfrastructure>>
The value of infra_type
if it holds a DedicatedInfrastructure, None if the field is not set or
holds a different branch.
Sourcepub fn set_dedicated_infrastructure<T: Into<Box<DedicatedInfrastructure>>>(
self,
v: T,
) -> Self
pub fn set_dedicated_infrastructure<T: Into<Box<DedicatedInfrastructure>>>( self, v: T, ) -> Self
Sets the value of infra_type
to hold a DedicatedInfrastructure.
Note that all the setters affecting infra_type are
mutually exclusive.
§Example
use google_cloud_vectorsearch_v1::model::DedicatedInfrastructure;
let x = Index::new().set_dedicated_infrastructure(DedicatedInfrastructure::default()/* use setters */);
assert!(x.dedicated_infrastructure().is_some());Sourcepub fn set_index_type<T: Into<Option<IndexType>>>(self, v: T) -> Self
pub fn set_index_type<T: Into<Option<IndexType>>>(self, v: T) -> Self
Sets the value of index_type.
Note that all the setters affecting index_type are mutually
exclusive.
§Example
use google_cloud_vectorsearch_v1::model::DenseScannIndex;
let x = Index::new().set_index_type(Some(
google_cloud_vectorsearch_v1::model::index::IndexType::DenseScann(DenseScannIndex::default().into())));Sourcepub fn dense_scann(&self) -> Option<&Box<DenseScannIndex>>
pub fn dense_scann(&self) -> Option<&Box<DenseScannIndex>>
The value of index_type
if it holds a DenseScann, None if the field is not set or
holds a different branch.
Sourcepub fn set_dense_scann<T: Into<Box<DenseScannIndex>>>(self, v: T) -> Self
pub fn set_dense_scann<T: Into<Box<DenseScannIndex>>>(self, v: T) -> Self
Sets the value of index_type
to hold a DenseScann.
Note that all the setters affecting index_type are
mutually exclusive.
§Example
use google_cloud_vectorsearch_v1::model::DenseScannIndex;
let x = Index::new().set_dense_scann(DenseScannIndex::default()/* use setters */);
assert!(x.dense_scann().is_some());