diff --git a/proto/protovalidate/buf/validate/validate.proto b/proto/protovalidate/buf/validate/validate.proto index 043e440..5519201 100644 --- a/proto/protovalidate/buf/validate/validate.proto +++ b/proto/protovalidate/buf/validate/validate.proto @@ -4748,32 +4748,3 @@ message TimestampRules { // [1]: https://github.com/protocolbuffers/protobuf/blob/main/docs/options.md extensions 1000 to max; } - -// `Violation` represents a single instance where a validation rule, expressed -// as a `Constraint`, was not met. It provides information about the field that -// caused the violation, the specific constraint that wasn't fulfilled, and a -// human-readable error message. -// -// ```json -// { -// "fieldPath": "bar", -// "constraintId": "foo.bar", -// "message": "bar must be greater than 0" -// } -// ``` -message Violation { - // `field_path` is a machine-readable identifier that points to the specific field that failed the validation. - // This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation. - optional string field_path = 1; - - // `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled. - // This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated. - optional string constraint_id = 2; - - // `message` is a human-readable error message that describes the nature of the violation. - // This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation. - optional string message = 3; - - // `for_key` indicates whether the violation was caused by a map key, rather than a value. - optional bool for_key = 4; -} diff --git a/tools/internal/gen/buf/validate/validate.pb.go b/tools/internal/gen/buf/validate/validate.pb.go index 7fc68f6..38bc18f 100644 --- a/tools/internal/gen/buf/validate/validate.pb.go +++ b/tools/internal/gen/buf/validate/validate.pb.go @@ -6696,98 +6696,6 @@ func (*TimestampRules_Gte) isTimestampRules_GreaterThan() {} func (*TimestampRules_GtNow) isTimestampRules_GreaterThan() {} -// `Violation` represents a single instance where a validation rule, expressed -// as a `Constraint`, was not met. It provides information about the field that -// caused the violation, the specific constraint that wasn't fulfilled, and a -// human-readable error message. -// -// ```json -// -// { -// "fieldPath": "bar", -// "constraintId": "foo.bar", -// "message": "bar must be greater than 0" -// } -// -// ``` -type Violation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // `field_path` is a machine-readable identifier that points to the specific field that failed the validation. - // This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation. - FieldPath *string `protobuf:"bytes,1,opt,name=field_path,json=fieldPath" json:"field_path,omitempty"` - // `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled. - // This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated. - ConstraintId *string `protobuf:"bytes,2,opt,name=constraint_id,json=constraintId" json:"constraint_id,omitempty"` - // `message` is a human-readable error message that describes the nature of the violation. - // This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation. - Message *string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` - // `for_key` indicates whether the violation was caused by a map key, rather than a value. - ForKey *bool `protobuf:"varint,4,opt,name=for_key,json=forKey" json:"for_key,omitempty"` -} - -func (x *Violation) Reset() { - *x = Violation{} - if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_validate_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Violation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Violation) ProtoMessage() {} - -func (x *Violation) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Violation.ProtoReflect.Descriptor instead. -func (*Violation) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{26} -} - -func (x *Violation) GetFieldPath() string { - if x != nil && x.FieldPath != nil { - return *x.FieldPath - } - return "" -} - -func (x *Violation) GetConstraintId() string { - if x != nil && x.ConstraintId != nil { - return *x.ConstraintId - } - return "" -} - -func (x *Violation) GetMessage() string { - if x != nil && x.Message != nil { - return *x.Message - } - return "" -} - -func (x *Violation) GetForKey() bool { - if x != nil && x.ForKey != nil { - return *x.ForKey - } - return false -} - var file_buf_validate_validate_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptorpb.MessageOptions)(nil), @@ -10161,67 +10069,58 @@ var file_buf_validate_validate_proto_rawDesc = []byte{ 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x67, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x22, 0x82, 0x01, 0x0a, 0x09, 0x56, 0x69, - 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, - 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x2a, 0x9d, - 0x01, 0x0a, 0x06, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x49, 0x47, 0x4e, - 0x4f, 0x52, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x19, 0x0a, 0x15, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x55, - 0x4e, 0x50, 0x4f, 0x50, 0x55, 0x4c, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, - 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, - 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x47, 0x4e, - 0x4f, 0x52, 0x45, 0x5f, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x0c, - 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x10, 0x01, 0x1a, 0x02, - 0x08, 0x01, 0x12, 0x16, 0x0a, 0x0e, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x44, 0x45, 0x46, - 0x41, 0x55, 0x4c, 0x54, 0x10, 0x02, 0x1a, 0x02, 0x08, 0x01, 0x1a, 0x02, 0x10, 0x01, 0x2a, 0x6e, - 0x0a, 0x0a, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x17, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x52, 0x45, 0x47, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x5f, 0x52, 0x45, 0x47, 0x45, 0x58, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x48, 0x45, - 0x41, 0x44, 0x45, 0x52, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x52, 0x45, 0x47, 0x45, 0x58, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x5f, - 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x3a, 0x5c, - 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x87, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, - 0x6e, 0x74, 0x73, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x54, 0x0a, 0x05, - 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x87, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x75, - 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, - 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x6f, 0x6e, 0x65, - 0x6f, 0x66, 0x3a, 0x54, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x87, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, - 0x73, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x63, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, - 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x2a, 0x9d, 0x01, 0x0a, 0x06, 0x49, 0x67, + 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, + 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x55, 0x4e, 0x50, 0x4f, 0x50, 0x55, + 0x4c, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x49, 0x47, 0x4e, 0x4f, 0x52, + 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x56, 0x41, 0x4c, + 0x55, 0x45, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x41, + 0x4c, 0x57, 0x41, 0x59, 0x53, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x0c, 0x49, 0x47, 0x4e, 0x4f, 0x52, + 0x45, 0x5f, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x16, 0x0a, + 0x0e, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, + 0x02, 0x1a, 0x02, 0x08, 0x01, 0x1a, 0x02, 0x10, 0x01, 0x2a, 0x6e, 0x0a, 0x0a, 0x4b, 0x6e, 0x6f, + 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x17, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x5f, 0x52, 0x45, 0x47, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x52, 0x45, + 0x47, 0x45, 0x58, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, + 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, + 0x52, 0x45, 0x47, 0x45, 0x58, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, + 0x52, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x3a, 0x5c, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x87, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, + 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x54, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, + 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x87, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x43, 0x6f, 0x6e, 0x73, 0x74, + 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x3a, 0x54, 0x0a, + 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x88, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, - 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x64, - 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, - 0x73, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x42, 0xb5, 0x01, - 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x42, 0x0d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0xa2, 0x02, 0x03, 0x42, 0x56, 0x58, 0xaa, 0x02, 0x0c, 0x42, - 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0xca, 0x02, 0x0c, 0x42, 0x75, - 0x66, 0x5c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0xe2, 0x02, 0x18, 0x42, 0x75, 0x66, - 0x5c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x87, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, + 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x3a, 0x63, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, + 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x88, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, + 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x0a, 0x70, 0x72, + 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x42, 0xb5, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, + 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x42, 0x0d, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0xa2, 0x02, 0x03, 0x42, 0x56, 0x58, 0xaa, 0x02, 0x0c, 0x42, 0x75, 0x66, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0xca, 0x02, 0x0c, 0x42, 0x75, 0x66, 0x5c, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0xe2, 0x02, 0x18, 0x42, 0x75, 0x66, 0x5c, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0d, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, } var ( @@ -10237,7 +10136,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, 27) +var file_buf_validate_validate_proto_msgTypes = make([]protoimpl.MessageInfo, 26) var file_buf_validate_validate_proto_goTypes = []any{ (Ignore)(0), // 0: buf.validate.Ignore (KnownRegex)(0), // 1: buf.validate.KnownRegex @@ -10267,12 +10166,11 @@ var file_buf_validate_validate_proto_goTypes = []any{ (*AnyRules)(nil), // 25: buf.validate.AnyRules (*DurationRules)(nil), // 26: buf.validate.DurationRules (*TimestampRules)(nil), // 27: buf.validate.TimestampRules - (*Violation)(nil), // 28: buf.validate.Violation - (*durationpb.Duration)(nil), // 29: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 30: google.protobuf.Timestamp - (*descriptorpb.MessageOptions)(nil), // 31: google.protobuf.MessageOptions - (*descriptorpb.OneofOptions)(nil), // 32: google.protobuf.OneofOptions - (*descriptorpb.FieldOptions)(nil), // 33: google.protobuf.FieldOptions + (*durationpb.Duration)(nil), // 28: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 29: google.protobuf.Timestamp + (*descriptorpb.MessageOptions)(nil), // 30: google.protobuf.MessageOptions + (*descriptorpb.OneofOptions)(nil), // 31: google.protobuf.OneofOptions + (*descriptorpb.FieldOptions)(nil), // 32: google.protobuf.FieldOptions } var file_buf_validate_validate_proto_depIdxs = []int32{ 2, // 0: buf.validate.MessageConstraints.cel:type_name -> buf.validate.Constraint @@ -10304,25 +10202,25 @@ var file_buf_validate_validate_proto_depIdxs = []int32{ 5, // 26: buf.validate.RepeatedRules.items:type_name -> buf.validate.FieldConstraints 5, // 27: buf.validate.MapRules.keys:type_name -> buf.validate.FieldConstraints 5, // 28: buf.validate.MapRules.values:type_name -> buf.validate.FieldConstraints - 29, // 29: buf.validate.DurationRules.const:type_name -> google.protobuf.Duration - 29, // 30: buf.validate.DurationRules.lt:type_name -> google.protobuf.Duration - 29, // 31: buf.validate.DurationRules.lte:type_name -> google.protobuf.Duration - 29, // 32: buf.validate.DurationRules.gt:type_name -> google.protobuf.Duration - 29, // 33: buf.validate.DurationRules.gte:type_name -> google.protobuf.Duration - 29, // 34: buf.validate.DurationRules.in:type_name -> google.protobuf.Duration - 29, // 35: buf.validate.DurationRules.not_in:type_name -> google.protobuf.Duration - 29, // 36: buf.validate.DurationRules.example:type_name -> google.protobuf.Duration - 30, // 37: buf.validate.TimestampRules.const:type_name -> google.protobuf.Timestamp - 30, // 38: buf.validate.TimestampRules.lt:type_name -> google.protobuf.Timestamp - 30, // 39: buf.validate.TimestampRules.lte:type_name -> google.protobuf.Timestamp - 30, // 40: buf.validate.TimestampRules.gt:type_name -> google.protobuf.Timestamp - 30, // 41: buf.validate.TimestampRules.gte:type_name -> google.protobuf.Timestamp - 29, // 42: buf.validate.TimestampRules.within:type_name -> google.protobuf.Duration - 30, // 43: buf.validate.TimestampRules.example:type_name -> google.protobuf.Timestamp - 31, // 44: buf.validate.message:extendee -> google.protobuf.MessageOptions - 32, // 45: buf.validate.oneof:extendee -> google.protobuf.OneofOptions - 33, // 46: buf.validate.field:extendee -> google.protobuf.FieldOptions - 33, // 47: buf.validate.predefined:extendee -> google.protobuf.FieldOptions + 28, // 29: buf.validate.DurationRules.const:type_name -> google.protobuf.Duration + 28, // 30: buf.validate.DurationRules.lt:type_name -> google.protobuf.Duration + 28, // 31: buf.validate.DurationRules.lte:type_name -> google.protobuf.Duration + 28, // 32: buf.validate.DurationRules.gt:type_name -> google.protobuf.Duration + 28, // 33: buf.validate.DurationRules.gte:type_name -> google.protobuf.Duration + 28, // 34: buf.validate.DurationRules.in:type_name -> google.protobuf.Duration + 28, // 35: buf.validate.DurationRules.not_in:type_name -> google.protobuf.Duration + 28, // 36: buf.validate.DurationRules.example:type_name -> google.protobuf.Duration + 29, // 37: buf.validate.TimestampRules.const:type_name -> google.protobuf.Timestamp + 29, // 38: buf.validate.TimestampRules.lt:type_name -> google.protobuf.Timestamp + 29, // 39: buf.validate.TimestampRules.lte:type_name -> google.protobuf.Timestamp + 29, // 40: buf.validate.TimestampRules.gt:type_name -> google.protobuf.Timestamp + 29, // 41: buf.validate.TimestampRules.gte:type_name -> google.protobuf.Timestamp + 28, // 42: buf.validate.TimestampRules.within:type_name -> google.protobuf.Duration + 29, // 43: buf.validate.TimestampRules.example:type_name -> google.protobuf.Timestamp + 30, // 44: buf.validate.message:extendee -> google.protobuf.MessageOptions + 31, // 45: buf.validate.oneof:extendee -> google.protobuf.OneofOptions + 32, // 46: buf.validate.field:extendee -> google.protobuf.FieldOptions + 32, // 47: buf.validate.predefined:extendee -> google.protobuf.FieldOptions 3, // 48: buf.validate.message:type_name -> buf.validate.MessageConstraints 4, // 49: buf.validate.oneof:type_name -> buf.validate.OneofConstraints 5, // 50: buf.validate.field:type_name -> buf.validate.FieldConstraints @@ -10692,18 +10590,6 @@ func file_buf_validate_validate_proto_init() { return nil } } - file_buf_validate_validate_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*Violation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } file_buf_validate_validate_proto_msgTypes[3].OneofWrappers = []any{ (*FieldConstraints_Float)(nil), @@ -10845,7 +10731,7 @@ func file_buf_validate_validate_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_buf_validate_validate_proto_rawDesc, NumEnums: 2, - NumMessages: 27, + NumMessages: 26, NumExtensions: 4, NumServices: 0, },