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

    Interface Rule

    Rule represents a validation rule written in the Common Expression Language (CEL) syntax. Each Rule includes a unique identifier, an optional error message, and the CEL expression to evaluate. For more information, see our documentation.

    message Foo {
    option (buf.validate.message).cel = {
    id: "foo.bar"
    message: "bar must be greater than 0"
    expression: "this.bar > 0"
    };
    int32 bar = 1;
    }
    interface Rule {
        "[customJson]"?: () => unknown;
        "[unknownFieldsSymbol]"?: Uint8Array<ArrayBufferLike>;
        $type: "buf.validate.Rule";
        expression?: string;
        id?: string;
        message?: string;
        [key: symbol]: Uint8Array<ArrayBufferLike> | (() => unknown) | undefined;
    }

    Indexable

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

      Rule represents a validation rule written in the Common Expression Language (CEL) syntax. Each Rule includes a unique identifier, an optional error message, and the CEL expression to evaluate. For more information, see our documentation.

      message Foo {
      option (buf.validate.message).cel = {
      id: "foo.bar"
      message: "bar must be greater than 0"
      expression: "this.bar > 0"
      };
      int32 bar = 1;
      }
      • Uint8Array<ArrayBufferLike>
      • () => unknown
          • (): unknown
          • Rule represents a validation rule written in the Common Expression Language (CEL) syntax. Each Rule includes a unique identifier, an optional error message, and the CEL expression to evaluate. For more information, see our documentation.

            message Foo {
            option (buf.validate.message).cel = {
            id: "foo.bar"
            message: "bar must be greater than 0"
            expression: "this.bar > 0"
            };
            int32 bar = 1;
            }

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

    Contains the fully qualified protobuf type name.

    expression?: string

    expression is the actual CEL expression that will be evaluated for validation. This string must resolve to either a boolean or a string value. If the expression evaluates to false or a non-empty string, the validation is considered failed, and the message is rejected.

    id?: string

    id is a string that serves as a machine-readable name for this Rule. It should be unique within its scope, which could be either a message or a field.

    message?: string

    message is an optional field that provides a human-readable error message for this Rule when the CEL expression evaluates to false. If a non-empty message is provided, any strings resulting from the CEL expression evaluation are ignored.