@audiotool/nexus - v0.0.12
    Preparing search index...

    Class SampleGenerated

    Sample is a resource representing a single Sample.

    from message audiotool.sample.v1.Sample

    Hierarchy

    Index

    Constructors

    Properties

    bpm: number = 0

    The beats per minute of the Sample.

    from field: double bpm = 8;

    clearance: SampleClearance = SampleClearance.UNSPECIFIED

    The clearance of the Sample.

    from field: audiotool.sample.v1.SampleClearance clearance = 13;

    createTime?: Timestamp

    Output only. Timestamp when this Sample was created.

    from field: google.protobuf.Timestamp create_time = 11;

    description: string = ""

    The description of the Sample.

    from field: string description = 3;

    displayName: string = ""

    The display name of the Sample.

    from field: string display_name = 2;

    favoritedByUser: boolean = false

    Whether the authed user liked the sample.

    This is only exposed if the user is authenticated. The user can like a Preset via Favor API.

    from field: bool favorited_by_user = 5;

    flacUrl: string = ""

    The underlying URL of the track to play (flac format).

    from field: string flac_url = 19;

    mp3Url: string = ""

    The underlying URL of the track to play (mp3 format).

    from field: string mp3_url = 16;

    name: string = ""

    The Sample name.

    from field: string name = 1;

    numFavorites: number = 0

    The number of favorites of the Sample.

    from field: int32 num_favorites = 6;

    numUsages: number = 0

    The number of usages of the Sample.

    from field: int32 num_usages = 7;

    ownerName: string = ""

    The Owner of the Sample in the form of users/{user}.

    from field: string owner_name = 4;

    playDuration?: Duration

    The duration of the Sample.

    from field: google.protobuf.Duration play_duration = 10;

    previewMp3Url: string = ""

    The underlying URL of the track to play (mp3 format).

    from field: string preview_mp3_url = 18;

    sampleType: SampleType = SampleType.UNSPECIFIED

    The type of the Sample.

    from field: audiotool.sample.v1.SampleType sample_type = 9;

    tags: string[] = []

    The tags of the Sample.

    from field: repeated string tags = 15;

    updateTime?: Timestamp

    Output only. Timestamp when this Sample was last updated.

    The underlying audio can't be changed. Only some metadata (of this message) can be changed.

    from field: google.protobuf.Timestamp update_time = 12;

    usage: SampleUsage = SampleUsage.UNSPECIFIED

    The usage of the Sample.

    from field: audiotool.sample.v1.SampleUsage usage = 14;

    wavUrl: string = ""

    The underlying URL of the track to play (wav format).

    from field: string wav_url = 17;

    fields: FieldList = ...
    runtime: ProtoRuntime = proto3
    typeName: "audiotool.sample.v1.Sample"

    Methods

    • Create a deep copy.

      Returns sample.Sample

    • Compare with a message of the same type. Note that this function disregards extensions and unknown fields.

      Parameters

      Returns boolean

    • Parse from binary data, merging fields.

      Repeated fields are appended. Map entries are added, overwriting existing keys.

      If a message field is already present, it will be merged with the new data.

      Parameters

      Returns this

    • Parse a message from a JSON value.

      Parameters

      • jsonValue: JsonValue
      • Optionaloptions: Partial<JsonReadOptions>

      Returns this

    • Parse a message from a JSON string.

      Parameters

      • jsonString: string
      • Optionaloptions: Partial<JsonReadOptions>

      Returns this

    • Retrieve the MessageType of this message - a singleton that represents the protobuf message declaration and provides metadata for reflection- based operations.

      Returns MessageType<sample.Sample>

    • Serialize the message to binary data.

      Parameters

      • Optionaloptions: Partial<BinaryWriteOptions>

      Returns Uint8Array

    • Serialize the message to a JSON value, a JavaScript value that can be passed to JSON.stringify().

      Parameters

      • Optionaloptions: Partial<JsonWriteOptions>

      Returns JsonValue

    • Override for serialization behavior. This will be invoked when calling JSON.stringify on this message (i.e. JSON.stringify(msg)).

      Note that this will not serialize google.protobuf.Any with a packed message because the protobuf JSON format specifies that it needs to be unpacked, and this is only possible with a type registry to look up the message type. As a result, attempting to serialize a message with this type will throw an Error.

      This method is protected because you should not need to invoke it directly -- instead use JSON.stringify or toJsonString for stringified JSON. Alternatively, if actual JSON is desired, you should use toJson.

      Returns JsonValue

    • Serialize the message to a JSON string.

      Parameters

      • Optionaloptions: Partial<JsonWriteStringOptions>

      Returns string