AnyRules describe rules applied exclusively to the google.protobuf.Any well-known type.
AnyRules describe rules applied exclusively to the google.protobuf.Any well-known type.
Optional[customReturns a safe value for JSON logs.
Returns a safe value for JSON logs.
Optional[unknownPreserves protobuf fields that this SDK version does not recognize.
Contains the fully qualified protobuf type name.
in requires the field's type_url to be equal to one of the
specified values. If it doesn't match any of the specified values, an error
message is generated.
message MyAny {
// The `value` field must have a `type_url` equal to one of the specified values.
google.protobuf.Any value = 1 [(buf.validate.field).any = {
in: ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]
}];
}
requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
message MyAny {
// The `value` field must not have a `type_url` equal to any of the specified values.
google.protobuf.Any value = 1 [(buf.validate.field).any = {
not_in: ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]
}];
}
AnyRules describe rules applied exclusively to the
google.protobuf.Anywell-known type.