#[non_exhaustive]pub struct Annotation {
pub name: String,
pub payload_schema_uri: String,
pub payload: Option<Value>,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub etag: String,
pub annotation_source: Option<UserActionReference>,
pub labels: HashMap<String, String>,
/* private fields */
}dataset-service only.Expand description
Used to assign specific AnnotationSpec to a particular area of a DataItem or the whole part of the DataItem.
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: StringOutput only. Resource name of the Annotation.
payload_schema_uri: StringRequired. Google Cloud Storage URI points to a YAML file describing payload. The schema is defined as an OpenAPI 3.0.2 Schema Object. The schema files that can be used here are found in gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the chosen schema must be consistent with the parent Dataset’s metadata.
payload: Option<Value>Required. The schema of the payload can be found in payload_schema.
create_time: Option<Timestamp>Output only. Timestamp when this Annotation was created.
update_time: Option<Timestamp>Output only. Timestamp when this Annotation was last updated.
etag: StringOptional. Used to perform consistent read-modify-write updates. If not set, a blind “overwrite” update happens.
annotation_source: Option<UserActionReference>Output only. The source of the Annotation.
labels: HashMap<String, String>Optional. The labels with user-defined metadata to organize your Annotations.
Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Annotation(System labels are excluded).
See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with “aiplatform.googleapis.com/” and are immutable. Following system labels exist for each Annotation:
-
“aiplatform.googleapis.com/annotation_set_name”: optional, name of the UI’s annotation set this Annotation belongs to. If not set, the Annotation is not visible in the UI.
-
“aiplatform.googleapis.com/payload_schema”: output only, its value is the payload_schema’s title.
Implementations§
Source§impl Annotation
impl Annotation
pub fn new() -> Self
Sourcepub fn set_payload_schema_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_payload_schema_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of payload_schema_uri.
§Example
let x = Annotation::new().set_payload_schema_uri("example");Sourcepub fn set_payload<T>(self, v: T) -> Self
pub fn set_payload<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_payload<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_payload<T>(self, v: Option<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 = Annotation::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 = Annotation::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Annotation::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 = Annotation::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 = Annotation::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Annotation::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_annotation_source<T>(self, v: T) -> Selfwhere
T: Into<UserActionReference>,
pub fn set_annotation_source<T>(self, v: T) -> Selfwhere
T: Into<UserActionReference>,
Sets the value of annotation_source.
§Example
use google_cloud_aiplatform_v1::model::UserActionReference;
let x = Annotation::new().set_annotation_source(UserActionReference::default()/* use setters */);Sourcepub fn set_or_clear_annotation_source<T>(self, v: Option<T>) -> Selfwhere
T: Into<UserActionReference>,
pub fn set_or_clear_annotation_source<T>(self, v: Option<T>) -> Selfwhere
T: Into<UserActionReference>,
Sets or clears the value of annotation_source.
§Example
use google_cloud_aiplatform_v1::model::UserActionReference;
let x = Annotation::new().set_or_clear_annotation_source(Some(UserActionReference::default()/* use setters */));
let x = Annotation::new().set_or_clear_annotation_source(None::<UserActionReference>);Trait Implementations§
Source§impl Clone for Annotation
impl Clone for Annotation
Source§fn clone(&self) -> Annotation
fn clone(&self) -> Annotation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more