From 3fe09785b155d3bb7a68fd7023915d309446367a Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Wed, 20 Dec 2023 17:56:39 -0500 Subject: [PATCH] pkg/proto: upgrade vtprotobuf to support WKTs This early-adopts better codegen for well-known types. Caveats is the most improved. --- e2e/go.mod | 1 + e2e/go.sum | 2 + go.mod | 1 + go.sum | 2 + magefiles/go.mod | 2 +- magefiles/go.sum | 5 +- magefiles/tools.go | 1 + pkg/proto/core/v1/core_vtproto.pb.go | 1552 +++++++---------- .../developer/v1/developer_vtproto.pb.go | 811 ++++----- pkg/proto/dispatch/v1/dispatch_vtproto.pb.go | 1183 ++++++------- pkg/proto/impl/v1/impl_vtproto.pb.go | 465 ++--- pkg/proto/impl/v1/pgrevision_vtproto.pb.go | 46 +- 12 files changed, 1705 insertions(+), 2366 deletions(-) diff --git a/e2e/go.mod b/e2e/go.mod index 50b676a7f5..4eba004d20 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -36,6 +36,7 @@ require ( github.com/jzelinskie/stringz v0.0.2 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/planetscale/vtprotobuf v0.5.1-0.20231212170721-e7d721933795 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/rs/zerolog v1.31.0 // indirect github.com/samber/lo v1.38.1 // indirect diff --git a/e2e/go.sum b/e2e/go.sum index 953155a9ee..2914d05de5 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -175,6 +175,8 @@ github.com/ngrok/sqlmw v0.0.0-20220520173518-97c9c04efc79/go.mod h1:E26fwEtRNigB github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/planetscale/vtprotobuf v0.5.1-0.20231212170721-e7d721933795 h1:pH+U6pJP0BhxqQ4njBUjOg0++WMMvv3eByWzB+oATBY= +github.com/planetscale/vtprotobuf v0.5.1-0.20231212170721-e7d721933795/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= diff --git a/go.mod b/go.mod index 71bae87fda..18596ccae4 100644 --- a/go.mod +++ b/go.mod @@ -55,6 +55,7 @@ require ( github.com/ory/dockertest/v3 v3.10.0 github.com/outcaste-io/ristretto v0.2.3 github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 + github.com/planetscale/vtprotobuf v0.5.1-0.20231212170721-e7d721933795 github.com/prometheus/client_golang v1.17.0 github.com/prometheus/client_model v0.5.0 github.com/prometheus/common v0.45.0 diff --git a/go.sum b/go.sum index c9c73cac2b..b899bd89de 100644 --- a/go.sum +++ b/go.sum @@ -696,6 +696,8 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/planetscale/vtprotobuf v0.5.1-0.20231212170721-e7d721933795 h1:pH+U6pJP0BhxqQ4njBUjOg0++WMMvv3eByWzB+oATBY= +github.com/planetscale/vtprotobuf v0.5.1-0.20231212170721-e7d721933795/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= diff --git a/magefiles/go.mod b/magefiles/go.mod index e2e0f465a0..006e315b01 100644 --- a/magefiles/go.mod +++ b/magefiles/go.mod @@ -8,7 +8,7 @@ require ( github.com/ecordell/optgen v0.0.9 github.com/envoyproxy/protoc-gen-validate v1.0.2 github.com/magefile/mage v1.15.0 - github.com/planetscale/vtprotobuf v0.5.0 + github.com/planetscale/vtprotobuf v0.5.1-0.20231212170721-e7d721933795 golang.org/x/tools v0.14.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 google.golang.org/protobuf v1.31.0 diff --git a/magefiles/go.sum b/magefiles/go.sum index c8fecd7736..819dded43c 100644 --- a/magefiles/go.sum +++ b/magefiles/go.sum @@ -136,8 +136,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/profile v1.7.0 h1:hnbDkaNWPCLMO9wGLdBFTIZvzDrDfBM2072E1S9gJkA= github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/planetscale/vtprotobuf v0.5.0 h1:l8PXm6Colok5z6qQLNhAj2Jq5BfoMTIHxLER5a6nDqM= -github.com/planetscale/vtprotobuf v0.5.0/go.mod h1:wm1N3qk9G/4+VM1WhpkLbvY/d8+0PbwYYpP5P5VhTks= +github.com/planetscale/vtprotobuf v0.5.1-0.20231212170721-e7d721933795 h1:pH+U6pJP0BhxqQ4njBUjOg0++WMMvv3eByWzB+oATBY= +github.com/planetscale/vtprotobuf v0.5.1-0.20231212170721-e7d721933795/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= @@ -240,7 +240,6 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/magefiles/tools.go b/magefiles/tools.go index e38c64adb9..0f88baab72 100644 --- a/magefiles/tools.go +++ b/magefiles/tools.go @@ -9,6 +9,7 @@ import ( _ "github.com/ecordell/optgen" _ "github.com/envoyproxy/protoc-gen-validate" _ "github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto" + _ "github.com/planetscale/vtprotobuf/protohelpers" _ "golang.org/x/tools/cmd/stringer" _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" _ "google.golang.org/protobuf/cmd/protoc-gen-go" diff --git a/pkg/proto/core/v1/core_vtproto.pb.go b/pkg/proto/core/v1/core_vtproto.pb.go index fd639bf7eb..0ef1254f7d 100644 --- a/pkg/proto/core/v1/core_vtproto.pb.go +++ b/pkg/proto/core/v1/core_vtproto.pb.go @@ -1,17 +1,19 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.0 +// protoc-gen-go-vtproto version: v0.5.1-0.20231212170721-e7d721933795 // source: core/v1/core.proto package corev1 import ( fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + anypb1 "github.com/planetscale/vtprotobuf/types/known/anypb" + structpb1 "github.com/planetscale/vtprotobuf/types/known/structpb" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" structpb "google.golang.org/protobuf/types/known/structpb" io "io" - bits "math/bits" ) const ( @@ -25,11 +27,10 @@ func (m *RelationTuple) CloneVT() *RelationTuple { if m == nil { return (*RelationTuple)(nil) } - r := &RelationTuple{ - ResourceAndRelation: m.ResourceAndRelation.CloneVT(), - Subject: m.Subject.CloneVT(), - Caveat: m.Caveat.CloneVT(), - } + r := new(RelationTuple) + r.ResourceAndRelation = m.ResourceAndRelation.CloneVT() + r.Subject = m.Subject.CloneVT() + r.Caveat = m.Caveat.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -45,16 +46,9 @@ func (m *ContextualizedCaveat) CloneVT() *ContextualizedCaveat { if m == nil { return (*ContextualizedCaveat)(nil) } - r := &ContextualizedCaveat{ - CaveatName: m.CaveatName, - } - if rhs := m.Context; rhs != nil { - if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *structpb.Struct }); ok { - r.Context = vtpb.CloneVT() - } else { - r.Context = proto.Clone(rhs).(*structpb.Struct) - } - } + r := new(ContextualizedCaveat) + r.CaveatName = m.CaveatName + r.Context = (*structpb.Struct)((*structpb1.Struct)(m.Context).CloneVT()) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -70,11 +64,10 @@ func (m *CaveatDefinition) CloneVT() *CaveatDefinition { if m == nil { return (*CaveatDefinition)(nil) } - r := &CaveatDefinition{ - Name: m.Name, - Metadata: m.Metadata.CloneVT(), - SourcePosition: m.SourcePosition.CloneVT(), - } + r := new(CaveatDefinition) + r.Name = m.Name + r.Metadata = m.Metadata.CloneVT() + r.SourcePosition = m.SourcePosition.CloneVT() if rhs := m.SerializedExpression; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) @@ -102,9 +95,8 @@ func (m *CaveatTypeReference) CloneVT() *CaveatTypeReference { if m == nil { return (*CaveatTypeReference)(nil) } - r := &CaveatTypeReference{ - TypeName: m.TypeName, - } + r := new(CaveatTypeReference) + r.TypeName = m.TypeName if rhs := m.ChildTypes; rhs != nil { tmpContainer := make([]*CaveatTypeReference, len(rhs)) for k, v := range rhs { @@ -127,11 +119,10 @@ func (m *ObjectAndRelation) CloneVT() *ObjectAndRelation { if m == nil { return (*ObjectAndRelation)(nil) } - r := &ObjectAndRelation{ - Namespace: m.Namespace, - ObjectId: m.ObjectId, - Relation: m.Relation, - } + r := new(ObjectAndRelation) + r.Namespace = m.Namespace + r.ObjectId = m.ObjectId + r.Relation = m.Relation if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -147,10 +138,9 @@ func (m *RelationReference) CloneVT() *RelationReference { if m == nil { return (*RelationReference)(nil) } - r := &RelationReference{ - Namespace: m.Namespace, - Relation: m.Relation, - } + r := new(RelationReference) + r.Namespace = m.Namespace + r.Relation = m.Relation if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -166,9 +156,8 @@ func (m *Zookie) CloneVT() *Zookie { if m == nil { return (*Zookie)(nil) } - r := &Zookie{ - Token: m.Token, - } + r := new(Zookie) + r.Token = m.Token if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -184,10 +173,9 @@ func (m *RelationTupleUpdate) CloneVT() *RelationTupleUpdate { if m == nil { return (*RelationTupleUpdate)(nil) } - r := &RelationTupleUpdate{ - Operation: m.Operation, - Tuple: m.Tuple.CloneVT(), - } + r := new(RelationTupleUpdate) + r.Operation = m.Operation + r.Tuple = m.Tuple.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -203,10 +191,9 @@ func (m *RelationTupleTreeNode) CloneVT() *RelationTupleTreeNode { if m == nil { return (*RelationTupleTreeNode)(nil) } - r := &RelationTupleTreeNode{ - Expanded: m.Expanded.CloneVT(), - CaveatExpression: m.CaveatExpression.CloneVT(), - } + r := new(RelationTupleTreeNode) + r.Expanded = m.Expanded.CloneVT() + r.CaveatExpression = m.CaveatExpression.CloneVT() if m.NodeType != nil { r.NodeType = m.NodeType.(interface { CloneVT() isRelationTupleTreeNode_NodeType @@ -227,9 +214,8 @@ func (m *RelationTupleTreeNode_IntermediateNode) CloneVT() isRelationTupleTreeNo if m == nil { return (*RelationTupleTreeNode_IntermediateNode)(nil) } - r := &RelationTupleTreeNode_IntermediateNode{ - IntermediateNode: m.IntermediateNode.CloneVT(), - } + r := new(RelationTupleTreeNode_IntermediateNode) + r.IntermediateNode = m.IntermediateNode.CloneVT() return r } @@ -237,9 +223,8 @@ func (m *RelationTupleTreeNode_LeafNode) CloneVT() isRelationTupleTreeNode_NodeT if m == nil { return (*RelationTupleTreeNode_LeafNode)(nil) } - r := &RelationTupleTreeNode_LeafNode{ - LeafNode: m.LeafNode.CloneVT(), - } + r := new(RelationTupleTreeNode_LeafNode) + r.LeafNode = m.LeafNode.CloneVT() return r } @@ -247,9 +232,8 @@ func (m *SetOperationUserset) CloneVT() *SetOperationUserset { if m == nil { return (*SetOperationUserset)(nil) } - r := &SetOperationUserset{ - Operation: m.Operation, - } + r := new(SetOperationUserset) + r.Operation = m.Operation if rhs := m.ChildNodes; rhs != nil { tmpContainer := make([]*RelationTupleTreeNode, len(rhs)) for k, v := range rhs { @@ -272,10 +256,9 @@ func (m *DirectSubject) CloneVT() *DirectSubject { if m == nil { return (*DirectSubject)(nil) } - r := &DirectSubject{ - Subject: m.Subject.CloneVT(), - CaveatExpression: m.CaveatExpression.CloneVT(), - } + r := new(DirectSubject) + r.Subject = m.Subject.CloneVT() + r.CaveatExpression = m.CaveatExpression.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -291,7 +274,7 @@ func (m *DirectSubjects) CloneVT() *DirectSubjects { if m == nil { return (*DirectSubjects)(nil) } - r := &DirectSubjects{} + r := new(DirectSubjects) if rhs := m.Subjects; rhs != nil { tmpContainer := make([]*DirectSubject, len(rhs)) for k, v := range rhs { @@ -314,15 +297,11 @@ func (m *Metadata) CloneVT() *Metadata { if m == nil { return (*Metadata)(nil) } - r := &Metadata{} + r := new(Metadata) if rhs := m.MetadataMessage; rhs != nil { tmpContainer := make([]*anypb.Any, len(rhs)) for k, v := range rhs { - if vtpb, ok := interface{}(v).(interface{ CloneVT() *anypb.Any }); ok { - tmpContainer[k] = vtpb.CloneVT() - } else { - tmpContainer[k] = proto.Clone(v).(*anypb.Any) - } + tmpContainer[k] = (*anypb.Any)((*anypb1.Any)(v).CloneVT()) } r.MetadataMessage = tmpContainer } @@ -341,11 +320,10 @@ func (m *NamespaceDefinition) CloneVT() *NamespaceDefinition { if m == nil { return (*NamespaceDefinition)(nil) } - r := &NamespaceDefinition{ - Name: m.Name, - Metadata: m.Metadata.CloneVT(), - SourcePosition: m.SourcePosition.CloneVT(), - } + r := new(NamespaceDefinition) + r.Name = m.Name + r.Metadata = m.Metadata.CloneVT() + r.SourcePosition = m.SourcePosition.CloneVT() if rhs := m.Relation; rhs != nil { tmpContainer := make([]*Relation, len(rhs)) for k, v := range rhs { @@ -368,15 +346,14 @@ func (m *Relation) CloneVT() *Relation { if m == nil { return (*Relation)(nil) } - r := &Relation{ - Name: m.Name, - UsersetRewrite: m.UsersetRewrite.CloneVT(), - TypeInformation: m.TypeInformation.CloneVT(), - Metadata: m.Metadata.CloneVT(), - SourcePosition: m.SourcePosition.CloneVT(), - AliasingRelation: m.AliasingRelation, - CanonicalCacheKey: m.CanonicalCacheKey, - } + r := new(Relation) + r.Name = m.Name + r.UsersetRewrite = m.UsersetRewrite.CloneVT() + r.TypeInformation = m.TypeInformation.CloneVT() + r.Metadata = m.Metadata.CloneVT() + r.SourcePosition = m.SourcePosition.CloneVT() + r.AliasingRelation = m.AliasingRelation + r.CanonicalCacheKey = m.CanonicalCacheKey if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -392,7 +369,7 @@ func (m *ReachabilityGraph) CloneVT() *ReachabilityGraph { if m == nil { return (*ReachabilityGraph)(nil) } - r := &ReachabilityGraph{} + r := new(ReachabilityGraph) if rhs := m.EntrypointsBySubjectType; rhs != nil { tmpContainer := make(map[string]*ReachabilityEntrypoints, len(rhs)) for k, v := range rhs { @@ -422,10 +399,9 @@ func (m *ReachabilityEntrypoints) CloneVT() *ReachabilityEntrypoints { if m == nil { return (*ReachabilityEntrypoints)(nil) } - r := &ReachabilityEntrypoints{ - SubjectType: m.SubjectType, - SubjectRelation: m.SubjectRelation.CloneVT(), - } + r := new(ReachabilityEntrypoints) + r.SubjectType = m.SubjectType + r.SubjectRelation = m.SubjectRelation.CloneVT() if rhs := m.Entrypoints; rhs != nil { tmpContainer := make([]*ReachabilityEntrypoint, len(rhs)) for k, v := range rhs { @@ -448,12 +424,11 @@ func (m *ReachabilityEntrypoint) CloneVT() *ReachabilityEntrypoint { if m == nil { return (*ReachabilityEntrypoint)(nil) } - r := &ReachabilityEntrypoint{ - Kind: m.Kind, - TargetRelation: m.TargetRelation.CloneVT(), - ResultStatus: m.ResultStatus, - TuplesetRelation: m.TuplesetRelation, - } + r := new(ReachabilityEntrypoint) + r.Kind = m.Kind + r.TargetRelation = m.TargetRelation.CloneVT() + r.ResultStatus = m.ResultStatus + r.TuplesetRelation = m.TuplesetRelation if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -469,7 +444,7 @@ func (m *TypeInformation) CloneVT() *TypeInformation { if m == nil { return (*TypeInformation)(nil) } - r := &TypeInformation{} + r := new(TypeInformation) if rhs := m.AllowedDirectRelations; rhs != nil { tmpContainer := make([]*AllowedRelation, len(rhs)) for k, v := range rhs { @@ -492,7 +467,7 @@ func (m *AllowedRelation_PublicWildcard) CloneVT() *AllowedRelation_PublicWildca if m == nil { return (*AllowedRelation_PublicWildcard)(nil) } - r := &AllowedRelation_PublicWildcard{} + r := new(AllowedRelation_PublicWildcard) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -508,11 +483,10 @@ func (m *AllowedRelation) CloneVT() *AllowedRelation { if m == nil { return (*AllowedRelation)(nil) } - r := &AllowedRelation{ - Namespace: m.Namespace, - SourcePosition: m.SourcePosition.CloneVT(), - RequiredCaveat: m.RequiredCaveat.CloneVT(), - } + r := new(AllowedRelation) + r.Namespace = m.Namespace + r.SourcePosition = m.SourcePosition.CloneVT() + r.RequiredCaveat = m.RequiredCaveat.CloneVT() if m.RelationOrWildcard != nil { r.RelationOrWildcard = m.RelationOrWildcard.(interface { CloneVT() isAllowedRelation_RelationOrWildcard @@ -533,9 +507,8 @@ func (m *AllowedRelation_Relation) CloneVT() isAllowedRelation_RelationOrWildcar if m == nil { return (*AllowedRelation_Relation)(nil) } - r := &AllowedRelation_Relation{ - Relation: m.Relation, - } + r := new(AllowedRelation_Relation) + r.Relation = m.Relation return r } @@ -543,9 +516,8 @@ func (m *AllowedRelation_PublicWildcard_) CloneVT() isAllowedRelation_RelationOr if m == nil { return (*AllowedRelation_PublicWildcard_)(nil) } - r := &AllowedRelation_PublicWildcard_{ - PublicWildcard: m.PublicWildcard.CloneVT(), - } + r := new(AllowedRelation_PublicWildcard_) + r.PublicWildcard = m.PublicWildcard.CloneVT() return r } @@ -553,9 +525,8 @@ func (m *AllowedCaveat) CloneVT() *AllowedCaveat { if m == nil { return (*AllowedCaveat)(nil) } - r := &AllowedCaveat{ - CaveatName: m.CaveatName, - } + r := new(AllowedCaveat) + r.CaveatName = m.CaveatName if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -571,9 +542,8 @@ func (m *UsersetRewrite) CloneVT() *UsersetRewrite { if m == nil { return (*UsersetRewrite)(nil) } - r := &UsersetRewrite{ - SourcePosition: m.SourcePosition.CloneVT(), - } + r := new(UsersetRewrite) + r.SourcePosition = m.SourcePosition.CloneVT() if m.RewriteOperation != nil { r.RewriteOperation = m.RewriteOperation.(interface { CloneVT() isUsersetRewrite_RewriteOperation @@ -594,9 +564,8 @@ func (m *UsersetRewrite_Union) CloneVT() isUsersetRewrite_RewriteOperation { if m == nil { return (*UsersetRewrite_Union)(nil) } - r := &UsersetRewrite_Union{ - Union: m.Union.CloneVT(), - } + r := new(UsersetRewrite_Union) + r.Union = m.Union.CloneVT() return r } @@ -604,9 +573,8 @@ func (m *UsersetRewrite_Intersection) CloneVT() isUsersetRewrite_RewriteOperatio if m == nil { return (*UsersetRewrite_Intersection)(nil) } - r := &UsersetRewrite_Intersection{ - Intersection: m.Intersection.CloneVT(), - } + r := new(UsersetRewrite_Intersection) + r.Intersection = m.Intersection.CloneVT() return r } @@ -614,9 +582,8 @@ func (m *UsersetRewrite_Exclusion) CloneVT() isUsersetRewrite_RewriteOperation { if m == nil { return (*UsersetRewrite_Exclusion)(nil) } - r := &UsersetRewrite_Exclusion{ - Exclusion: m.Exclusion.CloneVT(), - } + r := new(UsersetRewrite_Exclusion) + r.Exclusion = m.Exclusion.CloneVT() return r } @@ -624,7 +591,7 @@ func (m *SetOperation_Child_This) CloneVT() *SetOperation_Child_This { if m == nil { return (*SetOperation_Child_This)(nil) } - r := &SetOperation_Child_This{} + r := new(SetOperation_Child_This) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -640,7 +607,7 @@ func (m *SetOperation_Child_Nil) CloneVT() *SetOperation_Child_Nil { if m == nil { return (*SetOperation_Child_Nil)(nil) } - r := &SetOperation_Child_Nil{} + r := new(SetOperation_Child_Nil) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -656,9 +623,8 @@ func (m *SetOperation_Child) CloneVT() *SetOperation_Child { if m == nil { return (*SetOperation_Child)(nil) } - r := &SetOperation_Child{ - SourcePosition: m.SourcePosition.CloneVT(), - } + r := new(SetOperation_Child) + r.SourcePosition = m.SourcePosition.CloneVT() if m.ChildType != nil { r.ChildType = m.ChildType.(interface { CloneVT() isSetOperation_Child_ChildType @@ -684,9 +650,8 @@ func (m *SetOperation_Child_XThis) CloneVT() isSetOperation_Child_ChildType { if m == nil { return (*SetOperation_Child_XThis)(nil) } - r := &SetOperation_Child_XThis{ - XThis: m.XThis.CloneVT(), - } + r := new(SetOperation_Child_XThis) + r.XThis = m.XThis.CloneVT() return r } @@ -694,9 +659,8 @@ func (m *SetOperation_Child_ComputedUserset) CloneVT() isSetOperation_Child_Chil if m == nil { return (*SetOperation_Child_ComputedUserset)(nil) } - r := &SetOperation_Child_ComputedUserset{ - ComputedUserset: m.ComputedUserset.CloneVT(), - } + r := new(SetOperation_Child_ComputedUserset) + r.ComputedUserset = m.ComputedUserset.CloneVT() return r } @@ -704,9 +668,8 @@ func (m *SetOperation_Child_TupleToUserset) CloneVT() isSetOperation_Child_Child if m == nil { return (*SetOperation_Child_TupleToUserset)(nil) } - r := &SetOperation_Child_TupleToUserset{ - TupleToUserset: m.TupleToUserset.CloneVT(), - } + r := new(SetOperation_Child_TupleToUserset) + r.TupleToUserset = m.TupleToUserset.CloneVT() return r } @@ -714,9 +677,8 @@ func (m *SetOperation_Child_UsersetRewrite) CloneVT() isSetOperation_Child_Child if m == nil { return (*SetOperation_Child_UsersetRewrite)(nil) } - r := &SetOperation_Child_UsersetRewrite{ - UsersetRewrite: m.UsersetRewrite.CloneVT(), - } + r := new(SetOperation_Child_UsersetRewrite) + r.UsersetRewrite = m.UsersetRewrite.CloneVT() return r } @@ -724,9 +686,8 @@ func (m *SetOperation_Child_XNil) CloneVT() isSetOperation_Child_ChildType { if m == nil { return (*SetOperation_Child_XNil)(nil) } - r := &SetOperation_Child_XNil{ - XNil: m.XNil.CloneVT(), - } + r := new(SetOperation_Child_XNil) + r.XNil = m.XNil.CloneVT() return r } @@ -734,7 +695,7 @@ func (m *SetOperation) CloneVT() *SetOperation { if m == nil { return (*SetOperation)(nil) } - r := &SetOperation{} + r := new(SetOperation) if rhs := m.Child; rhs != nil { tmpContainer := make([]*SetOperation_Child, len(rhs)) for k, v := range rhs { @@ -757,9 +718,8 @@ func (m *TupleToUserset_Tupleset) CloneVT() *TupleToUserset_Tupleset { if m == nil { return (*TupleToUserset_Tupleset)(nil) } - r := &TupleToUserset_Tupleset{ - Relation: m.Relation, - } + r := new(TupleToUserset_Tupleset) + r.Relation = m.Relation if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -775,11 +735,10 @@ func (m *TupleToUserset) CloneVT() *TupleToUserset { if m == nil { return (*TupleToUserset)(nil) } - r := &TupleToUserset{ - Tupleset: m.Tupleset.CloneVT(), - ComputedUserset: m.ComputedUserset.CloneVT(), - SourcePosition: m.SourcePosition.CloneVT(), - } + r := new(TupleToUserset) + r.Tupleset = m.Tupleset.CloneVT() + r.ComputedUserset = m.ComputedUserset.CloneVT() + r.SourcePosition = m.SourcePosition.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -795,11 +754,10 @@ func (m *ComputedUserset) CloneVT() *ComputedUserset { if m == nil { return (*ComputedUserset)(nil) } - r := &ComputedUserset{ - Object: m.Object, - Relation: m.Relation, - SourcePosition: m.SourcePosition.CloneVT(), - } + r := new(ComputedUserset) + r.Object = m.Object + r.Relation = m.Relation + r.SourcePosition = m.SourcePosition.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -815,10 +773,9 @@ func (m *SourcePosition) CloneVT() *SourcePosition { if m == nil { return (*SourcePosition)(nil) } - r := &SourcePosition{ - ZeroIndexedLineNumber: m.ZeroIndexedLineNumber, - ZeroIndexedColumnPosition: m.ZeroIndexedColumnPosition, - } + r := new(SourcePosition) + r.ZeroIndexedLineNumber = m.ZeroIndexedLineNumber + r.ZeroIndexedColumnPosition = m.ZeroIndexedColumnPosition if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -834,7 +791,7 @@ func (m *CaveatExpression) CloneVT() *CaveatExpression { if m == nil { return (*CaveatExpression)(nil) } - r := &CaveatExpression{} + r := new(CaveatExpression) if m.OperationOrCaveat != nil { r.OperationOrCaveat = m.OperationOrCaveat.(interface { CloneVT() isCaveatExpression_OperationOrCaveat @@ -855,9 +812,8 @@ func (m *CaveatExpression_Operation) CloneVT() isCaveatExpression_OperationOrCav if m == nil { return (*CaveatExpression_Operation)(nil) } - r := &CaveatExpression_Operation{ - Operation: m.Operation.CloneVT(), - } + r := new(CaveatExpression_Operation) + r.Operation = m.Operation.CloneVT() return r } @@ -865,9 +821,8 @@ func (m *CaveatExpression_Caveat) CloneVT() isCaveatExpression_OperationOrCaveat if m == nil { return (*CaveatExpression_Caveat)(nil) } - r := &CaveatExpression_Caveat{ - Caveat: m.Caveat.CloneVT(), - } + r := new(CaveatExpression_Caveat) + r.Caveat = m.Caveat.CloneVT() return r } @@ -875,9 +830,8 @@ func (m *CaveatOperation) CloneVT() *CaveatOperation { if m == nil { return (*CaveatOperation)(nil) } - r := &CaveatOperation{ - Op: m.Op, - } + r := new(CaveatOperation) + r.Op = m.Op if rhs := m.Children; rhs != nil { tmpContainer := make([]*CaveatExpression, len(rhs)) for k, v := range rhs { @@ -930,11 +884,7 @@ func (this *ContextualizedCaveat) EqualVT(that *ContextualizedCaveat) bool { if this.CaveatName != that.CaveatName { return false } - if equal, ok := interface{}(this.Context).(interface{ EqualVT(*structpb.Struct) bool }); ok { - if !equal.EqualVT(that.Context) { - return false - } - } else if !proto.Equal(this.Context, that.Context) { + if !(*structpb1.Struct)(this.Context).EqualVT((*structpb1.Struct)(that.Context)) { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -1312,11 +1262,7 @@ func (this *Metadata) EqualVT(that *Metadata) bool { if q == nil { q = &anypb.Any{} } - if equal, ok := interface{}(p).(interface{ EqualVT(*anypb.Any) bool }); ok { - if !equal.EqualVT(q) { - return false - } - } else if !proto.Equal(p, q) { + if !(*anypb1.Any)(p).EqualVT((*anypb1.Any)(q)) { return false } } @@ -2257,7 +2203,7 @@ func (m *RelationTuple) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -2267,7 +2213,7 @@ func (m *RelationTuple) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -2277,7 +2223,7 @@ func (m *RelationTuple) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -2315,31 +2261,19 @@ func (m *ContextualizedCaveat) MarshalToSizedBufferVT(dAtA []byte) (int, error) copy(dAtA[i:], m.unknownFields) } if m.Context != nil { - if vtmsg, ok := interface{}(m.Context).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.Context) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + size, err := (*structpb1.Struct)(m.Context).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if len(m.CaveatName) > 0 { i -= len(m.CaveatName) copy(dAtA[i:], m.CaveatName) - i = encodeVarint(dAtA, i, uint64(len(m.CaveatName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CaveatName))) i-- dAtA[i] = 0xa } @@ -2382,7 +2316,7 @@ func (m *CaveatDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } @@ -2392,7 +2326,7 @@ func (m *CaveatDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -2405,15 +2339,15 @@ func (m *CaveatDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x1a } @@ -2421,14 +2355,14 @@ func (m *CaveatDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.SerializedExpression) > 0 { i -= len(m.SerializedExpression) copy(dAtA[i:], m.SerializedExpression) - i = encodeVarint(dAtA, i, uint64(len(m.SerializedExpression))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SerializedExpression))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -2472,7 +2406,7 @@ func (m *CaveatTypeReference) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -2480,7 +2414,7 @@ func (m *CaveatTypeReference) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.TypeName) > 0 { i -= len(m.TypeName) copy(dAtA[i:], m.TypeName) - i = encodeVarint(dAtA, i, uint64(len(m.TypeName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TypeName))) i-- dAtA[i] = 0xa } @@ -2520,21 +2454,21 @@ func (m *ObjectAndRelation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Relation) > 0 { i -= len(m.Relation) copy(dAtA[i:], m.Relation) - i = encodeVarint(dAtA, i, uint64(len(m.Relation))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Relation))) i-- dAtA[i] = 0x1a } if len(m.ObjectId) > 0 { i -= len(m.ObjectId) copy(dAtA[i:], m.ObjectId) - i = encodeVarint(dAtA, i, uint64(len(m.ObjectId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ObjectId))) i-- dAtA[i] = 0x12 } if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) - i = encodeVarint(dAtA, i, uint64(len(m.Namespace))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0xa } @@ -2574,14 +2508,14 @@ func (m *RelationReference) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Relation) > 0 { i -= len(m.Relation) copy(dAtA[i:], m.Relation) - i = encodeVarint(dAtA, i, uint64(len(m.Relation))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Relation))) i-- dAtA[i] = 0x1a } if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) - i = encodeVarint(dAtA, i, uint64(len(m.Namespace))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0xa } @@ -2621,7 +2555,7 @@ func (m *Zookie) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Token) > 0 { i -= len(m.Token) copy(dAtA[i:], m.Token) - i = encodeVarint(dAtA, i, uint64(len(m.Token))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Token))) i-- dAtA[i] = 0xa } @@ -2664,12 +2598,12 @@ func (m *RelationTupleUpdate) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if m.Operation != 0 { - i = encodeVarint(dAtA, i, uint64(m.Operation)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Operation)) i-- dAtA[i] = 0x8 } @@ -2721,7 +2655,7 @@ func (m *RelationTupleTreeNode) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -2731,7 +2665,7 @@ func (m *RelationTupleTreeNode) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -2751,7 +2685,7 @@ func (m *RelationTupleTreeNode_IntermediateNode) MarshalToSizedBufferVT(dAtA []b return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -2770,7 +2704,7 @@ func (m *RelationTupleTreeNode_LeafNode) MarshalToSizedBufferVT(dAtA []byte) (in return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -2813,13 +2747,13 @@ func (m *SetOperationUserset) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } } if m.Operation != 0 { - i = encodeVarint(dAtA, i, uint64(m.Operation)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Operation)) i-- dAtA[i] = 0x8 } @@ -2862,7 +2796,7 @@ func (m *DirectSubject) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -2872,7 +2806,7 @@ func (m *DirectSubject) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -2916,7 +2850,7 @@ func (m *DirectSubjects) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -2956,24 +2890,12 @@ func (m *Metadata) MarshalToSizedBufferVT(dAtA []byte) (int, error) { } if len(m.MetadataMessage) > 0 { for iNdEx := len(m.MetadataMessage) - 1; iNdEx >= 0; iNdEx-- { - if vtmsg, ok := interface{}(m.MetadataMessage[iNdEx]).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.MetadataMessage[iNdEx]) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + size, err := (*anypb1.Any)(m.MetadataMessage[iNdEx]).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -3017,7 +2939,7 @@ func (m *NamespaceDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -3027,7 +2949,7 @@ func (m *NamespaceDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -3038,7 +2960,7 @@ func (m *NamespaceDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -3046,7 +2968,7 @@ func (m *NamespaceDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -3086,14 +3008,14 @@ func (m *Relation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.CanonicalCacheKey) > 0 { i -= len(m.CanonicalCacheKey) copy(dAtA[i:], m.CanonicalCacheKey) - i = encodeVarint(dAtA, i, uint64(len(m.CanonicalCacheKey))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CanonicalCacheKey))) i-- dAtA[i] = 0x3a } if len(m.AliasingRelation) > 0 { i -= len(m.AliasingRelation) copy(dAtA[i:], m.AliasingRelation) - i = encodeVarint(dAtA, i, uint64(len(m.AliasingRelation))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AliasingRelation))) i-- dAtA[i] = 0x32 } @@ -3103,7 +3025,7 @@ func (m *Relation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } @@ -3113,7 +3035,7 @@ func (m *Relation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -3123,7 +3045,7 @@ func (m *Relation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -3133,14 +3055,14 @@ func (m *Relation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -3186,15 +3108,15 @@ func (m *ReachabilityGraph) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x12 } @@ -3208,15 +3130,15 @@ func (m *ReachabilityGraph) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } @@ -3260,14 +3182,14 @@ func (m *ReachabilityEntrypoints) MarshalToSizedBufferVT(dAtA []byte) (int, erro return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } if len(m.SubjectType) > 0 { i -= len(m.SubjectType) copy(dAtA[i:], m.SubjectType) - i = encodeVarint(dAtA, i, uint64(len(m.SubjectType))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SubjectType))) i-- dAtA[i] = 0x12 } @@ -3278,7 +3200,7 @@ func (m *ReachabilityEntrypoints) MarshalToSizedBufferVT(dAtA []byte) (int, erro return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -3319,12 +3241,12 @@ func (m *ReachabilityEntrypoint) MarshalToSizedBufferVT(dAtA []byte) (int, error if len(m.TuplesetRelation) > 0 { i -= len(m.TuplesetRelation) copy(dAtA[i:], m.TuplesetRelation) - i = encodeVarint(dAtA, i, uint64(len(m.TuplesetRelation))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TuplesetRelation))) i-- dAtA[i] = 0x2a } if m.ResultStatus != 0 { - i = encodeVarint(dAtA, i, uint64(m.ResultStatus)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ResultStatus)) i-- dAtA[i] = 0x20 } @@ -3334,12 +3256,12 @@ func (m *ReachabilityEntrypoint) MarshalToSizedBufferVT(dAtA []byte) (int, error return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if m.Kind != 0 { - i = encodeVarint(dAtA, i, uint64(m.Kind)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Kind)) i-- dAtA[i] = 0x8 } @@ -3383,7 +3305,7 @@ func (m *TypeInformation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -3469,7 +3391,7 @@ func (m *AllowedRelation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } @@ -3479,14 +3401,14 @@ func (m *AllowedRelation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) - i = encodeVarint(dAtA, i, uint64(len(m.Namespace))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0xa } @@ -3502,7 +3424,7 @@ func (m *AllowedRelation_Relation) MarshalToSizedBufferVT(dAtA []byte) (int, err i := len(dAtA) i -= len(m.Relation) copy(dAtA[i:], m.Relation) - i = encodeVarint(dAtA, i, uint64(len(m.Relation))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Relation))) i-- dAtA[i] = 0x1a return len(dAtA) - i, nil @@ -3520,7 +3442,7 @@ func (m *AllowedRelation_PublicWildcard_) MarshalToSizedBufferVT(dAtA []byte) (i return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -3559,7 +3481,7 @@ func (m *AllowedCaveat) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.CaveatName) > 0 { i -= len(m.CaveatName) copy(dAtA[i:], m.CaveatName) - i = encodeVarint(dAtA, i, uint64(len(m.CaveatName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CaveatName))) i-- dAtA[i] = 0xa } @@ -3611,7 +3533,7 @@ func (m *UsersetRewrite) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -3631,7 +3553,7 @@ func (m *UsersetRewrite_Union) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -3650,7 +3572,7 @@ func (m *UsersetRewrite_Intersection) MarshalToSizedBufferVT(dAtA []byte) (int, return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -3669,7 +3591,7 @@ func (m *UsersetRewrite_Exclusion) MarshalToSizedBufferVT(dAtA []byte) (int, err return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -3783,7 +3705,7 @@ func (m *SetOperation_Child) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.OperationPath) > 0 { var pksize2 int for _, num := range m.OperationPath { - pksize2 += sov(uint64(num)) + pksize2 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize2 j1 := i @@ -3796,7 +3718,7 @@ func (m *SetOperation_Child) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[j1] = uint8(num) j1++ } - i = encodeVarint(dAtA, i, uint64(pksize2)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x3a } @@ -3806,7 +3728,7 @@ func (m *SetOperation_Child) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } @@ -3826,7 +3748,7 @@ func (m *SetOperation_Child_XThis) MarshalToSizedBufferVT(dAtA []byte) (int, err return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -3845,7 +3767,7 @@ func (m *SetOperation_Child_ComputedUserset) MarshalToSizedBufferVT(dAtA []byte) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -3864,7 +3786,7 @@ func (m *SetOperation_Child_TupleToUserset) MarshalToSizedBufferVT(dAtA []byte) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -3883,7 +3805,7 @@ func (m *SetOperation_Child_UsersetRewrite) MarshalToSizedBufferVT(dAtA []byte) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -3902,7 +3824,7 @@ func (m *SetOperation_Child_XNil) MarshalToSizedBufferVT(dAtA []byte) (int, erro return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } @@ -3945,7 +3867,7 @@ func (m *SetOperation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -3986,7 +3908,7 @@ func (m *TupleToUserset_Tupleset) MarshalToSizedBufferVT(dAtA []byte) (int, erro if len(m.Relation) > 0 { i -= len(m.Relation) copy(dAtA[i:], m.Relation) - i = encodeVarint(dAtA, i, uint64(len(m.Relation))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Relation))) i-- dAtA[i] = 0xa } @@ -4029,7 +3951,7 @@ func (m *TupleToUserset) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -4039,7 +3961,7 @@ func (m *TupleToUserset) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -4049,7 +3971,7 @@ func (m *TupleToUserset) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -4092,19 +4014,19 @@ func (m *ComputedUserset) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } if len(m.Relation) > 0 { i -= len(m.Relation) copy(dAtA[i:], m.Relation) - i = encodeVarint(dAtA, i, uint64(len(m.Relation))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Relation))) i-- dAtA[i] = 0x12 } if m.Object != 0 { - i = encodeVarint(dAtA, i, uint64(m.Object)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Object)) i-- dAtA[i] = 0x8 } @@ -4142,12 +4064,12 @@ func (m *SourcePosition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.ZeroIndexedColumnPosition != 0 { - i = encodeVarint(dAtA, i, uint64(m.ZeroIndexedColumnPosition)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ZeroIndexedColumnPosition)) i-- dAtA[i] = 0x10 } if m.ZeroIndexedLineNumber != 0 { - i = encodeVarint(dAtA, i, uint64(m.ZeroIndexedLineNumber)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ZeroIndexedLineNumber)) i-- dAtA[i] = 0x8 } @@ -4209,7 +4131,7 @@ func (m *CaveatExpression_Operation) MarshalToSizedBufferVT(dAtA []byte) (int, e return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -4228,7 +4150,7 @@ func (m *CaveatExpression_Caveat) MarshalToSizedBufferVT(dAtA []byte) (int, erro return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -4271,30 +4193,19 @@ func (m *CaveatOperation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } } if m.Op != 0 { - i = encodeVarint(dAtA, i, uint64(m.Op)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Op)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func encodeVarint(dAtA []byte, offset int, v uint64) int { - offset -= sov(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} func (m *RelationTuple) SizeVT() (n int) { if m == nil { return 0 @@ -4303,15 +4214,15 @@ func (m *RelationTuple) SizeVT() (n int) { _ = l if m.ResourceAndRelation != nil { l = m.ResourceAndRelation.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Subject != nil { l = m.Subject.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Caveat != nil { l = m.Caveat.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4325,17 +4236,11 @@ func (m *ContextualizedCaveat) SizeVT() (n int) { _ = l l = len(m.CaveatName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Context != nil { - if size, ok := interface{}(m.Context).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.Context) - } - n += 1 + l + sov(uint64(l)) + l = (*structpb1.Struct)(m.Context).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4349,11 +4254,11 @@ func (m *CaveatDefinition) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.SerializedExpression) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.ParameterTypes) > 0 { for k, v := range m.ParameterTypes { @@ -4363,18 +4268,18 @@ func (m *CaveatDefinition) SizeVT() (n int) { if v != nil { l = v.SizeVT() } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + l += 1 + protohelpers.SizeOfVarint(uint64(l)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if m.Metadata != nil { l = m.Metadata.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.SourcePosition != nil { l = m.SourcePosition.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4388,12 +4293,12 @@ func (m *CaveatTypeReference) SizeVT() (n int) { _ = l l = len(m.TypeName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.ChildTypes) > 0 { for _, e := range m.ChildTypes { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -4408,15 +4313,15 @@ func (m *ObjectAndRelation) SizeVT() (n int) { _ = l l = len(m.Namespace) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ObjectId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Relation) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4430,11 +4335,11 @@ func (m *RelationReference) SizeVT() (n int) { _ = l l = len(m.Namespace) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Relation) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4448,7 +4353,7 @@ func (m *Zookie) SizeVT() (n int) { _ = l l = len(m.Token) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4461,11 +4366,11 @@ func (m *RelationTupleUpdate) SizeVT() (n int) { var l int _ = l if m.Operation != 0 { - n += 1 + sov(uint64(m.Operation)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Operation)) } if m.Tuple != nil { l = m.Tuple.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4482,11 +4387,11 @@ func (m *RelationTupleTreeNode) SizeVT() (n int) { } if m.Expanded != nil { l = m.Expanded.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.CaveatExpression != nil { l = m.CaveatExpression.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4500,7 +4405,7 @@ func (m *RelationTupleTreeNode_IntermediateNode) SizeVT() (n int) { _ = l if m.IntermediateNode != nil { l = m.IntermediateNode.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -4512,7 +4417,7 @@ func (m *RelationTupleTreeNode_LeafNode) SizeVT() (n int) { _ = l if m.LeafNode != nil { l = m.LeafNode.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -4523,12 +4428,12 @@ func (m *SetOperationUserset) SizeVT() (n int) { var l int _ = l if m.Operation != 0 { - n += 1 + sov(uint64(m.Operation)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Operation)) } if len(m.ChildNodes) > 0 { for _, e := range m.ChildNodes { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -4543,11 +4448,11 @@ func (m *DirectSubject) SizeVT() (n int) { _ = l if m.Subject != nil { l = m.Subject.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.CaveatExpression != nil { l = m.CaveatExpression.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4562,7 +4467,7 @@ func (m *DirectSubjects) SizeVT() (n int) { if len(m.Subjects) > 0 { for _, e := range m.Subjects { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -4577,14 +4482,8 @@ func (m *Metadata) SizeVT() (n int) { _ = l if len(m.MetadataMessage) > 0 { for _, e := range m.MetadataMessage { - if size, ok := interface{}(e).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(e) - } - n += 1 + l + sov(uint64(l)) + l = (*anypb1.Any)(e).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -4599,21 +4498,21 @@ func (m *NamespaceDefinition) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Relation) > 0 { for _, e := range m.Relation { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.Metadata != nil { l = m.Metadata.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.SourcePosition != nil { l = m.SourcePosition.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4627,31 +4526,31 @@ func (m *Relation) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.UsersetRewrite != nil { l = m.UsersetRewrite.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.TypeInformation != nil { l = m.TypeInformation.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Metadata != nil { l = m.Metadata.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.SourcePosition != nil { l = m.SourcePosition.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.AliasingRelation) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.CanonicalCacheKey) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4671,9 +4570,9 @@ func (m *ReachabilityGraph) SizeVT() (n int) { if v != nil { l = v.SizeVT() } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + l += 1 + protohelpers.SizeOfVarint(uint64(l)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.EntrypointsBySubjectRelation) > 0 { @@ -4684,9 +4583,9 @@ func (m *ReachabilityGraph) SizeVT() (n int) { if v != nil { l = v.SizeVT() } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + l += 1 + protohelpers.SizeOfVarint(uint64(l)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } n += len(m.unknownFields) @@ -4702,16 +4601,16 @@ func (m *ReachabilityEntrypoints) SizeVT() (n int) { if len(m.Entrypoints) > 0 { for _, e := range m.Entrypoints { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } l = len(m.SubjectType) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.SubjectRelation != nil { l = m.SubjectRelation.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4724,18 +4623,18 @@ func (m *ReachabilityEntrypoint) SizeVT() (n int) { var l int _ = l if m.Kind != 0 { - n += 1 + sov(uint64(m.Kind)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Kind)) } if m.TargetRelation != nil { l = m.TargetRelation.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ResultStatus != 0 { - n += 1 + sov(uint64(m.ResultStatus)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.ResultStatus)) } l = len(m.TuplesetRelation) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4750,7 +4649,7 @@ func (m *TypeInformation) SizeVT() (n int) { if len(m.AllowedDirectRelations) > 0 { for _, e := range m.AllowedDirectRelations { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -4775,18 +4674,18 @@ func (m *AllowedRelation) SizeVT() (n int) { _ = l l = len(m.Namespace) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if vtmsg, ok := m.RelationOrWildcard.(interface{ SizeVT() int }); ok { n += vtmsg.SizeVT() } if m.SourcePosition != nil { l = m.SourcePosition.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.RequiredCaveat != nil { l = m.RequiredCaveat.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4799,7 +4698,7 @@ func (m *AllowedRelation_Relation) SizeVT() (n int) { var l int _ = l l = len(m.Relation) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) return n } func (m *AllowedRelation_PublicWildcard_) SizeVT() (n int) { @@ -4810,7 +4709,7 @@ func (m *AllowedRelation_PublicWildcard_) SizeVT() (n int) { _ = l if m.PublicWildcard != nil { l = m.PublicWildcard.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -4822,7 +4721,7 @@ func (m *AllowedCaveat) SizeVT() (n int) { _ = l l = len(m.CaveatName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4839,7 +4738,7 @@ func (m *UsersetRewrite) SizeVT() (n int) { } if m.SourcePosition != nil { l = m.SourcePosition.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -4853,7 +4752,7 @@ func (m *UsersetRewrite_Union) SizeVT() (n int) { _ = l if m.Union != nil { l = m.Union.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -4865,7 +4764,7 @@ func (m *UsersetRewrite_Intersection) SizeVT() (n int) { _ = l if m.Intersection != nil { l = m.Intersection.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -4877,7 +4776,7 @@ func (m *UsersetRewrite_Exclusion) SizeVT() (n int) { _ = l if m.Exclusion != nil { l = m.Exclusion.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -4912,14 +4811,14 @@ func (m *SetOperation_Child) SizeVT() (n int) { } if m.SourcePosition != nil { l = m.SourcePosition.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.OperationPath) > 0 { l = 0 for _, e := range m.OperationPath { - l += sov(uint64(e)) + l += protohelpers.SizeOfVarint(uint64(e)) } - n += 1 + sov(uint64(l)) + l + n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l } n += len(m.unknownFields) return n @@ -4933,7 +4832,7 @@ func (m *SetOperation_Child_XThis) SizeVT() (n int) { _ = l if m.XThis != nil { l = m.XThis.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -4945,7 +4844,7 @@ func (m *SetOperation_Child_ComputedUserset) SizeVT() (n int) { _ = l if m.ComputedUserset != nil { l = m.ComputedUserset.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -4957,7 +4856,7 @@ func (m *SetOperation_Child_TupleToUserset) SizeVT() (n int) { _ = l if m.TupleToUserset != nil { l = m.TupleToUserset.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -4969,7 +4868,7 @@ func (m *SetOperation_Child_UsersetRewrite) SizeVT() (n int) { _ = l if m.UsersetRewrite != nil { l = m.UsersetRewrite.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -4981,7 +4880,7 @@ func (m *SetOperation_Child_XNil) SizeVT() (n int) { _ = l if m.XNil != nil { l = m.XNil.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -4994,7 +4893,7 @@ func (m *SetOperation) SizeVT() (n int) { if len(m.Child) > 0 { for _, e := range m.Child { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -5009,7 +4908,7 @@ func (m *TupleToUserset_Tupleset) SizeVT() (n int) { _ = l l = len(m.Relation) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -5023,15 +4922,15 @@ func (m *TupleToUserset) SizeVT() (n int) { _ = l if m.Tupleset != nil { l = m.Tupleset.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ComputedUserset != nil { l = m.ComputedUserset.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.SourcePosition != nil { l = m.SourcePosition.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -5044,15 +4943,15 @@ func (m *ComputedUserset) SizeVT() (n int) { var l int _ = l if m.Object != 0 { - n += 1 + sov(uint64(m.Object)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Object)) } l = len(m.Relation) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.SourcePosition != nil { l = m.SourcePosition.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -5065,10 +4964,10 @@ func (m *SourcePosition) SizeVT() (n int) { var l int _ = l if m.ZeroIndexedLineNumber != 0 { - n += 1 + sov(uint64(m.ZeroIndexedLineNumber)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.ZeroIndexedLineNumber)) } if m.ZeroIndexedColumnPosition != 0 { - n += 1 + sov(uint64(m.ZeroIndexedColumnPosition)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.ZeroIndexedColumnPosition)) } n += len(m.unknownFields) return n @@ -5095,7 +4994,7 @@ func (m *CaveatExpression_Operation) SizeVT() (n int) { _ = l if m.Operation != nil { l = m.Operation.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -5107,7 +5006,7 @@ func (m *CaveatExpression_Caveat) SizeVT() (n int) { _ = l if m.Caveat != nil { l = m.Caveat.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -5118,24 +5017,18 @@ func (m *CaveatOperation) SizeVT() (n int) { var l int _ = l if m.Op != 0 { - n += 1 + sov(uint64(m.Op)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Op)) } if len(m.Children) > 0 { for _, e := range m.Children { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) return n } -func sov(x uint64) (n int) { - return (bits.Len64(x|1) + 6) / 7 -} -func soz(x uint64) (n int) { - return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} func (m *RelationTuple) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5144,7 +5037,7 @@ func (m *RelationTuple) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5172,7 +5065,7 @@ func (m *RelationTuple) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5185,11 +5078,11 @@ func (m *RelationTuple) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5208,7 +5101,7 @@ func (m *RelationTuple) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5221,11 +5114,11 @@ func (m *RelationTuple) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5244,7 +5137,7 @@ func (m *RelationTuple) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5257,11 +5150,11 @@ func (m *RelationTuple) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5275,12 +5168,12 @@ func (m *RelationTuple) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -5303,7 +5196,7 @@ func (m *ContextualizedCaveat) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5331,7 +5224,7 @@ func (m *ContextualizedCaveat) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5345,11 +5238,11 @@ func (m *ContextualizedCaveat) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5363,7 +5256,7 @@ func (m *ContextualizedCaveat) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5376,11 +5269,11 @@ func (m *ContextualizedCaveat) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5388,26 +5281,18 @@ func (m *ContextualizedCaveat) UnmarshalVT(dAtA []byte) error { if m.Context == nil { m.Context = &structpb.Struct{} } - if unmarshal, ok := interface{}(m.Context).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Context); err != nil { - return err - } + if err := (*structpb1.Struct)(m.Context).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -5430,7 +5315,7 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5458,7 +5343,7 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5472,11 +5357,11 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5490,7 +5375,7 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5503,11 +5388,11 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5524,7 +5409,7 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5537,11 +5422,11 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5556,7 +5441,7 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5573,7 +5458,7 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5587,11 +5472,11 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -5602,7 +5487,7 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5615,11 +5500,11 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { } } if mapmsglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF @@ -5631,12 +5516,12 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { iNdEx = postmsgIndex } else { iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -5653,7 +5538,7 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5666,11 +5551,11 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5689,7 +5574,7 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5702,11 +5587,11 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5720,12 +5605,12 @@ func (m *CaveatDefinition) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -5748,7 +5633,7 @@ func (m *CaveatTypeReference) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5776,7 +5661,7 @@ func (m *CaveatTypeReference) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5790,11 +5675,11 @@ func (m *CaveatTypeReference) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5808,7 +5693,7 @@ func (m *CaveatTypeReference) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5821,11 +5706,11 @@ func (m *CaveatTypeReference) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5837,12 +5722,12 @@ func (m *CaveatTypeReference) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -5865,7 +5750,7 @@ func (m *ObjectAndRelation) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5893,7 +5778,7 @@ func (m *ObjectAndRelation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5907,11 +5792,11 @@ func (m *ObjectAndRelation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5925,7 +5810,7 @@ func (m *ObjectAndRelation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5939,11 +5824,11 @@ func (m *ObjectAndRelation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5957,7 +5842,7 @@ func (m *ObjectAndRelation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5971,11 +5856,11 @@ func (m *ObjectAndRelation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5984,12 +5869,12 @@ func (m *ObjectAndRelation) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -6012,7 +5897,7 @@ func (m *RelationReference) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6040,7 +5925,7 @@ func (m *RelationReference) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6054,11 +5939,11 @@ func (m *RelationReference) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6072,7 +5957,7 @@ func (m *RelationReference) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6086,11 +5971,11 @@ func (m *RelationReference) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6099,12 +5984,12 @@ func (m *RelationReference) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -6127,7 +6012,7 @@ func (m *Zookie) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6155,7 +6040,7 @@ func (m *Zookie) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6169,11 +6054,11 @@ func (m *Zookie) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6182,12 +6067,12 @@ func (m *Zookie) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -6210,7 +6095,7 @@ func (m *RelationTupleUpdate) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6238,7 +6123,7 @@ func (m *RelationTupleUpdate) UnmarshalVT(dAtA []byte) error { m.Operation = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6257,7 +6142,7 @@ func (m *RelationTupleUpdate) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6270,11 +6155,11 @@ func (m *RelationTupleUpdate) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6288,12 +6173,12 @@ func (m *RelationTupleUpdate) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -6316,7 +6201,7 @@ func (m *RelationTupleTreeNode) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6344,7 +6229,7 @@ func (m *RelationTupleTreeNode) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6357,11 +6242,11 @@ func (m *RelationTupleTreeNode) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6385,7 +6270,7 @@ func (m *RelationTupleTreeNode) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6398,11 +6283,11 @@ func (m *RelationTupleTreeNode) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6426,7 +6311,7 @@ func (m *RelationTupleTreeNode) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6439,11 +6324,11 @@ func (m *RelationTupleTreeNode) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6462,7 +6347,7 @@ func (m *RelationTupleTreeNode) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6475,11 +6360,11 @@ func (m *RelationTupleTreeNode) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6493,12 +6378,12 @@ func (m *RelationTupleTreeNode) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -6521,7 +6406,7 @@ func (m *SetOperationUserset) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6549,7 +6434,7 @@ func (m *SetOperationUserset) UnmarshalVT(dAtA []byte) error { m.Operation = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6568,7 +6453,7 @@ func (m *SetOperationUserset) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6581,11 +6466,11 @@ func (m *SetOperationUserset) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6597,12 +6482,12 @@ func (m *SetOperationUserset) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -6625,7 +6510,7 @@ func (m *DirectSubject) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6653,7 +6538,7 @@ func (m *DirectSubject) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6666,11 +6551,11 @@ func (m *DirectSubject) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6689,7 +6574,7 @@ func (m *DirectSubject) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6702,11 +6587,11 @@ func (m *DirectSubject) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6720,12 +6605,12 @@ func (m *DirectSubject) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -6748,7 +6633,7 @@ func (m *DirectSubjects) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6776,7 +6661,7 @@ func (m *DirectSubjects) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6789,11 +6674,11 @@ func (m *DirectSubjects) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6805,12 +6690,12 @@ func (m *DirectSubjects) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -6833,7 +6718,7 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6861,7 +6746,7 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6874,36 +6759,28 @@ func (m *Metadata) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.MetadataMessage = append(m.MetadataMessage, &anypb.Any{}) - if unmarshal, ok := interface{}(m.MetadataMessage[len(m.MetadataMessage)-1]).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.MetadataMessage[len(m.MetadataMessage)-1]); err != nil { - return err - } + if err := (*anypb1.Any)(m.MetadataMessage[len(m.MetadataMessage)-1]).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -6926,7 +6803,7 @@ func (m *NamespaceDefinition) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6954,7 +6831,7 @@ func (m *NamespaceDefinition) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6968,11 +6845,11 @@ func (m *NamespaceDefinition) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6986,7 +6863,7 @@ func (m *NamespaceDefinition) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6999,11 +6876,11 @@ func (m *NamespaceDefinition) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7020,7 +6897,7 @@ func (m *NamespaceDefinition) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7033,11 +6910,11 @@ func (m *NamespaceDefinition) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7056,7 +6933,7 @@ func (m *NamespaceDefinition) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7069,11 +6946,11 @@ func (m *NamespaceDefinition) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7087,12 +6964,12 @@ func (m *NamespaceDefinition) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -7115,7 +6992,7 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7143,7 +7020,7 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7157,11 +7034,11 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7175,7 +7052,7 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7188,11 +7065,11 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7211,7 +7088,7 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7224,11 +7101,11 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7247,7 +7124,7 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7260,11 +7137,11 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7283,7 +7160,7 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7296,11 +7173,11 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7319,7 +7196,7 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7333,11 +7210,11 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7351,7 +7228,7 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7365,11 +7242,11 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7378,12 +7255,12 @@ func (m *Relation) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -7406,7 +7283,7 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7434,7 +7311,7 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7447,11 +7324,11 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7466,7 +7343,7 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7483,7 +7360,7 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7497,11 +7374,11 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -7512,7 +7389,7 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7525,11 +7402,11 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { } } if mapmsglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF @@ -7541,12 +7418,12 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { iNdEx = postmsgIndex } else { iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -7563,7 +7440,7 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7576,11 +7453,11 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7595,7 +7472,7 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7612,7 +7489,7 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7626,11 +7503,11 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -7641,7 +7518,7 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7654,11 +7531,11 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { } } if mapmsglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF @@ -7670,12 +7547,12 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { iNdEx = postmsgIndex } else { iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -7687,12 +7564,12 @@ func (m *ReachabilityGraph) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -7715,7 +7592,7 @@ func (m *ReachabilityEntrypoints) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7743,7 +7620,7 @@ func (m *ReachabilityEntrypoints) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7756,11 +7633,11 @@ func (m *ReachabilityEntrypoints) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7777,7 +7654,7 @@ func (m *ReachabilityEntrypoints) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7791,11 +7668,11 @@ func (m *ReachabilityEntrypoints) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7809,7 +7686,7 @@ func (m *ReachabilityEntrypoints) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7822,11 +7699,11 @@ func (m *ReachabilityEntrypoints) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7840,12 +7717,12 @@ func (m *ReachabilityEntrypoints) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -7868,7 +7745,7 @@ func (m *ReachabilityEntrypoint) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7896,7 +7773,7 @@ func (m *ReachabilityEntrypoint) UnmarshalVT(dAtA []byte) error { m.Kind = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7915,7 +7792,7 @@ func (m *ReachabilityEntrypoint) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7928,11 +7805,11 @@ func (m *ReachabilityEntrypoint) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7951,7 +7828,7 @@ func (m *ReachabilityEntrypoint) UnmarshalVT(dAtA []byte) error { m.ResultStatus = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7970,7 +7847,7 @@ func (m *ReachabilityEntrypoint) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -7984,11 +7861,11 @@ func (m *ReachabilityEntrypoint) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -7997,12 +7874,12 @@ func (m *ReachabilityEntrypoint) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -8025,7 +7902,7 @@ func (m *TypeInformation) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8053,7 +7930,7 @@ func (m *TypeInformation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8066,11 +7943,11 @@ func (m *TypeInformation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8082,12 +7959,12 @@ func (m *TypeInformation) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -8110,7 +7987,7 @@ func (m *AllowedRelation_PublicWildcard) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8133,12 +8010,12 @@ func (m *AllowedRelation_PublicWildcard) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -8161,7 +8038,7 @@ func (m *AllowedRelation) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8189,7 +8066,7 @@ func (m *AllowedRelation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8203,11 +8080,11 @@ func (m *AllowedRelation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8221,7 +8098,7 @@ func (m *AllowedRelation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8235,11 +8112,11 @@ func (m *AllowedRelation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8253,7 +8130,7 @@ func (m *AllowedRelation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8266,11 +8143,11 @@ func (m *AllowedRelation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8294,7 +8171,7 @@ func (m *AllowedRelation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8307,11 +8184,11 @@ func (m *AllowedRelation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8330,7 +8207,7 @@ func (m *AllowedRelation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8343,11 +8220,11 @@ func (m *AllowedRelation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8361,12 +8238,12 @@ func (m *AllowedRelation) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -8389,7 +8266,7 @@ func (m *AllowedCaveat) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8417,7 +8294,7 @@ func (m *AllowedCaveat) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8431,11 +8308,11 @@ func (m *AllowedCaveat) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8444,12 +8321,12 @@ func (m *AllowedCaveat) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -8472,7 +8349,7 @@ func (m *UsersetRewrite) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8500,7 +8377,7 @@ func (m *UsersetRewrite) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8513,11 +8390,11 @@ func (m *UsersetRewrite) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8541,7 +8418,7 @@ func (m *UsersetRewrite) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8554,11 +8431,11 @@ func (m *UsersetRewrite) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8582,7 +8459,7 @@ func (m *UsersetRewrite) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8595,11 +8472,11 @@ func (m *UsersetRewrite) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8623,7 +8500,7 @@ func (m *UsersetRewrite) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8636,11 +8513,11 @@ func (m *UsersetRewrite) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8654,12 +8531,12 @@ func (m *UsersetRewrite) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -8682,7 +8559,7 @@ func (m *SetOperation_Child_This) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8705,12 +8582,12 @@ func (m *SetOperation_Child_This) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -8733,7 +8610,7 @@ func (m *SetOperation_Child_Nil) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8756,12 +8633,12 @@ func (m *SetOperation_Child_Nil) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -8784,7 +8661,7 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8812,7 +8689,7 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8825,11 +8702,11 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8853,7 +8730,7 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8866,11 +8743,11 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8894,7 +8771,7 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8907,11 +8784,11 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8935,7 +8812,7 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8948,11 +8825,11 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -8976,7 +8853,7 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -8989,11 +8866,11 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -9012,7 +8889,7 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9025,11 +8902,11 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -9051,7 +8928,7 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9068,7 +8945,7 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9081,11 +8958,11 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -9105,7 +8982,7 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9124,12 +9001,12 @@ func (m *SetOperation_Child) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -9152,7 +9029,7 @@ func (m *SetOperation) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9180,7 +9057,7 @@ func (m *SetOperation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9193,11 +9070,11 @@ func (m *SetOperation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -9209,12 +9086,12 @@ func (m *SetOperation) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -9237,7 +9114,7 @@ func (m *TupleToUserset_Tupleset) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9265,7 +9142,7 @@ func (m *TupleToUserset_Tupleset) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9279,11 +9156,11 @@ func (m *TupleToUserset_Tupleset) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -9292,12 +9169,12 @@ func (m *TupleToUserset_Tupleset) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -9320,7 +9197,7 @@ func (m *TupleToUserset) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9348,7 +9225,7 @@ func (m *TupleToUserset) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9361,11 +9238,11 @@ func (m *TupleToUserset) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -9384,7 +9261,7 @@ func (m *TupleToUserset) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9397,11 +9274,11 @@ func (m *TupleToUserset) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -9420,7 +9297,7 @@ func (m *TupleToUserset) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9433,11 +9310,11 @@ func (m *TupleToUserset) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -9451,12 +9328,12 @@ func (m *TupleToUserset) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -9479,7 +9356,7 @@ func (m *ComputedUserset) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9507,7 +9384,7 @@ func (m *ComputedUserset) UnmarshalVT(dAtA []byte) error { m.Object = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9526,7 +9403,7 @@ func (m *ComputedUserset) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9540,11 +9417,11 @@ func (m *ComputedUserset) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -9558,7 +9435,7 @@ func (m *ComputedUserset) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9571,11 +9448,11 @@ func (m *ComputedUserset) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -9589,12 +9466,12 @@ func (m *ComputedUserset) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -9617,7 +9494,7 @@ func (m *SourcePosition) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9645,7 +9522,7 @@ func (m *SourcePosition) UnmarshalVT(dAtA []byte) error { m.ZeroIndexedLineNumber = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9664,7 +9541,7 @@ func (m *SourcePosition) UnmarshalVT(dAtA []byte) error { m.ZeroIndexedColumnPosition = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9678,12 +9555,12 @@ func (m *SourcePosition) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -9706,7 +9583,7 @@ func (m *CaveatExpression) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9734,7 +9611,7 @@ func (m *CaveatExpression) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9747,11 +9624,11 @@ func (m *CaveatExpression) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -9775,7 +9652,7 @@ func (m *CaveatExpression) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9788,11 +9665,11 @@ func (m *CaveatExpression) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -9811,12 +9688,12 @@ func (m *CaveatExpression) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -9839,7 +9716,7 @@ func (m *CaveatOperation) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9867,7 +9744,7 @@ func (m *CaveatOperation) UnmarshalVT(dAtA []byte) error { m.Op = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9886,7 +9763,7 @@ func (m *CaveatOperation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9899,11 +9776,11 @@ func (m *CaveatOperation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -9915,12 +9792,12 @@ func (m *CaveatOperation) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -9935,88 +9812,3 @@ func (m *CaveatOperation) UnmarshalVT(dAtA []byte) error { } return nil } - -func skip(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLength - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroup - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLength - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflow = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") -) diff --git a/pkg/proto/developer/v1/developer_vtproto.pb.go b/pkg/proto/developer/v1/developer_vtproto.pb.go index 3a3c3e18ba..354102c5e9 100644 --- a/pkg/proto/developer/v1/developer_vtproto.pb.go +++ b/pkg/proto/developer/v1/developer_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.0 +// protoc-gen-go-vtproto version: v0.5.1-0.20231212170721-e7d721933795 // source: developer/v1/developer.proto package developerv1 @@ -9,11 +9,12 @@ import ( v12 "github.com/authzed/authzed-go/proto/authzed/api/v1" v1 "github.com/authzed/spicedb/pkg/proto/core/v1" v11 "github.com/authzed/spicedb/pkg/proto/dispatch/v1" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + structpb1 "github.com/planetscale/vtprotobuf/types/known/structpb" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" structpb "google.golang.org/protobuf/types/known/structpb" io "io" - bits "math/bits" ) const ( @@ -27,9 +28,8 @@ func (m *DeveloperRequest) CloneVT() *DeveloperRequest { if m == nil { return (*DeveloperRequest)(nil) } - r := &DeveloperRequest{ - Context: m.Context.CloneVT(), - } + r := new(DeveloperRequest) + r.Context = m.Context.CloneVT() if rhs := m.Operations; rhs != nil { tmpContainer := make([]*Operation, len(rhs)) for k, v := range rhs { @@ -52,11 +52,10 @@ func (m *DeveloperResponse) CloneVT() *DeveloperResponse { if m == nil { return (*DeveloperResponse)(nil) } - r := &DeveloperResponse{ - InternalError: m.InternalError, - DeveloperErrors: m.DeveloperErrors.CloneVT(), - OperationsResults: m.OperationsResults.CloneVT(), - } + r := new(DeveloperResponse) + r.InternalError = m.InternalError + r.DeveloperErrors = m.DeveloperErrors.CloneVT() + r.OperationsResults = m.OperationsResults.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -72,9 +71,8 @@ func (m *RequestContext) CloneVT() *RequestContext { if m == nil { return (*RequestContext)(nil) } - r := &RequestContext{ - Schema: m.Schema, - } + r := new(RequestContext) + r.Schema = m.Schema if rhs := m.Relationships; rhs != nil { tmpContainer := make([]*v1.RelationTuple, len(rhs)) for k, v := range rhs { @@ -101,12 +99,11 @@ func (m *Operation) CloneVT() *Operation { if m == nil { return (*Operation)(nil) } - r := &Operation{ - CheckParameters: m.CheckParameters.CloneVT(), - AssertionsParameters: m.AssertionsParameters.CloneVT(), - ValidationParameters: m.ValidationParameters.CloneVT(), - FormatSchemaParameters: m.FormatSchemaParameters.CloneVT(), - } + r := new(Operation) + r.CheckParameters = m.CheckParameters.CloneVT() + r.AssertionsParameters = m.AssertionsParameters.CloneVT() + r.ValidationParameters = m.ValidationParameters.CloneVT() + r.FormatSchemaParameters = m.FormatSchemaParameters.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -122,7 +119,7 @@ func (m *OperationsResults) CloneVT() *OperationsResults { if m == nil { return (*OperationsResults)(nil) } - r := &OperationsResults{} + r := new(OperationsResults) if rhs := m.Results; rhs != nil { tmpContainer := make(map[uint64]*OperationResult, len(rhs)) for k, v := range rhs { @@ -145,12 +142,11 @@ func (m *OperationResult) CloneVT() *OperationResult { if m == nil { return (*OperationResult)(nil) } - r := &OperationResult{ - CheckResult: m.CheckResult.CloneVT(), - AssertionsResult: m.AssertionsResult.CloneVT(), - ValidationResult: m.ValidationResult.CloneVT(), - FormatSchemaResult: m.FormatSchemaResult.CloneVT(), - } + r := new(OperationResult) + r.CheckResult = m.CheckResult.CloneVT() + r.AssertionsResult = m.AssertionsResult.CloneVT() + r.ValidationResult = m.ValidationResult.CloneVT() + r.FormatSchemaResult = m.FormatSchemaResult.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -166,14 +162,13 @@ func (m *DeveloperError) CloneVT() *DeveloperError { if m == nil { return (*DeveloperError)(nil) } - r := &DeveloperError{ - Message: m.Message, - Line: m.Line, - Column: m.Column, - Source: m.Source, - Kind: m.Kind, - Context: m.Context, - } + r := new(DeveloperError) + r.Message = m.Message + r.Line = m.Line + r.Column = m.Column + r.Source = m.Source + r.Kind = m.Kind + r.Context = m.Context if rhs := m.Path; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) @@ -208,7 +203,7 @@ func (m *DeveloperErrors) CloneVT() *DeveloperErrors { if m == nil { return (*DeveloperErrors)(nil) } - r := &DeveloperErrors{} + r := new(DeveloperErrors) if rhs := m.InputErrors; rhs != nil { tmpContainer := make([]*DeveloperError, len(rhs)) for k, v := range rhs { @@ -231,7 +226,8 @@ func (m *CheckOperationParameters) CloneVT() *CheckOperationParameters { if m == nil { return (*CheckOperationParameters)(nil) } - r := &CheckOperationParameters{} + r := new(CheckOperationParameters) + r.CaveatContext = (*structpb.Struct)((*structpb1.Struct)(m.CaveatContext).CloneVT()) if rhs := m.Resource; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.ObjectAndRelation }); ok { r.Resource = vtpb.CloneVT() @@ -246,13 +242,6 @@ func (m *CheckOperationParameters) CloneVT() *CheckOperationParameters { r.Subject = proto.Clone(rhs).(*v1.ObjectAndRelation) } } - if rhs := m.CaveatContext; rhs != nil { - if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *structpb.Struct }); ok { - r.CaveatContext = vtpb.CloneVT() - } else { - r.CaveatContext = proto.Clone(rhs).(*structpb.Struct) - } - } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -268,11 +257,10 @@ func (m *CheckOperationsResult) CloneVT() *CheckOperationsResult { if m == nil { return (*CheckOperationsResult)(nil) } - r := &CheckOperationsResult{ - Membership: m.Membership, - CheckError: m.CheckError.CloneVT(), - PartialCaveatInfo: m.PartialCaveatInfo.CloneVT(), - } + r := new(CheckOperationsResult) + r.Membership = m.Membership + r.CheckError = m.CheckError.CloneVT() + r.PartialCaveatInfo = m.PartialCaveatInfo.CloneVT() if rhs := m.DebugInformation; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v11.DebugInformation }); ok { r.DebugInformation = vtpb.CloneVT() @@ -302,7 +290,7 @@ func (m *PartialCaveatInfo) CloneVT() *PartialCaveatInfo { if m == nil { return (*PartialCaveatInfo)(nil) } - r := &PartialCaveatInfo{} + r := new(PartialCaveatInfo) if rhs := m.MissingRequiredContext; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) @@ -323,9 +311,8 @@ func (m *RunAssertionsParameters) CloneVT() *RunAssertionsParameters { if m == nil { return (*RunAssertionsParameters)(nil) } - r := &RunAssertionsParameters{ - AssertionsYaml: m.AssertionsYaml, - } + r := new(RunAssertionsParameters) + r.AssertionsYaml = m.AssertionsYaml if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -341,9 +328,8 @@ func (m *RunAssertionsResult) CloneVT() *RunAssertionsResult { if m == nil { return (*RunAssertionsResult)(nil) } - r := &RunAssertionsResult{ - InputError: m.InputError.CloneVT(), - } + r := new(RunAssertionsResult) + r.InputError = m.InputError.CloneVT() if rhs := m.ValidationErrors; rhs != nil { tmpContainer := make([]*DeveloperError, len(rhs)) for k, v := range rhs { @@ -366,9 +352,8 @@ func (m *RunValidationParameters) CloneVT() *RunValidationParameters { if m == nil { return (*RunValidationParameters)(nil) } - r := &RunValidationParameters{ - ValidationYaml: m.ValidationYaml, - } + r := new(RunValidationParameters) + r.ValidationYaml = m.ValidationYaml if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -384,10 +369,9 @@ func (m *RunValidationResult) CloneVT() *RunValidationResult { if m == nil { return (*RunValidationResult)(nil) } - r := &RunValidationResult{ - InputError: m.InputError.CloneVT(), - UpdatedValidationYaml: m.UpdatedValidationYaml, - } + r := new(RunValidationResult) + r.InputError = m.InputError.CloneVT() + r.UpdatedValidationYaml = m.UpdatedValidationYaml if rhs := m.ValidationErrors; rhs != nil { tmpContainer := make([]*DeveloperError, len(rhs)) for k, v := range rhs { @@ -410,7 +394,7 @@ func (m *FormatSchemaParameters) CloneVT() *FormatSchemaParameters { if m == nil { return (*FormatSchemaParameters)(nil) } - r := &FormatSchemaParameters{} + r := new(FormatSchemaParameters) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -426,9 +410,8 @@ func (m *FormatSchemaResult) CloneVT() *FormatSchemaResult { if m == nil { return (*FormatSchemaResult)(nil) } - r := &FormatSchemaResult{ - FormattedSchema: m.FormattedSchema, - } + r := new(FormatSchemaResult) + r.FormattedSchema = m.FormattedSchema if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -751,11 +734,7 @@ func (this *CheckOperationParameters) EqualVT(that *CheckOperationParameters) bo } else if !proto.Equal(this.Subject, that.Subject) { return false } - if equal, ok := interface{}(this.CaveatContext).(interface{ EqualVT(*structpb.Struct) bool }); ok { - if !equal.EqualVT(that.CaveatContext) { - return false - } - } else if !proto.Equal(this.CaveatContext, that.CaveatContext) { + if !(*structpb1.Struct)(this.CaveatContext).EqualVT((*structpb1.Struct)(that.CaveatContext)) { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -1021,7 +1000,7 @@ func (m *DeveloperRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -1032,7 +1011,7 @@ func (m *DeveloperRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1075,7 +1054,7 @@ func (m *DeveloperResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -1085,14 +1064,14 @@ func (m *DeveloperResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if len(m.InternalError) > 0 { i -= len(m.InternalError) copy(dAtA[i:], m.InternalError) - i = encodeVarint(dAtA, i, uint64(len(m.InternalError))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.InternalError))) i-- dAtA[i] = 0xa } @@ -1139,7 +1118,7 @@ func (m *RequestContext) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.Relationships[iNdEx]) if err != nil { @@ -1147,7 +1126,7 @@ func (m *RequestContext) MarshalToSizedBufferVT(dAtA []byte) (int, error) { } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -1156,7 +1135,7 @@ func (m *RequestContext) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Schema) > 0 { i -= len(m.Schema) copy(dAtA[i:], m.Schema) - i = encodeVarint(dAtA, i, uint64(len(m.Schema))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Schema))) i-- dAtA[i] = 0xa } @@ -1199,7 +1178,7 @@ func (m *Operation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -1209,7 +1188,7 @@ func (m *Operation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -1219,7 +1198,7 @@ func (m *Operation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -1229,7 +1208,7 @@ func (m *Operation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1275,13 +1254,13 @@ func (m *OperationsResults) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 - i = encodeVarint(dAtA, i, uint64(k)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) i-- dAtA[i] = 0x8 - i = encodeVarint(dAtA, i, uint64(baseI-i)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } @@ -1325,7 +1304,7 @@ func (m *OperationResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -1335,7 +1314,7 @@ func (m *OperationResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -1345,7 +1324,7 @@ func (m *OperationResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -1355,7 +1334,7 @@ func (m *OperationResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1401,7 +1380,7 @@ func (m *DeveloperError) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.CheckResolvedDebugInformation) if err != nil { @@ -1409,7 +1388,7 @@ func (m *DeveloperError) MarshalToSizedBufferVT(dAtA []byte) (int, error) { } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x4a @@ -1423,7 +1402,7 @@ func (m *DeveloperError) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.CheckDebugInformation) if err != nil { @@ -1431,7 +1410,7 @@ func (m *DeveloperError) MarshalToSizedBufferVT(dAtA []byte) (int, error) { } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x42 @@ -1439,7 +1418,7 @@ func (m *DeveloperError) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Context) > 0 { i -= len(m.Context) copy(dAtA[i:], m.Context) - i = encodeVarint(dAtA, i, uint64(len(m.Context))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Context))) i-- dAtA[i] = 0x3a } @@ -1447,35 +1426,35 @@ func (m *DeveloperError) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.Path) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Path[iNdEx]) copy(dAtA[i:], m.Path[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Path[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Path[iNdEx]))) i-- dAtA[i] = 0x32 } } if m.Kind != 0 { - i = encodeVarint(dAtA, i, uint64(m.Kind)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Kind)) i-- dAtA[i] = 0x28 } if m.Source != 0 { - i = encodeVarint(dAtA, i, uint64(m.Source)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Source)) i-- dAtA[i] = 0x20 } if m.Column != 0 { - i = encodeVarint(dAtA, i, uint64(m.Column)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Column)) i-- dAtA[i] = 0x18 } if m.Line != 0 { - i = encodeVarint(dAtA, i, uint64(m.Line)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Line)) i-- dAtA[i] = 0x10 } if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) - i = encodeVarint(dAtA, i, uint64(len(m.Message))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0xa } @@ -1519,7 +1498,7 @@ func (m *DeveloperErrors) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1558,24 +1537,12 @@ func (m *CheckOperationParameters) MarshalToSizedBufferVT(dAtA []byte) (int, err copy(dAtA[i:], m.unknownFields) } if m.CaveatContext != nil { - if vtmsg, ok := interface{}(m.CaveatContext).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.CaveatContext) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + size, err := (*structpb1.Struct)(m.CaveatContext).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -1588,7 +1555,7 @@ func (m *CheckOperationParameters) MarshalToSizedBufferVT(dAtA []byte) (int, err return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.Subject) if err != nil { @@ -1596,7 +1563,7 @@ func (m *CheckOperationParameters) MarshalToSizedBufferVT(dAtA []byte) (int, err } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -1610,7 +1577,7 @@ func (m *CheckOperationParameters) MarshalToSizedBufferVT(dAtA []byte) (int, err return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.Resource) if err != nil { @@ -1618,7 +1585,7 @@ func (m *CheckOperationParameters) MarshalToSizedBufferVT(dAtA []byte) (int, err } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0xa @@ -1665,7 +1632,7 @@ func (m *CheckOperationsResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.ResolvedDebugInformation) if err != nil { @@ -1673,7 +1640,7 @@ func (m *CheckOperationsResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x2a @@ -1684,7 +1651,7 @@ func (m *CheckOperationsResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -1697,7 +1664,7 @@ func (m *CheckOperationsResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.DebugInformation) if err != nil { @@ -1705,7 +1672,7 @@ func (m *CheckOperationsResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x1a @@ -1716,12 +1683,12 @@ func (m *CheckOperationsResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if m.Membership != 0 { - i = encodeVarint(dAtA, i, uint64(m.Membership)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Membership)) i-- dAtA[i] = 0x8 } @@ -1762,7 +1729,7 @@ func (m *PartialCaveatInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.MissingRequiredContext) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.MissingRequiredContext[iNdEx]) copy(dAtA[i:], m.MissingRequiredContext[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.MissingRequiredContext[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MissingRequiredContext[iNdEx]))) i-- dAtA[i] = 0xa } @@ -1803,7 +1770,7 @@ func (m *RunAssertionsParameters) MarshalToSizedBufferVT(dAtA []byte) (int, erro if len(m.AssertionsYaml) > 0 { i -= len(m.AssertionsYaml) copy(dAtA[i:], m.AssertionsYaml) - i = encodeVarint(dAtA, i, uint64(len(m.AssertionsYaml))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AssertionsYaml))) i-- dAtA[i] = 0xa } @@ -1847,7 +1814,7 @@ func (m *RunAssertionsResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -1858,7 +1825,7 @@ func (m *RunAssertionsResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1898,7 +1865,7 @@ func (m *RunValidationParameters) MarshalToSizedBufferVT(dAtA []byte) (int, erro if len(m.ValidationYaml) > 0 { i -= len(m.ValidationYaml) copy(dAtA[i:], m.ValidationYaml) - i = encodeVarint(dAtA, i, uint64(len(m.ValidationYaml))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ValidationYaml))) i-- dAtA[i] = 0xa } @@ -1942,7 +1909,7 @@ func (m *RunValidationResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -1950,7 +1917,7 @@ func (m *RunValidationResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.UpdatedValidationYaml) > 0 { i -= len(m.UpdatedValidationYaml) copy(dAtA[i:], m.UpdatedValidationYaml) - i = encodeVarint(dAtA, i, uint64(len(m.UpdatedValidationYaml))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.UpdatedValidationYaml))) i-- dAtA[i] = 0x12 } @@ -1960,7 +1927,7 @@ func (m *RunValidationResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -2033,24 +2000,13 @@ func (m *FormatSchemaResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.FormattedSchema) > 0 { i -= len(m.FormattedSchema) copy(dAtA[i:], m.FormattedSchema) - i = encodeVarint(dAtA, i, uint64(len(m.FormattedSchema))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FormattedSchema))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func encodeVarint(dAtA []byte, offset int, v uint64) int { - offset -= sov(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} func (m *DeveloperRequest) SizeVT() (n int) { if m == nil { return 0 @@ -2059,12 +2015,12 @@ func (m *DeveloperRequest) SizeVT() (n int) { _ = l if m.Context != nil { l = m.Context.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Operations) > 0 { for _, e := range m.Operations { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -2079,15 +2035,15 @@ func (m *DeveloperResponse) SizeVT() (n int) { _ = l l = len(m.InternalError) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.DeveloperErrors != nil { l = m.DeveloperErrors.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OperationsResults != nil { l = m.OperationsResults.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -2101,7 +2057,7 @@ func (m *RequestContext) SizeVT() (n int) { _ = l l = len(m.Schema) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Relationships) > 0 { for _, e := range m.Relationships { @@ -2112,7 +2068,7 @@ func (m *RequestContext) SizeVT() (n int) { } else { l = proto.Size(e) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -2127,19 +2083,19 @@ func (m *Operation) SizeVT() (n int) { _ = l if m.CheckParameters != nil { l = m.CheckParameters.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.AssertionsParameters != nil { l = m.AssertionsParameters.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ValidationParameters != nil { l = m.ValidationParameters.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.FormatSchemaParameters != nil { l = m.FormatSchemaParameters.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -2159,9 +2115,9 @@ func (m *OperationsResults) SizeVT() (n int) { if v != nil { l = v.SizeVT() } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + sov(uint64(k)) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + l += 1 + protohelpers.SizeOfVarint(uint64(l)) + mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + l + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } n += len(m.unknownFields) @@ -2176,19 +2132,19 @@ func (m *OperationResult) SizeVT() (n int) { _ = l if m.CheckResult != nil { l = m.CheckResult.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.AssertionsResult != nil { l = m.AssertionsResult.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ValidationResult != nil { l = m.ValidationResult.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.FormatSchemaResult != nil { l = m.FormatSchemaResult.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -2202,29 +2158,29 @@ func (m *DeveloperError) SizeVT() (n int) { _ = l l = len(m.Message) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Line != 0 { - n += 1 + sov(uint64(m.Line)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Line)) } if m.Column != 0 { - n += 1 + sov(uint64(m.Column)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Column)) } if m.Source != 0 { - n += 1 + sov(uint64(m.Source)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Source)) } if m.Kind != 0 { - n += 1 + sov(uint64(m.Kind)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Kind)) } if len(m.Path) > 0 { for _, s := range m.Path { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } l = len(m.Context) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.CheckDebugInformation != nil { if size, ok := interface{}(m.CheckDebugInformation).(interface { @@ -2234,7 +2190,7 @@ func (m *DeveloperError) SizeVT() (n int) { } else { l = proto.Size(m.CheckDebugInformation) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.CheckResolvedDebugInformation != nil { if size, ok := interface{}(m.CheckResolvedDebugInformation).(interface { @@ -2244,7 +2200,7 @@ func (m *DeveloperError) SizeVT() (n int) { } else { l = proto.Size(m.CheckResolvedDebugInformation) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -2259,7 +2215,7 @@ func (m *DeveloperErrors) SizeVT() (n int) { if len(m.InputErrors) > 0 { for _, e := range m.InputErrors { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -2280,7 +2236,7 @@ func (m *CheckOperationParameters) SizeVT() (n int) { } else { l = proto.Size(m.Resource) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Subject != nil { if size, ok := interface{}(m.Subject).(interface { @@ -2290,17 +2246,11 @@ func (m *CheckOperationParameters) SizeVT() (n int) { } else { l = proto.Size(m.Subject) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.CaveatContext != nil { - if size, ok := interface{}(m.CaveatContext).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.CaveatContext) - } - n += 1 + l + sov(uint64(l)) + l = (*structpb1.Struct)(m.CaveatContext).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -2313,11 +2263,11 @@ func (m *CheckOperationsResult) SizeVT() (n int) { var l int _ = l if m.Membership != 0 { - n += 1 + sov(uint64(m.Membership)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Membership)) } if m.CheckError != nil { l = m.CheckError.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.DebugInformation != nil { if size, ok := interface{}(m.DebugInformation).(interface { @@ -2327,11 +2277,11 @@ func (m *CheckOperationsResult) SizeVT() (n int) { } else { l = proto.Size(m.DebugInformation) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.PartialCaveatInfo != nil { l = m.PartialCaveatInfo.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ResolvedDebugInformation != nil { if size, ok := interface{}(m.ResolvedDebugInformation).(interface { @@ -2341,7 +2291,7 @@ func (m *CheckOperationsResult) SizeVT() (n int) { } else { l = proto.Size(m.ResolvedDebugInformation) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -2356,7 +2306,7 @@ func (m *PartialCaveatInfo) SizeVT() (n int) { if len(m.MissingRequiredContext) > 0 { for _, s := range m.MissingRequiredContext { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -2371,7 +2321,7 @@ func (m *RunAssertionsParameters) SizeVT() (n int) { _ = l l = len(m.AssertionsYaml) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -2385,12 +2335,12 @@ func (m *RunAssertionsResult) SizeVT() (n int) { _ = l if m.InputError != nil { l = m.InputError.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.ValidationErrors) > 0 { for _, e := range m.ValidationErrors { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -2405,7 +2355,7 @@ func (m *RunValidationParameters) SizeVT() (n int) { _ = l l = len(m.ValidationYaml) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -2419,16 +2369,16 @@ func (m *RunValidationResult) SizeVT() (n int) { _ = l if m.InputError != nil { l = m.InputError.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.UpdatedValidationYaml) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.ValidationErrors) > 0 { for _, e := range m.ValidationErrors { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -2453,18 +2403,12 @@ func (m *FormatSchemaResult) SizeVT() (n int) { _ = l l = len(m.FormattedSchema) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n } -func sov(x uint64) (n int) { - return (bits.Len64(x|1) + 6) / 7 -} -func soz(x uint64) (n int) { - return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} func (m *DeveloperRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2473,7 +2417,7 @@ func (m *DeveloperRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2501,7 +2445,7 @@ func (m *DeveloperRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2514,11 +2458,11 @@ func (m *DeveloperRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2537,7 +2481,7 @@ func (m *DeveloperRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2550,11 +2494,11 @@ func (m *DeveloperRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2566,12 +2510,12 @@ func (m *DeveloperRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2594,7 +2538,7 @@ func (m *DeveloperResponse) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2622,7 +2566,7 @@ func (m *DeveloperResponse) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2636,11 +2580,11 @@ func (m *DeveloperResponse) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2654,7 +2598,7 @@ func (m *DeveloperResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2667,11 +2611,11 @@ func (m *DeveloperResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2690,7 +2634,7 @@ func (m *DeveloperResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2703,11 +2647,11 @@ func (m *DeveloperResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2721,12 +2665,12 @@ func (m *DeveloperResponse) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2749,7 +2693,7 @@ func (m *RequestContext) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2777,7 +2721,7 @@ func (m *RequestContext) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2791,11 +2735,11 @@ func (m *RequestContext) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2809,7 +2753,7 @@ func (m *RequestContext) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2822,11 +2766,11 @@ func (m *RequestContext) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2846,12 +2790,12 @@ func (m *RequestContext) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2874,7 +2818,7 @@ func (m *Operation) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2902,7 +2846,7 @@ func (m *Operation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2915,11 +2859,11 @@ func (m *Operation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2938,7 +2882,7 @@ func (m *Operation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2951,11 +2895,11 @@ func (m *Operation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2974,7 +2918,7 @@ func (m *Operation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2987,11 +2931,11 @@ func (m *Operation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3010,7 +2954,7 @@ func (m *Operation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3023,11 +2967,11 @@ func (m *Operation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3041,12 +2985,12 @@ func (m *Operation) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3069,7 +3013,7 @@ func (m *OperationsResults) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3097,7 +3041,7 @@ func (m *OperationsResults) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3110,11 +3054,11 @@ func (m *OperationsResults) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3129,7 +3073,7 @@ func (m *OperationsResults) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3145,7 +3089,7 @@ func (m *OperationsResults) UnmarshalVT(dAtA []byte) error { if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3161,7 +3105,7 @@ func (m *OperationsResults) UnmarshalVT(dAtA []byte) error { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3174,11 +3118,11 @@ func (m *OperationsResults) UnmarshalVT(dAtA []byte) error { } } if mapmsglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF @@ -3190,12 +3134,12 @@ func (m *OperationsResults) UnmarshalVT(dAtA []byte) error { iNdEx = postmsgIndex } else { iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -3207,12 +3151,12 @@ func (m *OperationsResults) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3235,7 +3179,7 @@ func (m *OperationResult) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3263,7 +3207,7 @@ func (m *OperationResult) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3276,11 +3220,11 @@ func (m *OperationResult) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3299,7 +3243,7 @@ func (m *OperationResult) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3312,11 +3256,11 @@ func (m *OperationResult) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3335,7 +3279,7 @@ func (m *OperationResult) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3348,11 +3292,11 @@ func (m *OperationResult) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3371,7 +3315,7 @@ func (m *OperationResult) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3384,11 +3328,11 @@ func (m *OperationResult) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3402,12 +3346,12 @@ func (m *OperationResult) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3430,7 +3374,7 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3458,7 +3402,7 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3472,11 +3416,11 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3490,7 +3434,7 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { m.Line = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3509,7 +3453,7 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { m.Column = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3528,7 +3472,7 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { m.Source = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3547,7 +3491,7 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { m.Kind = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3566,7 +3510,7 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3580,11 +3524,11 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3598,7 +3542,7 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3612,11 +3556,11 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3630,7 +3574,7 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3643,11 +3587,11 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3674,7 +3618,7 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3687,11 +3631,11 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3713,12 +3657,12 @@ func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3741,7 +3685,7 @@ func (m *DeveloperErrors) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3769,7 +3713,7 @@ func (m *DeveloperErrors) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3782,11 +3726,11 @@ func (m *DeveloperErrors) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3798,12 +3742,12 @@ func (m *DeveloperErrors) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3826,7 +3770,7 @@ func (m *CheckOperationParameters) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3854,7 +3798,7 @@ func (m *CheckOperationParameters) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3867,11 +3811,11 @@ func (m *CheckOperationParameters) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3898,7 +3842,7 @@ func (m *CheckOperationParameters) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3911,11 +3855,11 @@ func (m *CheckOperationParameters) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3942,7 +3886,7 @@ func (m *CheckOperationParameters) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3955,11 +3899,11 @@ func (m *CheckOperationParameters) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3967,26 +3911,18 @@ func (m *CheckOperationParameters) UnmarshalVT(dAtA []byte) error { if m.CaveatContext == nil { m.CaveatContext = &structpb.Struct{} } - if unmarshal, ok := interface{}(m.CaveatContext).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.CaveatContext); err != nil { - return err - } + if err := (*structpb1.Struct)(m.CaveatContext).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4009,7 +3945,7 @@ func (m *CheckOperationsResult) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4037,7 +3973,7 @@ func (m *CheckOperationsResult) UnmarshalVT(dAtA []byte) error { m.Membership = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4056,7 +3992,7 @@ func (m *CheckOperationsResult) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4069,11 +4005,11 @@ func (m *CheckOperationsResult) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4092,7 +4028,7 @@ func (m *CheckOperationsResult) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4105,11 +4041,11 @@ func (m *CheckOperationsResult) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4136,7 +4072,7 @@ func (m *CheckOperationsResult) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4149,11 +4085,11 @@ func (m *CheckOperationsResult) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4172,7 +4108,7 @@ func (m *CheckOperationsResult) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4185,11 +4121,11 @@ func (m *CheckOperationsResult) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4211,12 +4147,12 @@ func (m *CheckOperationsResult) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4239,7 +4175,7 @@ func (m *PartialCaveatInfo) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4267,7 +4203,7 @@ func (m *PartialCaveatInfo) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4281,11 +4217,11 @@ func (m *PartialCaveatInfo) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4294,12 +4230,12 @@ func (m *PartialCaveatInfo) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4322,7 +4258,7 @@ func (m *RunAssertionsParameters) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4350,7 +4286,7 @@ func (m *RunAssertionsParameters) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4364,11 +4300,11 @@ func (m *RunAssertionsParameters) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4377,12 +4313,12 @@ func (m *RunAssertionsParameters) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4405,7 +4341,7 @@ func (m *RunAssertionsResult) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4433,7 +4369,7 @@ func (m *RunAssertionsResult) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4446,11 +4382,11 @@ func (m *RunAssertionsResult) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4469,7 +4405,7 @@ func (m *RunAssertionsResult) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4482,11 +4418,11 @@ func (m *RunAssertionsResult) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4498,12 +4434,12 @@ func (m *RunAssertionsResult) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4526,7 +4462,7 @@ func (m *RunValidationParameters) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4554,7 +4490,7 @@ func (m *RunValidationParameters) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4568,11 +4504,11 @@ func (m *RunValidationParameters) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4581,12 +4517,12 @@ func (m *RunValidationParameters) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4609,7 +4545,7 @@ func (m *RunValidationResult) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4637,7 +4573,7 @@ func (m *RunValidationResult) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4650,11 +4586,11 @@ func (m *RunValidationResult) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4673,7 +4609,7 @@ func (m *RunValidationResult) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4687,11 +4623,11 @@ func (m *RunValidationResult) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4705,7 +4641,7 @@ func (m *RunValidationResult) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4718,11 +4654,11 @@ func (m *RunValidationResult) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4734,12 +4670,12 @@ func (m *RunValidationResult) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4762,7 +4698,7 @@ func (m *FormatSchemaParameters) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4785,12 +4721,12 @@ func (m *FormatSchemaParameters) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4813,7 +4749,7 @@ func (m *FormatSchemaResult) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4841,7 +4777,7 @@ func (m *FormatSchemaResult) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4855,11 +4791,11 @@ func (m *FormatSchemaResult) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4868,12 +4804,12 @@ func (m *FormatSchemaResult) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4888,88 +4824,3 @@ func (m *FormatSchemaResult) UnmarshalVT(dAtA []byte) error { } return nil } - -func skip(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLength - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroup - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLength - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflow = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") -) diff --git a/pkg/proto/dispatch/v1/dispatch_vtproto.pb.go b/pkg/proto/dispatch/v1/dispatch_vtproto.pb.go index 832c3d4580..78aac4308f 100644 --- a/pkg/proto/dispatch/v1/dispatch_vtproto.pb.go +++ b/pkg/proto/dispatch/v1/dispatch_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.0 +// protoc-gen-go-vtproto version: v0.5.1-0.20231212170721-e7d721933795 // source: dispatch/v1/dispatch.proto package dispatchv1 @@ -7,12 +7,14 @@ package dispatchv1 import ( fmt "fmt" v1 "github.com/authzed/spicedb/pkg/proto/core/v1" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + durationpb1 "github.com/planetscale/vtprotobuf/types/known/durationpb" + structpb1 "github.com/planetscale/vtprotobuf/types/known/structpb" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" structpb "google.golang.org/protobuf/types/known/structpb" io "io" - bits "math/bits" ) const ( @@ -26,11 +28,10 @@ func (m *DispatchCheckRequest) CloneVT() *DispatchCheckRequest { if m == nil { return (*DispatchCheckRequest)(nil) } - r := &DispatchCheckRequest{ - Metadata: m.Metadata.CloneVT(), - ResultsSetting: m.ResultsSetting, - Debug: m.Debug, - } + r := new(DispatchCheckRequest) + r.Metadata = m.Metadata.CloneVT() + r.ResultsSetting = m.ResultsSetting + r.Debug = m.Debug if rhs := m.ResourceRelation; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.RelationReference }); ok { r.ResourceRelation = vtpb.CloneVT() @@ -65,9 +66,8 @@ func (m *DispatchCheckResponse) CloneVT() *DispatchCheckResponse { if m == nil { return (*DispatchCheckResponse)(nil) } - r := &DispatchCheckResponse{ - Metadata: m.Metadata.CloneVT(), - } + r := new(DispatchCheckResponse) + r.Metadata = m.Metadata.CloneVT() if rhs := m.ResultsByResourceId; rhs != nil { tmpContainer := make(map[string]*ResourceCheckResult, len(rhs)) for k, v := range rhs { @@ -90,9 +90,8 @@ func (m *ResourceCheckResult) CloneVT() *ResourceCheckResult { if m == nil { return (*ResourceCheckResult)(nil) } - r := &ResourceCheckResult{ - Membership: m.Membership, - } + r := new(ResourceCheckResult) + r.Membership = m.Membership if rhs := m.Expression; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.CaveatExpression }); ok { r.Expression = vtpb.CloneVT() @@ -120,10 +119,9 @@ func (m *DispatchExpandRequest) CloneVT() *DispatchExpandRequest { if m == nil { return (*DispatchExpandRequest)(nil) } - r := &DispatchExpandRequest{ - Metadata: m.Metadata.CloneVT(), - ExpansionMode: m.ExpansionMode, - } + r := new(DispatchExpandRequest) + r.Metadata = m.Metadata.CloneVT() + r.ExpansionMode = m.ExpansionMode if rhs := m.ResourceAndRelation; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.ObjectAndRelation }); ok { r.ResourceAndRelation = vtpb.CloneVT() @@ -146,9 +144,8 @@ func (m *DispatchExpandResponse) CloneVT() *DispatchExpandResponse { if m == nil { return (*DispatchExpandResponse)(nil) } - r := &DispatchExpandResponse{ - Metadata: m.Metadata.CloneVT(), - } + r := new(DispatchExpandResponse) + r.Metadata = m.Metadata.CloneVT() if rhs := m.TreeNode; rhs != nil { if vtpb, ok := interface{}(rhs).(interface { CloneVT() *v1.RelationTupleTreeNode @@ -173,9 +170,8 @@ func (m *Cursor) CloneVT() *Cursor { if m == nil { return (*Cursor)(nil) } - r := &Cursor{ - DispatchVersion: m.DispatchVersion, - } + r := new(Cursor) + r.DispatchVersion = m.DispatchVersion if rhs := m.Sections; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) @@ -196,11 +192,10 @@ func (m *DispatchReachableResourcesRequest) CloneVT() *DispatchReachableResource if m == nil { return (*DispatchReachableResourcesRequest)(nil) } - r := &DispatchReachableResourcesRequest{ - Metadata: m.Metadata.CloneVT(), - OptionalCursor: m.OptionalCursor.CloneVT(), - OptionalLimit: m.OptionalLimit, - } + r := new(DispatchReachableResourcesRequest) + r.Metadata = m.Metadata.CloneVT() + r.OptionalCursor = m.OptionalCursor.CloneVT() + r.OptionalLimit = m.OptionalLimit if rhs := m.ResourceRelation; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.RelationReference }); ok { r.ResourceRelation = vtpb.CloneVT() @@ -235,10 +230,9 @@ func (m *ReachableResource) CloneVT() *ReachableResource { if m == nil { return (*ReachableResource)(nil) } - r := &ReachableResource{ - ResourceId: m.ResourceId, - ResultStatus: m.ResultStatus, - } + r := new(ReachableResource) + r.ResourceId = m.ResourceId + r.ResultStatus = m.ResultStatus if rhs := m.ForSubjectIds; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) @@ -259,11 +253,10 @@ func (m *DispatchReachableResourcesResponse) CloneVT() *DispatchReachableResourc if m == nil { return (*DispatchReachableResourcesResponse)(nil) } - r := &DispatchReachableResourcesResponse{ - Resource: m.Resource.CloneVT(), - Metadata: m.Metadata.CloneVT(), - AfterResponseCursor: m.AfterResponseCursor.CloneVT(), - } + r := new(DispatchReachableResourcesResponse) + r.Resource = m.Resource.CloneVT() + r.Metadata = m.Metadata.CloneVT() + r.AfterResponseCursor = m.AfterResponseCursor.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -279,11 +272,11 @@ func (m *DispatchLookupResourcesRequest) CloneVT() *DispatchLookupResourcesReque if m == nil { return (*DispatchLookupResourcesRequest)(nil) } - r := &DispatchLookupResourcesRequest{ - Metadata: m.Metadata.CloneVT(), - OptionalLimit: m.OptionalLimit, - OptionalCursor: m.OptionalCursor.CloneVT(), - } + r := new(DispatchLookupResourcesRequest) + r.Metadata = m.Metadata.CloneVT() + r.Context = (*structpb.Struct)((*structpb1.Struct)(m.Context).CloneVT()) + r.OptionalLimit = m.OptionalLimit + r.OptionalCursor = m.OptionalCursor.CloneVT() if rhs := m.ObjectRelation; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.RelationReference }); ok { r.ObjectRelation = vtpb.CloneVT() @@ -298,13 +291,6 @@ func (m *DispatchLookupResourcesRequest) CloneVT() *DispatchLookupResourcesReque r.Subject = proto.Clone(rhs).(*v1.ObjectAndRelation) } } - if rhs := m.Context; rhs != nil { - if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *structpb.Struct }); ok { - r.Context = vtpb.CloneVT() - } else { - r.Context = proto.Clone(rhs).(*structpb.Struct) - } - } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -320,10 +306,9 @@ func (m *ResolvedResource) CloneVT() *ResolvedResource { if m == nil { return (*ResolvedResource)(nil) } - r := &ResolvedResource{ - ResourceId: m.ResourceId, - Permissionship: m.Permissionship, - } + r := new(ResolvedResource) + r.ResourceId = m.ResourceId + r.Permissionship = m.Permissionship if rhs := m.MissingRequiredContext; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) @@ -344,11 +329,10 @@ func (m *DispatchLookupResourcesResponse) CloneVT() *DispatchLookupResourcesResp if m == nil { return (*DispatchLookupResourcesResponse)(nil) } - r := &DispatchLookupResourcesResponse{ - Metadata: m.Metadata.CloneVT(), - ResolvedResource: m.ResolvedResource.CloneVT(), - AfterResponseCursor: m.AfterResponseCursor.CloneVT(), - } + r := new(DispatchLookupResourcesResponse) + r.Metadata = m.Metadata.CloneVT() + r.ResolvedResource = m.ResolvedResource.CloneVT() + r.AfterResponseCursor = m.AfterResponseCursor.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -364,9 +348,8 @@ func (m *DispatchLookupSubjectsRequest) CloneVT() *DispatchLookupSubjectsRequest if m == nil { return (*DispatchLookupSubjectsRequest)(nil) } - r := &DispatchLookupSubjectsRequest{ - Metadata: m.Metadata.CloneVT(), - } + r := new(DispatchLookupSubjectsRequest) + r.Metadata = m.Metadata.CloneVT() if rhs := m.ResourceRelation; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.RelationReference }); ok { r.ResourceRelation = vtpb.CloneVT() @@ -401,9 +384,8 @@ func (m *FoundSubject) CloneVT() *FoundSubject { if m == nil { return (*FoundSubject)(nil) } - r := &FoundSubject{ - SubjectId: m.SubjectId, - } + r := new(FoundSubject) + r.SubjectId = m.SubjectId if rhs := m.CaveatExpression; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.CaveatExpression }); ok { r.CaveatExpression = vtpb.CloneVT() @@ -433,7 +415,7 @@ func (m *FoundSubjects) CloneVT() *FoundSubjects { if m == nil { return (*FoundSubjects)(nil) } - r := &FoundSubjects{} + r := new(FoundSubjects) if rhs := m.FoundSubjects; rhs != nil { tmpContainer := make([]*FoundSubject, len(rhs)) for k, v := range rhs { @@ -456,9 +438,8 @@ func (m *DispatchLookupSubjectsResponse) CloneVT() *DispatchLookupSubjectsRespon if m == nil { return (*DispatchLookupSubjectsResponse)(nil) } - r := &DispatchLookupSubjectsResponse{ - Metadata: m.Metadata.CloneVT(), - } + r := new(DispatchLookupSubjectsResponse) + r.Metadata = m.Metadata.CloneVT() if rhs := m.FoundSubjectsByResourceId; rhs != nil { tmpContainer := make(map[string]*FoundSubjects, len(rhs)) for k, v := range rhs { @@ -481,11 +462,10 @@ func (m *ResolverMeta) CloneVT() *ResolverMeta { if m == nil { return (*ResolverMeta)(nil) } - r := &ResolverMeta{ - AtRevision: m.AtRevision, - DepthRemaining: m.DepthRemaining, - RequestId: m.RequestId, - } + r := new(ResolverMeta) + r.AtRevision = m.AtRevision + r.DepthRemaining = m.DepthRemaining + r.RequestId = m.RequestId if rhs := m.TraversalBloom; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) @@ -506,12 +486,11 @@ func (m *ResponseMeta) CloneVT() *ResponseMeta { if m == nil { return (*ResponseMeta)(nil) } - r := &ResponseMeta{ - DispatchCount: m.DispatchCount, - DepthRequired: m.DepthRequired, - CachedDispatchCount: m.CachedDispatchCount, - DebugInfo: m.DebugInfo.CloneVT(), - } + r := new(ResponseMeta) + r.DispatchCount = m.DispatchCount + r.DepthRequired = m.DepthRequired + r.CachedDispatchCount = m.CachedDispatchCount + r.DebugInfo = m.DebugInfo.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -527,9 +506,8 @@ func (m *DebugInformation) CloneVT() *DebugInformation { if m == nil { return (*DebugInformation)(nil) } - r := &DebugInformation{ - Check: m.Check.CloneVT(), - } + r := new(DebugInformation) + r.Check = m.Check.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -545,11 +523,11 @@ func (m *CheckDebugTrace) CloneVT() *CheckDebugTrace { if m == nil { return (*CheckDebugTrace)(nil) } - r := &CheckDebugTrace{ - Request: m.Request.CloneVT(), - ResourceRelationType: m.ResourceRelationType, - IsCachedResult: m.IsCachedResult, - } + r := new(CheckDebugTrace) + r.Request = m.Request.CloneVT() + r.ResourceRelationType = m.ResourceRelationType + r.IsCachedResult = m.IsCachedResult + r.Duration = (*durationpb.Duration)((*durationpb1.Duration)(m.Duration).CloneVT()) if rhs := m.Results; rhs != nil { tmpContainer := make(map[string]*ResourceCheckResult, len(rhs)) for k, v := range rhs { @@ -564,13 +542,6 @@ func (m *CheckDebugTrace) CloneVT() *CheckDebugTrace { } r.SubProblems = tmpContainer } - if rhs := m.Duration; rhs != nil { - if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *durationpb.Duration }); ok { - r.Duration = vtpb.CloneVT() - } else { - r.Duration = proto.Clone(rhs).(*durationpb.Duration) - } - } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -935,11 +906,7 @@ func (this *DispatchLookupResourcesRequest) EqualVT(that *DispatchLookupResource if this.OptionalLimit != that.OptionalLimit { return false } - if equal, ok := interface{}(this.Context).(interface{ EqualVT(*structpb.Struct) bool }); ok { - if !equal.EqualVT(that.Context) { - return false - } - } else if !proto.Equal(this.Context, that.Context) { + if !(*structpb1.Struct)(this.Context).EqualVT((*structpb1.Struct)(that.Context)) { return false } if !this.OptionalCursor.EqualVT(that.OptionalCursor) { @@ -1301,13 +1268,7 @@ func (this *CheckDebugTrace) EqualVT(that *CheckDebugTrace) bool { } } } - if equal, ok := interface{}(this.Duration).(interface { - EqualVT(*durationpb.Duration) bool - }); ok { - if !equal.EqualVT(that.Duration) { - return false - } - } else if !proto.Equal(this.Duration, that.Duration) { + if !(*durationpb1.Duration)(this.Duration).EqualVT((*durationpb1.Duration)(that.Duration)) { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -1351,12 +1312,12 @@ func (m *DispatchCheckRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) copy(dAtA[i:], m.unknownFields) } if m.Debug != 0 { - i = encodeVarint(dAtA, i, uint64(m.Debug)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Debug)) i-- dAtA[i] = 0x30 } if m.ResultsSetting != 0 { - i = encodeVarint(dAtA, i, uint64(m.ResultsSetting)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ResultsSetting)) i-- dAtA[i] = 0x28 } @@ -1369,7 +1330,7 @@ func (m *DispatchCheckRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.Subject) if err != nil { @@ -1377,7 +1338,7 @@ func (m *DispatchCheckRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x22 @@ -1386,7 +1347,7 @@ func (m *DispatchCheckRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) for iNdEx := len(m.ResourceIds) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.ResourceIds[iNdEx]) copy(dAtA[i:], m.ResourceIds[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.ResourceIds[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceIds[iNdEx]))) i-- dAtA[i] = 0x1a } @@ -1400,7 +1361,7 @@ func (m *DispatchCheckRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.ResourceRelation) if err != nil { @@ -1408,7 +1369,7 @@ func (m *DispatchCheckRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -1419,7 +1380,7 @@ func (m *DispatchCheckRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1465,15 +1426,15 @@ func (m *DispatchCheckResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x12 } @@ -1484,7 +1445,7 @@ func (m *DispatchCheckResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1525,7 +1486,7 @@ func (m *ResourceCheckResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.MissingExprFields) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.MissingExprFields[iNdEx]) copy(dAtA[i:], m.MissingExprFields[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.MissingExprFields[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MissingExprFields[iNdEx]))) i-- dAtA[i] = 0x1a } @@ -1539,7 +1500,7 @@ func (m *ResourceCheckResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.Expression) if err != nil { @@ -1547,13 +1508,13 @@ func (m *ResourceCheckResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 } if m.Membership != 0 { - i = encodeVarint(dAtA, i, uint64(m.Membership)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Membership)) i-- dAtA[i] = 0x8 } @@ -1591,7 +1552,7 @@ func (m *DispatchExpandRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) copy(dAtA[i:], m.unknownFields) } if m.ExpansionMode != 0 { - i = encodeVarint(dAtA, i, uint64(m.ExpansionMode)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ExpansionMode)) i-- dAtA[i] = 0x18 } @@ -1604,7 +1565,7 @@ func (m *DispatchExpandRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.ResourceAndRelation) if err != nil { @@ -1612,7 +1573,7 @@ func (m *DispatchExpandRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -1623,7 +1584,7 @@ func (m *DispatchExpandRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1669,7 +1630,7 @@ func (m *DispatchExpandResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.TreeNode) if err != nil { @@ -1677,7 +1638,7 @@ func (m *DispatchExpandResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -1688,7 +1649,7 @@ func (m *DispatchExpandResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1726,7 +1687,7 @@ func (m *Cursor) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.DispatchVersion != 0 { - i = encodeVarint(dAtA, i, uint64(m.DispatchVersion)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DispatchVersion)) i-- dAtA[i] = 0x18 } @@ -1734,7 +1695,7 @@ func (m *Cursor) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.Sections) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Sections[iNdEx]) copy(dAtA[i:], m.Sections[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Sections[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Sections[iNdEx]))) i-- dAtA[i] = 0x12 } @@ -1773,7 +1734,7 @@ func (m *DispatchReachableResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) copy(dAtA[i:], m.unknownFields) } if m.OptionalLimit != 0 { - i = encodeVarint(dAtA, i, uint64(m.OptionalLimit)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalLimit)) i-- dAtA[i] = 0x30 } @@ -1783,7 +1744,7 @@ func (m *DispatchReachableResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } @@ -1791,7 +1752,7 @@ func (m *DispatchReachableResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) for iNdEx := len(m.SubjectIds) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.SubjectIds[iNdEx]) copy(dAtA[i:], m.SubjectIds[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.SubjectIds[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SubjectIds[iNdEx]))) i-- dAtA[i] = 0x22 } @@ -1805,7 +1766,7 @@ func (m *DispatchReachableResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.SubjectRelation) if err != nil { @@ -1813,7 +1774,7 @@ func (m *DispatchReachableResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x1a @@ -1827,7 +1788,7 @@ func (m *DispatchReachableResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.ResourceRelation) if err != nil { @@ -1835,7 +1796,7 @@ func (m *DispatchReachableResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -1846,7 +1807,7 @@ func (m *DispatchReachableResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1887,20 +1848,20 @@ func (m *ReachableResource) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.ForSubjectIds) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.ForSubjectIds[iNdEx]) copy(dAtA[i:], m.ForSubjectIds[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.ForSubjectIds[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ForSubjectIds[iNdEx]))) i-- dAtA[i] = 0x1a } } if m.ResultStatus != 0 { - i = encodeVarint(dAtA, i, uint64(m.ResultStatus)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ResultStatus)) i-- dAtA[i] = 0x10 } if len(m.ResourceId) > 0 { i -= len(m.ResourceId) copy(dAtA[i:], m.ResourceId) - i = encodeVarint(dAtA, i, uint64(len(m.ResourceId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceId))) i-- dAtA[i] = 0xa } @@ -1943,7 +1904,7 @@ func (m *DispatchReachableResourcesResponse) MarshalToSizedBufferVT(dAtA []byte) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -1953,7 +1914,7 @@ func (m *DispatchReachableResourcesResponse) MarshalToSizedBufferVT(dAtA []byte) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -1963,7 +1924,7 @@ func (m *DispatchReachableResourcesResponse) MarshalToSizedBufferVT(dAtA []byte) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -2006,34 +1967,22 @@ func (m *DispatchLookupResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) (in return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } if m.Context != nil { - if vtmsg, ok := interface{}(m.Context).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.Context) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + size, err := (*structpb1.Struct)(m.Context).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } if m.OptionalLimit != 0 { - i = encodeVarint(dAtA, i, uint64(m.OptionalLimit)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalLimit)) i-- dAtA[i] = 0x20 } @@ -2046,7 +1995,7 @@ func (m *DispatchLookupResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) (in return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.Subject) if err != nil { @@ -2054,7 +2003,7 @@ func (m *DispatchLookupResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) (in } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x1a @@ -2068,7 +2017,7 @@ func (m *DispatchLookupResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) (in return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.ObjectRelation) if err != nil { @@ -2076,7 +2025,7 @@ func (m *DispatchLookupResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) (in } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -2087,7 +2036,7 @@ func (m *DispatchLookupResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) (in return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -2128,20 +2077,20 @@ func (m *ResolvedResource) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.MissingRequiredContext) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.MissingRequiredContext[iNdEx]) copy(dAtA[i:], m.MissingRequiredContext[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.MissingRequiredContext[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MissingRequiredContext[iNdEx]))) i-- dAtA[i] = 0x1a } } if m.Permissionship != 0 { - i = encodeVarint(dAtA, i, uint64(m.Permissionship)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Permissionship)) i-- dAtA[i] = 0x10 } if len(m.ResourceId) > 0 { i -= len(m.ResourceId) copy(dAtA[i:], m.ResourceId) - i = encodeVarint(dAtA, i, uint64(len(m.ResourceId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceId))) i-- dAtA[i] = 0xa } @@ -2184,7 +2133,7 @@ func (m *DispatchLookupResourcesResponse) MarshalToSizedBufferVT(dAtA []byte) (i return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -2194,7 +2143,7 @@ func (m *DispatchLookupResourcesResponse) MarshalToSizedBufferVT(dAtA []byte) (i return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -2204,7 +2153,7 @@ func (m *DispatchLookupResourcesResponse) MarshalToSizedBufferVT(dAtA []byte) (i return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -2250,7 +2199,7 @@ func (m *DispatchLookupSubjectsRequest) MarshalToSizedBufferVT(dAtA []byte) (int return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.SubjectRelation) if err != nil { @@ -2258,7 +2207,7 @@ func (m *DispatchLookupSubjectsRequest) MarshalToSizedBufferVT(dAtA []byte) (int } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x22 @@ -2267,7 +2216,7 @@ func (m *DispatchLookupSubjectsRequest) MarshalToSizedBufferVT(dAtA []byte) (int for iNdEx := len(m.ResourceIds) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.ResourceIds[iNdEx]) copy(dAtA[i:], m.ResourceIds[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.ResourceIds[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceIds[iNdEx]))) i-- dAtA[i] = 0x1a } @@ -2281,7 +2230,7 @@ func (m *DispatchLookupSubjectsRequest) MarshalToSizedBufferVT(dAtA []byte) (int return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.ResourceRelation) if err != nil { @@ -2289,7 +2238,7 @@ func (m *DispatchLookupSubjectsRequest) MarshalToSizedBufferVT(dAtA []byte) (int } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -2300,7 +2249,7 @@ func (m *DispatchLookupSubjectsRequest) MarshalToSizedBufferVT(dAtA []byte) (int return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -2344,7 +2293,7 @@ func (m *FoundSubject) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -2358,7 +2307,7 @@ func (m *FoundSubject) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.CaveatExpression) if err != nil { @@ -2366,7 +2315,7 @@ func (m *FoundSubject) MarshalToSizedBufferVT(dAtA []byte) (int, error) { } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -2374,7 +2323,7 @@ func (m *FoundSubject) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.SubjectId) > 0 { i -= len(m.SubjectId) copy(dAtA[i:], m.SubjectId) - i = encodeVarint(dAtA, i, uint64(len(m.SubjectId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SubjectId))) i-- dAtA[i] = 0xa } @@ -2418,7 +2367,7 @@ func (m *FoundSubjects) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -2462,7 +2411,7 @@ func (m *DispatchLookupSubjectsResponse) MarshalToSizedBufferVT(dAtA []byte) (in return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -2475,15 +2424,15 @@ func (m *DispatchLookupSubjectsResponse) MarshalToSizedBufferVT(dAtA []byte) (in return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } @@ -2524,26 +2473,26 @@ func (m *ResolverMeta) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.TraversalBloom) > 0 { i -= len(m.TraversalBloom) copy(dAtA[i:], m.TraversalBloom) - i = encodeVarint(dAtA, i, uint64(len(m.TraversalBloom))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TraversalBloom))) i-- dAtA[i] = 0x22 } if len(m.RequestId) > 0 { i -= len(m.RequestId) copy(dAtA[i:], m.RequestId) - i = encodeVarint(dAtA, i, uint64(len(m.RequestId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequestId))) i-- dAtA[i] = 0x1a } if m.DepthRemaining != 0 { - i = encodeVarint(dAtA, i, uint64(m.DepthRemaining)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DepthRemaining)) i-- dAtA[i] = 0x10 } if len(m.AtRevision) > 0 { i -= len(m.AtRevision) copy(dAtA[i:], m.AtRevision) - i = encodeVarint(dAtA, i, uint64(len(m.AtRevision))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AtRevision))) i-- dAtA[i] = 0xa } @@ -2586,22 +2535,22 @@ func (m *ResponseMeta) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } if m.CachedDispatchCount != 0 { - i = encodeVarint(dAtA, i, uint64(m.CachedDispatchCount)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.CachedDispatchCount)) i-- dAtA[i] = 0x18 } if m.DepthRequired != 0 { - i = encodeVarint(dAtA, i, uint64(m.DepthRequired)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DepthRequired)) i-- dAtA[i] = 0x10 } if m.DispatchCount != 0 { - i = encodeVarint(dAtA, i, uint64(m.DispatchCount)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DispatchCount)) i-- dAtA[i] = 0x8 } @@ -2644,7 +2593,7 @@ func (m *DebugInformation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -2682,24 +2631,12 @@ func (m *CheckDebugTrace) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Duration != nil { - if vtmsg, ok := interface{}(m.Duration).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.Duration) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + size, err := (*durationpb1.Duration)(m.Duration).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } @@ -2710,7 +2647,7 @@ func (m *CheckDebugTrace) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } @@ -2734,21 +2671,21 @@ func (m *CheckDebugTrace) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x1a } } if m.ResourceRelationType != 0 { - i = encodeVarint(dAtA, i, uint64(m.ResourceRelationType)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ResourceRelationType)) i-- dAtA[i] = 0x10 } @@ -2758,24 +2695,13 @@ func (m *CheckDebugTrace) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func encodeVarint(dAtA []byte, offset int, v uint64) int { - offset -= sov(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} func (m *DispatchCheckRequest) SizeVT() (n int) { if m == nil { return 0 @@ -2784,7 +2710,7 @@ func (m *DispatchCheckRequest) SizeVT() (n int) { _ = l if m.Metadata != nil { l = m.Metadata.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ResourceRelation != nil { if size, ok := interface{}(m.ResourceRelation).(interface { @@ -2794,12 +2720,12 @@ func (m *DispatchCheckRequest) SizeVT() (n int) { } else { l = proto.Size(m.ResourceRelation) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.ResourceIds) > 0 { for _, s := range m.ResourceIds { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.Subject != nil { @@ -2810,13 +2736,13 @@ func (m *DispatchCheckRequest) SizeVT() (n int) { } else { l = proto.Size(m.Subject) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ResultsSetting != 0 { - n += 1 + sov(uint64(m.ResultsSetting)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.ResultsSetting)) } if m.Debug != 0 { - n += 1 + sov(uint64(m.Debug)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Debug)) } n += len(m.unknownFields) return n @@ -2830,7 +2756,7 @@ func (m *DispatchCheckResponse) SizeVT() (n int) { _ = l if m.Metadata != nil { l = m.Metadata.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.ResultsByResourceId) > 0 { for k, v := range m.ResultsByResourceId { @@ -2840,9 +2766,9 @@ func (m *DispatchCheckResponse) SizeVT() (n int) { if v != nil { l = v.SizeVT() } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + l += 1 + protohelpers.SizeOfVarint(uint64(l)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } n += len(m.unknownFields) @@ -2856,7 +2782,7 @@ func (m *ResourceCheckResult) SizeVT() (n int) { var l int _ = l if m.Membership != 0 { - n += 1 + sov(uint64(m.Membership)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Membership)) } if m.Expression != nil { if size, ok := interface{}(m.Expression).(interface { @@ -2866,12 +2792,12 @@ func (m *ResourceCheckResult) SizeVT() (n int) { } else { l = proto.Size(m.Expression) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.MissingExprFields) > 0 { for _, s := range m.MissingExprFields { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -2886,7 +2812,7 @@ func (m *DispatchExpandRequest) SizeVT() (n int) { _ = l if m.Metadata != nil { l = m.Metadata.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ResourceAndRelation != nil { if size, ok := interface{}(m.ResourceAndRelation).(interface { @@ -2896,10 +2822,10 @@ func (m *DispatchExpandRequest) SizeVT() (n int) { } else { l = proto.Size(m.ResourceAndRelation) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ExpansionMode != 0 { - n += 1 + sov(uint64(m.ExpansionMode)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.ExpansionMode)) } n += len(m.unknownFields) return n @@ -2913,7 +2839,7 @@ func (m *DispatchExpandResponse) SizeVT() (n int) { _ = l if m.Metadata != nil { l = m.Metadata.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.TreeNode != nil { if size, ok := interface{}(m.TreeNode).(interface { @@ -2923,7 +2849,7 @@ func (m *DispatchExpandResponse) SizeVT() (n int) { } else { l = proto.Size(m.TreeNode) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -2938,11 +2864,11 @@ func (m *Cursor) SizeVT() (n int) { if len(m.Sections) > 0 { for _, s := range m.Sections { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.DispatchVersion != 0 { - n += 1 + sov(uint64(m.DispatchVersion)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.DispatchVersion)) } n += len(m.unknownFields) return n @@ -2956,7 +2882,7 @@ func (m *DispatchReachableResourcesRequest) SizeVT() (n int) { _ = l if m.Metadata != nil { l = m.Metadata.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ResourceRelation != nil { if size, ok := interface{}(m.ResourceRelation).(interface { @@ -2966,7 +2892,7 @@ func (m *DispatchReachableResourcesRequest) SizeVT() (n int) { } else { l = proto.Size(m.ResourceRelation) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.SubjectRelation != nil { if size, ok := interface{}(m.SubjectRelation).(interface { @@ -2976,20 +2902,20 @@ func (m *DispatchReachableResourcesRequest) SizeVT() (n int) { } else { l = proto.Size(m.SubjectRelation) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.SubjectIds) > 0 { for _, s := range m.SubjectIds { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.OptionalCursor != nil { l = m.OptionalCursor.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalLimit != 0 { - n += 1 + sov(uint64(m.OptionalLimit)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalLimit)) } n += len(m.unknownFields) return n @@ -3003,15 +2929,15 @@ func (m *ReachableResource) SizeVT() (n int) { _ = l l = len(m.ResourceId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ResultStatus != 0 { - n += 1 + sov(uint64(m.ResultStatus)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.ResultStatus)) } if len(m.ForSubjectIds) > 0 { for _, s := range m.ForSubjectIds { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -3026,15 +2952,15 @@ func (m *DispatchReachableResourcesResponse) SizeVT() (n int) { _ = l if m.Resource != nil { l = m.Resource.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Metadata != nil { l = m.Metadata.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.AfterResponseCursor != nil { l = m.AfterResponseCursor.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -3048,7 +2974,7 @@ func (m *DispatchLookupResourcesRequest) SizeVT() (n int) { _ = l if m.Metadata != nil { l = m.Metadata.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ObjectRelation != nil { if size, ok := interface{}(m.ObjectRelation).(interface { @@ -3058,7 +2984,7 @@ func (m *DispatchLookupResourcesRequest) SizeVT() (n int) { } else { l = proto.Size(m.ObjectRelation) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Subject != nil { if size, ok := interface{}(m.Subject).(interface { @@ -3068,24 +2994,18 @@ func (m *DispatchLookupResourcesRequest) SizeVT() (n int) { } else { l = proto.Size(m.Subject) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalLimit != 0 { - n += 1 + sov(uint64(m.OptionalLimit)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalLimit)) } if m.Context != nil { - if size, ok := interface{}(m.Context).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.Context) - } - n += 1 + l + sov(uint64(l)) + l = (*structpb1.Struct)(m.Context).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.OptionalCursor != nil { l = m.OptionalCursor.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -3099,15 +3019,15 @@ func (m *ResolvedResource) SizeVT() (n int) { _ = l l = len(m.ResourceId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Permissionship != 0 { - n += 1 + sov(uint64(m.Permissionship)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Permissionship)) } if len(m.MissingRequiredContext) > 0 { for _, s := range m.MissingRequiredContext { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -3122,15 +3042,15 @@ func (m *DispatchLookupResourcesResponse) SizeVT() (n int) { _ = l if m.Metadata != nil { l = m.Metadata.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ResolvedResource != nil { l = m.ResolvedResource.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.AfterResponseCursor != nil { l = m.AfterResponseCursor.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -3144,7 +3064,7 @@ func (m *DispatchLookupSubjectsRequest) SizeVT() (n int) { _ = l if m.Metadata != nil { l = m.Metadata.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ResourceRelation != nil { if size, ok := interface{}(m.ResourceRelation).(interface { @@ -3154,12 +3074,12 @@ func (m *DispatchLookupSubjectsRequest) SizeVT() (n int) { } else { l = proto.Size(m.ResourceRelation) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.ResourceIds) > 0 { for _, s := range m.ResourceIds { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.SubjectRelation != nil { @@ -3170,7 +3090,7 @@ func (m *DispatchLookupSubjectsRequest) SizeVT() (n int) { } else { l = proto.Size(m.SubjectRelation) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -3184,7 +3104,7 @@ func (m *FoundSubject) SizeVT() (n int) { _ = l l = len(m.SubjectId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.CaveatExpression != nil { if size, ok := interface{}(m.CaveatExpression).(interface { @@ -3194,12 +3114,12 @@ func (m *FoundSubject) SizeVT() (n int) { } else { l = proto.Size(m.CaveatExpression) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.ExcludedSubjects) > 0 { for _, e := range m.ExcludedSubjects { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -3215,7 +3135,7 @@ func (m *FoundSubjects) SizeVT() (n int) { if len(m.FoundSubjects) > 0 { for _, e := range m.FoundSubjects { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -3236,14 +3156,14 @@ func (m *DispatchLookupSubjectsResponse) SizeVT() (n int) { if v != nil { l = v.SizeVT() } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + l += 1 + protohelpers.SizeOfVarint(uint64(l)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if m.Metadata != nil { l = m.Metadata.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -3257,18 +3177,18 @@ func (m *ResolverMeta) SizeVT() (n int) { _ = l l = len(m.AtRevision) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.DepthRemaining != 0 { - n += 1 + sov(uint64(m.DepthRemaining)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.DepthRemaining)) } l = len(m.RequestId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.TraversalBloom) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -3281,17 +3201,17 @@ func (m *ResponseMeta) SizeVT() (n int) { var l int _ = l if m.DispatchCount != 0 { - n += 1 + sov(uint64(m.DispatchCount)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.DispatchCount)) } if m.DepthRequired != 0 { - n += 1 + sov(uint64(m.DepthRequired)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.DepthRequired)) } if m.CachedDispatchCount != 0 { - n += 1 + sov(uint64(m.CachedDispatchCount)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.CachedDispatchCount)) } if m.DebugInfo != nil { l = m.DebugInfo.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -3305,7 +3225,7 @@ func (m *DebugInformation) SizeVT() (n int) { _ = l if m.Check != nil { l = m.Check.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -3319,10 +3239,10 @@ func (m *CheckDebugTrace) SizeVT() (n int) { _ = l if m.Request != nil { l = m.Request.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ResourceRelationType != 0 { - n += 1 + sov(uint64(m.ResourceRelationType)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.ResourceRelationType)) } if len(m.Results) > 0 { for k, v := range m.Results { @@ -3332,9 +3252,9 @@ func (m *CheckDebugTrace) SizeVT() (n int) { if v != nil { l = v.SizeVT() } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + l += 1 + protohelpers.SizeOfVarint(uint64(l)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if m.IsCachedResult { @@ -3343,29 +3263,17 @@ func (m *CheckDebugTrace) SizeVT() (n int) { if len(m.SubProblems) > 0 { for _, e := range m.SubProblems { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.Duration != nil { - if size, ok := interface{}(m.Duration).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.Duration) - } - n += 1 + l + sov(uint64(l)) + l = (*durationpb1.Duration)(m.Duration).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n } -func sov(x uint64) (n int) { - return (bits.Len64(x|1) + 6) / 7 -} -func soz(x uint64) (n int) { - return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3374,7 +3282,7 @@ func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3402,7 +3310,7 @@ func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3415,11 +3323,11 @@ func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3438,7 +3346,7 @@ func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3451,11 +3359,11 @@ func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3482,7 +3390,7 @@ func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3496,11 +3404,11 @@ func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3514,7 +3422,7 @@ func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3527,11 +3435,11 @@ func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3558,7 +3466,7 @@ func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { m.ResultsSetting = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3577,7 +3485,7 @@ func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { m.Debug = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3591,12 +3499,12 @@ func (m *DispatchCheckRequest) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3619,7 +3527,7 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3647,7 +3555,7 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3660,11 +3568,11 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3683,7 +3591,7 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3696,11 +3604,11 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3715,7 +3623,7 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3732,7 +3640,7 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3746,11 +3654,11 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -3761,7 +3669,7 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3774,11 +3682,11 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { } } if mapmsglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF @@ -3790,12 +3698,12 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { iNdEx = postmsgIndex } else { iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -3807,12 +3715,12 @@ func (m *DispatchCheckResponse) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3835,7 +3743,7 @@ func (m *ResourceCheckResult) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3863,7 +3771,7 @@ func (m *ResourceCheckResult) UnmarshalVT(dAtA []byte) error { m.Membership = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3882,7 +3790,7 @@ func (m *ResourceCheckResult) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3895,11 +3803,11 @@ func (m *ResourceCheckResult) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3926,7 +3834,7 @@ func (m *ResourceCheckResult) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3940,11 +3848,11 @@ func (m *ResourceCheckResult) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3953,12 +3861,12 @@ func (m *ResourceCheckResult) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3981,7 +3889,7 @@ func (m *DispatchExpandRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4009,7 +3917,7 @@ func (m *DispatchExpandRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4022,11 +3930,11 @@ func (m *DispatchExpandRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4045,7 +3953,7 @@ func (m *DispatchExpandRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4058,11 +3966,11 @@ func (m *DispatchExpandRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4089,7 +3997,7 @@ func (m *DispatchExpandRequest) UnmarshalVT(dAtA []byte) error { m.ExpansionMode = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4103,12 +4011,12 @@ func (m *DispatchExpandRequest) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4131,7 +4039,7 @@ func (m *DispatchExpandResponse) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4159,7 +4067,7 @@ func (m *DispatchExpandResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4172,11 +4080,11 @@ func (m *DispatchExpandResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4195,7 +4103,7 @@ func (m *DispatchExpandResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4208,11 +4116,11 @@ func (m *DispatchExpandResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4234,12 +4142,12 @@ func (m *DispatchExpandResponse) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4262,7 +4170,7 @@ func (m *Cursor) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4290,7 +4198,7 @@ func (m *Cursor) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4304,11 +4212,11 @@ func (m *Cursor) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4322,7 +4230,7 @@ func (m *Cursor) UnmarshalVT(dAtA []byte) error { m.DispatchVersion = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4336,12 +4244,12 @@ func (m *Cursor) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4364,7 +4272,7 @@ func (m *DispatchReachableResourcesRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4392,7 +4300,7 @@ func (m *DispatchReachableResourcesRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4405,11 +4313,11 @@ func (m *DispatchReachableResourcesRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4428,7 +4336,7 @@ func (m *DispatchReachableResourcesRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4441,11 +4349,11 @@ func (m *DispatchReachableResourcesRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4472,7 +4380,7 @@ func (m *DispatchReachableResourcesRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4485,11 +4393,11 @@ func (m *DispatchReachableResourcesRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4516,7 +4424,7 @@ func (m *DispatchReachableResourcesRequest) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4530,11 +4438,11 @@ func (m *DispatchReachableResourcesRequest) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4548,7 +4456,7 @@ func (m *DispatchReachableResourcesRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4561,11 +4469,11 @@ func (m *DispatchReachableResourcesRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4584,7 +4492,7 @@ func (m *DispatchReachableResourcesRequest) UnmarshalVT(dAtA []byte) error { m.OptionalLimit = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4598,12 +4506,12 @@ func (m *DispatchReachableResourcesRequest) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4626,7 +4534,7 @@ func (m *ReachableResource) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4654,7 +4562,7 @@ func (m *ReachableResource) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4668,11 +4576,11 @@ func (m *ReachableResource) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4686,7 +4594,7 @@ func (m *ReachableResource) UnmarshalVT(dAtA []byte) error { m.ResultStatus = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4705,7 +4613,7 @@ func (m *ReachableResource) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4719,11 +4627,11 @@ func (m *ReachableResource) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4732,12 +4640,12 @@ func (m *ReachableResource) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4760,7 +4668,7 @@ func (m *DispatchReachableResourcesResponse) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4788,7 +4696,7 @@ func (m *DispatchReachableResourcesResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4801,11 +4709,11 @@ func (m *DispatchReachableResourcesResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4824,7 +4732,7 @@ func (m *DispatchReachableResourcesResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4837,11 +4745,11 @@ func (m *DispatchReachableResourcesResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4860,7 +4768,7 @@ func (m *DispatchReachableResourcesResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4873,11 +4781,11 @@ func (m *DispatchReachableResourcesResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4891,12 +4799,12 @@ func (m *DispatchReachableResourcesResponse) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -4919,7 +4827,7 @@ func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4947,7 +4855,7 @@ func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4960,11 +4868,11 @@ func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -4983,7 +4891,7 @@ func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -4996,11 +4904,11 @@ func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5027,7 +4935,7 @@ func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5040,11 +4948,11 @@ func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5071,7 +4979,7 @@ func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { m.OptionalLimit = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5090,7 +4998,7 @@ func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5103,11 +5011,11 @@ func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5115,16 +5023,8 @@ func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { if m.Context == nil { m.Context = &structpb.Struct{} } - if unmarshal, ok := interface{}(m.Context).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Context); err != nil { - return err - } + if err := (*structpb1.Struct)(m.Context).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex case 6: @@ -5134,7 +5034,7 @@ func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5147,11 +5047,11 @@ func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5165,12 +5065,12 @@ func (m *DispatchLookupResourcesRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -5193,7 +5093,7 @@ func (m *ResolvedResource) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5221,7 +5121,7 @@ func (m *ResolvedResource) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5235,11 +5135,11 @@ func (m *ResolvedResource) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5253,7 +5153,7 @@ func (m *ResolvedResource) UnmarshalVT(dAtA []byte) error { m.Permissionship = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5272,7 +5172,7 @@ func (m *ResolvedResource) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5286,11 +5186,11 @@ func (m *ResolvedResource) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5299,12 +5199,12 @@ func (m *ResolvedResource) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -5327,7 +5227,7 @@ func (m *DispatchLookupResourcesResponse) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5355,7 +5255,7 @@ func (m *DispatchLookupResourcesResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5368,11 +5268,11 @@ func (m *DispatchLookupResourcesResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5391,7 +5291,7 @@ func (m *DispatchLookupResourcesResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5404,11 +5304,11 @@ func (m *DispatchLookupResourcesResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5427,7 +5327,7 @@ func (m *DispatchLookupResourcesResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5440,11 +5340,11 @@ func (m *DispatchLookupResourcesResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5458,12 +5358,12 @@ func (m *DispatchLookupResourcesResponse) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -5486,7 +5386,7 @@ func (m *DispatchLookupSubjectsRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5514,7 +5414,7 @@ func (m *DispatchLookupSubjectsRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5527,11 +5427,11 @@ func (m *DispatchLookupSubjectsRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5550,7 +5450,7 @@ func (m *DispatchLookupSubjectsRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5563,11 +5463,11 @@ func (m *DispatchLookupSubjectsRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5594,7 +5494,7 @@ func (m *DispatchLookupSubjectsRequest) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5608,11 +5508,11 @@ func (m *DispatchLookupSubjectsRequest) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5626,7 +5526,7 @@ func (m *DispatchLookupSubjectsRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5639,11 +5539,11 @@ func (m *DispatchLookupSubjectsRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5665,12 +5565,12 @@ func (m *DispatchLookupSubjectsRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -5693,7 +5593,7 @@ func (m *FoundSubject) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5721,7 +5621,7 @@ func (m *FoundSubject) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5735,11 +5635,11 @@ func (m *FoundSubject) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5753,7 +5653,7 @@ func (m *FoundSubject) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5766,11 +5666,11 @@ func (m *FoundSubject) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5797,7 +5697,7 @@ func (m *FoundSubject) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5810,11 +5710,11 @@ func (m *FoundSubject) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5826,12 +5726,12 @@ func (m *FoundSubject) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -5854,7 +5754,7 @@ func (m *FoundSubjects) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5882,7 +5782,7 @@ func (m *FoundSubjects) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5895,11 +5795,11 @@ func (m *FoundSubjects) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5911,12 +5811,12 @@ func (m *FoundSubjects) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -5939,7 +5839,7 @@ func (m *DispatchLookupSubjectsResponse) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5967,7 +5867,7 @@ func (m *DispatchLookupSubjectsResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -5980,11 +5880,11 @@ func (m *DispatchLookupSubjectsResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -5999,7 +5899,7 @@ func (m *DispatchLookupSubjectsResponse) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6016,7 +5916,7 @@ func (m *DispatchLookupSubjectsResponse) UnmarshalVT(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6030,11 +5930,11 @@ func (m *DispatchLookupSubjectsResponse) UnmarshalVT(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -6045,7 +5945,7 @@ func (m *DispatchLookupSubjectsResponse) UnmarshalVT(dAtA []byte) error { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6058,11 +5958,11 @@ func (m *DispatchLookupSubjectsResponse) UnmarshalVT(dAtA []byte) error { } } if mapmsglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF @@ -6074,12 +5974,12 @@ func (m *DispatchLookupSubjectsResponse) UnmarshalVT(dAtA []byte) error { iNdEx = postmsgIndex } else { iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -6096,7 +5996,7 @@ func (m *DispatchLookupSubjectsResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6109,11 +6009,11 @@ func (m *DispatchLookupSubjectsResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6127,12 +6027,12 @@ func (m *DispatchLookupSubjectsResponse) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -6155,7 +6055,7 @@ func (m *ResolverMeta) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6183,7 +6083,7 @@ func (m *ResolverMeta) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6197,11 +6097,11 @@ func (m *ResolverMeta) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6215,7 +6115,7 @@ func (m *ResolverMeta) UnmarshalVT(dAtA []byte) error { m.DepthRemaining = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6234,7 +6134,7 @@ func (m *ResolverMeta) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6248,11 +6148,11 @@ func (m *ResolverMeta) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6266,7 +6166,7 @@ func (m *ResolverMeta) UnmarshalVT(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6279,11 +6179,11 @@ func (m *ResolverMeta) UnmarshalVT(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6295,12 +6195,12 @@ func (m *ResolverMeta) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -6323,7 +6223,7 @@ func (m *ResponseMeta) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6351,7 +6251,7 @@ func (m *ResponseMeta) UnmarshalVT(dAtA []byte) error { m.DispatchCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6370,7 +6270,7 @@ func (m *ResponseMeta) UnmarshalVT(dAtA []byte) error { m.DepthRequired = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6389,7 +6289,7 @@ func (m *ResponseMeta) UnmarshalVT(dAtA []byte) error { m.CachedDispatchCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6408,7 +6308,7 @@ func (m *ResponseMeta) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6421,11 +6321,11 @@ func (m *ResponseMeta) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6439,12 +6339,12 @@ func (m *ResponseMeta) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -6467,7 +6367,7 @@ func (m *DebugInformation) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6495,7 +6395,7 @@ func (m *DebugInformation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6508,11 +6408,11 @@ func (m *DebugInformation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6526,12 +6426,12 @@ func (m *DebugInformation) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -6554,7 +6454,7 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6582,7 +6482,7 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6595,11 +6495,11 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6618,7 +6518,7 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { m.ResourceRelationType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6637,7 +6537,7 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6650,11 +6550,11 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6669,7 +6569,7 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6686,7 +6586,7 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6700,11 +6600,11 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -6715,7 +6615,7 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6728,11 +6628,11 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { } } if mapmsglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF @@ -6744,12 +6644,12 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { iNdEx = postmsgIndex } else { iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -6766,7 +6666,7 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6786,7 +6686,7 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6799,11 +6699,11 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6820,7 +6720,7 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -6833,11 +6733,11 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -6845,26 +6745,18 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { if m.Duration == nil { m.Duration = &durationpb.Duration{} } - if unmarshal, ok := interface{}(m.Duration).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Duration); err != nil { - return err - } + if err := (*durationpb1.Duration)(m.Duration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -6879,88 +6771,3 @@ func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error { } return nil } - -func skip(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLength - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroup - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLength - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflow = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") -) diff --git a/pkg/proto/impl/v1/impl_vtproto.pb.go b/pkg/proto/impl/v1/impl_vtproto.pb.go index b587b1968c..b33b124c04 100644 --- a/pkg/proto/impl/v1/impl_vtproto.pb.go +++ b/pkg/proto/impl/v1/impl_vtproto.pb.go @@ -1,16 +1,16 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.0 +// protoc-gen-go-vtproto version: v0.5.1-0.20231212170721-e7d721933795 // source: impl/v1/impl.proto package implv1 import ( fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" - bits "math/bits" ) const ( @@ -24,9 +24,8 @@ func (m *DecodedCaveat) CloneVT() *DecodedCaveat { if m == nil { return (*DecodedCaveat)(nil) } - r := &DecodedCaveat{ - Name: m.Name, - } + r := new(DecodedCaveat) + r.Name = m.Name if m.KindOneof != nil { r.KindOneof = m.KindOneof.(interface { CloneVT() isDecodedCaveat_KindOneof @@ -47,7 +46,7 @@ func (m *DecodedCaveat_Cel) CloneVT() isDecodedCaveat_KindOneof { if m == nil { return (*DecodedCaveat_Cel)(nil) } - r := &DecodedCaveat_Cel{} + r := new(DecodedCaveat_Cel) if rhs := m.Cel; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1alpha1.CheckedExpr }); ok { r.Cel = vtpb.CloneVT() @@ -62,9 +61,8 @@ func (m *DecodedZookie_V1Zookie) CloneVT() *DecodedZookie_V1Zookie { if m == nil { return (*DecodedZookie_V1Zookie)(nil) } - r := &DecodedZookie_V1Zookie{ - Revision: m.Revision, - } + r := new(DecodedZookie_V1Zookie) + r.Revision = m.Revision if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -80,9 +78,8 @@ func (m *DecodedZookie_V2Zookie) CloneVT() *DecodedZookie_V2Zookie { if m == nil { return (*DecodedZookie_V2Zookie)(nil) } - r := &DecodedZookie_V2Zookie{ - Revision: m.Revision, - } + r := new(DecodedZookie_V2Zookie) + r.Revision = m.Revision if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -98,9 +95,8 @@ func (m *DecodedZookie) CloneVT() *DecodedZookie { if m == nil { return (*DecodedZookie)(nil) } - r := &DecodedZookie{ - Version: m.Version, - } + r := new(DecodedZookie) + r.Version = m.Version if m.VersionOneof != nil { r.VersionOneof = m.VersionOneof.(interface { CloneVT() isDecodedZookie_VersionOneof @@ -121,9 +117,8 @@ func (m *DecodedZookie_V1) CloneVT() isDecodedZookie_VersionOneof { if m == nil { return (*DecodedZookie_V1)(nil) } - r := &DecodedZookie_V1{ - V1: m.V1.CloneVT(), - } + r := new(DecodedZookie_V1) + r.V1 = m.V1.CloneVT() return r } @@ -131,9 +126,8 @@ func (m *DecodedZookie_V2) CloneVT() isDecodedZookie_VersionOneof { if m == nil { return (*DecodedZookie_V2)(nil) } - r := &DecodedZookie_V2{ - V2: m.V2.CloneVT(), - } + r := new(DecodedZookie_V2) + r.V2 = m.V2.CloneVT() return r } @@ -141,9 +135,8 @@ func (m *DecodedZedToken_V1Zookie) CloneVT() *DecodedZedToken_V1Zookie { if m == nil { return (*DecodedZedToken_V1Zookie)(nil) } - r := &DecodedZedToken_V1Zookie{ - Revision: m.Revision, - } + r := new(DecodedZedToken_V1Zookie) + r.Revision = m.Revision if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -159,9 +152,8 @@ func (m *DecodedZedToken_V1ZedToken) CloneVT() *DecodedZedToken_V1ZedToken { if m == nil { return (*DecodedZedToken_V1ZedToken)(nil) } - r := &DecodedZedToken_V1ZedToken{ - Revision: m.Revision, - } + r := new(DecodedZedToken_V1ZedToken) + r.Revision = m.Revision if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -177,7 +169,7 @@ func (m *DecodedZedToken) CloneVT() *DecodedZedToken { if m == nil { return (*DecodedZedToken)(nil) } - r := &DecodedZedToken{} + r := new(DecodedZedToken) if m.VersionOneof != nil { r.VersionOneof = m.VersionOneof.(interface { CloneVT() isDecodedZedToken_VersionOneof @@ -198,9 +190,8 @@ func (m *DecodedZedToken_DeprecatedV1Zookie) CloneVT() isDecodedZedToken_Version if m == nil { return (*DecodedZedToken_DeprecatedV1Zookie)(nil) } - r := &DecodedZedToken_DeprecatedV1Zookie{ - DeprecatedV1Zookie: m.DeprecatedV1Zookie.CloneVT(), - } + r := new(DecodedZedToken_DeprecatedV1Zookie) + r.DeprecatedV1Zookie = m.DeprecatedV1Zookie.CloneVT() return r } @@ -208,9 +199,8 @@ func (m *DecodedZedToken_V1) CloneVT() isDecodedZedToken_VersionOneof { if m == nil { return (*DecodedZedToken_V1)(nil) } - r := &DecodedZedToken_V1{ - V1: m.V1.CloneVT(), - } + r := new(DecodedZedToken_V1) + r.V1 = m.V1.CloneVT() return r } @@ -218,7 +208,7 @@ func (m *DecodedCursor) CloneVT() *DecodedCursor { if m == nil { return (*DecodedCursor)(nil) } - r := &DecodedCursor{} + r := new(DecodedCursor) if m.VersionOneof != nil { r.VersionOneof = m.VersionOneof.(interface { CloneVT() isDecodedCursor_VersionOneof @@ -239,9 +229,8 @@ func (m *DecodedCursor_V1) CloneVT() isDecodedCursor_VersionOneof { if m == nil { return (*DecodedCursor_V1)(nil) } - r := &DecodedCursor_V1{ - V1: m.V1.CloneVT(), - } + r := new(DecodedCursor_V1) + r.V1 = m.V1.CloneVT() return r } @@ -249,11 +238,10 @@ func (m *V1Cursor) CloneVT() *V1Cursor { if m == nil { return (*V1Cursor)(nil) } - r := &V1Cursor{ - Revision: m.Revision, - CallAndParametersHash: m.CallAndParametersHash, - DispatchVersion: m.DispatchVersion, - } + r := new(V1Cursor) + r.Revision = m.Revision + r.CallAndParametersHash = m.CallAndParametersHash + r.DispatchVersion = m.DispatchVersion if rhs := m.Sections; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) @@ -274,9 +262,8 @@ func (m *DocComment) CloneVT() *DocComment { if m == nil { return (*DocComment)(nil) } - r := &DocComment{ - Comment: m.Comment, - } + r := new(DocComment) + r.Comment = m.Comment if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -292,9 +279,8 @@ func (m *RelationMetadata) CloneVT() *RelationMetadata { if m == nil { return (*RelationMetadata)(nil) } - r := &RelationMetadata{ - Kind: m.Kind, - } + r := new(RelationMetadata) + r.Kind = m.Kind if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -310,10 +296,9 @@ func (m *NamespaceAndRevision) CloneVT() *NamespaceAndRevision { if m == nil { return (*NamespaceAndRevision)(nil) } - r := &NamespaceAndRevision{ - NamespaceName: m.NamespaceName, - Revision: m.Revision, - } + r := new(NamespaceAndRevision) + r.NamespaceName = m.NamespaceName + r.Revision = m.Revision if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -329,7 +314,7 @@ func (m *V1Alpha1Revision) CloneVT() *V1Alpha1Revision { if m == nil { return (*V1Alpha1Revision)(nil) } - r := &V1Alpha1Revision{} + r := new(V1Alpha1Revision) if rhs := m.NsRevisions; rhs != nil { tmpContainer := make([]*NamespaceAndRevision, len(rhs)) for k, v := range rhs { @@ -867,7 +852,7 @@ func (m *DecodedCaveat) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x12 } @@ -890,7 +875,7 @@ func (m *DecodedCaveat_Cel) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.Cel) if err != nil { @@ -898,7 +883,7 @@ func (m *DecodedCaveat_Cel) MarshalToSizedBufferVT(dAtA []byte) (int, error) { } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0xa @@ -936,7 +921,7 @@ func (m *DecodedZookie_V1Zookie) MarshalToSizedBufferVT(dAtA []byte) (int, error copy(dAtA[i:], m.unknownFields) } if m.Revision != 0 { - i = encodeVarint(dAtA, i, uint64(m.Revision)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Revision)) i-- dAtA[i] = 0x8 } @@ -976,7 +961,7 @@ func (m *DecodedZookie_V2Zookie) MarshalToSizedBufferVT(dAtA []byte) (int, error if len(m.Revision) > 0 { i -= len(m.Revision) copy(dAtA[i:], m.Revision) - i = encodeVarint(dAtA, i, uint64(len(m.Revision))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Revision))) i-- dAtA[i] = 0xa } @@ -1023,7 +1008,7 @@ func (m *DecodedZookie) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= size } if m.Version != 0 { - i = encodeVarint(dAtA, i, uint64(m.Version)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Version)) i-- dAtA[i] = 0x8 } @@ -1043,7 +1028,7 @@ func (m *DecodedZookie_V1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -1062,7 +1047,7 @@ func (m *DecodedZookie_V2) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -1099,7 +1084,7 @@ func (m *DecodedZedToken_V1Zookie) MarshalToSizedBufferVT(dAtA []byte) (int, err copy(dAtA[i:], m.unknownFields) } if m.Revision != 0 { - i = encodeVarint(dAtA, i, uint64(m.Revision)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Revision)) i-- dAtA[i] = 0x8 } @@ -1139,7 +1124,7 @@ func (m *DecodedZedToken_V1ZedToken) MarshalToSizedBufferVT(dAtA []byte) (int, e if len(m.Revision) > 0 { i -= len(m.Revision) copy(dAtA[i:], m.Revision) - i = encodeVarint(dAtA, i, uint64(len(m.Revision))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Revision))) i-- dAtA[i] = 0xa } @@ -1201,7 +1186,7 @@ func (m *DecodedZedToken_DeprecatedV1Zookie) MarshalToSizedBufferVT(dAtA []byte) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -1220,7 +1205,7 @@ func (m *DecodedZedToken_V1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -1281,7 +1266,7 @@ func (m *DecodedCursor_V1) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1318,14 +1303,14 @@ func (m *V1Cursor) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.DispatchVersion != 0 { - i = encodeVarint(dAtA, i, uint64(m.DispatchVersion)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DispatchVersion)) i-- dAtA[i] = 0x20 } if len(m.CallAndParametersHash) > 0 { i -= len(m.CallAndParametersHash) copy(dAtA[i:], m.CallAndParametersHash) - i = encodeVarint(dAtA, i, uint64(len(m.CallAndParametersHash))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CallAndParametersHash))) i-- dAtA[i] = 0x1a } @@ -1333,7 +1318,7 @@ func (m *V1Cursor) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.Sections) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Sections[iNdEx]) copy(dAtA[i:], m.Sections[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Sections[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Sections[iNdEx]))) i-- dAtA[i] = 0x12 } @@ -1341,7 +1326,7 @@ func (m *V1Cursor) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Revision) > 0 { i -= len(m.Revision) copy(dAtA[i:], m.Revision) - i = encodeVarint(dAtA, i, uint64(len(m.Revision))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Revision))) i-- dAtA[i] = 0xa } @@ -1381,7 +1366,7 @@ func (m *DocComment) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Comment) > 0 { i -= len(m.Comment) copy(dAtA[i:], m.Comment) - i = encodeVarint(dAtA, i, uint64(len(m.Comment))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Comment))) i-- dAtA[i] = 0xa } @@ -1419,7 +1404,7 @@ func (m *RelationMetadata) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Kind != 0 { - i = encodeVarint(dAtA, i, uint64(m.Kind)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Kind)) i-- dAtA[i] = 0x8 } @@ -1459,14 +1444,14 @@ func (m *NamespaceAndRevision) MarshalToSizedBufferVT(dAtA []byte) (int, error) if len(m.Revision) > 0 { i -= len(m.Revision) copy(dAtA[i:], m.Revision) - i = encodeVarint(dAtA, i, uint64(len(m.Revision))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Revision))) i-- dAtA[i] = 0x12 } if len(m.NamespaceName) > 0 { i -= len(m.NamespaceName) copy(dAtA[i:], m.NamespaceName) - i = encodeVarint(dAtA, i, uint64(len(m.NamespaceName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NamespaceName))) i-- dAtA[i] = 0xa } @@ -1510,7 +1495,7 @@ func (m *V1Alpha1Revision) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1518,17 +1503,6 @@ func (m *V1Alpha1Revision) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarint(dAtA []byte, offset int, v uint64) int { - offset -= sov(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} func (m *DecodedCaveat) SizeVT() (n int) { if m == nil { return 0 @@ -1540,7 +1514,7 @@ func (m *DecodedCaveat) SizeVT() (n int) { } l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -1560,7 +1534,7 @@ func (m *DecodedCaveat_Cel) SizeVT() (n int) { } else { l = proto.Size(m.Cel) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -1571,7 +1545,7 @@ func (m *DecodedZookie_V1Zookie) SizeVT() (n int) { var l int _ = l if m.Revision != 0 { - n += 1 + sov(uint64(m.Revision)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Revision)) } n += len(m.unknownFields) return n @@ -1585,7 +1559,7 @@ func (m *DecodedZookie_V2Zookie) SizeVT() (n int) { _ = l l = len(m.Revision) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -1598,7 +1572,7 @@ func (m *DecodedZookie) SizeVT() (n int) { var l int _ = l if m.Version != 0 { - n += 1 + sov(uint64(m.Version)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Version)) } if vtmsg, ok := m.VersionOneof.(interface{ SizeVT() int }); ok { n += vtmsg.SizeVT() @@ -1615,7 +1589,7 @@ func (m *DecodedZookie_V1) SizeVT() (n int) { _ = l if m.V1 != nil { l = m.V1.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -1627,7 +1601,7 @@ func (m *DecodedZookie_V2) SizeVT() (n int) { _ = l if m.V2 != nil { l = m.V2.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -1638,7 +1612,7 @@ func (m *DecodedZedToken_V1Zookie) SizeVT() (n int) { var l int _ = l if m.Revision != 0 { - n += 1 + sov(uint64(m.Revision)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Revision)) } n += len(m.unknownFields) return n @@ -1652,7 +1626,7 @@ func (m *DecodedZedToken_V1ZedToken) SizeVT() (n int) { _ = l l = len(m.Revision) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -1679,7 +1653,7 @@ func (m *DecodedZedToken_DeprecatedV1Zookie) SizeVT() (n int) { _ = l if m.DeprecatedV1Zookie != nil { l = m.DeprecatedV1Zookie.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -1691,7 +1665,7 @@ func (m *DecodedZedToken_V1) SizeVT() (n int) { _ = l if m.V1 != nil { l = m.V1.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -1716,7 +1690,7 @@ func (m *DecodedCursor_V1) SizeVT() (n int) { _ = l if m.V1 != nil { l = m.V1.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -1728,20 +1702,20 @@ func (m *V1Cursor) SizeVT() (n int) { _ = l l = len(m.Revision) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Sections) > 0 { for _, s := range m.Sections { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } l = len(m.CallAndParametersHash) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.DispatchVersion != 0 { - n += 1 + sov(uint64(m.DispatchVersion)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.DispatchVersion)) } n += len(m.unknownFields) return n @@ -1755,7 +1729,7 @@ func (m *DocComment) SizeVT() (n int) { _ = l l = len(m.Comment) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -1768,7 +1742,7 @@ func (m *RelationMetadata) SizeVT() (n int) { var l int _ = l if m.Kind != 0 { - n += 1 + sov(uint64(m.Kind)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Kind)) } n += len(m.unknownFields) return n @@ -1782,11 +1756,11 @@ func (m *NamespaceAndRevision) SizeVT() (n int) { _ = l l = len(m.NamespaceName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Revision) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -1801,19 +1775,13 @@ func (m *V1Alpha1Revision) SizeVT() (n int) { if len(m.NsRevisions) > 0 { for _, e := range m.NsRevisions { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) return n } -func sov(x uint64) (n int) { - return (bits.Len64(x|1) + 6) / 7 -} -func soz(x uint64) (n int) { - return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} func (m *DecodedCaveat) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1822,7 +1790,7 @@ func (m *DecodedCaveat) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1850,7 +1818,7 @@ func (m *DecodedCaveat) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1863,11 +1831,11 @@ func (m *DecodedCaveat) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1907,7 +1875,7 @@ func (m *DecodedCaveat) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1921,11 +1889,11 @@ func (m *DecodedCaveat) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1934,12 +1902,12 @@ func (m *DecodedCaveat) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1962,7 +1930,7 @@ func (m *DecodedZookie_V1Zookie) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1990,7 +1958,7 @@ func (m *DecodedZookie_V1Zookie) UnmarshalVT(dAtA []byte) error { m.Revision = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2004,12 +1972,12 @@ func (m *DecodedZookie_V1Zookie) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2032,7 +2000,7 @@ func (m *DecodedZookie_V2Zookie) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2060,7 +2028,7 @@ func (m *DecodedZookie_V2Zookie) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2074,11 +2042,11 @@ func (m *DecodedZookie_V2Zookie) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2087,12 +2055,12 @@ func (m *DecodedZookie_V2Zookie) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2115,7 +2083,7 @@ func (m *DecodedZookie) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2143,7 +2111,7 @@ func (m *DecodedZookie) UnmarshalVT(dAtA []byte) error { m.Version = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2162,7 +2130,7 @@ func (m *DecodedZookie) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2175,11 +2143,11 @@ func (m *DecodedZookie) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2203,7 +2171,7 @@ func (m *DecodedZookie) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2216,11 +2184,11 @@ func (m *DecodedZookie) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2239,12 +2207,12 @@ func (m *DecodedZookie) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2267,7 +2235,7 @@ func (m *DecodedZedToken_V1Zookie) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2295,7 +2263,7 @@ func (m *DecodedZedToken_V1Zookie) UnmarshalVT(dAtA []byte) error { m.Revision = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2309,12 +2277,12 @@ func (m *DecodedZedToken_V1Zookie) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2337,7 +2305,7 @@ func (m *DecodedZedToken_V1ZedToken) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2365,7 +2333,7 @@ func (m *DecodedZedToken_V1ZedToken) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2379,11 +2347,11 @@ func (m *DecodedZedToken_V1ZedToken) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2392,12 +2360,12 @@ func (m *DecodedZedToken_V1ZedToken) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2420,7 +2388,7 @@ func (m *DecodedZedToken) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2448,7 +2416,7 @@ func (m *DecodedZedToken) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2461,11 +2429,11 @@ func (m *DecodedZedToken) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2489,7 +2457,7 @@ func (m *DecodedZedToken) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2502,11 +2470,11 @@ func (m *DecodedZedToken) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2525,12 +2493,12 @@ func (m *DecodedZedToken) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2553,7 +2521,7 @@ func (m *DecodedCursor) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2581,7 +2549,7 @@ func (m *DecodedCursor) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2594,11 +2562,11 @@ func (m *DecodedCursor) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2617,12 +2585,12 @@ func (m *DecodedCursor) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2645,7 +2613,7 @@ func (m *V1Cursor) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2673,7 +2641,7 @@ func (m *V1Cursor) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2687,11 +2655,11 @@ func (m *V1Cursor) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2705,7 +2673,7 @@ func (m *V1Cursor) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2719,11 +2687,11 @@ func (m *V1Cursor) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2737,7 +2705,7 @@ func (m *V1Cursor) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2751,11 +2719,11 @@ func (m *V1Cursor) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2769,7 +2737,7 @@ func (m *V1Cursor) UnmarshalVT(dAtA []byte) error { m.DispatchVersion = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2783,12 +2751,12 @@ func (m *V1Cursor) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2811,7 +2779,7 @@ func (m *DocComment) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2839,7 +2807,7 @@ func (m *DocComment) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2853,11 +2821,11 @@ func (m *DocComment) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2866,12 +2834,12 @@ func (m *DocComment) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2894,7 +2862,7 @@ func (m *RelationMetadata) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2922,7 +2890,7 @@ func (m *RelationMetadata) UnmarshalVT(dAtA []byte) error { m.Kind = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2936,12 +2904,12 @@ func (m *RelationMetadata) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2964,7 +2932,7 @@ func (m *NamespaceAndRevision) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2992,7 +2960,7 @@ func (m *NamespaceAndRevision) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3006,11 +2974,11 @@ func (m *NamespaceAndRevision) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3024,7 +2992,7 @@ func (m *NamespaceAndRevision) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3038,11 +3006,11 @@ func (m *NamespaceAndRevision) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3051,12 +3019,12 @@ func (m *NamespaceAndRevision) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3079,7 +3047,7 @@ func (m *V1Alpha1Revision) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3107,7 +3075,7 @@ func (m *V1Alpha1Revision) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3120,11 +3088,11 @@ func (m *V1Alpha1Revision) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3136,12 +3104,12 @@ func (m *V1Alpha1Revision) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3156,88 +3124,3 @@ func (m *V1Alpha1Revision) UnmarshalVT(dAtA []byte) error { } return nil } - -func skip(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLength - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroup - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLength - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflow = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") -) diff --git a/pkg/proto/impl/v1/pgrevision_vtproto.pb.go b/pkg/proto/impl/v1/pgrevision_vtproto.pb.go index b2393cf796..d52112bea0 100644 --- a/pkg/proto/impl/v1/pgrevision_vtproto.pb.go +++ b/pkg/proto/impl/v1/pgrevision_vtproto.pb.go @@ -1,11 +1,12 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.0 +// protoc-gen-go-vtproto version: v0.5.1-0.20231212170721-e7d721933795 // source: impl/v1/pgrevision.proto package implv1 import ( fmt "fmt" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" @@ -22,10 +23,9 @@ func (m *PostgresRevision) CloneVT() *PostgresRevision { if m == nil { return (*PostgresRevision)(nil) } - r := &PostgresRevision{ - Xmin: m.Xmin, - RelativeXmax: m.RelativeXmax, - } + r := new(PostgresRevision) + r.Xmin = m.Xmin + r.RelativeXmax = m.RelativeXmax if rhs := m.RelativeXips; rhs != nil { tmpContainer := make([]int64, len(rhs)) copy(tmpContainer, rhs) @@ -106,7 +106,7 @@ func (m *PostgresRevision) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.RelativeXips) > 0 { var pksize2 int for _, num := range m.RelativeXips { - pksize2 += sov(uint64(num)) + pksize2 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize2 j1 := i @@ -120,17 +120,17 @@ func (m *PostgresRevision) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[j1] = uint8(num) j1++ } - i = encodeVarint(dAtA, i, uint64(pksize2)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x1a } if m.RelativeXmax != 0 { - i = encodeVarint(dAtA, i, uint64(m.RelativeXmax)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RelativeXmax)) i-- dAtA[i] = 0x10 } if m.Xmin != 0 { - i = encodeVarint(dAtA, i, uint64(m.Xmin)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Xmin)) i-- dAtA[i] = 0x8 } @@ -144,17 +144,17 @@ func (m *PostgresRevision) SizeVT() (n int) { var l int _ = l if m.Xmin != 0 { - n += 1 + sov(uint64(m.Xmin)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Xmin)) } if m.RelativeXmax != 0 { - n += 1 + sov(uint64(m.RelativeXmax)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.RelativeXmax)) } if len(m.RelativeXips) > 0 { l = 0 for _, e := range m.RelativeXips { - l += sov(uint64(e)) + l += protohelpers.SizeOfVarint(uint64(e)) } - n += 1 + sov(uint64(l)) + l + n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l } n += len(m.unknownFields) return n @@ -168,7 +168,7 @@ func (m *PostgresRevision) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -196,7 +196,7 @@ func (m *PostgresRevision) UnmarshalVT(dAtA []byte) error { m.Xmin = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -215,7 +215,7 @@ func (m *PostgresRevision) UnmarshalVT(dAtA []byte) error { m.RelativeXmax = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -232,7 +232,7 @@ func (m *PostgresRevision) UnmarshalVT(dAtA []byte) error { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -249,7 +249,7 @@ func (m *PostgresRevision) UnmarshalVT(dAtA []byte) error { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -262,11 +262,11 @@ func (m *PostgresRevision) UnmarshalVT(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -286,7 +286,7 @@ func (m *PostgresRevision) UnmarshalVT(dAtA []byte) error { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -305,12 +305,12 @@ func (m *PostgresRevision) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF