@nebius/js-sdk - v0.2.54
    Preparing search index...

    Interface ExtensionDescriptor

    Describes a generated protobuf extension and its optional conversion hooks.

    The registry uses the identity fields for lookup. Generated codecs use the hook functions when they process binary or JSON data.

    interface ExtensionDescriptor {
        decode?: (message: any, reader: BinaryReader, tag: number) => boolean;
        encode?: (message: any, writer: BinaryWriter) => void;
        enumType?: string;
        extendee: string;
        fieldNo: number;
        fromJSON?: (message: any, object: any) => void;
        fullName: string;
        kind:
            | "message"
            | "scalar"
            | "enum"
            | "repeated_scalar"
            | "repeated_enum"
            | "repeated_message";
        messageType?: string;
        name: string;
        scalarType?: number;
        toJSON?: (message: any, obj: any, use: "json" | "pb") => void;
    }
    Index
    decode?: (message: any, reader: BinaryReader, tag: number) => boolean

    Decodes this extension field.

    The decoder receives a tag that the caller already read. It verifies the field number, decodes the value, and assigns the value to the message. It returns true when it consumes the field.

    Type Declaration

      • (message: any, reader: BinaryReader, tag: number): boolean
      • Decodes this extension field.

        The decoder receives a tag that the caller already read. It verifies the field number, decodes the value, and assigns the value to the message. It returns true when it consumes the field.

        Parameters

        • message: any
        • reader: BinaryReader
        • tag: number

        Returns boolean

    encode?: (message: any, writer: BinaryWriter) => void

    Encodes this extension field.

    The encoder checks field presence and writes a value only when it is set.

    Type Declaration

      • (message: any, writer: BinaryWriter): void
      • Encodes this extension field.

        The encoder checks field presence and writes a value only when it is set.

        Parameters

        • message: any
        • writer: BinaryWriter

        Returns void

    enumType?: string

    Contains the fully qualified enum name for an enum value.

    extendee: string

    Contains the fully qualified message type that this field extends, such as google.protobuf.FieldOptions.

    fieldNo: number

    Contains the field number inside the extendee.

    fromJSON?: (message: any, object: any) => void

    Reads this extension from JSON.

    Generated fromJSON functions call this hook after they read the standard fields. The hook must not throw when the extension value is absent or invalid.

    Type Declaration

      • (message: any, object: any): void
      • Reads this extension from JSON.

        Generated fromJSON functions call this hook after they read the standard fields. The hook must not throw when the extension value is absent or invalid.

        Parameters

        • message: any
        • object: any

        Returns void

    fullName: string

    Contains the fully qualified protobuf name of the extension field.

    kind:
        | "message"
        | "scalar"
        | "enum"
        | "repeated_scalar"
        | "repeated_enum"
        | "repeated_message"

    Identifies the value category and whether the field is repeated.

    messageType?: string

    Contains the fully qualified message name for a message value.

    name: string

    Contains the simple protobuf or JSON field name.

    scalarType?: number

    Contains the numeric FieldDescriptorProto.Type code for a scalar value.

    toJSON?: (message: any, obj: any, use: "json" | "pb") => void

    Writes this extension to JSON.

    Generated toJSON functions call this hook after they write the standard fields. The hook adds the extension only when it is present.

    Type Declaration

      • (message: any, obj: any, use: "json" | "pb"): void
      • Writes this extension to JSON.

        Generated toJSON functions call this hook after they write the standard fields. The hook adds the extension only when it is present.

        Parameters

        • message: any
        • obj: any
        • use: "json" | "pb"

        Returns void