Interface IAsset
This is a base class containing the information pertaining to an asset.
Namespace: Unity.Cloud.Assets
Syntax
public interface IAsset
Properties
Attachments
The attachments of the asset.
Declaration
IEnumerable<IAssetFile> Attachments { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IAssetFile> |
Author
The author of the asset.
Declaration
AssetAuthor Author { get; set; }
Property Value
Type | Description |
---|---|
AssetAuthor |
Categories
The categories of the asset.
Declaration
List<string> Categories { get; set; }
Property Value
Type | Description |
---|---|
List<String> |
Collections
The collections of the asset.
Declaration
IEnumerable<CollectionPath> Collections { get; }
Property Value
Type | Description |
---|---|
IEnumerable<CollectionPath> |
Created
The created date of the asset.
Declaration
DateTime Created { get; }
Property Value
Type | Description |
---|---|
DateTime |
CreatedBy
The id of the user who created the asset.
Declaration
string CreatedBy { get; }
Property Value
Type | Description |
---|---|
String |
Description
The description of the asset.
Declaration
string Description { get; set; }
Property Value
Type | Description |
---|---|
String |
ExternalId
The external ID of the asset.
Declaration
string ExternalId { get; set; }
Property Value
Type | Description |
---|---|
String |
Files
The files of the asset.
Declaration
IEnumerable<IAssetFile> Files { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IAssetFile> |
Id
The id of the asset.
Declaration
AssetId Id { get; }
Property Value
Type | Description |
---|---|
AssetId |
LinkedProjectIds
The project ids to which the asset is linked.
Declaration
IEnumerable<ProjectId> LinkedProjectIds { get; }
Property Value
Type | Description |
---|---|
IEnumerable<ProjectId> |
Location
The location of the asset.
Declaration
AssetLocation Location { get; set; }
Property Value
Type | Description |
---|---|
AssetLocation |
Name
The name of the asset.
Declaration
string Name { get; set; }
Property Value
Type | Description |
---|---|
String |
OrganizationId
The id of the organization the asset belongs to.
Declaration
OrganizationId OrganizationId { get; set; }
Property Value
Type | Description |
---|---|
OrganizationId |
Origin
The origin of the asset.
Declaration
string Origin { get; set; }
Property Value
Type | Description |
---|---|
String |
PreviewFileId
The preview file ID of the asset.
Declaration
string PreviewFileId { get; set; }
Property Value
Type | Description |
---|---|
String |
ShortId
The short ID of the asset.
Declaration
string ShortId { get; set; }
Property Value
Type | Description |
---|---|
String |
SourceProjectId
The source id of the project the asset belongs to.
Declaration
ProjectId SourceProjectId { get; }
Property Value
Type | Description |
---|---|
ProjectId |
Status
The status of the asset.
Declaration
string Status { get; }
Property Value
Type | Description |
---|---|
String |
StatusDetails
The status details of the asset.
Declaration
string StatusDetails { get; set; }
Property Value
Type | Description |
---|---|
String |
StorageId
The storage id of the asset.
Declaration
string StorageId { get; }
Property Value
Type | Description |
---|---|
String |
Tags
The tags of the asset.
Declaration
List<string> Tags { get; set; }
Property Value
Type | Description |
---|---|
List<String> |
Taxonomy
The taxonomy of the asset.
Declaration
AssetTaxonomy Taxonomy { get; set; }
Property Value
Type | Description |
---|---|
AssetTaxonomy |
Type
The type of the asset.
Declaration
string Type { get; set; }
Property Value
Type | Description |
---|---|
String |
Updated
The last update date of the asset.
Declaration
DateTime Updated { get; }
Property Value
Type | Description |
---|---|
DateTime |
UpdatedBy
The id of the user who last updated the asset.
Declaration
string UpdatedBy { get; }
Property Value
Type | Description |
---|---|
String |
Version
The version of the asset.
Declaration
int Version { get; }
Property Value
Type | Description |
---|---|
Int32 |
VersionName
The version name of the asset.
Declaration
string VersionName { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
ApproveAsync(CancellationToken)
Updates the asset status to approved.
Declaration
Task ApproveAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
CreateAssetFileAsync(IAssetFileCreation, CancellationToken)
Creates and returns a new IAssetFile.
Declaration
Task<IAssetFile> CreateAssetFileAsync(IAssetFileCreation assetFileCreation, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAssetFileCreation | assetFileCreation | An object containing the necessary information to create an IAssetFile, |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IAssetFile> | A task whose result is the newly created IAssetFile. |
DeleteAssetFileAsync(String, CancellationToken)
Deletes the specified IAssetFile.
Declaration
Task DeleteAssetFileAsync(string assetFileId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | assetFileId | The asset file to delete. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
GetAssetDownloadUrlsAsync(CancellationToken)
Returns the download urls for the asset's files and attachements.
Declaration
Task<IEnumerable<string>> GetAssetDownloadUrlsAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IEnumerable<String>> | A task whose result is the download urls for all the asset's files and attachements. |
GetCollectionAsync(CollectionPath, CancellationToken)
Returns the IAssetCollection with the specified path.
Declaration
Task<IAssetCollection> GetCollectionAsync(CollectionPath collectionPath, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CollectionPath | collectionPath | The path to the collection. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IAssetCollection> | A task whose result is the IAssetCollection at path |
PublishAsync(CancellationToken)
Updates the asset status to published.
Declaration
Task PublishAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
RefreshAssetCollectionsAsync(CancellationToken)
Refreshes the
Declaration
Task RefreshAssetCollectionsAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
RejectAsync(CancellationToken)
Updates the asset status to draft.
Declaration
Task RejectAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
SendToReviewAsync(CancellationToken)
Updates the asset status to ingestion.
Declaration
Task SendToReviewAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
UpdateAsync(CancellationToken)
Synchronizes local changes to the asset to the data source.
Declaration
Task UpdateAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
WithdrawAsync(CancellationToken)
Updates the asset status to draft.
Declaration
Task WithdrawAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task | A task with no result. |