#[non_exhaustive]pub struct Collection {
pub name: String,
pub display_name: String,
pub description: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub vector_schema: HashMap<String, VectorField>,
pub data_schema: Option<Struct>,
/* private fields */
}Expand description
Message describing Collection 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 collection
description: StringOptional. User-specified description of the collection
create_time: Option<Timestamp>Output only. [Output only] Create time stamp
update_time: Option<Timestamp>Output only. [Output only] Update time stamp
labels: HashMap<String, String>Optional. Labels as key value pairs.
vector_schema: HashMap<String, VectorField>Optional. Schema for vector fields. Only vector fields in this schema will be searchable. Field names must contain only alphanumeric characters, underscores, and hyphens.
data_schema: Option<Struct>Optional. JSON Schema for data. Field names must contain only alphanumeric characters, underscores, and hyphens.
Implementations§
Source§impl Collection
impl Collection
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_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 = Collection::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 = Collection::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Collection::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 = Collection::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 = Collection::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Collection::new().set_or_clear_update_time(None::<Timestamp>);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_vector_schema<T, K, V>(self, v: T) -> Self
pub fn set_vector_schema<T, K, V>(self, v: T) -> Self
Sets the value of vector_schema.
§Example
use google_cloud_vectorsearch_v1::model::VectorField;
let x = Collection::new().set_vector_schema([
("key0", VectorField::default()/* use setters */),
("key1", VectorField::default()/* use (different) setters */),
]);Sourcepub fn set_data_schema<T>(self, v: T) -> Self
pub fn set_data_schema<T>(self, v: T) -> Self
Sets the value of data_schema.
§Example
use wkt::Struct;
let x = Collection::new().set_data_schema(Struct::default()/* use setters */);Sourcepub fn set_or_clear_data_schema<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_data_schema<T>(self, v: Option<T>) -> Self
Sets or clears the value of data_schema.
§Example
use wkt::Struct;
let x = Collection::new().set_or_clear_data_schema(Some(Struct::default()/* use setters */));
let x = Collection::new().set_or_clear_data_schema(None::<Struct>);Trait Implementations§
Source§impl Clone for Collection
impl Clone for Collection
Source§fn clone(&self) -> Collection
fn clone(&self) -> Collection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more