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

    Interface OneofRules

    The OneofRules message type enables you to manage rules for oneof fields in your protobuf messages.

    interface OneofRules {
        "[customJson]"?: () => unknown;
        "[unknownFieldsSymbol]"?: Uint8Array<ArrayBufferLike>;
        $type: "buf.validate.OneofRules";
        required?: boolean;
        [key: symbol]: Uint8Array<ArrayBufferLike> | (() => unknown) | undefined;
    }

    Indexable

    • [key: symbol]: Uint8Array<ArrayBufferLike> | (() => unknown) | undefined

      The OneofRules message type enables you to manage rules for oneof fields in your protobuf messages.

      • Uint8Array<ArrayBufferLike>
      • () => unknown
          • (): unknown
          • The OneofRules message type enables you to manage rules for oneof fields in your protobuf messages.

            Returns unknown

      • undefined
    Index
    "[customJson]"?: () => unknown

    Returns a safe value for JSON logs.

    Type Declaration

      • (): unknown
      • Returns a safe value for JSON logs.

        Returns unknown

    "[unknownFieldsSymbol]"?: Uint8Array<ArrayBufferLike>

    Preserves protobuf fields that this SDK version does not recognize.

    $type: "buf.validate.OneofRules"

    Contains the fully qualified protobuf type name.

    required?: boolean

    If required is true, exactly one field of the oneof must be set. A validation error is returned if no fields in the oneof are set. Further rules should be placed on the fields themselves to ensure they are valid values, such as min_len or gt.

    message MyMessage {
    oneof value {
    // Either `a` or `b` must be set. If `a` is set, it must also be
    // non-empty; whereas if `b` is set, it can still be an empty string.
    option (buf.validate.oneof).required = true;
    string a = 1 [(buf.validate.field).string.min_len = 1];
    string b = 2;
    }
    }