docs.unity3d.com
    Show / Hide Table of Contents

    Interface IMetadataContainer

    This interface provides methods to read, update and delete metadata of an entity that implements the interface.

    Namespace: Unity.Cloud.Storage
    Syntax
    public interface IMetadataContainer

    Properties

    Metadata

    Gets the metadata of the entity.

    Declaration
    IReadOnlyDictionary<string, object> Metadata { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<String, Object>

    Methods

    AddOrUpdateMetadataAsync(String, String, CancellationToken)

    Asynchronously updates a metadata record with a given key in the entity if the key already exists. Otherwise, creates a metadata record with a given key.

    Declaration
    Task AddOrUpdateMetadataAsync(string key, string value, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    String key

    The key of the metadata record to add or update.

    String value

    The value to add or update the metadata record with.

    CancellationToken cancellationToken

    An optional cancellation token.

    Returns
    Type Description
    Task

    Task without a result.

    Exceptions
    Type Condition
    HttpRequestException

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

    UnauthorizedException
    ConnectionException
    ForbiddenException

    DeleteMetadataAsync(String, CancellationToken)

    Asynchronously deletes a metadata record with a given key from the entity.

    Declaration
    Task DeleteMetadataAsync(string key, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    String key

    The key of the metadata record to delete.

    CancellationToken cancellationToken

    An optional cancellation token.

    Returns
    Type Description
    Task

    Task without a result.

    Exceptions
    Type Condition
    HttpRequestException

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

    UnauthorizedException
    ConnectionException
    ForbiddenException

    Events

    MetadataChanged

    Calls the methods in its invocation list when metadata of the entity is changed.

    Declaration
    event Action MetadataChanged
    Event Type
    Type Description
    Action
    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