diff --git a/proto/protovalidate-testing/buf/validate/conformance/cases/strings.proto b/proto/protovalidate-testing/buf/validate/conformance/cases/strings.proto index 1e1a2806..d6b70506 100644 --- a/proto/protovalidate-testing/buf/validate/conformance/cases/strings.proto +++ b/proto/protovalidate-testing/buf/validate/conformance/cases/strings.proto @@ -24,6 +24,21 @@ message StringNone { message StringConst { string val = 1 [(buf.validate.field).string.const = "foo"]; } +message StringDecimal { + string val = 1 [(buf.validate.field).string.decimal = {}]; +} +message StringDecimalPrecision { + string val = 1 [(buf.validate.field).string.decimal.precision = 4]; +} +message StringDecimalScale { + string val = 1 [(buf.validate.field).string.decimal.scale = 2]; +} +message StringDecimalPrecisionScale { + string val = 1 [ + (buf.validate.field).string.decimal.precision = 6, + (buf.validate.field).string.decimal.scale = 2 + ]; +} message StringIn { string val = 1 [(buf.validate.field).string = { in: [ diff --git a/proto/protovalidate/buf/validate/validate.proto b/proto/protovalidate/buf/validate/validate.proto index 9751286e..89b2718e 100644 --- a/proto/protovalidate/buf/validate/validate.proto +++ b/proto/protovalidate/buf/validate/validate.proto @@ -3756,6 +3756,85 @@ message StringRules { } ]; + // `decimal` specifies that this string represents a decimal with specific precision and scale. + // + // ```proto + // message MyString { + // // Value must be a number with at most six digits, at most two digits after the decimal + // // point, and at most four digits before the decimal point. + // // "1000", "100.1", and "100" are valid, whereas "10000" and "1.111" are not. + // string value = 1 [ + // (buf.validate.field).string.decimal.precision = 6, + // (buf.validate.field).string.decimal.scale = 2 + // ]; + // } + // ``` + DecimalRules decimal = 36 [ + (predefined).cel = { + id: "string.decimal.numerals" + message: "value must not have characters other than decimal digits and a decimal point" + expression: "!has(rules.decimal) || !this.matches('[^0-9.]')" + }, + (predefined).cel = { + id: "string.decimal.multiple_points" + message: "value must not have multiple decimal points" + expression: "!has(rules.decimal) || !this.matches('\\..*\\.')" + }, + (predefined).cel = { + id: "string.decimal.leading_point" + message: "value must not begin with a decimal point" + expression: "!has(rules.decimal) || !this.matches('^\\.')" + }, + (predefined).cel = { + id: "string.decimal.trailing_point" + message: "value must not end with a decimal point" + expression: "!has(rules.decimal) || !this.matches('\\.$')" + }, + (predefined).cel = { + id: "string.decimal.leading_zero" + message: "value must not have a leading zero" + expression: "!has(rules.decimal) || !this.matches('^0[0-9]')" + }, + (predefined).cel = { + id: "string.decimal.empty" + message: "value must have at least one digit" + expression: "!has(rules.decimal) || this != ''" + }, + + (predefined).cel = { + id: "string.decimal.precision" + expression: + "has(rules.decimal.precision) &&" + "this.replace('.', '').size() > rules.decimal.precision" + " ? 'value must have no more than %d digits; got %d digits'" + " .format([rules.decimal.precision, this.replace('.', '').size()])" + " : ''" + }, + + (predefined).cel = { + id: "string.decimal.scale" + expression: + "has(rules.decimal.scale) && this.contains('.') &&" + "(this.size() - this.lastIndexOf('.') - 1) > rules.decimal.scale" + " ? 'value must have no more than %d digits after the decimal place; got %d digits'" + " .format([rules.decimal.scale, (this.size() - this.lastIndexOf('.') - 1)])" + " : ''" + }, + + (predefined).cel = { + id: "string.decimal.precision_scale" + expression: + "has(rules.decimal.precision) && has(rules.decimal.scale) &&" + "(this.contains('.') ? this.indexOf('.') : this.size()) > (rules.decimal.precision - rules.decimal.scale)" + " ? 'value must have no more than %d digits before the decimal place; got %d digits'" + " .format([" + " rules.decimal.precision - rules.decimal.scale," + " (this.contains('.') ? this.indexOf('.') : this.size())," + " ])" + " : ''" + } + ]; + // `well_known_regex` specifies a common well-known pattern // defined as a regex. If the field value doesn't match the well-known // regex, an error message will be generated. @@ -3845,6 +3924,22 @@ message StringRules { extensions 1000 to max; } +// Rules to describe a decimal represented as a string. +// +// TODO: Extend to the possible representations that google.type.Decimal allows? +message DecimalRules { + // The total number of digits allowed (before and after the decimal point). + optional uint32 precision = 1; + // The number of digits allowed after the decimal point; when subtracted from `precision`, the + // number of digits allowed before the decimal point. + // + // This can only be validated when `precision` is also set. + // + // It also must be less than `precision`. That is, at least one digit must be before the + // decimal point. + optional uint32 scale = 2; +} + // KnownRegex contains some well-known patterns. enum KnownRegex { KNOWN_REGEX_UNSPECIFIED = 0; diff --git a/tools/internal/gen/buf/validate/conformance/cases/strings.pb.go b/tools/internal/gen/buf/validate/conformance/cases/strings.pb.go index 97e1bd30..b5df5b7f 100644 --- a/tools/internal/gen/buf/validate/conformance/cases/strings.pb.go +++ b/tools/internal/gen/buf/validate/conformance/cases/strings.pb.go @@ -124,6 +124,182 @@ func (x *StringConst) GetVal() string { return "" } +type StringDecimal struct { + state protoimpl.MessageState `protogen:"open.v1"` + Val string `protobuf:"bytes,1,opt,name=val,proto3" json:"val,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StringDecimal) Reset() { + *x = StringDecimal{} + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StringDecimal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringDecimal) ProtoMessage() {} + +func (x *StringDecimal) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringDecimal.ProtoReflect.Descriptor instead. +func (*StringDecimal) Descriptor() ([]byte, []int) { + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{2} +} + +func (x *StringDecimal) GetVal() string { + if x != nil { + return x.Val + } + return "" +} + +type StringDecimalPrecision struct { + state protoimpl.MessageState `protogen:"open.v1"` + Val string `protobuf:"bytes,1,opt,name=val,proto3" json:"val,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StringDecimalPrecision) Reset() { + *x = StringDecimalPrecision{} + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StringDecimalPrecision) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringDecimalPrecision) ProtoMessage() {} + +func (x *StringDecimalPrecision) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringDecimalPrecision.ProtoReflect.Descriptor instead. +func (*StringDecimalPrecision) Descriptor() ([]byte, []int) { + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{3} +} + +func (x *StringDecimalPrecision) GetVal() string { + if x != nil { + return x.Val + } + return "" +} + +type StringDecimalScale struct { + state protoimpl.MessageState `protogen:"open.v1"` + Val string `protobuf:"bytes,1,opt,name=val,proto3" json:"val,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StringDecimalScale) Reset() { + *x = StringDecimalScale{} + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StringDecimalScale) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringDecimalScale) ProtoMessage() {} + +func (x *StringDecimalScale) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringDecimalScale.ProtoReflect.Descriptor instead. +func (*StringDecimalScale) Descriptor() ([]byte, []int) { + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{4} +} + +func (x *StringDecimalScale) GetVal() string { + if x != nil { + return x.Val + } + return "" +} + +type StringDecimalPrecisionScale struct { + state protoimpl.MessageState `protogen:"open.v1"` + Val string `protobuf:"bytes,1,opt,name=val,proto3" json:"val,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StringDecimalPrecisionScale) Reset() { + *x = StringDecimalPrecisionScale{} + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StringDecimalPrecisionScale) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringDecimalPrecisionScale) ProtoMessage() {} + +func (x *StringDecimalPrecisionScale) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringDecimalPrecisionScale.ProtoReflect.Descriptor instead. +func (*StringDecimalPrecisionScale) Descriptor() ([]byte, []int) { + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{5} +} + +func (x *StringDecimalPrecisionScale) GetVal() string { + if x != nil { + return x.Val + } + return "" +} + type StringIn struct { state protoimpl.MessageState `protogen:"open.v1"` Val string `protobuf:"bytes,1,opt,name=val,proto3" json:"val,omitempty"` @@ -133,7 +309,7 @@ type StringIn struct { func (x *StringIn) Reset() { *x = StringIn{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[2] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -145,7 +321,7 @@ func (x *StringIn) String() string { func (*StringIn) ProtoMessage() {} func (x *StringIn) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[2] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -158,7 +334,7 @@ func (x *StringIn) ProtoReflect() protoreflect.Message { // Deprecated: Use StringIn.ProtoReflect.Descriptor instead. func (*StringIn) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{2} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{6} } func (x *StringIn) GetVal() string { @@ -177,7 +353,7 @@ type StringNotIn struct { func (x *StringNotIn) Reset() { *x = StringNotIn{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[3] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -189,7 +365,7 @@ func (x *StringNotIn) String() string { func (*StringNotIn) ProtoMessage() {} func (x *StringNotIn) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[3] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -202,7 +378,7 @@ func (x *StringNotIn) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotIn.ProtoReflect.Descriptor instead. func (*StringNotIn) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{3} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{7} } func (x *StringNotIn) GetVal() string { @@ -221,7 +397,7 @@ type StringLen struct { func (x *StringLen) Reset() { *x = StringLen{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[4] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -233,7 +409,7 @@ func (x *StringLen) String() string { func (*StringLen) ProtoMessage() {} func (x *StringLen) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[4] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -246,7 +422,7 @@ func (x *StringLen) ProtoReflect() protoreflect.Message { // Deprecated: Use StringLen.ProtoReflect.Descriptor instead. func (*StringLen) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{4} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{8} } func (x *StringLen) GetVal() string { @@ -265,7 +441,7 @@ type StringMinLen struct { func (x *StringMinLen) Reset() { *x = StringMinLen{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[5] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -277,7 +453,7 @@ func (x *StringMinLen) String() string { func (*StringMinLen) ProtoMessage() {} func (x *StringMinLen) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[5] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -290,7 +466,7 @@ func (x *StringMinLen) ProtoReflect() protoreflect.Message { // Deprecated: Use StringMinLen.ProtoReflect.Descriptor instead. func (*StringMinLen) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{5} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{9} } func (x *StringMinLen) GetVal() string { @@ -309,7 +485,7 @@ type StringMaxLen struct { func (x *StringMaxLen) Reset() { *x = StringMaxLen{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[6] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -321,7 +497,7 @@ func (x *StringMaxLen) String() string { func (*StringMaxLen) ProtoMessage() {} func (x *StringMaxLen) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[6] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -334,7 +510,7 @@ func (x *StringMaxLen) ProtoReflect() protoreflect.Message { // Deprecated: Use StringMaxLen.ProtoReflect.Descriptor instead. func (*StringMaxLen) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{6} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{10} } func (x *StringMaxLen) GetVal() string { @@ -353,7 +529,7 @@ type StringMinMaxLen struct { func (x *StringMinMaxLen) Reset() { *x = StringMinMaxLen{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[7] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -365,7 +541,7 @@ func (x *StringMinMaxLen) String() string { func (*StringMinMaxLen) ProtoMessage() {} func (x *StringMinMaxLen) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[7] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -378,7 +554,7 @@ func (x *StringMinMaxLen) ProtoReflect() protoreflect.Message { // Deprecated: Use StringMinMaxLen.ProtoReflect.Descriptor instead. func (*StringMinMaxLen) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{7} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{11} } func (x *StringMinMaxLen) GetVal() string { @@ -397,7 +573,7 @@ type StringEqualMinMaxLen struct { func (x *StringEqualMinMaxLen) Reset() { *x = StringEqualMinMaxLen{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[8] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -409,7 +585,7 @@ func (x *StringEqualMinMaxLen) String() string { func (*StringEqualMinMaxLen) ProtoMessage() {} func (x *StringEqualMinMaxLen) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[8] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -422,7 +598,7 @@ func (x *StringEqualMinMaxLen) ProtoReflect() protoreflect.Message { // Deprecated: Use StringEqualMinMaxLen.ProtoReflect.Descriptor instead. func (*StringEqualMinMaxLen) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{8} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{12} } func (x *StringEqualMinMaxLen) GetVal() string { @@ -441,7 +617,7 @@ type StringLenBytes struct { func (x *StringLenBytes) Reset() { *x = StringLenBytes{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[9] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -453,7 +629,7 @@ func (x *StringLenBytes) String() string { func (*StringLenBytes) ProtoMessage() {} func (x *StringLenBytes) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[9] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -466,7 +642,7 @@ func (x *StringLenBytes) ProtoReflect() protoreflect.Message { // Deprecated: Use StringLenBytes.ProtoReflect.Descriptor instead. func (*StringLenBytes) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{9} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{13} } func (x *StringLenBytes) GetVal() string { @@ -485,7 +661,7 @@ type StringMinBytes struct { func (x *StringMinBytes) Reset() { *x = StringMinBytes{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[10] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -497,7 +673,7 @@ func (x *StringMinBytes) String() string { func (*StringMinBytes) ProtoMessage() {} func (x *StringMinBytes) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[10] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -510,7 +686,7 @@ func (x *StringMinBytes) ProtoReflect() protoreflect.Message { // Deprecated: Use StringMinBytes.ProtoReflect.Descriptor instead. func (*StringMinBytes) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{10} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{14} } func (x *StringMinBytes) GetVal() string { @@ -529,7 +705,7 @@ type StringMaxBytes struct { func (x *StringMaxBytes) Reset() { *x = StringMaxBytes{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[11] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -541,7 +717,7 @@ func (x *StringMaxBytes) String() string { func (*StringMaxBytes) ProtoMessage() {} func (x *StringMaxBytes) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[11] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -554,7 +730,7 @@ func (x *StringMaxBytes) ProtoReflect() protoreflect.Message { // Deprecated: Use StringMaxBytes.ProtoReflect.Descriptor instead. func (*StringMaxBytes) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{11} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{15} } func (x *StringMaxBytes) GetVal() string { @@ -573,7 +749,7 @@ type StringMinMaxBytes struct { func (x *StringMinMaxBytes) Reset() { *x = StringMinMaxBytes{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[12] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -585,7 +761,7 @@ func (x *StringMinMaxBytes) String() string { func (*StringMinMaxBytes) ProtoMessage() {} func (x *StringMinMaxBytes) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[12] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -598,7 +774,7 @@ func (x *StringMinMaxBytes) ProtoReflect() protoreflect.Message { // Deprecated: Use StringMinMaxBytes.ProtoReflect.Descriptor instead. func (*StringMinMaxBytes) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{12} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{16} } func (x *StringMinMaxBytes) GetVal() string { @@ -617,7 +793,7 @@ type StringEqualMinMaxBytes struct { func (x *StringEqualMinMaxBytes) Reset() { *x = StringEqualMinMaxBytes{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[13] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -629,7 +805,7 @@ func (x *StringEqualMinMaxBytes) String() string { func (*StringEqualMinMaxBytes) ProtoMessage() {} func (x *StringEqualMinMaxBytes) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[13] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -642,7 +818,7 @@ func (x *StringEqualMinMaxBytes) ProtoReflect() protoreflect.Message { // Deprecated: Use StringEqualMinMaxBytes.ProtoReflect.Descriptor instead. func (*StringEqualMinMaxBytes) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{13} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{17} } func (x *StringEqualMinMaxBytes) GetVal() string { @@ -661,7 +837,7 @@ type StringPattern struct { func (x *StringPattern) Reset() { *x = StringPattern{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[14] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -673,7 +849,7 @@ func (x *StringPattern) String() string { func (*StringPattern) ProtoMessage() {} func (x *StringPattern) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[14] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -686,7 +862,7 @@ func (x *StringPattern) ProtoReflect() protoreflect.Message { // Deprecated: Use StringPattern.ProtoReflect.Descriptor instead. func (*StringPattern) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{14} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{18} } func (x *StringPattern) GetVal() string { @@ -705,7 +881,7 @@ type StringPatternEscapes struct { func (x *StringPatternEscapes) Reset() { *x = StringPatternEscapes{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[15] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -717,7 +893,7 @@ func (x *StringPatternEscapes) String() string { func (*StringPatternEscapes) ProtoMessage() {} func (x *StringPatternEscapes) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[15] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -730,7 +906,7 @@ func (x *StringPatternEscapes) ProtoReflect() protoreflect.Message { // Deprecated: Use StringPatternEscapes.ProtoReflect.Descriptor instead. func (*StringPatternEscapes) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{15} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{19} } func (x *StringPatternEscapes) GetVal() string { @@ -749,7 +925,7 @@ type StringPrefix struct { func (x *StringPrefix) Reset() { *x = StringPrefix{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[16] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -761,7 +937,7 @@ func (x *StringPrefix) String() string { func (*StringPrefix) ProtoMessage() {} func (x *StringPrefix) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[16] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -774,7 +950,7 @@ func (x *StringPrefix) ProtoReflect() protoreflect.Message { // Deprecated: Use StringPrefix.ProtoReflect.Descriptor instead. func (*StringPrefix) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{16} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{20} } func (x *StringPrefix) GetVal() string { @@ -793,7 +969,7 @@ type StringContains struct { func (x *StringContains) Reset() { *x = StringContains{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[17] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -805,7 +981,7 @@ func (x *StringContains) String() string { func (*StringContains) ProtoMessage() {} func (x *StringContains) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[17] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -818,7 +994,7 @@ func (x *StringContains) ProtoReflect() protoreflect.Message { // Deprecated: Use StringContains.ProtoReflect.Descriptor instead. func (*StringContains) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{17} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{21} } func (x *StringContains) GetVal() string { @@ -837,7 +1013,7 @@ type StringNotContains struct { func (x *StringNotContains) Reset() { *x = StringNotContains{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[18] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -849,7 +1025,7 @@ func (x *StringNotContains) String() string { func (*StringNotContains) ProtoMessage() {} func (x *StringNotContains) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[18] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -862,7 +1038,7 @@ func (x *StringNotContains) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotContains.ProtoReflect.Descriptor instead. func (*StringNotContains) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{18} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{22} } func (x *StringNotContains) GetVal() string { @@ -881,7 +1057,7 @@ type StringSuffix struct { func (x *StringSuffix) Reset() { *x = StringSuffix{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[19] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -893,7 +1069,7 @@ func (x *StringSuffix) String() string { func (*StringSuffix) ProtoMessage() {} func (x *StringSuffix) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[19] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -906,7 +1082,7 @@ func (x *StringSuffix) ProtoReflect() protoreflect.Message { // Deprecated: Use StringSuffix.ProtoReflect.Descriptor instead. func (*StringSuffix) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{19} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{23} } func (x *StringSuffix) GetVal() string { @@ -925,7 +1101,7 @@ type StringEmail struct { func (x *StringEmail) Reset() { *x = StringEmail{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[20] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -937,7 +1113,7 @@ func (x *StringEmail) String() string { func (*StringEmail) ProtoMessage() {} func (x *StringEmail) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[20] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -950,7 +1126,7 @@ func (x *StringEmail) ProtoReflect() protoreflect.Message { // Deprecated: Use StringEmail.ProtoReflect.Descriptor instead. func (*StringEmail) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{20} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{24} } func (x *StringEmail) GetVal() string { @@ -969,7 +1145,7 @@ type StringNotEmail struct { func (x *StringNotEmail) Reset() { *x = StringNotEmail{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[21] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -981,7 +1157,7 @@ func (x *StringNotEmail) String() string { func (*StringNotEmail) ProtoMessage() {} func (x *StringNotEmail) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[21] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -994,7 +1170,7 @@ func (x *StringNotEmail) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotEmail.ProtoReflect.Descriptor instead. func (*StringNotEmail) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{21} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{25} } func (x *StringNotEmail) GetVal() string { @@ -1013,7 +1189,7 @@ type StringAddress struct { func (x *StringAddress) Reset() { *x = StringAddress{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[22] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1025,7 +1201,7 @@ func (x *StringAddress) String() string { func (*StringAddress) ProtoMessage() {} func (x *StringAddress) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[22] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1038,7 +1214,7 @@ func (x *StringAddress) ProtoReflect() protoreflect.Message { // Deprecated: Use StringAddress.ProtoReflect.Descriptor instead. func (*StringAddress) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{22} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{26} } func (x *StringAddress) GetVal() string { @@ -1057,7 +1233,7 @@ type StringNotAddress struct { func (x *StringNotAddress) Reset() { *x = StringNotAddress{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[23] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1069,7 +1245,7 @@ func (x *StringNotAddress) String() string { func (*StringNotAddress) ProtoMessage() {} func (x *StringNotAddress) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[23] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1082,7 +1258,7 @@ func (x *StringNotAddress) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotAddress.ProtoReflect.Descriptor instead. func (*StringNotAddress) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{23} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{27} } func (x *StringNotAddress) GetVal() string { @@ -1101,7 +1277,7 @@ type StringHostname struct { func (x *StringHostname) Reset() { *x = StringHostname{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[24] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1113,7 +1289,7 @@ func (x *StringHostname) String() string { func (*StringHostname) ProtoMessage() {} func (x *StringHostname) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[24] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1126,7 +1302,7 @@ func (x *StringHostname) ProtoReflect() protoreflect.Message { // Deprecated: Use StringHostname.ProtoReflect.Descriptor instead. func (*StringHostname) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{24} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{28} } func (x *StringHostname) GetVal() string { @@ -1145,7 +1321,7 @@ type StringNotHostname struct { func (x *StringNotHostname) Reset() { *x = StringNotHostname{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[25] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1157,7 +1333,7 @@ func (x *StringNotHostname) String() string { func (*StringNotHostname) ProtoMessage() {} func (x *StringNotHostname) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[25] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1170,7 +1346,7 @@ func (x *StringNotHostname) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotHostname.ProtoReflect.Descriptor instead. func (*StringNotHostname) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{25} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{29} } func (x *StringNotHostname) GetVal() string { @@ -1189,7 +1365,7 @@ type StringIP struct { func (x *StringIP) Reset() { *x = StringIP{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[26] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1201,7 +1377,7 @@ func (x *StringIP) String() string { func (*StringIP) ProtoMessage() {} func (x *StringIP) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[26] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1214,7 +1390,7 @@ func (x *StringIP) ProtoReflect() protoreflect.Message { // Deprecated: Use StringIP.ProtoReflect.Descriptor instead. func (*StringIP) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{26} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{30} } func (x *StringIP) GetVal() string { @@ -1233,7 +1409,7 @@ type StringNotIP struct { func (x *StringNotIP) Reset() { *x = StringNotIP{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[27] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1245,7 +1421,7 @@ func (x *StringNotIP) String() string { func (*StringNotIP) ProtoMessage() {} func (x *StringNotIP) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[27] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1258,7 +1434,7 @@ func (x *StringNotIP) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotIP.ProtoReflect.Descriptor instead. func (*StringNotIP) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{27} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{31} } func (x *StringNotIP) GetVal() string { @@ -1277,7 +1453,7 @@ type StringIPv4 struct { func (x *StringIPv4) Reset() { *x = StringIPv4{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[28] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1289,7 +1465,7 @@ func (x *StringIPv4) String() string { func (*StringIPv4) ProtoMessage() {} func (x *StringIPv4) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[28] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1302,7 +1478,7 @@ func (x *StringIPv4) ProtoReflect() protoreflect.Message { // Deprecated: Use StringIPv4.ProtoReflect.Descriptor instead. func (*StringIPv4) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{28} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{32} } func (x *StringIPv4) GetVal() string { @@ -1321,7 +1497,7 @@ type StringNotIPv4 struct { func (x *StringNotIPv4) Reset() { *x = StringNotIPv4{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[29] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1333,7 +1509,7 @@ func (x *StringNotIPv4) String() string { func (*StringNotIPv4) ProtoMessage() {} func (x *StringNotIPv4) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[29] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1346,7 +1522,7 @@ func (x *StringNotIPv4) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotIPv4.ProtoReflect.Descriptor instead. func (*StringNotIPv4) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{29} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{33} } func (x *StringNotIPv4) GetVal() string { @@ -1365,7 +1541,7 @@ type StringIPv6 struct { func (x *StringIPv6) Reset() { *x = StringIPv6{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[30] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1377,7 +1553,7 @@ func (x *StringIPv6) String() string { func (*StringIPv6) ProtoMessage() {} func (x *StringIPv6) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[30] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1390,7 +1566,7 @@ func (x *StringIPv6) ProtoReflect() protoreflect.Message { // Deprecated: Use StringIPv6.ProtoReflect.Descriptor instead. func (*StringIPv6) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{30} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{34} } func (x *StringIPv6) GetVal() string { @@ -1409,7 +1585,7 @@ type StringNotIPv6 struct { func (x *StringNotIPv6) Reset() { *x = StringNotIPv6{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[31] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1421,7 +1597,7 @@ func (x *StringNotIPv6) String() string { func (*StringNotIPv6) ProtoMessage() {} func (x *StringNotIPv6) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[31] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1434,7 +1610,7 @@ func (x *StringNotIPv6) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotIPv6.ProtoReflect.Descriptor instead. func (*StringNotIPv6) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{31} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{35} } func (x *StringNotIPv6) GetVal() string { @@ -1453,7 +1629,7 @@ type StringIPWithPrefixLen struct { func (x *StringIPWithPrefixLen) Reset() { *x = StringIPWithPrefixLen{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[32] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1465,7 +1641,7 @@ func (x *StringIPWithPrefixLen) String() string { func (*StringIPWithPrefixLen) ProtoMessage() {} func (x *StringIPWithPrefixLen) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[32] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1478,7 +1654,7 @@ func (x *StringIPWithPrefixLen) ProtoReflect() protoreflect.Message { // Deprecated: Use StringIPWithPrefixLen.ProtoReflect.Descriptor instead. func (*StringIPWithPrefixLen) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{32} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{36} } func (x *StringIPWithPrefixLen) GetVal() string { @@ -1497,7 +1673,7 @@ type StringNotIPWithPrefixLen struct { func (x *StringNotIPWithPrefixLen) Reset() { *x = StringNotIPWithPrefixLen{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[33] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1509,7 +1685,7 @@ func (x *StringNotIPWithPrefixLen) String() string { func (*StringNotIPWithPrefixLen) ProtoMessage() {} func (x *StringNotIPWithPrefixLen) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[33] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1522,7 +1698,7 @@ func (x *StringNotIPWithPrefixLen) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotIPWithPrefixLen.ProtoReflect.Descriptor instead. func (*StringNotIPWithPrefixLen) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{33} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{37} } func (x *StringNotIPWithPrefixLen) GetVal() string { @@ -1541,7 +1717,7 @@ type StringIPv4WithPrefixLen struct { func (x *StringIPv4WithPrefixLen) Reset() { *x = StringIPv4WithPrefixLen{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[34] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1553,7 +1729,7 @@ func (x *StringIPv4WithPrefixLen) String() string { func (*StringIPv4WithPrefixLen) ProtoMessage() {} func (x *StringIPv4WithPrefixLen) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[34] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1566,7 +1742,7 @@ func (x *StringIPv4WithPrefixLen) ProtoReflect() protoreflect.Message { // Deprecated: Use StringIPv4WithPrefixLen.ProtoReflect.Descriptor instead. func (*StringIPv4WithPrefixLen) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{34} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{38} } func (x *StringIPv4WithPrefixLen) GetVal() string { @@ -1585,7 +1761,7 @@ type StringNotIPv4WithPrefixLen struct { func (x *StringNotIPv4WithPrefixLen) Reset() { *x = StringNotIPv4WithPrefixLen{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[35] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1597,7 +1773,7 @@ func (x *StringNotIPv4WithPrefixLen) String() string { func (*StringNotIPv4WithPrefixLen) ProtoMessage() {} func (x *StringNotIPv4WithPrefixLen) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[35] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1610,7 +1786,7 @@ func (x *StringNotIPv4WithPrefixLen) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotIPv4WithPrefixLen.ProtoReflect.Descriptor instead. func (*StringNotIPv4WithPrefixLen) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{35} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{39} } func (x *StringNotIPv4WithPrefixLen) GetVal() string { @@ -1629,7 +1805,7 @@ type StringIPv6WithPrefixLen struct { func (x *StringIPv6WithPrefixLen) Reset() { *x = StringIPv6WithPrefixLen{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[36] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1641,7 +1817,7 @@ func (x *StringIPv6WithPrefixLen) String() string { func (*StringIPv6WithPrefixLen) ProtoMessage() {} func (x *StringIPv6WithPrefixLen) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[36] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1654,7 +1830,7 @@ func (x *StringIPv6WithPrefixLen) ProtoReflect() protoreflect.Message { // Deprecated: Use StringIPv6WithPrefixLen.ProtoReflect.Descriptor instead. func (*StringIPv6WithPrefixLen) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{36} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{40} } func (x *StringIPv6WithPrefixLen) GetVal() string { @@ -1673,7 +1849,7 @@ type StringNotIPv6WithPrefixLen struct { func (x *StringNotIPv6WithPrefixLen) Reset() { *x = StringNotIPv6WithPrefixLen{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[37] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1685,7 +1861,7 @@ func (x *StringNotIPv6WithPrefixLen) String() string { func (*StringNotIPv6WithPrefixLen) ProtoMessage() {} func (x *StringNotIPv6WithPrefixLen) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[37] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1698,7 +1874,7 @@ func (x *StringNotIPv6WithPrefixLen) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotIPv6WithPrefixLen.ProtoReflect.Descriptor instead. func (*StringNotIPv6WithPrefixLen) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{37} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{41} } func (x *StringNotIPv6WithPrefixLen) GetVal() string { @@ -1717,7 +1893,7 @@ type StringIPPrefix struct { func (x *StringIPPrefix) Reset() { *x = StringIPPrefix{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[38] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1729,7 +1905,7 @@ func (x *StringIPPrefix) String() string { func (*StringIPPrefix) ProtoMessage() {} func (x *StringIPPrefix) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[38] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1742,7 +1918,7 @@ func (x *StringIPPrefix) ProtoReflect() protoreflect.Message { // Deprecated: Use StringIPPrefix.ProtoReflect.Descriptor instead. func (*StringIPPrefix) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{38} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{42} } func (x *StringIPPrefix) GetVal() string { @@ -1761,7 +1937,7 @@ type StringNotIPPrefix struct { func (x *StringNotIPPrefix) Reset() { *x = StringNotIPPrefix{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[39] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1773,7 +1949,7 @@ func (x *StringNotIPPrefix) String() string { func (*StringNotIPPrefix) ProtoMessage() {} func (x *StringNotIPPrefix) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[39] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1786,7 +1962,7 @@ func (x *StringNotIPPrefix) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotIPPrefix.ProtoReflect.Descriptor instead. func (*StringNotIPPrefix) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{39} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{43} } func (x *StringNotIPPrefix) GetVal() string { @@ -1805,7 +1981,7 @@ type StringIPv4Prefix struct { func (x *StringIPv4Prefix) Reset() { *x = StringIPv4Prefix{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[40] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1817,7 +1993,7 @@ func (x *StringIPv4Prefix) String() string { func (*StringIPv4Prefix) ProtoMessage() {} func (x *StringIPv4Prefix) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[40] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1830,7 +2006,7 @@ func (x *StringIPv4Prefix) ProtoReflect() protoreflect.Message { // Deprecated: Use StringIPv4Prefix.ProtoReflect.Descriptor instead. func (*StringIPv4Prefix) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{40} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{44} } func (x *StringIPv4Prefix) GetVal() string { @@ -1849,7 +2025,7 @@ type StringNotIPv4Prefix struct { func (x *StringNotIPv4Prefix) Reset() { *x = StringNotIPv4Prefix{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[41] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1861,7 +2037,7 @@ func (x *StringNotIPv4Prefix) String() string { func (*StringNotIPv4Prefix) ProtoMessage() {} func (x *StringNotIPv4Prefix) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[41] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1874,7 +2050,7 @@ func (x *StringNotIPv4Prefix) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotIPv4Prefix.ProtoReflect.Descriptor instead. func (*StringNotIPv4Prefix) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{41} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{45} } func (x *StringNotIPv4Prefix) GetVal() string { @@ -1893,7 +2069,7 @@ type StringIPv6Prefix struct { func (x *StringIPv6Prefix) Reset() { *x = StringIPv6Prefix{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[42] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1905,7 +2081,7 @@ func (x *StringIPv6Prefix) String() string { func (*StringIPv6Prefix) ProtoMessage() {} func (x *StringIPv6Prefix) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[42] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1918,7 +2094,7 @@ func (x *StringIPv6Prefix) ProtoReflect() protoreflect.Message { // Deprecated: Use StringIPv6Prefix.ProtoReflect.Descriptor instead. func (*StringIPv6Prefix) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{42} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{46} } func (x *StringIPv6Prefix) GetVal() string { @@ -1937,7 +2113,7 @@ type StringNotIPv6Prefix struct { func (x *StringNotIPv6Prefix) Reset() { *x = StringNotIPv6Prefix{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[43] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1949,7 +2125,7 @@ func (x *StringNotIPv6Prefix) String() string { func (*StringNotIPv6Prefix) ProtoMessage() {} func (x *StringNotIPv6Prefix) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[43] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1962,7 +2138,7 @@ func (x *StringNotIPv6Prefix) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotIPv6Prefix.ProtoReflect.Descriptor instead. func (*StringNotIPv6Prefix) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{43} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{47} } func (x *StringNotIPv6Prefix) GetVal() string { @@ -1981,7 +2157,7 @@ type StringURI struct { func (x *StringURI) Reset() { *x = StringURI{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[44] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1993,7 +2169,7 @@ func (x *StringURI) String() string { func (*StringURI) ProtoMessage() {} func (x *StringURI) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[44] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2006,7 +2182,7 @@ func (x *StringURI) ProtoReflect() protoreflect.Message { // Deprecated: Use StringURI.ProtoReflect.Descriptor instead. func (*StringURI) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{44} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{48} } func (x *StringURI) GetVal() string { @@ -2025,7 +2201,7 @@ type StringNotURI struct { func (x *StringNotURI) Reset() { *x = StringNotURI{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[45] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2037,7 +2213,7 @@ func (x *StringNotURI) String() string { func (*StringNotURI) ProtoMessage() {} func (x *StringNotURI) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[45] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2050,7 +2226,7 @@ func (x *StringNotURI) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotURI.ProtoReflect.Descriptor instead. func (*StringNotURI) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{45} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{49} } func (x *StringNotURI) GetVal() string { @@ -2069,7 +2245,7 @@ type StringURIRef struct { func (x *StringURIRef) Reset() { *x = StringURIRef{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[46] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2081,7 +2257,7 @@ func (x *StringURIRef) String() string { func (*StringURIRef) ProtoMessage() {} func (x *StringURIRef) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[46] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2094,7 +2270,7 @@ func (x *StringURIRef) ProtoReflect() protoreflect.Message { // Deprecated: Use StringURIRef.ProtoReflect.Descriptor instead. func (*StringURIRef) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{46} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{50} } func (x *StringURIRef) GetVal() string { @@ -2113,7 +2289,7 @@ type StringNotURIRef struct { func (x *StringNotURIRef) Reset() { *x = StringNotURIRef{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[47] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2125,7 +2301,7 @@ func (x *StringNotURIRef) String() string { func (*StringNotURIRef) ProtoMessage() {} func (x *StringNotURIRef) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[47] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2138,7 +2314,7 @@ func (x *StringNotURIRef) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotURIRef.ProtoReflect.Descriptor instead. func (*StringNotURIRef) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{47} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{51} } func (x *StringNotURIRef) GetVal() string { @@ -2157,7 +2333,7 @@ type StringUUID struct { func (x *StringUUID) Reset() { *x = StringUUID{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[48] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2169,7 +2345,7 @@ func (x *StringUUID) String() string { func (*StringUUID) ProtoMessage() {} func (x *StringUUID) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[48] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2182,7 +2358,7 @@ func (x *StringUUID) ProtoReflect() protoreflect.Message { // Deprecated: Use StringUUID.ProtoReflect.Descriptor instead. func (*StringUUID) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{48} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{52} } func (x *StringUUID) GetVal() string { @@ -2201,7 +2377,7 @@ type StringNotUUID struct { func (x *StringNotUUID) Reset() { *x = StringNotUUID{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[49] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2213,7 +2389,7 @@ func (x *StringNotUUID) String() string { func (*StringNotUUID) ProtoMessage() {} func (x *StringNotUUID) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[49] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2226,7 +2402,7 @@ func (x *StringNotUUID) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotUUID.ProtoReflect.Descriptor instead. func (*StringNotUUID) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{49} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{53} } func (x *StringNotUUID) GetVal() string { @@ -2245,7 +2421,7 @@ type StringTUUID struct { func (x *StringTUUID) Reset() { *x = StringTUUID{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[50] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2257,7 +2433,7 @@ func (x *StringTUUID) String() string { func (*StringTUUID) ProtoMessage() {} func (x *StringTUUID) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[50] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2270,7 +2446,7 @@ func (x *StringTUUID) ProtoReflect() protoreflect.Message { // Deprecated: Use StringTUUID.ProtoReflect.Descriptor instead. func (*StringTUUID) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{50} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{54} } func (x *StringTUUID) GetVal() string { @@ -2289,7 +2465,7 @@ type StringNotTUUID struct { func (x *StringNotTUUID) Reset() { *x = StringNotTUUID{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[51] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2301,7 +2477,7 @@ func (x *StringNotTUUID) String() string { func (*StringNotTUUID) ProtoMessage() {} func (x *StringNotTUUID) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[51] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2314,7 +2490,7 @@ func (x *StringNotTUUID) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotTUUID.ProtoReflect.Descriptor instead. func (*StringNotTUUID) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{51} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{55} } func (x *StringNotTUUID) GetVal() string { @@ -2333,7 +2509,7 @@ type StringULID struct { func (x *StringULID) Reset() { *x = StringULID{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[52] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2345,7 +2521,7 @@ func (x *StringULID) String() string { func (*StringULID) ProtoMessage() {} func (x *StringULID) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[52] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2358,7 +2534,7 @@ func (x *StringULID) ProtoReflect() protoreflect.Message { // Deprecated: Use StringULID.ProtoReflect.Descriptor instead. func (*StringULID) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{52} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{56} } func (x *StringULID) GetVal() string { @@ -2377,7 +2553,7 @@ type StringNotULID struct { func (x *StringNotULID) Reset() { *x = StringNotULID{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[53] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2389,7 +2565,7 @@ func (x *StringNotULID) String() string { func (*StringNotULID) ProtoMessage() {} func (x *StringNotULID) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[53] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2402,7 +2578,7 @@ func (x *StringNotULID) ProtoReflect() protoreflect.Message { // Deprecated: Use StringNotULID.ProtoReflect.Descriptor instead. func (*StringNotULID) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{53} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{57} } func (x *StringNotULID) GetVal() string { @@ -2421,7 +2597,7 @@ type StringULIDIgnore struct { func (x *StringULIDIgnore) Reset() { *x = StringULIDIgnore{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[54] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2433,7 +2609,7 @@ func (x *StringULIDIgnore) String() string { func (*StringULIDIgnore) ProtoMessage() {} func (x *StringULIDIgnore) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[54] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2446,7 +2622,7 @@ func (x *StringULIDIgnore) ProtoReflect() protoreflect.Message { // Deprecated: Use StringULIDIgnore.ProtoReflect.Descriptor instead. func (*StringULIDIgnore) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{54} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{58} } func (x *StringULIDIgnore) GetVal() string { @@ -2465,7 +2641,7 @@ type StringHttpHeaderName struct { func (x *StringHttpHeaderName) Reset() { *x = StringHttpHeaderName{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[55] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2477,7 +2653,7 @@ func (x *StringHttpHeaderName) String() string { func (*StringHttpHeaderName) ProtoMessage() {} func (x *StringHttpHeaderName) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[55] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2490,7 +2666,7 @@ func (x *StringHttpHeaderName) ProtoReflect() protoreflect.Message { // Deprecated: Use StringHttpHeaderName.ProtoReflect.Descriptor instead. func (*StringHttpHeaderName) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{55} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{59} } func (x *StringHttpHeaderName) GetVal() string { @@ -2509,7 +2685,7 @@ type StringHttpHeaderValue struct { func (x *StringHttpHeaderValue) Reset() { *x = StringHttpHeaderValue{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[56] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2521,7 +2697,7 @@ func (x *StringHttpHeaderValue) String() string { func (*StringHttpHeaderValue) ProtoMessage() {} func (x *StringHttpHeaderValue) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[56] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2534,7 +2710,7 @@ func (x *StringHttpHeaderValue) ProtoReflect() protoreflect.Message { // Deprecated: Use StringHttpHeaderValue.ProtoReflect.Descriptor instead. func (*StringHttpHeaderValue) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{56} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{60} } func (x *StringHttpHeaderValue) GetVal() string { @@ -2553,7 +2729,7 @@ type StringHttpHeaderNameLoose struct { func (x *StringHttpHeaderNameLoose) Reset() { *x = StringHttpHeaderNameLoose{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[57] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2565,7 +2741,7 @@ func (x *StringHttpHeaderNameLoose) String() string { func (*StringHttpHeaderNameLoose) ProtoMessage() {} func (x *StringHttpHeaderNameLoose) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[57] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2578,7 +2754,7 @@ func (x *StringHttpHeaderNameLoose) ProtoReflect() protoreflect.Message { // Deprecated: Use StringHttpHeaderNameLoose.ProtoReflect.Descriptor instead. func (*StringHttpHeaderNameLoose) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{57} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{61} } func (x *StringHttpHeaderNameLoose) GetVal() string { @@ -2597,7 +2773,7 @@ type StringHttpHeaderValueLoose struct { func (x *StringHttpHeaderValueLoose) Reset() { *x = StringHttpHeaderValueLoose{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[58] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2609,7 +2785,7 @@ func (x *StringHttpHeaderValueLoose) String() string { func (*StringHttpHeaderValueLoose) ProtoMessage() {} func (x *StringHttpHeaderValueLoose) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[58] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2622,7 +2798,7 @@ func (x *StringHttpHeaderValueLoose) ProtoReflect() protoreflect.Message { // Deprecated: Use StringHttpHeaderValueLoose.ProtoReflect.Descriptor instead. func (*StringHttpHeaderValueLoose) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{58} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{62} } func (x *StringHttpHeaderValueLoose) GetVal() string { @@ -2641,7 +2817,7 @@ type StringUUIDIgnore struct { func (x *StringUUIDIgnore) Reset() { *x = StringUUIDIgnore{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[59] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2653,7 +2829,7 @@ func (x *StringUUIDIgnore) String() string { func (*StringUUIDIgnore) ProtoMessage() {} func (x *StringUUIDIgnore) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[59] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2666,7 +2842,7 @@ func (x *StringUUIDIgnore) ProtoReflect() protoreflect.Message { // Deprecated: Use StringUUIDIgnore.ProtoReflect.Descriptor instead. func (*StringUUIDIgnore) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{59} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{63} } func (x *StringUUIDIgnore) GetVal() string { @@ -2688,7 +2864,7 @@ type StringInOneof struct { func (x *StringInOneof) Reset() { *x = StringInOneof{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[60] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2700,7 +2876,7 @@ func (x *StringInOneof) String() string { func (*StringInOneof) ProtoMessage() {} func (x *StringInOneof) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[60] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2713,7 +2889,7 @@ func (x *StringInOneof) ProtoReflect() protoreflect.Message { // Deprecated: Use StringInOneof.ProtoReflect.Descriptor instead. func (*StringInOneof) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{60} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{64} } func (x *StringInOneof) GetFoo() isStringInOneof_Foo { @@ -2751,7 +2927,7 @@ type StringHostAndPort struct { func (x *StringHostAndPort) Reset() { *x = StringHostAndPort{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[61] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2763,7 +2939,7 @@ func (x *StringHostAndPort) String() string { func (*StringHostAndPort) ProtoMessage() {} func (x *StringHostAndPort) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[61] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2776,7 +2952,7 @@ func (x *StringHostAndPort) ProtoReflect() protoreflect.Message { // Deprecated: Use StringHostAndPort.ProtoReflect.Descriptor instead. func (*StringHostAndPort) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{61} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{65} } func (x *StringHostAndPort) GetVal() string { @@ -2795,7 +2971,7 @@ type StringHostAndOptionalPort struct { func (x *StringHostAndOptionalPort) Reset() { *x = StringHostAndOptionalPort{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[62] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2807,7 +2983,7 @@ func (x *StringHostAndOptionalPort) String() string { func (*StringHostAndOptionalPort) ProtoMessage() {} func (x *StringHostAndOptionalPort) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[62] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2820,7 +2996,7 @@ func (x *StringHostAndOptionalPort) ProtoReflect() protoreflect.Message { // Deprecated: Use StringHostAndOptionalPort.ProtoReflect.Descriptor instead. func (*StringHostAndOptionalPort) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{62} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{66} } func (x *StringHostAndOptionalPort) GetVal() string { @@ -2839,7 +3015,7 @@ type StringExample struct { func (x *StringExample) Reset() { *x = StringExample{} - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[63] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2851,7 +3027,7 @@ func (x *StringExample) String() string { func (*StringExample) ProtoMessage() {} func (x *StringExample) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[63] + mi := &file_buf_validate_conformance_cases_strings_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2864,7 +3040,7 @@ func (x *StringExample) ProtoReflect() protoreflect.Message { // Deprecated: Use StringExample.ProtoReflect.Descriptor instead. func (*StringExample) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{63} + return file_buf_validate_conformance_cases_strings_proto_rawDescGZIP(), []int{67} } func (x *StringExample) GetVal() string { @@ -2885,7 +3061,17 @@ const file_buf_validate_conformance_cases_strings_proto_rawDesc = "" + "\vStringConst\x12\x1c\n" + "\x03val\x18\x01 \x01(\tB\n" + "\xbaH\ar\x05\n" + - "\x03fooR\x03val\"-\n" + + "\x03fooR\x03val\"+\n" + + "\rStringDecimal\x12\x1a\n" + + "\x03val\x18\x01 \x01(\tB\b\xbaH\x05r\x03\xa2\x02\x00R\x03val\"6\n" + + "\x16StringDecimalPrecision\x12\x1c\n" + + "\x03val\x18\x01 \x01(\tB\n" + + "\xbaH\ar\x05\xa2\x02\x02\b\x04R\x03val\"2\n" + + "\x12StringDecimalScale\x12\x1c\n" + + "\x03val\x18\x01 \x01(\tB\n" + + "\xbaH\ar\x05\xa2\x02\x02\x10\x02R\x03val\"=\n" + + "\x1bStringDecimalPrecisionScale\x12\x1e\n" + + "\x03val\x18\x01 \x01(\tB\f\xbaH\tr\a\xa2\x02\x04\b\x06\x10\x02R\x03val\"-\n" + "\bStringIn\x12!\n" + "\x03val\x18\x01 \x01(\tB\x0f\xbaH\fr\n" + "R\x03barR\x03bazR\x03val\"2\n" + @@ -3035,72 +3221,76 @@ func file_buf_validate_conformance_cases_strings_proto_rawDescGZIP() []byte { return file_buf_validate_conformance_cases_strings_proto_rawDescData } -var file_buf_validate_conformance_cases_strings_proto_msgTypes = make([]protoimpl.MessageInfo, 64) +var file_buf_validate_conformance_cases_strings_proto_msgTypes = make([]protoimpl.MessageInfo, 68) var file_buf_validate_conformance_cases_strings_proto_goTypes = []any{ - (*StringNone)(nil), // 0: buf.validate.conformance.cases.StringNone - (*StringConst)(nil), // 1: buf.validate.conformance.cases.StringConst - (*StringIn)(nil), // 2: buf.validate.conformance.cases.StringIn - (*StringNotIn)(nil), // 3: buf.validate.conformance.cases.StringNotIn - (*StringLen)(nil), // 4: buf.validate.conformance.cases.StringLen - (*StringMinLen)(nil), // 5: buf.validate.conformance.cases.StringMinLen - (*StringMaxLen)(nil), // 6: buf.validate.conformance.cases.StringMaxLen - (*StringMinMaxLen)(nil), // 7: buf.validate.conformance.cases.StringMinMaxLen - (*StringEqualMinMaxLen)(nil), // 8: buf.validate.conformance.cases.StringEqualMinMaxLen - (*StringLenBytes)(nil), // 9: buf.validate.conformance.cases.StringLenBytes - (*StringMinBytes)(nil), // 10: buf.validate.conformance.cases.StringMinBytes - (*StringMaxBytes)(nil), // 11: buf.validate.conformance.cases.StringMaxBytes - (*StringMinMaxBytes)(nil), // 12: buf.validate.conformance.cases.StringMinMaxBytes - (*StringEqualMinMaxBytes)(nil), // 13: buf.validate.conformance.cases.StringEqualMinMaxBytes - (*StringPattern)(nil), // 14: buf.validate.conformance.cases.StringPattern - (*StringPatternEscapes)(nil), // 15: buf.validate.conformance.cases.StringPatternEscapes - (*StringPrefix)(nil), // 16: buf.validate.conformance.cases.StringPrefix - (*StringContains)(nil), // 17: buf.validate.conformance.cases.StringContains - (*StringNotContains)(nil), // 18: buf.validate.conformance.cases.StringNotContains - (*StringSuffix)(nil), // 19: buf.validate.conformance.cases.StringSuffix - (*StringEmail)(nil), // 20: buf.validate.conformance.cases.StringEmail - (*StringNotEmail)(nil), // 21: buf.validate.conformance.cases.StringNotEmail - (*StringAddress)(nil), // 22: buf.validate.conformance.cases.StringAddress - (*StringNotAddress)(nil), // 23: buf.validate.conformance.cases.StringNotAddress - (*StringHostname)(nil), // 24: buf.validate.conformance.cases.StringHostname - (*StringNotHostname)(nil), // 25: buf.validate.conformance.cases.StringNotHostname - (*StringIP)(nil), // 26: buf.validate.conformance.cases.StringIP - (*StringNotIP)(nil), // 27: buf.validate.conformance.cases.StringNotIP - (*StringIPv4)(nil), // 28: buf.validate.conformance.cases.StringIPv4 - (*StringNotIPv4)(nil), // 29: buf.validate.conformance.cases.StringNotIPv4 - (*StringIPv6)(nil), // 30: buf.validate.conformance.cases.StringIPv6 - (*StringNotIPv6)(nil), // 31: buf.validate.conformance.cases.StringNotIPv6 - (*StringIPWithPrefixLen)(nil), // 32: buf.validate.conformance.cases.StringIPWithPrefixLen - (*StringNotIPWithPrefixLen)(nil), // 33: buf.validate.conformance.cases.StringNotIPWithPrefixLen - (*StringIPv4WithPrefixLen)(nil), // 34: buf.validate.conformance.cases.StringIPv4WithPrefixLen - (*StringNotIPv4WithPrefixLen)(nil), // 35: buf.validate.conformance.cases.StringNotIPv4WithPrefixLen - (*StringIPv6WithPrefixLen)(nil), // 36: buf.validate.conformance.cases.StringIPv6WithPrefixLen - (*StringNotIPv6WithPrefixLen)(nil), // 37: buf.validate.conformance.cases.StringNotIPv6WithPrefixLen - (*StringIPPrefix)(nil), // 38: buf.validate.conformance.cases.StringIPPrefix - (*StringNotIPPrefix)(nil), // 39: buf.validate.conformance.cases.StringNotIPPrefix - (*StringIPv4Prefix)(nil), // 40: buf.validate.conformance.cases.StringIPv4Prefix - (*StringNotIPv4Prefix)(nil), // 41: buf.validate.conformance.cases.StringNotIPv4Prefix - (*StringIPv6Prefix)(nil), // 42: buf.validate.conformance.cases.StringIPv6Prefix - (*StringNotIPv6Prefix)(nil), // 43: buf.validate.conformance.cases.StringNotIPv6Prefix - (*StringURI)(nil), // 44: buf.validate.conformance.cases.StringURI - (*StringNotURI)(nil), // 45: buf.validate.conformance.cases.StringNotURI - (*StringURIRef)(nil), // 46: buf.validate.conformance.cases.StringURIRef - (*StringNotURIRef)(nil), // 47: buf.validate.conformance.cases.StringNotURIRef - (*StringUUID)(nil), // 48: buf.validate.conformance.cases.StringUUID - (*StringNotUUID)(nil), // 49: buf.validate.conformance.cases.StringNotUUID - (*StringTUUID)(nil), // 50: buf.validate.conformance.cases.StringTUUID - (*StringNotTUUID)(nil), // 51: buf.validate.conformance.cases.StringNotTUUID - (*StringULID)(nil), // 52: buf.validate.conformance.cases.StringULID - (*StringNotULID)(nil), // 53: buf.validate.conformance.cases.StringNotULID - (*StringULIDIgnore)(nil), // 54: buf.validate.conformance.cases.StringULIDIgnore - (*StringHttpHeaderName)(nil), // 55: buf.validate.conformance.cases.StringHttpHeaderName - (*StringHttpHeaderValue)(nil), // 56: buf.validate.conformance.cases.StringHttpHeaderValue - (*StringHttpHeaderNameLoose)(nil), // 57: buf.validate.conformance.cases.StringHttpHeaderNameLoose - (*StringHttpHeaderValueLoose)(nil), // 58: buf.validate.conformance.cases.StringHttpHeaderValueLoose - (*StringUUIDIgnore)(nil), // 59: buf.validate.conformance.cases.StringUUIDIgnore - (*StringInOneof)(nil), // 60: buf.validate.conformance.cases.StringInOneof - (*StringHostAndPort)(nil), // 61: buf.validate.conformance.cases.StringHostAndPort - (*StringHostAndOptionalPort)(nil), // 62: buf.validate.conformance.cases.StringHostAndOptionalPort - (*StringExample)(nil), // 63: buf.validate.conformance.cases.StringExample + (*StringNone)(nil), // 0: buf.validate.conformance.cases.StringNone + (*StringConst)(nil), // 1: buf.validate.conformance.cases.StringConst + (*StringDecimal)(nil), // 2: buf.validate.conformance.cases.StringDecimal + (*StringDecimalPrecision)(nil), // 3: buf.validate.conformance.cases.StringDecimalPrecision + (*StringDecimalScale)(nil), // 4: buf.validate.conformance.cases.StringDecimalScale + (*StringDecimalPrecisionScale)(nil), // 5: buf.validate.conformance.cases.StringDecimalPrecisionScale + (*StringIn)(nil), // 6: buf.validate.conformance.cases.StringIn + (*StringNotIn)(nil), // 7: buf.validate.conformance.cases.StringNotIn + (*StringLen)(nil), // 8: buf.validate.conformance.cases.StringLen + (*StringMinLen)(nil), // 9: buf.validate.conformance.cases.StringMinLen + (*StringMaxLen)(nil), // 10: buf.validate.conformance.cases.StringMaxLen + (*StringMinMaxLen)(nil), // 11: buf.validate.conformance.cases.StringMinMaxLen + (*StringEqualMinMaxLen)(nil), // 12: buf.validate.conformance.cases.StringEqualMinMaxLen + (*StringLenBytes)(nil), // 13: buf.validate.conformance.cases.StringLenBytes + (*StringMinBytes)(nil), // 14: buf.validate.conformance.cases.StringMinBytes + (*StringMaxBytes)(nil), // 15: buf.validate.conformance.cases.StringMaxBytes + (*StringMinMaxBytes)(nil), // 16: buf.validate.conformance.cases.StringMinMaxBytes + (*StringEqualMinMaxBytes)(nil), // 17: buf.validate.conformance.cases.StringEqualMinMaxBytes + (*StringPattern)(nil), // 18: buf.validate.conformance.cases.StringPattern + (*StringPatternEscapes)(nil), // 19: buf.validate.conformance.cases.StringPatternEscapes + (*StringPrefix)(nil), // 20: buf.validate.conformance.cases.StringPrefix + (*StringContains)(nil), // 21: buf.validate.conformance.cases.StringContains + (*StringNotContains)(nil), // 22: buf.validate.conformance.cases.StringNotContains + (*StringSuffix)(nil), // 23: buf.validate.conformance.cases.StringSuffix + (*StringEmail)(nil), // 24: buf.validate.conformance.cases.StringEmail + (*StringNotEmail)(nil), // 25: buf.validate.conformance.cases.StringNotEmail + (*StringAddress)(nil), // 26: buf.validate.conformance.cases.StringAddress + (*StringNotAddress)(nil), // 27: buf.validate.conformance.cases.StringNotAddress + (*StringHostname)(nil), // 28: buf.validate.conformance.cases.StringHostname + (*StringNotHostname)(nil), // 29: buf.validate.conformance.cases.StringNotHostname + (*StringIP)(nil), // 30: buf.validate.conformance.cases.StringIP + (*StringNotIP)(nil), // 31: buf.validate.conformance.cases.StringNotIP + (*StringIPv4)(nil), // 32: buf.validate.conformance.cases.StringIPv4 + (*StringNotIPv4)(nil), // 33: buf.validate.conformance.cases.StringNotIPv4 + (*StringIPv6)(nil), // 34: buf.validate.conformance.cases.StringIPv6 + (*StringNotIPv6)(nil), // 35: buf.validate.conformance.cases.StringNotIPv6 + (*StringIPWithPrefixLen)(nil), // 36: buf.validate.conformance.cases.StringIPWithPrefixLen + (*StringNotIPWithPrefixLen)(nil), // 37: buf.validate.conformance.cases.StringNotIPWithPrefixLen + (*StringIPv4WithPrefixLen)(nil), // 38: buf.validate.conformance.cases.StringIPv4WithPrefixLen + (*StringNotIPv4WithPrefixLen)(nil), // 39: buf.validate.conformance.cases.StringNotIPv4WithPrefixLen + (*StringIPv6WithPrefixLen)(nil), // 40: buf.validate.conformance.cases.StringIPv6WithPrefixLen + (*StringNotIPv6WithPrefixLen)(nil), // 41: buf.validate.conformance.cases.StringNotIPv6WithPrefixLen + (*StringIPPrefix)(nil), // 42: buf.validate.conformance.cases.StringIPPrefix + (*StringNotIPPrefix)(nil), // 43: buf.validate.conformance.cases.StringNotIPPrefix + (*StringIPv4Prefix)(nil), // 44: buf.validate.conformance.cases.StringIPv4Prefix + (*StringNotIPv4Prefix)(nil), // 45: buf.validate.conformance.cases.StringNotIPv4Prefix + (*StringIPv6Prefix)(nil), // 46: buf.validate.conformance.cases.StringIPv6Prefix + (*StringNotIPv6Prefix)(nil), // 47: buf.validate.conformance.cases.StringNotIPv6Prefix + (*StringURI)(nil), // 48: buf.validate.conformance.cases.StringURI + (*StringNotURI)(nil), // 49: buf.validate.conformance.cases.StringNotURI + (*StringURIRef)(nil), // 50: buf.validate.conformance.cases.StringURIRef + (*StringNotURIRef)(nil), // 51: buf.validate.conformance.cases.StringNotURIRef + (*StringUUID)(nil), // 52: buf.validate.conformance.cases.StringUUID + (*StringNotUUID)(nil), // 53: buf.validate.conformance.cases.StringNotUUID + (*StringTUUID)(nil), // 54: buf.validate.conformance.cases.StringTUUID + (*StringNotTUUID)(nil), // 55: buf.validate.conformance.cases.StringNotTUUID + (*StringULID)(nil), // 56: buf.validate.conformance.cases.StringULID + (*StringNotULID)(nil), // 57: buf.validate.conformance.cases.StringNotULID + (*StringULIDIgnore)(nil), // 58: buf.validate.conformance.cases.StringULIDIgnore + (*StringHttpHeaderName)(nil), // 59: buf.validate.conformance.cases.StringHttpHeaderName + (*StringHttpHeaderValue)(nil), // 60: buf.validate.conformance.cases.StringHttpHeaderValue + (*StringHttpHeaderNameLoose)(nil), // 61: buf.validate.conformance.cases.StringHttpHeaderNameLoose + (*StringHttpHeaderValueLoose)(nil), // 62: buf.validate.conformance.cases.StringHttpHeaderValueLoose + (*StringUUIDIgnore)(nil), // 63: buf.validate.conformance.cases.StringUUIDIgnore + (*StringInOneof)(nil), // 64: buf.validate.conformance.cases.StringInOneof + (*StringHostAndPort)(nil), // 65: buf.validate.conformance.cases.StringHostAndPort + (*StringHostAndOptionalPort)(nil), // 66: buf.validate.conformance.cases.StringHostAndOptionalPort + (*StringExample)(nil), // 67: buf.validate.conformance.cases.StringExample } var file_buf_validate_conformance_cases_strings_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -3115,7 +3305,7 @@ func file_buf_validate_conformance_cases_strings_proto_init() { if File_buf_validate_conformance_cases_strings_proto != nil { return } - file_buf_validate_conformance_cases_strings_proto_msgTypes[60].OneofWrappers = []any{ + file_buf_validate_conformance_cases_strings_proto_msgTypes[64].OneofWrappers = []any{ (*StringInOneof_Bar)(nil), } type x struct{} @@ -3124,7 +3314,7 @@ func file_buf_validate_conformance_cases_strings_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_buf_validate_conformance_cases_strings_proto_rawDesc), len(file_buf_validate_conformance_cases_strings_proto_rawDesc)), NumEnums: 0, - NumMessages: 64, + NumMessages: 68, NumExtensions: 0, NumServices: 0, }, diff --git a/tools/internal/gen/buf/validate/validate.pb.go b/tools/internal/gen/buf/validate/validate.pb.go index 7a962f1d..aafc5c00 100644 --- a/tools/internal/gen/buf/validate/validate.pb.go +++ b/tools/internal/gen/buf/validate/validate.pb.go @@ -4758,6 +4758,7 @@ type StringRules struct { // *StringRules_Ipv6Prefix // *StringRules_HostAndPort // *StringRules_Ulid + // *StringRules_Decimal // *StringRules_WellKnownRegex WellKnown isStringRules_WellKnown `protobuf_oneof:"well_known"` // This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to @@ -5092,6 +5093,15 @@ func (x *StringRules) GetUlid() bool { return false } +func (x *StringRules) GetDecimal() *DecimalRules { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Decimal); ok { + return x.Decimal + } + } + return nil +} + func (x *StringRules) GetWellKnownRegex() KnownRegex { if x != nil { if x, ok := x.WellKnown.(*StringRules_WellKnownRegex); ok { @@ -5462,6 +5472,25 @@ type StringRules_Ulid struct { Ulid bool `protobuf:"varint,35,opt,name=ulid,oneof"` } +type StringRules_Decimal struct { + // `decimal` specifies that this string represents a decimal with specific precision and scale. + // + // ```proto + // + // message MyString { + // // Value must be a number with at most six digits, at most two digits after the decimal + // // point, and at most four digits before the decimal point. + // // "1000", "100.1", and "100" are valid, whereas "10000" and "1.111" are not. + // string value = 1 [ + // (buf.validate.field).string.decimal.precision = 6, + // (buf.validate.field).string.decimal.scale = 2 + // ]; + // } + // + // ``` + Decimal *DecimalRules `protobuf:"bytes,36,opt,name=decimal,oneof"` +} + type StringRules_WellKnownRegex struct { // `well_known_regex` specifies a common well-known pattern // defined as a regex. If the field value doesn't match the well-known @@ -5524,8 +5553,73 @@ func (*StringRules_HostAndPort) isStringRules_WellKnown() {} func (*StringRules_Ulid) isStringRules_WellKnown() {} +func (*StringRules_Decimal) isStringRules_WellKnown() {} + func (*StringRules_WellKnownRegex) isStringRules_WellKnown() {} +// Rules to describe a decimal represented as a string. +// +// TODO: Extend to the possible representations that google.type.Decimal allows? +type DecimalRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The total number of digits allowed (before and after the decimal point). + Precision *uint32 `protobuf:"varint,1,opt,name=precision" json:"precision,omitempty"` + // The number of digits allowed after the decimal point; when subtracted from `precision`, the + // number of digits allowed before the decimal point. + // + // This can only be validated when `precision` is also set. + // + // It also must be less than `precision`. That is, at least one digit must be before the + // decimal point. + Scale *uint32 `protobuf:"varint,2,opt,name=scale" json:"scale,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DecimalRules) Reset() { + *x = DecimalRules{} + mi := &file_buf_validate_validate_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DecimalRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecimalRules) ProtoMessage() {} + +func (x *DecimalRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecimalRules.ProtoReflect.Descriptor instead. +func (*DecimalRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{20} +} + +func (x *DecimalRules) GetPrecision() uint32 { + if x != nil && x.Precision != nil { + return *x.Precision + } + return 0 +} + +func (x *DecimalRules) GetScale() uint32 { + if x != nil && x.Scale != nil { + return *x.Scale + } + return 0 +} + // BytesRules describe the rules applied to `bytes` values. These rules // may also be applied to the `google.protobuf.BytesValue` Well-Known-Type. type BytesRules struct { @@ -5693,7 +5787,7 @@ type BytesRules struct { func (x *BytesRules) Reset() { *x = BytesRules{} - mi := &file_buf_validate_validate_proto_msgTypes[20] + mi := &file_buf_validate_validate_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5705,7 +5799,7 @@ func (x *BytesRules) String() string { func (*BytesRules) ProtoMessage() {} func (x *BytesRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[20] + mi := &file_buf_validate_validate_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5718,7 +5812,7 @@ func (x *BytesRules) ProtoReflect() protoreflect.Message { // Deprecated: Use BytesRules.ProtoReflect.Descriptor instead. func (*BytesRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{20} + return file_buf_validate_validate_proto_rawDescGZIP(), []int{21} } func (x *BytesRules) GetConst() []byte { @@ -6018,7 +6112,7 @@ type EnumRules struct { func (x *EnumRules) Reset() { *x = EnumRules{} - mi := &file_buf_validate_validate_proto_msgTypes[21] + mi := &file_buf_validate_validate_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6030,7 +6124,7 @@ func (x *EnumRules) String() string { func (*EnumRules) ProtoMessage() {} func (x *EnumRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[21] + mi := &file_buf_validate_validate_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6043,7 +6137,7 @@ func (x *EnumRules) ProtoReflect() protoreflect.Message { // Deprecated: Use EnumRules.ProtoReflect.Descriptor instead. func (*EnumRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{21} + return file_buf_validate_validate_proto_rawDescGZIP(), []int{22} } func (x *EnumRules) GetConst() int32 { @@ -6153,7 +6247,7 @@ type RepeatedRules struct { func (x *RepeatedRules) Reset() { *x = RepeatedRules{} - mi := &file_buf_validate_validate_proto_msgTypes[22] + mi := &file_buf_validate_validate_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6165,7 +6259,7 @@ func (x *RepeatedRules) String() string { func (*RepeatedRules) ProtoMessage() {} func (x *RepeatedRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[22] + mi := &file_buf_validate_validate_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6178,7 +6272,7 @@ func (x *RepeatedRules) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedRules.ProtoReflect.Descriptor instead. func (*RepeatedRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{22} + return file_buf_validate_validate_proto_rawDescGZIP(), []int{23} } func (x *RepeatedRules) GetMinItems() uint64 { @@ -6280,7 +6374,7 @@ type MapRules struct { func (x *MapRules) Reset() { *x = MapRules{} - mi := &file_buf_validate_validate_proto_msgTypes[23] + mi := &file_buf_validate_validate_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6292,7 +6386,7 @@ func (x *MapRules) String() string { func (*MapRules) ProtoMessage() {} func (x *MapRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[23] + mi := &file_buf_validate_validate_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6305,7 +6399,7 @@ func (x *MapRules) ProtoReflect() protoreflect.Message { // Deprecated: Use MapRules.ProtoReflect.Descriptor instead. func (*MapRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{23} + return file_buf_validate_validate_proto_rawDescGZIP(), []int{24} } func (x *MapRules) GetMinPairs() uint64 { @@ -6373,7 +6467,7 @@ type AnyRules struct { func (x *AnyRules) Reset() { *x = AnyRules{} - mi := &file_buf_validate_validate_proto_msgTypes[24] + mi := &file_buf_validate_validate_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6385,7 +6479,7 @@ func (x *AnyRules) String() string { func (*AnyRules) ProtoMessage() {} func (x *AnyRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[24] + mi := &file_buf_validate_validate_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6398,7 +6492,7 @@ func (x *AnyRules) ProtoReflect() protoreflect.Message { // Deprecated: Use AnyRules.ProtoReflect.Descriptor instead. func (*AnyRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{24} + return file_buf_validate_validate_proto_rawDescGZIP(), []int{25} } func (x *AnyRules) GetIn() []string { @@ -6490,7 +6584,7 @@ type DurationRules struct { func (x *DurationRules) Reset() { *x = DurationRules{} - mi := &file_buf_validate_validate_proto_msgTypes[25] + mi := &file_buf_validate_validate_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6502,7 +6596,7 @@ func (x *DurationRules) String() string { func (*DurationRules) ProtoMessage() {} func (x *DurationRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[25] + mi := &file_buf_validate_validate_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6515,7 +6609,7 @@ func (x *DurationRules) ProtoReflect() protoreflect.Message { // Deprecated: Use DurationRules.ProtoReflect.Descriptor instead. func (*DurationRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{25} + return file_buf_validate_validate_proto_rawDescGZIP(), []int{26} } func (x *DurationRules) GetConst() *durationpb.Duration { @@ -6766,7 +6860,7 @@ type FieldMaskRules struct { func (x *FieldMaskRules) Reset() { *x = FieldMaskRules{} - mi := &file_buf_validate_validate_proto_msgTypes[26] + mi := &file_buf_validate_validate_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6778,7 +6872,7 @@ func (x *FieldMaskRules) String() string { func (*FieldMaskRules) ProtoMessage() {} func (x *FieldMaskRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[26] + mi := &file_buf_validate_validate_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6791,7 +6885,7 @@ func (x *FieldMaskRules) ProtoReflect() protoreflect.Message { // Deprecated: Use FieldMaskRules.ProtoReflect.Descriptor instead. func (*FieldMaskRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{26} + return file_buf_validate_validate_proto_rawDescGZIP(), []int{27} } func (x *FieldMaskRules) GetConst() *fieldmaskpb.FieldMask { @@ -6881,7 +6975,7 @@ type TimestampRules struct { func (x *TimestampRules) Reset() { *x = TimestampRules{} - mi := &file_buf_validate_validate_proto_msgTypes[27] + mi := &file_buf_validate_validate_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6893,7 +6987,7 @@ func (x *TimestampRules) String() string { func (*TimestampRules) ProtoMessage() {} func (x *TimestampRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[27] + mi := &file_buf_validate_validate_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6906,7 +7000,7 @@ func (x *TimestampRules) ProtoReflect() protoreflect.Message { // Deprecated: Use TimestampRules.ProtoReflect.Descriptor instead. func (*TimestampRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{27} + return file_buf_validate_validate_proto_rawDescGZIP(), []int{28} } func (x *TimestampRules) GetConst() *timestamppb.Timestamp { @@ -7135,7 +7229,7 @@ type Violations struct { func (x *Violations) Reset() { *x = Violations{} - mi := &file_buf_validate_validate_proto_msgTypes[28] + mi := &file_buf_validate_validate_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7147,7 +7241,7 @@ func (x *Violations) String() string { func (*Violations) ProtoMessage() {} func (x *Violations) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[28] + mi := &file_buf_validate_validate_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7160,7 +7254,7 @@ func (x *Violations) ProtoReflect() protoreflect.Message { // Deprecated: Use Violations.ProtoReflect.Descriptor instead. func (*Violations) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{28} + return file_buf_validate_validate_proto_rawDescGZIP(), []int{29} } func (x *Violations) GetViolations() []*Violation { @@ -7291,7 +7385,7 @@ type Violation struct { func (x *Violation) Reset() { *x = Violation{} - mi := &file_buf_validate_validate_proto_msgTypes[29] + mi := &file_buf_validate_validate_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7303,7 +7397,7 @@ func (x *Violation) String() string { func (*Violation) ProtoMessage() {} func (x *Violation) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[29] + mi := &file_buf_validate_validate_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7316,7 +7410,7 @@ func (x *Violation) ProtoReflect() protoreflect.Message { // Deprecated: Use Violation.ProtoReflect.Descriptor instead. func (*Violation) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{29} + return file_buf_validate_validate_proto_rawDescGZIP(), []int{30} } func (x *Violation) GetField() *FieldPath { @@ -7368,7 +7462,7 @@ type FieldPath struct { func (x *FieldPath) Reset() { *x = FieldPath{} - mi := &file_buf_validate_validate_proto_msgTypes[30] + mi := &file_buf_validate_validate_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7380,7 +7474,7 @@ func (x *FieldPath) String() string { func (*FieldPath) ProtoMessage() {} func (x *FieldPath) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[30] + mi := &file_buf_validate_validate_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7393,7 +7487,7 @@ func (x *FieldPath) ProtoReflect() protoreflect.Message { // Deprecated: Use FieldPath.ProtoReflect.Descriptor instead. func (*FieldPath) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{30} + return file_buf_validate_validate_proto_rawDescGZIP(), []int{31} } func (x *FieldPath) GetElements() []*FieldPathElement { @@ -7449,7 +7543,7 @@ type FieldPathElement struct { func (x *FieldPathElement) Reset() { *x = FieldPathElement{} - mi := &file_buf_validate_validate_proto_msgTypes[31] + mi := &file_buf_validate_validate_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7461,7 +7555,7 @@ func (x *FieldPathElement) String() string { func (*FieldPathElement) ProtoMessage() {} func (x *FieldPathElement) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[31] + mi := &file_buf_validate_validate_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7474,7 +7568,7 @@ func (x *FieldPathElement) ProtoReflect() protoreflect.Message { // Deprecated: Use FieldPathElement.ProtoReflect.Descriptor instead. func (*FieldPathElement) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{31} + return file_buf_validate_validate_proto_rawDescGZIP(), []int{32} } func (x *FieldPathElement) GetFieldNumber() int32 { @@ -8287,7 +8381,7 @@ const file_buf_validate_validate_proto_rawDesc = "" + "bool.const\x1a`this != getField(rules, 'const') ? 'value must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x123\n" + "\aexample\x18\x02 \x03(\bB\x19\xc2H\x16\n" + "\x14\n" + - "\fbool.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xcf;\n" + + "\fbool.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xbeI\n" + "\vStringRules\x12\x8d\x01\n" + "\x05const\x18\x01 \x01(\tBw\xc2Ht\n" + "r\n" + @@ -8423,7 +8517,26 @@ const file_buf_validate_validate_proto_rawDesc = "" + "\x82\x01\n" + "\vstring.ulid\x12\x1avalue must be a valid ULID\x1aW!rules.ulid || this == '' || this.matches('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$')\n" + "Y\n" + - "\x11string.ulid_empty\x12)value is empty, which is not a valid ULID\x1a\x19!rules.ulid || this != ''H\x00R\x04ulid\x12\xb8\x05\n" + + "\x11string.ulid_empty\x12)value is empty, which is not a valid ULID\x1a\x19!rules.ulid || this != ''H\x00R\x04ulid\x12\xec\r\n" + + "\adecimal\x18$ \x01(\v2\x1a.buf.validate.DecimalRulesB\xb3\r\xc2H\xaf\r\n" + + "\x98\x01\n" + + "\x17string.decimal.numerals\x12Lvalue must not have characters other than decimal digits and a decimal point\x1a/!has(rules.decimal) || !this.matches('[^0-9.]')\n" + + "}\n" + + "\x1estring.decimal.multiple_points\x12+value must not have multiple decimal points\x1a.!has(rules.decimal) || !this.matches('\\..*\\.')\n" + + "v\n" + + "\x1cstring.decimal.leading_point\x12)value must not begin with a decimal point\x1a+!has(rules.decimal) || !this.matches('^\\.')\n" + + "u\n" + + "\x1dstring.decimal.trailing_point\x12'value must not end with a decimal point\x1a+!has(rules.decimal) || !this.matches('\\.$')\n" + + "r\n" + + "\x1bstring.decimal.leading_zero\x12\"value must not have a leading zero\x1a/!has(rules.decimal) || !this.matches('^0[0-9]')\n" + + "]\n" + + "\x14string.decimal.empty\x12\"value must have at least one digit\x1a!!has(rules.decimal) || this != ''\n" + + "\xf7\x01\n" + + "\x18string.decimal.precision\x1a\xda\x01has(rules.decimal.precision) &&this.replace('.', '').size() > rules.decimal.precision ? 'value must have no more than %d digits; got %d digits' .format([rules.decimal.precision, this.replace('.', '').size()]) : ''\n" + + "\xaf\x02\n" + + "\x14string.decimal.scale\x1a\x96\x02has(rules.decimal.scale) && this.contains('.') &&(this.size() - this.lastIndexOf('.') - 1) > rules.decimal.scale ? 'value must have no more than %d digits after the decimal place; got %d digits' .format([rules.decimal.scale, (this.size() - this.lastIndexOf('.') - 1)]) : ''\n" + + "\xa4\x03\n" + + "\x1estring.decimal.precision_scale\x1a\x81\x03has(rules.decimal.precision) && has(rules.decimal.scale) &&(this.contains('.') ? this.indexOf('.') : this.size()) > (rules.decimal.precision - rules.decimal.scale) ? 'value must have no more than %d digits before the decimal place; got %d digits' .format([ rules.decimal.precision - rules.decimal.scale, (this.contains('.') ? this.indexOf('.') : this.size()), ]) : ''H\x00R\adecimal\x12\xb8\x05\n" + "\x10well_known_regex\x18\x18 \x01(\x0e2\x18.buf.validate.KnownRegexB\xf1\x04\xc2H\xed\x04\n" + "\xf0\x01\n" + "#string.well_known_regex.header_name\x12&value must be a valid HTTP header name\x1a\xa0\x01rules.well_known_regex != 1 || this == '' || this.matches(!has(rules.strict) || rules.strict ?'^:?[0-9a-zA-Z!#$%&\\'*+-.^_|~\\x60]+$' :'^[^\\u0000\\u000A\\u000D]+$')\n" + @@ -8436,7 +8549,10 @@ const file_buf_validate_validate_proto_rawDesc = "" + "\x16\n" + "\x0estring.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\f\n" + "\n" + - "well_known\"\xac\x13\n" + + "well_known\"B\n" + + "\fDecimalRules\x12\x1c\n" + + "\tprecision\x18\x01 \x01(\rR\tprecision\x12\x14\n" + + "\x05scale\x18\x02 \x01(\rR\x05scale\"\xac\x13\n" + "\n" + "BytesRules\x12\x87\x01\n" + "\x05const\x18\x01 \x01(\fBq\xc2Hn\n" + @@ -8700,7 +8816,7 @@ func file_buf_validate_validate_proto_rawDescGZIP() []byte { } var file_buf_validate_validate_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_buf_validate_validate_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_buf_validate_validate_proto_msgTypes = make([]protoimpl.MessageInfo, 33) var file_buf_validate_validate_proto_goTypes = []any{ (Ignore)(0), // 0: buf.validate.Ignore (KnownRegex)(0), // 1: buf.validate.KnownRegex @@ -8724,25 +8840,26 @@ var file_buf_validate_validate_proto_goTypes = []any{ (*SFixed64Rules)(nil), // 19: buf.validate.SFixed64Rules (*BoolRules)(nil), // 20: buf.validate.BoolRules (*StringRules)(nil), // 21: buf.validate.StringRules - (*BytesRules)(nil), // 22: buf.validate.BytesRules - (*EnumRules)(nil), // 23: buf.validate.EnumRules - (*RepeatedRules)(nil), // 24: buf.validate.RepeatedRules - (*MapRules)(nil), // 25: buf.validate.MapRules - (*AnyRules)(nil), // 26: buf.validate.AnyRules - (*DurationRules)(nil), // 27: buf.validate.DurationRules - (*FieldMaskRules)(nil), // 28: buf.validate.FieldMaskRules - (*TimestampRules)(nil), // 29: buf.validate.TimestampRules - (*Violations)(nil), // 30: buf.validate.Violations - (*Violation)(nil), // 31: buf.validate.Violation - (*FieldPath)(nil), // 32: buf.validate.FieldPath - (*FieldPathElement)(nil), // 33: buf.validate.FieldPathElement - (*durationpb.Duration)(nil), // 34: google.protobuf.Duration - (*fieldmaskpb.FieldMask)(nil), // 35: google.protobuf.FieldMask - (*timestamppb.Timestamp)(nil), // 36: google.protobuf.Timestamp - (descriptorpb.FieldDescriptorProto_Type)(0), // 37: google.protobuf.FieldDescriptorProto.Type - (*descriptorpb.MessageOptions)(nil), // 38: google.protobuf.MessageOptions - (*descriptorpb.OneofOptions)(nil), // 39: google.protobuf.OneofOptions - (*descriptorpb.FieldOptions)(nil), // 40: google.protobuf.FieldOptions + (*DecimalRules)(nil), // 22: buf.validate.DecimalRules + (*BytesRules)(nil), // 23: buf.validate.BytesRules + (*EnumRules)(nil), // 24: buf.validate.EnumRules + (*RepeatedRules)(nil), // 25: buf.validate.RepeatedRules + (*MapRules)(nil), // 26: buf.validate.MapRules + (*AnyRules)(nil), // 27: buf.validate.AnyRules + (*DurationRules)(nil), // 28: buf.validate.DurationRules + (*FieldMaskRules)(nil), // 29: buf.validate.FieldMaskRules + (*TimestampRules)(nil), // 30: buf.validate.TimestampRules + (*Violations)(nil), // 31: buf.validate.Violations + (*Violation)(nil), // 32: buf.validate.Violation + (*FieldPath)(nil), // 33: buf.validate.FieldPath + (*FieldPathElement)(nil), // 34: buf.validate.FieldPathElement + (*durationpb.Duration)(nil), // 35: google.protobuf.Duration + (*fieldmaskpb.FieldMask)(nil), // 36: google.protobuf.FieldMask + (*timestamppb.Timestamp)(nil), // 37: google.protobuf.Timestamp + (descriptorpb.FieldDescriptorProto_Type)(0), // 38: google.protobuf.FieldDescriptorProto.Type + (*descriptorpb.MessageOptions)(nil), // 39: google.protobuf.MessageOptions + (*descriptorpb.OneofOptions)(nil), // 40: google.protobuf.OneofOptions + (*descriptorpb.FieldOptions)(nil), // 41: google.protobuf.FieldOptions } var file_buf_validate_validate_proto_depIdxs = []int32{ 2, // 0: buf.validate.MessageRules.cel:type_name -> buf.validate.Rule @@ -8763,56 +8880,57 @@ var file_buf_validate_validate_proto_depIdxs = []int32{ 19, // 15: buf.validate.FieldRules.sfixed64:type_name -> buf.validate.SFixed64Rules 20, // 16: buf.validate.FieldRules.bool:type_name -> buf.validate.BoolRules 21, // 17: buf.validate.FieldRules.string:type_name -> buf.validate.StringRules - 22, // 18: buf.validate.FieldRules.bytes:type_name -> buf.validate.BytesRules - 23, // 19: buf.validate.FieldRules.enum:type_name -> buf.validate.EnumRules - 24, // 20: buf.validate.FieldRules.repeated:type_name -> buf.validate.RepeatedRules - 25, // 21: buf.validate.FieldRules.map:type_name -> buf.validate.MapRules - 26, // 22: buf.validate.FieldRules.any:type_name -> buf.validate.AnyRules - 27, // 23: buf.validate.FieldRules.duration:type_name -> buf.validate.DurationRules - 28, // 24: buf.validate.FieldRules.field_mask:type_name -> buf.validate.FieldMaskRules - 29, // 25: buf.validate.FieldRules.timestamp:type_name -> buf.validate.TimestampRules + 23, // 18: buf.validate.FieldRules.bytes:type_name -> buf.validate.BytesRules + 24, // 19: buf.validate.FieldRules.enum:type_name -> buf.validate.EnumRules + 25, // 20: buf.validate.FieldRules.repeated:type_name -> buf.validate.RepeatedRules + 26, // 21: buf.validate.FieldRules.map:type_name -> buf.validate.MapRules + 27, // 22: buf.validate.FieldRules.any:type_name -> buf.validate.AnyRules + 28, // 23: buf.validate.FieldRules.duration:type_name -> buf.validate.DurationRules + 29, // 24: buf.validate.FieldRules.field_mask:type_name -> buf.validate.FieldMaskRules + 30, // 25: buf.validate.FieldRules.timestamp:type_name -> buf.validate.TimestampRules 2, // 26: buf.validate.PredefinedRules.cel:type_name -> buf.validate.Rule - 1, // 27: buf.validate.StringRules.well_known_regex:type_name -> buf.validate.KnownRegex - 6, // 28: buf.validate.RepeatedRules.items:type_name -> buf.validate.FieldRules - 6, // 29: buf.validate.MapRules.keys:type_name -> buf.validate.FieldRules - 6, // 30: buf.validate.MapRules.values:type_name -> buf.validate.FieldRules - 34, // 31: buf.validate.DurationRules.const:type_name -> google.protobuf.Duration - 34, // 32: buf.validate.DurationRules.lt:type_name -> google.protobuf.Duration - 34, // 33: buf.validate.DurationRules.lte:type_name -> google.protobuf.Duration - 34, // 34: buf.validate.DurationRules.gt:type_name -> google.protobuf.Duration - 34, // 35: buf.validate.DurationRules.gte:type_name -> google.protobuf.Duration - 34, // 36: buf.validate.DurationRules.in:type_name -> google.protobuf.Duration - 34, // 37: buf.validate.DurationRules.not_in:type_name -> google.protobuf.Duration - 34, // 38: buf.validate.DurationRules.example:type_name -> google.protobuf.Duration - 35, // 39: buf.validate.FieldMaskRules.const:type_name -> google.protobuf.FieldMask - 35, // 40: buf.validate.FieldMaskRules.example:type_name -> google.protobuf.FieldMask - 36, // 41: buf.validate.TimestampRules.const:type_name -> google.protobuf.Timestamp - 36, // 42: buf.validate.TimestampRules.lt:type_name -> google.protobuf.Timestamp - 36, // 43: buf.validate.TimestampRules.lte:type_name -> google.protobuf.Timestamp - 36, // 44: buf.validate.TimestampRules.gt:type_name -> google.protobuf.Timestamp - 36, // 45: buf.validate.TimestampRules.gte:type_name -> google.protobuf.Timestamp - 34, // 46: buf.validate.TimestampRules.within:type_name -> google.protobuf.Duration - 36, // 47: buf.validate.TimestampRules.example:type_name -> google.protobuf.Timestamp - 31, // 48: buf.validate.Violations.violations:type_name -> buf.validate.Violation - 32, // 49: buf.validate.Violation.field:type_name -> buf.validate.FieldPath - 32, // 50: buf.validate.Violation.rule:type_name -> buf.validate.FieldPath - 33, // 51: buf.validate.FieldPath.elements:type_name -> buf.validate.FieldPathElement - 37, // 52: buf.validate.FieldPathElement.field_type:type_name -> google.protobuf.FieldDescriptorProto.Type - 37, // 53: buf.validate.FieldPathElement.key_type:type_name -> google.protobuf.FieldDescriptorProto.Type - 37, // 54: buf.validate.FieldPathElement.value_type:type_name -> google.protobuf.FieldDescriptorProto.Type - 38, // 55: buf.validate.message:extendee -> google.protobuf.MessageOptions - 39, // 56: buf.validate.oneof:extendee -> google.protobuf.OneofOptions - 40, // 57: buf.validate.field:extendee -> google.protobuf.FieldOptions - 40, // 58: buf.validate.predefined:extendee -> google.protobuf.FieldOptions - 3, // 59: buf.validate.message:type_name -> buf.validate.MessageRules - 5, // 60: buf.validate.oneof:type_name -> buf.validate.OneofRules - 6, // 61: buf.validate.field:type_name -> buf.validate.FieldRules - 7, // 62: buf.validate.predefined:type_name -> buf.validate.PredefinedRules - 63, // [63:63] is the sub-list for method output_type - 63, // [63:63] is the sub-list for method input_type - 59, // [59:63] is the sub-list for extension type_name - 55, // [55:59] is the sub-list for extension extendee - 0, // [0:55] is the sub-list for field type_name + 22, // 27: buf.validate.StringRules.decimal:type_name -> buf.validate.DecimalRules + 1, // 28: buf.validate.StringRules.well_known_regex:type_name -> buf.validate.KnownRegex + 6, // 29: buf.validate.RepeatedRules.items:type_name -> buf.validate.FieldRules + 6, // 30: buf.validate.MapRules.keys:type_name -> buf.validate.FieldRules + 6, // 31: buf.validate.MapRules.values:type_name -> buf.validate.FieldRules + 35, // 32: buf.validate.DurationRules.const:type_name -> google.protobuf.Duration + 35, // 33: buf.validate.DurationRules.lt:type_name -> google.protobuf.Duration + 35, // 34: buf.validate.DurationRules.lte:type_name -> google.protobuf.Duration + 35, // 35: buf.validate.DurationRules.gt:type_name -> google.protobuf.Duration + 35, // 36: buf.validate.DurationRules.gte:type_name -> google.protobuf.Duration + 35, // 37: buf.validate.DurationRules.in:type_name -> google.protobuf.Duration + 35, // 38: buf.validate.DurationRules.not_in:type_name -> google.protobuf.Duration + 35, // 39: buf.validate.DurationRules.example:type_name -> google.protobuf.Duration + 36, // 40: buf.validate.FieldMaskRules.const:type_name -> google.protobuf.FieldMask + 36, // 41: buf.validate.FieldMaskRules.example:type_name -> google.protobuf.FieldMask + 37, // 42: buf.validate.TimestampRules.const:type_name -> google.protobuf.Timestamp + 37, // 43: buf.validate.TimestampRules.lt:type_name -> google.protobuf.Timestamp + 37, // 44: buf.validate.TimestampRules.lte:type_name -> google.protobuf.Timestamp + 37, // 45: buf.validate.TimestampRules.gt:type_name -> google.protobuf.Timestamp + 37, // 46: buf.validate.TimestampRules.gte:type_name -> google.protobuf.Timestamp + 35, // 47: buf.validate.TimestampRules.within:type_name -> google.protobuf.Duration + 37, // 48: buf.validate.TimestampRules.example:type_name -> google.protobuf.Timestamp + 32, // 49: buf.validate.Violations.violations:type_name -> buf.validate.Violation + 33, // 50: buf.validate.Violation.field:type_name -> buf.validate.FieldPath + 33, // 51: buf.validate.Violation.rule:type_name -> buf.validate.FieldPath + 34, // 52: buf.validate.FieldPath.elements:type_name -> buf.validate.FieldPathElement + 38, // 53: buf.validate.FieldPathElement.field_type:type_name -> google.protobuf.FieldDescriptorProto.Type + 38, // 54: buf.validate.FieldPathElement.key_type:type_name -> google.protobuf.FieldDescriptorProto.Type + 38, // 55: buf.validate.FieldPathElement.value_type:type_name -> google.protobuf.FieldDescriptorProto.Type + 39, // 56: buf.validate.message:extendee -> google.protobuf.MessageOptions + 40, // 57: buf.validate.oneof:extendee -> google.protobuf.OneofOptions + 41, // 58: buf.validate.field:extendee -> google.protobuf.FieldOptions + 41, // 59: buf.validate.predefined:extendee -> google.protobuf.FieldOptions + 3, // 60: buf.validate.message:type_name -> buf.validate.MessageRules + 5, // 61: buf.validate.oneof:type_name -> buf.validate.OneofRules + 6, // 62: buf.validate.field:type_name -> buf.validate.FieldRules + 7, // 63: buf.validate.predefined:type_name -> buf.validate.PredefinedRules + 64, // [64:64] is the sub-list for method output_type + 64, // [64:64] is the sub-list for method input_type + 60, // [60:64] is the sub-list for extension type_name + 56, // [56:60] is the sub-list for extension extendee + 0, // [0:56] is the sub-list for field type_name } func init() { file_buf_validate_validate_proto_init() } @@ -8935,21 +9053,22 @@ func file_buf_validate_validate_proto_init() { (*StringRules_Ipv6Prefix)(nil), (*StringRules_HostAndPort)(nil), (*StringRules_Ulid)(nil), + (*StringRules_Decimal)(nil), (*StringRules_WellKnownRegex)(nil), } - file_buf_validate_validate_proto_msgTypes[20].OneofWrappers = []any{ + file_buf_validate_validate_proto_msgTypes[21].OneofWrappers = []any{ (*BytesRules_Ip)(nil), (*BytesRules_Ipv4)(nil), (*BytesRules_Ipv6)(nil), (*BytesRules_Uuid)(nil), } - file_buf_validate_validate_proto_msgTypes[25].OneofWrappers = []any{ + file_buf_validate_validate_proto_msgTypes[26].OneofWrappers = []any{ (*DurationRules_Lt)(nil), (*DurationRules_Lte)(nil), (*DurationRules_Gt)(nil), (*DurationRules_Gte)(nil), } - file_buf_validate_validate_proto_msgTypes[27].OneofWrappers = []any{ + file_buf_validate_validate_proto_msgTypes[28].OneofWrappers = []any{ (*TimestampRules_Lt)(nil), (*TimestampRules_Lte)(nil), (*TimestampRules_LtNow)(nil), @@ -8957,7 +9076,7 @@ func file_buf_validate_validate_proto_init() { (*TimestampRules_Gte)(nil), (*TimestampRules_GtNow)(nil), } - file_buf_validate_validate_proto_msgTypes[31].OneofWrappers = []any{ + file_buf_validate_validate_proto_msgTypes[32].OneofWrappers = []any{ (*FieldPathElement_Index)(nil), (*FieldPathElement_BoolKey)(nil), (*FieldPathElement_IntKey)(nil), @@ -8970,7 +9089,7 @@ func file_buf_validate_validate_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_buf_validate_validate_proto_rawDesc), len(file_buf_validate_validate_proto_rawDesc)), NumEnums: 2, - NumMessages: 32, + NumMessages: 33, NumExtensions: 4, NumServices: 0, }, diff --git a/tools/protovalidate-conformance/internal/cases/cases_strings.go b/tools/protovalidate-conformance/internal/cases/cases_strings.go index b1bd3f1a..f52f571b 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_strings.go +++ b/tools/protovalidate-conformance/internal/cases/cases_strings.go @@ -42,6 +42,128 @@ func stringSuite() suites.Suite { }, ), }, + "decimal/valid": { + Message: &cases.StringDecimal{Val: "12345.12345"}, + Expected: results.Success(true), + }, + "decimal/valid/fractional": { + Message: &cases.StringDecimal{Val: "12345.12345"}, + Expected: results.Success(true), + }, + "decimal/valid/zero": { + Message: &cases.StringDecimal{Val: "0"}, + Expected: results.Success(true), + }, + "decimal/valid/zero_fractional": { + Message: &cases.StringDecimal{Val: "0.12345"}, + Expected: results.Success(true), + }, + "decimal/invalid/malformed": { + Message: &cases.StringDecimal{Val: "1.1.2"}, + Expected: results.Violations( + &validate.Violation{ + Field: results.FieldPath("val"), + Rule: results.FieldPath("string.decimal"), + RuleId: proto.String("string.decimal.multiple_points"), + }, + ), + }, + "decimal/invalid/numerals": { + Message: &cases.StringDecimal{Val: "1.23456e5"}, + Expected: results.Violations( + &validate.Violation{ + Field: results.FieldPath("val"), + Rule: results.FieldPath("string.decimal"), + RuleId: proto.String("string.decimal.numerals"), + }, + ), + }, + "decimal/invalid/leading_point": { + Message: &cases.StringDecimal{Val: ".12345"}, + Expected: results.Violations( + &validate.Violation{ + Field: results.FieldPath("val"), + Rule: results.FieldPath("string.decimal"), + RuleId: proto.String("string.decimal.leading_point"), + }, + ), + }, + "decimal/invalid/leading_zero": { + Message: &cases.StringDecimal{Val: "01"}, + Expected: results.Violations( + &validate.Violation{ + Field: results.FieldPath("val"), + Rule: results.FieldPath("string.decimal"), + RuleId: proto.String("string.decimal.leading_zero"), + }, + ), + }, + "decimal/invalid/trailing_point": { + Message: &cases.StringDecimal{Val: "12345."}, + Expected: results.Violations( + &validate.Violation{ + Field: results.FieldPath("val"), + Rule: results.FieldPath("string.decimal"), + RuleId: proto.String("string.decimal.trailing_point"), + }, + ), + }, + "decimal/invalid/empty": { + Message: &cases.StringDecimal{Val: ""}, + Expected: results.Violations( + &validate.Violation{ + Field: results.FieldPath("val"), + Rule: results.FieldPath("string.decimal"), + RuleId: proto.String("string.decimal.empty"), + }, + ), + }, + "decimal/precision/valid": { + Message: &cases.StringDecimalPrecision{Val: "1234"}, + Expected: results.Success(true), + }, + "decimal/precision/valid/fractional": { + Message: &cases.StringDecimalPrecision{Val: "1.234"}, + Expected: results.Success(true), + }, + "decimal/precision/invalid": { + Message: &cases.StringDecimalPrecision{Val: "123456"}, + Expected: results.Violations( + &validate.Violation{ + Field: results.FieldPath("val"), + Rule: results.FieldPath("string.decimal"), + RuleId: proto.String("string.decimal.precision"), + }, + ), + }, + "decimal/scale/valid": { + Message: &cases.StringDecimalScale{Val: "0.12"}, + Expected: results.Success(true), + }, + "decimal/scale/invalid": { + Message: &cases.StringDecimalScale{Val: "0.123"}, + Expected: results.Violations( + &validate.Violation{ + Field: results.FieldPath("val"), + Rule: results.FieldPath("string.decimal"), + RuleId: proto.String("string.decimal.scale"), + }, + ), + }, + "decimal/precision_scale/valid": { + Message: &cases.StringDecimalPrecisionScale{Val: "1234.56"}, + Expected: results.Success(true), + }, + "decimal/precision_scale/invalid": { + Message: &cases.StringDecimalPrecisionScale{Val: "12345.6"}, + Expected: results.Violations( + &validate.Violation{ + Field: results.FieldPath("val"), + Rule: results.FieldPath("string.decimal"), + RuleId: proto.String("string.decimal.precision_scale"), + }, + ), + }, "in/valid": { Message: &cases.StringIn{Val: "baz"}, Expected: results.Success(true),