pub struct AddAsset {
pub name: String,
pub external_id: Option<String>,
pub parent_id: Option<i64>,
pub description: Option<String>,
pub metadata: Option<HashMap<String, String>>,
pub source: Option<String>,
pub parent_external_id: Option<String>,
pub data_set_id: Option<i64>,
pub labels: Option<Vec<CogniteExternalId>>,
pub geo_location: Option<GeoLocation>,
}Expand description
Create an asset.
Fields§
§name: StringName of the asset.
external_id: Option<String>Unique external ID of the asset.
parent_id: Option<i64>Parent node ID used to specify a parent-child relationship. Do not use
in combination with parent_external_id
description: Option<String>Description of the asset.
metadata: Option<HashMap<String, String>>Custom, application specific metadata. String key -> String value. Limits: Maximum length of key is 128 bytes, value 10240 bytes, up to 256 key-value pairs, of total size at most 10240.
source: Option<String>Source of the asset.
parent_external_id: Option<String>External ID of the parent asset. When specifying this field, the API will resolve the external ID into an internal ID and use the internal ID to store the parent-child relation. As a result, a later change to update the parent’s external ID will not affect this parent-child relationship as it is based on internal ID.
Do not use in combination with parent_id
data_set_id: Option<i64>ID of the dataset this asset belongs to.
labels: Option<Vec<CogniteExternalId>>A list of labels associated with this asset.
geo_location: Option<GeoLocation>Geographic metadata.