Interface IAssetCollection
This object contains the information about an asset collection.
Namespace: Unity.Cloud.Assets
Assembly: Unity.Cloud.Assets.dll
Syntax
public interface IAssetCollection
Properties
CacheConfiguration
The caching configuration for the collection.
Declaration
AssetCollectionCacheConfiguration CacheConfiguration { get; }
Property Value
Type | Description |
---|---|
AssetCollectionCacheConfiguration |
Description
Describes the collection.
Declaration
[Obsolete("Use IAssestCollectionProperties.Description instead.")]
string Description { get; }
Property Value
Type | Description |
---|---|
string |
Descriptor
The descriptor of the collection.
Declaration
CollectionDescriptor Descriptor { get; }
Property Value
Type | Description |
---|---|
CollectionDescriptor |
Name
The name of the collection.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
string |
ParentPath
The path to the parent collection; can be empty.
Declaration
CollectionPath ParentPath { get; }
Property Value
Type | Description |
---|---|
CollectionPath |
Methods
GetFullCollectionPath()
Returns the full path to the collection.
Declaration
[Obsolete("Use Descriptor.Path instead.")]
string GetFullCollectionPath()
Returns
Type | Description |
---|---|
string | The path of the collection. |
GetPropertiesAsync(CancellationToken)
Returns the properties of the collection.
Declaration
Task<AssetCollectionProperties> GetPropertiesAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task<AssetCollectionProperties> | A task whose result is the AssetCollectionProperties of the collection. |
LinkAssetsAsync(IEnumerable<IAsset>, CancellationToken)
Adds a set of asset references to the collection.
Declaration
Task LinkAssetsAsync(IEnumerable<IAsset> assets, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IAsset> | assets | The assets to link to the collection. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
LinkAssetsAsync(IEnumerable<AssetId>, CancellationToken)
Adds a set of asset references to the collection.
Declaration
Task LinkAssetsAsync(IEnumerable<AssetId> assetIds, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<AssetId> | assetIds | The ids of the assets to link to the collection. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
MoveToNewPathAsync(CollectionPath, CancellationToken)
Creates a new path for the collection.
Declaration
Task MoveToNewPathAsync(CollectionPath newCollectionPath, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CollectionPath | newCollectionPath | The new parent path. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
RefreshAsync(CancellationToken)
Refreshes the collection properties.
Declaration
Task RefreshAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
UnlinkAssetsAsync(IEnumerable<IAsset>, CancellationToken)
Removes a set of asset references from the collection.
Declaration
Task UnlinkAssetsAsync(IEnumerable<IAsset> assets, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IAsset> | assets | The assets to unlink from the collection. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
UnlinkAssetsAsync(IEnumerable<AssetId>, CancellationToken)
Removes a set of asset references from the collection.
Declaration
Task UnlinkAssetsAsync(IEnumerable<AssetId> assetIds, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<AssetId> | assetIds | The ids of the assets to unlink from the collection. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
UpdateAsync(IAssetCollectionUpdate, CancellationToken)
Updates the collection.
Declaration
Task UpdateAsync(IAssetCollectionUpdate assetCollectionUpdate, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAssetCollectionUpdate | assetCollectionUpdate | The object containing the collection information to update. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
WithCacheConfigurationAsync(AssetCollectionCacheConfiguration, CancellationToken)
Returns an asset collection configured with the specified caching configuration.
Declaration
Task<IAssetCollection> WithCacheConfigurationAsync(AssetCollectionCacheConfiguration assetCollectionCacheConfiguration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AssetCollectionCacheConfiguration | assetCollectionCacheConfiguration | The caching configuration for the collection. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task<IAssetCollection> | A task whose result is an IAssetCollection with cached values specified by the caching configurations. |