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

    Interface RepeatedRules

    RepeatedRules describe the rules applied to repeated values.

    interface RepeatedRules {
        "[customJson]"?: () => unknown;
        "[unknownFieldsSymbol]"?: Uint8Array<ArrayBufferLike>;
        $type: "buf.validate.RepeatedRules";
        items?: FieldRules;
        maxItems?: Long;
        minItems?: Long;
        unique?: boolean;
        [key: symbol]: Uint8Array<ArrayBufferLike> | (() => unknown) | undefined;
    }

    Indexable

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

      RepeatedRules describe the rules applied to repeated values.

      • Uint8Array<ArrayBufferLike>
      • () => unknown
          • (): unknown
          • RepeatedRules describe the rules applied to repeated values.

            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.RepeatedRules"

    Contains the fully qualified protobuf type name.

    items?: FieldRules

    items details the rules to be applied to each item in the field. Even for repeated message fields, validation is executed against each item unless ignore is specified.

    message MyRepeated {
    // The items in the field `value` must follow the specified rules.
    repeated string value = 1 [(buf.validate.field).repeated.items = {
    string: {
    min_len: 3
    max_len: 10
    }
    }];
    }

    Note that the required rule does not apply. Repeated items cannot be unset.

    maxItems?: Long

    max_items denotes that this field must not exceed a certain number of items as the upper limit. If the field contains more items than specified, an error message will be generated, requiring the field to maintain no more than the specified number of items.

    message MyRepeated {
    // value must contain no more than 3 item(s)
    repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
    }
    minItems?: Long

    min_items requires that this field must contain at least the specified minimum number of items.

    Note that min_items = 1 is equivalent to setting a field as required.

    message MyRepeated {
    // value must contain at least 2 items
    repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
    }
    unique?: boolean

    unique indicates that all elements in this field must be unique. This rule is strictly applicable to scalar and enum types, with message types not being supported.

    message MyRepeated {
    // repeated value must contain unique items
    repeated string value = 1 [(buf.validate.field).repeated.unique = true];
    }