Interface IDataset
Namespace: Unity.Cloud.Assets
Assembly: Unity.Cloud.Assets.dll
Syntax
public interface IDataset
Properties
AuthoringInfo
The authoring info of the dataset.
Declaration
[Obsolete("Use DatasetProperties.AuthoringInfo instead.")]
AuthoringInfo AuthoringInfo { get; }
Property Value
Type | Description |
---|---|
AuthoringInfo |
CacheConfiguration
The caching configuration for the dataset.
Declaration
DatasetCacheConfiguration CacheConfiguration { get; }
Property Value
Type | Description |
---|---|
DatasetCacheConfiguration |
Description
A description of the dataset.
Declaration
[Obsolete("Use DatasetProperties.Description instead.")]
string Description { get; }
Property Value
Type | Description |
---|---|
string |
Descriptor
The descriptor of the dataset.
Declaration
DatasetDescriptor Descriptor { get; }
Property Value
Type | Description |
---|---|
DatasetDescriptor |
FileOrder
The order of the files in the dataset.
Declaration
[Obsolete("Use DatasetProperties.FileOrder instead.")]
IEnumerable<string> FileOrder { get; }
Property Value
Type | Description |
---|---|
IEnumerable<string> |
IsVisible
Indicates whether the dataset is visible or not.
Declaration
[Obsolete("Use DatasetProperties.IsVisible instead.")]
bool IsVisible { get; }
Property Value
Type | Description |
---|---|
bool |
Metadata
The searchable metadata of the dataset.
Declaration
IMetadataContainer Metadata { get; }
Property Value
Type | Description |
---|---|
IMetadataContainer |
Name
The name of the dataset.
Declaration
[Obsolete("Use DatasetProperties.Name instead.")]
string Name { get; }
Property Value
Type | Description |
---|---|
string |
Status
The status of the dataset.
Declaration
[Obsolete("Use DatasetProperties.StatusName instead.")]
string Status { get; }
Property Value
Type | Description |
---|---|
string |
SystemMetadata
The system metadata of the dataset.
Declaration
IReadOnlyMetadataContainer SystemMetadata { get; }
Property Value
Type | Description |
---|---|
IReadOnlyMetadataContainer |
SystemTags
The system tags of the dataset.
Declaration
[Obsolete("Use DatasetProperties.SystemTags instead.")]
IEnumerable<string> SystemTags { get; }
Property Value
Type | Description |
---|---|
IEnumerable<string> |
Tags
The user tags of the dataset.
Declaration
[Obsolete("Use DatasetProperties.Tags instead.")]
IEnumerable<string> Tags { get; }
Property Value
Type | Description |
---|---|
IEnumerable<string> |
Methods
AddExistingFileAsync(string, DatasetId, CancellationToken)
Adds a file from the specified dataset to the current dataset.
Declaration
Task<IFile> AddExistingFileAsync(string filePath, DatasetId sourceDatasetId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | The path to the file. |
DatasetId | sourceDatasetId | The id of the source dataset. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IFile> | A task whose result is the linked file. |
Remarks
Can only be called if the version of the asset is unfrozen.
Exceptions
Type | Condition |
---|---|
InvalidArgumentException | If this version of the asset is frozen, because it cannot be modified. |
AddExistingFileLiteAsync(string, DatasetId, CancellationToken)
Adds a file from the specified dataset to the current dataset.
Declaration
Task AddExistingFileLiteAsync(string filePath, DatasetId sourceDatasetId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | The path to the file. |
DatasetId | sourceDatasetId | The id of the source dataset. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
Remarks
Can only be called if the version of the asset is unfrozen.
Exceptions
Type | Condition |
---|---|
InvalidArgumentException | If this version of the asset is frozen, because it cannot be modified. |
GetDownloadUrlsAsync(CancellationToken)
Returns the download URLs for the files of the dataset.
Declaration
Task<IReadOnlyDictionary<string, Uri>> GetDownloadUrlsAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task<IReadOnlyDictionary<string, Uri>> | A task whose result is the download URLs for the dataset. |
GetFileAsync(string, CancellationToken)
Returns a file in the dataset.
Declaration
Task<IFile> GetFileAsync(string filePath, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | The path to the file. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task<IFile> | A task whose result is the file at |
GetFileUrl(string)
Returns the download URL of the file.
Declaration
Uri GetFileUrl(string filePath)
Parameters
Type | Name | Description |
---|---|---|
string | filePath |
Returns
Type | Description |
---|---|
Uri |
GetPropertiesAsync(CancellationToken)
Returns the properties of the dataset.
Declaration
Task<DatasetProperties> GetPropertiesAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task<DatasetProperties> | A task whose result is the DatasetProperties of the dataset. |
GetTransformationAsync(TransformationId, CancellationToken)
Get specified transformation on the dataset
Declaration
Task<ITransformation> GetTransformationAsync(TransformationId transformationId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
TransformationId | transformationId | The id of the transformation to get. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task<ITransformation> |
ListFilesAsync(Range, CancellationToken)
Returns the files in the dataset.
Declaration
IAsyncEnumerable<IFile> ListFilesAsync(Range range, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Range | range | The range of files to return. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IFile> | A task whose result is an async enumeration of file. |
ListTransformationsAsync(Range, CancellationToken)
Returns the transformations on the dataset.
Declaration
IAsyncEnumerable<ITransformation> ListTransformationsAsync(Range range, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Range | range | The range of results to return. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<ITransformation> | A task whose result is an async enumeration of ITransformation. |
RefreshAsync(CancellationToken)
Refreshes the dataset with the specified fields.
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. |
RemoveFileAsync(string, CancellationToken)
Removes a file from the dataset.
Declaration
Task RemoveFileAsync(string filePath, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | The path to the file. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
Remarks
Can only be called if the version of the asset is unfrozen.
Exceptions
Type | Condition |
---|---|
InvalidArgumentException | If this version of the asset is frozen, because it cannot be modified. |
StartTransformationAsync(ITransformationCreation, CancellationToken)
Start a transformation on the dataset.
Declaration
Task<ITransformation> StartTransformationAsync(ITransformationCreation transformationCreation, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ITransformationCreation | transformationCreation | The object containing the information necessary to start a transformation. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task<ITransformation> |
Remarks
Can only be called if the version of the asset is unfrozen.
Exceptions
Type | Condition |
---|---|
InvalidArgumentException | If this version of the asset is frozen, because it cannot be modified. |
StartTransformationLiteAsync(ITransformationCreation, CancellationToken)
Start a transformation on the dataset.
Declaration
Task<TransformationDescriptor> StartTransformationLiteAsync(ITransformationCreation transformationCreation, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ITransformationCreation | transformationCreation | The object containing the information necessary to start a transformation. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task<TransformationDescriptor> | A task whose result is a new TransformationDescriptor. |
Remarks
Can only be called if the version of the asset is unfrozen.
Exceptions
Type | Condition |
---|---|
InvalidArgumentException | If this version of the asset is frozen, because it cannot be modified. |
UpdateAsync(IDatasetUpdate, CancellationToken)
Updates the dataset.
Declaration
Task UpdateAsync(IDatasetUpdate datasetUpdate, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IDatasetUpdate | datasetUpdate | The object containing the necessary information to update the dataset. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task | A task with no result. |
Remarks
Can only be called if the version of the asset is unfrozen.
Exceptions
Type | Condition |
---|---|
InvalidArgumentException | If this version of the asset is frozen, because it cannot be modified. |
UploadFileAsync(IFileCreation, Stream, IProgress<HttpProgress>, CancellationToken)
Creates and uploads a new file to the dataset.
Declaration
Task<IFile> UploadFileAsync(IFileCreation fileCreation, Stream sourceStream, IProgress<HttpProgress> progress, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IFileCreation | fileCreation | The object containing the necessary information to create a new file. |
Stream | sourceStream | The stream from which to upload the new file. |
IProgress<HttpProgress> | progress | The progress of the upload. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task<IFile> | A task whose result is a newly created file. |
Remarks
Can only be called if the version of the asset is unfrozen.
Exceptions
Type | Condition |
---|---|
InvalidArgumentException | If this version of the asset is frozen, because it cannot be modified. |
UploadFileLiteAsync(IFileCreation, Stream, IProgress<HttpProgress>, CancellationToken)
Creates and uploads a new file to the dataset.
Declaration
Task<FileDescriptor> UploadFileLiteAsync(IFileCreation fileCreation, Stream sourceStream, IProgress<HttpProgress> progress, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IFileCreation | fileCreation | The object containing the necessary information to create a new file. |
Stream | sourceStream | The stream from which to upload the new file. |
IProgress<HttpProgress> | progress | The progress of the upload. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task<FileDescriptor> | A task whose result is a newly created file. |
Remarks
Can only be called if the version of the asset is unfrozen.
Exceptions
Type | Condition |
---|---|
InvalidArgumentException | If this version of the asset is frozen, because it cannot be modified. |
WithCacheConfigurationAsync(DatasetCacheConfiguration, CancellationToken)
Returns a dataset configured with the specified caching configurations.
Declaration
Task<IDataset> WithCacheConfigurationAsync(DatasetCacheConfiguration datasetConfiguration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DatasetCacheConfiguration | datasetConfiguration | The caching configuration for the dataset. |
CancellationToken | cancellationToken | A token that can be used to cancel the request. |
Returns
Type | Description |
---|---|
Task<IDataset> | A task whose result is an IDataset with cached values specified by the caching configurations. |