// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix // @generated from protobuf file "validate.proto" (package "validate", syntax proto2) // tslint:disable import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { IBinaryWriter } from "@protobuf-ts/runtime"; import { WireType } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { IBinaryReader } from "@protobuf-ts/runtime"; import { UnknownFieldHandler } from "@protobuf-ts/runtime"; import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; import { Timestamp } from "./google/protobuf/timestamp"; import { Duration } from "./google/protobuf/duration"; /** * 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 protobuf message validate.FieldRules */ export interface FieldRules { /** * @generated from protobuf field: optional validate.MessageRules message = 17 */ message?: MessageRules; /** * @generated from protobuf oneof: type */ type: { oneofKind: "float"; /** * Scalar Field Types * * @generated from protobuf field: validate.FloatRules float = 1 */ float: FloatRules; } | { oneofKind: "double"; /** * @generated from protobuf field: validate.DoubleRules double = 2 */ double: DoubleRules; } | { oneofKind: "int32"; /** * @generated from protobuf field: validate.Int32Rules int32 = 3 */ int32: Int32Rules; } | { oneofKind: "int64"; /** * @generated from protobuf field: validate.Int64Rules int64 = 4 */ int64: Int64Rules; } | { oneofKind: "uint32"; /** * @generated from protobuf field: validate.UInt32Rules uint32 = 5 */ uint32: UInt32Rules; } | { oneofKind: "uint64"; /** * @generated from protobuf field: validate.UInt64Rules uint64 = 6 */ uint64: UInt64Rules; } | { oneofKind: "sint32"; /** * @generated from protobuf field: validate.SInt32Rules sint32 = 7 */ sint32: SInt32Rules; } | { oneofKind: "sint64"; /** * @generated from protobuf field: validate.SInt64Rules sint64 = 8 */ sint64: SInt64Rules; } | { oneofKind: "fixed32"; /** * @generated from protobuf field: validate.Fixed32Rules fixed32 = 9 */ fixed32: Fixed32Rules; } | { oneofKind: "fixed64"; /** * @generated from protobuf field: validate.Fixed64Rules fixed64 = 10 */ fixed64: Fixed64Rules; } | { oneofKind: "sfixed32"; /** * @generated from protobuf field: validate.SFixed32Rules sfixed32 = 11 */ sfixed32: SFixed32Rules; } | { oneofKind: "sfixed64"; /** * @generated from protobuf field: validate.SFixed64Rules sfixed64 = 12 */ sfixed64: SFixed64Rules; } | { oneofKind: "bool"; /** * @generated from protobuf field: validate.BoolRules bool = 13 */ bool: BoolRules; } | { oneofKind: "string"; /** * @generated from protobuf field: validate.StringRules string = 14 */ string: StringRules; } | { oneofKind: "bytes"; /** * @generated from protobuf field: validate.BytesRules bytes = 15 */ bytes: BytesRules; } | { oneofKind: "enum"; /** * Complex Field Types * * @generated from protobuf field: validate.EnumRules enum = 16 */ enum: EnumRules; } | { oneofKind: "repeated"; /** * @generated from protobuf field: validate.RepeatedRules repeated = 18 */ repeated: RepeatedRules; } | { oneofKind: "map"; /** * @generated from protobuf field: validate.MapRules map = 19 */ map: MapRules; } | { oneofKind: "any"; /** * Well-Known Field Types * * @generated from protobuf field: validate.AnyRules any = 20 */ any: AnyRules; } | { oneofKind: "duration"; /** * @generated from protobuf field: validate.DurationRules duration = 21 */ duration: DurationRules; } | { oneofKind: "timestamp"; /** * @generated from protobuf field: validate.TimestampRules timestamp = 22 */ timestamp: TimestampRules; } | { oneofKind: undefined; }; } /** * FloatRules describes the constraints applied to `float` values * * @generated from protobuf message validate.FloatRules */ export interface FloatRules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional float const = 1 */ const?: number; /** * Lt specifies that this field must be less than the specified value, * exclusive * * @generated from protobuf 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 protobuf 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 protobuf 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 protobuf field: optional float gte = 5 */ gte?: number; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated float in = 6 */ in: number[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated float not_in = 7 */ not_in: number[]; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf 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 protobuf field: optional bool ignore_empty = 9 */ ignore_empty?: boolean; } /** * DoubleRules describes the constraints applied to `double` values * * @generated from protobuf message validate.DoubleRules */ export interface DoubleRules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional double const = 1 */ const?: number; /** * Lt specifies that this field must be less than the specified value, * exclusive * * @generated from protobuf 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 protobuf 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 protobuf 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 protobuf field: optional double gte = 5 */ gte?: number; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated double in = 6 */ in: number[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated double not_in = 7 */ not_in: number[]; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf 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 protobuf field: optional bool ignore_empty = 9 */ ignore_empty?: boolean; } /** * Int32Rules describes the constraints applied to `int32` values * * @generated from protobuf message validate.Int32Rules */ export interface Int32Rules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional int32 const = 1 */ const?: number; /** * Lt specifies that this field must be less than the specified value, * exclusive * * @generated from protobuf 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 protobuf 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 protobuf 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 protobuf field: optional int32 gte = 5 */ gte?: number; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated int32 in = 6 */ in: number[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated int32 not_in = 7 */ not_in: number[]; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf 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 protobuf field: optional bool ignore_empty = 9 */ ignore_empty?: boolean; } /** * Int64Rules describes the constraints applied to `int64` values * * @generated from protobuf message validate.Int64Rules */ export interface Int64Rules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional int64 const = 1 */ const?: bigint; /** * Lt specifies that this field must be less than the specified value, * exclusive * * @generated from protobuf 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 protobuf 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 protobuf 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 protobuf field: optional int64 gte = 5 */ gte?: bigint; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated int64 in = 6 */ in: bigint[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated int64 not_in = 7 */ not_in: bigint[]; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf 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 protobuf field: optional bool ignore_empty = 9 */ ignore_empty?: boolean; } /** * UInt32Rules describes the constraints applied to `uint32` values * * @generated from protobuf message validate.UInt32Rules */ export interface UInt32Rules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional uint32 const = 1 */ const?: number; /** * Lt specifies that this field must be less than the specified value, * exclusive * * @generated from protobuf 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 protobuf 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 protobuf 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 protobuf field: optional uint32 gte = 5 */ gte?: number; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated uint32 in = 6 */ in: number[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated uint32 not_in = 7 */ not_in: number[]; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf 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 protobuf field: optional bool ignore_empty = 9 */ ignore_empty?: boolean; } /** * UInt64Rules describes the constraints applied to `uint64` values * * @generated from protobuf message validate.UInt64Rules */ export interface UInt64Rules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional uint64 const = 1 */ const?: bigint; /** * Lt specifies that this field must be less than the specified value, * exclusive * * @generated from protobuf 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 protobuf 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 protobuf 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 protobuf field: optional uint64 gte = 5 */ gte?: bigint; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated uint64 in = 6 */ in: bigint[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated uint64 not_in = 7 */ not_in: bigint[]; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf 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 protobuf field: optional bool ignore_empty = 9 */ ignore_empty?: boolean; } /** * SInt32Rules describes the constraints applied to `sint32` values * * @generated from protobuf message validate.SInt32Rules */ export interface SInt32Rules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional sint32 const = 1 */ const?: number; /** * Lt specifies that this field must be less than the specified value, * exclusive * * @generated from protobuf 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 protobuf 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 protobuf 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 protobuf field: optional sint32 gte = 5 */ gte?: number; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated sint32 in = 6 */ in: number[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated sint32 not_in = 7 */ not_in: number[]; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf 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 protobuf field: optional bool ignore_empty = 9 */ ignore_empty?: boolean; } /** * SInt64Rules describes the constraints applied to `sint64` values * * @generated from protobuf message validate.SInt64Rules */ export interface SInt64Rules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional sint64 const = 1 */ const?: bigint; /** * Lt specifies that this field must be less than the specified value, * exclusive * * @generated from protobuf 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 protobuf 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 protobuf 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 protobuf field: optional sint64 gte = 5 */ gte?: bigint; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated sint64 in = 6 */ in: bigint[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated sint64 not_in = 7 */ not_in: bigint[]; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf 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 protobuf field: optional bool ignore_empty = 9 */ ignore_empty?: boolean; } /** * Fixed32Rules describes the constraints applied to `fixed32` values * * @generated from protobuf message validate.Fixed32Rules */ export interface Fixed32Rules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional fixed32 const = 1 */ const?: number; /** * Lt specifies that this field must be less than the specified value, * exclusive * * @generated from protobuf 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 protobuf 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 protobuf 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 protobuf field: optional fixed32 gte = 5 */ gte?: number; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated fixed32 in = 6 */ in: number[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated fixed32 not_in = 7 */ not_in: number[]; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf 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 protobuf field: optional bool ignore_empty = 9 */ ignore_empty?: boolean; } /** * Fixed64Rules describes the constraints applied to `fixed64` values * * @generated from protobuf message validate.Fixed64Rules */ export interface Fixed64Rules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional fixed64 const = 1 */ const?: bigint; /** * Lt specifies that this field must be less than the specified value, * exclusive * * @generated from protobuf 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 protobuf 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 protobuf 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 protobuf field: optional fixed64 gte = 5 */ gte?: bigint; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated fixed64 in = 6 */ in: bigint[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated fixed64 not_in = 7 */ not_in: bigint[]; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf 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 protobuf field: optional bool ignore_empty = 9 */ ignore_empty?: boolean; } /** * SFixed32Rules describes the constraints applied to `sfixed32` values * * @generated from protobuf message validate.SFixed32Rules */ export interface SFixed32Rules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional sfixed32 const = 1 */ const?: number; /** * Lt specifies that this field must be less than the specified value, * exclusive * * @generated from protobuf 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 protobuf 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 protobuf 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 protobuf field: optional sfixed32 gte = 5 */ gte?: number; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated sfixed32 in = 6 */ in: number[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated sfixed32 not_in = 7 */ not_in: number[]; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf 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 protobuf field: optional bool ignore_empty = 9 */ ignore_empty?: boolean; } /** * SFixed64Rules describes the constraints applied to `sfixed64` values * * @generated from protobuf message validate.SFixed64Rules */ export interface SFixed64Rules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional sfixed64 const = 1 */ const?: bigint; /** * Lt specifies that this field must be less than the specified value, * exclusive * * @generated from protobuf 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 protobuf 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 protobuf 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 protobuf field: optional sfixed64 gte = 5 */ gte?: bigint; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated sfixed64 in = 6 */ in: bigint[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated sfixed64 not_in = 7 */ not_in: bigint[]; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf 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 protobuf field: optional bool ignore_empty = 9 */ ignore_empty?: boolean; } /** * BoolRules describes the constraints applied to `bool` values * * @generated from protobuf message validate.BoolRules */ export interface BoolRules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional bool const = 1 */ const?: boolean; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf field: optional bool unauthorized = 2 */ unauthorized?: boolean; } /** * StringRules describe the constraints applied to `string` values * * @generated from protobuf message validate.StringRules */ export interface StringRules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf 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 protobuf 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 protobuf field: optional uint64 min_len = 2 */ min_len?: 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 protobuf field: optional uint64 max_len = 3 */ max_len?: bigint; /** * LenBytes specifies that this field must be the specified number of bytes * at a minimum * * @generated from protobuf field: optional uint64 len_bytes = 20 */ len_bytes?: bigint; /** * MinBytes specifies that this field must be the specified number of bytes * at a minimum * * @generated from protobuf field: optional uint64 min_bytes = 4 */ min_bytes?: bigint; /** * MaxBytes specifies that this field must be the specified number of bytes * at a maximum * * @generated from protobuf field: optional uint64 max_bytes = 5 */ max_bytes?: bigint; /** * Pattern specifes that this field must match against the specified * regular expression (RE2 syntax). The included expression should elide * any delimiters. * * @generated from protobuf 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 protobuf 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 protobuf field: optional string suffix = 8 */ suffix?: string; /** * Contains specifies that this field must have the specified substring * anywhere in the string. * * @generated from protobuf field: optional string contains = 9 */ contains?: string; /** * NotContains specifies that this field cannot have the specified substring * anywhere in the string. * * @generated from protobuf field: optional string not_contains = 23 */ not_contains?: string; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated string in = 10 */ in: string[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated string not_in = 11 */ not_in: string[]; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf field: optional bool unauthorized = 29 */ unauthorized?: boolean; /** * WellKnown rules provide advanced constraints against common string * patterns * * @generated from protobuf oneof: well_known */ well_known: { oneofKind: "email"; /** * Email specifies that the field must be a valid email address as * defined by RFC 5322 * * @generated from protobuf field: bool email = 12 */ email: boolean; } | { oneofKind: "hostname"; /** * 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 protobuf field: bool hostname = 13 */ hostname: boolean; } | { oneofKind: "ip"; /** * 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 protobuf field: bool ip = 14 */ ip: boolean; } | { oneofKind: "ipv4"; /** * Ipv4 specifies that the field must be a valid IPv4 address. * * @generated from protobuf field: bool ipv4 = 15 */ ipv4: boolean; } | { oneofKind: "ipv6"; /** * Ipv6 specifies that the field must be a valid IPv6 address. Valid * IPv6 addresses should not include surrounding square brackets. * * @generated from protobuf field: bool ipv6 = 16 */ ipv6: boolean; } | { oneofKind: "uri"; /** * Uri specifies that the field must be a valid, absolute URI as defined * by RFC 3986 * * @generated from protobuf field: bool uri = 17 */ uri: boolean; } | { oneofKind: "uri_ref"; /** * UriRef specifies that the field must be a valid URI as defined by RFC * 3986 and may be relative or absolute. * * @generated from protobuf field: bool uri_ref = 18 */ uri_ref: boolean; } | { oneofKind: "address"; /** * 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 protobuf field: bool address = 21 */ address: boolean; } | { oneofKind: "uuid"; /** * Uuid specifies that the field must be a valid UUID as defined by * RFC 4122 * * @generated from protobuf field: bool uuid = 22 */ uuid: boolean; } | { oneofKind: "well_known_regex"; /** * WellKnownRegex specifies a common well known pattern defined as a regex. * * @generated from protobuf field: validate.KnownRegex well_known_regex = 24 */ well_known_regex: KnownRegex; } | { oneofKind: "dateIso8601"; /** * dateIso8601 specifes that the field must be either a valid date as * defined by ISO 8601 * * @generated from protobuf field: bool dateIso8601 = 26 */ dateIso8601: boolean; } | { oneofKind: "languageIso6391"; /** * languageIso639 specifes that the field must be either a valid language name as * defined by ISO 639-1 * * @generated from protobuf field: bool languageIso6391 = 27 */ languageIso6391: boolean; } | { oneofKind: "tzData"; /** * 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 protobuf field: bool tzData = 28 */ tzData: boolean; } | { oneofKind: "countryCodeIso3166"; /** * countryCodeIso3166 specifes that the field must be either a valid country code as * defined by ISO 3166 * * @generated from protobuf field: bool countryCodeIso3166 = 31 */ countryCodeIso3166: boolean; } | { oneofKind: "languageIso639"; /** * languageIso639 specifes that the field must be either a valid language name as * defined by ISO 639-1, 639-2, or 639-3 * * @generated from protobuf field: bool languageIso639 = 32 */ languageIso639: boolean; } | { oneofKind: "countryCodeIso3166Alpha2"; /** * countryCodeIso3166Alpha2 specifes that the field must be either a valid alpha-2 country code as * defined by ISO 3166 * * @generated from protobuf field: bool countryCodeIso3166Alpha2 = 33 */ countryCodeIso3166Alpha2: boolean; } | { oneofKind: 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 protobuf 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 protobuf field: optional bool ignore_empty = 30 */ ignore_empty?: boolean; } /** * BytesRules describe the constraints applied to `bytes` values * * @generated from protobuf message validate.BytesRules */ export interface BytesRules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional bytes const = 1 */ const?: Uint8Array; /** * Len specifies that this field must be the specified number of bytes * * @generated from protobuf field: optional uint64 len = 13 */ len?: bigint; /** * MinLen specifies that this field must be the specified number of bytes * at a minimum * * @generated from protobuf field: optional uint64 min_len = 2 */ min_len?: bigint; /** * MaxLen specifies that this field must be the specified number of bytes * at a maximum * * @generated from protobuf field: optional uint64 max_len = 3 */ max_len?: bigint; /** * Pattern specifes that this field must match against the specified * regular expression (RE2 syntax). The included expression should elide * any delimiters. * * @generated from protobuf 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 protobuf 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 protobuf field: optional bytes suffix = 6 */ suffix?: Uint8Array; /** * Contains specifies that this field must have the specified bytes * anywhere in the string. * * @generated from protobuf field: optional bytes contains = 7 */ contains?: Uint8Array; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated bytes in = 8 */ in: Uint8Array[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated bytes not_in = 9 */ not_in: Uint8Array[]; /** * WellKnown rules provide advanced constraints against common byte * patterns * * @generated from protobuf oneof: well_known */ well_known: { oneofKind: "ip"; /** * Ip specifies that the field must be a valid IP (v4 or v6) address in * byte format * * @generated from protobuf field: bool ip = 10 */ ip: boolean; } | { oneofKind: "ipv4"; /** * Ipv4 specifies that the field must be a valid IPv4 address in byte * format * * @generated from protobuf field: bool ipv4 = 11 */ ipv4: boolean; } | { oneofKind: "ipv6"; /** * Ipv6 specifies that the field must be a valid IPv6 address in byte * format * * @generated from protobuf field: bool ipv6 = 12 */ ipv6: boolean; } | { oneofKind: undefined; }; /** * IgnoreEmpty specifies that the validation rules of this field should be * evaluated only if the field is not empty * * @generated from protobuf field: optional bool ignore_empty = 14 */ ignore_empty?: boolean; } /** * EnumRules describe the constraints applied to enum values * * @generated from protobuf message validate.EnumRules */ export interface EnumRules { /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf 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 protobuf field: optional bool defined_only = 2 */ defined_only?: boolean; /** * In specifies that this field must be equal to one of the specified * values * * @generated from protobuf field: repeated int32 in = 3 */ in: number[]; /** * NotIn specifies that this field cannot be equal to one of the specified * values * * @generated from protobuf field: repeated int32 not_in = 4 */ not_in: number[]; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf 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 protobuf field: optional bool ignore_empty = 6 */ ignore_empty?: boolean; } /** * MessageRules describe the constraints applied to embedded message values. * For message-type fields, validation is performed recursively. * * @generated from protobuf message validate.MessageRules */ export interface MessageRules { /** * Skip specifies that the validation rules of this field should not be * evaluated * * @generated from protobuf field: optional bool skip = 1 */ skip?: boolean; /** * Required specifies that this field must be set * * @generated from protobuf field: optional bool required = 2 */ required?: boolean; /** * unauthorized specifies that this field cannot be written. * * @generated from protobuf field: optional bool unauthorized = 3 */ unauthorized?: boolean; } /** * RepeatedRules describe the constraints applied to `repeated` values * * @generated from protobuf message validate.RepeatedRules */ export interface RepeatedRules { /** * MinItems specifies that this field must have the specified number of * items at a minimum * * @generated from protobuf field: optional uint64 min_items = 1 */ min_items?: bigint; /** * MaxItems specifies that this field must have the specified number of * items at a maximum * * @generated from protobuf field: optional uint64 max_items = 2 */ max_items?: 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 protobuf 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 protobuf 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 protobuf 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 protobuf 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 protobuf field: optional bool ignore_empty = 7 */ ignore_empty?: boolean; } /** * MapRules describe the constraints applied to `map` values * * @generated from protobuf message validate.MapRules */ export interface MapRules { /** * MinPairs specifies that this field must have the specified number of * KVs at a minimum * * @generated from protobuf field: optional uint64 min_pairs = 1 */ min_pairs?: bigint; /** * MaxPairs specifies that this field must have the specified number of * KVs at a maximum * * @generated from protobuf field: optional uint64 max_pairs = 2 */ max_pairs?: bigint; /** * NoSparse specifies values in this field cannot be unset. This only * applies to map's with message value types. * * @generated from protobuf field: optional bool no_sparse = 3 */ no_sparse?: boolean; /** * Keys specifies the constraints to be applied to each key in the field. * * @generated from protobuf 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 protobuf 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 protobuf field: optional bool ignore_empty = 6 */ ignore_empty?: boolean; } /** * AnyRules describe constraints applied exclusively to the * `google.protobuf.Any` well-known type * * @generated from protobuf message validate.AnyRules */ export interface AnyRules { /** * Required specifies that this field must be set * * @generated from protobuf 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 protobuf 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 protobuf field: repeated string not_in = 3 */ not_in: string[]; } /** * DurationRules describe the constraints applied exclusively to the * `google.protobuf.Duration` well-known type * * @generated from protobuf message validate.DurationRules */ export interface DurationRules { /** * Required specifies that this field must be set * * @generated from protobuf field: optional bool required = 1 */ required?: boolean; /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional google.protobuf.Duration const = 2 */ const?: Duration; /** * Lt specifies that this field must be less than the specified value, * exclusive * * @generated from protobuf field: optional google.protobuf.Duration lt = 3 */ lt?: Duration; /** * Lt specifies that this field must be less than the specified value, * inclusive * * @generated from protobuf field: optional google.protobuf.Duration lte = 4 */ lte?: Duration; /** * Gt specifies that this field must be greater than the specified value, * exclusive * * @generated from protobuf field: optional google.protobuf.Duration gt = 5 */ gt?: Duration; /** * Gte specifies that this field must be greater than the specified value, * inclusive * * @generated from protobuf 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 protobuf 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 protobuf field: repeated google.protobuf.Duration not_in = 8 */ not_in: Duration[]; } /** * TimestampRules describe the constraints applied exclusively to the * `google.protobuf.Timestamp` well-known type * * @generated from protobuf message validate.TimestampRules */ export interface TimestampRules { /** * Required specifies that this field must be set * * @generated from protobuf field: optional bool required = 1 */ required?: boolean; /** * Const specifies that this field must be exactly the specified value * * @generated from protobuf field: optional google.protobuf.Timestamp const = 2 */ const?: Timestamp; /** * Lt specifies that this field must be less than the specified value, * exclusive * * @generated from protobuf field: optional google.protobuf.Timestamp lt = 3 */ lt?: Timestamp; /** * Lte specifies that this field must be less than the specified value, * inclusive * * @generated from protobuf field: optional google.protobuf.Timestamp lte = 4 */ lte?: Timestamp; /** * Gt specifies that this field must be greater than the specified value, * exclusive * * @generated from protobuf field: optional google.protobuf.Timestamp gt = 5 */ gt?: Timestamp; /** * Gte specifies that this field must be greater than the specified value, * inclusive * * @generated from protobuf 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 protobuf field: optional bool lt_now = 7 */ lt_now?: boolean; /** * GtNow specifies that this must be greater than the current time. GtNow * can only be used with the Within rule. * * @generated from protobuf field: optional bool gt_now = 8 */ gt_now?: 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 protobuf field: optional google.protobuf.Duration within = 9 */ within?: Duration; } /** * WellKnownRegex contain some well-known patterns. * * @generated from protobuf enum validate.KnownRegex */ export enum KnownRegex { /** * @generated from protobuf enum value: UNKNOWN = 0; */ UNKNOWN = 0, /** * HTTP header name as defined by RFC 7230. * * @generated from protobuf enum value: HTTP_HEADER_NAME = 1; */ HTTP_HEADER_NAME = 1, /** * HTTP header value as defined by RFC 7230. * * @generated from protobuf enum value: HTTP_HEADER_VALUE = 2; */ HTTP_HEADER_VALUE = 2 } // @generated message type with reflection information, may provide speed optimized methods class FieldRules$Type extends MessageType { constructor() { super("validate.FieldRules", [ { no: 17, name: "message", kind: "message", T: () => MessageRules }, { no: 1, name: "float", kind: "message", oneof: "type", T: () => FloatRules }, { no: 2, name: "double", kind: "message", oneof: "type", T: () => DoubleRules }, { no: 3, name: "int32", kind: "message", oneof: "type", T: () => Int32Rules }, { no: 4, name: "int64", kind: "message", oneof: "type", T: () => Int64Rules }, { no: 5, name: "uint32", kind: "message", oneof: "type", T: () => UInt32Rules }, { no: 6, name: "uint64", kind: "message", oneof: "type", T: () => UInt64Rules }, { no: 7, name: "sint32", kind: "message", oneof: "type", T: () => SInt32Rules }, { no: 8, name: "sint64", kind: "message", oneof: "type", T: () => SInt64Rules }, { no: 9, name: "fixed32", kind: "message", oneof: "type", T: () => Fixed32Rules }, { no: 10, name: "fixed64", kind: "message", oneof: "type", T: () => Fixed64Rules }, { no: 11, name: "sfixed32", kind: "message", oneof: "type", T: () => SFixed32Rules }, { no: 12, name: "sfixed64", kind: "message", oneof: "type", T: () => SFixed64Rules }, { no: 13, name: "bool", kind: "message", oneof: "type", T: () => BoolRules }, { no: 14, name: "string", kind: "message", oneof: "type", T: () => StringRules }, { no: 15, name: "bytes", kind: "message", oneof: "type", T: () => BytesRules }, { no: 16, name: "enum", kind: "message", oneof: "type", T: () => EnumRules }, { no: 18, name: "repeated", kind: "message", oneof: "type", T: () => RepeatedRules }, { no: 19, name: "map", kind: "message", oneof: "type", T: () => MapRules }, { no: 20, name: "any", kind: "message", oneof: "type", T: () => AnyRules }, { no: 21, name: "duration", kind: "message", oneof: "type", T: () => DurationRules }, { no: 22, name: "timestamp", kind: "message", oneof: "type", T: () => TimestampRules } ]); } create(value?: PartialMessage): FieldRules { const message = globalThis.Object.create((this.messagePrototype!)); message.type = { oneofKind: undefined }; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldRules): FieldRules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional validate.MessageRules message */ 17: message.message = MessageRules.internalBinaryRead(reader, reader.uint32(), options, message.message); break; case /* validate.FloatRules float */ 1: message.type = { oneofKind: "float", float: FloatRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).float) }; break; case /* validate.DoubleRules double */ 2: message.type = { oneofKind: "double", double: DoubleRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).double) }; break; case /* validate.Int32Rules int32 */ 3: message.type = { oneofKind: "int32", int32: Int32Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).int32) }; break; case /* validate.Int64Rules int64 */ 4: message.type = { oneofKind: "int64", int64: Int64Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).int64) }; break; case /* validate.UInt32Rules uint32 */ 5: message.type = { oneofKind: "uint32", uint32: UInt32Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).uint32) }; break; case /* validate.UInt64Rules uint64 */ 6: message.type = { oneofKind: "uint64", uint64: UInt64Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).uint64) }; break; case /* validate.SInt32Rules sint32 */ 7: message.type = { oneofKind: "sint32", sint32: SInt32Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).sint32) }; break; case /* validate.SInt64Rules sint64 */ 8: message.type = { oneofKind: "sint64", sint64: SInt64Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).sint64) }; break; case /* validate.Fixed32Rules fixed32 */ 9: message.type = { oneofKind: "fixed32", fixed32: Fixed32Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).fixed32) }; break; case /* validate.Fixed64Rules fixed64 */ 10: message.type = { oneofKind: "fixed64", fixed64: Fixed64Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).fixed64) }; break; case /* validate.SFixed32Rules sfixed32 */ 11: message.type = { oneofKind: "sfixed32", sfixed32: SFixed32Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).sfixed32) }; break; case /* validate.SFixed64Rules sfixed64 */ 12: message.type = { oneofKind: "sfixed64", sfixed64: SFixed64Rules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).sfixed64) }; break; case /* validate.BoolRules bool */ 13: message.type = { oneofKind: "bool", bool: BoolRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).bool) }; break; case /* validate.StringRules string */ 14: message.type = { oneofKind: "string", string: StringRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).string) }; break; case /* validate.BytesRules bytes */ 15: message.type = { oneofKind: "bytes", bytes: BytesRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).bytes) }; break; case /* validate.EnumRules enum */ 16: message.type = { oneofKind: "enum", enum: EnumRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).enum) }; break; case /* validate.RepeatedRules repeated */ 18: message.type = { oneofKind: "repeated", repeated: RepeatedRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).repeated) }; break; case /* validate.MapRules map */ 19: message.type = { oneofKind: "map", map: MapRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).map) }; break; case /* validate.AnyRules any */ 20: message.type = { oneofKind: "any", any: AnyRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).any) }; break; case /* validate.DurationRules duration */ 21: message.type = { oneofKind: "duration", duration: DurationRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).duration) }; break; case /* validate.TimestampRules timestamp */ 22: message.type = { oneofKind: "timestamp", timestamp: TimestampRules.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).timestamp) }; break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: FieldRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* validate.FloatRules float = 1; */ if (message.type.oneofKind === "float") FloatRules.internalBinaryWrite(message.type.float, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); /* validate.DoubleRules double = 2; */ if (message.type.oneofKind === "double") DoubleRules.internalBinaryWrite(message.type.double, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); /* validate.Int32Rules int32 = 3; */ if (message.type.oneofKind === "int32") Int32Rules.internalBinaryWrite(message.type.int32, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); /* validate.Int64Rules int64 = 4; */ if (message.type.oneofKind === "int64") Int64Rules.internalBinaryWrite(message.type.int64, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); /* validate.UInt32Rules uint32 = 5; */ if (message.type.oneofKind === "uint32") UInt32Rules.internalBinaryWrite(message.type.uint32, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); /* validate.UInt64Rules uint64 = 6; */ if (message.type.oneofKind === "uint64") UInt64Rules.internalBinaryWrite(message.type.uint64, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); /* validate.SInt32Rules sint32 = 7; */ if (message.type.oneofKind === "sint32") SInt32Rules.internalBinaryWrite(message.type.sint32, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); /* validate.SInt64Rules sint64 = 8; */ if (message.type.oneofKind === "sint64") SInt64Rules.internalBinaryWrite(message.type.sint64, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); /* validate.Fixed32Rules fixed32 = 9; */ if (message.type.oneofKind === "fixed32") Fixed32Rules.internalBinaryWrite(message.type.fixed32, writer.tag(9, WireType.LengthDelimited).fork(), options).join(); /* validate.Fixed64Rules fixed64 = 10; */ if (message.type.oneofKind === "fixed64") Fixed64Rules.internalBinaryWrite(message.type.fixed64, writer.tag(10, WireType.LengthDelimited).fork(), options).join(); /* validate.SFixed32Rules sfixed32 = 11; */ if (message.type.oneofKind === "sfixed32") SFixed32Rules.internalBinaryWrite(message.type.sfixed32, writer.tag(11, WireType.LengthDelimited).fork(), options).join(); /* validate.SFixed64Rules sfixed64 = 12; */ if (message.type.oneofKind === "sfixed64") SFixed64Rules.internalBinaryWrite(message.type.sfixed64, writer.tag(12, WireType.LengthDelimited).fork(), options).join(); /* validate.BoolRules bool = 13; */ if (message.type.oneofKind === "bool") BoolRules.internalBinaryWrite(message.type.bool, writer.tag(13, WireType.LengthDelimited).fork(), options).join(); /* validate.StringRules string = 14; */ if (message.type.oneofKind === "string") StringRules.internalBinaryWrite(message.type.string, writer.tag(14, WireType.LengthDelimited).fork(), options).join(); /* validate.BytesRules bytes = 15; */ if (message.type.oneofKind === "bytes") BytesRules.internalBinaryWrite(message.type.bytes, writer.tag(15, WireType.LengthDelimited).fork(), options).join(); /* validate.EnumRules enum = 16; */ if (message.type.oneofKind === "enum") EnumRules.internalBinaryWrite(message.type.enum, writer.tag(16, WireType.LengthDelimited).fork(), options).join(); /* optional validate.MessageRules message = 17; */ if (message.message) MessageRules.internalBinaryWrite(message.message, writer.tag(17, WireType.LengthDelimited).fork(), options).join(); /* validate.RepeatedRules repeated = 18; */ if (message.type.oneofKind === "repeated") RepeatedRules.internalBinaryWrite(message.type.repeated, writer.tag(18, WireType.LengthDelimited).fork(), options).join(); /* validate.MapRules map = 19; */ if (message.type.oneofKind === "map") MapRules.internalBinaryWrite(message.type.map, writer.tag(19, WireType.LengthDelimited).fork(), options).join(); /* validate.AnyRules any = 20; */ if (message.type.oneofKind === "any") AnyRules.internalBinaryWrite(message.type.any, writer.tag(20, WireType.LengthDelimited).fork(), options).join(); /* validate.DurationRules duration = 21; */ if (message.type.oneofKind === "duration") DurationRules.internalBinaryWrite(message.type.duration, writer.tag(21, WireType.LengthDelimited).fork(), options).join(); /* validate.TimestampRules timestamp = 22; */ if (message.type.oneofKind === "timestamp") TimestampRules.internalBinaryWrite(message.type.timestamp, writer.tag(22, WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.FieldRules */ export const FieldRules = new FieldRules$Type(); // @generated message type with reflection information, may provide speed optimized methods class FloatRules$Type extends MessageType { constructor() { super("validate.FloatRules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 2 /*ScalarType.FLOAT*/ }, { no: 2, name: "lt", kind: "scalar", opt: true, T: 2 /*ScalarType.FLOAT*/ }, { no: 3, name: "lte", kind: "scalar", opt: true, T: 2 /*ScalarType.FLOAT*/ }, { no: 4, name: "gt", kind: "scalar", opt: true, T: 2 /*ScalarType.FLOAT*/ }, { no: 5, name: "gte", kind: "scalar", opt: true, T: 2 /*ScalarType.FLOAT*/ }, { no: 6, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 2 /*ScalarType.FLOAT*/ }, { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 2 /*ScalarType.FLOAT*/ }, { no: 8, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 9, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): FloatRules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FloatRules): FloatRules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional float const */ 1: message.const = reader.float(); break; case /* optional float lt */ 2: message.lt = reader.float(); break; case /* optional float lte */ 3: message.lte = reader.float(); break; case /* optional float gt */ 4: message.gt = reader.float(); break; case /* optional float gte */ 5: message.gte = reader.float(); break; case /* repeated float in */ 6: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.in.push(reader.float()); else message.in.push(reader.float()); break; case /* repeated float not_in */ 7: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.not_in.push(reader.float()); else message.not_in.push(reader.float()); break; case /* optional bool unauthorized */ 8: message.unauthorized = reader.bool(); break; case /* optional bool ignore_empty */ 9: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: FloatRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional float const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.Bit32).float(message.const); /* optional float lt = 2; */ if (message.lt !== undefined) writer.tag(2, WireType.Bit32).float(message.lt); /* optional float lte = 3; */ if (message.lte !== undefined) writer.tag(3, WireType.Bit32).float(message.lte); /* optional float gt = 4; */ if (message.gt !== undefined) writer.tag(4, WireType.Bit32).float(message.gt); /* optional float gte = 5; */ if (message.gte !== undefined) writer.tag(5, WireType.Bit32).float(message.gte); /* repeated float in = 6; */ for (let i = 0; i < message.in.length; i++) writer.tag(6, WireType.Bit32).float(message.in[i]); /* repeated float not_in = 7; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(7, WireType.Bit32).float(message.not_in[i]); /* optional bool unauthorized = 8; */ if (message.unauthorized !== undefined) writer.tag(8, WireType.Varint).bool(message.unauthorized); /* optional bool ignore_empty = 9; */ if (message.ignore_empty !== undefined) writer.tag(9, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.FloatRules */ export const FloatRules = new FloatRules$Type(); // @generated message type with reflection information, may provide speed optimized methods class DoubleRules$Type extends MessageType { constructor() { super("validate.DoubleRules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ }, { no: 2, name: "lt", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ }, { no: 3, name: "lte", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ }, { no: 4, name: "gt", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ }, { no: 5, name: "gte", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ }, { no: 6, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 1 /*ScalarType.DOUBLE*/ }, { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 1 /*ScalarType.DOUBLE*/ }, { no: 8, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 9, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): DoubleRules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DoubleRules): DoubleRules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional double const */ 1: message.const = reader.double(); break; case /* optional double lt */ 2: message.lt = reader.double(); break; case /* optional double lte */ 3: message.lte = reader.double(); break; case /* optional double gt */ 4: message.gt = reader.double(); break; case /* optional double gte */ 5: message.gte = reader.double(); break; case /* repeated double in */ 6: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.in.push(reader.double()); else message.in.push(reader.double()); break; case /* repeated double not_in */ 7: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.not_in.push(reader.double()); else message.not_in.push(reader.double()); break; case /* optional bool unauthorized */ 8: message.unauthorized = reader.bool(); break; case /* optional bool ignore_empty */ 9: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: DoubleRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional double const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.Bit64).double(message.const); /* optional double lt = 2; */ if (message.lt !== undefined) writer.tag(2, WireType.Bit64).double(message.lt); /* optional double lte = 3; */ if (message.lte !== undefined) writer.tag(3, WireType.Bit64).double(message.lte); /* optional double gt = 4; */ if (message.gt !== undefined) writer.tag(4, WireType.Bit64).double(message.gt); /* optional double gte = 5; */ if (message.gte !== undefined) writer.tag(5, WireType.Bit64).double(message.gte); /* repeated double in = 6; */ for (let i = 0; i < message.in.length; i++) writer.tag(6, WireType.Bit64).double(message.in[i]); /* repeated double not_in = 7; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(7, WireType.Bit64).double(message.not_in[i]); /* optional bool unauthorized = 8; */ if (message.unauthorized !== undefined) writer.tag(8, WireType.Varint).bool(message.unauthorized); /* optional bool ignore_empty = 9; */ if (message.ignore_empty !== undefined) writer.tag(9, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.DoubleRules */ export const DoubleRules = new DoubleRules$Type(); // @generated message type with reflection information, may provide speed optimized methods class Int32Rules$Type extends MessageType { constructor() { super("validate.Int32Rules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, { no: 2, name: "lt", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, { no: 3, name: "lte", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, { no: 4, name: "gt", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, { no: 5, name: "gte", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, { no: 6, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 5 /*ScalarType.INT32*/ }, { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 5 /*ScalarType.INT32*/ }, { no: 8, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 9, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): Int32Rules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Int32Rules): Int32Rules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional int32 const */ 1: message.const = reader.int32(); break; case /* optional int32 lt */ 2: message.lt = reader.int32(); break; case /* optional int32 lte */ 3: message.lte = reader.int32(); break; case /* optional int32 gt */ 4: message.gt = reader.int32(); break; case /* optional int32 gte */ 5: message.gte = reader.int32(); break; case /* repeated int32 in */ 6: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.in.push(reader.int32()); else message.in.push(reader.int32()); break; case /* repeated int32 not_in */ 7: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.not_in.push(reader.int32()); else message.not_in.push(reader.int32()); break; case /* optional bool unauthorized */ 8: message.unauthorized = reader.bool(); break; case /* optional bool ignore_empty */ 9: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: Int32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional int32 const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.Varint).int32(message.const); /* optional int32 lt = 2; */ if (message.lt !== undefined) writer.tag(2, WireType.Varint).int32(message.lt); /* optional int32 lte = 3; */ if (message.lte !== undefined) writer.tag(3, WireType.Varint).int32(message.lte); /* optional int32 gt = 4; */ if (message.gt !== undefined) writer.tag(4, WireType.Varint).int32(message.gt); /* optional int32 gte = 5; */ if (message.gte !== undefined) writer.tag(5, WireType.Varint).int32(message.gte); /* repeated int32 in = 6; */ for (let i = 0; i < message.in.length; i++) writer.tag(6, WireType.Varint).int32(message.in[i]); /* repeated int32 not_in = 7; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(7, WireType.Varint).int32(message.not_in[i]); /* optional bool unauthorized = 8; */ if (message.unauthorized !== undefined) writer.tag(8, WireType.Varint).bool(message.unauthorized); /* optional bool ignore_empty = 9; */ if (message.ignore_empty !== undefined) writer.tag(9, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.Int32Rules */ export const Int32Rules = new Int32Rules$Type(); // @generated message type with reflection information, may provide speed optimized methods class Int64Rules$Type extends MessageType { constructor() { super("validate.Int64Rules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 2, name: "lt", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 3, name: "lte", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 4, name: "gt", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 5, name: "gte", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 6, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 8, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 9, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): Int64Rules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Int64Rules): Int64Rules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional int64 const */ 1: message.const = reader.int64().toBigInt(); break; case /* optional int64 lt */ 2: message.lt = reader.int64().toBigInt(); break; case /* optional int64 lte */ 3: message.lte = reader.int64().toBigInt(); break; case /* optional int64 gt */ 4: message.gt = reader.int64().toBigInt(); break; case /* optional int64 gte */ 5: message.gte = reader.int64().toBigInt(); break; case /* repeated int64 in */ 6: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.in.push(reader.int64().toBigInt()); else message.in.push(reader.int64().toBigInt()); break; case /* repeated int64 not_in */ 7: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.not_in.push(reader.int64().toBigInt()); else message.not_in.push(reader.int64().toBigInt()); break; case /* optional bool unauthorized */ 8: message.unauthorized = reader.bool(); break; case /* optional bool ignore_empty */ 9: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: Int64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional int64 const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.Varint).int64(message.const); /* optional int64 lt = 2; */ if (message.lt !== undefined) writer.tag(2, WireType.Varint).int64(message.lt); /* optional int64 lte = 3; */ if (message.lte !== undefined) writer.tag(3, WireType.Varint).int64(message.lte); /* optional int64 gt = 4; */ if (message.gt !== undefined) writer.tag(4, WireType.Varint).int64(message.gt); /* optional int64 gte = 5; */ if (message.gte !== undefined) writer.tag(5, WireType.Varint).int64(message.gte); /* repeated int64 in = 6; */ for (let i = 0; i < message.in.length; i++) writer.tag(6, WireType.Varint).int64(message.in[i]); /* repeated int64 not_in = 7; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(7, WireType.Varint).int64(message.not_in[i]); /* optional bool unauthorized = 8; */ if (message.unauthorized !== undefined) writer.tag(8, WireType.Varint).bool(message.unauthorized); /* optional bool ignore_empty = 9; */ if (message.ignore_empty !== undefined) writer.tag(9, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.Int64Rules */ export const Int64Rules = new Int64Rules$Type(); // @generated message type with reflection information, may provide speed optimized methods class UInt32Rules$Type extends MessageType { constructor() { super("validate.UInt32Rules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, { no: 2, name: "lt", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, { no: 3, name: "lte", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, { no: 4, name: "gt", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, { no: 5, name: "gte", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, { no: 6, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 13 /*ScalarType.UINT32*/ }, { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 13 /*ScalarType.UINT32*/ }, { no: 8, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 9, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): UInt32Rules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UInt32Rules): UInt32Rules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional uint32 const */ 1: message.const = reader.uint32(); break; case /* optional uint32 lt */ 2: message.lt = reader.uint32(); break; case /* optional uint32 lte */ 3: message.lte = reader.uint32(); break; case /* optional uint32 gt */ 4: message.gt = reader.uint32(); break; case /* optional uint32 gte */ 5: message.gte = reader.uint32(); break; case /* repeated uint32 in */ 6: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.in.push(reader.uint32()); else message.in.push(reader.uint32()); break; case /* repeated uint32 not_in */ 7: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.not_in.push(reader.uint32()); else message.not_in.push(reader.uint32()); break; case /* optional bool unauthorized */ 8: message.unauthorized = reader.bool(); break; case /* optional bool ignore_empty */ 9: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: UInt32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional uint32 const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.Varint).uint32(message.const); /* optional uint32 lt = 2; */ if (message.lt !== undefined) writer.tag(2, WireType.Varint).uint32(message.lt); /* optional uint32 lte = 3; */ if (message.lte !== undefined) writer.tag(3, WireType.Varint).uint32(message.lte); /* optional uint32 gt = 4; */ if (message.gt !== undefined) writer.tag(4, WireType.Varint).uint32(message.gt); /* optional uint32 gte = 5; */ if (message.gte !== undefined) writer.tag(5, WireType.Varint).uint32(message.gte); /* repeated uint32 in = 6; */ for (let i = 0; i < message.in.length; i++) writer.tag(6, WireType.Varint).uint32(message.in[i]); /* repeated uint32 not_in = 7; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(7, WireType.Varint).uint32(message.not_in[i]); /* optional bool unauthorized = 8; */ if (message.unauthorized !== undefined) writer.tag(8, WireType.Varint).bool(message.unauthorized); /* optional bool ignore_empty = 9; */ if (message.ignore_empty !== undefined) writer.tag(9, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.UInt32Rules */ export const UInt32Rules = new UInt32Rules$Type(); // @generated message type with reflection information, may provide speed optimized methods class UInt64Rules$Type extends MessageType { constructor() { super("validate.UInt64Rules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 2, name: "lt", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 3, name: "lte", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 4, name: "gt", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 5, name: "gte", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 6, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 8, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 9, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): UInt64Rules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UInt64Rules): UInt64Rules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional uint64 const */ 1: message.const = reader.uint64().toBigInt(); break; case /* optional uint64 lt */ 2: message.lt = reader.uint64().toBigInt(); break; case /* optional uint64 lte */ 3: message.lte = reader.uint64().toBigInt(); break; case /* optional uint64 gt */ 4: message.gt = reader.uint64().toBigInt(); break; case /* optional uint64 gte */ 5: message.gte = reader.uint64().toBigInt(); break; case /* repeated uint64 in */ 6: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.in.push(reader.uint64().toBigInt()); else message.in.push(reader.uint64().toBigInt()); break; case /* repeated uint64 not_in */ 7: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.not_in.push(reader.uint64().toBigInt()); else message.not_in.push(reader.uint64().toBigInt()); break; case /* optional bool unauthorized */ 8: message.unauthorized = reader.bool(); break; case /* optional bool ignore_empty */ 9: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: UInt64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional uint64 const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.Varint).uint64(message.const); /* optional uint64 lt = 2; */ if (message.lt !== undefined) writer.tag(2, WireType.Varint).uint64(message.lt); /* optional uint64 lte = 3; */ if (message.lte !== undefined) writer.tag(3, WireType.Varint).uint64(message.lte); /* optional uint64 gt = 4; */ if (message.gt !== undefined) writer.tag(4, WireType.Varint).uint64(message.gt); /* optional uint64 gte = 5; */ if (message.gte !== undefined) writer.tag(5, WireType.Varint).uint64(message.gte); /* repeated uint64 in = 6; */ for (let i = 0; i < message.in.length; i++) writer.tag(6, WireType.Varint).uint64(message.in[i]); /* repeated uint64 not_in = 7; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(7, WireType.Varint).uint64(message.not_in[i]); /* optional bool unauthorized = 8; */ if (message.unauthorized !== undefined) writer.tag(8, WireType.Varint).bool(message.unauthorized); /* optional bool ignore_empty = 9; */ if (message.ignore_empty !== undefined) writer.tag(9, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.UInt64Rules */ export const UInt64Rules = new UInt64Rules$Type(); // @generated message type with reflection information, may provide speed optimized methods class SInt32Rules$Type extends MessageType { constructor() { super("validate.SInt32Rules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 17 /*ScalarType.SINT32*/ }, { no: 2, name: "lt", kind: "scalar", opt: true, T: 17 /*ScalarType.SINT32*/ }, { no: 3, name: "lte", kind: "scalar", opt: true, T: 17 /*ScalarType.SINT32*/ }, { no: 4, name: "gt", kind: "scalar", opt: true, T: 17 /*ScalarType.SINT32*/ }, { no: 5, name: "gte", kind: "scalar", opt: true, T: 17 /*ScalarType.SINT32*/ }, { no: 6, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 17 /*ScalarType.SINT32*/ }, { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 17 /*ScalarType.SINT32*/ }, { no: 8, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 9, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): SInt32Rules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SInt32Rules): SInt32Rules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional sint32 const */ 1: message.const = reader.sint32(); break; case /* optional sint32 lt */ 2: message.lt = reader.sint32(); break; case /* optional sint32 lte */ 3: message.lte = reader.sint32(); break; case /* optional sint32 gt */ 4: message.gt = reader.sint32(); break; case /* optional sint32 gte */ 5: message.gte = reader.sint32(); break; case /* repeated sint32 in */ 6: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.in.push(reader.sint32()); else message.in.push(reader.sint32()); break; case /* repeated sint32 not_in */ 7: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.not_in.push(reader.sint32()); else message.not_in.push(reader.sint32()); break; case /* optional bool unauthorized */ 8: message.unauthorized = reader.bool(); break; case /* optional bool ignore_empty */ 9: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: SInt32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional sint32 const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.Varint).sint32(message.const); /* optional sint32 lt = 2; */ if (message.lt !== undefined) writer.tag(2, WireType.Varint).sint32(message.lt); /* optional sint32 lte = 3; */ if (message.lte !== undefined) writer.tag(3, WireType.Varint).sint32(message.lte); /* optional sint32 gt = 4; */ if (message.gt !== undefined) writer.tag(4, WireType.Varint).sint32(message.gt); /* optional sint32 gte = 5; */ if (message.gte !== undefined) writer.tag(5, WireType.Varint).sint32(message.gte); /* repeated sint32 in = 6; */ for (let i = 0; i < message.in.length; i++) writer.tag(6, WireType.Varint).sint32(message.in[i]); /* repeated sint32 not_in = 7; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(7, WireType.Varint).sint32(message.not_in[i]); /* optional bool unauthorized = 8; */ if (message.unauthorized !== undefined) writer.tag(8, WireType.Varint).bool(message.unauthorized); /* optional bool ignore_empty = 9; */ if (message.ignore_empty !== undefined) writer.tag(9, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.SInt32Rules */ export const SInt32Rules = new SInt32Rules$Type(); // @generated message type with reflection information, may provide speed optimized methods class SInt64Rules$Type extends MessageType { constructor() { super("validate.SInt64Rules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 2, name: "lt", kind: "scalar", opt: true, T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 3, name: "lte", kind: "scalar", opt: true, T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 4, name: "gt", kind: "scalar", opt: true, T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 5, name: "gte", kind: "scalar", opt: true, T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 6, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 18 /*ScalarType.SINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 8, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 9, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): SInt64Rules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SInt64Rules): SInt64Rules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional sint64 const */ 1: message.const = reader.sint64().toBigInt(); break; case /* optional sint64 lt */ 2: message.lt = reader.sint64().toBigInt(); break; case /* optional sint64 lte */ 3: message.lte = reader.sint64().toBigInt(); break; case /* optional sint64 gt */ 4: message.gt = reader.sint64().toBigInt(); break; case /* optional sint64 gte */ 5: message.gte = reader.sint64().toBigInt(); break; case /* repeated sint64 in */ 6: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.in.push(reader.sint64().toBigInt()); else message.in.push(reader.sint64().toBigInt()); break; case /* repeated sint64 not_in */ 7: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.not_in.push(reader.sint64().toBigInt()); else message.not_in.push(reader.sint64().toBigInt()); break; case /* optional bool unauthorized */ 8: message.unauthorized = reader.bool(); break; case /* optional bool ignore_empty */ 9: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: SInt64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional sint64 const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.Varint).sint64(message.const); /* optional sint64 lt = 2; */ if (message.lt !== undefined) writer.tag(2, WireType.Varint).sint64(message.lt); /* optional sint64 lte = 3; */ if (message.lte !== undefined) writer.tag(3, WireType.Varint).sint64(message.lte); /* optional sint64 gt = 4; */ if (message.gt !== undefined) writer.tag(4, WireType.Varint).sint64(message.gt); /* optional sint64 gte = 5; */ if (message.gte !== undefined) writer.tag(5, WireType.Varint).sint64(message.gte); /* repeated sint64 in = 6; */ for (let i = 0; i < message.in.length; i++) writer.tag(6, WireType.Varint).sint64(message.in[i]); /* repeated sint64 not_in = 7; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(7, WireType.Varint).sint64(message.not_in[i]); /* optional bool unauthorized = 8; */ if (message.unauthorized !== undefined) writer.tag(8, WireType.Varint).bool(message.unauthorized); /* optional bool ignore_empty = 9; */ if (message.ignore_empty !== undefined) writer.tag(9, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.SInt64Rules */ export const SInt64Rules = new SInt64Rules$Type(); // @generated message type with reflection information, may provide speed optimized methods class Fixed32Rules$Type extends MessageType { constructor() { super("validate.Fixed32Rules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 7 /*ScalarType.FIXED32*/ }, { no: 2, name: "lt", kind: "scalar", opt: true, T: 7 /*ScalarType.FIXED32*/ }, { no: 3, name: "lte", kind: "scalar", opt: true, T: 7 /*ScalarType.FIXED32*/ }, { no: 4, name: "gt", kind: "scalar", opt: true, T: 7 /*ScalarType.FIXED32*/ }, { no: 5, name: "gte", kind: "scalar", opt: true, T: 7 /*ScalarType.FIXED32*/ }, { no: 6, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 7 /*ScalarType.FIXED32*/ }, { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 7 /*ScalarType.FIXED32*/ }, { no: 8, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 9, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): Fixed32Rules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Fixed32Rules): Fixed32Rules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional fixed32 const */ 1: message.const = reader.fixed32(); break; case /* optional fixed32 lt */ 2: message.lt = reader.fixed32(); break; case /* optional fixed32 lte */ 3: message.lte = reader.fixed32(); break; case /* optional fixed32 gt */ 4: message.gt = reader.fixed32(); break; case /* optional fixed32 gte */ 5: message.gte = reader.fixed32(); break; case /* repeated fixed32 in */ 6: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.in.push(reader.fixed32()); else message.in.push(reader.fixed32()); break; case /* repeated fixed32 not_in */ 7: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.not_in.push(reader.fixed32()); else message.not_in.push(reader.fixed32()); break; case /* optional bool unauthorized */ 8: message.unauthorized = reader.bool(); break; case /* optional bool ignore_empty */ 9: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: Fixed32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional fixed32 const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.Bit32).fixed32(message.const); /* optional fixed32 lt = 2; */ if (message.lt !== undefined) writer.tag(2, WireType.Bit32).fixed32(message.lt); /* optional fixed32 lte = 3; */ if (message.lte !== undefined) writer.tag(3, WireType.Bit32).fixed32(message.lte); /* optional fixed32 gt = 4; */ if (message.gt !== undefined) writer.tag(4, WireType.Bit32).fixed32(message.gt); /* optional fixed32 gte = 5; */ if (message.gte !== undefined) writer.tag(5, WireType.Bit32).fixed32(message.gte); /* repeated fixed32 in = 6; */ for (let i = 0; i < message.in.length; i++) writer.tag(6, WireType.Bit32).fixed32(message.in[i]); /* repeated fixed32 not_in = 7; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(7, WireType.Bit32).fixed32(message.not_in[i]); /* optional bool unauthorized = 8; */ if (message.unauthorized !== undefined) writer.tag(8, WireType.Varint).bool(message.unauthorized); /* optional bool ignore_empty = 9; */ if (message.ignore_empty !== undefined) writer.tag(9, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.Fixed32Rules */ export const Fixed32Rules = new Fixed32Rules$Type(); // @generated message type with reflection information, may provide speed optimized methods class Fixed64Rules$Type extends MessageType { constructor() { super("validate.Fixed64Rules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/ }, { no: 2, name: "lt", kind: "scalar", opt: true, T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/ }, { no: 3, name: "lte", kind: "scalar", opt: true, T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/ }, { no: 4, name: "gt", kind: "scalar", opt: true, T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/ }, { no: 5, name: "gte", kind: "scalar", opt: true, T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/ }, { no: 6, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/ }, { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 6 /*ScalarType.FIXED64*/, L: 0 /*LongType.BIGINT*/ }, { no: 8, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 9, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): Fixed64Rules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Fixed64Rules): Fixed64Rules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional fixed64 const */ 1: message.const = reader.fixed64().toBigInt(); break; case /* optional fixed64 lt */ 2: message.lt = reader.fixed64().toBigInt(); break; case /* optional fixed64 lte */ 3: message.lte = reader.fixed64().toBigInt(); break; case /* optional fixed64 gt */ 4: message.gt = reader.fixed64().toBigInt(); break; case /* optional fixed64 gte */ 5: message.gte = reader.fixed64().toBigInt(); break; case /* repeated fixed64 in */ 6: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.in.push(reader.fixed64().toBigInt()); else message.in.push(reader.fixed64().toBigInt()); break; case /* repeated fixed64 not_in */ 7: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.not_in.push(reader.fixed64().toBigInt()); else message.not_in.push(reader.fixed64().toBigInt()); break; case /* optional bool unauthorized */ 8: message.unauthorized = reader.bool(); break; case /* optional bool ignore_empty */ 9: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: Fixed64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional fixed64 const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.Bit64).fixed64(message.const); /* optional fixed64 lt = 2; */ if (message.lt !== undefined) writer.tag(2, WireType.Bit64).fixed64(message.lt); /* optional fixed64 lte = 3; */ if (message.lte !== undefined) writer.tag(3, WireType.Bit64).fixed64(message.lte); /* optional fixed64 gt = 4; */ if (message.gt !== undefined) writer.tag(4, WireType.Bit64).fixed64(message.gt); /* optional fixed64 gte = 5; */ if (message.gte !== undefined) writer.tag(5, WireType.Bit64).fixed64(message.gte); /* repeated fixed64 in = 6; */ for (let i = 0; i < message.in.length; i++) writer.tag(6, WireType.Bit64).fixed64(message.in[i]); /* repeated fixed64 not_in = 7; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(7, WireType.Bit64).fixed64(message.not_in[i]); /* optional bool unauthorized = 8; */ if (message.unauthorized !== undefined) writer.tag(8, WireType.Varint).bool(message.unauthorized); /* optional bool ignore_empty = 9; */ if (message.ignore_empty !== undefined) writer.tag(9, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.Fixed64Rules */ export const Fixed64Rules = new Fixed64Rules$Type(); // @generated message type with reflection information, may provide speed optimized methods class SFixed32Rules$Type extends MessageType { constructor() { super("validate.SFixed32Rules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 15 /*ScalarType.SFIXED32*/ }, { no: 2, name: "lt", kind: "scalar", opt: true, T: 15 /*ScalarType.SFIXED32*/ }, { no: 3, name: "lte", kind: "scalar", opt: true, T: 15 /*ScalarType.SFIXED32*/ }, { no: 4, name: "gt", kind: "scalar", opt: true, T: 15 /*ScalarType.SFIXED32*/ }, { no: 5, name: "gte", kind: "scalar", opt: true, T: 15 /*ScalarType.SFIXED32*/ }, { no: 6, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 15 /*ScalarType.SFIXED32*/ }, { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 15 /*ScalarType.SFIXED32*/ }, { no: 8, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 9, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): SFixed32Rules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SFixed32Rules): SFixed32Rules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional sfixed32 const */ 1: message.const = reader.sfixed32(); break; case /* optional sfixed32 lt */ 2: message.lt = reader.sfixed32(); break; case /* optional sfixed32 lte */ 3: message.lte = reader.sfixed32(); break; case /* optional sfixed32 gt */ 4: message.gt = reader.sfixed32(); break; case /* optional sfixed32 gte */ 5: message.gte = reader.sfixed32(); break; case /* repeated sfixed32 in */ 6: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.in.push(reader.sfixed32()); else message.in.push(reader.sfixed32()); break; case /* repeated sfixed32 not_in */ 7: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.not_in.push(reader.sfixed32()); else message.not_in.push(reader.sfixed32()); break; case /* optional bool unauthorized */ 8: message.unauthorized = reader.bool(); break; case /* optional bool ignore_empty */ 9: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: SFixed32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional sfixed32 const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.Bit32).sfixed32(message.const); /* optional sfixed32 lt = 2; */ if (message.lt !== undefined) writer.tag(2, WireType.Bit32).sfixed32(message.lt); /* optional sfixed32 lte = 3; */ if (message.lte !== undefined) writer.tag(3, WireType.Bit32).sfixed32(message.lte); /* optional sfixed32 gt = 4; */ if (message.gt !== undefined) writer.tag(4, WireType.Bit32).sfixed32(message.gt); /* optional sfixed32 gte = 5; */ if (message.gte !== undefined) writer.tag(5, WireType.Bit32).sfixed32(message.gte); /* repeated sfixed32 in = 6; */ for (let i = 0; i < message.in.length; i++) writer.tag(6, WireType.Bit32).sfixed32(message.in[i]); /* repeated sfixed32 not_in = 7; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(7, WireType.Bit32).sfixed32(message.not_in[i]); /* optional bool unauthorized = 8; */ if (message.unauthorized !== undefined) writer.tag(8, WireType.Varint).bool(message.unauthorized); /* optional bool ignore_empty = 9; */ if (message.ignore_empty !== undefined) writer.tag(9, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.SFixed32Rules */ export const SFixed32Rules = new SFixed32Rules$Type(); // @generated message type with reflection information, may provide speed optimized methods class SFixed64Rules$Type extends MessageType { constructor() { super("validate.SFixed64Rules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/ }, { no: 2, name: "lt", kind: "scalar", opt: true, T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/ }, { no: 3, name: "lte", kind: "scalar", opt: true, T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/ }, { no: 4, name: "gt", kind: "scalar", opt: true, T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/ }, { no: 5, name: "gte", kind: "scalar", opt: true, T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/ }, { no: 6, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/ }, { no: 7, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 16 /*ScalarType.SFIXED64*/, L: 0 /*LongType.BIGINT*/ }, { no: 8, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 9, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): SFixed64Rules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SFixed64Rules): SFixed64Rules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional sfixed64 const */ 1: message.const = reader.sfixed64().toBigInt(); break; case /* optional sfixed64 lt */ 2: message.lt = reader.sfixed64().toBigInt(); break; case /* optional sfixed64 lte */ 3: message.lte = reader.sfixed64().toBigInt(); break; case /* optional sfixed64 gt */ 4: message.gt = reader.sfixed64().toBigInt(); break; case /* optional sfixed64 gte */ 5: message.gte = reader.sfixed64().toBigInt(); break; case /* repeated sfixed64 in */ 6: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.in.push(reader.sfixed64().toBigInt()); else message.in.push(reader.sfixed64().toBigInt()); break; case /* repeated sfixed64 not_in */ 7: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.not_in.push(reader.sfixed64().toBigInt()); else message.not_in.push(reader.sfixed64().toBigInt()); break; case /* optional bool unauthorized */ 8: message.unauthorized = reader.bool(); break; case /* optional bool ignore_empty */ 9: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: SFixed64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional sfixed64 const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.Bit64).sfixed64(message.const); /* optional sfixed64 lt = 2; */ if (message.lt !== undefined) writer.tag(2, WireType.Bit64).sfixed64(message.lt); /* optional sfixed64 lte = 3; */ if (message.lte !== undefined) writer.tag(3, WireType.Bit64).sfixed64(message.lte); /* optional sfixed64 gt = 4; */ if (message.gt !== undefined) writer.tag(4, WireType.Bit64).sfixed64(message.gt); /* optional sfixed64 gte = 5; */ if (message.gte !== undefined) writer.tag(5, WireType.Bit64).sfixed64(message.gte); /* repeated sfixed64 in = 6; */ for (let i = 0; i < message.in.length; i++) writer.tag(6, WireType.Bit64).sfixed64(message.in[i]); /* repeated sfixed64 not_in = 7; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(7, WireType.Bit64).sfixed64(message.not_in[i]); /* optional bool unauthorized = 8; */ if (message.unauthorized !== undefined) writer.tag(8, WireType.Varint).bool(message.unauthorized); /* optional bool ignore_empty = 9; */ if (message.ignore_empty !== undefined) writer.tag(9, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.SFixed64Rules */ export const SFixed64Rules = new SFixed64Rules$Type(); // @generated message type with reflection information, may provide speed optimized methods class BoolRules$Type extends MessageType { constructor() { super("validate.BoolRules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 2, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): BoolRules { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BoolRules): BoolRules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional bool const */ 1: message.const = reader.bool(); break; case /* optional bool unauthorized */ 2: message.unauthorized = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: BoolRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional bool const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.Varint).bool(message.const); /* optional bool unauthorized = 2; */ if (message.unauthorized !== undefined) writer.tag(2, WireType.Varint).bool(message.unauthorized); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.BoolRules */ export const BoolRules = new BoolRules$Type(); // @generated message type with reflection information, may provide speed optimized methods class StringRules$Type extends MessageType { constructor() { super("validate.StringRules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 19, name: "len", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 2, name: "min_len", kind: "scalar", localName: "min_len", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 3, name: "max_len", kind: "scalar", localName: "max_len", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 20, name: "len_bytes", kind: "scalar", localName: "len_bytes", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 4, name: "min_bytes", kind: "scalar", localName: "min_bytes", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 5, name: "max_bytes", kind: "scalar", localName: "max_bytes", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 6, name: "pattern", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 7, name: "prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 8, name: "suffix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 9, name: "contains", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 23, name: "not_contains", kind: "scalar", localName: "not_contains", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 10, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, { no: 11, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, { no: 29, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 12, name: "email", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 13, name: "hostname", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 14, name: "ip", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 15, name: "ipv4", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 16, name: "ipv6", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 17, name: "uri", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 18, name: "uri_ref", kind: "scalar", localName: "uri_ref", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 21, name: "address", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 22, name: "uuid", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 24, name: "well_known_regex", kind: "enum", localName: "well_known_regex", oneof: "well_known", T: () => ["validate.KnownRegex", KnownRegex] }, { no: 26, name: "dateIso8601", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 27, name: "languageIso6391", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 28, name: "tzData", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 31, name: "countryCodeIso3166", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 32, name: "languageIso639", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 33, name: "countryCodeIso3166Alpha2", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 25, name: "strict", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 30, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): StringRules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; message.well_known = { oneofKind: undefined }; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StringRules): StringRules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional string const */ 1: message.const = reader.string(); break; case /* optional uint64 len */ 19: message.len = reader.uint64().toBigInt(); break; case /* optional uint64 min_len */ 2: message.min_len = reader.uint64().toBigInt(); break; case /* optional uint64 max_len */ 3: message.max_len = reader.uint64().toBigInt(); break; case /* optional uint64 len_bytes */ 20: message.len_bytes = reader.uint64().toBigInt(); break; case /* optional uint64 min_bytes */ 4: message.min_bytes = reader.uint64().toBigInt(); break; case /* optional uint64 max_bytes */ 5: message.max_bytes = reader.uint64().toBigInt(); break; case /* optional string pattern */ 6: message.pattern = reader.string(); break; case /* optional string prefix */ 7: message.prefix = reader.string(); break; case /* optional string suffix */ 8: message.suffix = reader.string(); break; case /* optional string contains */ 9: message.contains = reader.string(); break; case /* optional string not_contains */ 23: message.not_contains = reader.string(); break; case /* repeated string in */ 10: message.in.push(reader.string()); break; case /* repeated string not_in */ 11: message.not_in.push(reader.string()); break; case /* optional bool unauthorized */ 29: message.unauthorized = reader.bool(); break; case /* bool email */ 12: message.well_known = { oneofKind: "email", email: reader.bool() }; break; case /* bool hostname */ 13: message.well_known = { oneofKind: "hostname", hostname: reader.bool() }; break; case /* bool ip */ 14: message.well_known = { oneofKind: "ip", ip: reader.bool() }; break; case /* bool ipv4 */ 15: message.well_known = { oneofKind: "ipv4", ipv4: reader.bool() }; break; case /* bool ipv6 */ 16: message.well_known = { oneofKind: "ipv6", ipv6: reader.bool() }; break; case /* bool uri */ 17: message.well_known = { oneofKind: "uri", uri: reader.bool() }; break; case /* bool uri_ref */ 18: message.well_known = { oneofKind: "uri_ref", uri_ref: reader.bool() }; break; case /* bool address */ 21: message.well_known = { oneofKind: "address", address: reader.bool() }; break; case /* bool uuid */ 22: message.well_known = { oneofKind: "uuid", uuid: reader.bool() }; break; case /* validate.KnownRegex well_known_regex */ 24: message.well_known = { oneofKind: "well_known_regex", well_known_regex: reader.int32() }; break; case /* bool dateIso8601 */ 26: message.well_known = { oneofKind: "dateIso8601", dateIso8601: reader.bool() }; break; case /* bool languageIso6391 */ 27: message.well_known = { oneofKind: "languageIso6391", languageIso6391: reader.bool() }; break; case /* bool tzData */ 28: message.well_known = { oneofKind: "tzData", tzData: reader.bool() }; break; case /* bool countryCodeIso3166 */ 31: message.well_known = { oneofKind: "countryCodeIso3166", countryCodeIso3166: reader.bool() }; break; case /* bool languageIso639 */ 32: message.well_known = { oneofKind: "languageIso639", languageIso639: reader.bool() }; break; case /* bool countryCodeIso3166Alpha2 */ 33: message.well_known = { oneofKind: "countryCodeIso3166Alpha2", countryCodeIso3166Alpha2: reader.bool() }; break; case /* optional bool strict = 25 [default = true] */ 25: message.strict = reader.bool(); break; case /* optional bool ignore_empty */ 30: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: StringRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional string const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.LengthDelimited).string(message.const); /* optional uint64 min_len = 2; */ if (message.min_len !== undefined) writer.tag(2, WireType.Varint).uint64(message.min_len); /* optional uint64 max_len = 3; */ if (message.max_len !== undefined) writer.tag(3, WireType.Varint).uint64(message.max_len); /* optional uint64 min_bytes = 4; */ if (message.min_bytes !== undefined) writer.tag(4, WireType.Varint).uint64(message.min_bytes); /* optional uint64 max_bytes = 5; */ if (message.max_bytes !== undefined) writer.tag(5, WireType.Varint).uint64(message.max_bytes); /* optional string pattern = 6; */ if (message.pattern !== undefined) writer.tag(6, WireType.LengthDelimited).string(message.pattern); /* optional string prefix = 7; */ if (message.prefix !== undefined) writer.tag(7, WireType.LengthDelimited).string(message.prefix); /* optional string suffix = 8; */ if (message.suffix !== undefined) writer.tag(8, WireType.LengthDelimited).string(message.suffix); /* optional string contains = 9; */ if (message.contains !== undefined) writer.tag(9, WireType.LengthDelimited).string(message.contains); /* repeated string in = 10; */ for (let i = 0; i < message.in.length; i++) writer.tag(10, WireType.LengthDelimited).string(message.in[i]); /* repeated string not_in = 11; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(11, WireType.LengthDelimited).string(message.not_in[i]); /* bool email = 12; */ if (message.well_known.oneofKind === "email") writer.tag(12, WireType.Varint).bool(message.well_known.email); /* bool hostname = 13; */ if (message.well_known.oneofKind === "hostname") writer.tag(13, WireType.Varint).bool(message.well_known.hostname); /* bool ip = 14; */ if (message.well_known.oneofKind === "ip") writer.tag(14, WireType.Varint).bool(message.well_known.ip); /* bool ipv4 = 15; */ if (message.well_known.oneofKind === "ipv4") writer.tag(15, WireType.Varint).bool(message.well_known.ipv4); /* bool ipv6 = 16; */ if (message.well_known.oneofKind === "ipv6") writer.tag(16, WireType.Varint).bool(message.well_known.ipv6); /* bool uri = 17; */ if (message.well_known.oneofKind === "uri") writer.tag(17, WireType.Varint).bool(message.well_known.uri); /* bool uri_ref = 18; */ if (message.well_known.oneofKind === "uri_ref") writer.tag(18, WireType.Varint).bool(message.well_known.uri_ref); /* optional uint64 len = 19; */ if (message.len !== undefined) writer.tag(19, WireType.Varint).uint64(message.len); /* optional uint64 len_bytes = 20; */ if (message.len_bytes !== undefined) writer.tag(20, WireType.Varint).uint64(message.len_bytes); /* bool address = 21; */ if (message.well_known.oneofKind === "address") writer.tag(21, WireType.Varint).bool(message.well_known.address); /* bool uuid = 22; */ if (message.well_known.oneofKind === "uuid") writer.tag(22, WireType.Varint).bool(message.well_known.uuid); /* optional string not_contains = 23; */ if (message.not_contains !== undefined) writer.tag(23, WireType.LengthDelimited).string(message.not_contains); /* validate.KnownRegex well_known_regex = 24; */ if (message.well_known.oneofKind === "well_known_regex") writer.tag(24, WireType.Varint).int32(message.well_known.well_known_regex); /* optional bool strict = 25 [default = true]; */ if (message.strict !== undefined) writer.tag(25, WireType.Varint).bool(message.strict); /* bool dateIso8601 = 26; */ if (message.well_known.oneofKind === "dateIso8601") writer.tag(26, WireType.Varint).bool(message.well_known.dateIso8601); /* bool languageIso6391 = 27; */ if (message.well_known.oneofKind === "languageIso6391") writer.tag(27, WireType.Varint).bool(message.well_known.languageIso6391); /* bool tzData = 28; */ if (message.well_known.oneofKind === "tzData") writer.tag(28, WireType.Varint).bool(message.well_known.tzData); /* optional bool unauthorized = 29; */ if (message.unauthorized !== undefined) writer.tag(29, WireType.Varint).bool(message.unauthorized); /* optional bool ignore_empty = 30; */ if (message.ignore_empty !== undefined) writer.tag(30, WireType.Varint).bool(message.ignore_empty); /* bool countryCodeIso3166 = 31; */ if (message.well_known.oneofKind === "countryCodeIso3166") writer.tag(31, WireType.Varint).bool(message.well_known.countryCodeIso3166); /* bool languageIso639 = 32; */ if (message.well_known.oneofKind === "languageIso639") writer.tag(32, WireType.Varint).bool(message.well_known.languageIso639); /* bool countryCodeIso3166Alpha2 = 33; */ if (message.well_known.oneofKind === "countryCodeIso3166Alpha2") writer.tag(33, WireType.Varint).bool(message.well_known.countryCodeIso3166Alpha2); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.StringRules */ export const StringRules = new StringRules$Type(); // @generated message type with reflection information, may provide speed optimized methods class BytesRules$Type extends MessageType { constructor() { super("validate.BytesRules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }, { no: 13, name: "len", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 2, name: "min_len", kind: "scalar", localName: "min_len", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 3, name: "max_len", kind: "scalar", localName: "max_len", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 4, name: "pattern", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, { no: 5, name: "prefix", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }, { no: 6, name: "suffix", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }, { no: 7, name: "contains", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }, { no: 8, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, { no: 9, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, { no: 10, name: "ip", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 11, name: "ipv4", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 12, name: "ipv6", kind: "scalar", oneof: "well_known", T: 8 /*ScalarType.BOOL*/ }, { no: 14, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): BytesRules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; message.well_known = { oneofKind: undefined }; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BytesRules): BytesRules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional bytes const */ 1: message.const = reader.bytes(); break; case /* optional uint64 len */ 13: message.len = reader.uint64().toBigInt(); break; case /* optional uint64 min_len */ 2: message.min_len = reader.uint64().toBigInt(); break; case /* optional uint64 max_len */ 3: message.max_len = reader.uint64().toBigInt(); break; case /* optional string pattern */ 4: message.pattern = reader.string(); break; case /* optional bytes prefix */ 5: message.prefix = reader.bytes(); break; case /* optional bytes suffix */ 6: message.suffix = reader.bytes(); break; case /* optional bytes contains */ 7: message.contains = reader.bytes(); break; case /* repeated bytes in */ 8: message.in.push(reader.bytes()); break; case /* repeated bytes not_in */ 9: message.not_in.push(reader.bytes()); break; case /* bool ip */ 10: message.well_known = { oneofKind: "ip", ip: reader.bool() }; break; case /* bool ipv4 */ 11: message.well_known = { oneofKind: "ipv4", ipv4: reader.bool() }; break; case /* bool ipv6 */ 12: message.well_known = { oneofKind: "ipv6", ipv6: reader.bool() }; break; case /* optional bool ignore_empty */ 14: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: BytesRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional bytes const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.LengthDelimited).bytes(message.const); /* optional uint64 min_len = 2; */ if (message.min_len !== undefined) writer.tag(2, WireType.Varint).uint64(message.min_len); /* optional uint64 max_len = 3; */ if (message.max_len !== undefined) writer.tag(3, WireType.Varint).uint64(message.max_len); /* optional string pattern = 4; */ if (message.pattern !== undefined) writer.tag(4, WireType.LengthDelimited).string(message.pattern); /* optional bytes prefix = 5; */ if (message.prefix !== undefined) writer.tag(5, WireType.LengthDelimited).bytes(message.prefix); /* optional bytes suffix = 6; */ if (message.suffix !== undefined) writer.tag(6, WireType.LengthDelimited).bytes(message.suffix); /* optional bytes contains = 7; */ if (message.contains !== undefined) writer.tag(7, WireType.LengthDelimited).bytes(message.contains); /* repeated bytes in = 8; */ for (let i = 0; i < message.in.length; i++) writer.tag(8, WireType.LengthDelimited).bytes(message.in[i]); /* repeated bytes not_in = 9; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(9, WireType.LengthDelimited).bytes(message.not_in[i]); /* bool ip = 10; */ if (message.well_known.oneofKind === "ip") writer.tag(10, WireType.Varint).bool(message.well_known.ip); /* bool ipv4 = 11; */ if (message.well_known.oneofKind === "ipv4") writer.tag(11, WireType.Varint).bool(message.well_known.ipv4); /* bool ipv6 = 12; */ if (message.well_known.oneofKind === "ipv6") writer.tag(12, WireType.Varint).bool(message.well_known.ipv6); /* optional uint64 len = 13; */ if (message.len !== undefined) writer.tag(13, WireType.Varint).uint64(message.len); /* optional bool ignore_empty = 14; */ if (message.ignore_empty !== undefined) writer.tag(14, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.BytesRules */ export const BytesRules = new BytesRules$Type(); // @generated message type with reflection information, may provide speed optimized methods class EnumRules$Type extends MessageType { constructor() { super("validate.EnumRules", [ { no: 1, name: "const", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, { no: 2, name: "defined_only", kind: "scalar", localName: "defined_only", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 3, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 5 /*ScalarType.INT32*/ }, { no: 4, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 5 /*ScalarType.INT32*/ }, { no: 5, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 6, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): EnumRules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumRules): EnumRules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional int32 const */ 1: message.const = reader.int32(); break; case /* optional bool defined_only */ 2: message.defined_only = reader.bool(); break; case /* repeated int32 in */ 3: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.in.push(reader.int32()); else message.in.push(reader.int32()); break; case /* repeated int32 not_in */ 4: if (wireType === WireType.LengthDelimited) for (let e = reader.int32() + reader.pos; reader.pos < e;) message.not_in.push(reader.int32()); else message.not_in.push(reader.int32()); break; case /* optional bool unauthorized */ 5: message.unauthorized = reader.bool(); break; case /* optional bool ignore_empty */ 6: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: EnumRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional int32 const = 1; */ if (message.const !== undefined) writer.tag(1, WireType.Varint).int32(message.const); /* optional bool defined_only = 2; */ if (message.defined_only !== undefined) writer.tag(2, WireType.Varint).bool(message.defined_only); /* repeated int32 in = 3; */ for (let i = 0; i < message.in.length; i++) writer.tag(3, WireType.Varint).int32(message.in[i]); /* repeated int32 not_in = 4; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(4, WireType.Varint).int32(message.not_in[i]); /* optional bool unauthorized = 5; */ if (message.unauthorized !== undefined) writer.tag(5, WireType.Varint).bool(message.unauthorized); /* optional bool ignore_empty = 6; */ if (message.ignore_empty !== undefined) writer.tag(6, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.EnumRules */ export const EnumRules = new EnumRules$Type(); // @generated message type with reflection information, may provide speed optimized methods class MessageRules$Type extends MessageType { constructor() { super("validate.MessageRules", [ { no: 1, name: "skip", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 2, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 3, name: "unauthorized", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): MessageRules { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MessageRules): MessageRules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional bool skip */ 1: message.skip = reader.bool(); break; case /* optional bool required */ 2: message.required = reader.bool(); break; case /* optional bool unauthorized */ 3: message.unauthorized = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: MessageRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional bool skip = 1; */ if (message.skip !== undefined) writer.tag(1, WireType.Varint).bool(message.skip); /* optional bool required = 2; */ if (message.required !== undefined) writer.tag(2, WireType.Varint).bool(message.required); /* optional bool unauthorized = 3; */ if (message.unauthorized !== undefined) writer.tag(3, WireType.Varint).bool(message.unauthorized); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.MessageRules */ export const MessageRules = new MessageRules$Type(); // @generated message type with reflection information, may provide speed optimized methods class RepeatedRules$Type extends MessageType { constructor() { super("validate.RepeatedRules", [ { no: 1, name: "min_items", kind: "scalar", localName: "min_items", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 2, name: "max_items", kind: "scalar", localName: "max_items", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 3, name: "unique", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 4, name: "items", kind: "message", T: () => FieldRules }, { no: 5, name: "uniqueBaseLV", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 6, name: "knownRefLV", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 7, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): RepeatedRules { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RepeatedRules): RepeatedRules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional uint64 min_items */ 1: message.min_items = reader.uint64().toBigInt(); break; case /* optional uint64 max_items */ 2: message.max_items = reader.uint64().toBigInt(); break; case /* optional bool unique */ 3: message.unique = reader.bool(); break; case /* optional validate.FieldRules items */ 4: message.items = FieldRules.internalBinaryRead(reader, reader.uint32(), options, message.items); break; case /* optional bool uniqueBaseLV */ 5: message.uniqueBaseLV = reader.bool(); break; case /* optional bool knownRefLV */ 6: message.knownRefLV = reader.bool(); break; case /* optional bool ignore_empty */ 7: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: RepeatedRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional uint64 min_items = 1; */ if (message.min_items !== undefined) writer.tag(1, WireType.Varint).uint64(message.min_items); /* optional uint64 max_items = 2; */ if (message.max_items !== undefined) writer.tag(2, WireType.Varint).uint64(message.max_items); /* optional bool unique = 3; */ if (message.unique !== undefined) writer.tag(3, WireType.Varint).bool(message.unique); /* optional validate.FieldRules items = 4; */ if (message.items) FieldRules.internalBinaryWrite(message.items, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); /* optional bool uniqueBaseLV = 5; */ if (message.uniqueBaseLV !== undefined) writer.tag(5, WireType.Varint).bool(message.uniqueBaseLV); /* optional bool knownRefLV = 6; */ if (message.knownRefLV !== undefined) writer.tag(6, WireType.Varint).bool(message.knownRefLV); /* optional bool ignore_empty = 7; */ if (message.ignore_empty !== undefined) writer.tag(7, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.RepeatedRules */ export const RepeatedRules = new RepeatedRules$Type(); // @generated message type with reflection information, may provide speed optimized methods class MapRules$Type extends MessageType { constructor() { super("validate.MapRules", [ { no: 1, name: "min_pairs", kind: "scalar", localName: "min_pairs", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 2, name: "max_pairs", kind: "scalar", localName: "max_pairs", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 3, name: "no_sparse", kind: "scalar", localName: "no_sparse", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 4, name: "keys", kind: "message", T: () => FieldRules }, { no: 5, name: "values", kind: "message", T: () => FieldRules }, { no: 6, name: "ignore_empty", kind: "scalar", localName: "ignore_empty", opt: true, T: 8 /*ScalarType.BOOL*/ } ]); } create(value?: PartialMessage): MapRules { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MapRules): MapRules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional uint64 min_pairs */ 1: message.min_pairs = reader.uint64().toBigInt(); break; case /* optional uint64 max_pairs */ 2: message.max_pairs = reader.uint64().toBigInt(); break; case /* optional bool no_sparse */ 3: message.no_sparse = reader.bool(); break; case /* optional validate.FieldRules keys */ 4: message.keys = FieldRules.internalBinaryRead(reader, reader.uint32(), options, message.keys); break; case /* optional validate.FieldRules values */ 5: message.values = FieldRules.internalBinaryRead(reader, reader.uint32(), options, message.values); break; case /* optional bool ignore_empty */ 6: message.ignore_empty = reader.bool(); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: MapRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional uint64 min_pairs = 1; */ if (message.min_pairs !== undefined) writer.tag(1, WireType.Varint).uint64(message.min_pairs); /* optional uint64 max_pairs = 2; */ if (message.max_pairs !== undefined) writer.tag(2, WireType.Varint).uint64(message.max_pairs); /* optional bool no_sparse = 3; */ if (message.no_sparse !== undefined) writer.tag(3, WireType.Varint).bool(message.no_sparse); /* optional validate.FieldRules keys = 4; */ if (message.keys) FieldRules.internalBinaryWrite(message.keys, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); /* optional validate.FieldRules values = 5; */ if (message.values) FieldRules.internalBinaryWrite(message.values, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); /* optional bool ignore_empty = 6; */ if (message.ignore_empty !== undefined) writer.tag(6, WireType.Varint).bool(message.ignore_empty); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.MapRules */ export const MapRules = new MapRules$Type(); // @generated message type with reflection information, may provide speed optimized methods class AnyRules$Type extends MessageType { constructor() { super("validate.AnyRules", [ { no: 1, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 2, name: "in", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, { no: 3, name: "not_in", kind: "scalar", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): AnyRules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AnyRules): AnyRules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional bool required */ 1: message.required = reader.bool(); break; case /* repeated string in */ 2: message.in.push(reader.string()); break; case /* repeated string not_in */ 3: message.not_in.push(reader.string()); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: AnyRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional bool required = 1; */ if (message.required !== undefined) writer.tag(1, WireType.Varint).bool(message.required); /* repeated string in = 2; */ for (let i = 0; i < message.in.length; i++) writer.tag(2, WireType.LengthDelimited).string(message.in[i]); /* repeated string not_in = 3; */ for (let i = 0; i < message.not_in.length; i++) writer.tag(3, WireType.LengthDelimited).string(message.not_in[i]); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.AnyRules */ export const AnyRules = new AnyRules$Type(); // @generated message type with reflection information, may provide speed optimized methods class DurationRules$Type extends MessageType { constructor() { super("validate.DurationRules", [ { no: 1, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 2, name: "const", kind: "message", T: () => Duration }, { no: 3, name: "lt", kind: "message", T: () => Duration }, { no: 4, name: "lte", kind: "message", T: () => Duration }, { no: 5, name: "gt", kind: "message", T: () => Duration }, { no: 6, name: "gte", kind: "message", T: () => Duration }, { no: 7, name: "in", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Duration }, { no: 8, name: "not_in", kind: "message", localName: "not_in", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Duration } ]); } create(value?: PartialMessage): DurationRules { const message = globalThis.Object.create((this.messagePrototype!)); message.in = []; message.not_in = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DurationRules): DurationRules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional bool required */ 1: message.required = reader.bool(); break; case /* optional google.protobuf.Duration const */ 2: message.const = Duration.internalBinaryRead(reader, reader.uint32(), options, message.const); break; case /* optional google.protobuf.Duration lt */ 3: message.lt = Duration.internalBinaryRead(reader, reader.uint32(), options, message.lt); break; case /* optional google.protobuf.Duration lte */ 4: message.lte = Duration.internalBinaryRead(reader, reader.uint32(), options, message.lte); break; case /* optional google.protobuf.Duration gt */ 5: message.gt = Duration.internalBinaryRead(reader, reader.uint32(), options, message.gt); break; case /* optional google.protobuf.Duration gte */ 6: message.gte = Duration.internalBinaryRead(reader, reader.uint32(), options, message.gte); break; case /* repeated google.protobuf.Duration in */ 7: message.in.push(Duration.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated google.protobuf.Duration not_in */ 8: message.not_in.push(Duration.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: DurationRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional bool required = 1; */ if (message.required !== undefined) writer.tag(1, WireType.Varint).bool(message.required); /* optional google.protobuf.Duration const = 2; */ if (message.const) Duration.internalBinaryWrite(message.const, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.Duration lt = 3; */ if (message.lt) Duration.internalBinaryWrite(message.lt, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.Duration lte = 4; */ if (message.lte) Duration.internalBinaryWrite(message.lte, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.Duration gt = 5; */ if (message.gt) Duration.internalBinaryWrite(message.gt, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.Duration gte = 6; */ if (message.gte) Duration.internalBinaryWrite(message.gte, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.Duration in = 7; */ for (let i = 0; i < message.in.length; i++) Duration.internalBinaryWrite(message.in[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join(); /* repeated google.protobuf.Duration not_in = 8; */ for (let i = 0; i < message.not_in.length; i++) Duration.internalBinaryWrite(message.not_in[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.DurationRules */ export const DurationRules = new DurationRules$Type(); // @generated message type with reflection information, may provide speed optimized methods class TimestampRules$Type extends MessageType { constructor() { super("validate.TimestampRules", [ { no: 1, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 2, name: "const", kind: "message", T: () => Timestamp }, { no: 3, name: "lt", kind: "message", T: () => Timestamp }, { no: 4, name: "lte", kind: "message", T: () => Timestamp }, { no: 5, name: "gt", kind: "message", T: () => Timestamp }, { no: 6, name: "gte", kind: "message", T: () => Timestamp }, { no: 7, name: "lt_now", kind: "scalar", localName: "lt_now", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 8, name: "gt_now", kind: "scalar", localName: "gt_now", opt: true, T: 8 /*ScalarType.BOOL*/ }, { no: 9, name: "within", kind: "message", T: () => Duration } ]); } create(value?: PartialMessage): TimestampRules { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TimestampRules): TimestampRules { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* optional bool required */ 1: message.required = reader.bool(); break; case /* optional google.protobuf.Timestamp const */ 2: message.const = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.const); break; case /* optional google.protobuf.Timestamp lt */ 3: message.lt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lt); break; case /* optional google.protobuf.Timestamp lte */ 4: message.lte = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lte); break; case /* optional google.protobuf.Timestamp gt */ 5: message.gt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.gt); break; case /* optional google.protobuf.Timestamp gte */ 6: message.gte = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.gte); break; case /* optional bool lt_now */ 7: message.lt_now = reader.bool(); break; case /* optional bool gt_now */ 8: message.gt_now = reader.bool(); break; case /* optional google.protobuf.Duration within */ 9: message.within = Duration.internalBinaryRead(reader, reader.uint32(), options, message.within); break; default: let u = options.readUnknownField; if (u === "throw") throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); let d = reader.skip(wireType); if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); } } return message; } internalBinaryWrite(message: TimestampRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* optional bool required = 1; */ if (message.required !== undefined) writer.tag(1, WireType.Varint).bool(message.required); /* optional google.protobuf.Timestamp const = 2; */ if (message.const) Timestamp.internalBinaryWrite(message.const, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.Timestamp lt = 3; */ if (message.lt) Timestamp.internalBinaryWrite(message.lt, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.Timestamp lte = 4; */ if (message.lte) Timestamp.internalBinaryWrite(message.lte, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.Timestamp gt = 5; */ if (message.gt) Timestamp.internalBinaryWrite(message.gt, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); /* optional google.protobuf.Timestamp gte = 6; */ if (message.gte) Timestamp.internalBinaryWrite(message.gte, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); /* optional bool lt_now = 7; */ if (message.lt_now !== undefined) writer.tag(7, WireType.Varint).bool(message.lt_now); /* optional bool gt_now = 8; */ if (message.gt_now !== undefined) writer.tag(8, WireType.Varint).bool(message.gt_now); /* optional google.protobuf.Duration within = 9; */ if (message.within) Duration.internalBinaryWrite(message.within, writer.tag(9, WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message validate.TimestampRules */ export const TimestampRules = new TimestampRules$Type();