You've already forked npm-viz-sdk
2813 lines
91 KiB
TypeScript
2813 lines
91 KiB
TypeScript
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
|
|
// @generated from file validate.proto (package validate, syntax proto2)
|
|
/* eslint-disable */
|
|
// @ts-nocheck
|
|
|
|
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
import { Message, proto2 } from "@bufbuild/protobuf";
|
|
import { Duration } from "./google/protobuf/duration_pb.js";
|
|
import { Timestamp } from "./google/protobuf/timestamp_pb.js";
|
|
import { FieldOptions, MessageOptions, OneofOptions } from "./google/protobuf/descriptor_pb.js";
|
|
|
|
/**
|
|
* WellKnownRegex contain some well-known patterns.
|
|
*
|
|
* @generated from enum validate.KnownRegex
|
|
*/
|
|
export enum KnownRegex {
|
|
/**
|
|
* @generated from enum value: UNKNOWN = 0;
|
|
*/
|
|
UNKNOWN = 0,
|
|
|
|
/**
|
|
* HTTP header name as defined by RFC 7230.
|
|
*
|
|
* @generated from enum value: HTTP_HEADER_NAME = 1;
|
|
*/
|
|
HTTP_HEADER_NAME = 1,
|
|
|
|
/**
|
|
* HTTP header value as defined by RFC 7230.
|
|
*
|
|
* @generated from enum value: HTTP_HEADER_VALUE = 2;
|
|
*/
|
|
HTTP_HEADER_VALUE = 2,
|
|
}
|
|
// Retrieve enum metadata with: proto2.getEnumType(KnownRegex)
|
|
proto2.util.setEnumType(KnownRegex, "validate.KnownRegex", [
|
|
{ no: 0, name: "UNKNOWN" },
|
|
{ no: 1, name: "HTTP_HEADER_NAME" },
|
|
{ no: 2, name: "HTTP_HEADER_VALUE" },
|
|
]);
|
|
|
|
/**
|
|
* FieldRules encapsulates the rules for each type of field. Depending on the
|
|
* field, the correct set should be used to ensure proper validations.
|
|
*
|
|
* @generated from message validate.FieldRules
|
|
*/
|
|
export class FieldRules extends Message<FieldRules> {
|
|
/**
|
|
* @generated from field: optional validate.MessageRules message = 17;
|
|
*/
|
|
message?: MessageRules;
|
|
|
|
/**
|
|
* @generated from oneof validate.FieldRules.type
|
|
*/
|
|
type: {
|
|
/**
|
|
* Scalar Field Types
|
|
*
|
|
* @generated from field: validate.FloatRules float = 1;
|
|
*/
|
|
value: FloatRules;
|
|
case: "float";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.DoubleRules double = 2;
|
|
*/
|
|
value: DoubleRules;
|
|
case: "double";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.Int32Rules int32 = 3;
|
|
*/
|
|
value: Int32Rules;
|
|
case: "int32";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.Int64Rules int64 = 4;
|
|
*/
|
|
value: Int64Rules;
|
|
case: "int64";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.UInt32Rules uint32 = 5;
|
|
*/
|
|
value: UInt32Rules;
|
|
case: "uint32";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.UInt64Rules uint64 = 6;
|
|
*/
|
|
value: UInt64Rules;
|
|
case: "uint64";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.SInt32Rules sint32 = 7;
|
|
*/
|
|
value: SInt32Rules;
|
|
case: "sint32";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.SInt64Rules sint64 = 8;
|
|
*/
|
|
value: SInt64Rules;
|
|
case: "sint64";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.Fixed32Rules fixed32 = 9;
|
|
*/
|
|
value: Fixed32Rules;
|
|
case: "fixed32";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.Fixed64Rules fixed64 = 10;
|
|
*/
|
|
value: Fixed64Rules;
|
|
case: "fixed64";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.SFixed32Rules sfixed32 = 11;
|
|
*/
|
|
value: SFixed32Rules;
|
|
case: "sfixed32";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.SFixed64Rules sfixed64 = 12;
|
|
*/
|
|
value: SFixed64Rules;
|
|
case: "sfixed64";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.BoolRules bool = 13;
|
|
*/
|
|
value: BoolRules;
|
|
case: "bool";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.StringRules string = 14;
|
|
*/
|
|
value: StringRules;
|
|
case: "string";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.BytesRules bytes = 15;
|
|
*/
|
|
value: BytesRules;
|
|
case: "bytes";
|
|
} | {
|
|
/**
|
|
* Complex Field Types
|
|
*
|
|
* @generated from field: validate.EnumRules enum = 16;
|
|
*/
|
|
value: EnumRules;
|
|
case: "enum";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.RepeatedRules repeated = 18;
|
|
*/
|
|
value: RepeatedRules;
|
|
case: "repeated";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.MapRules map = 19;
|
|
*/
|
|
value: MapRules;
|
|
case: "map";
|
|
} | {
|
|
/**
|
|
* Well-Known Field Types
|
|
*
|
|
* @generated from field: validate.AnyRules any = 20;
|
|
*/
|
|
value: AnyRules;
|
|
case: "any";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.DurationRules duration = 21;
|
|
*/
|
|
value: DurationRules;
|
|
case: "duration";
|
|
} | {
|
|
/**
|
|
* @generated from field: validate.TimestampRules timestamp = 22;
|
|
*/
|
|
value: TimestampRules;
|
|
case: "timestamp";
|
|
} | { case: undefined; value?: undefined } = { case: undefined };
|
|
|
|
constructor(data?: PartialMessage<FieldRules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.FieldRules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 17, name: "message", kind: "message", T: MessageRules, opt: true },
|
|
{ no: 1, name: "float", kind: "message", T: FloatRules, oneof: "type" },
|
|
{ no: 2, name: "double", kind: "message", T: DoubleRules, oneof: "type" },
|
|
{ no: 3, name: "int32", kind: "message", T: Int32Rules, oneof: "type" },
|
|
{ no: 4, name: "int64", kind: "message", T: Int64Rules, oneof: "type" },
|
|
{ no: 5, name: "uint32", kind: "message", T: UInt32Rules, oneof: "type" },
|
|
{ no: 6, name: "uint64", kind: "message", T: UInt64Rules, oneof: "type" },
|
|
{ no: 7, name: "sint32", kind: "message", T: SInt32Rules, oneof: "type" },
|
|
{ no: 8, name: "sint64", kind: "message", T: SInt64Rules, oneof: "type" },
|
|
{ no: 9, name: "fixed32", kind: "message", T: Fixed32Rules, oneof: "type" },
|
|
{ no: 10, name: "fixed64", kind: "message", T: Fixed64Rules, oneof: "type" },
|
|
{ no: 11, name: "sfixed32", kind: "message", T: SFixed32Rules, oneof: "type" },
|
|
{ no: 12, name: "sfixed64", kind: "message", T: SFixed64Rules, oneof: "type" },
|
|
{ no: 13, name: "bool", kind: "message", T: BoolRules, oneof: "type" },
|
|
{ no: 14, name: "string", kind: "message", T: StringRules, oneof: "type" },
|
|
{ no: 15, name: "bytes", kind: "message", T: BytesRules, oneof: "type" },
|
|
{ no: 16, name: "enum", kind: "message", T: EnumRules, oneof: "type" },
|
|
{ no: 18, name: "repeated", kind: "message", T: RepeatedRules, oneof: "type" },
|
|
{ no: 19, name: "map", kind: "message", T: MapRules, oneof: "type" },
|
|
{ no: 20, name: "any", kind: "message", T: AnyRules, oneof: "type" },
|
|
{ no: 21, name: "duration", kind: "message", T: DurationRules, oneof: "type" },
|
|
{ no: 22, name: "timestamp", kind: "message", T: TimestampRules, oneof: "type" },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FieldRules {
|
|
return new FieldRules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): FieldRules {
|
|
return new FieldRules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): FieldRules {
|
|
return new FieldRules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: FieldRules | PlainMessage<FieldRules> | undefined, b: FieldRules | PlainMessage<FieldRules> | undefined): boolean {
|
|
return proto2.util.equals(FieldRules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* FloatRules describes the constraints applied to `float` values
|
|
*
|
|
* @generated from message validate.FloatRules
|
|
*/
|
|
export class FloatRules extends Message<FloatRules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional float const = 1;
|
|
*/
|
|
const?: number;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional float lt = 2;
|
|
*/
|
|
lt?: number;
|
|
|
|
/**
|
|
* Lte specifies that this field must be less than or equal to the
|
|
* specified value, inclusive
|
|
*
|
|
* @generated from field: optional float lte = 3;
|
|
*/
|
|
lte?: number;
|
|
|
|
/**
|
|
* Gt specifies that this field must be greater than the specified value,
|
|
* exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
|
* range is reversed.
|
|
*
|
|
* @generated from field: optional float gt = 4;
|
|
*/
|
|
gt?: number;
|
|
|
|
/**
|
|
* Gte specifies that this field must be greater than or equal to the
|
|
* specified value, inclusive. If the value of Gte is larger than a
|
|
* specified Lt or Lte, the range is reversed.
|
|
*
|
|
* @generated from field: optional float gte = 5;
|
|
*/
|
|
gte?: number;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated float in = 6;
|
|
*/
|
|
in: number[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated float not_in = 7;
|
|
*/
|
|
notIn: number[] = [];
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 8;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 9;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<FloatRules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.FloatRules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 2 /* ScalarType.FLOAT */, opt: true },
|
|
{ no: 2, name: "lt", kind: "scalar", T: 2 /* ScalarType.FLOAT */, opt: true },
|
|
{ no: 3, name: "lte", kind: "scalar", T: 2 /* ScalarType.FLOAT */, opt: true },
|
|
{ no: 4, name: "gt", kind: "scalar", T: 2 /* ScalarType.FLOAT */, opt: true },
|
|
{ no: 5, name: "gte", kind: "scalar", T: 2 /* ScalarType.FLOAT */, opt: true },
|
|
{ no: 6, name: "in", kind: "scalar", T: 2 /* ScalarType.FLOAT */, repeated: true },
|
|
{ no: 7, name: "not_in", kind: "scalar", T: 2 /* ScalarType.FLOAT */, repeated: true },
|
|
{ no: 8, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 9, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FloatRules {
|
|
return new FloatRules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): FloatRules {
|
|
return new FloatRules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): FloatRules {
|
|
return new FloatRules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: FloatRules | PlainMessage<FloatRules> | undefined, b: FloatRules | PlainMessage<FloatRules> | undefined): boolean {
|
|
return proto2.util.equals(FloatRules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* DoubleRules describes the constraints applied to `double` values
|
|
*
|
|
* @generated from message validate.DoubleRules
|
|
*/
|
|
export class DoubleRules extends Message<DoubleRules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional double const = 1;
|
|
*/
|
|
const?: number;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional double lt = 2;
|
|
*/
|
|
lt?: number;
|
|
|
|
/**
|
|
* Lte specifies that this field must be less than or equal to the
|
|
* specified value, inclusive
|
|
*
|
|
* @generated from field: optional double lte = 3;
|
|
*/
|
|
lte?: number;
|
|
|
|
/**
|
|
* Gt specifies that this field must be greater than the specified value,
|
|
* exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
|
* range is reversed.
|
|
*
|
|
* @generated from field: optional double gt = 4;
|
|
*/
|
|
gt?: number;
|
|
|
|
/**
|
|
* Gte specifies that this field must be greater than or equal to the
|
|
* specified value, inclusive. If the value of Gte is larger than a
|
|
* specified Lt or Lte, the range is reversed.
|
|
*
|
|
* @generated from field: optional double gte = 5;
|
|
*/
|
|
gte?: number;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated double in = 6;
|
|
*/
|
|
in: number[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated double not_in = 7;
|
|
*/
|
|
notIn: number[] = [];
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 8;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 9;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<DoubleRules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.DoubleRules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
{ no: 2, name: "lt", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
{ no: 3, name: "lte", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
{ no: 4, name: "gt", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
{ no: 5, name: "gte", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
{ no: 6, name: "in", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, repeated: true },
|
|
{ no: 7, name: "not_in", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, repeated: true },
|
|
{ no: 8, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 9, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DoubleRules {
|
|
return new DoubleRules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DoubleRules {
|
|
return new DoubleRules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DoubleRules {
|
|
return new DoubleRules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: DoubleRules | PlainMessage<DoubleRules> | undefined, b: DoubleRules | PlainMessage<DoubleRules> | undefined): boolean {
|
|
return proto2.util.equals(DoubleRules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Int32Rules describes the constraints applied to `int32` values
|
|
*
|
|
* @generated from message validate.Int32Rules
|
|
*/
|
|
export class Int32Rules extends Message<Int32Rules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional int32 const = 1;
|
|
*/
|
|
const?: number;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional int32 lt = 2;
|
|
*/
|
|
lt?: number;
|
|
|
|
/**
|
|
* Lte specifies that this field must be less than or equal to the
|
|
* specified value, inclusive
|
|
*
|
|
* @generated from field: optional int32 lte = 3;
|
|
*/
|
|
lte?: number;
|
|
|
|
/**
|
|
* Gt specifies that this field must be greater than the specified value,
|
|
* exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
|
* range is reversed.
|
|
*
|
|
* @generated from field: optional int32 gt = 4;
|
|
*/
|
|
gt?: number;
|
|
|
|
/**
|
|
* Gte specifies that this field must be greater than or equal to the
|
|
* specified value, inclusive. If the value of Gte is larger than a
|
|
* specified Lt or Lte, the range is reversed.
|
|
*
|
|
* @generated from field: optional int32 gte = 5;
|
|
*/
|
|
gte?: number;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated int32 in = 6;
|
|
*/
|
|
in: number[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated int32 not_in = 7;
|
|
*/
|
|
notIn: number[] = [];
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 8;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 9;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<Int32Rules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.Int32Rules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
{ no: 2, name: "lt", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
{ no: 3, name: "lte", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
{ no: 4, name: "gt", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
{ no: 5, name: "gte", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
{ no: 6, name: "in", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true },
|
|
{ no: 7, name: "not_in", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true },
|
|
{ no: 8, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 9, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Int32Rules {
|
|
return new Int32Rules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Int32Rules {
|
|
return new Int32Rules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Int32Rules {
|
|
return new Int32Rules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: Int32Rules | PlainMessage<Int32Rules> | undefined, b: Int32Rules | PlainMessage<Int32Rules> | undefined): boolean {
|
|
return proto2.util.equals(Int32Rules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Int64Rules describes the constraints applied to `int64` values
|
|
*
|
|
* @generated from message validate.Int64Rules
|
|
*/
|
|
export class Int64Rules extends Message<Int64Rules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional int64 const = 1;
|
|
*/
|
|
const?: bigint;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional int64 lt = 2;
|
|
*/
|
|
lt?: bigint;
|
|
|
|
/**
|
|
* Lte specifies that this field must be less than or equal to the
|
|
* specified value, inclusive
|
|
*
|
|
* @generated from field: optional int64 lte = 3;
|
|
*/
|
|
lte?: bigint;
|
|
|
|
/**
|
|
* Gt specifies that this field must be greater than the specified value,
|
|
* exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
|
* range is reversed.
|
|
*
|
|
* @generated from field: optional int64 gt = 4;
|
|
*/
|
|
gt?: bigint;
|
|
|
|
/**
|
|
* Gte specifies that this field must be greater than or equal to the
|
|
* specified value, inclusive. If the value of Gte is larger than a
|
|
* specified Lt or Lte, the range is reversed.
|
|
*
|
|
* @generated from field: optional int64 gte = 5;
|
|
*/
|
|
gte?: bigint;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated int64 in = 6;
|
|
*/
|
|
in: bigint[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated int64 not_in = 7;
|
|
*/
|
|
notIn: bigint[] = [];
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 8;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 9;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<Int64Rules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.Int64Rules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true },
|
|
{ no: 2, name: "lt", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true },
|
|
{ no: 3, name: "lte", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true },
|
|
{ no: 4, name: "gt", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true },
|
|
{ no: 5, name: "gte", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true },
|
|
{ no: 6, name: "in", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true },
|
|
{ no: 7, name: "not_in", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true },
|
|
{ no: 8, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 9, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Int64Rules {
|
|
return new Int64Rules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Int64Rules {
|
|
return new Int64Rules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Int64Rules {
|
|
return new Int64Rules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: Int64Rules | PlainMessage<Int64Rules> | undefined, b: Int64Rules | PlainMessage<Int64Rules> | undefined): boolean {
|
|
return proto2.util.equals(Int64Rules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* UInt32Rules describes the constraints applied to `uint32` values
|
|
*
|
|
* @generated from message validate.UInt32Rules
|
|
*/
|
|
export class UInt32Rules extends Message<UInt32Rules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional uint32 const = 1;
|
|
*/
|
|
const?: number;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional uint32 lt = 2;
|
|
*/
|
|
lt?: number;
|
|
|
|
/**
|
|
* Lte specifies that this field must be less than or equal to the
|
|
* specified value, inclusive
|
|
*
|
|
* @generated from field: optional uint32 lte = 3;
|
|
*/
|
|
lte?: number;
|
|
|
|
/**
|
|
* Gt specifies that this field must be greater than the specified value,
|
|
* exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
|
* range is reversed.
|
|
*
|
|
* @generated from field: optional uint32 gt = 4;
|
|
*/
|
|
gt?: number;
|
|
|
|
/**
|
|
* Gte specifies that this field must be greater than or equal to the
|
|
* specified value, inclusive. If the value of Gte is larger than a
|
|
* specified Lt or Lte, the range is reversed.
|
|
*
|
|
* @generated from field: optional uint32 gte = 5;
|
|
*/
|
|
gte?: number;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated uint32 in = 6;
|
|
*/
|
|
in: number[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated uint32 not_in = 7;
|
|
*/
|
|
notIn: number[] = [];
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 8;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 9;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<UInt32Rules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.UInt32Rules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
|
|
{ no: 2, name: "lt", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
|
|
{ no: 3, name: "lte", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
|
|
{ no: 4, name: "gt", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
|
|
{ no: 5, name: "gte", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
|
|
{ no: 6, name: "in", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true },
|
|
{ no: 7, name: "not_in", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true },
|
|
{ no: 8, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 9, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UInt32Rules {
|
|
return new UInt32Rules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UInt32Rules {
|
|
return new UInt32Rules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UInt32Rules {
|
|
return new UInt32Rules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: UInt32Rules | PlainMessage<UInt32Rules> | undefined, b: UInt32Rules | PlainMessage<UInt32Rules> | undefined): boolean {
|
|
return proto2.util.equals(UInt32Rules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* UInt64Rules describes the constraints applied to `uint64` values
|
|
*
|
|
* @generated from message validate.UInt64Rules
|
|
*/
|
|
export class UInt64Rules extends Message<UInt64Rules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional uint64 const = 1;
|
|
*/
|
|
const?: bigint;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional uint64 lt = 2;
|
|
*/
|
|
lt?: bigint;
|
|
|
|
/**
|
|
* Lte specifies that this field must be less than or equal to the
|
|
* specified value, inclusive
|
|
*
|
|
* @generated from field: optional uint64 lte = 3;
|
|
*/
|
|
lte?: bigint;
|
|
|
|
/**
|
|
* Gt specifies that this field must be greater than the specified value,
|
|
* exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
|
* range is reversed.
|
|
*
|
|
* @generated from field: optional uint64 gt = 4;
|
|
*/
|
|
gt?: bigint;
|
|
|
|
/**
|
|
* Gte specifies that this field must be greater than or equal to the
|
|
* specified value, inclusive. If the value of Gte is larger than a
|
|
* specified Lt or Lte, the range is reversed.
|
|
*
|
|
* @generated from field: optional uint64 gte = 5;
|
|
*/
|
|
gte?: bigint;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated uint64 in = 6;
|
|
*/
|
|
in: bigint[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated uint64 not_in = 7;
|
|
*/
|
|
notIn: bigint[] = [];
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 8;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 9;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<UInt64Rules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.UInt64Rules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 2, name: "lt", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 3, name: "lte", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 4, name: "gt", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 5, name: "gte", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 6, name: "in", kind: "scalar", T: 4 /* ScalarType.UINT64 */, repeated: true },
|
|
{ no: 7, name: "not_in", kind: "scalar", T: 4 /* ScalarType.UINT64 */, repeated: true },
|
|
{ no: 8, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 9, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UInt64Rules {
|
|
return new UInt64Rules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UInt64Rules {
|
|
return new UInt64Rules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UInt64Rules {
|
|
return new UInt64Rules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: UInt64Rules | PlainMessage<UInt64Rules> | undefined, b: UInt64Rules | PlainMessage<UInt64Rules> | undefined): boolean {
|
|
return proto2.util.equals(UInt64Rules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* SInt32Rules describes the constraints applied to `sint32` values
|
|
*
|
|
* @generated from message validate.SInt32Rules
|
|
*/
|
|
export class SInt32Rules extends Message<SInt32Rules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional sint32 const = 1;
|
|
*/
|
|
const?: number;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional sint32 lt = 2;
|
|
*/
|
|
lt?: number;
|
|
|
|
/**
|
|
* Lte specifies that this field must be less than or equal to the
|
|
* specified value, inclusive
|
|
*
|
|
* @generated from field: optional sint32 lte = 3;
|
|
*/
|
|
lte?: number;
|
|
|
|
/**
|
|
* Gt specifies that this field must be greater than the specified value,
|
|
* exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
|
* range is reversed.
|
|
*
|
|
* @generated from field: optional sint32 gt = 4;
|
|
*/
|
|
gt?: number;
|
|
|
|
/**
|
|
* Gte specifies that this field must be greater than or equal to the
|
|
* specified value, inclusive. If the value of Gte is larger than a
|
|
* specified Lt or Lte, the range is reversed.
|
|
*
|
|
* @generated from field: optional sint32 gte = 5;
|
|
*/
|
|
gte?: number;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated sint32 in = 6;
|
|
*/
|
|
in: number[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated sint32 not_in = 7;
|
|
*/
|
|
notIn: number[] = [];
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 8;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 9;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<SInt32Rules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.SInt32Rules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 17 /* ScalarType.SINT32 */, opt: true },
|
|
{ no: 2, name: "lt", kind: "scalar", T: 17 /* ScalarType.SINT32 */, opt: true },
|
|
{ no: 3, name: "lte", kind: "scalar", T: 17 /* ScalarType.SINT32 */, opt: true },
|
|
{ no: 4, name: "gt", kind: "scalar", T: 17 /* ScalarType.SINT32 */, opt: true },
|
|
{ no: 5, name: "gte", kind: "scalar", T: 17 /* ScalarType.SINT32 */, opt: true },
|
|
{ no: 6, name: "in", kind: "scalar", T: 17 /* ScalarType.SINT32 */, repeated: true },
|
|
{ no: 7, name: "not_in", kind: "scalar", T: 17 /* ScalarType.SINT32 */, repeated: true },
|
|
{ no: 8, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 9, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SInt32Rules {
|
|
return new SInt32Rules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SInt32Rules {
|
|
return new SInt32Rules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SInt32Rules {
|
|
return new SInt32Rules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: SInt32Rules | PlainMessage<SInt32Rules> | undefined, b: SInt32Rules | PlainMessage<SInt32Rules> | undefined): boolean {
|
|
return proto2.util.equals(SInt32Rules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* SInt64Rules describes the constraints applied to `sint64` values
|
|
*
|
|
* @generated from message validate.SInt64Rules
|
|
*/
|
|
export class SInt64Rules extends Message<SInt64Rules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional sint64 const = 1;
|
|
*/
|
|
const?: bigint;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional sint64 lt = 2;
|
|
*/
|
|
lt?: bigint;
|
|
|
|
/**
|
|
* Lte specifies that this field must be less than or equal to the
|
|
* specified value, inclusive
|
|
*
|
|
* @generated from field: optional sint64 lte = 3;
|
|
*/
|
|
lte?: bigint;
|
|
|
|
/**
|
|
* Gt specifies that this field must be greater than the specified value,
|
|
* exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
|
* range is reversed.
|
|
*
|
|
* @generated from field: optional sint64 gt = 4;
|
|
*/
|
|
gt?: bigint;
|
|
|
|
/**
|
|
* Gte specifies that this field must be greater than or equal to the
|
|
* specified value, inclusive. If the value of Gte is larger than a
|
|
* specified Lt or Lte, the range is reversed.
|
|
*
|
|
* @generated from field: optional sint64 gte = 5;
|
|
*/
|
|
gte?: bigint;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated sint64 in = 6;
|
|
*/
|
|
in: bigint[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated sint64 not_in = 7;
|
|
*/
|
|
notIn: bigint[] = [];
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 8;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 9;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<SInt64Rules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.SInt64Rules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 18 /* ScalarType.SINT64 */, opt: true },
|
|
{ no: 2, name: "lt", kind: "scalar", T: 18 /* ScalarType.SINT64 */, opt: true },
|
|
{ no: 3, name: "lte", kind: "scalar", T: 18 /* ScalarType.SINT64 */, opt: true },
|
|
{ no: 4, name: "gt", kind: "scalar", T: 18 /* ScalarType.SINT64 */, opt: true },
|
|
{ no: 5, name: "gte", kind: "scalar", T: 18 /* ScalarType.SINT64 */, opt: true },
|
|
{ no: 6, name: "in", kind: "scalar", T: 18 /* ScalarType.SINT64 */, repeated: true },
|
|
{ no: 7, name: "not_in", kind: "scalar", T: 18 /* ScalarType.SINT64 */, repeated: true },
|
|
{ no: 8, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 9, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SInt64Rules {
|
|
return new SInt64Rules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SInt64Rules {
|
|
return new SInt64Rules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SInt64Rules {
|
|
return new SInt64Rules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: SInt64Rules | PlainMessage<SInt64Rules> | undefined, b: SInt64Rules | PlainMessage<SInt64Rules> | undefined): boolean {
|
|
return proto2.util.equals(SInt64Rules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Fixed32Rules describes the constraints applied to `fixed32` values
|
|
*
|
|
* @generated from message validate.Fixed32Rules
|
|
*/
|
|
export class Fixed32Rules extends Message<Fixed32Rules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional fixed32 const = 1;
|
|
*/
|
|
const?: number;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional fixed32 lt = 2;
|
|
*/
|
|
lt?: number;
|
|
|
|
/**
|
|
* Lte specifies that this field must be less than or equal to the
|
|
* specified value, inclusive
|
|
*
|
|
* @generated from field: optional fixed32 lte = 3;
|
|
*/
|
|
lte?: number;
|
|
|
|
/**
|
|
* Gt specifies that this field must be greater than the specified value,
|
|
* exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
|
* range is reversed.
|
|
*
|
|
* @generated from field: optional fixed32 gt = 4;
|
|
*/
|
|
gt?: number;
|
|
|
|
/**
|
|
* Gte specifies that this field must be greater than or equal to the
|
|
* specified value, inclusive. If the value of Gte is larger than a
|
|
* specified Lt or Lte, the range is reversed.
|
|
*
|
|
* @generated from field: optional fixed32 gte = 5;
|
|
*/
|
|
gte?: number;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated fixed32 in = 6;
|
|
*/
|
|
in: number[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated fixed32 not_in = 7;
|
|
*/
|
|
notIn: number[] = [];
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 8;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 9;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<Fixed32Rules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.Fixed32Rules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, opt: true },
|
|
{ no: 2, name: "lt", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, opt: true },
|
|
{ no: 3, name: "lte", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, opt: true },
|
|
{ no: 4, name: "gt", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, opt: true },
|
|
{ no: 5, name: "gte", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, opt: true },
|
|
{ no: 6, name: "in", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, repeated: true },
|
|
{ no: 7, name: "not_in", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, repeated: true },
|
|
{ no: 8, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 9, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Fixed32Rules {
|
|
return new Fixed32Rules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Fixed32Rules {
|
|
return new Fixed32Rules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Fixed32Rules {
|
|
return new Fixed32Rules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: Fixed32Rules | PlainMessage<Fixed32Rules> | undefined, b: Fixed32Rules | PlainMessage<Fixed32Rules> | undefined): boolean {
|
|
return proto2.util.equals(Fixed32Rules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Fixed64Rules describes the constraints applied to `fixed64` values
|
|
*
|
|
* @generated from message validate.Fixed64Rules
|
|
*/
|
|
export class Fixed64Rules extends Message<Fixed64Rules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional fixed64 const = 1;
|
|
*/
|
|
const?: bigint;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional fixed64 lt = 2;
|
|
*/
|
|
lt?: bigint;
|
|
|
|
/**
|
|
* Lte specifies that this field must be less than or equal to the
|
|
* specified value, inclusive
|
|
*
|
|
* @generated from field: optional fixed64 lte = 3;
|
|
*/
|
|
lte?: bigint;
|
|
|
|
/**
|
|
* Gt specifies that this field must be greater than the specified value,
|
|
* exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
|
* range is reversed.
|
|
*
|
|
* @generated from field: optional fixed64 gt = 4;
|
|
*/
|
|
gt?: bigint;
|
|
|
|
/**
|
|
* Gte specifies that this field must be greater than or equal to the
|
|
* specified value, inclusive. If the value of Gte is larger than a
|
|
* specified Lt or Lte, the range is reversed.
|
|
*
|
|
* @generated from field: optional fixed64 gte = 5;
|
|
*/
|
|
gte?: bigint;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated fixed64 in = 6;
|
|
*/
|
|
in: bigint[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated fixed64 not_in = 7;
|
|
*/
|
|
notIn: bigint[] = [];
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 8;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 9;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<Fixed64Rules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.Fixed64Rules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, opt: true },
|
|
{ no: 2, name: "lt", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, opt: true },
|
|
{ no: 3, name: "lte", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, opt: true },
|
|
{ no: 4, name: "gt", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, opt: true },
|
|
{ no: 5, name: "gte", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, opt: true },
|
|
{ no: 6, name: "in", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, repeated: true },
|
|
{ no: 7, name: "not_in", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, repeated: true },
|
|
{ no: 8, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 9, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Fixed64Rules {
|
|
return new Fixed64Rules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Fixed64Rules {
|
|
return new Fixed64Rules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Fixed64Rules {
|
|
return new Fixed64Rules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: Fixed64Rules | PlainMessage<Fixed64Rules> | undefined, b: Fixed64Rules | PlainMessage<Fixed64Rules> | undefined): boolean {
|
|
return proto2.util.equals(Fixed64Rules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* SFixed32Rules describes the constraints applied to `sfixed32` values
|
|
*
|
|
* @generated from message validate.SFixed32Rules
|
|
*/
|
|
export class SFixed32Rules extends Message<SFixed32Rules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional sfixed32 const = 1;
|
|
*/
|
|
const?: number;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional sfixed32 lt = 2;
|
|
*/
|
|
lt?: number;
|
|
|
|
/**
|
|
* Lte specifies that this field must be less than or equal to the
|
|
* specified value, inclusive
|
|
*
|
|
* @generated from field: optional sfixed32 lte = 3;
|
|
*/
|
|
lte?: number;
|
|
|
|
/**
|
|
* Gt specifies that this field must be greater than the specified value,
|
|
* exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
|
* range is reversed.
|
|
*
|
|
* @generated from field: optional sfixed32 gt = 4;
|
|
*/
|
|
gt?: number;
|
|
|
|
/**
|
|
* Gte specifies that this field must be greater than or equal to the
|
|
* specified value, inclusive. If the value of Gte is larger than a
|
|
* specified Lt or Lte, the range is reversed.
|
|
*
|
|
* @generated from field: optional sfixed32 gte = 5;
|
|
*/
|
|
gte?: number;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated sfixed32 in = 6;
|
|
*/
|
|
in: number[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated sfixed32 not_in = 7;
|
|
*/
|
|
notIn: number[] = [];
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 8;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 9;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<SFixed32Rules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.SFixed32Rules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, opt: true },
|
|
{ no: 2, name: "lt", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, opt: true },
|
|
{ no: 3, name: "lte", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, opt: true },
|
|
{ no: 4, name: "gt", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, opt: true },
|
|
{ no: 5, name: "gte", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, opt: true },
|
|
{ no: 6, name: "in", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, repeated: true },
|
|
{ no: 7, name: "not_in", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, repeated: true },
|
|
{ no: 8, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 9, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SFixed32Rules {
|
|
return new SFixed32Rules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SFixed32Rules {
|
|
return new SFixed32Rules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SFixed32Rules {
|
|
return new SFixed32Rules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: SFixed32Rules | PlainMessage<SFixed32Rules> | undefined, b: SFixed32Rules | PlainMessage<SFixed32Rules> | undefined): boolean {
|
|
return proto2.util.equals(SFixed32Rules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* SFixed64Rules describes the constraints applied to `sfixed64` values
|
|
*
|
|
* @generated from message validate.SFixed64Rules
|
|
*/
|
|
export class SFixed64Rules extends Message<SFixed64Rules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional sfixed64 const = 1;
|
|
*/
|
|
const?: bigint;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional sfixed64 lt = 2;
|
|
*/
|
|
lt?: bigint;
|
|
|
|
/**
|
|
* Lte specifies that this field must be less than or equal to the
|
|
* specified value, inclusive
|
|
*
|
|
* @generated from field: optional sfixed64 lte = 3;
|
|
*/
|
|
lte?: bigint;
|
|
|
|
/**
|
|
* Gt specifies that this field must be greater than the specified value,
|
|
* exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
|
* range is reversed.
|
|
*
|
|
* @generated from field: optional sfixed64 gt = 4;
|
|
*/
|
|
gt?: bigint;
|
|
|
|
/**
|
|
* Gte specifies that this field must be greater than or equal to the
|
|
* specified value, inclusive. If the value of Gte is larger than a
|
|
* specified Lt or Lte, the range is reversed.
|
|
*
|
|
* @generated from field: optional sfixed64 gte = 5;
|
|
*/
|
|
gte?: bigint;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated sfixed64 in = 6;
|
|
*/
|
|
in: bigint[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated sfixed64 not_in = 7;
|
|
*/
|
|
notIn: bigint[] = [];
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 8;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 9;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<SFixed64Rules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.SFixed64Rules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, opt: true },
|
|
{ no: 2, name: "lt", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, opt: true },
|
|
{ no: 3, name: "lte", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, opt: true },
|
|
{ no: 4, name: "gt", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, opt: true },
|
|
{ no: 5, name: "gte", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, opt: true },
|
|
{ no: 6, name: "in", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, repeated: true },
|
|
{ no: 7, name: "not_in", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, repeated: true },
|
|
{ no: 8, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 9, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SFixed64Rules {
|
|
return new SFixed64Rules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SFixed64Rules {
|
|
return new SFixed64Rules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SFixed64Rules {
|
|
return new SFixed64Rules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: SFixed64Rules | PlainMessage<SFixed64Rules> | undefined, b: SFixed64Rules | PlainMessage<SFixed64Rules> | undefined): boolean {
|
|
return proto2.util.equals(SFixed64Rules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* BoolRules describes the constraints applied to `bool` values
|
|
*
|
|
* @generated from message validate.BoolRules
|
|
*/
|
|
export class BoolRules extends Message<BoolRules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional bool const = 1;
|
|
*/
|
|
const?: boolean;
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 2;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
constructor(data?: PartialMessage<BoolRules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.BoolRules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 2, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BoolRules {
|
|
return new BoolRules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BoolRules {
|
|
return new BoolRules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BoolRules {
|
|
return new BoolRules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: BoolRules | PlainMessage<BoolRules> | undefined, b: BoolRules | PlainMessage<BoolRules> | undefined): boolean {
|
|
return proto2.util.equals(BoolRules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* StringRules describe the constraints applied to `string` values
|
|
*
|
|
* @generated from message validate.StringRules
|
|
*/
|
|
export class StringRules extends Message<StringRules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional string const = 1;
|
|
*/
|
|
const?: string;
|
|
|
|
/**
|
|
* Len specifies that this field must be the specified number of
|
|
* characters (Unicode code points). Note that the number of
|
|
* characters may differ from the number of bytes in the string.
|
|
*
|
|
* @generated from field: optional uint64 len = 19;
|
|
*/
|
|
len?: bigint;
|
|
|
|
/**
|
|
* MinLen specifies that this field must be the specified number of
|
|
* characters (Unicode code points) at a minimum. Note that the number of
|
|
* characters may differ from the number of bytes in the string.
|
|
*
|
|
* @generated from field: optional uint64 min_len = 2;
|
|
*/
|
|
minLen?: bigint;
|
|
|
|
/**
|
|
* MaxLen specifies that this field must be the specified number of
|
|
* characters (Unicode code points) at a maximum. Note that the number of
|
|
* characters may differ from the number of bytes in the string.
|
|
*
|
|
* @generated from field: optional uint64 max_len = 3;
|
|
*/
|
|
maxLen?: bigint;
|
|
|
|
/**
|
|
* LenBytes specifies that this field must be the specified number of bytes
|
|
* at a minimum
|
|
*
|
|
* @generated from field: optional uint64 len_bytes = 20;
|
|
*/
|
|
lenBytes?: bigint;
|
|
|
|
/**
|
|
* MinBytes specifies that this field must be the specified number of bytes
|
|
* at a minimum
|
|
*
|
|
* @generated from field: optional uint64 min_bytes = 4;
|
|
*/
|
|
minBytes?: bigint;
|
|
|
|
/**
|
|
* MaxBytes specifies that this field must be the specified number of bytes
|
|
* at a maximum
|
|
*
|
|
* @generated from field: optional uint64 max_bytes = 5;
|
|
*/
|
|
maxBytes?: bigint;
|
|
|
|
/**
|
|
* Pattern specifes that this field must match against the specified
|
|
* regular expression (RE2 syntax). The included expression should elide
|
|
* any delimiters.
|
|
*
|
|
* @generated from field: optional string pattern = 6;
|
|
*/
|
|
pattern?: string;
|
|
|
|
/**
|
|
* Prefix specifies that this field must have the specified substring at
|
|
* the beginning of the string.
|
|
*
|
|
* @generated from field: optional string prefix = 7;
|
|
*/
|
|
prefix?: string;
|
|
|
|
/**
|
|
* Suffix specifies that this field must have the specified substring at
|
|
* the end of the string.
|
|
*
|
|
* @generated from field: optional string suffix = 8;
|
|
*/
|
|
suffix?: string;
|
|
|
|
/**
|
|
* Contains specifies that this field must have the specified substring
|
|
* anywhere in the string.
|
|
*
|
|
* @generated from field: optional string contains = 9;
|
|
*/
|
|
contains?: string;
|
|
|
|
/**
|
|
* NotContains specifies that this field cannot have the specified substring
|
|
* anywhere in the string.
|
|
*
|
|
* @generated from field: optional string not_contains = 23;
|
|
*/
|
|
notContains?: string;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated string in = 10;
|
|
*/
|
|
in: string[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated string not_in = 11;
|
|
*/
|
|
notIn: string[] = [];
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 29;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
/**
|
|
* WellKnown rules provide advanced constraints against common string
|
|
* patterns
|
|
*
|
|
* @generated from oneof validate.StringRules.well_known
|
|
*/
|
|
wellKnown: {
|
|
/**
|
|
* Email specifies that the field must be a valid email address as
|
|
* defined by RFC 5322
|
|
*
|
|
* @generated from field: bool email = 12;
|
|
*/
|
|
value: boolean;
|
|
case: "email";
|
|
} | {
|
|
/**
|
|
* Hostname specifies that the field must be a valid hostname as
|
|
* defined by RFC 1034. This constraint does not support
|
|
* internationalized domain names (IDNs).
|
|
*
|
|
* @generated from field: bool hostname = 13;
|
|
*/
|
|
value: boolean;
|
|
case: "hostname";
|
|
} | {
|
|
/**
|
|
* Ip specifies that the field must be a valid IP (v4 or v6) address.
|
|
* Valid IPv6 addresses should not include surrounding square brackets.
|
|
*
|
|
* @generated from field: bool ip = 14;
|
|
*/
|
|
value: boolean;
|
|
case: "ip";
|
|
} | {
|
|
/**
|
|
* Ipv4 specifies that the field must be a valid IPv4 address.
|
|
*
|
|
* @generated from field: bool ipv4 = 15;
|
|
*/
|
|
value: boolean;
|
|
case: "ipv4";
|
|
} | {
|
|
/**
|
|
* Ipv6 specifies that the field must be a valid IPv6 address. Valid
|
|
* IPv6 addresses should not include surrounding square brackets.
|
|
*
|
|
* @generated from field: bool ipv6 = 16;
|
|
*/
|
|
value: boolean;
|
|
case: "ipv6";
|
|
} | {
|
|
/**
|
|
* Uri specifies that the field must be a valid, absolute URI as defined
|
|
* by RFC 3986
|
|
*
|
|
* @generated from field: bool uri = 17;
|
|
*/
|
|
value: boolean;
|
|
case: "uri";
|
|
} | {
|
|
/**
|
|
* UriRef specifies that the field must be a valid URI as defined by RFC
|
|
* 3986 and may be relative or absolute.
|
|
*
|
|
* @generated from field: bool uri_ref = 18;
|
|
*/
|
|
value: boolean;
|
|
case: "uriRef";
|
|
} | {
|
|
/**
|
|
* Address specifies that the field must be either a valid hostname as
|
|
* defined by RFC 1034 (which does not support internationalized domain
|
|
* names or IDNs), or it can be a valid IP (v4 or v6).
|
|
*
|
|
* @generated from field: bool address = 21;
|
|
*/
|
|
value: boolean;
|
|
case: "address";
|
|
} | {
|
|
/**
|
|
* Uuid specifies that the field must be a valid UUID as defined by
|
|
* RFC 4122
|
|
*
|
|
* @generated from field: bool uuid = 22;
|
|
*/
|
|
value: boolean;
|
|
case: "uuid";
|
|
} | {
|
|
/**
|
|
* WellKnownRegex specifies a common well known pattern defined as a regex.
|
|
*
|
|
* @generated from field: validate.KnownRegex well_known_regex = 24;
|
|
*/
|
|
value: KnownRegex;
|
|
case: "wellKnownRegex";
|
|
} | {
|
|
/**
|
|
* dateIso8601 specifes that the field must be either a valid date as
|
|
* defined by ISO 8601
|
|
*
|
|
* @generated from field: bool dateIso8601 = 26;
|
|
*/
|
|
value: boolean;
|
|
case: "dateIso8601";
|
|
} | {
|
|
/**
|
|
* languageIso639 specifes that the field must be either a valid language name as
|
|
* defined by ISO 639-1
|
|
*
|
|
* @generated from field: bool languageIso6391 = 27;
|
|
*/
|
|
value: boolean;
|
|
case: "languageIso6391";
|
|
} | {
|
|
/**
|
|
* tzData specifes that the field must be location name
|
|
* corresponding to a file in the IANA Time Zone database, such as "America/New_York"
|
|
*
|
|
* @generated from field: bool tzData = 28;
|
|
*/
|
|
value: boolean;
|
|
case: "tzData";
|
|
} | { case: undefined; value?: undefined } = { case: undefined };
|
|
|
|
/**
|
|
* This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable
|
|
* strict header validation.
|
|
* By default, this is true, and HTTP header validations are RFC-compliant.
|
|
* Setting to false will enable a looser validations that only disallows
|
|
* \r\n\0 characters, which can be used to bypass header matching rules.
|
|
*
|
|
* @generated from field: optional bool strict = 25 [default = true];
|
|
*/
|
|
strict?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 30;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<StringRules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.StringRules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
{ no: 19, name: "len", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 2, name: "min_len", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 3, name: "max_len", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 20, name: "len_bytes", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 4, name: "min_bytes", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 5, name: "max_bytes", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 6, name: "pattern", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
{ no: 7, name: "prefix", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
{ no: 8, name: "suffix", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
{ no: 9, name: "contains", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
{ no: 23, name: "not_contains", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
{ no: 10, name: "in", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
{ no: 11, name: "not_in", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
{ no: 29, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 12, name: "email", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 13, name: "hostname", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 14, name: "ip", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 15, name: "ipv4", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 16, name: "ipv6", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 17, name: "uri", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 18, name: "uri_ref", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 21, name: "address", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 22, name: "uuid", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 24, name: "well_known_regex", kind: "enum", T: proto2.getEnumType(KnownRegex), oneof: "well_known" },
|
|
{ no: 26, name: "dateIso8601", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 27, name: "languageIso6391", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 28, name: "tzData", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 25, name: "strict", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: true },
|
|
{ no: 30, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StringRules {
|
|
return new StringRules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StringRules {
|
|
return new StringRules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StringRules {
|
|
return new StringRules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: StringRules | PlainMessage<StringRules> | undefined, b: StringRules | PlainMessage<StringRules> | undefined): boolean {
|
|
return proto2.util.equals(StringRules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* BytesRules describe the constraints applied to `bytes` values
|
|
*
|
|
* @generated from message validate.BytesRules
|
|
*/
|
|
export class BytesRules extends Message<BytesRules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional bytes const = 1;
|
|
*/
|
|
const?: Uint8Array;
|
|
|
|
/**
|
|
* Len specifies that this field must be the specified number of bytes
|
|
*
|
|
* @generated from field: optional uint64 len = 13;
|
|
*/
|
|
len?: bigint;
|
|
|
|
/**
|
|
* MinLen specifies that this field must be the specified number of bytes
|
|
* at a minimum
|
|
*
|
|
* @generated from field: optional uint64 min_len = 2;
|
|
*/
|
|
minLen?: bigint;
|
|
|
|
/**
|
|
* MaxLen specifies that this field must be the specified number of bytes
|
|
* at a maximum
|
|
*
|
|
* @generated from field: optional uint64 max_len = 3;
|
|
*/
|
|
maxLen?: bigint;
|
|
|
|
/**
|
|
* Pattern specifes that this field must match against the specified
|
|
* regular expression (RE2 syntax). The included expression should elide
|
|
* any delimiters.
|
|
*
|
|
* @generated from field: optional string pattern = 4;
|
|
*/
|
|
pattern?: string;
|
|
|
|
/**
|
|
* Prefix specifies that this field must have the specified bytes at the
|
|
* beginning of the string.
|
|
*
|
|
* @generated from field: optional bytes prefix = 5;
|
|
*/
|
|
prefix?: Uint8Array;
|
|
|
|
/**
|
|
* Suffix specifies that this field must have the specified bytes at the
|
|
* end of the string.
|
|
*
|
|
* @generated from field: optional bytes suffix = 6;
|
|
*/
|
|
suffix?: Uint8Array;
|
|
|
|
/**
|
|
* Contains specifies that this field must have the specified bytes
|
|
* anywhere in the string.
|
|
*
|
|
* @generated from field: optional bytes contains = 7;
|
|
*/
|
|
contains?: Uint8Array;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated bytes in = 8;
|
|
*/
|
|
in: Uint8Array[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated bytes not_in = 9;
|
|
*/
|
|
notIn: Uint8Array[] = [];
|
|
|
|
/**
|
|
* WellKnown rules provide advanced constraints against common byte
|
|
* patterns
|
|
*
|
|
* @generated from oneof validate.BytesRules.well_known
|
|
*/
|
|
wellKnown: {
|
|
/**
|
|
* Ip specifies that the field must be a valid IP (v4 or v6) address in
|
|
* byte format
|
|
*
|
|
* @generated from field: bool ip = 10;
|
|
*/
|
|
value: boolean;
|
|
case: "ip";
|
|
} | {
|
|
/**
|
|
* Ipv4 specifies that the field must be a valid IPv4 address in byte
|
|
* format
|
|
*
|
|
* @generated from field: bool ipv4 = 11;
|
|
*/
|
|
value: boolean;
|
|
case: "ipv4";
|
|
} | {
|
|
/**
|
|
* Ipv6 specifies that the field must be a valid IPv6 address in byte
|
|
* format
|
|
*
|
|
* @generated from field: bool ipv6 = 12;
|
|
*/
|
|
value: boolean;
|
|
case: "ipv6";
|
|
} | { case: undefined; value?: undefined } = { case: undefined };
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 14;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<BytesRules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.BytesRules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true },
|
|
{ no: 13, name: "len", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 2, name: "min_len", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 3, name: "max_len", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 4, name: "pattern", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
{ no: 5, name: "prefix", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true },
|
|
{ no: 6, name: "suffix", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true },
|
|
{ no: 7, name: "contains", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true },
|
|
{ no: 8, name: "in", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true },
|
|
{ no: 9, name: "not_in", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true },
|
|
{ no: 10, name: "ip", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 11, name: "ipv4", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 12, name: "ipv6", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "well_known" },
|
|
{ no: 14, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BytesRules {
|
|
return new BytesRules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BytesRules {
|
|
return new BytesRules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BytesRules {
|
|
return new BytesRules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: BytesRules | PlainMessage<BytesRules> | undefined, b: BytesRules | PlainMessage<BytesRules> | undefined): boolean {
|
|
return proto2.util.equals(BytesRules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* EnumRules describe the constraints applied to enum values
|
|
*
|
|
* @generated from message validate.EnumRules
|
|
*/
|
|
export class EnumRules extends Message<EnumRules> {
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional int32 const = 1;
|
|
*/
|
|
const?: number;
|
|
|
|
/**
|
|
* DefinedOnly specifies that this field must be only one of the defined
|
|
* values for this enum, failing on any undefined value.
|
|
*
|
|
* @generated from field: optional bool defined_only = 2;
|
|
*/
|
|
definedOnly?: boolean;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated int32 in = 3;
|
|
*/
|
|
in: number[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated int32 not_in = 4;
|
|
*/
|
|
notIn: number[] = [];
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 5;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 6;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<EnumRules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.EnumRules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "const", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
{ no: 2, name: "defined_only", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 3, name: "in", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true },
|
|
{ no: 4, name: "not_in", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true },
|
|
{ no: 5, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 6, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnumRules {
|
|
return new EnumRules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnumRules {
|
|
return new EnumRules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnumRules {
|
|
return new EnumRules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: EnumRules | PlainMessage<EnumRules> | undefined, b: EnumRules | PlainMessage<EnumRules> | undefined): boolean {
|
|
return proto2.util.equals(EnumRules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* MessageRules describe the constraints applied to embedded message values.
|
|
* For message-type fields, validation is performed recursively.
|
|
*
|
|
* @generated from message validate.MessageRules
|
|
*/
|
|
export class MessageRules extends Message<MessageRules> {
|
|
/**
|
|
* Skip specifies that the validation rules of this field should not be
|
|
* evaluated
|
|
*
|
|
* @generated from field: optional bool skip = 1;
|
|
*/
|
|
skip?: boolean;
|
|
|
|
/**
|
|
* Required specifies that this field must be set
|
|
*
|
|
* @generated from field: optional bool required = 2;
|
|
*/
|
|
required?: boolean;
|
|
|
|
/**
|
|
* unauthorized specifies that this field cannot be written.
|
|
*
|
|
* @generated from field: optional bool unauthorized = 3;
|
|
*/
|
|
unauthorized?: boolean;
|
|
|
|
constructor(data?: PartialMessage<MessageRules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.MessageRules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "skip", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 2, name: "required", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 3, name: "unauthorized", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MessageRules {
|
|
return new MessageRules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MessageRules {
|
|
return new MessageRules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MessageRules {
|
|
return new MessageRules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: MessageRules | PlainMessage<MessageRules> | undefined, b: MessageRules | PlainMessage<MessageRules> | undefined): boolean {
|
|
return proto2.util.equals(MessageRules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* RepeatedRules describe the constraints applied to `repeated` values
|
|
*
|
|
* @generated from message validate.RepeatedRules
|
|
*/
|
|
export class RepeatedRules extends Message<RepeatedRules> {
|
|
/**
|
|
* MinItems specifies that this field must have the specified number of
|
|
* items at a minimum
|
|
*
|
|
* @generated from field: optional uint64 min_items = 1;
|
|
*/
|
|
minItems?: bigint;
|
|
|
|
/**
|
|
* MaxItems specifies that this field must have the specified number of
|
|
* items at a maximum
|
|
*
|
|
* @generated from field: optional uint64 max_items = 2;
|
|
*/
|
|
maxItems?: bigint;
|
|
|
|
/**
|
|
* Unique specifies that all elements in this field must be unique. This
|
|
* contraint is only applicable to scalar and enum types (messages are not
|
|
* supported).
|
|
*
|
|
* @generated from field: optional bool unique = 3;
|
|
*/
|
|
unique?: boolean;
|
|
|
|
/**
|
|
* Items specifies the contraints to be applied to each item in the field.
|
|
* Repeated message fields will still execute validation against each item
|
|
* unless skip is specified here.
|
|
*
|
|
* @generated from field: optional validate.FieldRules items = 4;
|
|
*/
|
|
items?: FieldRules;
|
|
|
|
/**
|
|
* uniqueBaseLV specifies the business rule contraints to the IsBaseLogisticVariant nested field of the LogisticVariant item in the list.
|
|
* An item can only have one base LV.
|
|
* Contraint is only applicable to the LogisticVariant field.
|
|
*
|
|
* @generated from field: optional bool uniqueBaseLV = 5;
|
|
*/
|
|
uniqueBaseLV?: boolean;
|
|
|
|
/**
|
|
* knownRefLV specifies the business rule contraints to the IsBaseLogisticVariant nested field of the LogisticVariant item in the list.
|
|
* A VL can only refer (RefLV) to a base LV known on this article.
|
|
* Contraint is only applicable to the LogisticVariant field.
|
|
*
|
|
* @generated from field: optional bool knownRefLV = 6;
|
|
*/
|
|
knownRefLV?: boolean;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 7;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<RepeatedRules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.RepeatedRules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "min_items", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 2, name: "max_items", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 3, name: "unique", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 4, name: "items", kind: "message", T: FieldRules, opt: true },
|
|
{ no: 5, name: "uniqueBaseLV", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 6, name: "knownRefLV", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 7, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RepeatedRules {
|
|
return new RepeatedRules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RepeatedRules {
|
|
return new RepeatedRules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RepeatedRules {
|
|
return new RepeatedRules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: RepeatedRules | PlainMessage<RepeatedRules> | undefined, b: RepeatedRules | PlainMessage<RepeatedRules> | undefined): boolean {
|
|
return proto2.util.equals(RepeatedRules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* MapRules describe the constraints applied to `map` values
|
|
*
|
|
* @generated from message validate.MapRules
|
|
*/
|
|
export class MapRules extends Message<MapRules> {
|
|
/**
|
|
* MinPairs specifies that this field must have the specified number of
|
|
* KVs at a minimum
|
|
*
|
|
* @generated from field: optional uint64 min_pairs = 1;
|
|
*/
|
|
minPairs?: bigint;
|
|
|
|
/**
|
|
* MaxPairs specifies that this field must have the specified number of
|
|
* KVs at a maximum
|
|
*
|
|
* @generated from field: optional uint64 max_pairs = 2;
|
|
*/
|
|
maxPairs?: bigint;
|
|
|
|
/**
|
|
* NoSparse specifies values in this field cannot be unset. This only
|
|
* applies to map's with message value types.
|
|
*
|
|
* @generated from field: optional bool no_sparse = 3;
|
|
*/
|
|
noSparse?: boolean;
|
|
|
|
/**
|
|
* Keys specifies the constraints to be applied to each key in the field.
|
|
*
|
|
* @generated from field: optional validate.FieldRules keys = 4;
|
|
*/
|
|
keys?: FieldRules;
|
|
|
|
/**
|
|
* Values specifies the constraints to be applied to the value of each key
|
|
* in the field. Message values will still have their validations evaluated
|
|
* unless skip is specified here.
|
|
*
|
|
* @generated from field: optional validate.FieldRules values = 5;
|
|
*/
|
|
values?: FieldRules;
|
|
|
|
/**
|
|
* IgnoreEmpty specifies that the validation rules of this field should be
|
|
* evaluated only if the field is not empty
|
|
*
|
|
* @generated from field: optional bool ignore_empty = 6;
|
|
*/
|
|
ignoreEmpty?: boolean;
|
|
|
|
constructor(data?: PartialMessage<MapRules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.MapRules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "min_pairs", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 2, name: "max_pairs", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
|
|
{ no: 3, name: "no_sparse", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 4, name: "keys", kind: "message", T: FieldRules, opt: true },
|
|
{ no: 5, name: "values", kind: "message", T: FieldRules, opt: true },
|
|
{ no: 6, name: "ignore_empty", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MapRules {
|
|
return new MapRules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MapRules {
|
|
return new MapRules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MapRules {
|
|
return new MapRules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: MapRules | PlainMessage<MapRules> | undefined, b: MapRules | PlainMessage<MapRules> | undefined): boolean {
|
|
return proto2.util.equals(MapRules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* AnyRules describe constraints applied exclusively to the
|
|
* `google.protobuf.Any` well-known type
|
|
*
|
|
* @generated from message validate.AnyRules
|
|
*/
|
|
export class AnyRules extends Message<AnyRules> {
|
|
/**
|
|
* Required specifies that this field must be set
|
|
*
|
|
* @generated from field: optional bool required = 1;
|
|
*/
|
|
required?: boolean;
|
|
|
|
/**
|
|
* In specifies that this field's `type_url` must be equal to one of the
|
|
* specified values.
|
|
*
|
|
* @generated from field: repeated string in = 2;
|
|
*/
|
|
in: string[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field's `type_url` must not be equal to any of
|
|
* the specified values.
|
|
*
|
|
* @generated from field: repeated string not_in = 3;
|
|
*/
|
|
notIn: string[] = [];
|
|
|
|
constructor(data?: PartialMessage<AnyRules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.AnyRules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "required", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 2, name: "in", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
{ no: 3, name: "not_in", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AnyRules {
|
|
return new AnyRules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AnyRules {
|
|
return new AnyRules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AnyRules {
|
|
return new AnyRules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: AnyRules | PlainMessage<AnyRules> | undefined, b: AnyRules | PlainMessage<AnyRules> | undefined): boolean {
|
|
return proto2.util.equals(AnyRules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* DurationRules describe the constraints applied exclusively to the
|
|
* `google.protobuf.Duration` well-known type
|
|
*
|
|
* @generated from message validate.DurationRules
|
|
*/
|
|
export class DurationRules extends Message<DurationRules> {
|
|
/**
|
|
* Required specifies that this field must be set
|
|
*
|
|
* @generated from field: optional bool required = 1;
|
|
*/
|
|
required?: boolean;
|
|
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional google.protobuf.Duration const = 2;
|
|
*/
|
|
const?: Duration;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional google.protobuf.Duration lt = 3;
|
|
*/
|
|
lt?: Duration;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* inclusive
|
|
*
|
|
* @generated from field: optional google.protobuf.Duration lte = 4;
|
|
*/
|
|
lte?: Duration;
|
|
|
|
/**
|
|
* Gt specifies that this field must be greater than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional google.protobuf.Duration gt = 5;
|
|
*/
|
|
gt?: Duration;
|
|
|
|
/**
|
|
* Gte specifies that this field must be greater than the specified value,
|
|
* inclusive
|
|
*
|
|
* @generated from field: optional google.protobuf.Duration gte = 6;
|
|
*/
|
|
gte?: Duration;
|
|
|
|
/**
|
|
* In specifies that this field must be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated google.protobuf.Duration in = 7;
|
|
*/
|
|
in: Duration[] = [];
|
|
|
|
/**
|
|
* NotIn specifies that this field cannot be equal to one of the specified
|
|
* values
|
|
*
|
|
* @generated from field: repeated google.protobuf.Duration not_in = 8;
|
|
*/
|
|
notIn: Duration[] = [];
|
|
|
|
constructor(data?: PartialMessage<DurationRules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.DurationRules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "required", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 2, name: "const", kind: "message", T: Duration, opt: true },
|
|
{ no: 3, name: "lt", kind: "message", T: Duration, opt: true },
|
|
{ no: 4, name: "lte", kind: "message", T: Duration, opt: true },
|
|
{ no: 5, name: "gt", kind: "message", T: Duration, opt: true },
|
|
{ no: 6, name: "gte", kind: "message", T: Duration, opt: true },
|
|
{ no: 7, name: "in", kind: "message", T: Duration, repeated: true },
|
|
{ no: 8, name: "not_in", kind: "message", T: Duration, repeated: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DurationRules {
|
|
return new DurationRules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DurationRules {
|
|
return new DurationRules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DurationRules {
|
|
return new DurationRules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: DurationRules | PlainMessage<DurationRules> | undefined, b: DurationRules | PlainMessage<DurationRules> | undefined): boolean {
|
|
return proto2.util.equals(DurationRules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* TimestampRules describe the constraints applied exclusively to the
|
|
* `google.protobuf.Timestamp` well-known type
|
|
*
|
|
* @generated from message validate.TimestampRules
|
|
*/
|
|
export class TimestampRules extends Message<TimestampRules> {
|
|
/**
|
|
* Required specifies that this field must be set
|
|
*
|
|
* @generated from field: optional bool required = 1;
|
|
*/
|
|
required?: boolean;
|
|
|
|
/**
|
|
* Const specifies that this field must be exactly the specified value
|
|
*
|
|
* @generated from field: optional google.protobuf.Timestamp const = 2;
|
|
*/
|
|
const?: Timestamp;
|
|
|
|
/**
|
|
* Lt specifies that this field must be less than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional google.protobuf.Timestamp lt = 3;
|
|
*/
|
|
lt?: Timestamp;
|
|
|
|
/**
|
|
* Lte specifies that this field must be less than the specified value,
|
|
* inclusive
|
|
*
|
|
* @generated from field: optional google.protobuf.Timestamp lte = 4;
|
|
*/
|
|
lte?: Timestamp;
|
|
|
|
/**
|
|
* Gt specifies that this field must be greater than the specified value,
|
|
* exclusive
|
|
*
|
|
* @generated from field: optional google.protobuf.Timestamp gt = 5;
|
|
*/
|
|
gt?: Timestamp;
|
|
|
|
/**
|
|
* Gte specifies that this field must be greater than the specified value,
|
|
* inclusive
|
|
*
|
|
* @generated from field: optional google.protobuf.Timestamp gte = 6;
|
|
*/
|
|
gte?: Timestamp;
|
|
|
|
/**
|
|
* LtNow specifies that this must be less than the current time. LtNow
|
|
* can only be used with the Within rule.
|
|
*
|
|
* @generated from field: optional bool lt_now = 7;
|
|
*/
|
|
ltNow?: boolean;
|
|
|
|
/**
|
|
* GtNow specifies that this must be greater than the current time. GtNow
|
|
* can only be used with the Within rule.
|
|
*
|
|
* @generated from field: optional bool gt_now = 8;
|
|
*/
|
|
gtNow?: boolean;
|
|
|
|
/**
|
|
* Within specifies that this field must be within this duration of the
|
|
* current time. This constraint can be used alone or with the LtNow and
|
|
* GtNow rules.
|
|
*
|
|
* @generated from field: optional google.protobuf.Duration within = 9;
|
|
*/
|
|
within?: Duration;
|
|
|
|
constructor(data?: PartialMessage<TimestampRules>) {
|
|
super();
|
|
proto2.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto2 = proto2;
|
|
static readonly typeName = "validate.TimestampRules";
|
|
static readonly fields: FieldList = proto2.util.newFieldList(() => [
|
|
{ no: 1, name: "required", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 2, name: "const", kind: "message", T: Timestamp, opt: true },
|
|
{ no: 3, name: "lt", kind: "message", T: Timestamp, opt: true },
|
|
{ no: 4, name: "lte", kind: "message", T: Timestamp, opt: true },
|
|
{ no: 5, name: "gt", kind: "message", T: Timestamp, opt: true },
|
|
{ no: 6, name: "gte", kind: "message", T: Timestamp, opt: true },
|
|
{ no: 7, name: "lt_now", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 8, name: "gt_now", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
{ no: 9, name: "within", kind: "message", T: Duration, opt: true },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TimestampRules {
|
|
return new TimestampRules().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TimestampRules {
|
|
return new TimestampRules().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TimestampRules {
|
|
return new TimestampRules().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: TimestampRules | PlainMessage<TimestampRules> | undefined, b: TimestampRules | PlainMessage<TimestampRules> | undefined): boolean {
|
|
return proto2.util.equals(TimestampRules, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Disabled nullifies any validation rules for this message, including any
|
|
* message fields associated with it that do support validation.
|
|
*
|
|
* @generated from extension: optional bool disabled = 1071;
|
|
*/
|
|
export const disabled = proto2.makeExtension<MessageOptions, boolean>(
|
|
"validate.disabled",
|
|
MessageOptions,
|
|
{ no: 1071, kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
);
|
|
|
|
/**
|
|
* Ignore skips generation of validation methods for this message.
|
|
*
|
|
* @generated from extension: optional bool ignored = 1072;
|
|
*/
|
|
export const ignored = proto2.makeExtension<MessageOptions, boolean>(
|
|
"validate.ignored",
|
|
MessageOptions,
|
|
{ no: 1072, kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
);
|
|
|
|
/**
|
|
* Required ensures that exactly one the field options in a oneof is set;
|
|
* validation fails if no fields in the oneof are set.
|
|
*
|
|
* @generated from extension: optional bool required = 1071;
|
|
*/
|
|
export const required = proto2.makeExtension<OneofOptions, boolean>(
|
|
"validate.required",
|
|
OneofOptions,
|
|
{ no: 1071, kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
);
|
|
|
|
/**
|
|
* Rules specify the validations to be performed on this field. By default,
|
|
* no validation is performed against a field.
|
|
*
|
|
* @generated from extension: optional validate.FieldRules rules = 1071;
|
|
*/
|
|
export const rules = proto2.makeExtension<FieldOptions, FieldRules>(
|
|
"validate.rules",
|
|
FieldOptions,
|
|
() => ({ no: 1071, kind: "message", T: FieldRules, opt: true }),
|
|
);
|
|
|