pub struct Asset {Show 15 fields
pub id: i64,
pub name: String,
pub external_id: Option<String>,
pub parent_id: Option<i64>,
pub parent_external_id: Option<String>,
pub description: Option<String>,
pub metadata: Option<HashMap<String, String>>,
pub source: Option<String>,
pub created_time: i64,
pub last_updated_time: i64,
pub root_id: Option<i64>,
pub aggregates: Option<AssetAggregate>,
pub data_set_id: Option<i64>,
pub labels: Option<Vec<CogniteExternalId>>,
pub geo_location: Option<GeoLocation>,
}Expand description
A CDF asset, representing some entity.
Fields§
§id: i64Server-generated ID of the asset.
name: StringName of the asset.
external_id: Option<String>Unique user-provided external ID.
parent_id: Option<i64>ID of the parent node.
parent_external_id: Option<String>External ID of the parent node.
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.
created_time: i64Time this asset was created, in milliseconds since epoch.
last_updated_time: i64Time this assset was last updated, in milliseconds since epoch.
root_id: Option<i64>ID of the root asset.
aggregates: Option<AssetAggregate>Aggregated metrics computed on this asset.
data_set_id: Option<i64>ID of the data set this asset belongs to.
labels: Option<Vec<CogniteExternalId>>List of the labels associated with this asset.
geo_location: Option<GeoLocation>Geographic metadata.
Implementations§
Source§impl Asset
impl Asset
Sourcepub fn new(
name: &str,
description: &str,
external_id: Option<String>,
parent_id: Option<i64>,
metadata: Option<HashMap<String, String>>,
source: Option<String>,
) -> Asset
pub fn new( name: &str, description: &str, external_id: Option<String>, parent_id: Option<i64>, metadata: Option<HashMap<String, String>>, source: Option<String>, ) -> Asset
Create an asset
§Arguments
name- Name of the asset.description- Description of the asset.external_id- External ID of the asset, must be unique.parent_id- ID of the parent of this asset.metadata- Optional application specific metadata.source- Source of this asset.
Trait Implementations§
Source§impl CleanResource<Asset> for AssetsResource
impl CleanResource<Asset> for AssetsResource
Source§impl Create<AddAsset, Asset> for AssetsResource
impl Create<AddAsset, Asset> for AssetsResource
Source§fn create(
&self,
creates: &[TCreate],
) -> impl Future<Output = Result<Vec<TResponse>>> + Send
fn create( &self, creates: &[TCreate], ) -> impl Future<Output = Result<Vec<TResponse>>> + Send
Create a list of resources. Read more
Source§fn create_from(
&self,
creates: &[impl Into<TCreate> + Sync + Clone],
) -> impl Future<Output = Result<Vec<TResponse>>> + Send
fn create_from( &self, creates: &[impl Into<TCreate> + Sync + Clone], ) -> impl Future<Output = Result<Vec<TResponse>>> + Send
Create a list of resources, converting from a different type. Read more
Source§fn create_ignore_duplicates(
&self,
creates: &[TCreate],
) -> impl Future<Output = Result<Vec<TResponse>>> + Sendwhere
TCreate: EqIdentity,
fn create_ignore_duplicates(
&self,
creates: &[TCreate],
) -> impl Future<Output = Result<Vec<TResponse>>> + Sendwhere
TCreate: EqIdentity,
Create a list of resources, ignoring any that fail with general “conflict” errors. Read more
Source§fn create_from_ignore_duplicates<'a, T: 'a>(
&self,
creates: &'a [impl Into<TCreate> + Sync + Clone],
) -> impl Future<Output = Result<Vec<TResponse>>> + Sendwhere
TCreate: EqIdentity,
fn create_from_ignore_duplicates<'a, T: 'a>(
&self,
creates: &'a [impl Into<TCreate> + Sync + Clone],
) -> impl Future<Output = Result<Vec<TResponse>>> + Sendwhere
TCreate: EqIdentity,
Create a list of resources, converting from a different type, and ignoring any that fail
with general “conflict” errors. Read more
Source§impl<'de> Deserialize<'de> for Asset
impl<'de> Deserialize<'de> for Asset
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FilterWithRequest<FilterAssetsRequest, Asset> for AssetsResource
impl FilterWithRequest<FilterAssetsRequest, Asset> for AssetsResource
Source§fn filter(
&self,
filter: TFilter,
) -> impl Future<Output = Result<ItemsVec<TResponse, Cursor>>> + Send
fn filter( &self, filter: TFilter, ) -> impl Future<Output = Result<ItemsVec<TResponse, Cursor>>> + Send
Filter resources. Read more
Source§fn filter_all(
&self,
filter: TFilter,
) -> impl Future<Output = Result<Vec<TResponse>>> + Send
fn filter_all( &self, filter: TFilter, ) -> impl Future<Output = Result<Vec<TResponse>>> + Send
Filter resources, following cursors until they are exhausted. Read more
Source§fn filter_all_stream(
&self,
filter: TFilter,
) -> impl TryStream<Ok = TResponse, Error = Error, Item = Result<TResponse>> + Send
fn filter_all_stream( &self, filter: TFilter, ) -> impl TryStream<Ok = TResponse, Error = Error, Item = Result<TResponse>> + Send
Filter resources, following cursors. This returns a stream, you can abort the stream whenever you
want and only resources retrieved up to that point will be returned. Read more
Source§fn filter_all_partitioned(
&self,
filter: TFilter,
num_partitions: u32,
) -> impl Future<Output = Result<Vec<TResponse>>> + Send
fn filter_all_partitioned( &self, filter: TFilter, num_partitions: u32, ) -> impl Future<Output = Result<Vec<TResponse>>> + Send
Filter resources using partitioned reads, following cursors until all partitions are
exhausted. Read more
Source§impl IntoPatch<Patch<PatchAsset>> for Asset
impl IntoPatch<Patch<PatchAsset>> for Asset
Source§fn patch(self, options: &UpsertOptions) -> Patch<PatchAsset>
fn patch(self, options: &UpsertOptions) -> Patch<PatchAsset>
Convert self into a patch, optionally ignoring null values.
Source§impl List<AssetQuery, Asset> for AssetsResource
impl List<AssetQuery, Asset> for AssetsResource
Source§fn list(
&self,
params: Option<TParams>,
) -> impl Future<Output = Result<ItemsVec<TResponse, Cursor>>> + Send
fn list( &self, params: Option<TParams>, ) -> impl Future<Output = Result<ItemsVec<TResponse, Cursor>>> + Send
Query a resource with optional query parameters. Read more
Source§fn list_all(
&self,
params: TParams,
) -> impl Future<Output = Result<Vec<TResponse>>> + Send
fn list_all( &self, params: TParams, ) -> impl Future<Output = Result<Vec<TResponse>>> + Send
Query a resource with query parameters, continuing until the cursor is exhausted. Read more
Source§fn list_all_stream(
&self,
params: TParams,
) -> impl TryStream<Ok = TResponse, Error = Error, Item = Result<TResponse>> + Send
fn list_all_stream( &self, params: TParams, ) -> impl TryStream<Ok = TResponse, Error = Error, Item = Result<TResponse>> + Send
List resources, following cursors. This returns a stream, you can abort the stream whenever you
want and only resources retrieved up to that point will be returned. Read more
Source§impl SearchItems<'_, AssetFilter, AssetSearch, Asset> for AssetsResource
impl SearchItems<'_, AssetFilter, AssetSearch, Asset> for AssetsResource
Source§impl Update<Patch<PatchAsset>, Asset> for AssetsResource
impl Update<Patch<PatchAsset>, Asset> for AssetsResource
Source§fn update(
&self,
updates: &[TUpdate],
) -> impl Future<Output = Result<Vec<TResponse>>> + Send
fn update( &self, updates: &[TUpdate], ) -> impl Future<Output = Result<Vec<TResponse>>> + Send
Update a list of resources. Read more
Source§fn update_from<'a, T>(
&self,
updates: &'a [T],
) -> impl Future<Output = Result<Vec<TResponse>>> + Send
fn update_from<'a, T>( &self, updates: &'a [T], ) -> impl Future<Output = Result<Vec<TResponse>>> + Send
Update a list of resources by converting to the update from a different type. Read more
Source§fn update_ignore_unknown_ids(
&self,
updates: &[TUpdate],
) -> impl Future<Output = Result<Vec<TResponse>>> + Sendwhere
TUpdate: EqIdentity,
TResponse: Send,
fn update_ignore_unknown_ids(
&self,
updates: &[TUpdate],
) -> impl Future<Output = Result<Vec<TResponse>>> + Sendwhere
TUpdate: EqIdentity,
TResponse: Send,
Update a list of resources, ignoring any that fail due to items missing in CDF. Read more
Auto Trait Implementations§
impl Freeze for Asset
impl RefUnwindSafe for Asset
impl Send for Asset
impl Sync for Asset
impl Unpin for Asset
impl UnwindSafe for Asset
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more