diff --git a/.github/workflows/buf.yaml b/.github/workflows/buf.yaml index 512d46e..4c83cf2 100644 --- a/.github/workflows/buf.yaml +++ b/.github/workflows/buf.yaml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1 - name: Install buf diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5b39e07..9a0bd1b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,7 +21,7 @@ jobs: go-version: [ oldstable, stable ] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1 - name: Install go diff --git a/.github/workflows/conformance.yaml b/.github/workflows/conformance.yaml index a70fb1e..5d235a1 100644 --- a/.github/workflows/conformance.yaml +++ b/.github/workflows/conformance.yaml @@ -20,7 +20,7 @@ jobs: go-version: [ 'stable', 'oldstable' ] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1 - name: Install go diff --git a/Makefile b/Makefile index 59a0719..da1af02 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ ARGS ?= --strict --strict_message --strict_error # Set to use a different version of protovalidate-conformance. # Should be kept in sync with the version referenced in proto/buf.lock and # 'buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go' in go.mod. -CONFORMANCE_VERSION ?= v0.4.2 +CONFORMANCE_VERSION ?= v0.4.3 .PHONY: help help: ## Describe useful make targets diff --git a/README.md b/README.md index 1d8aa0a..9f219b8 100644 --- a/README.md +++ b/README.md @@ -159,11 +159,11 @@ validator, err := protovalidate.New( ) ``` -Lazy mode requires usage of a mutex to keep the validator thread-safe, which -results in about 50% of CPU time spent obtaining a read lock. While [performance](#performance) -is sub-microsecond, the mutex overhead can be further reduced by disabling lazy -mode with the `WithDisableLazy` option. Note that all expected messages must be -provided during initialization of the validator: +Lazy mode uses a copy on write cache stategy to reduce the required locking. +While [performance](#performance) is sub-microsecond, the overhead can be +further reduced by disabling lazy mode with the `WithDisableLazy` option. +Note that all expected messages must be provided during initialization of the +validator: ```go validator, err := protovalidate.New( @@ -200,25 +200,17 @@ initial cold start, validation on a message is sub-microsecond and only allocates in the event of a validation error. ``` -[circa 15 May 2023] +[circa 24 August 2023] goos: darwin goarch: arm64 pkg: github.com/bufbuild/protovalidate-go -BenchmarkValidator -BenchmarkValidator/ColdStart -BenchmarkValidator/ColdStart-10 4372 276457 ns/op 470780 B/op 9255 allocs/op -BenchmarkValidator/Lazy/Valid -BenchmarkValidator/Lazy/Valid-10 9022392 134.1 ns/op 0 B/op 0 allocs/op -BenchmarkValidator/Lazy/Invalid -BenchmarkValidator/Lazy/Invalid-10 3416996 355.9 ns/op 632 B/op 14 allocs/op -BenchmarkValidator/Lazy/FailFast -BenchmarkValidator/Lazy/FailFast-10 6751131 172.6 ns/op 168 B/op 3 allocs/op -BenchmarkValidator/PreWarmed/Valid -BenchmarkValidator/PreWarmed/Valid-10 17557560 69.10 ns/op 0 B/op 0 allocs/op -BenchmarkValidator/PreWarmed/Invalid -BenchmarkValidator/PreWarmed/Invalid-10 3621961 332.9 ns/op 632 B/op 14 allocs/op -BenchmarkValidator/PreWarmed/FailFast -BenchmarkValidator/PreWarmed/FailFast-10 13960359 92.22 ns/op 168 B/op 3 allocs/op +BenchmarkValidator/ColdStart-8 5294 219906 ns/op 431759 B/op 5803 allocs/op +BenchmarkValidator/Lazy/Valid-8 9725028 114.7 ns/op 0 B/op 0 allocs/op +BenchmarkValidator/Lazy/Invalid-8 3060620 383.5 ns/op 649 B/op 15 allocs/op +BenchmarkValidator/Lazy/FailFast-8 11999664 98.17 ns/op 168 B/op 3 allocs/op +BenchmarkValidator/PreWarmed/Valid-8 11031498 112.0 ns/op 0 B/op 0 allocs/op +BenchmarkValidator/PreWarmed/Invalid-8 3132213 391.1 ns/op 649 B/op 15 allocs/op +BenchmarkValidator/PreWarmed/FailFast-8 12277747 99.36 ns/op 168 B/op 3 allocs/op PASS ``` @@ -240,4 +232,4 @@ Offered under the [Apache 2 license][license]. [cel-spec]: https://github.com/google/cel-spec [pv-cc]: https://github.com/bufbuild/protovalidate-cc [pv-java]: https://github.com/bufbuild/protovalidate-java -[pv-python]: https://github.com/bufbuild/protovalidate-python \ No newline at end of file +[pv-python]: https://github.com/bufbuild/protovalidate-python diff --git a/go.mod b/go.mod index e43500a..f741f53 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,9 @@ module github.com/bufbuild/protovalidate-go go 1.18 require ( - buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230824200731-b9b8148056b9.1 + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230914171853-63dfe56cc2c4.1 github.com/envoyproxy/protoc-gen-validate v1.0.2 - github.com/google/cel-go v0.17.4 + github.com/google/cel-go v0.18.0 github.com/stretchr/testify v1.8.4 google.golang.org/protobuf v1.31.0 ) @@ -17,10 +17,10 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/text v0.10.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/text v0.13.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 2412f00..6ee5263 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,5 @@ -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230822184709-ff921ee11715.1 h1:r2G+piWhGMS0eEvh//C6qtGDTkQCzafOquDWDve4wuE= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230822184709-ff921ee11715.1/go.mod h1:xafc+XIsTxTy76GJQ1TKgvJWsSugFBqMaN27WhUblew= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230823200319-c646c9dcc359.1 h1:864ML8zjxPGSX+koebjI3fZ8AhrE+O+XhrfTUJerGQU= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230823200319-c646c9dcc359.1/go.mod h1:xafc+XIsTxTy76GJQ1TKgvJWsSugFBqMaN27WhUblew= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230824200731-b9b8148056b9.1 h1:9Ea7lsYYvoyqmq79GbCy6POXHrZbC+pHs+6lGNx9IBQ= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230824200731-b9b8148056b9.1/go.mod h1:xafc+XIsTxTy76GJQ1TKgvJWsSugFBqMaN27WhUblew= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230914171853-63dfe56cc2c4.1 h1:2gmp+PRca1fqQHf/WMKOgu9inVb0R0N07TucgY3QZCQ= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230914171853-63dfe56cc2c4.1/go.mod h1:xafc+XIsTxTy76GJQ1TKgvJWsSugFBqMaN27WhUblew= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9 h1:goHVqTbFX3AIo0tzGr14pgfAW2ZfPChKO21Z9MGf/gk= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -13,10 +9,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/google/cel-go v0.17.3 h1:ZlOIurzzCpD3d68sIvTVqDnYAd170BPTui5kyMKpy7s= -github.com/google/cel-go v0.17.3/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= -github.com/google/cel-go v0.17.4 h1:9556LOjSyIZlgnT0oaCYGq2uk9BM6fzuTXhzYHskonk= -github.com/google/cel-go v0.17.4/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= +github.com/google/cel-go v0.18.0 h1:u74MPiEC8mejBrkXqrTWT102g5IFEUjxOngzQIijMzU= +github.com/google/cel-go v0.18.0/go.mod h1:PVAybmSnWkNMUZR/tEWFUiJ1Np4Hz0MHsZJcgC4zln4= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= @@ -37,15 +31,15 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= -golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb h1:lK0oleSc7IQsUxO3U5TjL9DWlsxpEBemh+zpB7IqhWI= +google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb h1:Isk1sSH7bovx8Rti2wZK0UZF6oraBDK74uoyLEEVFN0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= diff --git a/internal/celext/lib.go b/internal/celext/lib.go index baef7df..1a70b61 100644 --- a/internal/celext/lib.go +++ b/internal/celext/lib.go @@ -61,7 +61,7 @@ func (l lib) CompileOptions() []cel.EnvOption { cel.CrossTypeNumericComparisons(true), cel.EagerlyValidateDeclarations(true), // TODO: reduce this to just the functionality we want to support - ext.Strings(), + ext.Strings(ext.StringsValidateFormatCalls(true)), cel.Variable("now", cel.TimestampType), cel.Function("unique", l.uniqueMemberOverload(cel.BoolType, l.uniqueScalar), @@ -268,7 +268,6 @@ func (l lib) ProgramOptions() []cel.ProgramOption { return []cel.ProgramOption{ cel.EvalOptions( cel.OptOptimize, - cel.OptCheckStringFormat, ), } } diff --git a/internal/constraints/cache.go b/internal/constraints/cache.go index eb805c4..bb2edf7 100644 --- a/internal/constraints/cache.go +++ b/internal/constraints/cache.go @@ -176,12 +176,9 @@ func (c *Cache) getCELType(fieldDesc protoreflect.FieldDescriptor, forItems bool if !forItems { switch { case fieldDesc.IsMap(): - return cel.MapType( - c.getCELType(fieldDesc.MapKey(), true), - c.getCELType(fieldDesc.MapValue(), true), - ) + return cel.MapType(cel.DynType, cel.DynType) case fieldDesc.IsList(): - return cel.ListType(c.getCELType(fieldDesc, true)) + return cel.ListType(cel.DynType) } } diff --git a/internal/constraints/cache_test.go b/internal/constraints/cache_test.go index c7abef2..e7fa495 100644 --- a/internal/constraints/cache_test.go +++ b/internal/constraints/cache_test.go @@ -208,11 +208,11 @@ func TestCache_GetCELType(t *testing.T) { }{ { desc: getFieldDesc(t, &cases.MapNone{}, "val"), - ex: cel.MapType(cel.UintType, cel.BoolType), + ex: cel.MapType(cel.DynType, cel.DynType), }, { desc: getFieldDesc(t, &cases.RepeatedNone{}, "val"), - ex: cel.ListType(cel.IntType), + ex: cel.ListType(cel.DynType), }, { desc: getFieldDesc(t, &cases.RepeatedNone{}, "val"), diff --git a/internal/evaluator/builder.go b/internal/evaluator/builder.go index 25acb39..a465504 100644 --- a/internal/evaluator/builder.go +++ b/internal/evaluator/builder.go @@ -16,6 +16,7 @@ package evaluator import ( "sync" + "sync/atomic" "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" "github.com/bufbuild/protovalidate-go/internal/constraints" @@ -29,11 +30,8 @@ import ( // Builder is a build-through cache of message evaluators keyed off the provided // descriptor. type Builder struct { - // TODO: (TCN-1708) based on benchmarks, about 50% of CPU time is spent obtaining a read - // lock on this mutex. Ideally, this can be reworked to be thread-safe while - // minimizing the need to obtain a lock. - mtx sync.RWMutex - cache map[protoreflect.MessageDescriptor]*message + mtx sync.Mutex // serializes cache writes. + cache atomic.Pointer[MessageCache] // copy-on-write cache. env *cel.Env constraints constraints.Cache resolver StandardConstraintResolver @@ -48,7 +46,6 @@ func NewBuilder( seedDesc ...protoreflect.MessageDescriptor, ) *Builder { bldr := &Builder{ - cache: map[protoreflect.MessageDescriptor]*message{}, env: env, constraints: constraints.NewCache(), resolver: res, @@ -60,10 +57,11 @@ func NewBuilder( bldr.Load = bldr.loadOrBuild } + cache := make(MessageCache, len(seedDesc)) for _, desc := range seedDesc { - bldr.build(desc) + bldr.build(desc, cache) } - + bldr.cache.Store(&cache) return bldr } @@ -71,7 +69,7 @@ func NewBuilder( // the descriptor is unknown, returns an evaluator that always resolves to a // errors.CompilationError. func (bldr *Builder) load(desc protoreflect.MessageDescriptor) MessageEvaluator { - if eval, ok := bldr.cache[desc]; ok { + if eval, ok := (*bldr.cache.Load())[desc]; ok { return eval } return unknownMessage{desc: desc} @@ -81,29 +79,38 @@ func (bldr *Builder) load(desc protoreflect.MessageDescriptor) MessageEvaluator // descriptor, or lazily constructs a new one. This method is thread-safe via // locking. func (bldr *Builder) loadOrBuild(desc protoreflect.MessageDescriptor) MessageEvaluator { - bldr.mtx.RLock() - if eval, ok := bldr.cache[desc]; ok { - bldr.mtx.RUnlock() + if eval, ok := (*bldr.cache.Load())[desc]; ok { return eval } - bldr.mtx.RUnlock() - bldr.mtx.Lock() defer bldr.mtx.Unlock() - return bldr.build(desc) + cache := *bldr.cache.Load() + if eval, ok := cache[desc]; ok { + return eval + } + newCache := cache.Clone() + msgEval := bldr.build(desc, newCache) + bldr.cache.Store(&newCache) + return msgEval } -func (bldr *Builder) build(desc protoreflect.MessageDescriptor) *message { - if eval, ok := bldr.cache[desc]; ok { +func (bldr *Builder) build( + desc protoreflect.MessageDescriptor, + cache MessageCache, +) *message { + if eval, ok := cache[desc]; ok { return eval } msgEval := &message{} - bldr.cache[desc] = msgEval - bldr.buildMessage(desc, msgEval) + cache[desc] = msgEval + bldr.buildMessage(desc, msgEval, cache) return msgEval } -func (bldr *Builder) buildMessage(desc protoreflect.MessageDescriptor, msgEval *message) { +func (bldr *Builder) buildMessage( + desc protoreflect.MessageDescriptor, msgEval *message, + cache MessageCache, +) { msgConstraints := bldr.resolver.ResolveMessageConstraints(desc) if msgConstraints.GetDisabled() { return @@ -113,6 +120,7 @@ func (bldr *Builder) buildMessage(desc protoreflect.MessageDescriptor, msgEval * desc protoreflect.MessageDescriptor, msgConstraints *validate.MessageConstraints, msg *message, + cache MessageCache, ){ bldr.processMessageExpressions, bldr.processOneofConstraints, @@ -120,7 +128,7 @@ func (bldr *Builder) buildMessage(desc protoreflect.MessageDescriptor, msgEval * } for _, step := range steps { - if step(desc, msgConstraints, msgEval); msgEval.Err != nil { + if step(desc, msgConstraints, msgEval, cache); msgEval.Err != nil { break } } @@ -130,6 +138,7 @@ func (bldr *Builder) processMessageExpressions( desc protoreflect.MessageDescriptor, msgConstraints *validate.MessageConstraints, msgEval *message, + _ MessageCache, ) { compiledExprs, err := expression.Compile( msgConstraints.GetCel(), @@ -149,6 +158,7 @@ func (bldr *Builder) processOneofConstraints( desc protoreflect.MessageDescriptor, _ *validate.MessageConstraints, msgEval *message, + _ MessageCache, ) { oneofs := desc.Oneofs() for i := 0; i < oneofs.Len(); i++ { @@ -166,12 +176,13 @@ func (bldr *Builder) processFields( desc protoreflect.MessageDescriptor, _ *validate.MessageConstraints, msgEval *message, + cache MessageCache, ) { fields := desc.Fields() for i := 0; i < fields.Len(); i++ { fdesc := fields.Get(i) fieldConstraints := bldr.resolver.ResolveFieldConstraints(fdesc) - fldEval, err := bldr.buildField(fdesc, fieldConstraints) + fldEval, err := bldr.buildField(fdesc, fieldConstraints, cache) if err != nil { msgEval.Err = err return @@ -183,13 +194,14 @@ func (bldr *Builder) processFields( func (bldr *Builder) buildField( fieldDescriptor protoreflect.FieldDescriptor, fieldConstraints *validate.FieldConstraints, + cache MessageCache, ) (field, error) { fld := field{ Descriptor: fieldDescriptor, Required: fieldConstraints.GetRequired(), Optional: fieldDescriptor.HasPresence(), } - err := bldr.buildValue(fieldDescriptor, fieldConstraints, false, &fld.Value) + err := bldr.buildValue(fieldDescriptor, fieldConstraints, false, &fld.Value, cache) return fld, err } @@ -198,6 +210,7 @@ func (bldr *Builder) buildValue( constraints *validate.FieldConstraints, forItems bool, valEval *value, + cache MessageCache, ) (err error) { valEval.IgnoreEmpty = constraints.GetIgnoreEmpty() steps := []func( @@ -205,6 +218,7 @@ func (bldr *Builder) buildValue( fieldConstraints *validate.FieldConstraints, forItems bool, valEval *value, + cache MessageCache, ) error{ bldr.processZeroValue, bldr.processFieldExpressions, @@ -218,7 +232,7 @@ func (bldr *Builder) buildValue( } for _, step := range steps { - if err = step(fdesc, constraints, forItems, valEval); err != nil { + if err = step(fdesc, constraints, forItems, valEval, cache); err != nil { return err } } @@ -230,6 +244,7 @@ func (bldr *Builder) processZeroValue( _ *validate.FieldConstraints, forItems bool, val *value, + _ MessageCache, ) error { val.Zero = fdesc.Default() if forItems && fdesc.IsList() { @@ -244,6 +259,7 @@ func (bldr *Builder) processFieldExpressions( fieldConstraints *validate.FieldConstraints, _ bool, eval *value, + _ MessageCache, ) error { exprs := fieldConstraints.GetCel() if len(exprs) == 0 { @@ -275,6 +291,7 @@ func (bldr *Builder) processEmbeddedMessage( rules *validate.FieldConstraints, forItems bool, valEval *value, + cache MessageCache, ) error { if fdesc.Kind() != protoreflect.MessageKind || rules.GetSkipped() || @@ -282,7 +299,7 @@ func (bldr *Builder) processEmbeddedMessage( return nil } - embedEval := bldr.build(fdesc.Message()) + embedEval := bldr.build(fdesc.Message(), cache) if err := embedEval.Err; err != nil { return errors.NewCompilationErrorf( "failed to compile embedded type %s for %s: %w", @@ -298,6 +315,7 @@ func (bldr *Builder) processWrapperConstraints( rules *validate.FieldConstraints, forItems bool, valEval *value, + cache MessageCache, ) error { if fdesc.Kind() != protoreflect.MessageKind || rules.GetSkipped() || @@ -310,7 +328,7 @@ func (bldr *Builder) processWrapperConstraints( return nil } var unwrapped value - err := bldr.buildValue(fdesc.Message().Fields().ByName("value"), rules, true, &unwrapped) + err := bldr.buildValue(fdesc.Message().Fields().ByName("value"), rules, true, &unwrapped, cache) if err != nil { return err } @@ -323,6 +341,7 @@ func (bldr *Builder) processStandardConstraints( constraints *validate.FieldConstraints, forItems bool, valEval *value, + _ MessageCache, ) error { stdConstraints, err := bldr.constraints.Build( bldr.env, @@ -342,6 +361,7 @@ func (bldr *Builder) processAnyConstraints( fieldConstraints *validate.FieldConstraints, forItems bool, valEval *value, + _ MessageCache, ) error { if (fdesc.IsList() && !forItems) || fdesc.Kind() != protoreflect.MessageKind || @@ -364,6 +384,7 @@ func (bldr *Builder) processEnumConstraints( fieldConstraints *validate.FieldConstraints, _ bool, valEval *value, + _ MessageCache, ) error { if fdesc.Kind() != protoreflect.EnumKind { return nil @@ -379,6 +400,7 @@ func (bldr *Builder) processMapConstraints( constraints *validate.FieldConstraints, _ bool, valEval *value, + cache MessageCache, ) error { if !fieldDesc.IsMap() { return nil @@ -390,7 +412,8 @@ func (bldr *Builder) processMapConstraints( fieldDesc.MapKey(), constraints.GetMap().GetKeys(), true, - &mapEval.KeyConstraints) + &mapEval.KeyConstraints, + cache) if err != nil { return errors.NewCompilationErrorf( "failed to compile key constraints for map %s: %w", @@ -401,7 +424,8 @@ func (bldr *Builder) processMapConstraints( fieldDesc.MapValue(), constraints.GetMap().GetValues(), true, - &mapEval.ValueConstraints) + &mapEval.ValueConstraints, + cache) if err != nil { return errors.NewCompilationErrorf( "failed to compile value constraints for map %s: %w", @@ -417,13 +441,14 @@ func (bldr *Builder) processRepeatedConstraints( fieldConstraints *validate.FieldConstraints, forItems bool, valEval *value, + cache MessageCache, ) error { if !fdesc.IsList() || forItems { return nil } var listEval listItems - err := bldr.buildValue(fdesc, fieldConstraints.GetRepeated().GetItems(), true, &listEval.ItemConstraints) + err := bldr.buildValue(fdesc, fieldConstraints.GetRepeated().GetItems(), true, &listEval.ItemConstraints, cache) if err != nil { return errors.NewCompilationErrorf( "failed to compile items constraints for repeated %v: %w", fdesc.FullName(), err) @@ -432,3 +457,16 @@ func (bldr *Builder) processRepeatedConstraints( valEval.Append(listEval) return nil } + +type MessageCache map[protoreflect.MessageDescriptor]*message + +func (c MessageCache) Clone() MessageCache { + newCache := make(MessageCache, len(c)+1) + c.SyncTo(newCache) + return newCache +} +func (c MessageCache) SyncTo(other MessageCache) { + for k, v := range c { + other[k] = v + } +} diff --git a/internal/evaluator/builder_test.go b/internal/evaluator/builder_test.go new file mode 100644 index 0000000..0ac6fa5 --- /dev/null +++ b/internal/evaluator/builder_test.go @@ -0,0 +1,138 @@ +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package evaluator + +import ( + "sync" + "testing" + + "github.com/bufbuild/protovalidate-go/internal/celext" + pb "github.com/bufbuild/protovalidate-go/internal/gen/tests/example/v1" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" +) + +func TestBuildCache(t *testing.T) { + t.Parallel() + + env, err := celext.DefaultEnv(true) + require.NoError(t, err, "failed to construct CEL environment") + bldr := NewBuilder( + env, false, DefaultResolver{}, + ) + wg := sync.WaitGroup{} + for i := 0; i < 100; i++ { + wg.Add(1) + dynamicMsg := dynamicProto{&pb.Person{ + Id: 1234, + Email: "protovalidate@buf.build", + Name: "Protocol Buffer", + }, int32(i)} + desc := dynamicMsg.ProtoReflect().Descriptor() + go func() { + defer wg.Done() + eval := bldr.Load(desc) + assert.NotNil(t, eval) + }() + } + wg.Wait() +} + +type dynamicProto struct { + proto.Message + salt int32 +} + +func (d dynamicProto) ProtoReflect() protoreflect.Message { + return dynamicMessage{d.Message.ProtoReflect(), d.salt} +} + +type dynamicMessage struct { + protoreflect.Message + salt int32 +} + +func (d dynamicMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + d.Message.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { + return f(dynamicFieldDescriptor{fd, d.salt}, v) + }) +} + +func (d dynamicMessage) Has(fd protoreflect.FieldDescriptor) bool { + return d.Message.Has(unwrapFieldDescriptor(fd)) +} +func (d dynamicMessage) Clear(fd protoreflect.FieldDescriptor) { + d.Message.Clear(unwrapFieldDescriptor(fd)) +} +func (d dynamicMessage) Get(fd protoreflect.FieldDescriptor) protoreflect.Value { + return d.Message.Get(unwrapFieldDescriptor(fd)) +} +func (d dynamicMessage) Set(fd protoreflect.FieldDescriptor, v protoreflect.Value) { + d.Message.Set(unwrapFieldDescriptor(fd), v) +} +func (d dynamicMessage) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + return d.Message.Mutable(unwrapFieldDescriptor(fd)) +} +func (d dynamicMessage) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + return d.Message.NewField(unwrapFieldDescriptor(fd)) +} + +func (d dynamicMessage) Descriptor() protoreflect.MessageDescriptor { + return dynamicMessageDescriptor{d.Message.Descriptor(), d.salt} +} + +type dynamicMessageDescriptor struct { + protoreflect.MessageDescriptor + salt int32 +} + +func (d dynamicMessageDescriptor) Fields() protoreflect.FieldDescriptors { + return dynamicFieldDescriptors{d.MessageDescriptor.Fields(), d.salt} +} + +type dynamicFieldDescriptors struct { + protoreflect.FieldDescriptors + salt int32 +} + +func (d dynamicFieldDescriptors) Get(i int) protoreflect.FieldDescriptor { + return dynamicFieldDescriptor{d.FieldDescriptors.Get(i), d.salt} +} +func (d dynamicFieldDescriptors) ByName(s protoreflect.Name) protoreflect.FieldDescriptor { + return dynamicFieldDescriptor{d.FieldDescriptors.ByName(s), d.salt} +} +func (d dynamicFieldDescriptors) ByJSONName(s string) protoreflect.FieldDescriptor { + return dynamicFieldDescriptor{d.FieldDescriptors.ByJSONName(s), d.salt} +} +func (d dynamicFieldDescriptors) ByTextName(s string) protoreflect.FieldDescriptor { + return dynamicFieldDescriptor{d.FieldDescriptors.ByTextName(s), d.salt} +} +func (d dynamicFieldDescriptors) ByNumber(n protoreflect.FieldNumber) protoreflect.FieldDescriptor { + return dynamicFieldDescriptor{d.FieldDescriptors.ByNumber(n), d.salt} +} + +type dynamicFieldDescriptor struct { + protoreflect.FieldDescriptor + salt int32 +} + +func unwrapFieldDescriptor(fd protoreflect.FieldDescriptor) protoreflect.FieldDescriptor { + if d, ok := fd.(dynamicFieldDescriptor); ok { + return d.FieldDescriptor + } + return fd +} diff --git a/internal/gen/buf/validate/conformance/cases/repeated.pb.go b/internal/gen/buf/validate/conformance/cases/repeated.pb.go index 8271594..fda137a 100644 --- a/internal/gen/buf/validate/conformance/cases/repeated.pb.go +++ b/internal/gen/buf/validate/conformance/cases/repeated.pb.go @@ -133,7 +133,7 @@ func (x RepeatedEmbeddedEnumIn_AnotherInEnum) Number() protoreflect.EnumNumber { // Deprecated: Use RepeatedEmbeddedEnumIn_AnotherInEnum.Descriptor instead. func (RepeatedEmbeddedEnumIn_AnotherInEnum) EnumDescriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{16, 0} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{17, 0} } type RepeatedEmbeddedEnumNotIn_AnotherNotInEnum int32 @@ -182,7 +182,7 @@ func (x RepeatedEmbeddedEnumNotIn_AnotherNotInEnum) Number() protoreflect.EnumNu // Deprecated: Use RepeatedEmbeddedEnumNotIn_AnotherNotInEnum.Descriptor instead. func (RepeatedEmbeddedEnumNotIn_AnotherNotInEnum) EnumDescriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{17, 0} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{18, 0} } type Embed struct { @@ -608,6 +608,61 @@ func (x *RepeatedUnique) GetVal() []string { return nil } +type RepeatedMultipleUnique struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + A []string `protobuf:"bytes,1,rep,name=a,proto3" json:"a,omitempty"` + B []int32 `protobuf:"varint,2,rep,packed,name=b,proto3" json:"b,omitempty"` +} + +func (x *RepeatedMultipleUnique) Reset() { + *x = RepeatedMultipleUnique{} + if protoimpl.UnsafeEnabled { + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepeatedMultipleUnique) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepeatedMultipleUnique) ProtoMessage() {} + +func (x *RepeatedMultipleUnique) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[9] + 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 RepeatedMultipleUnique.ProtoReflect.Descriptor instead. +func (*RepeatedMultipleUnique) Descriptor() ([]byte, []int) { + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{9} +} + +func (x *RepeatedMultipleUnique) GetA() []string { + if x != nil { + return x.A + } + return nil +} + +func (x *RepeatedMultipleUnique) GetB() []int32 { + if x != nil { + return x.B + } + return nil +} + type RepeatedItemRule struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -619,7 +674,7 @@ type RepeatedItemRule struct { func (x *RepeatedItemRule) Reset() { *x = RepeatedItemRule{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[9] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -632,7 +687,7 @@ func (x *RepeatedItemRule) String() string { func (*RepeatedItemRule) ProtoMessage() {} func (x *RepeatedItemRule) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[9] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -645,7 +700,7 @@ func (x *RepeatedItemRule) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedItemRule.ProtoReflect.Descriptor instead. func (*RepeatedItemRule) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{9} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{10} } func (x *RepeatedItemRule) GetVal() []float32 { @@ -666,7 +721,7 @@ type RepeatedItemPattern struct { func (x *RepeatedItemPattern) Reset() { *x = RepeatedItemPattern{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[10] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -679,7 +734,7 @@ func (x *RepeatedItemPattern) String() string { func (*RepeatedItemPattern) ProtoMessage() {} func (x *RepeatedItemPattern) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[10] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -692,7 +747,7 @@ func (x *RepeatedItemPattern) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedItemPattern.ProtoReflect.Descriptor instead. func (*RepeatedItemPattern) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{10} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{11} } func (x *RepeatedItemPattern) GetVal() []string { @@ -713,7 +768,7 @@ type RepeatedEmbedSkip struct { func (x *RepeatedEmbedSkip) Reset() { *x = RepeatedEmbedSkip{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[11] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -726,7 +781,7 @@ func (x *RepeatedEmbedSkip) String() string { func (*RepeatedEmbedSkip) ProtoMessage() {} func (x *RepeatedEmbedSkip) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[11] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -739,7 +794,7 @@ func (x *RepeatedEmbedSkip) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedEmbedSkip.ProtoReflect.Descriptor instead. func (*RepeatedEmbedSkip) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{11} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{12} } func (x *RepeatedEmbedSkip) GetVal() []*Embed { @@ -760,7 +815,7 @@ type RepeatedItemIn struct { func (x *RepeatedItemIn) Reset() { *x = RepeatedItemIn{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[12] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -773,7 +828,7 @@ func (x *RepeatedItemIn) String() string { func (*RepeatedItemIn) ProtoMessage() {} func (x *RepeatedItemIn) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[12] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -786,7 +841,7 @@ func (x *RepeatedItemIn) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedItemIn.ProtoReflect.Descriptor instead. func (*RepeatedItemIn) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{12} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{13} } func (x *RepeatedItemIn) GetVal() []string { @@ -807,7 +862,7 @@ type RepeatedItemNotIn struct { func (x *RepeatedItemNotIn) Reset() { *x = RepeatedItemNotIn{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[13] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -820,7 +875,7 @@ func (x *RepeatedItemNotIn) String() string { func (*RepeatedItemNotIn) ProtoMessage() {} func (x *RepeatedItemNotIn) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[13] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -833,7 +888,7 @@ func (x *RepeatedItemNotIn) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedItemNotIn.ProtoReflect.Descriptor instead. func (*RepeatedItemNotIn) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{13} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{14} } func (x *RepeatedItemNotIn) GetVal() []string { @@ -854,7 +909,7 @@ type RepeatedEnumIn struct { func (x *RepeatedEnumIn) Reset() { *x = RepeatedEnumIn{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[14] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -867,7 +922,7 @@ func (x *RepeatedEnumIn) String() string { func (*RepeatedEnumIn) ProtoMessage() {} func (x *RepeatedEnumIn) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[14] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -880,7 +935,7 @@ func (x *RepeatedEnumIn) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedEnumIn.ProtoReflect.Descriptor instead. func (*RepeatedEnumIn) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{14} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{15} } func (x *RepeatedEnumIn) GetVal() []AnEnum { @@ -901,7 +956,7 @@ type RepeatedEnumNotIn struct { func (x *RepeatedEnumNotIn) Reset() { *x = RepeatedEnumNotIn{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[15] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -914,7 +969,7 @@ func (x *RepeatedEnumNotIn) String() string { func (*RepeatedEnumNotIn) ProtoMessage() {} func (x *RepeatedEnumNotIn) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[15] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -927,7 +982,7 @@ func (x *RepeatedEnumNotIn) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedEnumNotIn.ProtoReflect.Descriptor instead. func (*RepeatedEnumNotIn) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{15} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{16} } func (x *RepeatedEnumNotIn) GetVal() []AnEnum { @@ -948,7 +1003,7 @@ type RepeatedEmbeddedEnumIn struct { func (x *RepeatedEmbeddedEnumIn) Reset() { *x = RepeatedEmbeddedEnumIn{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[16] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -961,7 +1016,7 @@ func (x *RepeatedEmbeddedEnumIn) String() string { func (*RepeatedEmbeddedEnumIn) ProtoMessage() {} func (x *RepeatedEmbeddedEnumIn) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[16] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -974,7 +1029,7 @@ func (x *RepeatedEmbeddedEnumIn) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedEmbeddedEnumIn.ProtoReflect.Descriptor instead. func (*RepeatedEmbeddedEnumIn) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{16} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{17} } func (x *RepeatedEmbeddedEnumIn) GetVal() []RepeatedEmbeddedEnumIn_AnotherInEnum { @@ -995,7 +1050,7 @@ type RepeatedEmbeddedEnumNotIn struct { func (x *RepeatedEmbeddedEnumNotIn) Reset() { *x = RepeatedEmbeddedEnumNotIn{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[17] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1008,7 +1063,7 @@ func (x *RepeatedEmbeddedEnumNotIn) String() string { func (*RepeatedEmbeddedEnumNotIn) ProtoMessage() {} func (x *RepeatedEmbeddedEnumNotIn) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[17] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1021,7 +1076,7 @@ func (x *RepeatedEmbeddedEnumNotIn) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedEmbeddedEnumNotIn.ProtoReflect.Descriptor instead. func (*RepeatedEmbeddedEnumNotIn) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{17} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{18} } func (x *RepeatedEmbeddedEnumNotIn) GetVal() []RepeatedEmbeddedEnumNotIn_AnotherNotInEnum { @@ -1042,7 +1097,7 @@ type RepeatedAnyIn struct { func (x *RepeatedAnyIn) Reset() { *x = RepeatedAnyIn{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[18] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1055,7 +1110,7 @@ func (x *RepeatedAnyIn) String() string { func (*RepeatedAnyIn) ProtoMessage() {} func (x *RepeatedAnyIn) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[18] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1068,7 +1123,7 @@ func (x *RepeatedAnyIn) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedAnyIn.ProtoReflect.Descriptor instead. func (*RepeatedAnyIn) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{18} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{19} } func (x *RepeatedAnyIn) GetVal() []*anypb.Any { @@ -1089,7 +1144,7 @@ type RepeatedAnyNotIn struct { func (x *RepeatedAnyNotIn) Reset() { *x = RepeatedAnyNotIn{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[19] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1102,7 +1157,7 @@ func (x *RepeatedAnyNotIn) String() string { func (*RepeatedAnyNotIn) ProtoMessage() {} func (x *RepeatedAnyNotIn) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[19] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1115,7 +1170,7 @@ func (x *RepeatedAnyNotIn) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedAnyNotIn.ProtoReflect.Descriptor instead. func (*RepeatedAnyNotIn) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{19} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{20} } func (x *RepeatedAnyNotIn) GetVal() []*anypb.Any { @@ -1136,7 +1191,7 @@ type RepeatedMinAndItemLen struct { func (x *RepeatedMinAndItemLen) Reset() { *x = RepeatedMinAndItemLen{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[20] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1149,7 +1204,7 @@ func (x *RepeatedMinAndItemLen) String() string { func (*RepeatedMinAndItemLen) ProtoMessage() {} func (x *RepeatedMinAndItemLen) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[20] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1162,7 +1217,7 @@ func (x *RepeatedMinAndItemLen) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedMinAndItemLen.ProtoReflect.Descriptor instead. func (*RepeatedMinAndItemLen) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{20} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{21} } func (x *RepeatedMinAndItemLen) GetVal() []string { @@ -1183,7 +1238,7 @@ type RepeatedMinAndMaxItemLen struct { func (x *RepeatedMinAndMaxItemLen) Reset() { *x = RepeatedMinAndMaxItemLen{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[21] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1196,7 +1251,7 @@ func (x *RepeatedMinAndMaxItemLen) String() string { func (*RepeatedMinAndMaxItemLen) ProtoMessage() {} func (x *RepeatedMinAndMaxItemLen) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[21] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1209,7 +1264,7 @@ func (x *RepeatedMinAndMaxItemLen) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedMinAndMaxItemLen.ProtoReflect.Descriptor instead. func (*RepeatedMinAndMaxItemLen) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{21} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{22} } func (x *RepeatedMinAndMaxItemLen) GetVal() []string { @@ -1230,7 +1285,7 @@ type RepeatedDuration struct { func (x *RepeatedDuration) Reset() { *x = RepeatedDuration{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[22] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1243,7 +1298,7 @@ func (x *RepeatedDuration) String() string { func (*RepeatedDuration) ProtoMessage() {} func (x *RepeatedDuration) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[22] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1256,7 +1311,7 @@ func (x *RepeatedDuration) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedDuration.ProtoReflect.Descriptor instead. func (*RepeatedDuration) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{22} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{23} } func (x *RepeatedDuration) GetVal() []*durationpb.Duration { @@ -1277,7 +1332,7 @@ type RepeatedExactIgnore struct { func (x *RepeatedExactIgnore) Reset() { *x = RepeatedExactIgnore{} if protoimpl.UnsafeEnabled { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[23] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1290,7 +1345,7 @@ func (x *RepeatedExactIgnore) String() string { func (*RepeatedExactIgnore) ProtoMessage() {} func (x *RepeatedExactIgnore) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[23] + mi := &file_buf_validate_conformance_cases_repeated_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1303,7 +1358,7 @@ func (x *RepeatedExactIgnore) ProtoReflect() protoreflect.Message { // Deprecated: Use RepeatedExactIgnore.ProtoReflect.Descriptor instead. func (*RepeatedExactIgnore) Descriptor() ([]byte, []int) { - return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{23} + return file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP(), []int{24} } func (x *RepeatedExactIgnore) GetVal() []uint32 { @@ -1362,123 +1417,128 @@ var file_buf_validate_conformance_cases_repeated_proto_rawDesc = []byte{ 0x08, 0x03, 0x10, 0x03, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x2c, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, - 0x18, 0x01, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x35, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x76, - 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x02, 0x42, 0x0f, 0xba, 0x48, 0x0c, 0x92, 0x01, 0x09, - 0x22, 0x07, 0x0a, 0x05, 0x25, 0x00, 0x00, 0x00, 0x00, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x44, - 0x0a, 0x13, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x50, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x2d, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x42, 0x1b, 0xba, 0x48, 0x18, 0x92, 0x01, 0x15, 0x22, 0x13, 0x72, 0x11, 0x32, 0x0f, - 0x28, 0x3f, 0x69, 0x29, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x52, - 0x03, 0x76, 0x61, 0x6c, 0x22, 0x59, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x45, 0x6d, 0x62, 0x65, 0x64, 0x53, 0x6b, 0x69, 0x70, 0x12, 0x44, 0x0a, 0x03, 0x76, 0x61, 0x6c, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, - 0x65, 0x2e, 0x63, 0x61, 0x73, 0x65, 0x73, 0x2e, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x42, 0x0b, 0xba, - 0x48, 0x08, 0x92, 0x01, 0x05, 0x22, 0x03, 0xc0, 0x01, 0x01, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, - 0x38, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x49, - 0x6e, 0x12, 0x26, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x14, - 0xba, 0x48, 0x11, 0x92, 0x01, 0x0e, 0x22, 0x0c, 0x72, 0x0a, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x52, - 0x03, 0x62, 0x61, 0x72, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x3b, 0x0a, 0x11, 0x52, 0x65, 0x70, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x26, - 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x14, 0xba, 0x48, 0x11, - 0x92, 0x01, 0x0e, 0x22, 0x0c, 0x72, 0x0a, 0x5a, 0x03, 0x66, 0x6f, 0x6f, 0x5a, 0x03, 0x62, 0x61, - 0x72, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x5a, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x49, 0x6e, 0x12, 0x48, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, - 0x2e, 0x63, 0x61, 0x73, 0x65, 0x73, 0x2e, 0x41, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0e, 0xba, - 0x48, 0x0b, 0x92, 0x01, 0x08, 0x22, 0x06, 0x82, 0x01, 0x03, 0x1a, 0x01, 0x00, 0x52, 0x03, 0x76, - 0x61, 0x6c, 0x22, 0x5d, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, - 0x75, 0x6d, 0x4e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x48, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, - 0x63, 0x61, 0x73, 0x65, 0x73, 0x2e, 0x41, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0e, 0xba, 0x48, - 0x0b, 0x92, 0x01, 0x08, 0x22, 0x06, 0x82, 0x01, 0x03, 0x22, 0x01, 0x00, 0x52, 0x03, 0x76, 0x61, - 0x6c, 0x22, 0xe0, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6d, - 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x49, 0x6e, 0x12, 0x66, 0x0a, 0x03, - 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x62, 0x75, 0x66, 0x2e, + 0x18, 0x01, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x48, 0x0a, 0x16, 0x52, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x55, 0x6e, 0x69, 0x71, 0x75, + 0x65, 0x12, 0x16, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, + 0x05, 0x92, 0x01, 0x02, 0x18, 0x01, 0x52, 0x01, 0x61, 0x12, 0x16, 0x0a, 0x01, 0x62, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x05, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x18, 0x01, 0x52, 0x01, + 0x62, 0x22, 0x35, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x74, 0x65, + 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x02, 0x42, 0x0f, 0xba, 0x48, 0x0c, 0x92, 0x01, 0x09, 0x22, 0x07, 0x0a, 0x05, 0x25, 0x00, + 0x00, 0x00, 0x00, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x44, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, + 0x2d, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x1b, 0xba, 0x48, + 0x18, 0x92, 0x01, 0x15, 0x22, 0x13, 0x72, 0x11, 0x32, 0x0f, 0x28, 0x3f, 0x69, 0x29, 0x5e, 0x5b, + 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x59, + 0x0a, 0x11, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x53, + 0x6b, 0x69, 0x70, 0x12, 0x44, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x73, 0x65, + 0x73, 0x2e, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x42, 0x0b, 0xba, 0x48, 0x08, 0x92, 0x01, 0x05, 0x22, + 0x03, 0xc0, 0x01, 0x01, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x38, 0x0a, 0x0e, 0x52, 0x65, 0x70, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x12, 0x26, 0x0a, 0x03, 0x76, + 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x14, 0xba, 0x48, 0x11, 0x92, 0x01, 0x0e, + 0x22, 0x0c, 0x72, 0x0a, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x52, 0x03, 0x62, 0x61, 0x72, 0x52, 0x03, + 0x76, 0x61, 0x6c, 0x22, 0x3b, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, + 0x74, 0x65, 0x6d, 0x4e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x26, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x14, 0xba, 0x48, 0x11, 0x92, 0x01, 0x0e, 0x22, 0x0c, 0x72, + 0x0a, 0x5a, 0x03, 0x66, 0x6f, 0x6f, 0x5a, 0x03, 0x62, 0x61, 0x72, 0x52, 0x03, 0x76, 0x61, 0x6c, + 0x22, 0x5a, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, + 0x49, 0x6e, 0x12, 0x48, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, + 0x26, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x73, 0x65, 0x73, + 0x2e, 0x41, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0e, 0xba, 0x48, 0x0b, 0x92, 0x01, 0x08, 0x22, + 0x06, 0x82, 0x01, 0x03, 0x1a, 0x01, 0x00, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x5d, 0x0a, 0x11, + 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x4e, 0x6f, 0x74, 0x49, + 0x6e, 0x12, 0x48, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x26, + 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x73, 0x65, 0x73, 0x2e, + 0x41, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0e, 0xba, 0x48, 0x0b, 0x92, 0x01, 0x08, 0x22, 0x06, + 0x82, 0x01, 0x03, 0x22, 0x01, 0x00, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0xe0, 0x01, 0x0a, 0x16, + 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, + 0x45, 0x6e, 0x75, 0x6d, 0x49, 0x6e, 0x12, 0x66, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x63, + 0x61, 0x73, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6d, 0x62, + 0x65, 0x64, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x49, 0x6e, 0x2e, 0x41, 0x6e, 0x6f, 0x74, + 0x68, 0x65, 0x72, 0x49, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0e, 0xba, 0x48, 0x0b, 0x92, 0x01, + 0x08, 0x22, 0x06, 0x82, 0x01, 0x03, 0x1a, 0x01, 0x00, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x5e, + 0x0a, 0x0d, 0x41, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x1f, 0x0a, 0x1b, 0x41, 0x4e, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x5f, 0x45, 0x4e, + 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x15, 0x0a, 0x11, 0x41, 0x4e, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x5f, 0x45, + 0x4e, 0x55, 0x4d, 0x5f, 0x41, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x4e, 0x4f, 0x54, 0x48, + 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x42, 0x10, 0x02, 0x22, 0xf8, + 0x01, 0x0a, 0x19, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6d, 0x62, 0x65, 0x64, + 0x64, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x4e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x6c, 0x0a, 0x03, + 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x4a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x73, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x49, - 0x6e, 0x2e, 0x41, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x42, - 0x0e, 0xba, 0x48, 0x0b, 0x92, 0x01, 0x08, 0x22, 0x06, 0x82, 0x01, 0x03, 0x1a, 0x01, 0x00, 0x52, - 0x03, 0x76, 0x61, 0x6c, 0x22, 0x5e, 0x0a, 0x0d, 0x41, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x49, - 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x4e, 0x4f, 0x54, 0x48, 0x45, 0x52, - 0x5f, 0x49, 0x4e, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x4e, 0x4f, 0x54, 0x48, 0x45, - 0x52, 0x5f, 0x49, 0x4e, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x41, 0x10, 0x01, 0x12, 0x15, 0x0a, - 0x11, 0x41, 0x4e, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x5f, 0x45, 0x4e, 0x55, 0x4d, - 0x5f, 0x42, 0x10, 0x02, 0x22, 0xf8, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x4e, 0x6f, 0x74, - 0x49, 0x6e, 0x12, 0x6c, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, - 0x4a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x73, 0x65, 0x73, - 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, - 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x4e, 0x6f, 0x74, 0x49, 0x6e, 0x2e, 0x41, 0x6e, 0x6f, 0x74, 0x68, - 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x49, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0e, 0xba, 0x48, 0x0b, - 0x92, 0x01, 0x08, 0x22, 0x06, 0x82, 0x01, 0x03, 0x22, 0x01, 0x00, 0x52, 0x03, 0x76, 0x61, 0x6c, - 0x22, 0x6d, 0x0a, 0x10, 0x41, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x49, 0x6e, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x4e, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, - 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x4e, 0x4f, - 0x54, 0x48, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x45, 0x4e, 0x55, 0x4d, - 0x5f, 0x41, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x4e, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, - 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x42, 0x10, 0x02, 0x22, - 0x72, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x49, 0x6e, - 0x12, 0x61, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x74, 0x65, 0x64, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x4e, + 0x6f, 0x74, 0x49, 0x6e, 0x2e, 0x41, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x49, + 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0e, 0xba, 0x48, 0x0b, 0x92, 0x01, 0x08, 0x22, 0x06, 0x82, + 0x01, 0x03, 0x22, 0x01, 0x00, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x6d, 0x0a, 0x10, 0x41, 0x6e, + 0x6f, 0x74, 0x68, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x49, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x23, + 0x0a, 0x1f, 0x41, 0x4e, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4e, + 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x4e, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x4e, + 0x4f, 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x41, 0x10, 0x01, 0x12, 0x19, + 0x0a, 0x15, 0x41, 0x4e, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4e, + 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x42, 0x10, 0x02, 0x22, 0x72, 0x0a, 0x0d, 0x52, 0x65, 0x70, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x49, 0x6e, 0x12, 0x61, 0x0a, 0x03, 0x76, 0x61, + 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x39, 0xba, + 0x48, 0x36, 0x92, 0x01, 0x33, 0x22, 0x31, 0xa2, 0x01, 0x2e, 0x12, 0x2c, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x42, 0x39, 0xba, 0x48, 0x36, 0x92, 0x01, 0x33, 0x22, 0x31, 0xa2, 0x01, 0x2e, - 0x12, 0x2c, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, - 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, - 0x76, 0x61, 0x6c, 0x22, 0x76, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x6e, 0x79, 0x4e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x62, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x3a, 0xba, 0x48, 0x37, 0x92, - 0x01, 0x34, 0x22, 0x32, 0xa2, 0x01, 0x2f, 0x1a, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x3a, 0x0a, 0x15, 0x52, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x69, 0x6e, 0x41, 0x6e, 0x64, 0x49, 0x74, 0x65, - 0x6d, 0x4c, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x42, 0x0f, 0xba, 0x48, 0x0c, 0x92, 0x01, 0x09, 0x08, 0x01, 0x22, 0x05, 0x72, 0x03, 0x98, - 0x01, 0x03, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x38, 0x0a, 0x18, 0x52, 0x65, 0x70, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x4d, 0x69, 0x6e, 0x41, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, - 0x4c, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x42, 0x0a, 0xba, 0x48, 0x07, 0x92, 0x01, 0x04, 0x08, 0x01, 0x10, 0x03, 0x52, 0x03, 0x76, 0x61, - 0x6c, 0x22, 0x52, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x11, 0xba, - 0x48, 0x0e, 0x92, 0x01, 0x0b, 0x22, 0x09, 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, - 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x36, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x45, 0x78, 0x61, 0x63, 0x74, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x1f, 0x0a, 0x03, - 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x0d, 0xba, 0x48, 0x0a, 0xd0, 0x01, - 0x01, 0x92, 0x01, 0x04, 0x08, 0x03, 0x10, 0x03, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x2a, 0x3f, 0x0a, - 0x06, 0x41, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x4e, 0x5f, 0x45, 0x4e, - 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x4e, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x58, 0x10, 0x01, 0x12, - 0x0d, 0x0a, 0x09, 0x41, 0x4e, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x59, 0x10, 0x02, 0x42, 0xa1, - 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, - 0x63, 0x61, 0x73, 0x65, 0x73, 0x42, 0x0d, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 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, 0x2d, 0x67, 0x6f, 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, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, - 0x63, 0x65, 0x2f, 0x63, 0x61, 0x73, 0x65, 0x73, 0xa2, 0x02, 0x04, 0x42, 0x56, 0x43, 0x43, 0xaa, - 0x02, 0x1e, 0x42, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x43, - 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x43, 0x61, 0x73, 0x65, 0x73, - 0xca, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x5c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5c, - 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5c, 0x43, 0x61, 0x73, 0x65, - 0x73, 0xe2, 0x02, 0x2a, 0x42, 0x75, 0x66, 0x5c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5c, 0x43, 0x61, 0x73, - 0x65, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x21, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x3a, - 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x3a, 0x43, 0x61, 0x73, - 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x76, 0x0a, + 0x10, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x4e, 0x6f, 0x74, 0x49, + 0x6e, 0x12, 0x62, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x3a, 0xba, 0x48, 0x37, 0x92, 0x01, 0x34, 0x22, 0x32, 0xa2, 0x01, + 0x2f, 0x1a, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x3a, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x4d, 0x69, 0x6e, 0x41, 0x6e, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x4c, 0x65, 0x6e, 0x12, 0x21, + 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0f, 0xba, 0x48, 0x0c, + 0x92, 0x01, 0x09, 0x08, 0x01, 0x22, 0x05, 0x72, 0x03, 0x98, 0x01, 0x03, 0x52, 0x03, 0x76, 0x61, + 0x6c, 0x22, 0x38, 0x0a, 0x18, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x69, 0x6e, + 0x41, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x4c, 0x65, 0x6e, 0x12, 0x1c, 0x0a, + 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x92, + 0x01, 0x04, 0x08, 0x01, 0x10, 0x03, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x52, 0x0a, 0x10, 0x52, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x3e, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x11, 0xba, 0x48, 0x0e, 0x92, 0x01, 0x0b, 0x22, + 0x09, 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, + 0x36, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x78, 0x61, 0x63, 0x74, + 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x1f, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0d, 0x42, 0x0d, 0xba, 0x48, 0x0a, 0xd0, 0x01, 0x01, 0x92, 0x01, 0x04, 0x08, 0x03, + 0x10, 0x03, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x2a, 0x3f, 0x0a, 0x06, 0x41, 0x6e, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x4e, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x4e, + 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x58, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x4e, 0x5f, + 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x59, 0x10, 0x02, 0x42, 0xa1, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, + 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x73, 0x65, 0x73, 0x42, + 0x0d, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x50, 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, 0x2d, 0x67, 0x6f, 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, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x63, 0x61, 0x73, + 0x65, 0x73, 0xa2, 0x02, 0x04, 0x42, 0x56, 0x43, 0x43, 0xaa, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x2e, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x43, 0x61, 0x73, 0x65, 0x73, 0xca, 0x02, 0x1e, 0x42, 0x75, 0x66, + 0x5c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5c, 0x43, 0x61, 0x73, 0x65, 0x73, 0xe2, 0x02, 0x2a, 0x42, 0x75, + 0x66, 0x5c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x5c, 0x43, 0x61, 0x73, 0x65, 0x73, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x42, 0x75, 0x66, 0x3a, 0x3a, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x3a, 0x43, 0x61, 0x73, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1494,7 +1554,7 @@ func file_buf_validate_conformance_cases_repeated_proto_rawDescGZIP() []byte { } var file_buf_validate_conformance_cases_repeated_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_buf_validate_conformance_cases_repeated_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_buf_validate_conformance_cases_repeated_proto_msgTypes = make([]protoimpl.MessageInfo, 25) var file_buf_validate_conformance_cases_repeated_proto_goTypes = []interface{}{ (AnEnum)(0), // 0: buf.validate.conformance.cases.AnEnum (RepeatedEmbeddedEnumIn_AnotherInEnum)(0), // 1: buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum @@ -1508,37 +1568,38 @@ var file_buf_validate_conformance_cases_repeated_proto_goTypes = []interface{}{ (*RepeatedMinMax)(nil), // 9: buf.validate.conformance.cases.RepeatedMinMax (*RepeatedExact)(nil), // 10: buf.validate.conformance.cases.RepeatedExact (*RepeatedUnique)(nil), // 11: buf.validate.conformance.cases.RepeatedUnique - (*RepeatedItemRule)(nil), // 12: buf.validate.conformance.cases.RepeatedItemRule - (*RepeatedItemPattern)(nil), // 13: buf.validate.conformance.cases.RepeatedItemPattern - (*RepeatedEmbedSkip)(nil), // 14: buf.validate.conformance.cases.RepeatedEmbedSkip - (*RepeatedItemIn)(nil), // 15: buf.validate.conformance.cases.RepeatedItemIn - (*RepeatedItemNotIn)(nil), // 16: buf.validate.conformance.cases.RepeatedItemNotIn - (*RepeatedEnumIn)(nil), // 17: buf.validate.conformance.cases.RepeatedEnumIn - (*RepeatedEnumNotIn)(nil), // 18: buf.validate.conformance.cases.RepeatedEnumNotIn - (*RepeatedEmbeddedEnumIn)(nil), // 19: buf.validate.conformance.cases.RepeatedEmbeddedEnumIn - (*RepeatedEmbeddedEnumNotIn)(nil), // 20: buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn - (*RepeatedAnyIn)(nil), // 21: buf.validate.conformance.cases.RepeatedAnyIn - (*RepeatedAnyNotIn)(nil), // 22: buf.validate.conformance.cases.RepeatedAnyNotIn - (*RepeatedMinAndItemLen)(nil), // 23: buf.validate.conformance.cases.RepeatedMinAndItemLen - (*RepeatedMinAndMaxItemLen)(nil), // 24: buf.validate.conformance.cases.RepeatedMinAndMaxItemLen - (*RepeatedDuration)(nil), // 25: buf.validate.conformance.cases.RepeatedDuration - (*RepeatedExactIgnore)(nil), // 26: buf.validate.conformance.cases.RepeatedExactIgnore - (*other_package.Embed)(nil), // 27: buf.validate.conformance.cases.other_package.Embed - (*anypb.Any)(nil), // 28: google.protobuf.Any - (*durationpb.Duration)(nil), // 29: google.protobuf.Duration + (*RepeatedMultipleUnique)(nil), // 12: buf.validate.conformance.cases.RepeatedMultipleUnique + (*RepeatedItemRule)(nil), // 13: buf.validate.conformance.cases.RepeatedItemRule + (*RepeatedItemPattern)(nil), // 14: buf.validate.conformance.cases.RepeatedItemPattern + (*RepeatedEmbedSkip)(nil), // 15: buf.validate.conformance.cases.RepeatedEmbedSkip + (*RepeatedItemIn)(nil), // 16: buf.validate.conformance.cases.RepeatedItemIn + (*RepeatedItemNotIn)(nil), // 17: buf.validate.conformance.cases.RepeatedItemNotIn + (*RepeatedEnumIn)(nil), // 18: buf.validate.conformance.cases.RepeatedEnumIn + (*RepeatedEnumNotIn)(nil), // 19: buf.validate.conformance.cases.RepeatedEnumNotIn + (*RepeatedEmbeddedEnumIn)(nil), // 20: buf.validate.conformance.cases.RepeatedEmbeddedEnumIn + (*RepeatedEmbeddedEnumNotIn)(nil), // 21: buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn + (*RepeatedAnyIn)(nil), // 22: buf.validate.conformance.cases.RepeatedAnyIn + (*RepeatedAnyNotIn)(nil), // 23: buf.validate.conformance.cases.RepeatedAnyNotIn + (*RepeatedMinAndItemLen)(nil), // 24: buf.validate.conformance.cases.RepeatedMinAndItemLen + (*RepeatedMinAndMaxItemLen)(nil), // 25: buf.validate.conformance.cases.RepeatedMinAndMaxItemLen + (*RepeatedDuration)(nil), // 26: buf.validate.conformance.cases.RepeatedDuration + (*RepeatedExactIgnore)(nil), // 27: buf.validate.conformance.cases.RepeatedExactIgnore + (*other_package.Embed)(nil), // 28: buf.validate.conformance.cases.other_package.Embed + (*anypb.Any)(nil), // 29: google.protobuf.Any + (*durationpb.Duration)(nil), // 30: google.protobuf.Duration } var file_buf_validate_conformance_cases_repeated_proto_depIdxs = []int32{ 3, // 0: buf.validate.conformance.cases.RepeatedEmbedNone.val:type_name -> buf.validate.conformance.cases.Embed - 27, // 1: buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone.val:type_name -> buf.validate.conformance.cases.other_package.Embed + 28, // 1: buf.validate.conformance.cases.RepeatedEmbedCrossPackageNone.val:type_name -> buf.validate.conformance.cases.other_package.Embed 3, // 2: buf.validate.conformance.cases.RepeatedMin.val:type_name -> buf.validate.conformance.cases.Embed 3, // 3: buf.validate.conformance.cases.RepeatedEmbedSkip.val:type_name -> buf.validate.conformance.cases.Embed 0, // 4: buf.validate.conformance.cases.RepeatedEnumIn.val:type_name -> buf.validate.conformance.cases.AnEnum 0, // 5: buf.validate.conformance.cases.RepeatedEnumNotIn.val:type_name -> buf.validate.conformance.cases.AnEnum 1, // 6: buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.val:type_name -> buf.validate.conformance.cases.RepeatedEmbeddedEnumIn.AnotherInEnum 2, // 7: buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.val:type_name -> buf.validate.conformance.cases.RepeatedEmbeddedEnumNotIn.AnotherNotInEnum - 28, // 8: buf.validate.conformance.cases.RepeatedAnyIn.val:type_name -> google.protobuf.Any - 28, // 9: buf.validate.conformance.cases.RepeatedAnyNotIn.val:type_name -> google.protobuf.Any - 29, // 10: buf.validate.conformance.cases.RepeatedDuration.val:type_name -> google.protobuf.Duration + 29, // 8: buf.validate.conformance.cases.RepeatedAnyIn.val:type_name -> google.protobuf.Any + 29, // 9: buf.validate.conformance.cases.RepeatedAnyNotIn.val:type_name -> google.protobuf.Any + 30, // 10: buf.validate.conformance.cases.RepeatedDuration.val:type_name -> google.protobuf.Duration 11, // [11:11] is the sub-list for method output_type 11, // [11:11] is the sub-list for method input_type 11, // [11:11] is the sub-list for extension type_name @@ -1661,7 +1722,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedItemRule); i { + switch v := v.(*RepeatedMultipleUnique); i { case 0: return &v.state case 1: @@ -1673,7 +1734,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedItemPattern); i { + switch v := v.(*RepeatedItemRule); i { case 0: return &v.state case 1: @@ -1685,7 +1746,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedEmbedSkip); i { + switch v := v.(*RepeatedItemPattern); i { case 0: return &v.state case 1: @@ -1697,7 +1758,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedItemIn); i { + switch v := v.(*RepeatedEmbedSkip); i { case 0: return &v.state case 1: @@ -1709,7 +1770,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedItemNotIn); i { + switch v := v.(*RepeatedItemIn); i { case 0: return &v.state case 1: @@ -1721,7 +1782,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedEnumIn); i { + switch v := v.(*RepeatedItemNotIn); i { case 0: return &v.state case 1: @@ -1733,7 +1794,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedEnumNotIn); i { + switch v := v.(*RepeatedEnumIn); i { case 0: return &v.state case 1: @@ -1745,7 +1806,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedEmbeddedEnumIn); i { + switch v := v.(*RepeatedEnumNotIn); i { case 0: return &v.state case 1: @@ -1757,7 +1818,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedEmbeddedEnumNotIn); i { + switch v := v.(*RepeatedEmbeddedEnumIn); i { case 0: return &v.state case 1: @@ -1769,7 +1830,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedAnyIn); i { + switch v := v.(*RepeatedEmbeddedEnumNotIn); i { case 0: return &v.state case 1: @@ -1781,7 +1842,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedAnyNotIn); i { + switch v := v.(*RepeatedAnyIn); i { case 0: return &v.state case 1: @@ -1793,7 +1854,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedMinAndItemLen); i { + switch v := v.(*RepeatedAnyNotIn); i { case 0: return &v.state case 1: @@ -1805,7 +1866,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedMinAndMaxItemLen); i { + switch v := v.(*RepeatedMinAndItemLen); i { case 0: return &v.state case 1: @@ -1817,7 +1878,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedDuration); i { + switch v := v.(*RepeatedMinAndMaxItemLen); i { case 0: return &v.state case 1: @@ -1829,6 +1890,18 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { } } file_buf_validate_conformance_cases_repeated_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepeatedDuration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_buf_validate_conformance_cases_repeated_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RepeatedExactIgnore); i { case 0: return &v.state @@ -1847,7 +1920,7 @@ func file_buf_validate_conformance_cases_repeated_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_buf_validate_conformance_cases_repeated_proto_rawDesc, NumEnums: 3, - NumMessages: 24, + NumMessages: 25, NumExtensions: 0, NumServices: 0, }, diff --git a/internal/gen/tests/example/v1/validations.pb.go b/internal/gen/tests/example/v1/validations.pb.go index fefdb2e..e15c2aa 100644 --- a/internal/gen/tests/example/v1/validations.pb.go +++ b/internal/gen/tests/example/v1/validations.pb.go @@ -525,62 +525,62 @@ var file_tests_example_v1_validations_proto_rawDesc = []byte{ 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x60, 0x66, 0x6f, 0x6f, 0x60, 0x27, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x1a, 0x15, 0x0a, 0x06, 0x74, 0x65, 0x78, 0x74, 0x20, 0x79, 0x1a, 0x0b, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x79, 0x20, 0x3e, 0x3d, 0x20, 0x30, 0x42, 0x0a, 0x0a, 0x01, 0x6f, 0x12, - 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x48, 0x61, + 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0xa0, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x48, 0x61, 0x73, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x3f, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x03, 0x28, 0x02, 0x42, 0x31, 0xba, 0x48, 0x2e, 0x92, 0x01, 0x2b, 0x08, 0x01, 0x10, 0x03, 0x18, 0x01, 0x22, 0x23, 0xba, 0x01, 0x19, 0x12, 0x11, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, - 0x0a, 0x05, 0x25, 0x00, 0x00, 0x00, 0x00, 0x52, 0x01, 0x78, 0x12, 0x14, 0x0a, 0x01, 0x79, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0x92, 0x01, 0x00, 0x52, 0x01, 0x79, - 0x12, 0x35, 0x0a, 0x01, 0x7a, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, - 0x73, 0x74, 0x73, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, - 0x61, 0x73, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x70, 0x72, 0x73, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, - 0x01, 0x02, 0x10, 0x02, 0x52, 0x01, 0x7a, 0x22, 0xf1, 0x03, 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x48, - 0x61, 0x73, 0x4d, 0x61, 0x70, 0x12, 0x5b, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x6d, 0x61, - 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2e, - 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x48, 0x61, - 0x73, 0x4d, 0x61, 0x70, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x42, 0x14, 0xba, 0x48, 0x11, 0x9a, 0x01, 0x0e, 0x08, 0x03, 0x22, 0x04, 0x1a, 0x02, - 0x20, 0x00, 0x2a, 0x04, 0x1a, 0x02, 0x10, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x6d, - 0x61, 0x70, 0x12, 0x53, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x70, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2e, 0x65, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x48, 0x61, 0x73, - 0x4d, 0x61, 0x70, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x42, 0x08, 0xba, 0x48, 0x05, 0x9a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x12, 0x56, 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x73, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x48, 0x61, 0x73, 0x4d, 0x61, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xba, 0x48, 0x05, 0x9a, 0x01, - 0x02, 0x08, 0x02, 0x52, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x70, 0x1a, - 0x3b, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5f, 0x0a, 0x0f, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x0a, 0x05, 0x25, 0x00, 0x00, 0x00, 0x00, 0x52, 0x01, 0x78, 0x12, 0x16, 0x0a, 0x01, 0x79, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x18, 0x01, 0x52, + 0x01, 0x79, 0x12, 0x35, 0x0a, 0x01, 0x7a, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x74, 0x65, 0x73, 0x74, 0x73, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x48, 0x61, 0x73, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x70, 0x72, 0x73, 0x42, 0x08, 0xba, 0x48, + 0x05, 0x92, 0x01, 0x02, 0x10, 0x02, 0x52, 0x01, 0x7a, 0x22, 0xf1, 0x03, 0x0a, 0x09, 0x4d, 0x73, + 0x67, 0x48, 0x61, 0x73, 0x4d, 0x61, 0x70, 0x12, 0x5b, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x33, 0x32, + 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x73, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x48, 0x61, 0x73, 0x4d, 0x61, 0x70, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x6d, 0x61, 0x70, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x42, 0x14, 0xba, 0x48, 0x11, 0x9a, 0x01, 0x0e, 0x08, 0x03, 0x22, 0x04, + 0x1a, 0x02, 0x20, 0x00, 0x2a, 0x04, 0x1a, 0x02, 0x10, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x6d, 0x61, 0x70, 0x12, 0x53, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, + 0x61, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x73, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x48, + 0x61, 0x73, 0x4d, 0x61, 0x70, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xba, 0x48, 0x05, 0x9a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x12, 0x56, 0x0a, 0x0b, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x41, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xd8, 0x01, 0x0a, 0x14, - 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4c, 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, 0x2d, 0x67, 0x6f, 0x2f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x74, 0x65, 0x73, 0x74, - 0x73, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x78, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x45, 0x58, 0xaa, 0x02, 0x10, 0x54, - 0x65, 0x73, 0x74, 0x73, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x10, 0x54, 0x65, 0x73, 0x74, 0x73, 0x5c, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x54, 0x65, 0x73, 0x74, 0x73, 0x5c, 0x45, 0x78, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x12, 0x54, 0x65, 0x73, 0x74, 0x73, 0x3a, 0x3a, 0x45, 0x78, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x48, 0x61, 0x73, 0x4d, 0x61, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xba, 0x48, 0x05, + 0x9a, 0x01, 0x02, 0x08, 0x02, 0x52, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x61, + 0x70, 0x1a, 0x3b, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, + 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5f, 0x0a, 0x0f, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, + 0x65, 0x41, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xd8, 0x01, + 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x73, 0x2e, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4c, 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, 0x2d, 0x67, 0x6f, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x74, 0x65, + 0x73, 0x74, 0x73, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x45, 0x58, 0xaa, 0x02, + 0x10, 0x54, 0x65, 0x73, 0x74, 0x73, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x10, 0x54, 0x65, 0x73, 0x74, 0x73, 0x5c, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x54, 0x65, 0x73, 0x74, 0x73, 0x5c, 0x45, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x54, 0x65, 0x73, 0x74, 0x73, 0x3a, 0x3a, 0x45, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/buf.lock b/proto/buf.lock index 7b8d086..88097ab 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -4,13 +4,13 @@ deps: - remote: buf.build owner: bufbuild repository: protovalidate - commit: ff921ee117154e14b8de3b1335a0f257 - digest: shake256:a0069b0e821f75d5f1e2074a23856c1e63d5bfabb63286d37aaf64cc2f7854c41a8f0ed6c3cf6de1451e612ec1d1bde589b466c8d892f116905bfbb4e223e6c5 + commit: 63dfe56cc2c44cffa4815366ba7a99c0 + digest: shake256:5a8a9856b92bf37171d45ccbe59fc48ea755cd682317b088cdf93e8e797ecf54039e012ece9a17084bb676e70c2e090296b2790782ebdbbedc7514e9b543e6bf - remote: buf.build owner: bufbuild repository: protovalidate-testing - commit: 9ba6914764d140a2b9666e8b203e309f - digest: shake256:c23ce1466f562c828e181abc00ca47d7f1056bc05fe0048bc365dc4c9f9869d05ccb7688dac777957354083f5258219c242ea81716473c287b86b672580c138b + commit: 1e7219041805401e8ae8d804205a63ba + digest: shake256:1256ad54637d755f9ab681017a279137e1ea314cafcfaac92a6eddd2ac564e082bdb40da243d29e585a3491350f3dd7180a21c9c5ab31a88817aa495e2c828b9 - remote: buf.build owner: envoyproxy repository: protoc-gen-validate diff --git a/proto/tests/example/v1/validations.proto b/proto/tests/example/v1/validations.proto index 86b01c0..e88e30b 100644 --- a/proto/tests/example/v1/validations.proto +++ b/proto/tests/example/v1/validations.proto @@ -105,9 +105,7 @@ message MsgHasRepeated { } unique: true, }]; - repeated string y = 2 [(buf.validate.field).repeated = { - // unique: true, - }]; + repeated string y = 2 [(buf.validate.field).repeated.unique = true]; repeated HasMsgExprs z = 3 [(buf.validate.field).repeated = {max_items: 2}]; }