Represents a Sample.

Implements

Constructors

Properties

expected: string

Sample expected.

input: string

Sample input.

Methods

  • Decodes a Sample message from the specified reader or buffer.

    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • Optionallength: number

      Message length if known beforehand

    Returns Sample

    Sample

    If the payload is not a reader or valid buffer

    If required fields are missing

  • Decodes a Sample message from the specified reader or buffer, length delimited.

    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns Sample

    Sample

    If the payload is not a reader or valid buffer

    If required fields are missing

  • Creates a plain object from a Sample message. Also converts values to other types if specified.

    Parameters

    • message: Sample

      Sample

    • Optionaloptions: IConversionOptions

      Conversion options

    Returns { [k: string]: any }

    Plain object

  • Verifies a Sample message.

    Parameters

    • message: { [k: string]: any }

      Plain object to verify

    Returns null | string

    null if valid, otherwise the reason why it is not