Class CloudAssetManager
A class that provides access and management of cloud assets.
Inherited Members
Namespace: Unity.Cloud.Assets
Syntax
public sealed class CloudAssetManager : CloudAssetProvider, IAssetProvider, IAssetManager
Constructors
CloudAssetManager(IServiceHttpClient, IServiceHostResolver, AssetServiceConfiguration)
Initializes and returns an instance of CloudAssetManager
Declaration
public CloudAssetManager(IServiceHttpClient serviceHttpClient, IServiceHostResolver serviceHostResolver, AssetServiceConfiguration assetServiceConfiguration)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceHttpClient | serviceHttpClient | The IServiceHttpClient used to fetch the data. |
| IServiceHostResolver | serviceHostResolver | The IServiceHostResolver object. |
| AssetServiceConfiguration | assetServiceConfiguration | The asset service configuration object. |
Methods
ApproveAssetAsync(IAsset, CancellationToken)
Implement this method to approve an asset in review.
Declaration
public Task ApproveAssetAsync(IAsset asset, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsset | asset | The asset. |
| CancellationToken | token | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |
Implements
CheckProjectIsAssetSourceProjectAsync(IAsset, CancellationToken)
Implement this method to check if the project is an asset source project.
Declaration
public Task<bool> CheckProjectIsAssetSourceProjectAsync(IAsset asset, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsset | asset | The asset. |
| CancellationToken | token | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<Boolean> | A task with a boolean. True if asset's project is the source. False otherwise |
Implements
CreateAssetAsync(IAssetCreation, CancellationToken)
Implement this method to create an asset.
Declaration
public Task<IAsset> CreateAssetAsync(IAssetCreation assetCreation, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| IAssetCreation | assetCreation | The object containing the necessary information to create an IAsset. |
| CancellationToken | token | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<IAsset> | A task with no result. |
Implements
DeleteAssetAsync(IAsset, CancellationToken)
Implement this method to delete an asset.
Declaration
public Task DeleteAssetAsync(IAsset asset, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsset | asset | The asset to delete. |
| CancellationToken | token | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |
Implements
GetAssetCollectionsAsync(IAsset, CancellationToken)
Implement this method to get the asset collections.
Declaration
public Task GetAssetCollectionsAsync(IAsset asset, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsset | asset | The the asset. |
| CancellationToken | token | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |
Implements
GetAssetDownloadUrlsAsync(IAsset, CancellationToken)
Implement this method to get the asset download urls.
Declaration
public Task GetAssetDownloadUrlsAsync(IAsset asset, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsset | asset | The the asset. |
| CancellationToken | token | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |
Implements
LinkAnAssetToProjectAsync(IAsset, UInt64, String, CancellationToken)
Implement this method to get the asset download urls.
Declaration
public Task LinkAnAssetToProjectAsync(IAsset asset, ulong destinationOrganizationId, string destinationProjectId, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsset | asset | The asset. |
| UInt64 | destinationOrganizationId | The destination organization id. |
| String | destinationProjectId | The destination project id. |
| CancellationToken | token | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |
Implements
PublishApprovedAssetAsync(IAsset, CancellationToken)
Implement this method to publish an approved asset.
Declaration
public Task PublishApprovedAssetAsync(IAsset asset, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsset | asset | The asset. |
| CancellationToken | token | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |
Implements
RejectAssetAsync(IAsset, CancellationToken)
Implement this method to reject an asset in review.
Declaration
public Task RejectAssetAsync(IAsset asset, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsset | asset | The asset. |
| CancellationToken | token | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |
Implements
SendAssetToReviewAsync(IAsset, CancellationToken)
Implement this method to send an asset to review.
Declaration
public Task SendAssetToReviewAsync(IAsset asset, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsset | asset | The asset. |
| CancellationToken | token | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |
Implements
UnlinkAssetFromProjectAsync(IAsset, CancellationToken)
Implement this method to unlink the asset from the project.
Declaration
public Task UnlinkAssetFromProjectAsync(IAsset asset, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsset | asset | The asset. |
| CancellationToken | token | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |
Implements
UpdateAssetAsync(IAsset, CancellationToken)
Implement this method to update an asset.
Declaration
public Task UpdateAssetAsync(IAsset asset, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsset | asset | The asset you want to update. |
| CancellationToken | token | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |
Implements
WithdrawPublishedAssetAsync(IAsset, CancellationToken)
Implement this method to withdraw an published asset.
Declaration
public Task WithdrawPublishedAssetAsync(IAsset asset, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsset | asset | The asset. |
| CancellationToken | token | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task | A task with no result. |