docs.unity3d.com
    Show / Hide Table of Contents

    Interface IDataset

    This interface holds information about a dataset.

    Inherited Members
    IMetadataContainer.Metadata
    IMetadataContainer.MetadataChanged
    IMetadataContainer.DeleteMetadataAsync(String, CancellationToken)
    IMetadataContainer.AddOrUpdateMetadataAsync(String, String, CancellationToken)
    IRefreshableEntity.RefreshPropertiesAsync(CancellationToken)
    Namespace: Unity.Cloud.Storage
    Syntax
    public interface IDataset : INotifyPropertyChanged, IMetadataContainer, IRefreshableEntity

    Properties

    DefaultSceneId

    Gets the ID of the default scene of the dataset.

    Declaration
    SceneId DefaultSceneId { get; }
    Property Value
    Type Description
    SceneId

    Id

    Gets the ID of the dataset.

    Declaration
    DatasetId Id { get; }
    Property Value
    Type Description
    DatasetId

    Name

    Gets the name of the dataset.

    Declaration
    string Name { get; }
    Property Value
    Type Description
    String

    Workspace

    Gets the IWorkspace that the dataset belongs to.

    Declaration
    IWorkspace Workspace { get; }
    Property Value
    Type Description
    IWorkspace

    Methods

    CreateVersionAsync(IDatasetVersionCreation, CancellationToken)

    Creates and adds an IDatasetVersion to the dataset.

    Declaration
    Task<IDatasetVersion> CreateVersionAsync(IDatasetVersionCreation datasetVersionCreate, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    IDatasetVersionCreation datasetVersionCreate

    The IDatasetVersionCreation object that contains the necessary information to create the new dataset version.

    CancellationToken cancellationToken

    An optional cancellation token.

    Returns
    Type Description
    Task<IDatasetVersion>

    A task that results in the created IDatasetVersion when completed.

    Exceptions
    Type Condition
    HttpRequestException

    Thrown when the request fails to complete. See the returned StatusCode for more details.

    UnauthorizedException
    ConnectionException
    ForbiddenException

    DeleteVersionAsync(DatasetVersionId, CancellationToken)

    Deletes an IDatasetVersion with a specified ID from the dataset.

    Declaration
    Task DeleteVersionAsync(DatasetVersionId datasetVersionId, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    DatasetVersionId datasetVersionId

    The ID of the dataset version to delete.

    CancellationToken cancellationToken

    An optional cancellation token.

    Returns
    Type Description
    Task

    A task with no result.

    Exceptions
    Type Condition
    HttpRequestException

    Thrown when the request fails to complete. See the returned StatusCode for more details.

    UnauthorizedException
    ConnectionException
    ForbiddenException

    GetLatestVersionAsync(CancellationToken)

    Asynchronously requests the latest commited IDatasetVersion if any.

    Declaration
    Task<IDatasetVersion> GetLatestVersionAsync(CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    An optional cancellation token.

    Returns
    Type Description
    Task<IDatasetVersion>

    Returns a Task that results in an IDatasetVersion when completed.

    Exceptions
    Type Condition
    HttpRequestException

    Thrown when the request fails to complete. See the returned StatusCode for more details.

    UnauthorizedException
    ConnectionException
    ForbiddenException
    NotFoundException

    Thrown when the dataset does not have any committed version

    GetVersionAsync(Int32, CancellationToken)

    Asynchronously requests an IDatasetVersion with a specified version number. See and .

    Declaration
    Task<IDatasetVersion> GetVersionAsync(int versionNumber, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Int32 versionNumber

    A number of the dataset version.

    CancellationToken cancellationToken

    An optional cancellation token.

    Returns
    Type Description
    Task<IDatasetVersion>

    Returns a Task that results in an IDatasetVersion when completed.

    Exceptions
    Type Condition
    HttpRequestException

    Thrown when the request fails to complete. See the returned StatusCode for more details.

    UnauthorizedException
    ConnectionException
    ForbiddenException
    NotFoundException

    Thrown when the requested version isn't found.

    GetVersionAsync(DatasetVersionId, CancellationToken)

    Asynchronously requests an IDatasetVersion with a specified ID.

    Declaration
    Task<IDatasetVersion> GetVersionAsync(DatasetVersionId datasetVersionId, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    DatasetVersionId datasetVersionId

    A dataset version ID.

    CancellationToken cancellationToken

    An optional cancellation token.

    Returns
    Type Description
    Task<IDatasetVersion>

    Returns a Task that results in an IDatasetVersion when completed.

    Exceptions
    Type Condition
    HttpRequestException

    Thrown when the request fails to complete. See the returned StatusCode for more details.

    UnauthorizedException
    ConnectionException
    ForbiddenException

    GetVersionsCountAsync(CancellationToken)

    Asynchronously requests the amount of datasets version in the dataset.

    Declaration
    Task<int> GetVersionsCountAsync(CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    An optional cancellation token.

    Returns
    Type Description
    Task<Int32>

    Returns a Task that results in an Int32 when completed.

    Exceptions
    Type Condition
    HttpRequestException

    Thrown when the request fails to complete. See the returned StatusCode for more details.

    UnauthorizedException
    ConnectionException
    ForbiddenException

    ListVersionsAsync(Range, CancellationToken)

    Requests an asynchronous list of IDatasetVersion from the dataset.

    Declaration
    IAsyncEnumerable<IDatasetVersion> ListVersionsAsync(Range range, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Range range

    A range of dataset versions to request. For example, Range.All will return all versions of the dataset, while Range(0,10) will return the first 10, if exist

    CancellationToken cancellationToken

    An optional cancellation token.

    Returns
    Type Description
    IAsyncEnumerable<IDatasetVersion>

    Returns an asynchronous collection of IDatasetVersion.

    Remarks

    If the requested range cannot be served due to the existing amount of items, the results will be clamped. For example, if the dataset contains 5 versions then Range(0,10) will return only 5 existing items and Range(10, 100) will return an empty collection.

    Exceptions
    Type Condition
    HttpRequestException

    Thrown when the request fails to complete. See the returned StatusCode for more details.

    UnauthorizedException
    ConnectionException
    ForbiddenException

    UpdateVersionAsync(DatasetVersionId, IDatasetVersionUpdate, CancellationToken)

    Updates an IDatasetVersion in the dataset.

    Declaration
    Task<IDatasetVersion> UpdateVersionAsync(DatasetVersionId datasetVersionId, IDatasetVersionUpdate datasetVersionUpdate, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    DatasetVersionId datasetVersionId

    The ID of the dataset version to update.

    IDatasetVersionUpdate datasetVersionUpdate

    The IDatasetVersionUpdate object that contains the necessary information to update the dataset version.

    CancellationToken cancellationToken

    An optional cancellation token.

    Returns
    Type Description
    Task<IDatasetVersion>

    A task that results in the updated IDataset when completed.

    Exceptions
    Type Condition
    HttpRequestException

    Thrown when the request fails to complete. See the returned StatusCode for more details.

    UnauthorizedException
    ConnectionException
    ForbiddenException
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023